WordPress File Upload - Version 4.5.1

Version Description

  • code improved in wfu_js_decode_obj function for better compatibility with Safari browser
  • code improved to sanitize all shortcode attributes before uploader form or file viewer is rendered
  • removed external references to code.jquery.com and cdnjs.cloudflare.com for better compliance with GDPR
Download this release

Release Info

Developer nickboss
Plugin Icon 128x128 WordPress File Upload
Version 4.5.1
Comparing to
See all releases

Code changes from version 4.5.0 to 4.5.1

css/wordpress_file_upload_adminstyle.css CHANGED
@@ -1 +1 @@
1
- div.wfu_help_container,div.wfu_restore_container,div.wfu_shortcode_container,div.wfu_td_div{background:0 0;border:none;padding:0;position:relative}select.wfu_variable,span.wfu_variable{font-size:smaller;color:#333;-webkit-touch-callout:none;-khtml-user-select:none;cursor:default}.wfu_conquestions_optable,.wfu_logactions_table,.wfu_permissions_table{border-collapse:collapse}div.wfu_shortcode_container{display:inline-block;width:50%;margin:0}div.wfu_container input.wfu_long_text,textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container{display:inline-block;top:4px;margin:0}div.wfu_help_container img{visibility:hidden}table.wfu_inner_table th:hover div.wfu_help_container img,table.wfu_main_table th:hover div.wfu_help_container img{visibility:visible}div.wfu_restore_container{display:inline-block;top:4px;margin:0}div.wfu_restore_container img{visibility:hidden}div.wfu_mchecklist_item:hover img,table.wfu_inner_table th:hover div.wfu_restore_container img,table.wfu_main_table th:hover div.wfu_restore_container img{visibility:visible}div.wfu_td_div{display:block;width:100%;height:100%;margin:0}div.wfu_container input.wfu_short_text{width:60px}div.wfu_container input{width:200px}div.wfu_container input[type=checkbox]{width:auto}div.wfu_container textarea{width:100%}table.wfu_main_table{table-layout:fixed}table.wfu_main_table tr:nth-child(odd){background-color:#f4f4f4}table.wfu_main_table table.wfu_inner_table tr,table.wfu_main_table tr:nth-child(even){background-color:transparent}select.wfu_variable,span.wfu_variable,table.wfu_main_table tr.wfu_subcategory{background-color:#ddd}table.wfu_main_table th{width:17%}table.wfu_main_table td:nth-child(2){width:33%}table.wfu_main_table td:nth-child(3){width:50%}table.wfu_main_table table.wfu_inner_table th{width:34%}table.wfu_main_table table.wfu_inner_table td:nth-child(2){width:66%}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;margin:0;height:auto;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}span.wfu_variable{padding:1px;margin:0;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.wfu_date_container{display:inline-block;position:relative;width:auto;height:100%;padding:0;margin:0;background:0 0;border:none}.wfu_datereset_button{position:absolute;right:4px;top:0;bottom:0;margin:auto 0;opacity:.5}.wfu_datereset_button:hover{opacity:1}span.wfu_ptext_span{display:inline-block;width:60px}select.wfu_select_folders{height:auto;min-width:75%}select.wfu_select_folders_empty{font-style:italic;color:silver}div.wfu_subfolders_inner_shadow{position:absolute;width:100%;height:100%;padding:0;margin:0;border:none;background-color:rgba(255,255,255,.8)}div.wfu_subfolder_nav_container,table.wfu_subfolder_nav,table.wfu_subfolder_nav td,table.wfu_subfolder_nav tr{background:0 0;margin:0;padding:0;border:none}option.wfu_select_folders_option_default{color:#00f}div.wfu_subfolder_nav_container{width:40px;display:inline-block;vertical-align:top}table.wfu_subfolder_nav{table-layout:fixed;width:100%;border-spacing:1px}table.wfu_subfolder_nav td{font-size:small;line-height:1;text-align:center}table.wfu_subfolder_nav button.button{margin:0;padding:0;width:17px;font-size:smaller;height:18px;line-height:1;color:#000;font-weight:700}.wfu_subfolder_tools_disabled,table.wfu_subfolder_nav button.button:disabled,table.wfu_subfolder_tools button.button:disabled{color:silver}.button.wfu_subfolder_nav_pressed,.button.wfu_subfolder_nav_pressed:focus,.button.wfu_subfolder_nav_pressed:hover{background:#4169e1}div.wfu_subfolder_tools_container{width:75%;margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools,table.wfu_subfolder_tools input{width:100%;padding:0;margin:0}table.wfu_subfolder_tools{table-layout:fixed;border:none;background:0 0}table.wfu_subfolder_tools tr{margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools td{margin:0;padding:0;border:none;background:0 0;font-size:smaller}table.wfu_subfolder_tools td div{margin:0;padding:0;border:none;background:0 0;position:relative}table.wfu_subfolder_tools label{display:block;padding:0;margin:0;line-height:1}table.wfu_subfolder_tools input:disabled{width:100%;padding:0;margin:0;color:silver}table.wfu_subfolder_tools button.button{margin:0;padding:1px 0 0;width:17px;font-size:smaller;height:17px;line-height:1;position:absolute;bottom:2px}table.wfu_subfolder_tools button.button:disabled img{opacity:.4}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container{position:absolute;width:150px;height:150px;margin:0;padding:0;z-index:100;border:1px solid silver;box-shadow:1px 1px 2px;background-color:#fff;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container table{table-layout:fixed;width:100%;height:100%;border:none;background:#eee;margin:0;padding:0;border-spacing:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container tr{border:none;background:0 0;margin:0;padding:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td{border:none;background:0 0;margin:0;padding:2px;line-height:0;overflow:hidden;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div{position:relative;border:none;background:0 0;margin:0;padding:0;width:100%;height:100%;display:inline-block;line-height:1}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button{font-size:inherit;line-height:1;height:17px;padding:4px;position:relative;width:auto;margin:0;bottom:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container select{width:100%;height:100%;top:0;bottom:0;position:absolute;margin:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container label{color:#222;font-weight:700;position:absolute;top:0;bottom:0;height:10px;margin:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button.wfu_folder_browser_cancel{width:17px;height:17px;position:absolute;right:0;top:0;margin:0;padding:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container{position:absolute;width:100%;height:100%;top:0;bottom:0;margin:0;padding:0;background-color:rgba(255,255,255,.9);text-align:center}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container label{position:relative;display:block}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container img{position:relative}.button.wfu_folder_browser_cancel img{vertical-align:top;margin-top:2px}div.wfu_mchecklist_container{display:inline-block;border:1px solid #ddd;border-radius:4px;padding:4px}div.wfu_mchecklist_item{display:inline-block}div.wfu_mchecklist_item label{vertical-align:baseline;margin-left:4px;cursor:default}div.wfu_mchecklist_item input:disabled+label{color:gray}div.wfu_mchecklist_item div{margin-left:4px}div.wfu_bloglist_checkbtn,div.wfu_mchecklist_checkall,div.wfu_postlist_checkbtn,div.wfu_rolelist_checkbtn,div.wfu_userlist_checkbtn{display:inline-block;vertical-align:top;margin:0 0 0 10px}table.wfu_bloglist_container,table.wfu_postlist_container,table.wfu_rolelist_container,table.wfu_stringmatch_container,table.wfu_userlist_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_bloglist_container tr:nth-child(odd),table.wfu_postlist_container tr:nth-child(odd),table.wfu_rolelist_container tr:nth-child(odd),table.wfu_userlist_container tr:nth-child(odd){border:none;background:0 0;margin:0;padding:0}table.wfu_bloglist_container td,table.wfu_postlist_container td,table.wfu_rolelist_container td,table.wfu_stringmatch_container td,table.wfu_userlist_container td{width:1%;border:none;background:0 0;margin:0;padding:0;vertical-align:top}table.wfu_postlist_container td{padding-right:20px}table.wfu_postlist_container td:last-child{padding-right:0}div.wfu_postlist_header{padding:0 10px}div.wfu_postlist_selectall{float:right}div.wfu_shadow{position:absolute;width:100%;height:100%;left:0;top:0;margin:0;padding:0;background-color:#fff;z-index:10;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);-moz-opacity:.6;-khtml-opacity:.6;opacity:.6}table.wfu_main_table tr:nth-child(odd) div.wfu_shadow{background-color:#f4f4f4}div.wfu_onoff_container_off,div.wfu_onoff_container_on{display:inline-block;position:relative;padding:2px;border:1px solid #aaa;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;background:#066dab;background:-moz-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(6,109,171,1)),color-stop(100%,rgba(197,222,234,1)));background:-webkit-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-o-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-ms-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:linear-gradient(to bottom,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#066dab', endColorstr='#c5deea', GradientType=0 )}span.wfu_onoff_text{width:30px;display:inline-block;text-align:center;color:#FFF}div.wfu_onoff_slider{position:absolute;margin:0;width:31px;top:0;bottom:0;border:1px solid #fff;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 2px;-webkit-box-shadow:0 0 2px;box-shadow:0 0 2px;background:#ccc;background:-moz-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(204,204,204,1)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to bottom,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#ffffff', GradientType=0 )}div.wfu_onoff_container_on div.wfu_onoff_slider{left:50%}div.wfu_onoff_container_off div.wfu_onoff_slider{left:0}@-webkit-keyframes set_on{from{left:0}to{left:50%}}@-moz-keyframes set_on{from{left:0}to{left:50%}}@-o-keyframes set_on{from{left:0}to{left:50%}}@keyframes set_on{from{left:0}to{left:50%}}div.wfu_placements_wrapper{display:block;position:relative;margin:0;padding:0;background:0 0;border:none}div.wfu_placements_container{display:inline-block;position:relative;width:100%;height:300px;background-color:#fff;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:0;overflow:scroll;font-size:0;line-height:0;white-space:nowrap}div.wfu_componentlist_container{display:inline-block;position:absolute;width:auto;height:auto;top:0;left:100%;background:0 0;border:none;margin:0 0 0 20px;padding:0;z-index:1;white-space:nowrap}div.wfu_component_box_container{display:inline-block;position:relative;width:80px;height:30px;background-color:transparent;border:1px solid transparent;padding:4px;margin:0;cursor:default}div.wfu_component_box,div.wfu_component_box_base{width:80px;height:30px;background-color:#ddd;padding:4px;cursor:default;font-size:12px;line-height:1;white-space:normal}div.wfu_component_box_base{display:block;position:absolute;left:-1px;top:-1px;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_box{display:inline-block;position:relative;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;z-index:1}div.wfu_component_box_inner{display:table;width:100%;height:100%}div.wfu_component_box_label{display:table-cell;text-align:center;vertical-align:middle}div.wfu_component_box_index{background-color:coral;padding:1px;float:right;border-radius:10px}div.wfu_inbase{display:block;position:absolute;left:-1px;top:-1px}div.wfu_component_box:hover{background-color:#eee;border:1px solid #bbb}div.wfu_component_box_selected{background-color:#aaa;border:1px solid #bbb}div.wfu_component_separator_hor,div.wfu_component_separator_ver{position:relative;background-color:transparent;border:1px solid transparent;z-index:1;cursor:default}div.wfu_component_box_dragged{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_separator_ver{display:inline-block;width:8px;height:26px;margin:6px -8px;padding:0 8px}div.wfu_component_separator_hor{display:block;width:100%;height:8px;margin:-8px 0;padding:8px 0}div.wfu_component_bar_hor,div.wfu_component_bar_ver{background-color:silver;border:none;display:none;position:absolute}div.wfu_component_bar_hor{width:auto;height:4px;left:10px;right:0;margin:11px 0 0;padding:0}div.wfu_component_bar_ver{width:4px;height:40px;margin:-6px 0 0 11px;padding:0}div.wfu_componentlist_dragdrop{position:absolute;width:100%;height:100%;left:0;top:0;background-color:#f8f8f8;border:4px dashed #aaa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;z-index:2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;opacity:.7}div.wfu_componentlist_dragdrop_dragover{border:4px dashed #555}div.wfu_formdata_container,div.wfu_userdata_container{display:block;position:relative;width:100%;height:100%;padding:0;margin:0;background:0 0;border:none}label.wfu_formdata_label{margin-right:6px}.wfu_formdata_props{padding-left:20px}div.wfu_formdata_action,div.wfu_userdata_action{display:inline-block;position:relative;top:2px;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_formdata_action:hover,div.wfu_userdata_action:hover{border:1px solid #aaa}div.wfu_formdata_action.wfu_formdata_action_disabled:hover,div.wfu_userdata_action.wfu_userdata_action_disabled:hover{border:1px solid transparent}div.wfu_formdata_action>img,div.wfu_userdata_action>img{width:12px;height:12px}div.wfu_formdata_action_disabled>img,div.wfu_userdata_action_disabled>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_formdata_line_container,div.wfu_userdata_line{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap}table.wfu_formdata_props_table{background:0 0;border:none;padding:0}table.wfu_formdata_props_table td,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td{background:0 0;border:none;padding:0;width:auto}table.wfu_formdata_props_table td.wfu_formdata_props,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td.wfu_formdata_props{padding-left:20px}div.wfu_color_container{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap;z-index:1}span.wfu_save_label,span.wfu_save_label_fail{border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;opacity:0;font-size:smaller}input[type=text].wp-color-picker{width:75px}input[type=button].wp-picker-clear{width:62px}span.wfu_save_label{background-color:#f0f8ff;color:#32cd32}span.wfu_save_label_fail{background-color:beige;color:#f08080}div.wfu_global_dialog_container{position:fixed;width:100%;height:100%;top:0;left:0;margin:0;padding:0;border:none;background:0 0;z-index:1;display:none}table.wfu_main_table table.wfu_columns_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_main_table table.wfu_columns_container tr{background:0 0}table.wfu_main_table table.wfu_columns_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:top;width:auto}table.wfu_main_table table.wfu_columnprops_container{border:none;background:0 0;margin:0;padding:6px;border-spacing:0;width:100%;box-shadow:0 0 1px #aaa}table.wfu_main_table table.wfu_columnprops_container tr{background:0 0}table.wfu_main_table table.wfu_columnprops_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:middle;width:auto}.wfu_conop_panel,.wfu_conop_topmost_panel,.wfu_pdop_panel,.wfu_pdop_topmost_panel{margin-left:40px;overflow:hidden}table.wfu_main_table table.wfu_columnprops_container label.wfu_columnprops_label_disabled,table.wfu_main_table table.wfu_columnprops_container_disabled label{color:#ccc}button.wfu_columns_addbutton{font-size:smaller}option.wfu_columns_item_required{color:gray}.wfu_conop_header,.wfu_pdop_header{transition:.4s;padding:6px}.wfu_conop_header label,.wfu_pdop_header label{font-weight:700;cursor:default}.wfu_conop_header.atomic label,.wfu_pdop_header.atomic label{font-weight:400}.wfu_conop_panel,.wfu_pdop_panel{display:none}.wfu_conop_level_1,.wfu_pdop_level_1{padding:10px;font-size:larger}.wfu_conop_level_2,.wfu_pdop_level_2{padding:6px;font-size:smaller}.wfu_conop_level_3,.wfu_conop_level_4,.wfu_conop_level_5,.wfu_pdop_level_3,.wfu_pdop_level_4,.wfu_pdop_level_5{padding:2px}.wfu_conop_header:hover,.wfu_pdop_header:hover{background-color:rgba(0,0,0,.2)}.wfu_conop_button,.wfu_pdop_button{color:#777;float:right;padding:2px;border:1px solid gray;border-radius:4px;width:1em;height:1em;text-align:center;position:relative;cursor:pointer;display:none}.wfu_conop_button:after,.wfu_pdop_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;font-size:smaller}.wfu_conop_button.expanded:after,.wfu_pdop_button.expanded:after{content:'\02796'}.wfu_conop_header:hover .wfu_conop_button,.wfu_pdop_header:hover .wfu_pdop_button{display:block}input[type=checkbox].wfu_conop_selector,input[type=checkbox].wfu_pdop_selector{-webkit-appearance:checkbox;margin:0 0 0 4px}.wfu_conquestions_operations{margin-top:20px;margin-left:40px}.wfu_conquestions_operations label{display:block;font-size:larger;font-weight:700}.wfu_conquestions_oppanel{background-color:#fff;padding:10px;display:inline-block;margin-top:10px}.wfu_conquestions_optable tbody tr:hover{background-color:rgba(0,0,0,.1)}.wfu_conquestions_optable td{cursor:default}.wfu_conquestions_optable td:not(:first-child){text-align:center}.wfu_op_unassigned{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover{background-color:#e6c58a}.wfu_op_unassigned .wfu_conquestions_opinv,.wfu_op_unassigned .wfu_conquestions_opsel{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opinv,.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opsel{background-color:#e6c58a}.wfu_frozen{pointer-events:none}.wfu_conquestions_container{margin-top:20px;margin-left:40px}.wfu_conquestion_header{font-size:larger}.wfu_conquestion_subcontainer{padding:10px}.wfu_conquestion_headerlabel{font-weight:700}.wfu_conquestion_tools{float:right}.wfu_conquestion_itemprops,.wfu_conquestion_itemspreview,.wfu_conquestion_mainprops{display:table-cell;position:relative;border:1px solid silver;padding:4ex 10px 10px;vertical-align:top;min-width:10em;min-height:4ex;resize:both;overflow:auto}.wfu_pd_user_select0,.wfu_pdusers_roles_leftpanel select,.wfu_pdusers_users_leftpanel select{min-width:100px;min-height:100px}.wfu_conquestion_itempropstitle,.wfu_conquestion_itemspreviewtitle,.wfu_conquestion_mainpropstitle{position:absolute;top:0;left:0;height:3ex;font-size:inherit;text-align:center;width:100%;background-color:rgba(0,0,0,.1)}.wfu_conquestion_displayedtitle,.wfu_conquestion_groupedlabel,.wfu_conquestion_labellabel,.wfu_conquestion_labellocationlabel,.wfu_conquestion_matrixlabel,.wfu_conquestion_preselectedlabel,.wfu_conquestion_titlelabel,.wfu_conquestion_titlelocationlabel,.wfu_conquestion_typelabel{display:block}.wfu_conquestion_labeltext,.wfu_conquestion_titletext{width:100%}.wfu_conquestion_matrix_x,.wfu_conquestion_matrix_y{width:4em;text-align:center}.wfu_conquestion_matrixsep{width:1em;display:inline-block;text-align:center}.wfu_empty_label{font-style:italic}.wfu_conquestion_itemtable td:hover{background-color:rgba(0,0,0,.1)}.wfu_item_selected{background-color:rgba(0,0,0,.2)}.wfu_item_assigned{color:#00f}.wfu_conquestion_btn{display:inline-block;position:relative;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_conquestion_btn:hover{border:1px solid #aaa}.wfu_conquestion_btn>img{width:12px;height:12px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}.wfu_log_button,.wfu_perm_button{width:1.5ex;height:1.5ex;cursor:pointer;display:inline-block;vertical-align:middle;text-align:center}div.wfu_conquestion_btn.wfu_tool_disabled:hover{border:1px solid transparent}.wfu_conquestion_btn.wfu_tool_disabled>img{opacity:.4}.wfu_permissions_topmost_panel{margin-left:40px}.wfu_permissions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_perm_container{padding-right:20px}.wfu_location_cell{text-align:center}.wfu_perm_level_1{padding-left:0}.wfu_perm_level_2{padding-left:20px}.wfu_perm_level_3{padding-left:40px}.wfu_permissions_table td:nth-child(n+2),.wfu_permissions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_perm_row:hover{background-color:rgba(0,0,0,.1)}.wfu_perm_button{color:#777;border:1px solid gray;position:relative}.wfu_perm_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_perm_button:hover{color:#000}.wfu_perm_button.expanded:after{content:'-'}input[type=checkbox].wfu_location_selector{-webkit-appearance:checkbox;margin:0}.wfu_logactions_topmost_panel{margin-left:40px}.wfu_logactions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_log_container{padding-right:20px}.wfu_entity_cell{text-align:center}.wfu_log_level_1{padding-left:0}.wfu_log_level_2{padding-left:20px}.wfu_log_level_3{padding-left:40px}.wfu_logactions_table td:nth-child(n+2),.wfu_logactions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_log_row:hover{background-color:rgba(0,0,0,.1)}.wfu_log_button{color:#777;border:1px solid gray;position:relative}.wfu_log_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_log_button:hover{color:#000}.wfu_log_button.expanded:after{content:'-'}input[type=checkbox].wfu_entity_selector{-webkit-appearance:checkbox;margin:0}.wfu_pdusers_topmost_panel{margin-top:20px;margin-left:40px}.wfu_pdusers_topmost_panel>label{display:block;font-size:larger;font-weight:700}.wfu_pdusers_rolepanel,.wfu_pdusers_userpanel{margin-top:20px}.wfu_pdusers_roles_container,.wfu_pdusers_users_container{display:inline-block}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_midpanel,.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_midpanel,.wfu_pdusers_users_rightpanel{display:table-cell;position:relative}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_rightpanel{height:200px;min-width:100px}.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_rightpanel{height:100px;min-width:100px}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_users_leftpanel{padding:10px 10px 10px 0}.wfu_pdusers_roles_midpanel,.wfu_pdusers_users_midpanel{padding:10px 0;vertical-align:top}.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_rightpanel{padding:20px;vertical-align:top}.wfu_pdusers_users_leftpanel label{display:block}.wfu_pdusers_users_midpanel label,.wfu_pdusers_users_rightpanel label{display:block;visibility:hidden}.wfu_pdusers_users_leftpanel input[type=text]{width:100px;display:block}.wfu_pdusers_roles_leftpanel select{height:100%!important;line-height:100%!important}.wfu_pdusers_roles_show,.wfu_pdusers_users_show{overflow-x:visible;overflow-y:scroll;height:100%}.wfu_pdusers_roles_back,.wfu_pdusers_users_back{border:1px solid gray;position:absolute;left:10px;top:10px;bottom:10px;right:10px;pointer-events:none},.wfu_pdusers_roles_back.active{background-color:rgba(255,255,255,.7)}.wfu_pdusers_roles_role,.wfu_pdusers_users_back.active{border:1px solid gray;text-align:center;padding:2px 24px 2px 4px;border-radius:1em;cursor:default;background-color:rgba(0,0,0,.05);position:relative;display:inline-block;white-space:nowrap}.wfu_pdusers_roles_all{text-align:center;padding:2px 20px;font-weight:700}.wfu_pdusers_roles_role span,.wfu_pdusers_users_role span{width:14px;height:14px;position:absolute;display:inline-block;right:3px;top:0;bottom:0;margin:auto;border:1px solid #888;border-radius:1em}.wfu_pdusers_roles_role span:after,.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_role span:after,.wfu_pdusers_users_role span:before{content:'';height:1px;margin-top:0;position:absolute;width:10px;top:50%;right:2px;background:#888}.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_role span:before{transform:rotate(45deg)}.wfu_pdusers_roles_role span:after,.wfu_pdusers_users_role span:after{transform:rotate(-45deg)}.wfu_pdusers_roles_role span:hover,.wfu_pdusers_users_role span:hover{background-color:rgba(0,0,0,.1);border:1px solid #1ebcc5}.wfu_pdusers_roles_role span:hover:after,.wfu_pdusers_roles_role span:hover:before,.wfu_pdusers_users_role span:hover:after,.wfu_pdusers_users_role span:hover:before{background:#1ebcc5}.wfu_pdusers_roles_add,.wfu_pdusers_users_add{width:20px;height:18px;display:inline-block;border:1px solid #888;border-radius:4px}.wfu_pdusers_roles_add:after,.wfu_pdusers_users_add:after{border:solid #555;border-width:0 3px 3px 0;display:inline-block;padding:3px;vertical-align:middle;transform:rotate(-45deg);content:'';margin-left:4px;margin-top:-2px}.wfu_pdusers_roles_add:hover,.wfu_pdusers_users_add:hover{border:1px solid #444;background-color:rgba(0,0,0,.1)}.wfu_pd_user_box0{width:100%}.wfu_pd_user_select0{width:100%;height:100px!important;line-height:100px!important}
1
+ div.wfu_help_container,div.wfu_restore_container,div.wfu_shortcode_container,div.wfu_td_div{background:0 0;border:none;padding:0;position:relative}select.wfu_variable,span.wfu_variable{font-size:smaller;color:#333;-webkit-touch-callout:none;-khtml-user-select:none;cursor:default}.wfu_conquestions_optable,.wfu_logactions_table,.wfu_permissions_table{border-collapse:collapse}div.wfu_shortcode_container{display:inline-block;width:50%;margin:0}div.wfu_container input.wfu_long_text,textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container{display:inline-block;top:4px;margin:0}div.wfu_help_container img{visibility:hidden}table.wfu_inner_table th:hover div.wfu_help_container img,table.wfu_main_table th:hover div.wfu_help_container img{visibility:visible}div.wfu_restore_container{display:inline-block;top:4px;margin:0}div.wfu_restore_container img{visibility:hidden}div.wfu_mchecklist_item:hover img,table.wfu_inner_table th:hover div.wfu_restore_container img,table.wfu_main_table th:hover div.wfu_restore_container img{visibility:visible}div.wfu_td_div{display:block;width:100%;height:100%;margin:0}div.wfu_container input.wfu_short_text{width:60px}div.wfu_container input{width:200px}div.wfu_container input[type=checkbox]{width:auto}div.wfu_container textarea{width:100%}table.wfu_main_table{table-layout:fixed}table.wfu_main_table tr:nth-child(odd){background-color:#f4f4f4}table.wfu_main_table table.wfu_inner_table tr,table.wfu_main_table tr:nth-child(even){background-color:transparent}select.wfu_variable,span.wfu_variable,table.wfu_main_table tr.wfu_subcategory{background-color:#ddd}table.wfu_main_table th{width:17%}table.wfu_main_table td:nth-child(2){width:33%}table.wfu_main_table td:nth-child(3){width:50%}table.wfu_main_table table.wfu_inner_table th{width:34%}table.wfu_main_table table.wfu_inner_table td:nth-child(2){width:66%}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;margin:0;height:auto;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}span.wfu_variable{padding:1px;margin:0;border:1px solid #ccc;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.wfu_date_container{display:inline-block;position:relative;width:auto;height:100%;padding:0;margin:0;background:0 0;border:none}.wfu_datereset_button{position:absolute;right:4px;top:0;bottom:0;margin:auto 0;opacity:.5}.wfu_datereset_button:hover{opacity:1}span.wfu_ptext_span{display:inline-block;width:60px}select.wfu_select_folders{height:auto;min-width:75%}select.wfu_select_folders_empty{font-style:italic;color:silver}div.wfu_subfolders_inner_shadow{position:absolute;width:100%;height:100%;padding:0;margin:0;border:none;background-color:rgba(255,255,255,.8)}div.wfu_subfolder_nav_container,table.wfu_subfolder_nav,table.wfu_subfolder_nav td,table.wfu_subfolder_nav tr{background:0 0;margin:0;padding:0;border:none}option.wfu_select_folders_option_default{color:#00f}div.wfu_subfolder_nav_container{width:40px;display:inline-block;vertical-align:top}table.wfu_subfolder_nav{table-layout:fixed;width:100%;border-spacing:1px}table.wfu_subfolder_nav td{font-size:small;line-height:1;text-align:center}table.wfu_subfolder_nav button.button{margin:0;padding:0;width:17px;font-size:smaller;height:18px;line-height:1;color:#000;font-weight:700}.wfu_subfolder_tools_disabled,table.wfu_subfolder_nav button.button:disabled,table.wfu_subfolder_tools button.button:disabled{color:silver}.button.wfu_subfolder_nav_pressed,.button.wfu_subfolder_nav_pressed:focus,.button.wfu_subfolder_nav_pressed:hover{background:#4169e1}div.wfu_subfolder_tools_container{width:75%;margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools,table.wfu_subfolder_tools input{width:100%;padding:0;margin:0}table.wfu_subfolder_tools{table-layout:fixed;border:none;background:0 0}table.wfu_subfolder_tools tr{margin:0;padding:0;border:none;background:0 0}table.wfu_subfolder_tools td{margin:0;padding:0;border:none;background:0 0;font-size:smaller}table.wfu_subfolder_tools td div{margin:0;padding:0;border:none;background:0 0;position:relative}table.wfu_subfolder_tools label{display:block;padding:0;margin:0;line-height:1}table.wfu_subfolder_tools input:disabled{width:100%;padding:0;margin:0;color:silver}table.wfu_subfolder_tools button.button{margin:0;padding:1px 0 0;width:17px;font-size:smaller;height:17px;line-height:1;position:absolute;bottom:2px}table.wfu_subfolder_tools button.button:disabled img{opacity:.4}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container{position:absolute;width:150px;height:150px;margin:0;padding:0;z-index:100;border:1px solid silver;box-shadow:1px 1px 2px;background-color:#fff;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container table{table-layout:fixed;width:100%;height:100%;border:none;background:#eee;margin:0;padding:0;border-spacing:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container tr{border:none;background:0 0;margin:0;padding:0;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td{border:none;background:0 0;margin:0;padding:2px;line-height:0;overflow:hidden;font-size:inherit}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div{position:relative;border:none;background:0 0;margin:0;padding:0;width:100%;height:100%;display:inline-block;line-height:1}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button{font-size:inherit;line-height:1;height:17px;padding:4px;position:relative;width:auto;margin:0;bottom:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container select{width:100%;height:100%;top:0;bottom:0;position:absolute;margin:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container label{color:#222;font-weight:700;position:absolute;top:0;bottom:0;height:10px;margin:auto}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div button.button.wfu_folder_browser_cancel{width:17px;height:17px;position:absolute;right:0;top:0;margin:0;padding:0}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container{position:absolute;width:100%;height:100%;top:0;bottom:0;margin:0;padding:0;background-color:rgba(255,255,255,.9);text-align:center}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container label{position:relative;display:block}table.wfu_subfolder_tools td div.wfu_subfolders_browser_container td div div.wfu_folder_browser_loading_container img{position:relative}.button.wfu_folder_browser_cancel img{vertical-align:top;margin-top:2px}div.wfu_mchecklist_container{display:inline-block;border:1px solid #ddd;border-radius:4px;padding:4px}div.wfu_mchecklist_item{display:inline-block}div.wfu_mchecklist_item label{vertical-align:baseline;margin-left:4px;cursor:default}div.wfu_mchecklist_item input:disabled+label{color:gray}div.wfu_mchecklist_item div{margin-left:4px}div.wfu_bloglist_checkbtn,div.wfu_mchecklist_checkall,div.wfu_postlist_checkbtn,div.wfu_rolelist_checkbtn,div.wfu_userlist_checkbtn{display:inline-block;vertical-align:top;margin:0 0 0 10px}table.wfu_bloglist_container,table.wfu_postlist_container,table.wfu_rolelist_container,table.wfu_stringmatch_container,table.wfu_userlist_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_bloglist_container tr:nth-child(odd),table.wfu_postlist_container tr:nth-child(odd),table.wfu_rolelist_container tr:nth-child(odd),table.wfu_userlist_container tr:nth-child(odd){border:none;background:0 0;margin:0;padding:0}table.wfu_bloglist_container td,table.wfu_postlist_container td,table.wfu_rolelist_container td,table.wfu_stringmatch_container td,table.wfu_userlist_container td{width:1%;border:none;background:0 0;margin:0;padding:0;vertical-align:top}table.wfu_postlist_container td{padding-right:20px}table.wfu_postlist_container td:last-child{padding-right:0}div.wfu_postlist_header{padding:0 10px}div.wfu_postlist_selectall{float:right}div.wfu_shadow{position:absolute;width:100%;height:100%;left:0;top:0;margin:0;padding:0;background-color:#fff;z-index:10;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);-moz-opacity:.6;-khtml-opacity:.6;opacity:.6}table.wfu_main_table tr:nth-child(odd) div.wfu_shadow{background-color:#f4f4f4}div.wfu_onoff_container_off,div.wfu_onoff_container_on{display:inline-block;position:relative;padding:2px;border:1px solid #aaa;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;background:#066dab;background:-moz-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(6,109,171,1)),color-stop(100%,rgba(197,222,234,1)));background:-webkit-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-o-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:-ms-linear-gradient(top,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);background:linear-gradient(to bottom,rgba(6,109,171,1) 0,rgba(197,222,234,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#066dab', endColorstr='#c5deea', GradientType=0 )}span.wfu_onoff_text{width:30px;display:inline-block;text-align:center;color:#FFF}div.wfu_onoff_slider{position:absolute;margin:0;width:31px;top:0;bottom:0;border:1px solid #fff;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;-moz-box-shadow:0 0 2px;-webkit-box-shadow:0 0 2px;box-shadow:0 0 2px;background:#ccc;background:-moz-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(204,204,204,1)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-o-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(top,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);background:linear-gradient(to bottom,rgba(204,204,204,1) 0,rgba(255,255,255,1) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#ffffff', GradientType=0 )}div.wfu_onoff_container_on div.wfu_onoff_slider{left:50%}div.wfu_onoff_container_off div.wfu_onoff_slider{left:0}@-webkit-keyframes set_on{from{left:0}to{left:50%}}@-moz-keyframes set_on{from{left:0}to{left:50%}}@-o-keyframes set_on{from{left:0}to{left:50%}}@keyframes set_on{from{left:0}to{left:50%}}div.wfu_placements_wrapper{display:block;position:relative;margin:0;padding:0;background:0 0;border:none}div.wfu_placements_container{display:inline-block;position:relative;width:100%;height:300px;background-color:#fff;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:0;overflow:scroll;font-size:0;line-height:0;white-space:nowrap}div.wfu_componentlist_container{display:inline-block;position:absolute;width:auto;height:auto;top:0;left:100%;background:0 0;border:none;margin:0 0 0 20px;padding:0;z-index:1;white-space:nowrap}div.wfu_component_box_container{display:inline-block;position:relative;width:80px;height:30px;background-color:transparent;border:1px solid transparent;padding:4px;margin:0;cursor:default}div.wfu_component_box,div.wfu_component_box_base{width:80px;height:30px;background-color:#ddd;padding:4px;cursor:default;font-size:12px;line-height:1;white-space:normal}div.wfu_component_box_base{display:block;position:absolute;left:-1px;top:-1px;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_box{display:inline-block;position:relative;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;z-index:1}div.wfu_component_box_inner{display:table;width:100%;height:100%}div.wfu_component_box_label{display:table-cell;text-align:center;vertical-align:middle}div.wfu_component_box_index{background-color:coral;padding:1px;float:right;border-radius:10px}div.wfu_inbase{display:block;position:absolute;left:-1px;top:-1px}div.wfu_component_box:hover{background-color:#eee;border:1px solid #bbb}div.wfu_component_box_selected{background-color:#aaa;border:1px solid #bbb}div.wfu_component_separator_hor,div.wfu_component_separator_ver{position:relative;background-color:transparent;border:1px solid transparent;z-index:1;cursor:default}div.wfu_component_box_dragged{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_component_separator_ver{display:inline-block;width:8px;height:26px;margin:6px -8px;padding:0 8px}div.wfu_component_separator_hor{display:block;width:100%;height:8px;margin:-8px 0;padding:8px 0}div.wfu_component_bar_hor,div.wfu_component_bar_ver{background-color:silver;border:none;display:none;position:absolute}div.wfu_component_bar_hor{width:auto;height:4px;left:10px;right:0;margin:11px 0 0;padding:0}div.wfu_component_bar_ver{width:4px;height:40px;margin:-6px 0 0 11px;padding:0}div.wfu_componentlist_dragdrop{position:absolute;width:100%;height:100%;left:0;top:0;background-color:#f8f8f8;border:4px dashed #aaa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;z-index:2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;opacity:.7}div.wfu_componentlist_dragdrop_dragover{border:4px dashed #555}div.wfu_formdata_container,div.wfu_userdata_container{display:block;position:relative;width:100%;height:100%;padding:0;margin:0;background:0 0;border:none}label.wfu_formdata_label{margin-right:6px}.wfu_formdata_props{padding-left:20px}div.wfu_formdata_action,div.wfu_userdata_action{display:inline-block;position:relative;top:2px;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_formdata_action:hover,div.wfu_userdata_action:hover{border:1px solid #aaa}div.wfu_formdata_action.wfu_formdata_action_disabled:hover,div.wfu_userdata_action.wfu_userdata_action_disabled:hover{border:1px solid transparent}div.wfu_formdata_action>img,div.wfu_userdata_action>img{width:12px;height:12px}div.wfu_formdata_action_disabled>img,div.wfu_userdata_action_disabled>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";filter:alpha(opacity=40);-moz-opacity:.4;-khtml-opacity:.4;opacity:.4}div.wfu_formdata_line_container,div.wfu_userdata_line{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap}table.wfu_formdata_props_table{background:0 0;border:none;padding:0}table.wfu_formdata_props_table td,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td{background:0 0;border:none;padding:0;width:auto}table.wfu_formdata_props_table td.wfu_formdata_props,table.wfu_main_table table.wfu_inner_table table.wfu_formdata_props_table td.wfu_formdata_props{padding-left:20px}div.wfu_color_container{display:block;position:relative;padding:0;margin:0;background:0 0;border:none;white-space:nowrap;z-index:1}span.wfu_save_label,span.wfu_save_label_fail{border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;opacity:0;font-size:smaller}input[type=text].wp-color-picker{width:75px}input[type=button].wp-picker-clear{width:62px}span.wfu_save_label{background-color:#f0f8ff;color:#32cd32}span.wfu_save_label_fail{background-color:beige;color:#f08080}.wfu_conquestion_itemcontainer,.wfu_conquestions_opsel.wfu_forced_selection{opacity:.5}div.wfu_global_dialog_container{position:fixed;width:100%;height:100%;top:0;left:0;margin:0;padding:0;border:none;background:0 0;z-index:1;display:none}table.wfu_main_table table.wfu_columns_container{border:none;background:0 0;margin:0;padding:0;border-spacing:0}table.wfu_main_table table.wfu_columns_container tr{background:0 0}table.wfu_main_table table.wfu_columns_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:top;width:auto}table.wfu_main_table table.wfu_columnprops_container{border:none;background:0 0;margin:0;padding:6px;border-spacing:0;width:100%;box-shadow:0 0 1px #aaa}table.wfu_main_table table.wfu_columnprops_container tr{background:0 0}table.wfu_main_table table.wfu_columnprops_container td{border:none;background:0 0;margin:0;padding:0;vertical-align:middle;width:auto}table.wfu_main_table table.wfu_columnprops_container label.wfu_columnprops_label_disabled,table.wfu_main_table table.wfu_columnprops_container_disabled label{color:#ccc}button.wfu_columns_addbutton{font-size:smaller}option.wfu_columns_item_required{color:gray}.wfu_conop_header,.wfu_pdop_header{transition:.4s;padding:6px}.wfu_conop_header label,.wfu_pdop_header label{font-weight:700;cursor:default}.wfu_conop_button,.wfu_pdheader_button,.wfu_pdop_button{color:#777;width:1em;height:1em;cursor:pointer;text-align:center}.wfu_conop_header.atomic label,.wfu_pdop_header.atomic label{font-weight:400}.wfu_consent_logactions,.wfu_consent_operations,.wfu_consent_permissions,.wfu_consent_questions,.wfu_consent_users,.wfu_plugin_operations{display:none}.wfu_pdheader_button{padding:2px;border:1px solid gray;border-radius:1em;vertical-align:middle;position:relative;display:inline-block;font-size:smaller}.wfu_pdheader_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.wfu_conop_panel,.wfu_conop_topmost_panel,.wfu_pdop_panel,.wfu_pdop_topmost_panel{margin-left:40px;overflow:hidden}.wfu_pdheader_button.expanded:after{content:'\02796'}.wfu_conop_panel,.wfu_pdop_panel{display:none}.wfu_conop_level_1,.wfu_pdop_level_1{padding:10px;font-size:larger}.wfu_conop_level_2,.wfu_pdop_level_2{padding:6px;font-size:smaller}.wfu_conop_level_3,.wfu_conop_level_4,.wfu_conop_level_5,.wfu_pdop_level_3,.wfu_pdop_level_4,.wfu_pdop_level_5{padding:2px}.wfu_conop_header:hover,.wfu_pdop_header:hover{background-color:rgba(0,0,0,.2)}.wfu_conop_button,.wfu_pdop_button{float:right;padding:2px;border:1px solid gray;border-radius:4px;position:relative;display:none}.wfu_conop_button:after,.wfu_pdop_button:after{content:'\02795';position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;font-size:smaller}.wfu_conop_button.expanded:after,.wfu_pdop_button.expanded:after{content:'\02796'}.wfu_conop_header:hover .wfu_conop_button,.wfu_pdop_header:hover .wfu_pdop_button{display:block}input[type=checkbox].wfu_conop_selector,input[type=checkbox].wfu_pdop_selector{-webkit-appearance:checkbox;margin:0 0 0 4px}.wfu_conquestions_operations{margin-top:20px;margin-left:40px}.wfu_conquestions_operations label{display:block;font-size:larger;font-weight:700}.wfu_conquestions_oppanel{background-color:#fff;padding:10px;display:inline-block;margin-top:10px}.wfu_conquestions_optable tbody tr:hover{background-color:rgba(0,0,0,.1)}.wfu_conquestions_optable td{cursor:default}.wfu_conquestions_optable td:not(:first-child){text-align:center}.wfu_op_unassigned{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover{background-color:#e6c58a}.wfu_op_unassigned .wfu_conquestions_opinv,.wfu_op_unassigned .wfu_conquestions_opsel{background-color:#ffdb99}.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opinv,.wfu_conquestions_optable tbody tr.wfu_op_unassigned:hover .wfu_conquestions_opsel{background-color:#e6c58a}.wfu_frozen{pointer-events:none}.wfu_conquestions_container{margin-top:20px;margin-left:40px}.wfu_conquestion_header{font-size:larger}.wfu_conquestion_subcontainer{padding:10px}.wfu_conquestion_headerlabel{font-weight:700}.wfu_conquestion_tools{float:right}.wfu_conquestion_itemprops,.wfu_conquestion_itemspreview,.wfu_conquestion_mainprops{display:table-cell;position:relative;border:1px solid silver;padding:4ex 10px 10px;vertical-align:top;min-width:10em;min-height:4ex;resize:both;overflow:auto}.wfu_conquestion_itempropstitle,.wfu_conquestion_itemspreviewtitle,.wfu_conquestion_mainpropstitle{position:absolute;top:0;left:0;height:3ex;font-size:inherit;text-align:center;width:100%;background-color:rgba(0,0,0,.1)}.wfu_conquestion_displayedtitle,.wfu_conquestion_groupedlabel,.wfu_conquestion_labellabel,.wfu_conquestion_labellocationlabel,.wfu_conquestion_matrixlabel,.wfu_conquestion_preselectedlabel,.wfu_conquestion_titlelabel,.wfu_conquestion_titlelocationlabel,.wfu_conquestion_typelabel,.wfu_conquestion_visiblelabel{display:block}.wfu_conquestion_labeltext,.wfu_conquestion_titletext{width:100%}.wfu_conquestion_matrix_x,.wfu_conquestion_matrix_y{width:4em;text-align:center}.wfu_conquestion_matrixsep{width:1em;display:inline-block;text-align:center}.wfu_empty_label{font-style:italic}.wfu_conquestion_itemtable td:hover{background-color:rgba(0,0,0,.1)}.wfu_item_selected{background-color:rgba(0,0,0,.2)}.wfu_item_assigned{color:#00f}.wfu_item_visible{opacity:1}.wfu_conquestion_btn{display:inline-block;position:relative;width:16px;height:16px;padding:0;margin:0;background:0 0;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_conquestion_btn:hover{border:1px solid #aaa}.wfu_conquestion_btn>img{width:12px;height:12px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}.wfu_log_button,.wfu_perm_button{width:1.5ex;height:1.5ex;cursor:pointer;display:inline-block;vertical-align:middle;text-align:center}div.wfu_conquestion_btn.wfu_tool_disabled:hover{border:1px solid transparent}.wfu_conquestion_btn.wfu_tool_disabled>img{opacity:.4}.wfu_permissions_topmost_panel{margin-left:40px}.wfu_permissions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_perm_container{padding-right:20px}.wfu_location_cell{text-align:center}.wfu_perm_level_1{padding-left:0}.wfu_perm_level_2{padding-left:20px}.wfu_perm_level_3{padding-left:40px}.wfu_permissions_table td:nth-child(n+2),.wfu_permissions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_perm_row:hover{background-color:rgba(0,0,0,.1)}.wfu_perm_button{color:#777;border:1px solid gray;position:relative}.wfu_perm_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_perm_button:hover{color:#000}.wfu_perm_button.expanded:after{content:'-'}input[type=checkbox].wfu_location_selector{-webkit-appearance:checkbox;margin:0}.wfu_logactions_topmost_panel{margin-left:40px}.wfu_logactions_panel{background-color:#fff;padding:10px;display:inline-block;margin-top:20px}.wfu_log_container{padding-right:20px}.wfu_entity_cell{text-align:center}.wfu_log_level_1{padding-left:0}.wfu_log_level_2{padding-left:20px}.wfu_log_level_3{padding-left:40px}.wfu_logactions_table td:nth-child(n+2),.wfu_logactions_table tr:nth-child(2) th{border-left:1px solid rgba(0,0,0,.1)}.wfu_log_row:hover{background-color:rgba(0,0,0,.1)}.wfu_log_button{color:#777;border:1px solid gray;position:relative}.wfu_log_button:after{content:'+';position:absolute;left:0;right:0;top:-.75ex;bottom:0;margin:auto}.wfu_log_button:hover{color:#000}.wfu_log_button.expanded:after{content:'-'}input[type=checkbox].wfu_entity_selector{-webkit-appearance:checkbox;margin:0}.wfu_pdusers_topmost_panel{margin-top:20px;margin-left:40px}.wfu_pdusers_topmost_panel>label{display:block;font-size:larger;font-weight:700}.wfu_pdusers_rolepanel,.wfu_pdusers_userpanel{margin-top:20px;margin-bottom:20px}.wfu_pdusers_roles_container,.wfu_pdusers_users_container{display:inline-block}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_midpanel,.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_midpanel,.wfu_pdusers_users_rightpanel{display:table-cell;position:relative}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_roles_rightpanel{height:200px;min-width:100px}.wfu_pdusers_users_leftpanel,.wfu_pdusers_users_rightpanel{height:100px;min-width:100px}.wfu_pdusers_roles_leftpanel,.wfu_pdusers_users_leftpanel{padding:10px 10px 10px 0}.wfu_pdusers_roles_midpanel,.wfu_pdusers_users_midpanel{padding:10px 0;vertical-align:top}.wfu_pdusers_roles_rightpanel,.wfu_pdusers_users_rightpanel{padding:20px;vertical-align:top}.wfu_pdusers_roles_container>label,.wfu_pdusers_users_container>label{font-weight:700}.wfu_pdusers_users_leftpanel label{display:block}.wfu_pdusers_users_midpanel label,.wfu_pdusers_users_rightpanel label{display:block;visibility:hidden}.wfu_pdusers_users_leftpanel input[type=text]{width:100%;display:block}.wfu_pdusers_roles_leftpanel select{height:100%!important;line-height:100%!important}.wfu_pdusers_roles_leftpanel select,.wfu_pdusers_users_leftpanel select{min-width:100px;min-height:100px}.wfu_pdusers_roles_show,.wfu_pdusers_users_show{overflow-x:visible;overflow-y:scroll;height:100%}.wfu_pdusers_roles_back,.wfu_pdusers_users_back{border:1px solid gray;position:absolute;left:10px;top:10px;bottom:10px;right:10px;pointer-events:none},.wfu_pdusers_roles_back.active{background-color:rgba(255,255,255,.7)}.wfu_pdusers_roles_role,.wfu_pdusers_users_user{border:1px solid gray;text-align:center;padding:2px 24px 2px 4px;border-radius:1em;cursor:default;background-color:rgba(0,0,0,.05);position:relative;display:inline-block;white-space:nowrap}.wfu_pdusers_roles_all{text-align:center;padding:2px 20px;font-weight:700}.wfu_pdusers_roles_role span,.wfu_pdusers_users_user span{width:14px;height:14px;position:absolute;display:inline-block;right:3px;top:0;bottom:0;margin:auto;border:1px solid #888;border-radius:1em}.wfu_pdusers_roles_role span:after,.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_user span:after,.wfu_pdusers_users_user span:before{content:'';height:1px;margin-top:0;position:absolute;width:10px;top:50%;right:2px;background:#888}.wfu_pdusers_roles_role span:before,.wfu_pdusers_users_user span:before{transform:rotate(45deg)}.wfu_pdusers_roles_role span:after,.wfu_pdusers_users_user span:after{transform:rotate(-45deg)}.wfu_pdusers_roles_role span:hover,.wfu_pdusers_users_user span:hover{background-color:rgba(0,0,0,.1);border:1px solid #1ebcc5}.wfu_pdusers_roles_role span:hover:after,.wfu_pdusers_roles_role span:hover:before,.wfu_pdusers_users_user span:hover:after,.wfu_pdusers_users_user span:hover:before{background:#1ebcc5}.wfu_pdusers_roles_add,.wfu_pdusers_users_add{width:20px;height:18px;display:inline-block;border:1px solid #888;border-radius:4px}.wfu_pdusers_roles_add:after,.wfu_pdusers_users_add:after{border:solid #555;border-width:0 3px 3px 0;display:inline-block;padding:3px;vertical-align:middle;transform:rotate(-45deg);content:'';margin-left:4px;margin-top:-2px}.wfu_pdusers_roles_add:hover,.wfu_pdusers_users_add:hover{border:1px solid #444;background-color:rgba(0,0,0,.1)}.wfu_pd_user_box0{width:100%}.wfu_pd_user_select0,.wfu_pdusers_users_leftpanel select{width:100%;height:100px!important;line-height:100px!important;min-width:100px;min-height:100px}
js/wordpress_file_upload_adminfunctions.js CHANGED
@@ -1,4 +1,4 @@
1
- var DraggedItem=null;var ShortcodeNextSave=0;var ShortcodeTimeOut=null;var ShortcodeString="";var Autosave=false;var PageObsolete=false;var PageUpdating=false;var CheckObsolescenceTimeOut=5E3;var wfu_transfers_observer_interval=100;var wfu_allops_freeze_events=false;var wfu_allops_bank={};
2
  jQuery(document).ready(function($){$(".wfu_color_field").wpColorPicker({change:function(event,ui){event.target.value=ui.color.toString();if(event.target.name=="wfu_text_elements")wfu_update_text_value(event);else if(event.target.name=="wfu_triplecolor_elements")wfu_update_triplecolor_value(event)}})});
3
  function wfu_admin_activate_tab(key){var tabs=document.getElementById("wfu_tab_container");var tab,tabkey;for(var i=0;i<tabs.childNodes.length;i++){tab=tabs.childNodes[i];if(tab.nodeType===1){tabkey=tab.id.substr(8);if(tab.className.indexOf("nav-tab-active")>-1){tab.className="nav-tab";document.getElementById("wfu_container_"+tabkey).style.display="none"}}}document.getElementById("wfu_tab_"+key).className="nav-tab nav-tab-active";document.getElementById("wfu_container_"+key).style.display="block"}
4
  function wfu_admin_onoff_clicked(key){var onoff=document.getElementById("wfu_attribute_"+key);var shadows=document.querySelectorAll("#wfu_wrapper div.wfu_shadow_"+key);var shadows_inv=document.querySelectorAll("#wfu_wrapper div.wfu_shadow_"+key+"_inv");var status=onoff.className.substr(onoff.className.length-2)=="on";status=!status;if(status){document.getElementById("wfu_attribute_value_"+key).value="true";onoff.className="wfu_onoff_container_on";for(var i=0;i<shadows.length;i++)shadows[i].style.display=
@@ -268,32 +268,34 @@ function wfu_apply_adminbrowser_bulkaction(){var actionselector=document.getElem
268
  selected[i].className.indexOf("wfu_included")>-1;if(included)codes_included++;else codes_not_included++;if(action=="delete"&&!included||action=="include"&&included)selected[i].checked=false;else codes.push(file_code)}}if(action=="delete"&&codes_not_included>0)alert("Notice! Files that were not uploaded using the plugin cannot be deleted and have been deselected.");else if(action=="include"&&codes_included>0)alert("Notice! Files already included in the plugin have been deselected.");if(codes.length==
269
  0)return;var url=document.getElementById("wfu_adminbrowser_action_url").value;var referer=document.getElementById("wfu_adminbrowser_referer").value;if(action=="delete"||action=="include"){var form=document.createElement("FORM");form.method="POST";form.action=url;form.style.display="none";var field1=document.createElement("INPUT");field1.type="hidden";field1.name="action";field1.value=action+"_file";form.appendChild(field1);var field2=document.createElement("INPUT");field2.type="hidden";field2.name=
270
  "file";field2.value="list:"+codes.join();form.appendChild(field2);var field3=document.createElement("INPUT");field3.type="hidden";field3.name="referer";field3.value=referer;form.appendChild(field3);document.body.appendChild(form);form.submit()}}
271
- function wfu_initialize_consent_policy(params){wfu_allops_bank.params=params;wfu_adjust_pdops_levels();wfu_adjust_permissions_levels();wfu_adjust_logactions_levels();wfu_attach_pdops_events();wfu_attach_conops_events();wfu_pdops_update(true);wfu_allops_freeze_events=true;wfu_conops_update();wfu_consent_question_optable_recreate();wfu_update_consent_questions();wfu_consent_question_operations_reassign();wfu_update_consent_question_itemprops(0,-1);wfu_permissions_update(true);wfu_logactions_update(true);
272
- wfu_pdusers_update();wfu_allops_freeze_events=false}function wfu_get_consent_policy(){var policy_str=wfu_plugin_decode_string(document.getElementById("wfu_consent_policy").value);var policy=null;try{policy=JSON.parse(policy_str)}catch(e){}return policy}function wfu_get_permissions_policy(){var policy_str=wfu_plugin_decode_string(document.getElementById("wfu_permissions_policy").value);var policy=null;try{policy=JSON.parse(policy_str)}catch(e){}return policy}
273
  function wfu_get_logactions_policy(){var policy_str=wfu_plugin_decode_string(document.getElementById("wfu_logactions_policy").value);var policy=null;try{policy=JSON.parse(policy_str)}catch(e){}return policy}function wfu_get_pd_users(){var pd_users_str=wfu_plugin_decode_string(document.getElementById("wfu_assigned_users").value);var pd_users=null;try{pd_users=JSON.parse(pd_users_str)}catch(e){}return pd_users}
274
  function wfu_set_consent_policy(new_policy){var policy_str=JSON.stringify(new_policy);document.getElementById("wfu_consent_policy").value=wfu_plugin_encode_string(policy_str)}function wfu_set_logactions_policy(new_policy){var policy_str=JSON.stringify(new_policy);document.getElementById("wfu_logactions_policy").value=wfu_plugin_encode_string(policy_str)}
275
  function wfu_set_permissions_policy(new_policy){var policy_str=JSON.stringify(new_policy);document.getElementById("wfu_permissions_policy").value=wfu_plugin_encode_string(policy_str)}
276
- function wfu_adjust_pdops_levels(){function _wfu_force_pdop_update_nested(item){var id=item.ID;if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_force_pdop_update_nested(item.children[j]);else policy.operations[id].Allowed=true}function _wfu_nested_adjust_pdops_levels(item,level){if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_nested_adjust_pdops_levels(item.children[j],level+1);var id=item.ID;if(wfu_allops_bank.allowedstatus[id]==0&&level==wfu_allops_bank.params.oplevels){_wfu_force_pdop_update_nested(item);
277
- wfu_allops_bank.allowedstatus[id]=1;policy_needs_update=true}}wfu_pdops_update(false);var policy=wfu_get_consent_policy();if(policy){console.log(policy);var policy_needs_update=false;for(var i=0;i<policy.structure.length;i++)_wfu_nested_adjust_pdops_levels(policy.structure[i],1);if(policy_needs_update)wfu_set_consent_policy(policy)}}
278
- function wfu_attach_pdops_events(){var acc=document.querySelectorAll(".wfu_pdop_button");var i;for(i=0;i<acc.length;i++)acc[i].addEventListener("click",function(){this.classList.toggle("expanded");var panel=this.parentElement.nextElementSibling;if(this.classList.contains("expanded"))panel.style.display="block";else panel.style.display="none"})}
 
 
279
  function wfu_attach_conops_events(){var acc=document.querySelectorAll(".wfu_conop_button");var i;for(i=0;i<acc.length;i++)acc[i].addEventListener("click",function(){this.classList.toggle("expanded");var panel=this.parentElement.nextElementSibling;if(this.classList.contains("expanded"))panel.style.display="block";else panel.style.display="none"})}
280
  function wfu_pdop_toggle(obj){if(wfu_allops_freeze_events)return;if(obj.id.indexOf("wfu_pdop_")==-1)return;var id=obj.id.replace("wfu_pdop_","");var policy=wfu_get_consent_policy();if(policy){if(typeof policy.operations[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)obj.classList.remove("indeterminate");if(policy.children_index[id].length>0){var level=1;
281
- var parid=id;while((parid=policy.operations[parid].Parent)>0)level++;if((wfu_allops_bank.params.oplevels<1||level<wfu_allops_bank.params.oplevels)&&!confirm("This will set all children operations to "+(new_status?"allowed":"not allowed")+". Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];if(policy.children_index[id2].length==0)policy.operations[id2].Allowed=
282
  new_status}}else policy.operations[id].Allowed=new_status;wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_pdops_update(true);wfu_conops_update();wfu_update_consent_question_itemprops(0,-1);wfu_consent_question_optable_recreate();wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(0,0);wfu_allops_freeze_events=false}}
283
  function wfu_conop_toggle(obj){if(wfu_allops_freeze_events)return;if(obj.id.indexOf("wfu_conop_")==-1)return;var id=obj.id.replace("wfu_conop_","");var policy=wfu_get_consent_policy();if(policy){if(typeof policy.operations[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)check.classList.remove("indeterminate");if(policy.children_index[id].length>0){var level=
284
- 1;var parid=id;while((parid=policy.operations[parid].Parent)>0)level++;if((wfu_allops_bank.params.oplevels<1||level<wfu_allops_bank.params.oplevels)&&!confirm("This will make all children operations "+(new_status?"require":"not require")+" consent. Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];if(policy.children_index[id2].length==0)policy.operations[id2].NeedsConsent=
285
  new_status}}else policy.operations[id].NeedsConsent=new_status;wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_conops_update();wfu_update_consent_question_itemprops(0,-1);wfu_consent_question_optable_recreate();wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(0,0);wfu_allops_freeze_events=false}}
286
  function wfu_pdops_update(updatehtml){function _wfu_atomic_pdop_update(id){var allowed=policy.operations[id].Allowed;policy.operations[id].allowedstatus={};for(var k=0;k<policy.operations[id].Datatypes.length;k++){var type=policy.operations[id].Datatypes[k];policy.operations[id].allowedstatus[type]=allowed?1:-1}var condition=policy.operations[id].Condition;if(condition=="")policy.operations[id].pdvisible=true;else{var negative=false;if(condition.substr(0,1)=="!"){negative=true;condition=condition.replace("!",
287
  "")}var allowedstatus2=policy.operations[parseInt(condition)].allowedstatus;var enabled=false;for(var type in allowedstatus2)if(allowedstatus2.hasOwnProperty(type))if(allowedstatus2[type]>-1){enabled=true;break}policy.operations[id].pdvisible=negative?!enabled:enabled}}function _wfu_nested_pdops_update(item,level){var id=item.ID;if(item.children.length>0){policy.operations[id].allowedstatus={};policy.operations[id].pdvisible=false;for(var j=0;j<item.children.length;j++){_wfu_nested_pdops_update(item.children[j],
288
  level+1);var id2=item.children[j].ID;if(policy.operations[id2].pdvisible){var allowed=policy.operations[id2].Allowed;for(var type in policy.operations[id2].allowedstatus)if(policy.operations[id2].allowedstatus.hasOwnProperty(type)){var allowedstatus2=policy.operations[id2].allowedstatus[type];if(typeof policy.operations[id].allowedstatus[type]=="undefined")policy.operations[id].allowedstatus[type]=allowedstatus2;else if(policy.operations[id].allowedstatus[type]*allowedstatus2<1)policy.operations[id].allowedstatus[type]=
289
- 0}if(!policy.operations[id].pdvisible)policy.operations[id].pdvisible=policy.operations[id2].pdvisible}}}else _wfu_atomic_pdop_update(id);var allowedstatus=-2;for(var type in policy.operations[id].allowedstatus)if(policy.operations[id].allowedstatus.hasOwnProperty(type)){var allowedstatus2=policy.operations[id].allowedstatus[type];if(allowedstatus==-2)allowedstatus=allowedstatus2;else if(allowedstatus*allowedstatus2<1){allowedstatus=0;break}}if(typeof wfu_allops_bank.allowedstatus=="undefined")wfu_allops_bank.allowedstatus=
290
- {};wfu_allops_bank.allowedstatus[id]=allowedstatus;if(typeof wfu_allops_bank.level=="undefined")wfu_allops_bank.level={};wfu_allops_bank.level[id]=level;if(updatehtml){var check=document.getElementById("wfu_pdop_"+id);wfu_set_checkbox_status(check,allowedstatus);var container=document.getElementById("wfu_pdop_container_"+id);if(container)container.style.display=policy.operations[id].pdvisible&&(wfu_allops_bank.params.oplevels<1||level<=wfu_allops_bank.params.oplevels)?"block":"none"}}var policy=wfu_get_consent_policy();
291
  if(policy){wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_pdops_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
292
- function wfu_conops_update(){function _wfu_atomic_conop_update(id){policy.operations[id].needsconsentstatus=policy.operations[id].Allowed&&policy.operations[id].NeedsConsent?1:-1;var condition=policy.operations[id].Condition;if(condition=="")policy.operations[id].convisible=true;else{var negative=false;if(condition.substr(0,1)=="!"){negative=true;condition=condition.replace("!","")}var enabled=wfu_allops_bank.allowedstatus[parseInt(condition)]>-1;policy.operations[id].convisible=negative?!enabled:
293
- enabled}policy.operations[id].convisible=policy.operations[id].convisible&&policy.operations[id].Allowed}function _wfu_nested_conops_update(item,level){var id=item.ID;if(item.children.length>0){policy.operations[id].needsconsentstatus=-2;policy.operations[id].convisible=false;for(var j=0;j<item.children.length;j++){_wfu_nested_conops_update(item.children[j],level+1);var id2=item.children[j].ID;if(policy.operations[id2].convisible){var needsconsentstatus2=policy.operations[id2].needsconsentstatus;
294
- if(policy.operations[id].needsconsentstatus==-2)policy.operations[id].needsconsentstatus=needsconsentstatus2;else if(policy.operations[id].needsconsentstatus*needsconsentstatus2<1)policy.operations[id].needsconsentstatus=0;if(!policy.operations[id].convisible)policy.operations[id].convisible=policy.operations[id2].convisible}}}else _wfu_atomic_conop_update(id);if(typeof wfu_allops_bank.visible=="undefined")wfu_allops_bank.visible={};wfu_allops_bank.visible[id]=policy.operations[id].convisible;if(typeof wfu_allops_bank.needsconsentstatus==
295
- "undefined")wfu_allops_bank.needsconsentstatus={};wfu_allops_bank.needsconsentstatus[id]=policy.operations[id].needsconsentstatus;var check=document.getElementById("wfu_conop_"+id);wfu_set_checkbox_status(check,policy.operations[id].needsconsentstatus);var container=document.getElementById("wfu_conop_container_"+id);if(container)container.style.display=policy.operations[id].convisible&&(wfu_allops_bank.params.oplevels<1||level<=wfu_allops_bank.params.oplevels)?"block":"none"}var policy=wfu_get_consent_policy();
296
- if(policy){wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_conops_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
297
  function wfu_update_consent_questions(){var policy=wfu_get_consent_policy();if(policy){var maincontainer=document.getElementById("wfu_conquestions_container");wfu_allops_freeze_events=true;for(var i=0;i<policy.questions.length;i++){var container=wfu_render_consent_question(i);if(container){maincontainer.appendChild(container);wfu_update_consent_question(i,true)}}wfu_update_conquestion_header();wfu_allops_freeze_events=false}}
298
  function wfu_render_consent_question(index){var policy=wfu_get_consent_policy();if(!policy)return null;var question=policy.questions[index];var i=index+1;var container=document.createElement("DIV");container.className="wfu_conquestion_container";container.id="wfu_conquestion_container_"+i;var header=document.createElement("DIV");header.className="wfu_conquestion_header";var headerlabel=document.createElement("LABEL");headerlabel.className="wfu_conquestion_headerlabel";headerlabel.innerHTML="Question "+
299
  i;header.appendChild(headerlabel);var tools=document.createElement("DIV");tools.className="wfu_conquestion_tools";var add_btn=document.getElementById("wfu_conquestion_add").cloneNode(true);add_btn.removeAttribute("id");wfu_addEventHandler(add_btn,"click",wfu_conquestion_tools_handler);var remove_btn=document.getElementById("wfu_conquestion_remove").cloneNode(true);remove_btn.removeAttribute("id");wfu_addEventHandler(remove_btn,"click",wfu_conquestion_tools_handler);var up_btn=document.getElementById("wfu_conquestion_up").cloneNode(true);
@@ -303,104 +305,124 @@ wfu_conquestion_mainprops_handler);var titlelocationlabel=document.createElement
303
  opt.value="bottom";opt.innerHTML="Bottom";opt.selected=question.location=="bottom";titlelocationlist.add(opt);wfu_addEventHandler(titlelocationlist,"change",wfu_conquestion_mainprops_handler);var matrixlabel=document.createElement("LABEL");matrixlabel.className="wfu_conquestion_matrixlabel";matrixlabel.innerHTML="Number of Items";var matrix_x=document.createElement("INPUT");matrix_x.className="wfu_conquestion_matrix_x";matrix_x.type="number";matrix_x.min=1;var qx=parseInt(question.x);if(qx<=0)qx=
304
  1;question.x=qx;matrix_x.value=qx;wfu_attach_element_handlers(matrix_x,wfu_conquestion_mainprops_handler);var matrixsep=document.createElement("LABEL");matrixsep.className="wfu_conquestion_matrixsep";matrixsep.innerHTML="x";var matrix_y=document.createElement("INPUT");matrix_y.className="wfu_conquestion_matrix_y";matrix_y.type="number";matrix_y.min=1;var qy=parseInt(question.y);if(qy<=0)qy=1;question.y=qy;matrix_y.value=qy;wfu_attach_element_handlers(matrix_y,wfu_conquestion_mainprops_handler);var groupedlabel=
305
  document.createElement("LABEL");groupedlabel.className="wfu_conquestion_groupedlabel";groupedlabel.innerHTML="Grouped";var groupedbox=document.createElement("INPUT");groupedbox.className="wfu_conquestion_groupedbox";groupedbox.type="checkbox";groupedbox.checked=question.grouped==1;wfu_addEventHandler(groupedbox,"change",wfu_conquestion_mainprops_handler);var typelabel=document.createElement("LABEL");typelabel.className="wfu_conquestion_typelabel";typelabel.innerHTML="Type";var typelist=document.createElement("SELECT");
306
- typelist.className="wfu_conquestion_typelist";var opt=document.createElement("OPTION");opt.value="checkbox";opt.innerHTML="Checkbox";opt.selected=question.type=="checkbox";typelist.add(opt);var opt=document.createElement("OPTION");opt.value="radio";opt.innerHTML="Radio";opt.selected=question.type=="radio";typelist.add(opt);wfu_addEventHandler(typelist,"change",wfu_conquestion_mainprops_handler);mainprops.appendChild(mainpropstitle);mainprops.appendChild(matrixlabel);mainprops.appendChild(matrix_x);
307
- mainprops.appendChild(matrixsep);mainprops.appendChild(matrix_y);mainprops.appendChild(titlelabel);mainprops.appendChild(titletext);mainprops.appendChild(titlelocationlabel);mainprops.appendChild(titlelocationlist);mainprops.appendChild(groupedlabel);mainprops.appendChild(groupedbox);mainprops.appendChild(typelabel);mainprops.appendChild(typelist);var itemspreview=document.createElement("DIV");itemspreview.className="wfu_conquestion_itemspreview";var itemspreviewtitle=document.createElement("LABEL");
308
- itemspreviewtitle.className="wfu_conquestion_itemspreviewtitle";itemspreviewtitle.innerHTML="Items";var displayedtitle=document.createElement("LABEL");displayedtitle.className="wfu_conquestion_displayedtitle";displayedtitle.innerHTML=question.title;var itemtable=document.createElement("TABLE");itemtable.className="wfu_conquestion_itemtable";itemspreview.appendChild(itemspreviewtitle);if(question.location!="bottom")itemspreview.appendChild(displayedtitle);itemspreview.appendChild(itemtable);if(question.location==
309
- "bottom")itemspreview.appendChild(displayedtitle);wfu_addEventHandler(itemspreview,"click",wfu_conquestion_itempreviewer_handler);var itemprops=document.createElement("DIV");itemprops.className="wfu_conquestion_itemprops";var itempropstitle=document.createElement("LABEL");itempropstitle.className="wfu_conquestion_itempropstitle";itempropstitle.innerHTML="Item Properties";var labellabel=document.createElement("LABEL");labellabel.className="wfu_conquestion_labellabel";labellabel.innerHTML="Label";var labeltext=
310
- document.createElement("INPUT");labeltext.className="wfu_conquestion_labeltext";labeltext.value="";wfu_attach_element_handlers(labeltext,wfu_conquestion_mainprops_handler);var labellocationlabel=document.createElement("LABEL");labellocationlabel.className="wfu_conquestion_labellocationlabel";labellocationlabel.innerHTML="Label Location";var labellocationlist=document.createElement("SELECT");labellocationlist.className="wfu_conquestion_labellocationlist";var opt=document.createElement("OPTION");opt.value=
311
- "top";opt.innerHTML="Top";opt.selected=false;labellocationlist.add(opt);var opt=document.createElement("OPTION");opt.value="left";opt.innerHTML="Left";opt.selected=false;labellocationlist.add(opt);var opt=document.createElement("OPTION");opt.value="right";opt.innerHTML="Right";opt.selected=true;labellocationlist.add(opt);var opt=document.createElement("OPTION");opt.value="bottom";opt.innerHTML="Bottom";opt.selected=false;labellocationlist.add(opt);wfu_addEventHandler(labellocationlist,"change",wfu_conquestion_mainprops_handler);
312
- var preselectedlabel=document.createElement("LABEL");preselectedlabel.className="wfu_conquestion_preselectedlabel";preselectedlabel.innerHTML="Preselected";var preselectedbox=document.createElement("INPUT");preselectedbox.className="wfu_conquestion_preselectedbox";preselectedbox.type="checkbox";preselectedbox.checked=false;wfu_addEventHandler(preselectedbox,"change",wfu_conquestion_mainprops_handler);itemprops.appendChild(itempropstitle);itemprops.appendChild(labellabel);itemprops.appendChild(labeltext);
313
- itemprops.appendChild(labellocationlabel);itemprops.appendChild(labellocationlist);itemprops.appendChild(preselectedlabel);itemprops.appendChild(preselectedbox);subcontainer.appendChild(mainprops);subcontainer.appendChild(itemspreview);subcontainer.appendChild(itemprops);container.appendChild(header);container.appendChild(subcontainer);return container}
314
- function wfu_consent_question_action(action,index){var policy=wfu_get_consent_policy();if(!policy)return;var maincontainer=document.getElementById("wfu_conquestions_container");var qcount=document.querySelectorAll(".wfu_conquestion_container").length;if(action=="add"){var question={title:"",location:"top",x:1,y:1,grouped:0,type:"checkbox",items:[{index:1,label:"I agree to allow the plugin to use my personal data",location:"right",preselect:0,operations:{}}]};policy.questions.splice(index+1,0,question);
315
- wfu_set_consent_policy(policy);var container=wfu_render_consent_question(index+1);if(container){for(var j=index+2;j<=qcount;j++)document.getElementById("wfu_conquestion_container_"+j).id="wfu_conquestion_container_"+(j+1);maincontainer.insertBefore(container,document.getElementById("wfu_conquestion_container_"+(index+3)));wfu_update_consent_question(index+1,true)}}else if(action=="remove"){if(qcount<=1)return;policy.questions.splice(index,1);wfu_set_consent_policy(policy);maincontainer.removeChild(document.getElementById("wfu_conquestion_container_"+
316
- (index+1)));for(var j=index+2;j<=qcount;j++)document.getElementById("wfu_conquestion_container_"+j).id="wfu_conquestion_container_"+(j-1)}else if(action=="up"){if(index<=0)return;var tempq=policy.questions[index];policy.questions[index]=policy.questions[index-1];policy.questions[index-1]=tempq;wfu_set_consent_policy(policy);var container1=document.getElementById("wfu_conquestion_container_"+(index+1));var container2=document.getElementById("wfu_conquestion_container_"+index);container1.id="wfu_conquestion_container_"+
317
- index+"_temp";container2.id="wfu_conquestion_container_"+(index+1);container1.id="wfu_conquestion_container_"+index;maincontainer.insertBefore(container1,container2)}else if(action=="down"){if(index>=qcount-1)return;var tempq=policy.questions[index];policy.questions[index]=policy.questions[index+1];policy.questions[index+1]=tempq;wfu_set_consent_policy(policy);var container1=document.getElementById("wfu_conquestion_container_"+(index+2));var container2=document.getElementById("wfu_conquestion_container_"+
318
- (index+1));container1.id="wfu_conquestion_container_"+(index+1)+"_temp";container2.id="wfu_conquestion_container_"+(index+2);container1.id="wfu_conquestion_container_"+(index+1);maincontainer.insertBefore(container1,container2)}}
319
- function wfu_update_consent_question(index,recreate){var policy=wfu_get_consent_policy();if(!policy)return;var question=policy.questions[index];var i=index+1;var itemspreview=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_itemspreview");var itemtable=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_itemtable");var displayedtitle=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_displayedtitle");if(!itemspreview)return;if(recreate)while(itemtable.rows.length>
320
- 0)itemtable.deleteRow(0);var qnum=question.x*question.y;var qitems=[];for(var j=0;j<qnum;j++)qitems.push({label:"",location:"right",preselect:false,operations:{}});for(var j=0;j<question.items.length;j++){var ind=question.items[j].index-1;if(ind>=0&&ind<qnum){qitems[ind].label=question.items[j].label;qitems[ind].location=question.items[j].location;qitems[ind].preselect=question.items[j].preselect==1;qitems[ind].operations=question.items[j].operations}}var j=0;for(var k=0;k<question.x;k++){var row;
321
- if(recreate)row=itemtable.insertRow(k);else row=itemtable.rows[k];for(var l=0;l<question.y;l++){var cell;if(recreate){cell=row.insertCell(l);cell.classList.add("wfu_conquestion_itemcontainer")}else cell=row.cells[l];while(cell.childNodes.length>0)cell.removeChild(cell.childNodes[0]);var itemlabel=document.createElement("LABEL");itemlabel.className="wfu_conquestion_itemlabel";if(qitems[j].label==""){itemlabel.classList.add("wfu_empty_label");itemlabel.innerHTML="{no label}"}else{itemlabel.classList.remove("wfu_empty_label");
322
- itemlabel.innerHTML=qitems[j].label}var itembox=document.createElement("INPUT");itembox.className="wfu_conquestion_itembox wfu_frozen";itembox.type=question.type;itembox.checked=qitems[j].preselect;if(qitems[j].location=="top"){cell.appendChild(itemlabel);cell.appendChild(document.createElement("BR"));cell.appendChild(itembox)}else if(qitems[j].location=="left"){cell.appendChild(itemlabel);cell.appendChild(itembox)}else if(qitems[j].location=="bottom"){cell.appendChild(itembox);cell.appendChild(document.createElement("BR"));
323
- cell.appendChild(itemlabel)}else{cell.appendChild(itembox);cell.appendChild(itemlabel)}j++}}if(question.title==""){displayedtitle.classList.add("wfu_empty_label");displayedtitle.innerHTML="{no title}"}else{displayedtitle.classList.remove("wfu_empty_label");displayedtitle.innerHTML=question.title}if(question.location!="bottom")itemspreview.insertBefore(displayedtitle,itemtable);else itemspreview.insertBefore(displayedtitle,null)}
324
- function wfu_conquestion_mainprops_handler(e){if(wfu_allops_freeze_events)return;var policy=wfu_get_consent_policy();if(!policy)return;e=e||window.event;var item=par=e.target;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var i=parseInt(par.id.replace("wfu_conquestion_container_",""));var index=i-1;var question=policy.questions[index];var recreate=true;var is_mainprop=true;if(item.classList.contains("wfu_conquestion_titletext"))question.title=item.value;else if(item.classList.contains("wfu_conquestion_matrix_x"))question.x=
325
- item.value;else if(item.classList.contains("wfu_conquestion_matrix_y"))question.y=item.value;else if(item.classList.contains("wfu_conquestion_titlelocationlist"))question.location=item.value;else if(item.classList.contains("wfu_conquestion_groupedbox")){question.grouped=item.checked?1:0;if(question.grouped==1){var qpreselect_count=0;for(var j=0;j<question.items.length;j++)if(qpreselect_count==1)question.items[j].preselect=0;else if(question.items[j].preselect==1)qpreselect_count++}}else if(item.classList.contains("wfu_conquestion_typelist"))question.type=
326
- item.value;else{var itemcontainers=document.querySelectorAll("#wfu_conquestion_container_"+i+" .wfu_conquestion_itemcontainer.wfu_item_selected");if(itemcontainers.length==0)return;var itemindex=itemcontainers[0].parentNode.rowIndex*itemcontainers[0].parentNode.cells.length+itemcontainers[0].cellIndex+1;var qitem=null;var qindex=question.items.length;for(var j=0;j<question.items.length;j++)if(question.items[j].index==itemindex){qitem=question.items[j];break}else if(question.items[j].index>itemindex){qindex=
327
- j;break}if(!qitem){qitem={index:itemindex,label:"",location:"right",preselect:false,operations:{}};question.items.splice(qindex,0,qitem)}if(item.classList.contains("wfu_conquestion_labeltext"))qitem.label=item.value;else if(item.classList.contains("wfu_conquestion_labellocationlist"))qitem.location=item.value;else if(item.classList.contains("wfu_conquestion_preselectedbox")){if(item.checked&&question.grouped==1)for(var j=0;j<question.items.length;j++)question.items[j].preselect=0;qitem.preselect=
328
- item.checked?1:0}recreate=false;is_mainprop=false}wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_update_consent_question(index,recreate);if(is_mainprop){wfu_update_consent_question_itemprops(index,-1);wfu_consent_question_operations_reassign()}wfu_allops_freeze_events=false}
 
 
 
 
 
329
  function wfu_conquestion_itempreviewer_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=par=e.target;var qcount=document.querySelectorAll(".wfu_conquestion_container").length;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var i=parseInt(par.id.replace("wfu_conquestion_container_",""));var index=i-1;if(!item.classList.contains("wfu_conquestion_itemcontainer"))item=item.parentNode;var itemindex=-1;if(item.classList.contains("wfu_conquestion_itemcontainer"))itemindex=
330
  item.parentNode.rowIndex*item.parentNode.cells.length+item.cellIndex+1;wfu_allops_freeze_events=true;for(var j=0;j<qcount;j++)wfu_update_consent_question_itemprops(j,-1);wfu_update_consent_question_itemprops(index,itemindex);wfu_allops_freeze_events=false}
331
  function wfu_update_consent_question_itemprops(index,itemindex){var policy=wfu_get_consent_policy();if(!policy)return;var question=policy.questions[index];var i=index+1;var itemcontainers=document.querySelectorAll("#wfu_conquestions_container .wfu_conquestion_itemcontainer");var itemcontainer=null;var contindex=0;var contitemindex=1;for(var j=0;j<itemcontainers.length;j++){itemcontainers[j].classList.remove("wfu_item_selected");var par=itemcontainers[j];while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));
332
  if(parseInt(par.id.replace("wfu_conquestion_container_",""))>contindex){contindex++;contitemindex=1}if(contindex==i&&contitemindex==itemindex)itemcontainer=itemcontainers[j];contitemindex++}if(itemcontainer)itemcontainer.classList.add("wfu_item_selected");var labeltext=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_labeltext");var labellocationlist=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_labellocationlist");var preselectedbox=document.querySelector("#wfu_conquestion_container_"+
333
- i+" .wfu_conquestion_preselectedbox");var qindex=-1;for(var j=0;j<question.items.length;j++)if(question.items[j].index==itemindex){qindex=j;break}if(qindex<0){labeltext.value="";labeltext.disabled=itemindex<1;labellocationlist.value="right";labellocationlist.disabled=itemindex<1;preselectedbox.checked=false;preselectedbox.disabled=itemindex<1}else{labeltext.disabled=false;labeltext.value=question.items[qindex].label;labellocationlist.disabled=false;labellocationlist.value=question.items[qindex].location;
334
- preselectedbox.disabled=false;preselectedbox.checked=question.items[qindex].preselect==1}wfu_consent_question_optable_update(i,itemindex)}
335
- function wfu_consent_question_optable_recreate(){var oplist=[];var policy=wfu_get_consent_policy();if(policy){if(typeof wfu_allops_bank.conops!="undefined")for(var id in wfu_allops_bank.conops)if(wfu_allops_bank.conops.hasOwnProperty(id))wfu_allops_bank.conops[id].active=false;var optable=document.getElementById("wfu_conquestions_optable");var body=optable.tBodies[0];while(body.rows.length>0)optable.rows[0].remove();var i=0;for(var id in wfu_allops_bank.allowedstatus)if(wfu_allops_bank.allowedstatus.hasOwnProperty(id)){var included=
336
- true;included=included&&(policy.children_index[id].length==0&&(wfu_allops_bank.params.oplevels<1||wfu_allops_bank.level[id]<=wfu_allops_bank.params.oplevels)||policy.children_index[id].length>0&&wfu_allops_bank.level[id]==wfu_allops_bank.params.oplevels);included=included&&wfu_allops_bank.needsconsentstatus[id]==1;included=included&&wfu_allops_bank.visible[id];if(included){if(typeof wfu_allops_bank.conops=="undefined")wfu_allops_bank.conops={};wfu_allops_bank.conops[id]={active:true,qindex:1,itemindex:1,
337
- inverse:false,unassigned:true};var row=body.insertRow(i);row.id="wfu_conquestions_oprow_"+id;var cell=row.insertCell(0);var name=policy.operations[id].Name;var parid=id;while((parid=policy.operations[parid].Parent)>0)name=policy.operations[parid].Name+"/"+name;cell.innerHTML=name;var cell=row.insertCell(1);var selbox=document.createElement("INPUT");selbox.type="radio";selbox.className="wfu_conquestions_opsel wfu_frozen";wfu_addEventHandler(selbox,"click",wfu_conquestion_optable_handler);cell.appendChild(selbox);
 
338
  var cell=row.insertCell(2);var invbox=document.createElement("INPUT");invbox.type="checkbox";invbox.className="wfu_conquestions_opinv wfu_frozen";invbox.disabled=true;wfu_addEventHandler(invbox,"change",wfu_conquestion_optable_handler);cell.appendChild(invbox);i++}}}}
339
- function wfu_consent_question_operations_reassign(){var policy=wfu_get_consent_policy();if(policy){for(var opid in wfu_allops_bank.conops)if(wfu_allops_bank.conops.hasOwnProperty(opid)){wfu_allops_bank.conops[opid].qindex=0;wfu_allops_bank.conops[opid].itemindex=0;wfu_allops_bank.conops[opid].unassigned=true}for(var i=0;i<policy.questions.length;i++){var question=policy.questions[i];for(var j=0;j<question.items.length;j++){var qitem=question.items[j];for(var opid in qitem.operations)if(qitem.operations.hasOwnProperty(opid))if(typeof wfu_allops_bank.conops[opid]!=
340
- "undefined")if(wfu_allops_bank.conops[opid].qindex==0){wfu_allops_bank.conops[opid].qindex=i+1;wfu_allops_bank.conops[opid].itemindex=j+1;wfu_allops_bank.conops[opid].inverse=qitem.operations[opid]==-1;wfu_allops_bank.conops[opid].unassigned=false}else delete qitem.operations[opid]}}for(var opid in wfu_allops_bank.conops)if(wfu_allops_bank.conops.hasOwnProperty(opid)){var qindex=wfu_allops_bank.conops[opid].qindex;var itemindex=wfu_allops_bank.conops[opid].itemindex;var reassign=false;if(qindex<1||
341
- qindex>policy.questions.length)reassign=true;else{var question=policy.questions[qindex-1];var qnum=question.x*question.y;if(itemindex<1||itemindex>qnum)reassign=true}if(reassign){wfu_allops_bank.conops[opid].qindex=1;wfu_allops_bank.conops[opid].itemindex=1;wfu_allops_bank.conops[opid].unassigned=true}}wfu_set_consent_policy(policy);wfu_update_consent_question_item_assignments()}}
342
- function wfu_update_consent_question_item_assignments(){var containers=document.querySelectorAll("#wfu_conquestions_container .wfu_conquestion_itemcontainer");for(var i=0;i<containers.length;i++)containers[i].classList.remove("wfu_item_assigned");for(var opid in wfu_allops_bank.conops)if(wfu_allops_bank.conops.hasOwnProperty(opid)&&wfu_allops_bank.conops[opid].active){var qindex=wfu_allops_bank.conops[opid].qindex;var itemindex=wfu_allops_bank.conops[opid].itemindex;var itemtable=document.querySelector("#wfu_conquestion_container_"+
343
- qindex+" .wfu_conquestion_itemtable");var x=itemtable.rows[0].cells.length;var rowindex=Math.floor((itemindex-1)/x);var cellindex=(itemindex-1)%x;itemtable.rows[rowindex].cells[cellindex].classList.add("wfu_item_assigned")}}
344
- function wfu_consent_question_optable_update(index,itemindex){var freeze=index<1||itemindex<1;for(var opid in wfu_allops_bank.conops)if(wfu_allops_bank.conops.hasOwnProperty(opid)&&wfu_allops_bank.conops[opid].active){var oprow=document.getElementById("wfu_conquestions_oprow_"+opid);var selbox=document.querySelector("#wfu_conquestions_oprow_"+opid+" .wfu_conquestions_opsel");var invbox=document.querySelector("#wfu_conquestions_oprow_"+opid+" .wfu_conquestions_opinv");if(wfu_allops_bank.conops[opid].unassigned)oprow.classList.add("wfu_op_unassigned");
345
- else oprow.classList.remove("wfu_op_unassigned");selbox.checked=!freeze&&wfu_allops_bank.conops[opid].qindex==index&&wfu_allops_bank.conops[opid].itemindex==itemindex;invbox.checked=wfu_allops_bank.conops[opid].inverse;invbox.disabled=!(!freeze&&wfu_allops_bank.conops[opid].qindex==index&&wfu_allops_bank.conops[opid].itemindex==itemindex);if(freeze){selbox.classList.add("wfu_frozen");invbox.classList.add("wfu_frozen")}else{selbox.classList.remove("wfu_frozen");invbox.classList.remove("wfu_frozen")}}}
 
 
 
346
  function wfu_conquestion_optable_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;var itemcontainer=document.querySelector("#wfu_conquestions_container .wfu_conquestion_itemcontainer.wfu_item_selected");if(!itemcontainer)return;var par=itemcontainer;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var index=parseInt(par.id.replace("wfu_conquestion_container_",""));var itemcontainers=document.querySelectorAll("#wfu_conquestion_container_"+
347
- index+" .wfu_conquestion_itemcontainer");var itemindex=-1;for(var j=0;j<itemcontainers.length;j++)if(itemcontainers[j]==itemcontainer){itemindex=j+1;break}var policy=wfu_get_consent_policy();if(!policy)return;if(!item.classList.contains("wfu_conquestions_opsel")&&!item.classList.contains("wfu_conquestions_opinv"))return;var opid=parseInt(item.parentNode.parentNode.id.replace("wfu_conquestions_oprow_",""));var opas=wfu_allops_bank.conops[opid];if(opas.qindex!=index||opas.itemindex!=itemindex||opas.unassigned){var question=
348
- policy.questions[opas.qindex-1];for(var j=0;j<question.items.length;j++)if(question.items[j].index==opas.itemindex){if(typeof question.items[j].operations[opid]!="undefined")delete question.items[j].operations[opid];break}opas.qindex=index;opas.itemindex=itemindex;opas.inverse=document.querySelector("#wfu_conquestions_oprow_"+opid+" .wfu_conquestions_opinv").checked;opas.unassigned=false;var question=policy.questions[opas.qindex-1];var qitem=null;var qindex=question.items.length;for(var j=0;j<question.items.length;j++)if(question.items[j].index==
349
- opas.itemindex){qitem=question.items[j];qitem.operations[opid]=opas.inverse?-1:1;break}else if(question.items[j].index>itemindex){qindex=j;break}if(!qitem){qitem={index:opas.itemindex,label:"",location:"right",preselect:false,operations:{}};qitem.operations[opid]=opas.inverse?-1:1;question.items.splice(qindex,0,qitem)}wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;document.getElementById("wfu_conquestions_oprow_"+opid).classList.remove("wfu_op_unassigned");document.querySelector("#wfu_conquestions_oprow_"+
350
- opid+" .wfu_conquestions_opinv").disabled=false;wfu_update_consent_question_item_assignments();wfu_allops_freeze_events=false}else if(item.classList.contains("wfu_conquestions_opinv")){var opas=wfu_allops_bank.conops[opid];opas.inverse=item.checked;var question=policy.questions[opas.qindex-1];for(var j=0;j<question.items.length;j++)if(question.items[j].index==opas.itemindex){question.items[j].operations[opid]=opas.inverse?-1:1;break}wfu_set_consent_policy(policy)}}
 
 
351
  function wfu_conquestion_tools_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;var qcount=document.querySelectorAll(".wfu_conquestion_container").length;var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var index=parseInt(par.id.replace("wfu_conquestion_container_",""))-1;wfu_allops_freeze_events=true;var action="";if(item.classList.contains("wfu_conquestion_add"))action="add";else if(item.classList.contains("wfu_conquestion_remove")&&
352
  qcount>1)action="remove";else if(item.classList.contains("wfu_conquestion_up")&&index>0)action="up";else if(item.classList.contains("wfu_conquestion_down")&&index<qcount-1)action="down";if(action!=""){wfu_update_consent_question_itemprops(0,-1);wfu_consent_question_action(action,index);wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(0,0);wfu_update_conquestion_header()}wfu_allops_freeze_events=false}
353
  function wfu_update_conquestion_header(){var labels=document.querySelectorAll(".wfu_conquestion_headerlabel");var add_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_add");var remove_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_remove");var up_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_up");var down_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_down");
354
  for(var i=0;i<labels.length;i++){labels[i].innerHTML="Question "+(i+1);if(labels.length>1)remove_btns[i].classList.remove("wfu_tool_disabled");else remove_btns[i].classList.add("wfu_tool_disabled");if(i>0)up_btns[i].classList.remove("wfu_tool_disabled");else up_btns[i].classList.add("wfu_tool_disabled");if(i<labels.length-1)down_btns[i].classList.remove("wfu_tool_disabled");else down_btns[i].classList.add("wfu_tool_disabled")}}
355
  function wfu_permissions_update(updatehtml){function _wfu_nested_perms_update(item,level){var id=item.ID;if(item.children.length>0){policy.permissions[id].allowedstatus={};for(var j=0;j<item.children.length;j++){_wfu_nested_perms_update(item.children[j],level+1);var id2=item.children[j].ID;for(var locid in policy.permissions[id2].allowedstatus)if(policy.permissions[id2].allowedstatus.hasOwnProperty(locid)){var allowedstatus2=policy.permissions[id2].allowedstatus[locid];if(typeof policy.permissions[id].allowedstatus[locid]==
356
- "undefined")policy.permissions[id].allowedstatus[locid]=allowedstatus2;else if(policy.permissions[id].allowedstatus[locid]*allowedstatus2<1)policy.permissions[id].allowedstatus[locid]=0}}}else{var allowed=policy.permissions[id].Allowed;policy.permissions[id].allowedstatus={};for(var k=0;k<policy.permissions[id].Locations.length;k++){var locid=policy.permissions[id].Locations[k];policy.permissions[id].allowedstatus[locid]=allowed.indexOf(locid)>-1?1:-1}}if(typeof wfu_allops_bank.perallowedstatus==
357
- "undefined")wfu_allops_bank.perallowedstatus={};wfu_allops_bank.perallowedstatus[id]=policy.permissions[id].allowedstatus;if(updatehtml){var row=document.getElementById("wfu_perm_row_"+id);for(var locid in policy.permissions[id].allowedstatus)if(policy.permissions[id].allowedstatus.hasOwnProperty(locid)){var check=document.querySelector("#wfu_perm_row_"+id+" .wfu_location_cell:nth-child("+(parseInt(locid)+1)+") input");wfu_set_checkbox_status(check,policy.permissions[id].allowedstatus[locid])}}}var policy=
358
- wfu_get_permissions_policy();if(policy){console.log(policy);wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_perms_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
359
  function wfu_adjust_permissions_levels(){function _wfu_force_permission_update_nested(item,locid){var id=item.ID;if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_force_permission_update_nested(item.children[j],locid);else if(policy.permissions[id].Allowed.indexOf(locid)==-1&&policy.permissions[id].Locations.indexOf(locid)>-1)policy.permissions[id].Allowed.push(locid)}function _wfu_nested_adjust_permissions_levels(item,level){if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_nested_adjust_permissions_levels(item.children[j],
360
- level+1);var id=item.ID;for(var locid in wfu_allops_bank.perallowedstatus[id])if(wfu_allops_bank.perallowedstatus[id].hasOwnProperty(locid))if(wfu_allops_bank.perallowedstatus[id][locid]==0&&level==wfu_allops_bank.params.perlevels){_wfu_force_permission_update_nested(item,parseInt(locid));wfu_allops_bank.perallowedstatus[id][locid]=1;policy_needs_update=true}}wfu_permissions_update(false);var policy=wfu_get_permissions_policy();if(policy){var policy_needs_update=false;for(var i=0;i<policy.structure.length;i++)_wfu_nested_adjust_permissions_levels(policy.structure[i],
361
  1);if(policy_needs_update)wfu_set_permissions_policy(policy)}}
362
  function wfu_perm_toggle(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_location_selector"))return;var id=obj.parentNode.parentNode.id.replace("wfu_perm_row_","");var locid=obj.parentNode.cellIndex;var policy=wfu_get_permissions_policy();if(policy){if(typeof policy.permissions[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)obj.classList.remove("indeterminate");
363
- if(policy.children_index[id].length>0){var level=1;var parid=id;while((parid=policy.permissions[parid].Parent)>0)level++;if((wfu_allops_bank.params.perlevels<1||level<wfu_allops_bank.params.perlevels)&&!confirm("This will make all children permissions "+(new_status?"allowed":"not allowed")+". Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];
364
- if(policy.children_index[id2].length==0){var locindex2=policy.permissions[id2].Allowed.indexOf(locid);if(new_status&&locindex2==-1&&policy.permissions[id2].Locations.indexOf(locid)>-1)policy.permissions[id2].Allowed.push(locid);else if(!new_status&&locindex2>-1)policy.permissions[id2].Allowed.splice(locindex2,1)}}}else{var locindex=policy.permissions[id].Allowed.indexOf(locid);if(new_status&&locindex==-1&&policy.permissions[id].Locations.indexOf(locid)>-1)policy.permissions[id].Allowed.push(locid);
365
- else if(!new_status&&locindex>-1)policy.permissions[id].Allowed.splice(locindex,1)}wfu_set_permissions_policy(policy);wfu_allops_freeze_events=true;wfu_permissions_update(true);wfu_allops_freeze_events=false}}
366
  function wfu_perm_button_action(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_perm_button"))return;var policy=wfu_get_permissions_policy();if(policy){var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_perm_row"));var id=parseInt(par.id.replace("wfu_perm_row_",""));obj.classList.toggle("expanded");for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];var parid=id2;var visible=true;while((parid=policy.permissions[parid].Parent)>
367
  0)visible=visible&&document.querySelector("#wfu_perm_row_"+parid+" .wfu_perm_button")&&document.querySelector("#wfu_perm_row_"+parid+" .wfu_perm_button").classList.contains("expanded");document.getElementById("wfu_perm_row_"+id2).style.display=visible?"table-row":"none"}}}
368
  function wfu_logactions_update(updatehtml){function _wfu_nested_logactions_update(item,level){var id=item.ID;if(item.children.length>0){policy.logactions[id].allowedstatus={};for(var j=0;j<item.children.length;j++){_wfu_nested_logactions_update(item.children[j],level+1);var id2=item.children[j].ID;for(var entid in policy.logactions[id2].allowedstatus)if(policy.logactions[id2].allowedstatus.hasOwnProperty(entid)){var allowedstatus2=policy.logactions[id2].allowedstatus[entid];if(typeof policy.logactions[id].allowedstatus[entid]==
369
- "undefined")policy.logactions[id].allowedstatus[entid]=allowedstatus2;else if(policy.logactions[id].allowedstatus[entid]*allowedstatus2<1)policy.logactions[id].allowedstatus[entid]=0}}}else{var allowed=policy.logactions[id].Allowed;policy.logactions[id].allowedstatus={};for(var k=0;k<policy.logactions[id].Entities.length;k++){var entid=policy.logactions[id].Entities[k];policy.logactions[id].allowedstatus[entid]=allowed.indexOf(entid)>-1?1:-1}}if(typeof wfu_allops_bank.logallowedstatus=="undefined")wfu_allops_bank.logallowedstatus=
370
- {};wfu_allops_bank.logallowedstatus[id]=policy.logactions[id].allowedstatus;if(updatehtml){var row=document.getElementById("wfu_log_row_"+id);for(var entid in policy.logactions[id].allowedstatus)if(policy.logactions[id].allowedstatus.hasOwnProperty(entid)){var check=document.querySelector("#wfu_log_row_"+id+" .wfu_entity_cell:nth-child("+(parseInt(entid)+1)+") input");wfu_set_checkbox_status(check,policy.logactions[id].allowedstatus[entid])}}}var policy=wfu_get_logactions_policy();if(policy){console.log(policy);
371
  wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_logactions_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
372
  function wfu_adjust_logactions_levels(){function _wfu_force_logaction_update_nested(item,entid){var id=item.ID;if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_force_logaction_update_nested(item.children[j],entid);else if(policy.logactions[id].Allowed.indexOf(entid)==-1&&policy.logactions[id].Entities.indexOf(entid)>-1)policy.logactions[id].Allowed.push(entid)}function _wfu_nested_adjust_logactions_levels(item,level){if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_nested_adjust_logactions_levels(item.children[j],
373
- level+1);var id=item.ID;for(var entid in wfu_allops_bank.logallowedstatus[id])if(wfu_allops_bank.logallowedstatus[id].hasOwnProperty(entid))if(wfu_allops_bank.logallowedstatus[id][entid]==0&&level==wfu_allops_bank.params.loglevels){_wfu_force_logaction_update_nested(item,parseInt(entid));wfu_allops_bank.logallowedstatus[id][entid]=1;policy_needs_update=true}}wfu_logactions_update(false);var policy=wfu_get_logactions_policy();if(policy){var policy_needs_update=false;for(var i=0;i<policy.structure.length;i++)_wfu_nested_adjust_logactions_levels(policy.structure[i],
374
  1);if(policy_needs_update)wfu_set_logactions_policy(policy)}}
375
  function wfu_log_toggle(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_entity_selector"))return;var id=obj.parentNode.parentNode.id.replace("wfu_log_row_","");var entid=obj.parentNode.cellIndex;var policy=wfu_get_logactions_policy();if(policy){if(typeof policy.logactions[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)obj.classList.remove("indeterminate");
376
- if(policy.children_index[id].length>0){var level=1;var parid=id;while((parid=policy.logactions[parid].Parent)>0)level++;if((wfu_allops_bank.params.loglevels<1||level<wfu_allops_bank.params.loglevels)&&!confirm("This will make all children log actions "+(new_status?"allowed":"not allowed")+". Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];
377
- if(policy.children_index[id2].length==0){var entindex2=policy.logactions[id2].Allowed.indexOf(entid);if(new_status&&entindex2==-1&&policy.logactions[id2].Entities.indexOf(entid)>-1)policy.logactions[id2].Allowed.push(entid);else if(!new_status&&entindex2>-1)policy.logactions[id2].Allowed.splice(entindex2,1)}}}else{var entindex=policy.logactions[id].Allowed.indexOf(entid);if(new_status&&entindex==-1&&policy.logactions[id].Entities.indexOf(entid)>-1)policy.logactions[id].Allowed.push(entid);else if(!new_status&&
378
- entindex>-1)policy.logactions[id].Allowed.splice(entindex,1)}wfu_set_logactions_policy(policy);wfu_allops_freeze_events=true;wfu_logactions_update(true);wfu_allops_freeze_events=false}}
379
  function wfu_log_button_action(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_log_button"))return;var policy=wfu_get_logactions_policy();if(policy){var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_log_row"));var id=parseInt(par.id.replace("wfu_log_row_",""));obj.classList.toggle("expanded");for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];var parid=id2;var visible=true;while((parid=policy.logactions[parid].Parent)>
380
  0)visible=visible&&document.querySelector("#wfu_log_row_"+parid+" .wfu_log_button")&&document.querySelector("#wfu_log_row_"+parid+" .wfu_log_button").classList.contains("expanded");document.getElementById("wfu_log_row_"+id2).style.display=visible?"table-row":"none"}}}
381
  function wfu_pdusers_addrole_handler(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_pdusers_roles_add"))return;var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_roles_container"));var type=par.id.replace(/^wfu_pdusers_roles_(in|out)_container$/,"$1");var roles=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_list");var names=[];for(var i=0;i<roles.options.length;i++)if(roles.options[i].selected)names.push(roles.options[i].value);
382
  wfu_allops_freeze_events=true;wfu_pdusers_add_roles(type,names);wfu_allops_freeze_events=false}
383
  function wfu_pdusers_add_roles(type,names){var show=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_show");var roles=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_list");var selected=document.querySelectorAll("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_rightpanel .wfu_pdusers_roles_role");var source=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]').checked?"in":"out";var btype=type=="in"?
384
- "included":"excluded";var count=selected.length;for(var i=0;i<names.length;i++){var title="";if(names[i]=="all")title="All";else for(var j=0;j<roles.options.length;j++)if(roles.options[j].value==names[i]){title=roles.options[j].innerHTML;break}if(title!=""){var already_in=false;for(var j=0;j<selected.length;j++)if(selected[j].classList.contains(names[i])){already_in=true;break}if(!already_in){var pos=wfu_allops_bank.pdusers.rolestates[source][btype].indexOf(names[i]);if(pos==-1)wfu_allops_bank.pdusers.rolestates[source][btype].push(names[i]);
385
- if(count>0)show.appendChild(document.createElement("BR"));var role=document.createElement("DIV");role.classList.add("wfu_pdusers_roles_role");role.classList.add(names[i]);role.innerHTML=title;if(names[i]=="all")role.classList.add("wfu_pdusers_roles_all");else{var delbtn=document.createElement("SPAN");wfu_addEventHandler(delbtn,"click",wfu_pdusers_removerole_handler);role.appendChild(delbtn)}show.appendChild(role);count++}}}}
386
  function wfu_pdusers_clear_roles(type){var show=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_show");var selected=document.querySelectorAll("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_rightpanel .wfu_pdusers_roles_role");var brs=document.querySelectorAll("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_rightpanel br");for(var i=0;i<selected.length;i++)show.removeChild(selected[i]);for(var i=0;i<brs.length;i++)show.removeChild(brs[i])}
387
- function wfu_pdusers_removerole_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;if(!item.parentNode.classList.contains("wfu_pdusers_roles_role"))return;var role=item.parentNode.className.replace("wfu_pdusers_roles_role","").trim();var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_roles_container"));var type=par.id.replace(/^wfu_pdusers_roles_(in|out)_container$/,"$1");var source=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]').checked?
388
- "in":"out";var btype=type=="in"?"included":"excluded";var pos=wfu_allops_bank.pdusers.rolestates[source][btype].indexOf(role);if(pos>-1)wfu_allops_bank.pdusers.rolestates[source][btype].splice(pos,1);var br1=item.parentNode.previousSibling;var br2=item.parentNode.nextSibling;var show=document.querySelector("#"+par.id+" .wfu_pdusers_roles_show");wfu_allops_freeze_events=true;show.removeChild(item.parentNode);if(br1&&br1.tagName&&br1.tagName=="BR")show.removeChild(br1);else if(br2&&br2.tagName&&br2.tagName==
389
- "BR")show.removeChild(br2);wfu_allops_freeze_events=false}
390
- function wfu_pdusers_update(){var pd_users=wfu_get_pd_users();if(pd_users){console.log(pd_users);wfu_allops_bank.pdusers={rolestates:{"in":{included:[],excluded:[]},out:{included:["all"],excluded:[]}}};var userin_input=document.querySelector('#wfu_pdusers_users_in_container .wfu_pdusers_users_leftpanel input[type="text"]');wfu_attach_element_handlers(userin_input,wfu_pdusers_get_users);var userout_input=document.querySelector('#wfu_pdusers_users_out_container .wfu_pdusers_users_leftpanel input[type="text"]');wfu_attach_element_handlers(userout_input,
391
- wfu_pdusers_get_users);wfu_allops_bank.pdusers.userinput={"in":{prev_value:""},out:{prev_value:""},xhr:null};var radioin=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]');var rolein_list=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_list");var rolein_back=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_back");var radioout=document.querySelector('#wfu_pdusers_roles_out_container input[type="radio"]');var roleout_list=
392
- document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_list");var roleout_back=document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_back");if(pd_users.roles_included.length>0&&pd_users.roles_included[0]!="all"||pd_users.roles_excluded.length==1&&pd_users.roles_excluded[0]=="all"||pd_users.roles_included.length==0&&pd_users.roles_excluded.length==0){wfu_allops_bank.pdusers.rolestates["in"].included=pd_users.roles_included;rolein_list.disabled=false;rolein_back.classList.add("active");
393
- roleout_list.disabled=true;roleout_back.classList.remove("active");radioin.checked=true;wfu_pdusers_add_roles("in",pd_users.roles_included);wfu_pdusers_add_roles("out",[])}else{wfu_allops_bank.pdusers.rolestates.out.excluded=pd_users.roles_excluded;rolein_list.disabled=true;rolein_back.classList.remove("active");roleout_list.disabled=false;roleout_back.classList.add("active");radioout.checked=true;wfu_pdusers_add_roles("in",["all"]);wfu_pdusers_add_roles("out",pd_users.roles_excluded)}}}
394
- function wfu_pdusers_roletype_handle(obj){if(wfu_allops_freeze_events)return;if(obj.name!="wfu_pdusers_roletypes")return;var radioin=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]');var rolein_list=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_list");var rolein_back=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_back");var radioout=document.querySelector('#wfu_pdusers_roles_out_container input[type="radio"]');var roleout_list=
395
- document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_list");var roleout_back=document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_back");wfu_allops_freeze_events=true;wfu_pdusers_clear_roles("in");wfu_pdusers_clear_roles("out");if(obj.value=="include"){rolein_list.disabled=false;rolein_back.classList.add("active");roleout_list.disabled=true;roleout_back.classList.remove("active");radioin.checked=true;wfu_pdusers_add_roles("in",wfu_allops_bank.pdusers.rolestates["in"].included);
396
- wfu_pdusers_add_roles("out",wfu_allops_bank.pdusers.rolestates["in"].excluded)}else{rolein_list.disabled=true;rolein_back.classList.remove("active");roleout_list.disabled=false;roleout_back.classList.add("active");radioout.checked=true;wfu_pdusers_add_roles("in",wfu_allops_bank.pdusers.rolestates.out.included);wfu_pdusers_add_roles("out",wfu_allops_bank.pdusers.rolestates.out.excluded)}wfu_allops_freeze_events=false}
397
- function wfu_pdusers_get_users(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;if(!item.parentNode.classList.contains("wfu_pdusers_users_leftpanel"))return;var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_users_container"));var type=par.id.replace(/^wfu_pdusers_users_(in|out)_container$/,"$1");if(item.value==wfu_allops_bank.pdusers.userinput[type].prev_value)return;wfu_allops_bank.pdusers.userinput[type].prev_value=item.value;if(wfu_allops_bank.pdusers.xhr!=
398
- null){wfu_allops_bank.pdusers.xhr.abort();wfu_allops_bank.pdusers.xhr=null}if(item.value==""){var userlist=document.querySelector("#wfu_pdusers_users_"+type+"_container .wfu_pdusers_users_list");var length=userlist.options.length;for(i=0;i<length;i++)userlist.options[i]=null;return}var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_pdusers_get_users";params[1]=new Array(2);
399
- params[1][0]="nonce";params[1][1]=document.getElementById("_wpnonce").value;params[2]=new Array(2);params[2][0]="query";params[2][1]=item.value;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200)console.log(xhr.responseText)};wfu_allops_bank.pdusers.xhr=xhr;xhr.send(parameters)}
400
- function wfu_initialize_consent_policy_basic(){wfu_allops_bank.userinput={prev_value:"",xhr:null,prev_select:-1};wfu_attach_element_handlers(document.getElementById("wfu_pd_user_box0"),wfu_pd_get_users_basic)}
401
- function wfu_pd_get_users_basic(e){e=e||window.event;var item=e.target;if(!item.classList.contains("wfu_pd_user_box0"))return;if(item.value==wfu_allops_bank.userinput)return;var userlist=document.getElementById("wfu_pd_user_select0");wfu_allops_bank.userinput=item.value;if(wfu_allops_bank.userinput.xhr!=null){wfu_allops_bank.userinput.xhr.abort();wfu_allops_bank.userinput.xhr=null}if(item.value==""){var length=userlist.options.length;for(i=0;i<length;i++)userlist.options[i]=null;return}var xhr=wfu_GetHttpRequestObject();
 
 
 
 
 
 
 
 
402
  if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_pdusers_get_users";params[1]=new Array(2);params[1][0]="nonce";params[1][1]=document.getElementById("_wpnonce").value;params[2]=new Array(2);params[2][0]="query";params[2][1]=item.value;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);xhr.open("POST",url,true);xhr.setRequestHeader("Content-type",
403
- "application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){var start_text="pdusers_get_users:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);var users_str=wfu_plugin_decode_string(response);var users=null;try{users=JSON.parse(users_str)}catch(e$2){}var length=
404
- userlist.options.length;for(i=0;i<length;i++)userlist.options[i]=null;for(i=0;i<users.length;i++){var opt=document.createElement("OPTION");opt.value=users[i].user_login;opt.innerHTML=users[i].display_name+" ("+users[i].user_login+")";userlist.options.add(opt)}}};wfu_allops_bank.userinput.xhr=xhr;xhr.send(parameters)}
405
  function wfu_export_user_data(){var userlist=document.getElementById("wfu_pd_user_select0");if(userlist.selectedIndex<0){alert("No user has been selected!");return}var params={username:userlist.options[userlist.selectedIndex].value};var params_str=JSON.stringify(params);wfu_download_file("exportdata:"+params_str,1)}
406
- function wfu_erase_user_data_check(){var userlist=document.getElementById("wfu_pd_user_select0");var anchor=document.getElementById("wfu_erase_userdata0");if(userlist.selectedIndex<0){alert("No user has been selected!");return false}else{anchor.href=anchor.href.replace(/action=erase_userdata_ask.*$/,"action=erase_userdata_ask&username="+userlist.options[userlist.selectedIndex].value);return true}};
 
1
+ var DraggedItem=null;var ShortcodeNextSave=0;var ShortcodeTimeOut=null;var ShortcodeString="";var Autosave=false;var PageObsolete=false;var PageUpdating=false;var CheckObsolescenceTimeOut=5E3;var wfu_transfers_observer_interval=100;var wfu_allops_freeze_events=false;var wfu_PD_bank={};
2
  jQuery(document).ready(function($){$(".wfu_color_field").wpColorPicker({change:function(event,ui){event.target.value=ui.color.toString();if(event.target.name=="wfu_text_elements")wfu_update_text_value(event);else if(event.target.name=="wfu_triplecolor_elements")wfu_update_triplecolor_value(event)}})});
3
  function wfu_admin_activate_tab(key){var tabs=document.getElementById("wfu_tab_container");var tab,tabkey;for(var i=0;i<tabs.childNodes.length;i++){tab=tabs.childNodes[i];if(tab.nodeType===1){tabkey=tab.id.substr(8);if(tab.className.indexOf("nav-tab-active")>-1){tab.className="nav-tab";document.getElementById("wfu_container_"+tabkey).style.display="none"}}}document.getElementById("wfu_tab_"+key).className="nav-tab nav-tab-active";document.getElementById("wfu_container_"+key).style.display="block"}
4
  function wfu_admin_onoff_clicked(key){var onoff=document.getElementById("wfu_attribute_"+key);var shadows=document.querySelectorAll("#wfu_wrapper div.wfu_shadow_"+key);var shadows_inv=document.querySelectorAll("#wfu_wrapper div.wfu_shadow_"+key+"_inv");var status=onoff.className.substr(onoff.className.length-2)=="on";status=!status;if(status){document.getElementById("wfu_attribute_value_"+key).value="true";onoff.className="wfu_onoff_container_on";for(var i=0;i<shadows.length;i++)shadows[i].style.display=
268
  selected[i].className.indexOf("wfu_included")>-1;if(included)codes_included++;else codes_not_included++;if(action=="delete"&&!included||action=="include"&&included)selected[i].checked=false;else codes.push(file_code)}}if(action=="delete"&&codes_not_included>0)alert("Notice! Files that were not uploaded using the plugin cannot be deleted and have been deselected.");else if(action=="include"&&codes_included>0)alert("Notice! Files already included in the plugin have been deselected.");if(codes.length==
269
  0)return;var url=document.getElementById("wfu_adminbrowser_action_url").value;var referer=document.getElementById("wfu_adminbrowser_referer").value;if(action=="delete"||action=="include"){var form=document.createElement("FORM");form.method="POST";form.action=url;form.style.display="none";var field1=document.createElement("INPUT");field1.type="hidden";field1.name="action";field1.value=action+"_file";form.appendChild(field1);var field2=document.createElement("INPUT");field2.type="hidden";field2.name=
270
  "file";field2.value="list:"+codes.join();form.appendChild(field2);var field3=document.createElement("INPUT");field3.type="hidden";field3.name="referer";field3.value=referer;form.appendChild(field3);document.body.appendChild(form);form.submit()}}
271
+ function wfu_initialize_consent_policy(params){wfu_PD_bank.params=params;wfu_adjust_pdops_levels();wfu_adjust_permissions_levels();wfu_adjust_logactions_levels();wfu_attach_pdheaders_events();wfu_attach_pdops_events();wfu_attach_conops_events();wfu_pdops_update(true);wfu_allops_freeze_events=true;wfu_conops_update();wfu_consent_question_optable_recreate();wfu_update_consent_questions();wfu_consent_question_operations_reassign();wfu_update_consent_question_itemprops(0,-1);wfu_permissions_update(true);
272
+ wfu_logactions_update(true);wfu_pdusers_update();wfu_allops_freeze_events=false}function wfu_get_consent_policy(){var policy_str=wfu_plugin_decode_string(document.getElementById("wfu_consent_policy").value);var policy=null;try{policy=JSON.parse(policy_str)}catch(e){}return policy}function wfu_get_permissions_policy(){var policy_str=wfu_plugin_decode_string(document.getElementById("wfu_permissions_policy").value);var policy=null;try{policy=JSON.parse(policy_str)}catch(e){}return policy}
273
  function wfu_get_logactions_policy(){var policy_str=wfu_plugin_decode_string(document.getElementById("wfu_logactions_policy").value);var policy=null;try{policy=JSON.parse(policy_str)}catch(e){}return policy}function wfu_get_pd_users(){var pd_users_str=wfu_plugin_decode_string(document.getElementById("wfu_assigned_users").value);var pd_users=null;try{pd_users=JSON.parse(pd_users_str)}catch(e){}return pd_users}
274
  function wfu_set_consent_policy(new_policy){var policy_str=JSON.stringify(new_policy);document.getElementById("wfu_consent_policy").value=wfu_plugin_encode_string(policy_str)}function wfu_set_logactions_policy(new_policy){var policy_str=JSON.stringify(new_policy);document.getElementById("wfu_logactions_policy").value=wfu_plugin_encode_string(policy_str)}
275
  function wfu_set_permissions_policy(new_policy){var policy_str=JSON.stringify(new_policy);document.getElementById("wfu_permissions_policy").value=wfu_plugin_encode_string(policy_str)}
276
+ function wfu_adjust_pdops_levels(){function _wfu_force_pdop_update_nested(item){var id=item.ID;if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_force_pdop_update_nested(item.children[j]);else policy.operations[id].Allowed=true}function _wfu_nested_adjust_pdops_levels(item,level){if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_nested_adjust_pdops_levels(item.children[j],level+1);var id=item.ID;if(wfu_PD_bank.allowedstatus[id]==0&&level==wfu_PD_bank.params.oplevels){_wfu_force_pdop_update_nested(item);
277
+ wfu_PD_bank.allowedstatus[id]=1;policy_needs_update=true}}wfu_pdops_update(false);var policy=wfu_get_consent_policy();if(policy){console.log(policy);var policy_needs_update=false;for(var i=0;i<policy.structure.length;i++)_wfu_nested_adjust_pdops_levels(policy.structure[i],1);if(policy_needs_update)wfu_set_consent_policy(policy)}}
278
+ function wfu_attach_pdheaders_events(){var acc=document.querySelectorAll(".wfu_pdheader_button");var i;for(i=0;i<acc.length;i++)acc[i].addEventListener("click",function(){this.classList.toggle("expanded");var panel=null;if(this.classList.contains("wfu_pdop_header_button"))panel=document.querySelector(".wfu_plugin_operations");else if(this.classList.contains("wfu_conop_header_button"))panel=document.querySelector(".wfu_consent_operations");else if(this.classList.contains("wfu_conquestion_header_button"))panel=
279
+ document.querySelector(".wfu_consent_questions");else if(this.classList.contains("wfu_permissions_header_button"))panel=document.querySelector(".wfu_consent_permissions");else if(this.classList.contains("wfu_logactions_header_button"))panel=document.querySelector(".wfu_consent_logactions");else if(this.classList.contains("wfu_pdusers_header_button"))panel=document.querySelector(".wfu_consent_users");if(panel)if(this.classList.contains("expanded"))panel.style.display="block";else panel.style.display=
280
+ "none"})}function wfu_attach_pdops_events(){var acc=document.querySelectorAll(".wfu_pdop_button");var i;for(i=0;i<acc.length;i++)acc[i].addEventListener("click",function(){this.classList.toggle("expanded");var panel=this.parentElement.nextElementSibling;if(this.classList.contains("expanded"))panel.style.display="block";else panel.style.display="none"})}
281
  function wfu_attach_conops_events(){var acc=document.querySelectorAll(".wfu_conop_button");var i;for(i=0;i<acc.length;i++)acc[i].addEventListener("click",function(){this.classList.toggle("expanded");var panel=this.parentElement.nextElementSibling;if(this.classList.contains("expanded"))panel.style.display="block";else panel.style.display="none"})}
282
  function wfu_pdop_toggle(obj){if(wfu_allops_freeze_events)return;if(obj.id.indexOf("wfu_pdop_")==-1)return;var id=obj.id.replace("wfu_pdop_","");var policy=wfu_get_consent_policy();if(policy){if(typeof policy.operations[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)obj.classList.remove("indeterminate");if(policy.children_index[id].length>0){var level=1;
283
+ var parid=id;while((parid=policy.operations[parid].Parent)>0)level++;if((wfu_PD_bank.params.oplevels<1||level<wfu_PD_bank.params.oplevels)&&!confirm("This will set all children operations to "+(new_status?"allowed":"not allowed")+". Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];if(policy.children_index[id2].length==0)policy.operations[id2].Allowed=
284
  new_status}}else policy.operations[id].Allowed=new_status;wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_pdops_update(true);wfu_conops_update();wfu_update_consent_question_itemprops(0,-1);wfu_consent_question_optable_recreate();wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(0,0);wfu_allops_freeze_events=false}}
285
  function wfu_conop_toggle(obj){if(wfu_allops_freeze_events)return;if(obj.id.indexOf("wfu_conop_")==-1)return;var id=obj.id.replace("wfu_conop_","");var policy=wfu_get_consent_policy();if(policy){if(typeof policy.operations[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)check.classList.remove("indeterminate");if(policy.children_index[id].length>0){var level=
286
+ 1;var parid=id;while((parid=policy.operations[parid].Parent)>0)level++;if((wfu_PD_bank.params.oplevels<1||level<wfu_PD_bank.params.oplevels)&&!confirm("This will make all children operations "+(new_status?"require":"not require")+" consent. Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];if(policy.children_index[id2].length==0)policy.operations[id2].NeedsConsent=
287
  new_status}}else policy.operations[id].NeedsConsent=new_status;wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_conops_update();wfu_update_consent_question_itemprops(0,-1);wfu_consent_question_optable_recreate();wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(0,0);wfu_allops_freeze_events=false}}
288
  function wfu_pdops_update(updatehtml){function _wfu_atomic_pdop_update(id){var allowed=policy.operations[id].Allowed;policy.operations[id].allowedstatus={};for(var k=0;k<policy.operations[id].Datatypes.length;k++){var type=policy.operations[id].Datatypes[k];policy.operations[id].allowedstatus[type]=allowed?1:-1}var condition=policy.operations[id].Condition;if(condition=="")policy.operations[id].pdvisible=true;else{var negative=false;if(condition.substr(0,1)=="!"){negative=true;condition=condition.replace("!",
289
  "")}var allowedstatus2=policy.operations[parseInt(condition)].allowedstatus;var enabled=false;for(var type in allowedstatus2)if(allowedstatus2.hasOwnProperty(type))if(allowedstatus2[type]>-1){enabled=true;break}policy.operations[id].pdvisible=negative?!enabled:enabled}}function _wfu_nested_pdops_update(item,level){var id=item.ID;if(item.children.length>0){policy.operations[id].allowedstatus={};policy.operations[id].pdvisible=false;for(var j=0;j<item.children.length;j++){_wfu_nested_pdops_update(item.children[j],
290
  level+1);var id2=item.children[j].ID;if(policy.operations[id2].pdvisible){var allowed=policy.operations[id2].Allowed;for(var type in policy.operations[id2].allowedstatus)if(policy.operations[id2].allowedstatus.hasOwnProperty(type)){var allowedstatus2=policy.operations[id2].allowedstatus[type];if(typeof policy.operations[id].allowedstatus[type]=="undefined")policy.operations[id].allowedstatus[type]=allowedstatus2;else if(policy.operations[id].allowedstatus[type]*allowedstatus2<1)policy.operations[id].allowedstatus[type]=
291
+ 0}if(!policy.operations[id].pdvisible)policy.operations[id].pdvisible=policy.operations[id2].pdvisible}}}else _wfu_atomic_pdop_update(id);var allowedstatus=-2;for(var type in policy.operations[id].allowedstatus)if(policy.operations[id].allowedstatus.hasOwnProperty(type)){var allowedstatus2=policy.operations[id].allowedstatus[type];if(allowedstatus==-2)allowedstatus=allowedstatus2;else if(allowedstatus*allowedstatus2<1){allowedstatus=0;break}}if(typeof wfu_PD_bank.allowedstatus=="undefined")wfu_PD_bank.allowedstatus=
292
+ {};wfu_PD_bank.allowedstatus[id]=allowedstatus;if(typeof wfu_PD_bank.level=="undefined")wfu_PD_bank.level={};wfu_PD_bank.level[id]=level;if(updatehtml){var check=document.getElementById("wfu_pdop_"+id);wfu_set_checkbox_status(check,allowedstatus);var container=document.getElementById("wfu_pdop_container_"+id);if(container)container.style.display=policy.operations[id].pdvisible&&(wfu_PD_bank.params.oplevels<1||level<=wfu_PD_bank.params.oplevels)?"block":"none"}}var policy=wfu_get_consent_policy();
293
  if(policy){wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_pdops_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
294
+ function wfu_conops_update(){function _wfu_atomic_conop_update(id){policy.operations[id].needsconsentstatus=policy.operations[id].Allowed&&policy.operations[id].NeedsConsent?1:-1;var condition=policy.operations[id].Condition;if(condition=="")policy.operations[id].convisible=true;else{var negative=false;if(condition.substr(0,1)=="!"){negative=true;condition=condition.replace("!","")}var enabled=wfu_PD_bank.allowedstatus[parseInt(condition)]>-1;policy.operations[id].convisible=negative?!enabled:enabled}policy.operations[id].convisible=
295
+ policy.operations[id].convisible&&policy.operations[id].Allowed}function _wfu_nested_conops_update(item,level){var id=item.ID;if(item.children.length>0){policy.operations[id].needsconsentstatus=-2;policy.operations[id].convisible=false;for(var j=0;j<item.children.length;j++){_wfu_nested_conops_update(item.children[j],level+1);var id2=item.children[j].ID;if(policy.operations[id2].convisible){var needsconsentstatus2=policy.operations[id2].needsconsentstatus;if(policy.operations[id].needsconsentstatus==
296
+ -2)policy.operations[id].needsconsentstatus=needsconsentstatus2;else if(policy.operations[id].needsconsentstatus*needsconsentstatus2<1)policy.operations[id].needsconsentstatus=0;if(!policy.operations[id].convisible)policy.operations[id].convisible=policy.operations[id2].convisible}}}else _wfu_atomic_conop_update(id);if(typeof wfu_PD_bank.visible=="undefined")wfu_PD_bank.visible={};wfu_PD_bank.visible[id]=policy.operations[id].convisible;if(typeof wfu_PD_bank.needsconsentstatus=="undefined")wfu_PD_bank.needsconsentstatus=
297
+ {};wfu_PD_bank.needsconsentstatus[id]=policy.operations[id].needsconsentstatus;var check=document.getElementById("wfu_conop_"+id);wfu_set_checkbox_status(check,policy.operations[id].needsconsentstatus);var container=document.getElementById("wfu_conop_container_"+id);if(container)container.style.display=policy.operations[id].convisible&&(wfu_PD_bank.params.oplevels<1||level<=wfu_PD_bank.params.oplevels)?"block":"none"}var policy=wfu_get_consent_policy();if(policy){wfu_allops_freeze_events=true;for(var i=
298
+ 0;i<policy.structure.length;i++)_wfu_nested_conops_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
299
  function wfu_update_consent_questions(){var policy=wfu_get_consent_policy();if(policy){var maincontainer=document.getElementById("wfu_conquestions_container");wfu_allops_freeze_events=true;for(var i=0;i<policy.questions.length;i++){var container=wfu_render_consent_question(i);if(container){maincontainer.appendChild(container);wfu_update_consent_question(i,true)}}wfu_update_conquestion_header();wfu_allops_freeze_events=false}}
300
  function wfu_render_consent_question(index){var policy=wfu_get_consent_policy();if(!policy)return null;var question=policy.questions[index];var i=index+1;var container=document.createElement("DIV");container.className="wfu_conquestion_container";container.id="wfu_conquestion_container_"+i;var header=document.createElement("DIV");header.className="wfu_conquestion_header";var headerlabel=document.createElement("LABEL");headerlabel.className="wfu_conquestion_headerlabel";headerlabel.innerHTML="Question "+
301
  i;header.appendChild(headerlabel);var tools=document.createElement("DIV");tools.className="wfu_conquestion_tools";var add_btn=document.getElementById("wfu_conquestion_add").cloneNode(true);add_btn.removeAttribute("id");wfu_addEventHandler(add_btn,"click",wfu_conquestion_tools_handler);var remove_btn=document.getElementById("wfu_conquestion_remove").cloneNode(true);remove_btn.removeAttribute("id");wfu_addEventHandler(remove_btn,"click",wfu_conquestion_tools_handler);var up_btn=document.getElementById("wfu_conquestion_up").cloneNode(true);
305
  opt.value="bottom";opt.innerHTML="Bottom";opt.selected=question.location=="bottom";titlelocationlist.add(opt);wfu_addEventHandler(titlelocationlist,"change",wfu_conquestion_mainprops_handler);var matrixlabel=document.createElement("LABEL");matrixlabel.className="wfu_conquestion_matrixlabel";matrixlabel.innerHTML="Number of Items";var matrix_x=document.createElement("INPUT");matrix_x.className="wfu_conquestion_matrix_x";matrix_x.type="number";matrix_x.min=1;var qx=parseInt(question.x);if(qx<=0)qx=
306
  1;question.x=qx;matrix_x.value=qx;wfu_attach_element_handlers(matrix_x,wfu_conquestion_mainprops_handler);var matrixsep=document.createElement("LABEL");matrixsep.className="wfu_conquestion_matrixsep";matrixsep.innerHTML="x";var matrix_y=document.createElement("INPUT");matrix_y.className="wfu_conquestion_matrix_y";matrix_y.type="number";matrix_y.min=1;var qy=parseInt(question.y);if(qy<=0)qy=1;question.y=qy;matrix_y.value=qy;wfu_attach_element_handlers(matrix_y,wfu_conquestion_mainprops_handler);var groupedlabel=
307
  document.createElement("LABEL");groupedlabel.className="wfu_conquestion_groupedlabel";groupedlabel.innerHTML="Grouped";var groupedbox=document.createElement("INPUT");groupedbox.className="wfu_conquestion_groupedbox";groupedbox.type="checkbox";groupedbox.checked=question.grouped==1;wfu_addEventHandler(groupedbox,"change",wfu_conquestion_mainprops_handler);var typelabel=document.createElement("LABEL");typelabel.className="wfu_conquestion_typelabel";typelabel.innerHTML="Type";var typelist=document.createElement("SELECT");
308
+ typelist.className="wfu_conquestion_typelist";var opt=document.createElement("OPTION");opt.value="checkbox";opt.innerHTML="Checkbox";opt.selected=question.type=="checkbox";typelist.add(opt);var opt=document.createElement("OPTION");opt.value="radio";opt.innerHTML="Radio";opt.selected=question.type=="radio";typelist.add(opt);var opt=document.createElement("OPTION");opt.value="prompt";opt.innerHTML="Prompt";opt.selected=question.type=="prompt";typelist.add(opt);wfu_addEventHandler(typelist,"change",
309
+ wfu_conquestion_mainprops_handler);mainprops.appendChild(mainpropstitle);mainprops.appendChild(matrixlabel);mainprops.appendChild(matrix_x);mainprops.appendChild(matrixsep);mainprops.appendChild(matrix_y);mainprops.appendChild(titlelabel);mainprops.appendChild(titletext);mainprops.appendChild(titlelocationlabel);mainprops.appendChild(titlelocationlist);mainprops.appendChild(groupedlabel);mainprops.appendChild(groupedbox);mainprops.appendChild(typelabel);mainprops.appendChild(typelist);var itemspreview=
310
+ document.createElement("DIV");itemspreview.className="wfu_conquestion_itemspreview";var itemspreviewtitle=document.createElement("LABEL");itemspreviewtitle.className="wfu_conquestion_itemspreviewtitle";itemspreviewtitle.innerHTML="Items";var displayedtitle=document.createElement("LABEL");displayedtitle.className="wfu_conquestion_displayedtitle";displayedtitle.innerHTML=question.title;var itemtable=document.createElement("TABLE");itemtable.className="wfu_conquestion_itemtable";itemspreview.appendChild(itemspreviewtitle);
311
+ if(question.location!="bottom")itemspreview.appendChild(displayedtitle);itemspreview.appendChild(itemtable);if(question.location=="bottom")itemspreview.appendChild(displayedtitle);wfu_addEventHandler(itemspreview,"click",wfu_conquestion_itempreviewer_handler);var itemprops=document.createElement("DIV");itemprops.className="wfu_conquestion_itemprops";var itempropstitle=document.createElement("LABEL");itempropstitle.className="wfu_conquestion_itempropstitle";itempropstitle.innerHTML="Item Properties";
312
+ var labellabel=document.createElement("LABEL");labellabel.className="wfu_conquestion_labellabel";labellabel.innerHTML="Label";var labeltext=document.createElement("INPUT");labeltext.className="wfu_conquestion_labeltext";labeltext.value="";wfu_attach_element_handlers(labeltext,wfu_conquestion_mainprops_handler);var labellocationlabel=document.createElement("LABEL");labellocationlabel.className="wfu_conquestion_labellocationlabel";labellocationlabel.innerHTML="Label Location";var labellocationlist=
313
+ document.createElement("SELECT");labellocationlist.className="wfu_conquestion_labellocationlist";var opt=document.createElement("OPTION");opt.value="top";opt.innerHTML="Top";opt.selected=false;labellocationlist.add(opt);var opt=document.createElement("OPTION");opt.value="left";opt.innerHTML="Left";opt.selected=false;labellocationlist.add(opt);var opt=document.createElement("OPTION");opt.value="right";opt.innerHTML="Right";opt.selected=true;labellocationlist.add(opt);var opt=document.createElement("OPTION");
314
+ opt.value="bottom";opt.innerHTML="Bottom";opt.selected=false;labellocationlist.add(opt);wfu_addEventHandler(labellocationlist,"change",wfu_conquestion_mainprops_handler);var preselectedlabel=document.createElement("LABEL");preselectedlabel.className="wfu_conquestion_preselectedlabel";preselectedlabel.innerHTML="Preselected";var preselectedbox=document.createElement("INPUT");preselectedbox.className="wfu_conquestion_preselectedbox";preselectedbox.type="checkbox";preselectedbox.checked=false;wfu_addEventHandler(preselectedbox,
315
+ "change",wfu_conquestion_mainprops_handler);var visiblelabel=document.createElement("LABEL");visiblelabel.className="wfu_conquestion_visiblelabel";visiblelabel.innerHTML="Visible";var visiblebox=document.createElement("INPUT");visiblebox.className="wfu_conquestion_visiblebox";visiblebox.type="checkbox";visiblebox.checked=true;wfu_addEventHandler(visiblebox,"change",wfu_conquestion_mainprops_handler);itemprops.appendChild(itempropstitle);itemprops.appendChild(labellabel);itemprops.appendChild(labeltext);
316
+ itemprops.appendChild(labellocationlabel);itemprops.appendChild(labellocationlist);itemprops.appendChild(preselectedlabel);itemprops.appendChild(preselectedbox);itemprops.appendChild(visiblelabel);itemprops.appendChild(visiblebox);subcontainer.appendChild(mainprops);subcontainer.appendChild(itemspreview);subcontainer.appendChild(itemprops);container.appendChild(header);container.appendChild(subcontainer);return container}
317
+ function wfu_consent_question_action(action,index){var policy=wfu_get_consent_policy();if(!policy)return;var maincontainer=document.getElementById("wfu_conquestions_container");var qcount=document.querySelectorAll(".wfu_conquestion_container").length;if(action=="add"){var question={title:"",location:"top",x:1,y:1,grouped:0,type:"checkbox",items:[{index:1,label:"I agree to allow the plugin to use my personal data",location:"right",preselect:0,visible:true,operations:{}}]};policy.questions.splice(index+
318
+ 1,0,question);wfu_set_consent_policy(policy);var container=wfu_render_consent_question(index+1);if(container){for(var j=index+2;j<=qcount;j++)document.getElementById("wfu_conquestion_container_"+j).id="wfu_conquestion_container_"+(j+1);maincontainer.insertBefore(container,document.getElementById("wfu_conquestion_container_"+(index+3)));wfu_update_consent_question(index+1,true);wfu_update_consent_question_itemprops(index+1,-1)}}else if(action=="remove"){if(qcount<=1)return;policy.questions.splice(index,
319
+ 1);wfu_set_consent_policy(policy);maincontainer.removeChild(document.getElementById("wfu_conquestion_container_"+(index+1)));for(var j=index+2;j<=qcount;j++)document.getElementById("wfu_conquestion_container_"+j).id="wfu_conquestion_container_"+(j-1)}else if(action=="up"){if(index<=0)return;var tempq=policy.questions[index];policy.questions[index]=policy.questions[index-1];policy.questions[index-1]=tempq;wfu_set_consent_policy(policy);var container1=document.getElementById("wfu_conquestion_container_"+
320
+ (index+1));var container2=document.getElementById("wfu_conquestion_container_"+index);container1.id="wfu_conquestion_container_"+index+"_temp";container2.id="wfu_conquestion_container_"+(index+1);container1.id="wfu_conquestion_container_"+index;maincontainer.insertBefore(container1,container2)}else if(action=="down"){if(index>=qcount-1)return;var tempq=policy.questions[index];policy.questions[index]=policy.questions[index+1];policy.questions[index+1]=tempq;wfu_set_consent_policy(policy);var container1=
321
+ document.getElementById("wfu_conquestion_container_"+(index+2));var container2=document.getElementById("wfu_conquestion_container_"+(index+1));container1.id="wfu_conquestion_container_"+(index+1)+"_temp";container2.id="wfu_conquestion_container_"+(index+2);container1.id="wfu_conquestion_container_"+(index+1);maincontainer.insertBefore(container1,container2)}}
322
+ function wfu_update_consent_question(index,recreate){var policy=wfu_get_consent_policy();if(!policy)return;var question=policy.questions[index];var i=index+1;var itemspreview=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_itemspreview");var itemtable=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_itemtable");var displayedtitle=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_displayedtitle");if(!itemspreview)return;if(recreate){var matrix_x=
323
+ document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_matrix_x");var matrix_y=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_matrix_y");var titletext=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_titletext");var titlelocationlist=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_titlelocationlist");var groupedbox=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_groupedbox");
324
+ matrix_x.value=question.x;matrix_y.value=question.y;titletext.value=question.title;titlelocationlist.value=question.location;groupedbox.checked=question.grouped==1;matrix_x.disabled=question.type=="prompt";matrix_y.disabled=question.type=="prompt";titletext.disabled=question.type=="prompt";titlelocationlist.disabled=question.type=="prompt";groupedbox.disabled=question.type=="prompt";displayedtitle.style.display=question.type=="prompt"?"none":"block";while(itemtable.rows.length>0)itemtable.deleteRow(0)}var qnum=
325
+ question.x*question.y;var qitems=[];for(var j=0;j<qnum;j++)qitems.push({label:"",location:"right",preselect:false,visible:true,operations:{}});for(var j=0;j<question.items.length;j++)if(typeof question.items[j].visible=="undefined")question.items[j].visible=1;for(var j=0;j<question.items.length;j++){var ind=question.items[j].index-1;if(ind>=0&&ind<qnum){qitems[ind].label=question.items[j].label;qitems[ind].location=question.items[j].location;qitems[ind].preselect=question.items[j].preselect==1;qitems[ind].visible=
326
+ typeof question.items[j].visible=="undefined"||question.items[j].visible==1;qitems[ind].operations=question.items[j].operations}}var j=0;for(var k=0;k<question.x;k++){var row;if(recreate)row=itemtable.insertRow(k);else row=itemtable.rows[k];for(var l=0;l<question.y;l++){var cell;if(recreate){cell=row.insertCell(l);cell.classList.add("wfu_conquestion_itemcontainer")}else cell=row.cells[l];while(cell.childNodes.length>0)cell.removeChild(cell.childNodes[0]);if(qitems[j].visible)cell.classList.add("wfu_item_visible");
327
+ else cell.classList.remove("wfu_item_visible");var itemlabel=document.createElement("LABEL");itemlabel.className="wfu_conquestion_itemlabel";if(qitems[j].label==""){itemlabel.classList.add("wfu_empty_label");itemlabel.innerHTML="{no label}"}else{itemlabel.classList.remove("wfu_empty_label");itemlabel.innerHTML=qitems[j].label}if(question.type=="prompt")cell.appendChild(itemlabel);else{var itembox=document.createElement("INPUT");itembox.className="wfu_conquestion_itembox wfu_frozen";itembox.type=question.type;
328
+ itembox.checked=qitems[j].preselect;if(qitems[j].location=="top"){cell.appendChild(itemlabel);cell.appendChild(document.createElement("BR"));cell.appendChild(itembox)}else if(qitems[j].location=="left"){cell.appendChild(itemlabel);cell.appendChild(itembox)}else if(qitems[j].location=="bottom"){cell.appendChild(itembox);cell.appendChild(document.createElement("BR"));cell.appendChild(itemlabel)}else{cell.appendChild(itembox);cell.appendChild(itemlabel)}}j++}}if(question.title==""){displayedtitle.classList.add("wfu_empty_label");
329
+ displayedtitle.innerHTML="{no title}"}else{displayedtitle.classList.remove("wfu_empty_label");displayedtitle.innerHTML=question.title}if(question.location!="bottom")itemspreview.insertBefore(displayedtitle,itemtable);else itemspreview.insertBefore(displayedtitle,null)}
330
+ function wfu_conquestion_mainprops_handler(e){if(wfu_allops_freeze_events)return;var policy=wfu_get_consent_policy();if(!policy)return;e=e||window.event;var item=par=e.target;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var i=parseInt(par.id.replace("wfu_conquestion_container_",""));var index=i-1;var question=policy.questions[index];var recreate=true;var is_mainprop=true;var update_optable=false;if(item.classList.contains("wfu_conquestion_titletext"))question.title=
331
+ item.value;else if(item.classList.contains("wfu_conquestion_matrix_x"))question.x=item.value;else if(item.classList.contains("wfu_conquestion_matrix_y"))question.y=item.value;else if(item.classList.contains("wfu_conquestion_titlelocationlist"))question.location=item.value;else if(item.classList.contains("wfu_conquestion_groupedbox")){question.grouped=item.checked?1:0;if(question.grouped==1){var qpreselect_count=0;for(var j=0;j<question.items.length;j++)if(qpreselect_count==1)question.items[j].preselect=
332
+ 0;else if(question.items[j].preselect==1)qpreselect_count++}}else if(item.classList.contains("wfu_conquestion_typelist")){question.type=item.value;if(question.type=="prompt"){question.x=1;question.y=1;question.title="";question.location="top";question.grouped=0}}else{var itemcontainers=document.querySelectorAll("#wfu_conquestion_container_"+i+" .wfu_conquestion_itemcontainer.wfu_item_selected");if(itemcontainers.length==0)return;var itemindex=itemcontainers[0].parentNode.rowIndex*itemcontainers[0].parentNode.cells.length+
333
+ itemcontainers[0].cellIndex+1;var qitem=null;var qindex=question.items.length;for(var j=0;j<question.items.length;j++)if(question.items[j].index==itemindex){qitem=question.items[j];break}else if(question.items[j].index>itemindex){qindex=j;break}if(!qitem){qitem={index:itemindex,label:"",location:"right",preselect:false,visible:1,operations:{}};question.items.splice(qindex,0,qitem)}if(item.classList.contains("wfu_conquestion_labeltext"))qitem.label=item.value;else if(item.classList.contains("wfu_conquestion_labellocationlist"))qitem.location=
334
+ item.value;else if(item.classList.contains("wfu_conquestion_preselectedbox")){if(item.checked&&question.grouped==1)for(var j=0;j<question.items.length;j++)question.items[j].preselect=0;qitem.preselect=item.checked?1:0}else if(item.classList.contains("wfu_conquestion_visiblebox")){qitem.visible=item.checked?1:0;update_optable=true}recreate=false;is_mainprop=false}wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_update_consent_question(index,recreate);if(is_mainprop){wfu_update_consent_question_itemprops(index,
335
+ -1);wfu_consent_question_operations_reassign()}if(update_optable){wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(i,itemindex)}wfu_allops_freeze_events=false}
336
  function wfu_conquestion_itempreviewer_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=par=e.target;var qcount=document.querySelectorAll(".wfu_conquestion_container").length;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var i=parseInt(par.id.replace("wfu_conquestion_container_",""));var index=i-1;if(!item.classList.contains("wfu_conquestion_itemcontainer"))item=item.parentNode;var itemindex=-1;if(item.classList.contains("wfu_conquestion_itemcontainer"))itemindex=
337
  item.parentNode.rowIndex*item.parentNode.cells.length+item.cellIndex+1;wfu_allops_freeze_events=true;for(var j=0;j<qcount;j++)wfu_update_consent_question_itemprops(j,-1);wfu_update_consent_question_itemprops(index,itemindex);wfu_allops_freeze_events=false}
338
  function wfu_update_consent_question_itemprops(index,itemindex){var policy=wfu_get_consent_policy();if(!policy)return;var question=policy.questions[index];var i=index+1;var itemcontainers=document.querySelectorAll("#wfu_conquestions_container .wfu_conquestion_itemcontainer");var itemcontainer=null;var contindex=0;var contitemindex=1;for(var j=0;j<itemcontainers.length;j++){itemcontainers[j].classList.remove("wfu_item_selected");var par=itemcontainers[j];while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));
339
  if(parseInt(par.id.replace("wfu_conquestion_container_",""))>contindex){contindex++;contitemindex=1}if(contindex==i&&contitemindex==itemindex)itemcontainer=itemcontainers[j];contitemindex++}if(itemcontainer)itemcontainer.classList.add("wfu_item_selected");var labeltext=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_labeltext");var labellocationlist=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_labellocationlist");var preselectedbox=document.querySelector("#wfu_conquestion_container_"+
340
+ i+" .wfu_conquestion_preselectedbox");var visiblebox=document.querySelector("#wfu_conquestion_container_"+i+" .wfu_conquestion_visiblebox");var qindex=-1;for(var j=0;j<question.items.length;j++)if(question.items[j].index==itemindex){qindex=j;break}if(qindex<0){labeltext.value="";labeltext.disabled=itemindex<1;labellocationlist.value="right";labellocationlist.disabled=itemindex<1;preselectedbox.checked=false;preselectedbox.disabled=itemindex<1;visiblebox.checked=true;visiblebox.disabled=itemindex<
341
+ 1}else{labeltext.disabled=false;labeltext.value=question.items[qindex].label;labellocationlist.disabled=question.type=="prompt";labellocationlist.value=question.type=="prompt"?"":question.items[qindex].location;preselectedbox.disabled=question.type=="prompt";preselectedbox.checked=question.type=="prompt"?false:question.items[qindex].preselect==1;visiblebox.disabled=question.type=="prompt"?true:index==0&&itemindex==1;visiblebox.checked=question.type=="prompt"?true:typeof question.items[qindex].visible==
342
+ "undefined"||question.items[qindex].visible==1}wfu_consent_question_optable_update(i,itemindex)}
343
+ function wfu_consent_question_optable_recreate(){var oplist=[];var policy=wfu_get_consent_policy();if(policy){if(typeof wfu_PD_bank.conops!="undefined")for(var id in wfu_PD_bank.conops)if(wfu_PD_bank.conops.hasOwnProperty(id))wfu_PD_bank.conops[id].active=false;var optable=document.getElementById("wfu_conquestions_optable");var body=optable.tBodies[0];while(body.rows.length>0)optable.rows[0].remove();var i=0;for(var id in wfu_PD_bank.allowedstatus)if(wfu_PD_bank.allowedstatus.hasOwnProperty(id)){var included=
344
+ true;included=included&&(policy.children_index[id].length==0&&(wfu_PD_bank.params.oplevels<1||wfu_PD_bank.level[id]<=wfu_PD_bank.params.oplevels)||policy.children_index[id].length>0&&wfu_PD_bank.level[id]==wfu_PD_bank.params.oplevels);included=included&&wfu_PD_bank.needsconsentstatus[id]==1;included=included&&wfu_PD_bank.visible[id];if(included){if(typeof wfu_PD_bank.conops=="undefined")wfu_PD_bank.conops={};wfu_PD_bank.conops[id]={active:true,qindex:[1],itemindex:[1],inverse:[false],unassigned:true,
345
+ nonevisible:false};var row=body.insertRow(i);row.id="wfu_conquestions_oprow_"+id;var cell=row.insertCell(0);var name=policy.operations[id].Name;var parid=id;while((parid=policy.operations[parid].Parent)>0)name=policy.operations[parid].Name+"/"+name;cell.innerHTML=name;var cell=row.insertCell(1);var selbox=document.createElement("INPUT");selbox.type="radio";selbox.className="wfu_conquestions_opsel wfu_frozen";wfu_addEventHandler(selbox,"click",wfu_conquestion_optable_handler);cell.appendChild(selbox);
346
  var cell=row.insertCell(2);var invbox=document.createElement("INPUT");invbox.type="checkbox";invbox.className="wfu_conquestions_opinv wfu_frozen";invbox.disabled=true;wfu_addEventHandler(invbox,"change",wfu_conquestion_optable_handler);cell.appendChild(invbox);i++}}}}
347
+ function wfu_consent_question_operations_reassign(){var policy=wfu_get_consent_policy();if(policy){for(var opid in wfu_PD_bank.conops)if(wfu_PD_bank.conops.hasOwnProperty(opid)){wfu_PD_bank.conops[opid].qindex=[];wfu_PD_bank.conops[opid].itemindex=[];wfu_PD_bank.conops[opid].inverse=[];wfu_PD_bank.conops[opid].unassigned=true;wfu_PD_bank.conops[opid].nonevisible=true}for(var i=0;i<policy.questions.length;i++){var question=policy.questions[i];for(var j=0;j<question.items.length;j++){var qitem=question.items[j];
348
+ for(var opid in qitem.operations)if(qitem.operations.hasOwnProperty(opid))if(typeof wfu_PD_bank.conops[opid]!="undefined")if(wfu_PD_bank.params.multi_op_assignments||wfu_PD_bank.conops[opid].qindex.length==0){wfu_PD_bank.conops[opid].qindex.push(i+1);wfu_PD_bank.conops[opid].itemindex.push(j+1);wfu_PD_bank.conops[opid].inverse.push(qitem.operations[opid]==-1);wfu_PD_bank.conops[opid].unassigned=false}else delete qitem.operations[opid]}}for(var opid in wfu_PD_bank.conops)if(wfu_PD_bank.conops.hasOwnProperty(opid)){var j=
349
+ 0;while(j<wfu_PD_bank.conops[opid].qindex.length){var qindex=wfu_PD_bank.conops[opid].qindex[j];var itemindex=wfu_PD_bank.conops[opid].itemindex[j];var remove=false;if(qindex<1||qindex>policy.questions.length)remove=true;else{var question=policy.questions[qindex-1];var qnum=question.x*question.y;if(itemindex<1||itemindex>qnum)remove=true}if(remove){wfu_PD_bank.conops[opid].qindex.splice(j,1);wfu_PD_bank.conops[opid].itemindex.splice(j,1);wfu_PD_bank.conops[opid].inverse.splice(j,1)}else{var qitem=
350
+ policy.questions[qindex-1].items[itemindex-1];if(typeof qitem.visible=="undefined"||qitem.visible)wfu_PD_bank.conops[opid].nonevisible=false;j++}}if(wfu_PD_bank.conops[opid].nonevisible){wfu_PD_bank.conops[opid].unassigned=wfu_PD_bank.conops[opid].qindex.length==0;wfu_PD_bank.conops[opid].qindex.splice(0,0,1);wfu_PD_bank.conops[opid].itemindex.splice(0,0,1);wfu_PD_bank.conops[opid].inverse.splice(0,0,false)}}wfu_set_consent_policy(policy);wfu_update_consent_question_item_assignments()}}
351
+ function wfu_update_consent_question_item_assignments(){var containers=document.querySelectorAll("#wfu_conquestions_container .wfu_conquestion_itemcontainer");for(var i=0;i<containers.length;i++)containers[i].classList.remove("wfu_item_assigned");for(var opid in wfu_PD_bank.conops)if(wfu_PD_bank.conops.hasOwnProperty(opid)&&wfu_PD_bank.conops[opid].active)for(var j=0;j<wfu_PD_bank.conops[opid].qindex.length;j++){var qindex=wfu_PD_bank.conops[opid].qindex[j];var itemindex=wfu_PD_bank.conops[opid].itemindex[j];
352
+ var itemtable=document.querySelector("#wfu_conquestion_container_"+qindex+" .wfu_conquestion_itemtable");var x=itemtable.rows[0].cells.length;var rowindex=Math.floor((itemindex-1)/x);var cellindex=(itemindex-1)%x;itemtable.rows[rowindex].cells[cellindex].classList.add("wfu_item_assigned")}}
353
+ function wfu_conquestion_conop_bankpos(opid,index,itemindex){var pos=-1;for(var i=0;i<wfu_PD_bank.conops[opid].qindex.length;i++)if(wfu_PD_bank.conops[opid].qindex[i]==index&&wfu_PD_bank.conops[opid].itemindex[i]==itemindex){pos=i;break}return pos}
354
+ function wfu_consent_question_optable_update(index,itemindex){var freeze=index<1||itemindex<1;for(var opid in wfu_PD_bank.conops)if(wfu_PD_bank.conops.hasOwnProperty(opid)&&wfu_PD_bank.conops[opid].active){var oprow=document.getElementById("wfu_conquestions_oprow_"+opid);var selbox=document.querySelector("#wfu_conquestions_oprow_"+opid+" .wfu_conquestions_opsel");var invbox=document.querySelector("#wfu_conquestions_oprow_"+opid+" .wfu_conquestions_opinv");if(wfu_PD_bank.conops[opid].unassigned||wfu_PD_bank.conops[opid].nonevisible)oprow.classList.add("wfu_op_unassigned");
355
+ else oprow.classList.remove("wfu_op_unassigned");var pos=wfu_conquestion_conop_bankpos(opid,index,itemindex);selbox.checked=!freeze&&pos>-1;if(!freeze&&pos>-1&&(wfu_PD_bank.conops[opid].unassigned||wfu_PD_bank.conops[opid].nonevisible)&&index==1&&itemindex==1)selbox.classList.add("wfu_forced_selection");else selbox.classList.remove("wfu_forced_selection");invbox.checked=!freeze&&pos>-1&&wfu_PD_bank.conops[opid].inverse[pos];invbox.disabled=!(!freeze&&pos>-1);if(freeze){selbox.classList.add("wfu_frozen");
356
+ invbox.classList.add("wfu_frozen")}else{selbox.classList.remove("wfu_frozen");invbox.classList.remove("wfu_frozen")}}}
357
  function wfu_conquestion_optable_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;var itemcontainer=document.querySelector("#wfu_conquestions_container .wfu_conquestion_itemcontainer.wfu_item_selected");if(!itemcontainer)return;var par=itemcontainer;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var index=parseInt(par.id.replace("wfu_conquestion_container_",""));var itemcontainers=document.querySelectorAll("#wfu_conquestion_container_"+
358
+ index+" .wfu_conquestion_itemcontainer");var itemindex=-1;for(var j=0;j<itemcontainers.length;j++)if(itemcontainers[j]==itemcontainer){itemindex=j+1;break}var policy=wfu_get_consent_policy();if(!policy)return;if(!item.classList.contains("wfu_conquestions_opsel")&&!item.classList.contains("wfu_conquestions_opinv"))return;var opid=parseInt(item.parentNode.parentNode.id.replace("wfu_conquestions_oprow_",""));var opas=wfu_PD_bank.conops[opid];var pos=wfu_conquestion_conop_bankpos(opid,index,itemindex);
359
+ if(pos<0||opas.unassigned){if(!wfu_PD_bank.params.multi_op_assignments||opas.unassigned){var question=policy.questions[opas.qindex[0]-1];for(var j=0;j<question.items.length;j++)if(question.items[j].index==opas.itemindex[0]){if(typeof question.items[j].operations[opid]!="undefined")delete question.items[j].operations[opid];break}opas.qindex.splice(0,1);opas.itemindex.splice(0,1);opas.inverse.splice(0,1)}opas.qindex.push(index);opas.itemindex.push(itemindex);opas.inverse.push(document.querySelector("#wfu_conquestions_oprow_"+
360
+ opid+" .wfu_conquestions_opinv").checked);opas.unassigned=false;pos=opas.qindex.length-1;var question=policy.questions[opas.qindex[pos]-1];var qitem=null;var qindex=question.items.length;for(var j=0;j<question.items.length;j++)if(question.items[j].index==opas.itemindex[pos]){qitem=question.items[j];qitem.operations[opid]=opas.inverse[pos]?-1:1;break}else if(question.items[j].index>itemindex){qindex=j;break}if(!qitem){qitem={index:opas.itemindex[pos],label:"",location:"right",preselect:false,operations:{}};
361
+ qitem.operations[opid]=opas.inverse[pos]?-1:1;question.items.splice(qindex,0,qitem)}wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(index,itemindex);wfu_update_consent_question_item_assignments();wfu_allops_freeze_events=false}else if(item.classList.contains("wfu_conquestions_opsel")&&pos>=0){var question=policy.questions[opas.qindex[pos]-1];for(var j=0;j<question.items.length;j++)if(question.items[j].index==
362
+ opas.itemindex[pos]){if(typeof question.items[j].operations[opid]!="undefined")delete question.items[j].operations[opid];break}opas.qindex.splice(pos,1);opas.itemindex.splice(pos,1);opas.inverse.splice(pos,1);wfu_set_consent_policy(policy);wfu_allops_freeze_events=true;item.checked=false;wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(index,itemindex);wfu_update_consent_question_item_assignments();wfu_allops_freeze_events=false}else if(item.classList.contains("wfu_conquestions_opinv")){opas.inverse[pos]=
363
+ item.checked;var question=policy.questions[opas.qindex[pos]-1];for(var j=0;j<question.items.length;j++)if(question.items[j].index==opas.itemindex[pos]){question.items[j].operations[opid]=opas.inverse[pos]?-1:1;break}wfu_set_consent_policy(policy)}}
364
  function wfu_conquestion_tools_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;var qcount=document.querySelectorAll(".wfu_conquestion_container").length;var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_conquestion_container"));var index=parseInt(par.id.replace("wfu_conquestion_container_",""))-1;wfu_allops_freeze_events=true;var action="";if(item.classList.contains("wfu_conquestion_add"))action="add";else if(item.classList.contains("wfu_conquestion_remove")&&
365
  qcount>1)action="remove";else if(item.classList.contains("wfu_conquestion_up")&&index>0)action="up";else if(item.classList.contains("wfu_conquestion_down")&&index<qcount-1)action="down";if(action!=""){wfu_update_consent_question_itemprops(0,-1);wfu_consent_question_action(action,index);wfu_consent_question_operations_reassign();wfu_consent_question_optable_update(0,0);wfu_update_conquestion_header()}wfu_allops_freeze_events=false}
366
  function wfu_update_conquestion_header(){var labels=document.querySelectorAll(".wfu_conquestion_headerlabel");var add_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_add");var remove_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_remove");var up_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_up");var down_btns=document.querySelectorAll(".wfu_conquestion_tools .wfu_conquestion_btn.wfu_conquestion_down");
367
  for(var i=0;i<labels.length;i++){labels[i].innerHTML="Question "+(i+1);if(labels.length>1)remove_btns[i].classList.remove("wfu_tool_disabled");else remove_btns[i].classList.add("wfu_tool_disabled");if(i>0)up_btns[i].classList.remove("wfu_tool_disabled");else up_btns[i].classList.add("wfu_tool_disabled");if(i<labels.length-1)down_btns[i].classList.remove("wfu_tool_disabled");else down_btns[i].classList.add("wfu_tool_disabled")}}
368
  function wfu_permissions_update(updatehtml){function _wfu_nested_perms_update(item,level){var id=item.ID;if(item.children.length>0){policy.permissions[id].allowedstatus={};for(var j=0;j<item.children.length;j++){_wfu_nested_perms_update(item.children[j],level+1);var id2=item.children[j].ID;for(var locid in policy.permissions[id2].allowedstatus)if(policy.permissions[id2].allowedstatus.hasOwnProperty(locid)){var allowedstatus2=policy.permissions[id2].allowedstatus[locid];if(typeof policy.permissions[id].allowedstatus[locid]==
369
+ "undefined")policy.permissions[id].allowedstatus[locid]=allowedstatus2;else if(policy.permissions[id].allowedstatus[locid]*allowedstatus2<1)policy.permissions[id].allowedstatus[locid]=0}}}else{var allowed=policy.permissions[id].Allowed;policy.permissions[id].allowedstatus={};for(var k=0;k<policy.permissions[id].Locations.length;k++){var locid=policy.permissions[id].Locations[k];policy.permissions[id].allowedstatus[locid]=allowed.indexOf(locid)>-1?1:-1}}if(typeof wfu_PD_bank.perallowedstatus=="undefined")wfu_PD_bank.perallowedstatus=
370
+ {};wfu_PD_bank.perallowedstatus[id]=policy.permissions[id].allowedstatus;if(updatehtml){var row=document.getElementById("wfu_perm_row_"+id);for(var locid in policy.permissions[id].allowedstatus)if(policy.permissions[id].allowedstatus.hasOwnProperty(locid)){var check=document.querySelector("#wfu_perm_row_"+id+" .wfu_location_cell:nth-child("+(parseInt(locid)+1)+") input");wfu_set_checkbox_status(check,policy.permissions[id].allowedstatus[locid])}}}var policy=wfu_get_permissions_policy();if(policy){console.log(policy);
371
+ wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_perms_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
372
  function wfu_adjust_permissions_levels(){function _wfu_force_permission_update_nested(item,locid){var id=item.ID;if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_force_permission_update_nested(item.children[j],locid);else if(policy.permissions[id].Allowed.indexOf(locid)==-1&&policy.permissions[id].Locations.indexOf(locid)>-1)policy.permissions[id].Allowed.push(locid)}function _wfu_nested_adjust_permissions_levels(item,level){if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_nested_adjust_permissions_levels(item.children[j],
373
+ level+1);var id=item.ID;for(var locid in wfu_PD_bank.perallowedstatus[id])if(wfu_PD_bank.perallowedstatus[id].hasOwnProperty(locid))if(wfu_PD_bank.perallowedstatus[id][locid]==0&&level==wfu_PD_bank.params.perlevels){_wfu_force_permission_update_nested(item,parseInt(locid));wfu_PD_bank.perallowedstatus[id][locid]=1;policy_needs_update=true}}wfu_permissions_update(false);var policy=wfu_get_permissions_policy();if(policy){var policy_needs_update=false;for(var i=0;i<policy.structure.length;i++)_wfu_nested_adjust_permissions_levels(policy.structure[i],
374
  1);if(policy_needs_update)wfu_set_permissions_policy(policy)}}
375
  function wfu_perm_toggle(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_location_selector"))return;var id=obj.parentNode.parentNode.id.replace("wfu_perm_row_","");var locid=obj.parentNode.cellIndex;var policy=wfu_get_permissions_policy();if(policy){if(typeof policy.permissions[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)obj.classList.remove("indeterminate");
376
+ if(policy.children_index[id].length>0){var level=1;var parid=id;while((parid=policy.permissions[parid].Parent)>0)level++;if((wfu_PD_bank.params.perlevels<1||level<wfu_PD_bank.params.perlevels)&&!confirm("This will make all children permissions "+(new_status?"allowed":"not allowed")+". Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];if(policy.children_index[id2].length==
377
+ 0){var locindex2=policy.permissions[id2].Allowed.indexOf(locid);if(new_status&&locindex2==-1&&policy.permissions[id2].Locations.indexOf(locid)>-1)policy.permissions[id2].Allowed.push(locid);else if(!new_status&&locindex2>-1)policy.permissions[id2].Allowed.splice(locindex2,1)}}}else{var locindex=policy.permissions[id].Allowed.indexOf(locid);if(new_status&&locindex==-1&&policy.permissions[id].Locations.indexOf(locid)>-1)policy.permissions[id].Allowed.push(locid);else if(!new_status&&locindex>-1)policy.permissions[id].Allowed.splice(locindex,
378
+ 1)}wfu_set_permissions_policy(policy);wfu_allops_freeze_events=true;wfu_permissions_update(true);wfu_allops_freeze_events=false}}
379
  function wfu_perm_button_action(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_perm_button"))return;var policy=wfu_get_permissions_policy();if(policy){var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_perm_row"));var id=parseInt(par.id.replace("wfu_perm_row_",""));obj.classList.toggle("expanded");for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];var parid=id2;var visible=true;while((parid=policy.permissions[parid].Parent)>
380
  0)visible=visible&&document.querySelector("#wfu_perm_row_"+parid+" .wfu_perm_button")&&document.querySelector("#wfu_perm_row_"+parid+" .wfu_perm_button").classList.contains("expanded");document.getElementById("wfu_perm_row_"+id2).style.display=visible?"table-row":"none"}}}
381
  function wfu_logactions_update(updatehtml){function _wfu_nested_logactions_update(item,level){var id=item.ID;if(item.children.length>0){policy.logactions[id].allowedstatus={};for(var j=0;j<item.children.length;j++){_wfu_nested_logactions_update(item.children[j],level+1);var id2=item.children[j].ID;for(var entid in policy.logactions[id2].allowedstatus)if(policy.logactions[id2].allowedstatus.hasOwnProperty(entid)){var allowedstatus2=policy.logactions[id2].allowedstatus[entid];if(typeof policy.logactions[id].allowedstatus[entid]==
382
+ "undefined")policy.logactions[id].allowedstatus[entid]=allowedstatus2;else if(policy.logactions[id].allowedstatus[entid]*allowedstatus2<1)policy.logactions[id].allowedstatus[entid]=0}}}else{var allowed=policy.logactions[id].Allowed;policy.logactions[id].allowedstatus={};for(var k=0;k<policy.logactions[id].Entities.length;k++){var entid=policy.logactions[id].Entities[k];policy.logactions[id].allowedstatus[entid]=allowed.indexOf(entid)>-1?1:-1}}if(typeof wfu_PD_bank.logallowedstatus=="undefined")wfu_PD_bank.logallowedstatus=
383
+ {};wfu_PD_bank.logallowedstatus[id]=policy.logactions[id].allowedstatus;if(updatehtml){var row=document.getElementById("wfu_log_row_"+id);for(var entid in policy.logactions[id].allowedstatus)if(policy.logactions[id].allowedstatus.hasOwnProperty(entid)){var check=document.querySelector("#wfu_log_row_"+id+" .wfu_entity_cell:nth-child("+(parseInt(entid)+1)+") input");wfu_set_checkbox_status(check,policy.logactions[id].allowedstatus[entid])}}}var policy=wfu_get_logactions_policy();if(policy){console.log(policy);
384
  wfu_allops_freeze_events=true;for(var i=0;i<policy.structure.length;i++)_wfu_nested_logactions_update(policy.structure[i],1);wfu_allops_freeze_events=false}}
385
  function wfu_adjust_logactions_levels(){function _wfu_force_logaction_update_nested(item,entid){var id=item.ID;if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_force_logaction_update_nested(item.children[j],entid);else if(policy.logactions[id].Allowed.indexOf(entid)==-1&&policy.logactions[id].Entities.indexOf(entid)>-1)policy.logactions[id].Allowed.push(entid)}function _wfu_nested_adjust_logactions_levels(item,level){if(item.children.length>0)for(var j=0;j<item.children.length;j++)_wfu_nested_adjust_logactions_levels(item.children[j],
386
+ level+1);var id=item.ID;for(var entid in wfu_PD_bank.logallowedstatus[id])if(wfu_PD_bank.logallowedstatus[id].hasOwnProperty(entid))if(wfu_PD_bank.logallowedstatus[id][entid]==0&&level==wfu_PD_bank.params.loglevels){_wfu_force_logaction_update_nested(item,parseInt(entid));wfu_PD_bank.logallowedstatus[id][entid]=1;policy_needs_update=true}}wfu_logactions_update(false);var policy=wfu_get_logactions_policy();if(policy){var policy_needs_update=false;for(var i=0;i<policy.structure.length;i++)_wfu_nested_adjust_logactions_levels(policy.structure[i],
387
  1);if(policy_needs_update)wfu_set_logactions_policy(policy)}}
388
  function wfu_log_toggle(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_entity_selector"))return;var id=obj.parentNode.parentNode.id.replace("wfu_log_row_","");var entid=obj.parentNode.cellIndex;var policy=wfu_get_logactions_policy();if(policy){if(typeof policy.logactions[id]=="undefined")return;var prev_status=obj.classList.contains("indeterminate")?0:obj.checked?-1:1;var new_status=obj.classList.contains("indeterminate")?true:obj.checked;if(!obj.indeterminate)obj.classList.remove("indeterminate");
389
+ if(policy.children_index[id].length>0){var level=1;var parid=id;while((parid=policy.logactions[parid].Parent)>0)level++;if((wfu_PD_bank.params.loglevels<1||level<wfu_PD_bank.params.loglevels)&&!confirm("This will make all children log actions "+(new_status?"allowed":"not allowed")+". Continue?")){wfu_allops_freeze_events=true;wfu_set_checkbox_status(obj,prev_status);wfu_allops_freeze_events=false;return}for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];if(policy.children_index[id2].length==
390
+ 0){var entindex2=policy.logactions[id2].Allowed.indexOf(entid);if(new_status&&entindex2==-1&&policy.logactions[id2].Entities.indexOf(entid)>-1)policy.logactions[id2].Allowed.push(entid);else if(!new_status&&entindex2>-1)policy.logactions[id2].Allowed.splice(entindex2,1)}}}else{var entindex=policy.logactions[id].Allowed.indexOf(entid);if(new_status&&entindex==-1&&policy.logactions[id].Entities.indexOf(entid)>-1)policy.logactions[id].Allowed.push(entid);else if(!new_status&&entindex>-1)policy.logactions[id].Allowed.splice(entindex,
391
+ 1)}wfu_set_logactions_policy(policy);wfu_allops_freeze_events=true;wfu_logactions_update(true);wfu_allops_freeze_events=false}}
392
  function wfu_log_button_action(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_log_button"))return;var policy=wfu_get_logactions_policy();if(policy){var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_log_row"));var id=parseInt(par.id.replace("wfu_log_row_",""));obj.classList.toggle("expanded");for(var i=0;i<policy.children_index[id].length;i++){var id2=policy.children_index[id][i];var parid=id2;var visible=true;while((parid=policy.logactions[parid].Parent)>
393
  0)visible=visible&&document.querySelector("#wfu_log_row_"+parid+" .wfu_log_button")&&document.querySelector("#wfu_log_row_"+parid+" .wfu_log_button").classList.contains("expanded");document.getElementById("wfu_log_row_"+id2).style.display=visible?"table-row":"none"}}}
394
  function wfu_pdusers_addrole_handler(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_pdusers_roles_add"))return;var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_roles_container"));var type=par.id.replace(/^wfu_pdusers_roles_(in|out)_container$/,"$1");var roles=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_list");var names=[];for(var i=0;i<roles.options.length;i++)if(roles.options[i].selected)names.push(roles.options[i].value);
395
  wfu_allops_freeze_events=true;wfu_pdusers_add_roles(type,names);wfu_allops_freeze_events=false}
396
  function wfu_pdusers_add_roles(type,names){var show=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_show");var roles=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_list");var selected=document.querySelectorAll("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_rightpanel .wfu_pdusers_roles_role");var source=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]').checked?"in":"out";var btype=type=="in"?
397
+ "included":"excluded";var count=selected.length;for(var i=0;i<names.length;i++){var title="";if(names[i]=="all")title="All";else for(var j=0;j<roles.options.length;j++)if(roles.options[j].value==names[i]){title=roles.options[j].innerHTML;break}if(title!=""){var already_in=false;for(var j=0;j<selected.length;j++)if(selected[j].roleName==names[i]){already_in=true;break}if(!already_in){var pos=wfu_PD_bank.pdusers.rolestates[source][btype].indexOf(names[i]);if(pos==-1)wfu_PD_bank.pdusers.rolestates[source][btype].push(names[i]);
398
+ if(count>0)show.appendChild(document.createElement("BR"));var role=document.createElement("DIV");role.classList.add("wfu_pdusers_roles_role");role.roleName=names[i];role.innerHTML=title;if(names[i]=="all")role.classList.add("wfu_pdusers_roles_all");else{var delbtn=document.createElement("SPAN");wfu_addEventHandler(delbtn,"click",wfu_pdusers_removerole_handler);role.appendChild(delbtn)}show.appendChild(role);count++}}}}
399
  function wfu_pdusers_clear_roles(type){var show=document.querySelector("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_show");var selected=document.querySelectorAll("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_rightpanel .wfu_pdusers_roles_role");var brs=document.querySelectorAll("#wfu_pdusers_roles_"+type+"_container .wfu_pdusers_roles_rightpanel br");for(var i=0;i<selected.length;i++)show.removeChild(selected[i]);for(var i=0;i<brs.length;i++)show.removeChild(brs[i])}
400
+ function wfu_pdusers_removerole_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;if(!item.parentNode.classList.contains("wfu_pdusers_roles_role"))return;var role=item.parentNode.roleName;var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_roles_container"));var type=par.id.replace(/^wfu_pdusers_roles_(in|out)_container$/,"$1");var source=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]').checked?"in":"out";var btype=
401
+ type=="in"?"included":"excluded";var pos=wfu_PD_bank.pdusers.rolestates[source][btype].indexOf(role);if(pos>-1)wfu_PD_bank.pdusers.rolestates[source][btype].splice(pos,1);var br1=item.parentNode.previousSibling;var br2=item.parentNode.nextSibling;var show=document.querySelector("#"+par.id+" .wfu_pdusers_roles_show");wfu_allops_freeze_events=true;show.removeChild(item.parentNode);if(br1&&br1.tagName&&br1.tagName=="BR")show.removeChild(br1);else if(br2&&br2.tagName&&br2.tagName=="BR")show.removeChild(br2);
402
+ wfu_allops_freeze_events=false}
403
+ function wfu_pdusers_update(){var pd_users=wfu_get_pd_users();if(pd_users){console.log(pd_users);wfu_PD_bank.pdusers={rolestates:{"in":{included:[],excluded:[]},out:{included:["all"],excluded:[]}}};var userin_input=document.querySelector('#wfu_pdusers_users_in_container .wfu_pdusers_users_leftpanel input[type="text"]');wfu_attach_element_handlers(userin_input,wfu_pdusers_get_users);var userout_input=document.querySelector('#wfu_pdusers_users_out_container .wfu_pdusers_users_leftpanel input[type="text"]');wfu_attach_element_handlers(userout_input,
404
+ wfu_pdusers_get_users);wfu_PD_bank.pdusers.userinput={"in":{prev_value:""},out:{prev_value:""},xhr:null};var radioin=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]');var rolein_list=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_list");var rolein_back=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_back");var radioout=document.querySelector('#wfu_pdusers_roles_out_container input[type="radio"]');var roleout_list=document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_list");
405
+ var roleout_back=document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_back");if(pd_users.roles_included.length>0&&pd_users.roles_included[0]!="all"||pd_users.roles_excluded.length==1&&pd_users.roles_excluded[0]=="all"||pd_users.roles_included.length==0&&pd_users.roles_excluded.length==0){wfu_PD_bank.pdusers.rolestates["in"].included=pd_users.roles_included;rolein_list.disabled=false;rolein_back.classList.add("active");roleout_list.disabled=true;roleout_back.classList.remove("active");
406
+ radioin.checked=true;wfu_pdusers_add_roles("in",pd_users.roles_included);wfu_pdusers_add_roles("out",[])}else{wfu_PD_bank.pdusers.rolestates.out.excluded=pd_users.roles_excluded;rolein_list.disabled=true;rolein_back.classList.remove("active");roleout_list.disabled=false;roleout_back.classList.add("active");radioout.checked=true;wfu_pdusers_add_roles("in",["all"]);wfu_pdusers_add_roles("out",pd_users.roles_excluded)}}}
407
+ function wfu_pdusers_roletype_handler(obj){if(wfu_allops_freeze_events)return;if(obj.name!="wfu_pdusers_roletypes")return;var radioin=document.querySelector('#wfu_pdusers_roles_in_container input[type="radio"]');var rolein_list=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_list");var rolein_back=document.querySelector("#wfu_pdusers_roles_in_container .wfu_pdusers_roles_back");var radioout=document.querySelector('#wfu_pdusers_roles_out_container input[type="radio"]');var roleout_list=
408
+ document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_list");var roleout_back=document.querySelector("#wfu_pdusers_roles_out_container .wfu_pdusers_roles_back");wfu_allops_freeze_events=true;wfu_pdusers_clear_roles("in");wfu_pdusers_clear_roles("out");if(obj.value=="include"){rolein_list.disabled=false;rolein_back.classList.add("active");roleout_list.disabled=true;roleout_back.classList.remove("active");radioin.checked=true;wfu_pdusers_add_roles("in",wfu_PD_bank.pdusers.rolestates["in"].included);
409
+ wfu_pdusers_add_roles("out",wfu_PD_bank.pdusers.rolestates["in"].excluded)}else{rolein_list.disabled=true;rolein_back.classList.remove("active");roleout_list.disabled=false;roleout_back.classList.add("active");radioout.checked=true;wfu_pdusers_add_roles("in",wfu_PD_bank.pdusers.rolestates.out.included);wfu_pdusers_add_roles("out",wfu_PD_bank.pdusers.rolestates.out.excluded)}wfu_allops_freeze_events=false}
410
+ function wfu_pdusers_adduser_handler(obj){if(wfu_allops_freeze_events)return;if(!obj.classList.contains("wfu_pdusers_users_add"))return;var par=obj;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_users_container"));var type=par.id.replace(/^wfu_pdusers_users_(in|out)_container$/,"$1");var users=document.querySelector("#wfu_pdusers_users_"+type+"_container .wfu_pdusers_users_list");var names=[];for(var i=0;i<users.options.length;i++)if(users.options[i].selected)names.push(users.options[i].value);
411
+ wfu_allops_freeze_events=true;wfu_pdusers_add_users(type,names);wfu_allops_freeze_events=false}
412
+ function wfu_pdusers_add_users(type,names){var show=document.querySelector("#wfu_pdusers_users_"+type+"_container .wfu_pdusers_users_show");var users=document.querySelector("#wfu_pdusers_users_"+type+"_container .wfu_pdusers_users_list");var selected=document.querySelectorAll("#wfu_pdusers_users_"+type+"_container .wfu_pdusers_users_rightpanel .wfu_pdusers_users_user");var otherselected=document.querySelectorAll("#wfu_pdusers_users_"+(type=="in"?"out":"in")+"_container .wfu_pdusers_users_rightpanel .wfu_pdusers_users_user");
413
+ var count=selected.length;for(var i=0;i<names.length;i++){var title="";for(var j=0;j<users.options.length;j++)if(users.options[j].value==names[i]){title=users.options[j].innerHTML;break}if(title!=""){var already_in=false;for(var j=0;j<selected.length;j++)if(selected[j].userName==names[i]){already_in=true;break}if(!already_in){if(count>0)show.appendChild(document.createElement("BR"));for(var j=0;j<otherselected.length;j++)if(otherselected[j].userName==names[i]){var prev_wfu_allops_freeze_events=wfu_allops_freeze_events;
414
+ wfu_allops_freeze_events=false;wfu_pdusers_removeuser_handler({target:otherselected[j].children[0]});wfu_allops_freeze_events=prev_wfu_allops_freeze_events;break}var user=document.createElement("DIV");user.classList.add("wfu_pdusers_users_user");user.userName=names[i];user.innerHTML=title;var delbtn=document.createElement("SPAN");wfu_addEventHandler(delbtn,"click",wfu_pdusers_removeuser_handler);user.appendChild(delbtn);show.appendChild(user);count++}}}}
415
+ function wfu_pdusers_removeuser_handler(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;if(!item.parentNode.classList.contains("wfu_pdusers_users_user"))return;var user=item.parentNode.userName;var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_users_container"));var type=par.id.replace(/^wfu_pdusers_users_(in|out)_container$/,"$1");var br1=item.parentNode.previousSibling;var br2=item.parentNode.nextSibling;var show=document.querySelector("#"+
416
+ par.id+" .wfu_pdusers_users_show");wfu_allops_freeze_events=true;show.removeChild(item.parentNode);if(br1&&br1.tagName&&br1.tagName=="BR")show.removeChild(br1);else if(br2&&br2.tagName&&br2.tagName=="BR")show.removeChild(br2);wfu_allops_freeze_events=false}
417
+ function wfu_pdusers_get_users(e){if(wfu_allops_freeze_events)return;e=e||window.event;var item=e.target;if(!item.parentNode.classList.contains("wfu_pdusers_users_leftpanel"))return;var par=item;while((par=par.parentElement)&&!par.classList.contains("wfu_pdusers_users_container"));var type=par.id.replace(/^wfu_pdusers_users_(in|out)_container$/,"$1");if(item.value==wfu_PD_bank.pdusers.userinput[type].prev_value)return;wfu_PD_bank.pdusers.userinput[type].prev_value=item.value;if(wfu_PD_bank.pdusers.xhr!=
418
+ null){wfu_PD_bank.pdusers.xhr.abort();wfu_PD_bank.pdusers.xhr=null}var userlist=document.querySelector("#wfu_pdusers_users_"+type+"_container .wfu_pdusers_users_list");if(item.value==""){var length=userlist.options.length;for(i=0;i<length;i++)userlist.options[0]=null;return}var xhr=wfu_GetHttpRequestObject();if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_pdusers_get_users";params[1]=new Array(2);params[1][0]=
419
+ "nonce";params[1][1]=document.getElementById("_wpnonce").value;params[2]=new Array(2);params[2][0]="query";params[2][1]=item.value;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);xhr.open("POST",url,true);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){var start_text="pdusers_get_users:";var pos=xhr.responseText.indexOf(start_text);
420
+ if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);var users_str=wfu_plugin_decode_string(response);var users=null;try{users=JSON.parse(users_str)}catch(e$2){}var length=userlist.options.length;for(i=0;i<length;i++)userlist.options[i]=null;for(i=0;i<users.length;i++){var opt=document.createElement("OPTION");opt.value=users[i].user_login;opt.innerHTML=users[i].display_name+
421
+ " ("+users[i].user_login+")";userlist.options.add(opt)}}};wfu_PD_bank.pdusers.xhr=xhr;xhr.send(parameters)}function wfu_initialize_consent_policy_basic(){wfu_PD_bank.userinput={prev_value:"",xhr:null,prev_select:-1};wfu_attach_element_handlers(document.getElementById("wfu_pd_user_box0"),wfu_pd_get_users_basic)}
422
+ function wfu_pd_get_users_basic(e){e=e||window.event;var item=e.target;if(!item.classList.contains("wfu_pd_user_box0"))return;if(item.value==wfu_PD_bank.userinput)return;var userlist=document.getElementById("wfu_pd_user_select0");wfu_PD_bank.userinput=item.value;if(wfu_PD_bank.userinput.xhr!=null){wfu_PD_bank.userinput.xhr.abort();wfu_PD_bank.userinput.xhr=null}if(item.value==""){var length=userlist.options.length;for(i=0;i<length;i++)userlist.options[0]=null;return}var xhr=wfu_GetHttpRequestObject();
423
  if(xhr==null)return;var url=AdminParams.wfu_ajax_url;params=new Array(3);params[0]=new Array(2);params[0][0]="action";params[0][1]="wfu_ajax_action_pdusers_get_users";params[1]=new Array(2);params[1][0]="nonce";params[1][1]=document.getElementById("_wpnonce").value;params[2]=new Array(2);params[2][0]="query";params[2][1]=item.value;var parameters="";for(var i=0;i<params.length;i++)parameters+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);xhr.open("POST",url,true);xhr.setRequestHeader("Content-type",
424
+ "application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4)if(xhr.status==200){var start_text="pdusers_get_users:";var pos=xhr.responseText.indexOf(start_text);if(pos==-1)pos=xhr.responseText.length;var messages=xhr.responseText.substr(0,pos);var response=xhr.responseText.substr(pos+start_text.length,xhr.responseText.length-pos-start_text.length);var users_str=wfu_plugin_decode_string(response);var users=null;try{users=JSON.parse(users_str)}catch(e$3){}var length=
425
+ userlist.options.length;for(i=0;i<length;i++)userlist.options[0]=null;for(i=0;i<users.length;i++){var opt=document.createElement("OPTION");opt.value=users[i].user_login;opt.innerHTML=users[i].display_name+" ("+users[i].user_login+")";userlist.options.add(opt)}}};wfu_PD_bank.userinput.xhr=xhr;xhr.send(parameters)}
426
  function wfu_export_user_data(){var userlist=document.getElementById("wfu_pd_user_select0");if(userlist.selectedIndex<0){alert("No user has been selected!");return}var params={username:userlist.options[userlist.selectedIndex].value};var params_str=JSON.stringify(params);wfu_download_file("exportdata:"+params_str,1)}
427
+ function wfu_erase_user_data_check(){var userlist=document.getElementById("wfu_pd_user_select0");var anchor=document.getElementById("wfu_erase_userdata0");if(userlist.selectedIndex<0){alert("No user has been selected!");return false}else{anchor.href=anchor.href.replace(/action=erase_userdata_ask.*$/,"action=erase_userdata_ask&username="+userlist.options[userlist.selectedIndex].value);return true}}
428
+ function wfu_pd_pre_save_actions(){var wfu_PD_bank_str=JSON.stringify(wfu_PD_bank);document.getElementById("wfu_PD_bank").value=wfu_plugin_encode_string(wfu_PD_bank_str)};
js/wordpress_file_upload_functions.js CHANGED
@@ -1,5 +1,5 @@
1
  GlobalData={};Code_Initializators=[];GlobalData.WFU={n:[]};GlobalData.WFUB={n:[]};GlobalData.filestatematch={};GlobalData.filestatematch.success=[0,1,2,2];GlobalData.filestatematch.warning=[1,1,2,2];GlobalData.filestatematch.error1=[3,3,2,3];GlobalData.filestatematch.error2=[2,2,2,3];GlobalData.UploadInProgressString="";GlobalData.FreeChangeHandler=false;wfu_Check_Browser_Capabilities();
2
- if(typeof wfu_js_decode_obj=="undefined")wfu_js_decode_obj=function(obj_str){var obj=null;if(obj_str=="window")obj=window;else{var match=obj_str.match(new RegExp("GlobalData(\\.(WFU|WFUB)\\[(.*?)\\](\\.(.*))?)?$"));if(match){obj=GlobalData;if(match[3])obj=obj[match[2]][match[3]];if(match[5])obj=obj[match[5]]}}return obj};
3
  function wfu_run_js_from_bank(){if(typeof WFU_JS_BANK!="undefined")while(WFU_JS_BANK.length>0){var obj=wfu_js_decode_obj(WFU_JS_BANK[0].obj_str);if(obj)obj[WFU_JS_BANK[0].func].call(obj);WFU_JS_BANK.splice(0,1)}}
4
  function wfu_Initialize_Consts(consts){if(typeof GlobalData.consts!="undefined")return;GlobalData.consts=new Object;var consts_arr=consts.split(";");var const_arr;for(var i=0;i<consts_arr.length;i++){const_txt=consts_arr[i].split(":");GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}
5
  function wfu_Load_Code_Connectors(sid){if(typeof wfu_Code_Objects=="undefined")wfu_Code_Objects={};wfu_Code_Objects[sid]=new wfu_Code_Object(sid);for(var i=0;i<Code_Initializators.length;i++)wfu_Code_Objects[sid].additem(Code_Initializators[i](sid))}
1
  GlobalData={};Code_Initializators=[];GlobalData.WFU={n:[]};GlobalData.WFUB={n:[]};GlobalData.filestatematch={};GlobalData.filestatematch.success=[0,1,2,2];GlobalData.filestatematch.warning=[1,1,2,2];GlobalData.filestatematch.error1=[3,3,2,3];GlobalData.filestatematch.error2=[2,2,2,3];GlobalData.UploadInProgressString="";GlobalData.FreeChangeHandler=false;wfu_Check_Browser_Capabilities();
2
+ if(typeof wfu_js_decode_obj=="undefined")wfu_js_decode_obj=function(obj_str){var obj=null;if(obj_str=="window")obj=window;else{var dbs=String.fromCharCode(92);var match=obj_str.match(new RegExp("GlobalData("+dbs+".(WFU|WFUB)"+dbs+"[(.*?)"+dbs+"]("+dbs+".(.*))?)?$"));if(match){obj=GlobalData;if(match[3])obj=obj[match[2]][match[3]];if(match[5])obj=obj[match[5]]}}return obj};
3
  function wfu_run_js_from_bank(){if(typeof WFU_JS_BANK!="undefined")while(WFU_JS_BANK.length>0){var obj=wfu_js_decode_obj(WFU_JS_BANK[0].obj_str);if(obj)obj[WFU_JS_BANK[0].func].call(obj);WFU_JS_BANK.splice(0,1)}}
4
  function wfu_Initialize_Consts(consts){if(typeof GlobalData.consts!="undefined")return;GlobalData.consts=new Object;var consts_arr=consts.split(";");var const_arr;for(var i=0;i<consts_arr.length;i++){const_txt=consts_arr[i].split(":");GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}
5
  function wfu_Load_Code_Connectors(sid){if(typeof wfu_Code_Objects=="undefined")wfu_Code_Objects={};wfu_Code_Objects[sid]=new wfu_Code_Object(sid);for(var i=0;i<Code_Initializators.length;i++)wfu_Code_Objects[sid].additem(Code_Initializators[i](sid))}
lib/wfu_blocks.php CHANGED
@@ -605,7 +605,8 @@ function wfu_prepare_consent_block($params, $additional_params, $occurrence_inde
605
  //initialize consent object properties
606
  $consent_item["js"] = "GlobalData.WFU[".$data["ID"]."].consent = { ".
607
  "consentCompleted: function() { return false; }, ".
608
- "attachActions: function(completeaction) {} ".
 
609
  "};\n\n".$consent_item["js"];
610
  //append javascript variable that checks if consent exists or not
611
  $consent_item["js"] .= "\n\nGlobalData.WFU[".$data["ID"]."].consent_exist = true;";
605
  //initialize consent object properties
606
  $consent_item["js"] = "GlobalData.WFU[".$data["ID"]."].consent = { ".
607
  "consentCompleted: function() { return false; }, ".
608
+ "attachActions: function(completeaction) {}, ".
609
+ "update: function(action) {} ".
610
  "};\n\n".$consent_item["js"];
611
  //append javascript variable that checks if consent exists or not
612
  $consent_item["js"] .= "\n\nGlobalData.WFU[".$data["ID"]."].consent_exist = true;";
lib/wfu_functions.php CHANGED
@@ -189,6 +189,16 @@ function wfu_sanitize_urls($urls, $separator) {
189
 
190
  function wfu_sanitize_shortcode($shortcode, $shortcode_tag) {
191
  $attrs = wfu_shortcode_string_to_array($shortcode);
 
 
 
 
 
 
 
 
 
 
192
  $sanitized_attrs = array();
193
  if ( $shortcode_tag == 'wordpress_file_upload' ) $defs = wfu_attribute_definitions();
194
  else $defs = wfu_browser_attribute_definitions();
@@ -254,12 +264,8 @@ function wfu_sanitize_shortcode($shortcode, $shortcode_tag) {
254
  $sanitized_attrs[$attr] = $new_value;
255
  }
256
  }
257
- //reconstruct sanitized shortcode string from array
258
- $sanitized_shortcode = "";
259
- foreach ( $sanitized_attrs as $attr => $value )
260
- $sanitized_shortcode .= ( $sanitized_shortcode == "" ? "" : " " ).$attr.'="'.$value.'"';
261
 
262
- return $sanitized_shortcode;
263
  }
264
 
265
  function wfu_slash( $value ) {
@@ -546,7 +552,8 @@ function wfu_js_to_HTML($js) {
546
  }
547
 
548
  function wfu_init_run_js_script() {
549
- $script = 'if (typeof wfu_js_decode_obj == "undefined") function wfu_js_decode_obj(obj_str) { var obj = null; if (obj_str == "window") obj = window; else { var match = obj_str.match(new RegExp(\'GlobalData(\\\\.(WFU|WFUB)\\\\[(.*?)\\\\](\\\\.(.*))?)?$\')); if (match) { obj = GlobalData; if (match[3]) obj = obj[match[2]][match[3]]; if (match[5]) obj = obj[match[5]]; } } return obj; }';
 
550
  $script .= "\n".'if (typeof wfu_run_js == "undefined") function wfu_run_js(obj_str, func) { if (typeof GlobalData == "undefined") { if (typeof window.WFU_JS_BANK == "undefined") WFU_JS_BANK = []; WFU_JS_BANK.push({obj_str: obj_str, func: func}) } else { var obj = wfu_js_decode_obj(obj_str); if (obj) obj[func].call(obj); } }';
551
  return wfu_js_to_HTML($script);
552
  }
189
 
190
  function wfu_sanitize_shortcode($shortcode, $shortcode_tag) {
191
  $attrs = wfu_shortcode_string_to_array($shortcode);
192
+ $sanitized_attrs = wfu_sanitize_shortcode_array($attrs, $shortcode_tag);
193
+ //reconstruct sanitized shortcode string from array
194
+ $sanitized_shortcode = "";
195
+ foreach ( $sanitized_attrs as $attr => $value )
196
+ $sanitized_shortcode .= ( $sanitized_shortcode == "" ? "" : " " ).$attr.'="'.$value.'"';
197
+
198
+ return $sanitized_shortcode;
199
+ }
200
+
201
+ function wfu_sanitize_shortcode_array($attrs, $shortcode_tag) {
202
  $sanitized_attrs = array();
203
  if ( $shortcode_tag == 'wordpress_file_upload' ) $defs = wfu_attribute_definitions();
204
  else $defs = wfu_browser_attribute_definitions();
264
  $sanitized_attrs[$attr] = $new_value;
265
  }
266
  }
 
 
 
 
267
 
268
+ return $sanitized_attrs;
269
  }
270
 
271
  function wfu_slash( $value ) {
552
  }
553
 
554
  function wfu_init_run_js_script() {
555
+ // $script = 'if (typeof wfu_js_decode_obj == "undefined") function wfu_js_decode_obj(obj_str) { var obj = null; if (obj_str == "window") obj = window; else { var match = obj_str.match(new RegExp(\'GlobalData(\\\\.(WFU|WFUB)\\\\[(.*?)\\\\](\\\\.(.*))?)?$\')); if (match) { obj = GlobalData; if (match[3]) obj = obj[match[2]][match[3]]; if (match[5]) obj = obj[match[5]]; } } return obj; }';
556
+ $script = 'if (typeof wfu_js_decode_obj == "undefined") function wfu_js_decode_obj(obj_str) { var obj = null; if (obj_str == "window") obj = window; else { var dbs = String.fromCharCode(92); var match = obj_str.match(new RegExp(\'GlobalData(\' + dbs + \'.(WFU|WFUB)\' + dbs + \'[(.*?)\' + dbs + \'](\' + dbs + \'.(.*))?)?$\')); if (match) { obj = GlobalData; if (match[3]) obj = obj[match[2]][match[3]]; if (match[5]) obj = obj[match[5]]; } } return obj; }';
557
  $script .= "\n".'if (typeof wfu_run_js == "undefined") function wfu_run_js(obj_str, func) { if (typeof GlobalData == "undefined") { if (typeof window.WFU_JS_BANK == "undefined") WFU_JS_BANK = []; WFU_JS_BANK.push({obj_str: obj_str, func: func}) } else { var obj = wfu_js_decode_obj(obj_str); if (obj) obj[func].call(obj); } }';
558
  return wfu_js_to_HTML($script);
559
  }
lib/wfu_pd_classes.php CHANGED
@@ -7,6 +7,7 @@ class WFU_Personal_Data_Policy {
7
  private $consent_policy;
8
  private $permissions_policy;
9
  private $log_policy;
 
10
 
11
  private $roles_included;
12
  private $roles_excluded;
@@ -18,6 +19,7 @@ class WFU_Personal_Data_Policy {
18
  $this->_initialize_consent_policy();
19
  $this->_initialize_permissions_policy();
20
  $this->_initialize_log_policy();
 
21
  $this->roles_included = array( "all" );
22
  $this->roles_excluded = array();
23
  $this->users_included = array();
@@ -165,10 +167,20 @@ class WFU_Personal_Data_Policy {
165
  );
166
  }
167
 
 
 
 
 
 
 
168
  public function get_name() {
169
  return $this->name;
170
  }
171
 
 
 
 
 
172
  public function get_consent_policy($compact = false) {
173
  $conpol = $this->consent_policy;
174
  //if a compact structure is required then remove unnecessary items from
@@ -205,6 +217,10 @@ class WFU_Personal_Data_Policy {
205
  return $logpol;
206
  }
207
 
 
 
 
 
208
  public function get_assigned_users() {
209
  $users = array();
210
  $users["roles_included"] = $this->roles_included;
@@ -214,6 +230,44 @@ class WFU_Personal_Data_Policy {
214
  return $users;
215
  }
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
218
 
219
  ?>
7
  private $consent_policy;
8
  private $permissions_policy;
9
  private $log_policy;
10
+ private $parameters;
11
 
12
  private $roles_included;
13
  private $roles_excluded;
19
  $this->_initialize_consent_policy();
20
  $this->_initialize_permissions_policy();
21
  $this->_initialize_log_policy();
22
+ $this->_initialize_parameters();
23
  $this->roles_included = array( "all" );
24
  $this->roles_excluded = array();
25
  $this->users_included = array();
167
  );
168
  }
169
 
170
+ private function _initialize_parameters() {
171
+ $this->parameters = array(
172
+ "disclaimer_link" => ""
173
+ );
174
+ }
175
+
176
  public function get_name() {
177
  return $this->name;
178
  }
179
 
180
+ public function set_name($name) {
181
+ $this->name = $name;
182
+ }
183
+
184
  public function get_consent_policy($compact = false) {
185
  $conpol = $this->consent_policy;
186
  //if a compact structure is required then remove unnecessary items from
217
  return $logpol;
218
  }
219
 
220
+ public function get_parameters() {
221
+ return $this->parameters;
222
+ }
223
+
224
  public function get_assigned_users() {
225
  $users = array();
226
  $users["roles_included"] = $this->roles_included;
230
  return $users;
231
  }
232
 
233
+ public function export_policy() {
234
+ $export_data = array();
235
+ //process basic info
236
+ $export_data["name"] = $this->name;
237
+ $export_data["description"] = $this->description;
238
+ //process consent policy
239
+ $export_data["operations_allowed"] = array();
240
+ $export_data["operations_needing_consent"] = array();
241
+ foreach ($this->consent_policy["operations"] as $id => $operation ) {
242
+ $allowed = ( count($operation["children"]) == 0 && $operation["Allowed"] );
243
+ $needs_consent = ( $allowed && $operation["NeedsConsent"] );
244
+ if ( $allowed ) array_push($export_data["operations_allowed"], $id);
245
+ if ( $needs_consent ) array_push($export_data["operations_needing_consent"], $id);
246
+ }
247
+ $export_data["consent_questions"] = $this->consent_policy["questions"];
248
+ //process permissions policy
249
+ $export_data["permissions_allowed"] = array();
250
+ foreach ($this->permissions_policy["permissions"] as $id => $permission ) {
251
+ $allowed = ( count($permission["children"]) == 0 && $permission["Allowed"] ); $needs_consent = ( $allowed && $operation["NeedsConsent"] );
252
+ if ( $allowed ) array_push($export_data["permissions_allowed"], $id);
253
+ }
254
+ //process log actions policy
255
+ $export_data["logactions_allowed"] = array();
256
+ foreach ($this->log_policy["logactions"] as $id => $logaction ) {
257
+ $allowed = ( count($logaction["children"]) == 0 && $logaction["Allowed"] ); $needs_consent = ( $allowed && $operation["NeedsConsent"] );
258
+ if ( $allowed ) array_push($export_data["logactions_allowed"], $id);
259
+ }
260
+ //process users
261
+ $export_data["roles_included"] = $this->roles_included;
262
+ $export_data["roles_excluded"] = $this->roles_excluded;
263
+ $export_data["users_included"] = $this->users_included;
264
+ $export_data["users_excluded"] = $this->users_excluded;
265
+ //process parameters
266
+ $export_data["parameters"] = $this->parameters;
267
+
268
+ return $export_data;
269
+ }
270
+
271
  }
272
 
273
  ?>
lib/wfu_personaldata.php CHANGED
@@ -1,12 +1,34 @@
1
  <?php
2
 
3
  function wfu_load_pd_policies() {
4
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  }
6
 
7
  function wfu_manage_personaldata_policies($error_message = "") {
8
  if ( !current_user_can( 'manage_options' ) ) return;
9
  $siteurl = site_url();
 
10
 
11
  $echo_str = "";
12
  $echo_str .= "\n".'<div class="wrap">';
@@ -22,6 +44,9 @@ function wfu_manage_personaldata_policies($error_message = "") {
22
  $echo_str .= "\n\t".$nonce;
23
  $echo_str .= "\n\t".$nonce_ref;
24
  $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "Personal Data");
 
 
 
25
  //select user
26
  $echo_str .= "\n\t".'<div style="margin-top:20px;">';
27
  $echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px;">Select User</h3>';
@@ -79,7 +104,8 @@ function wfu_manage_personaldata_policies($error_message = "") {
79
  $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
80
  $echo_str .= "\n\t".'</div>';
81
 
82
- return $echo_str;
 
83
 
84
  $echo_str .= "\n\t\t".'<form enctype="multipart/form-data" name="personaldata" id="personaldata" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=manage_pd_policies" class="validate">';
85
  $nonce = wp_nonce_field('wfu_manage_pd_policies', '_wpnonce', false, false);
@@ -150,43 +176,69 @@ function wfu_edit_pd_policy($key = "", $error_status = "") {
150
  $nonce_ref = wp_referer_field(false);
151
  $echo_str .= "\n\t\t\t".$nonce;
152
  $echo_str .= "\n\t\t\t".$nonce_ref;
 
 
 
153
  $echo_str .= "\n\t\t\t".'<div id="titlediv">';
154
  $echo_str .= "\n\t\t\t\t".'<input type="text" id="title" value="'.$policy->get_name().'">';
155
  $echo_str .= "\n\t\t\t".'</div>';
156
- $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 40px;">Plugin Operations</h3>';
157
- $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_consent_policy" value="'.wfu_encode_array_to_string($policy->get_consent_policy(true)).'" />';
 
 
 
158
  $echo_str .= "\n\t\t\t\t".'<span>Select which plugin operations involved in personal data handling will be executed.</span>';
159
  $operations = wfu_get_pd_operations_structure();
160
  $echo_str .= wfu_render_pd_operations("\n\t\t\t\t", $operations);
161
- $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Consent Operations</h3>';
 
 
 
 
162
  $echo_str .= "\n\t\t\t\t".'<span>Select which plugin operations that have been selected to be executed require consent.</span>';
163
  $echo_str .= wfu_render_consent_operations("\n\t\t\t\t", $operations);
164
- $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Consent Questions</h3>';
 
 
 
 
165
  $echo_str .= "\n\t\t\t\t".'<span>Define how consent questions will be presented to users through the upload form.</span>';
166
  $echo_str .= wfu_render_consent_questions();
167
- $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Permissions</h3>';
168
- $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_permissions_policy" value="'.wfu_encode_array_to_string($policy->get_permissions_policy(true)).'" />';
 
 
 
 
169
  $echo_str .= "\n\t\t\t\t".'<span>Define how users will access, review and control their personal data.</span>';
170
  $echo_str .= wfu_render_pd_permissions("\n\t\t\t\t");
171
- $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Log Actions</h3>';
172
- $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_logactions_policy" value="'.wfu_encode_array_to_string($policy->get_logactions_policy(true)).'" />';
 
 
 
 
173
  $echo_str .= "\n\t\t\t\t".'<span>Define which actions occurring on personal data will be logged.</span>';
174
  $echo_str .= wfu_render_pd_logactions("\n\t\t\t\t");
175
- $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Assigned Users</h3>';
176
- $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_assigned_users" value="'.wfu_encode_array_to_string($policy->get_assigned_users()).'" />';
 
 
 
 
177
  $echo_str .= "\n\t\t\t\t".'<span>Select the user roles and users assigned to this personal data policy.</span>';
178
  $echo_str .= wfu_render_pd_users("\n\t\t\t\t");
179
- $echo_str .= "\n\t\t\t".'<input type="hidden" name="action" value="updatepolicy">';
180
- $echo_str .= "\n\t\t\t".'<input type="hidden" name="wfu_key" value="'.$key.'">';
181
  $echo_str .= "\n\t\t\t".'<div class="submit">';
182
  $echo_str .= "\n\t\t\t\t".'<input type="submit" id="submitcancel" class="button" name="submitform" value="Cancel" />';
183
- $echo_str .= "\n\t\t\t\t".'<input type="submit" id="submitsave" class="button-primary" name="submitform" value="Save" />';
184
  $echo_str .= "\n\t\t\t".'</div>';
185
  $echo_str .= "\n\t\t".'</form>';
186
  $echo_str .= "\n\t".'</div>';
187
  $params["oplevels"] = WFU_VAR("WFU_PD_VISIBLE_OPLEVELS");
188
  $params["perlevels"] = WFU_VAR("WFU_PD_VISIBLE_PERLEVELS");
189
  $params["loglevels"] = WFU_VAR("WFU_PD_VISIBLE_LOGLEVELS");
 
190
  $handler = 'function() { wfu_initialize_consent_policy('.wfu_PHP_array_to_JS_object($params).'); }';
191
  $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
192
  $echo_str .= "\n".'</div>';
@@ -513,7 +565,7 @@ function wfu_render_pd_users($dlp) {
513
  $roletype = "in";
514
  for ( $i = 1; $i <= 2; $i++ ) {
515
  $html .= $dlp."\t\t".'<div class="wfu_pdusers_roles_container" id="wfu_pdusers_roles_'.$roletype.'_container">';
516
- $html .= $dlp."\t\t\t".'<input type="radio" name="wfu_pdusers_roletypes" value="'.( $roletype == "in" ? "include" : "exclude" ).'" onchange="wfu_pdusers_roletype_handle(this);" />';
517
  $html .= $dlp."\t\t\t".'<label>'.( $roletype == "in" ? "Include" : "Exclude" ).'</label>';
518
  $html .= $dlp."\t\t\t".'<div class="wfu_pdusers_roles_toppanel">';
519
  $html .= $dlp."\t\t\t\t".'<div class="wfu_pdusers_roles_leftpanel">';
@@ -541,7 +593,6 @@ function wfu_render_pd_users($dlp) {
541
  $usertype = "in";
542
  for ( $i = 1; $i <= 2; $i++ ) {
543
  $html .= $dlp."\t\t".'<div class="wfu_pdusers_users_container" id="wfu_pdusers_users_'.$usertype.'_container">';
544
- $html .= $dlp."\t\t\t".'<input type="radio" name="wfu_pdusers_usertypes" value="'.( $usertype == "in" ? "include" : "exclude" ).'" onchange="wfu_pdusers_usertype_handle(this);" />';
545
  $html .= $dlp."\t\t\t".'<label>'.( $usertype == "in" ? "Include" : "Exclude" ).'</label>';
546
  $html .= $dlp."\t\t\t".'<div class="wfu_pdusers_users_toppanel">';
547
  $html .= $dlp."\t\t\t\t".'<div class="wfu_pdusers_users_leftpanel">';
@@ -570,6 +621,13 @@ function wfu_render_pd_users($dlp) {
570
  return $html;
571
  }
572
 
 
 
 
 
 
 
 
573
  function wfu_erase_userdata_ask_prompt($username) {
574
  $siteurl = site_url();
575
 
1
  <?php
2
 
3
  function wfu_load_pd_policies() {
4
+ $pd_policies = array();
5
+ $pd_policies_data = get_option( "wordpress_file_upload_pd_policies" );
6
+ if ( !is_array($pd_policies_data) ) $pd_policies_data = array();
7
+ //the first policy is the default one; the default policy is the one that
8
+ //applies to all the users that do not have any other associated policy;
9
+ //if $pd_policies has no items then we need to auto-create the default
10
+ //policy
11
+ if ( count($pd_policies_data) == 0 ) {
12
+ //initialize default policy
13
+ $policy = new WFU_Personal_Data_Policy();
14
+ $policy->set_name("Default PD Policy");
15
+ //store to db
16
+ array_push($pd_policies_data, $policy->export_policy());
17
+ set_option("wordpress_file_upload_pd_policies", $pd_policies_data);
18
+ //add to return array
19
+ array_push($pd_policies, $policy);
20
+ }
21
+ else {
22
+ foreach( $pd_policies_data as $data ) {
23
+ $policy = new WFU_Personal_Data_Policy();
24
+ }
25
+ }
26
  }
27
 
28
  function wfu_manage_personaldata_policies($error_message = "") {
29
  if ( !current_user_can( 'manage_options' ) ) return;
30
  $siteurl = site_url();
31
+ $basic = true;
32
 
33
  $echo_str = "";
34
  $echo_str .= "\n".'<div class="wrap">';
44
  $echo_str .= "\n\t".$nonce;
45
  $echo_str .= "\n\t".$nonce_ref;
46
  $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "Personal Data");
47
+
48
+ $echo_str2 = $echo_str;
49
+
50
  //select user
51
  $echo_str .= "\n\t".'<div style="margin-top:20px;">';
52
  $echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px;">Select User</h3>';
104
  $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
105
  $echo_str .= "\n\t".'</div>';
106
 
107
+ if ( $basic ) return $echo_str;
108
+ $echo_str = $echo_str2;
109
 
110
  $echo_str .= "\n\t\t".'<form enctype="multipart/form-data" name="personaldata" id="personaldata" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=manage_pd_policies" class="validate">';
111
  $nonce = wp_nonce_field('wfu_manage_pd_policies', '_wpnonce', false, false);
176
  $nonce_ref = wp_referer_field(false);
177
  $echo_str .= "\n\t\t\t".$nonce;
178
  $echo_str .= "\n\t\t\t".$nonce_ref;
179
+ $echo_str .= "\n\t\t\t".'<input type="hidden" name="action" value="updatepolicy">';
180
+ $echo_str .= "\n\t\t\t".'<input type="hidden" name="wfu_key" value="'.$key.'">';
181
+ $echo_str .= "\n\t\t\t".'<input type="hidden" id="wfu_PD_bank" name="wfu_PD_bank" value="">';
182
  $echo_str .= "\n\t\t\t".'<div id="titlediv">';
183
  $echo_str .= "\n\t\t\t\t".'<input type="text" id="title" value="'.$policy->get_name().'">';
184
  $echo_str .= "\n\t\t\t".'</div>';
185
+ $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 40px;">Plugin Operations';
186
+ $echo_str .= "\n\t\t\t\t".'<div class="wfu_pdheader_button wfu_pdop_header_button"></div>';
187
+ $echo_str .= "\n\t\t\t".'</h3>';
188
+ $echo_str .= "\n\t\t\t".'<div class="wfu_plugin_operations">';
189
+ $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_consent_policy" name="wfu_consent_policy" value="'.wfu_encode_array_to_string($policy->get_consent_policy(true)).'" />';
190
  $echo_str .= "\n\t\t\t\t".'<span>Select which plugin operations involved in personal data handling will be executed.</span>';
191
  $operations = wfu_get_pd_operations_structure();
192
  $echo_str .= wfu_render_pd_operations("\n\t\t\t\t", $operations);
193
+ $echo_str .= "\n\t\t\t".'</div>';
194
+ $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Consent Operations';
195
+ $echo_str .= "\n\t\t\t\t".'<div class="wfu_pdheader_button wfu_conop_header_button"></div>';
196
+ $echo_str .= "\n\t\t\t".'</h3>';
197
+ $echo_str .= "\n\t\t\t".'<div class="wfu_consent_operations">';
198
  $echo_str .= "\n\t\t\t\t".'<span>Select which plugin operations that have been selected to be executed require consent.</span>';
199
  $echo_str .= wfu_render_consent_operations("\n\t\t\t\t", $operations);
200
+ $echo_str .= "\n\t\t\t".'</div>';
201
+ $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Consent Questions';
202
+ $echo_str .= "\n\t\t\t\t".'<div class="wfu_pdheader_button wfu_conquestion_header_button"></div>';
203
+ $echo_str .= "\n\t\t\t".'</h3>';
204
+ $echo_str .= "\n\t\t\t".'<div class="wfu_consent_questions">';
205
  $echo_str .= "\n\t\t\t\t".'<span>Define how consent questions will be presented to users through the upload form.</span>';
206
  $echo_str .= wfu_render_consent_questions();
207
+ $echo_str .= "\n\t\t\t".'</div>';
208
+ $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Permissions';
209
+ $echo_str .= "\n\t\t\t\t".'<div class="wfu_pdheader_button wfu_permissions_header_button"></div>';
210
+ $echo_str .= "\n\t\t\t".'</h3>';
211
+ $echo_str .= "\n\t\t\t".'<div class="wfu_consent_permissions">';
212
+ $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_permissions_policy" name="wfu_permissions_policy" value="'.wfu_encode_array_to_string($policy->get_permissions_policy(true)).'" />';
213
  $echo_str .= "\n\t\t\t\t".'<span>Define how users will access, review and control their personal data.</span>';
214
  $echo_str .= wfu_render_pd_permissions("\n\t\t\t\t");
215
+ $echo_str .= "\n\t\t\t".'</div>';
216
+ $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Log Actions';
217
+ $echo_str .= "\n\t\t\t\t".'<div class="wfu_pdheader_button wfu_logactions_header_button"></div>';
218
+ $echo_str .= "\n\t\t\t".'</h3>';
219
+ $echo_str .= "\n\t\t\t".'<div class="wfu_consent_logactions">';
220
+ $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_logactions_policy" name="wfu_logactions_policy" value="'.wfu_encode_array_to_string($policy->get_logactions_policy(true)).'" />';
221
  $echo_str .= "\n\t\t\t\t".'<span>Define which actions occurring on personal data will be logged.</span>';
222
  $echo_str .= wfu_render_pd_logactions("\n\t\t\t\t");
223
+ $echo_str .= "\n\t\t\t".'</div>';
224
+ $echo_str .= "\n\t\t\t".'<h3 style="margin-top: 20px;">Assigned Users';
225
+ $echo_str .= "\n\t\t\t\t".'<div class="wfu_pdheader_button wfu_pdusers_header_button"></div>';
226
+ $echo_str .= "\n\t\t\t".'</h3>';
227
+ $echo_str .= "\n\t\t\t".'<div class="wfu_consent_users">';
228
+ $echo_str .= "\n\t\t\t\t".'<input type="hidden" id="wfu_assigned_users" name="wfu_assigned_users" value="'.wfu_encode_array_to_string($policy->get_assigned_users()).'" />';
229
  $echo_str .= "\n\t\t\t\t".'<span>Select the user roles and users assigned to this personal data policy.</span>';
230
  $echo_str .= wfu_render_pd_users("\n\t\t\t\t");
231
+ $echo_str .= "\n\t\t\t".'</div>';
 
232
  $echo_str .= "\n\t\t\t".'<div class="submit">';
233
  $echo_str .= "\n\t\t\t\t".'<input type="submit" id="submitcancel" class="button" name="submitform" value="Cancel" />';
234
+ $echo_str .= "\n\t\t\t\t".'<input type="submit" id="submitsave" class="button-primary" name="submitform" value="Save" onclick="wfu_pd_pre_save_actions();" />';
235
  $echo_str .= "\n\t\t\t".'</div>';
236
  $echo_str .= "\n\t\t".'</form>';
237
  $echo_str .= "\n\t".'</div>';
238
  $params["oplevels"] = WFU_VAR("WFU_PD_VISIBLE_OPLEVELS");
239
  $params["perlevels"] = WFU_VAR("WFU_PD_VISIBLE_PERLEVELS");
240
  $params["loglevels"] = WFU_VAR("WFU_PD_VISIBLE_LOGLEVELS");
241
+ $params["multi_op_assignments"] = true;
242
  $handler = 'function() { wfu_initialize_consent_policy('.wfu_PHP_array_to_JS_object($params).'); }';
243
  $echo_str .= "\n\t".'<script type="text/javascript">if(window.addEventListener) { window.addEventListener("load", '.$handler.', false); } else if(window.attachEvent) { window.attachEvent("onload", '.$handler.'); } else { window["onload"] = '.$handler.'; }</script>';
244
  $echo_str .= "\n".'</div>';
565
  $roletype = "in";
566
  for ( $i = 1; $i <= 2; $i++ ) {
567
  $html .= $dlp."\t\t".'<div class="wfu_pdusers_roles_container" id="wfu_pdusers_roles_'.$roletype.'_container">';
568
+ $html .= $dlp."\t\t\t".'<input type="radio" name="wfu_pdusers_roletypes" value="'.( $roletype == "in" ? "include" : "exclude" ).'" onchange="wfu_pdusers_roletype_handler(this);" />';
569
  $html .= $dlp."\t\t\t".'<label>'.( $roletype == "in" ? "Include" : "Exclude" ).'</label>';
570
  $html .= $dlp."\t\t\t".'<div class="wfu_pdusers_roles_toppanel">';
571
  $html .= $dlp."\t\t\t\t".'<div class="wfu_pdusers_roles_leftpanel">';
593
  $usertype = "in";
594
  for ( $i = 1; $i <= 2; $i++ ) {
595
  $html .= $dlp."\t\t".'<div class="wfu_pdusers_users_container" id="wfu_pdusers_users_'.$usertype.'_container">';
 
596
  $html .= $dlp."\t\t\t".'<label>'.( $usertype == "in" ? "Include" : "Exclude" ).'</label>';
597
  $html .= $dlp."\t\t\t".'<div class="wfu_pdusers_users_toppanel">';
598
  $html .= $dlp."\t\t\t\t".'<div class="wfu_pdusers_users_leftpanel">';
621
  return $html;
622
  }
623
 
624
+ function wfu_update_pd_policy() {
625
+ if ( !current_user_can( 'manage_options' ) ) return;
626
+ if ( !check_admin_referer('wfu_edit_policy') ) return;
627
+
628
+
629
+ }
630
+
631
  function wfu_erase_userdata_ask_prompt($username) {
632
  $siteurl = site_url();
633
 
readme.txt CHANGED
@@ -147,6 +147,11 @@ There is an option in plugin's settings in Dashboard to relax the CSS rules, so
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
150
  = 4.5.0 =
151
  * added basic compliance with GDPR
152
  * added several shortcode attributes to configure personal data consent appearance and behaviour
147
 
148
  == Changelog ==
149
 
150
+ = 4.5.1 =
151
+ * code improved in wfu_js_decode_obj function for better compatibility with Safari browser
152
+ * code improved to sanitize all shortcode attributes before uploader form or file viewer is rendered
153
+ * removed external references to code.jquery.com and cdnjs.cloudflare.com for better compliance with GDPR
154
+
155
  = 4.5.0 =
156
  * added basic compliance with GDPR
157
  * added several shortcode attributes to configure personal data consent appearance and behaviour
release_notes.txt CHANGED
@@ -1,8 +1,7 @@
1
- <span>Version 4.5.0 is a significant update bringing basic compliance with the new <strong>General Data Protection Regulation (GDPR)</strong> or the European Union, which becomes effective on 25th of May 2018. The plugin provides the following functions related to GDPR:
2
  <ul style="list-style: disc; padding-left: 20px;">
3
- <li>It adds a question in the upload form prompting users to give their consent before uploading files and personal data on the website. Several options have been added in the uploader shortcode in a separate tab, Personal Data, for configuring the appearance and behaviour of the consent question.</li>
4
- <li>It allows users to review and change their consent status through their profile.</li>
5
- <li>It allows administrators to export and delete data stored by the plugin in the database separately for each user, in case such actions are requested by them.</li>
6
- <li>If a user has not given consent then uploaded data will not be stored in the database. They will only be included in the notification email, if such an option is activated in the shortcode.</li>
7
  </ul>
8
- Future versions of the plugin will include more options regarding personal data handling.<br /><br />For more details about this version's changes please visit the Release Notes of the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">support page</a><span>.</span>
1
+ <span>Version 4.5.1 is an incremental update bringing some code improvements and better compliance with the new <strong>General Data Protection Regulation (GDPR)</strong> of the European Union. More specifically:
2
  <ul style="list-style: disc; padding-left: 20px;">
3
+ <li>Uploader form code has been improved for better compatibility with Safari browser.</li>
4
+ <li>Shortcode attributes are now sanitized before rendering for higher protection against hackers.</li>
5
+ <li>External references to code.jquery.com and cdnjs.cloudflare.com have been removed for better compliance with GDPR.</li>
 
6
  </ul>
7
+ These changes are internal, not visible to the users.<br /><br />For more details about this version's changes please visit the Release Notes of the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">support page</a><span>.</span>
vendor/jquery/images/ui-icons_444444_256x240.png ADDED
Binary file
vendor/jquery/images/ui-icons_555555_256x240.png ADDED
Binary file
vendor/jquery/images/ui-icons_777620_256x240.png ADDED
Binary file
vendor/jquery/images/ui-icons_777777_256x240.png ADDED
Binary file
vendor/jquery/images/ui-icons_cc0000_256x240.png ADDED
Binary file
vendor/jquery/images/ui-icons_ffffff_256x240.png ADDED
Binary file
vendor/jquery/jquery-ui-timepicker-addon.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
2
+ * http://trentrichardson.com/examples/timepicker
3
+ * Copyright (c) 2016 Trent Richardson; Licensed MIT */.ui-timepicker-div .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:0 0;color:inherit;border:0;outline:0;border-bottom:solid 1px #555;width:95%}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus{border-bottom-color:#aaa}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}
vendor/jquery/jquery-ui-timepicker-addon.min.js ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ jQuery Timepicker Addon - v1.6.3 - 2016-04-20
3
+ http://trentrichardson.com/examples/timepicker
4
+ Copyright (c) 2016 Trent Richardson; Licensed MIT */
5
+ !function(a){"function"==typeof define&&define.amd?define(["jquery","jquery-ui"],a):a(jQuery)}(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.6.3"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",
6
+ microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,
7
+ maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,
8
+ {$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",
9
+ formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=
10
+ attrValue}}overrides={beforeShow:function(a,b){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],a,b,tp_inst):void 0},onChangeMonthYear:function(a,b,c){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],a,b,c,tp_inst)},onClose:function(a,b){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(b),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],
11
+ a,b,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(a){return a.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(a){return a.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:
12
+ "")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&"undefined"==typeof $.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,
13
+ 570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):
14
+ -1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:
15
+ tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:
16
+ tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&
17
+ tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof
18
+ Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(a){var b=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(b),this._limitMinMaxDateTime(a,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(a,b){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),
19
+ b||!this._defaults.timeOnly){var c=$.datepicker._get(this.inst,"dateFormat");try{var d=parseDateTimeInternal(c,this._defaults.timeFormat,a,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!d.timeObj)return!1;$.extend(this,d.timeObj)}catch(e){return $.timepicker.log("Error parsing the date/time string: "+e+"\ndate/time string = "+a+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+c),!1}return!0}var f=$.datepicker.parseTime(this._defaults.timeFormat,a,this._defaults);return f?
20
+ ($.extend(this,f),!0):!1},_afterInject:function(){var a=this.inst.settings;$.isFunction(a.afterInject)&&a.afterInject.call(this)},_injectTimePicker:function(){var a=this.inst.dpDiv,b=this.inst.settings,c=this,d="",e="",f=null,g={},h={},i=null,j=0,k=0;if(0===a.find("div.ui-timepicker-div").length&&b.showTimepicker){var l=" ui_tpicker_unit_hide",m='<div class="ui-timepicker-div'+(b.isRTL?" ui-timepicker-rtl":"")+(b.oneLine&&"select"===b.controlType?" ui-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+
21
+ (b.showTime?"":l)+'">'+b.timeText+'</dt><dd class="ui_tpicker_time '+(b.showTime?"":l)+'"><input class="ui_tpicker_time_input" '+(b.timeInput?"":"disabled")+"/></dd>";for(j=0,k=this.units.length;k>j;j++){if(d=this.units[j],e=d.substr(0,1).toUpperCase()+d.substr(1),f=null!==b["show"+e]?b["show"+e]:this.support[d],g[d]=parseInt(b[d+"Max"]-(b[d+"Max"]-b[d+"Min"])%b["step"+e],10),h[d]=0,m+='<dt class="ui_tpicker_'+d+"_label"+(f?"":l)+'">'+b[d+"Text"]+'</dt><dd class="ui_tpicker_'+d+(f?"":l)+'"><div class="ui_tpicker_'+
22
+ d+"_slider"+(f?"":l)+'"></div>',f&&b[d+"Grid"]>0){if(m+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===d)for(var n=b[d+"Min"];n<=g[d];n+=parseInt(b[d+"Grid"],10)){h[d]++;var o=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:n},b);m+='<td data-for="'+d+'">'+o+"</td>"}else for(var p=b[d+"Min"];p<=g[d];p+=parseInt(b[d+"Grid"],10))h[d]++,m+='<td data-for="'+d+'">'+(10>p?"0":"")+p+"</td>";m+="</tr></table></div>"}m+="</dd>"}var q=null!==b.showTimezone?b.showTimezone:
23
+ this.support.timezone;m+='<dt class="ui_tpicker_timezone_label'+(q?"":l)+'">'+b.timezoneText+"</dt>",m+='<dd class="ui_tpicker_timezone'+(q?"":l)+'"></dd>',m+="</dl></div>";var r=$(m);for(b.timeOnly===!0&&(r.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+b.timeOnlyTitle+"</div></div>"),a.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),j=0,k=c.units.length;k>j;j++)d=c.units[j],e=d.substr(0,1).toUpperCase()+d.substr(1),f=null!==
24
+ b["show"+e]?b["show"+e]:this.support[d],c[d+"_slider"]=c.control.create(c,r.find(".ui_tpicker_"+d+"_slider"),d,c[d],b[d+"Min"],g[d],b["step"+e]),f&&b[d+"Grid"]>0&&(i=100*h[d]*b[d+"Grid"]/(g[d]-b[d+"Min"]),r.find(".ui_tpicker_"+d+" table").css({width:i+"%",marginLeft:b.isRTL?"0":i/(-2*h[d])+"%",marginRight:b.isRTL?i/(-2*h[d])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(a){var b=$(this),e=b.html(),f=parseInt(e.replace(/[^0-9]/g),10),g=e.replace(/[^apm]/gi),h=b.data("for");"hour"===
25
+ h&&(-1!==g.indexOf("p")&&12>f?f+=12:-1!==g.indexOf("a")&&12===f&&(f=0)),c.control.value(c,c[h+"_slider"],d,f),c._onTimeChange(),c._onSelectHandler()}).css({cursor:"pointer",width:100/h[d]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=r.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(b.timezoneList,function(a,b){return $("<option />").val("object"==typeof a?a.value:a).text("object"==typeof a?a.label:a)})),"undefined"!=
26
+ typeof this.timezone&&null!==this.timezone&&""!==this.timezone){var s=-1*(new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12)).getTimezoneOffset();s===this.timezone?selectLocalTimezone(c):this.timezone_select.val(this.timezone)}else"undefined"!=typeof this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(b.timezone):selectLocalTimezone(c);this.timezone_select.change(function(){c._onTimeChange(),c._onSelectHandler(),c._afterInject()});var t=a.find(".ui-datepicker-buttonpane");
27
+ if(t.length?t.before(r):a.append(r),this.$timeObj=r.find(".ui_tpicker_time_input"),this.$timeObj.change(function(){var a=c.inst.settings.timeFormat,b=$.datepicker.parseTime(a,this.value),d=new Date;b?(d.setHours(b.hour),d.setMinutes(b.minute),d.setSeconds(b.second),$.datepicker._setTime(c.inst,d)):(this.value=c.formattedTime,this.blur())}),null!==this.inst){var u=this.timeDefined;this._onTimeChange(),this.timeDefined=u}if(this._defaults.addSliderAccess){var v=this._defaults.sliderAccessArgs,w=this._defaults.isRTL;
28
+ v.isRTL=w,setTimeout(function(){if(0===r.find(".ui-slider-access").length){r.find(".ui-slider:visible").sliderAccess(v);var a=r.find(".ui-slider-access:eq(0)").outerWidth(!0);a&&r.find("table:visible").each(function(){var b=$(this),c=b.outerWidth(),d=b.css(w?"marginRight":"marginLeft").toString().replace("%",""),e=c-a,f=d*e/c+"%",g={width:e,marginRight:0,marginLeft:0};g[w?"marginRight":"marginLeft"]=f,b.css(g)})}},10)}c._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(a,b){var c=
29
+ this._defaults,d=new Date(a.selectedYear,a.selectedMonth,a.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(a,"minDateTime")&&void 0!==$.datepicker._get(a,"minDateTime")&&d){var e=$.datepicker._get(a,"minDateTime"),f=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=c.hourMin,this.minuteMinOriginal=
30
+ c.minuteMin,this.secondMinOriginal=c.secondMin,this.millisecMinOriginal=c.millisecMin,this.microsecMinOriginal=c.microsecMin),a.settings.timeOnly||f.getTime()===d.getTime()?(this._defaults.hourMin=e.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=e.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=e.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,
31
+ this._defaults.millisecMin=e.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=e.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=
32
+ this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=
33
+ this.microsecMinOriginal)}if(null!==$.datepicker._get(a,"maxDateTime")&&void 0!==$.datepicker._get(a,"maxDateTime")&&d){var g=$.datepicker._get(a,"maxDateTime"),h=new Date(g.getFullYear(),g.getMonth(),g.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=c.hourMax,this.minuteMaxOriginal=c.minuteMax,this.secondMaxOriginal=c.secondMax,this.millisecMaxOriginal=c.millisecMax,this.microsecMaxOriginal=
34
+ c.microsecMax),a.settings.timeOnly||h.getTime()===d.getTime()?(this._defaults.hourMax=g.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=g.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=g.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=g.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=
35
+ this._defaults.millisecMax,this._defaults.microsecMax=g.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=
36
+ this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==a.settings.minTime){var i=new Date("01/01/1970 "+a.settings.minTime);
37
+ this.hour<i.getHours()?(this.hour=this._defaults.hourMin=i.getHours(),this.minute=this._defaults.minuteMin=i.getMinutes()):this.hour===i.getHours()&&this.minute<i.getMinutes()?this.minute=this._defaults.minuteMin=i.getMinutes():this._defaults.hourMin<i.getHours()?(this._defaults.hourMin=i.getHours(),this._defaults.minuteMin=i.getMinutes()):this._defaults.hourMin===i.getHours()===this.hour&&this._defaults.minuteMin<i.getMinutes()?this._defaults.minuteMin=i.getMinutes():this._defaults.minuteMin=0}if(null!==
38
+ a.settings.maxTime){var j=new Date("01/01/1970 "+a.settings.maxTime);this.hour>j.getHours()?(this.hour=this._defaults.hourMax=j.getHours(),this.minute=this._defaults.minuteMax=j.getMinutes()):this.hour===j.getHours()&&this.minute>j.getMinutes()?this.minute=this._defaults.minuteMax=j.getMinutes():this._defaults.hourMax>j.getHours()?(this._defaults.hourMax=j.getHours(),this._defaults.minuteMax=j.getMinutes()):this._defaults.hourMax===j.getHours()===this.hour&&this._defaults.minuteMax>j.getMinutes()?
39
+ this._defaults.minuteMax=j.getMinutes():this._defaults.minuteMax=59}if(void 0!==b&&b===!0){var k=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),l=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),m=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),n=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-
40
+ this._defaults.millisecMin)%this._defaults.stepMillisec,10),o=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:k,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,
41
+ max:l,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:m,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,
42
+ max:n,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:o,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var a=this.hour_slider?
43
+ this.control.value(this,this.hour_slider,"hour"):!1,b=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,c=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,d=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,e=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,f=this.timezone_select?this.timezone_select.val():!1,g=this._defaults,h=g.pickerTimeFormat||g.timeFormat,i=g.pickerTimeSuffix||g.timeSuffix;
44
+ "object"==typeof a&&(a=!1),"object"==typeof b&&(b=!1),"object"==typeof c&&(c=!1),"object"==typeof d&&(d=!1),"object"==typeof e&&(e=!1),"object"==typeof f&&(f=!1),a!==!1&&(a=parseInt(a,10)),b!==!1&&(b=parseInt(b,10)),c!==!1&&(c=parseInt(c,10)),d!==!1&&(d=parseInt(d,10)),e!==!1&&(e=parseInt(e,10)),f!==!1&&(f=f.toString());var j=g[12>a?"amNames":"pmNames"][0],k=a!==parseInt(this.hour,10)||b!==parseInt(this.minute,10)||c!==parseInt(this.second,10)||d!==parseInt(this.millisec,10)||e!==parseInt(this.microsec,
45
+ 10)||this.ampm.length>0&&12>a!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&f!==this.timezone.toString();if(k&&(a!==!1&&(this.hour=a),b!==!1&&(this.minute=b),c!==!1&&(this.second=c),d!==!1&&(this.millisec=d),e!==!1&&(this.microsec=e),f!==!1&&(this.timezone=f),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=j),this.formattedTime=$.datepicker.formatTime(g.timeFormat,this,g),this.$timeObj&&
46
+ (this.$timeObj.val(h===g.timeFormat?this.formattedTime+i:$.datepicker.formatTime(h,this,g)+i),this.$timeObj[0].setSelectionRange)){var l=this.$timeObj[0].selectionStart,m=this.$timeObj[0].selectionEnd;this.$timeObj[0].setSelectionRange(l,m)}this.timeDefined=!0,k&&this._updateDateTime()}},_onSelectHandler:function(){var a=this._defaults.onSelect||this.inst.settings.onSelect,b=this.$input?this.$input[0]:null;a&&b&&a.apply(b,[this.formattedDateTime,this])},_updateDateTime:function(a){a=this.inst||a;
47
+ var b=a.currentYear>0?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(a.selectedYear,a.selectedMonth,a.selectedDay),c=$.datepicker._daylightSavingAdjust(b),d=$.datepicker._get(a,"dateFormat"),e=$.datepicker._getFormatConfig(a),f=null!==c&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(d,null===c?new Date:c,e);var g=this.formattedDate;if(""===a.lastVal&&(a.currentYear=a.selectedYear,a.currentMonth=a.selectedMonth,a.currentDay=a.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===
48
+ !1?g=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||f)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(g+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=g,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(g);var h="",
49
+ i=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,j=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(h=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===c?new Date:c,e):this.formattedDate,h&&(h+=i)),h+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+j:this.formattedTime+j,this.$altInput.val(h)}else this.$input.val(g);
50
+ else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var a=$.datepicker._getInst(this.$input.get(0)),b=$.datepicker._get(a,"timepicker");if(b&&b._defaults.timeOnly&&a.input.val()!==a.lastVal)try{$.datepicker._updateDatepicker(a)}catch(c){$.timepicker.log(c)}}},_controls:{slider:{create:function(a,b,c,d,e,f,g){var h=a._defaults.isRTL;return b.prop("slide",null).slider({orientation:"horizontal",
51
+ value:h?-1*d:d,min:h?-1*f:e,max:h?-1*e:f,step:g,slide:function(b,d){a.control.value(a,$(this),c,h?-1*d.value:d.value),a._onTimeChange()},stop:function(b,c){a._onSelectHandler()}})},options:function(a,b,c,d,e){if(a._defaults.isRTL){if("string"==typeof d)return"min"===d||"max"===d?void 0!==e?b.slider(d,-1*e):Math.abs(b.slider(d)):b.slider(d);var f=d.min,g=d.max;return d.min=d.max=null,void 0!==f&&(d.max=-1*f),void 0!==g&&(d.min=-1*g),b.slider(d)}return"string"==typeof d&&void 0!==e?b.slider(d,e):b.slider(d)},
52
+ value:function(a,b,c,d){return a._defaults.isRTL?void 0!==d?b.slider("value",-1*d):Math.abs(b.slider("value")):void 0!==d?b.slider("value",d):b.slider("value")}},select:{create:function(a,b,c,d,e,f,g){for(var h='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+c+'" data-min="'+e+'" data-max="'+f+'" data-step="'+g+'">',i=a._defaults.pickerTimeFormat||a._defaults.timeFormat,j=e;f>=j;j+=g)h+='<option value="'+j+'"'+(j===d?" selected":"")+">",h+="hour"===c?$.datepicker.formatTime($.trim(i.replace(/[^ht ]/gi,
53
+ "")),{hour:j},a._defaults):"millisec"===c||"microsec"===c||j>=10?j:"0"+j.toString(),h+="</option>";return h+="</select>",b.children("select").remove(),$(h).appendTo(b).change(function(b){a._onTimeChange(),a._onSelectHandler(),a._afterInject()}),b},options:function(a,b,c,d,e){var f={},g=b.children("select");if("string"==typeof d){if(void 0===e)return g.data(d);f[d]=e}else f=d;return a.control.create(a,b,g.data("unit"),g.val(),f.min>=0?f.min:g.data("min"),f.max||g.data("max"),f.step||g.data("step"))},
54
+ value:function(a,b,c,d){var e=b.children("select");return void 0!==d?e.val(d):e.val()}}}}),$.fn.extend({timepicker:function(a){a=a||{};var b=Array.prototype.slice.call(arguments);return"object"==typeof a&&(b[0]=$.extend(a,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),b)})},datetimepicker:function(a){a=a||{};var b=arguments;return"string"==typeof a?"getDate"===a||"option"===a&&2===b.length&&"string"==typeof b[1]?$.fn.datepicker.apply($(this[0]),b):this.each(function(){var a=
55
+ $(this);a.datepicker.apply(a,b)}):this.each(function(){var b=$(this);b.datepicker($.timepicker._newInst(b,a)._defaults)})}}),$.datepicker.parseDateTime=function(a,b,c,d,e){var f=parseDateTimeInternal(a,b,c,d,e);if(f.timeObj){var g=f.timeObj;f.date.setHours(g.hour,g.minute,g.second,g.millisec),f.date.setMicroseconds(g.microsec)}return f.date},$.datepicker.parseTime=function(a,b,c){var d=extendRemove(extendRemove({},$.timepicker._defaults),c||{}),e=(-1!==a.replace(/'.*?'/g,"").indexOf("Z"),function(a,
56
+ b,c){var d,e=function(a,b){var c=[];return a&&$.merge(c,a),b&&$.merge(c,b),c=$.map(c,function(a){return a.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+c.join("|")+")?"},f=function(a){var b=a.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),c={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(b)for(var d=0;d<b.length;d++)-1===c[b[d].toString().charAt(0)]&&(c[b[d].toString().charAt(0)]=d+1);return c},g="^"+a.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(a){var b=
57
+ a.length;switch(a.charAt(0).toLowerCase()){case "h":return 1===b?"(\\d?\\d)":"(\\d{"+b+"})";case "m":return 1===b?"(\\d?\\d)":"(\\d{"+b+"})";case "s":return 1===b?"(\\d?\\d)":"(\\d{"+b+"})";case "l":return"(\\d?\\d?\\d)";case "c":return"(\\d?\\d?\\d)";case "z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case "t":return e(c.amNames,c.pmNames);default:return"("+a.replace(/'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(a){return"\\"+a})+")?"}}).replace(/\s/g,"\\s?")+c.timeSuffix+"$",h=f(a),
58
+ i="";d=b.match(new RegExp(g,"i"));var j={hour:0,minute:0,second:0,millisec:0,microsec:0};return d?(-1!==h.t&&(void 0===d[h.t]||0===d[h.t].length?(i="",j.ampm=""):(i=-1!==$.inArray(d[h.t].toUpperCase(),$.map(c.amNames,function(a,b){return a.toUpperCase()}))?"AM":"PM",j.ampm=c["AM"===i?"amNames":"pmNames"][0])),-1!==h.h&&("AM"===i&&"12"===d[h.h]?j.hour=0:"PM"===i&&"12"!==d[h.h]?j.hour=parseInt(d[h.h],10)+12:j.hour=Number(d[h.h])),-1!==h.m&&(j.minute=Number(d[h.m])),-1!==h.s&&(j.second=Number(d[h.s])),
59
+ -1!==h.l&&(j.millisec=Number(d[h.l])),-1!==h.c&&(j.microsec=Number(d[h.c])),-1!==h.z&&void 0!==d[h.z]&&(j.timezone=$.timepicker.timezoneOffsetNumber(d[h.z])),j):!1}),f=function(a,b,c){try{var d=new Date("2012-01-01 "+b);if(isNaN(d.getTime())&&(d=new Date("2012-01-01T"+b),isNaN(d.getTime())&&(d=new Date("01/01/2012 "+b),isNaN(d.getTime()))))throw"Unable to parse time with native Date: "+b;return{hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),millisec:d.getMilliseconds(),microsec:d.getMicroseconds(),
60
+ timezone:-1*d.getTimezoneOffset()}}catch(f$0){try{return e(a,b,c)}catch(g){$.timepicker.log("Unable to parse \ntimeString: "+b+"\ntimeFormat: "+a)}}return!1};return"function"==typeof d.parse?d.parse(a,b,d):"loose"===d.parse?f(a,b,d):e(a,b,d)},$.datepicker.formatTime=function(a,b,c){c=c||{},c=$.extend({},$.timepicker._defaults,c),b=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},b);var d=a,e=c.amNames[0],f=parseInt(b.hour,10);return f>11&&(e=c.pmNames[0]),d=d.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,
61
+ function(a){switch(a){case "HH":return("0"+f).slice(-2);case "H":return f;case "hh":return("0"+convert24to12(f)).slice(-2);case "h":return convert24to12(f);case "mm":return("0"+b.minute).slice(-2);case "m":return b.minute;case "ss":return("0"+b.second).slice(-2);case "s":return b.second;case "l":return("00"+b.millisec).slice(-3);case "c":return("00"+b.microsec).slice(-3);case "z":return $.timepicker.timezoneOffsetString(null===b.timezone?c.timezone:b.timezone,!1);case "Z":return $.timepicker.timezoneOffsetString(null===
62
+ b.timezone?c.timezone:b.timezone,!0);case "T":return e.charAt(0).toUpperCase();case "TT":return e.toUpperCase();case "t":return e.charAt(0).toLowerCase();case "tt":return e.toLowerCase();default:return a.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(a,b){var c,d=this._getInst($(a)[0]),e=this._get(d,"timepicker");e&&d.settings.showTimepicker?(e._limitMinMaxDateTime(d,!0),c=d.inline,d.inline=d.stay_open=!0,this._base_selectDate(a,b),d.inline=
63
+ c,d.stay_open=!1,this._notifyChange(d),this._updateDatepicker(d)):this._base_selectDate(a,b)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(a){var b=a.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==a&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==b||"boolean"==typeof a.stay_open&&a.stay_open!==!1)){this._base_updateDatepicker(a);var c=this._get(a,"timepicker");c&&c._addTimePicker(a)}},$.datepicker._base_doKeyPress=
64
+ $.datepicker._doKeyPress,$.datepicker._doKeyPress=function(a){var b=$.datepicker._getInst(a.target),c=$.datepicker._get(b,"timepicker");if(c&&$.datepicker._get(b,"constrainInput")){var d=c.support.ampm,e=null!==c._defaults.showTimezone?c._defaults.showTimezone:c.support.timezone,f=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),g=c._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,d?"APM":"").replace(/Tt/g,d?"AaPpMm":"").replace(/tT/g,d?"AaPpMm":"").replace(/T/g,d?
65
+ "AP":"").replace(/tt/g,d?"apm":"").replace(/t/g,d?"ap":"")+" "+c._defaults.separator+c._defaults.timeSuffix+(e?c._defaults.timezoneList.join(""):"")+c._defaults.amNames.join("")+c._defaults.pmNames.join("")+f,h=String.fromCharCode(void 0===a.charCode?a.keyCode:a.charCode);return a.ctrlKey||" ">h||!f||g.indexOf(h)>-1}return $.datepicker._base_doKeyPress(a)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(a){var b=this._get(a,"timepicker");if(b){var c=
66
+ b._defaults.altField;if(c){var d=(b._defaults.altFormat||b._defaults.dateFormat,this._getDate(a)),e=$.datepicker._getFormatConfig(a),f="",g=b._defaults.altSeparator?b._defaults.altSeparator:b._defaults.separator,h=b._defaults.altTimeSuffix?b._defaults.altTimeSuffix:b._defaults.timeSuffix,i=null!==b._defaults.altTimeFormat?b._defaults.altTimeFormat:b._defaults.timeFormat;f+=$.datepicker.formatTime(i,b,b._defaults)+h,b._defaults.timeOnly||b._defaults.altFieldTimeOnly||null===d||(f=b._defaults.altFormat?
67
+ $.datepicker.formatDate(b._defaults.altFormat,d,e)+g+f:b.formattedDate+g+f),$(c).val(a.input.val()?f:"")}}else $.datepicker._base_updateAlternate(a)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(a){var b=$.datepicker._getInst(a.target),c=$.datepicker._get(b,"timepicker");if(c&&c._defaults.timeOnly&&b.input.val()!==b.lastVal)try{$.datepicker._updateDatepicker(b)}catch(d){$.timepicker.log(d)}return $.datepicker._base_doKeyUp(a)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,
68
+ $.datepicker._gotoToday=function(a){var b=this._getInst($(a)[0]);this._base_gotoToday(a);var c=this._get(b,"timepicker");if(c){var d=$.timepicker.timezoneOffsetNumber(c.timezone),e=new Date;e.setMinutes(e.getMinutes()+e.getTimezoneOffset()+parseInt(d,10)),this._setTime(b,e),this._setDate(b,e),c._onSelectHandler()}},$.datepicker._disableTimepickerDatepicker=function(a){var b=this._getInst(a);if(b){var c=this._get(b,"timepicker");$(a).datepicker("getDate"),c&&(b.settings.showTimepicker=!1,c._defaults.showTimepicker=
69
+ !1,c._updateDateTime(b))}},$.datepicker._enableTimepickerDatepicker=function(a){var b=this._getInst(a);if(b){var c=this._get(b,"timepicker");$(a).datepicker("getDate"),c&&(b.settings.showTimepicker=!0,c._defaults.showTimepicker=!0,c._addTimePicker(b),c._updateDateTime(b))}},$.datepicker._setTime=function(a,b){var c=this._get(a,"timepicker");if(c){var d=c._defaults;c.hour=b?b.getHours():d.hour,c.minute=b?b.getMinutes():d.minute,c.second=b?b.getSeconds():d.second,c.millisec=b?b.getMilliseconds():d.millisec,
70
+ c.microsec=b?b.getMicroseconds():d.microsec,c._limitMinMaxDateTime(a,!0),c._onTimeChange(),c._updateDateTime(a)}},$.datepicker._setTimeDatepicker=function(a,b,c){var d=this._getInst(a);if(d){var e=this._get(d,"timepicker");if(e){this._setDateFromField(d);var f;b&&("string"==typeof b?(e._parseTime(b,c),f=new Date,f.setHours(e.hour,e.minute,e.second,e.millisec),f.setMicroseconds(e.microsec)):(f=new Date(b.getTime()),f.setMicroseconds(b.getMicroseconds())),"Invalid Date"===f.toString()&&(f=void 0),this._setTime(d,
71
+ f))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(a,b){var c=this._getInst(a),d=b;if(c){"string"==typeof b&&(d=new Date(b),d.getTime()||(this._base_setDateDatepicker.apply(this,arguments),d=$(a).datepicker("getDate")));var e,f=this._get(c,"timepicker");d instanceof Date?(e=new Date(d.getTime()),e.setMicroseconds(d.getMicroseconds())):e=d,f&&e&&(f.support.timezone||null!==f._defaults.timezone||(f.timezone=-1*e.getTimezoneOffset()),
72
+ d=$.timepicker.timezoneAdjust(d,$.timepicker.timezoneOffsetString(-d.getTimezoneOffset()),f.timezone),e=$.timepicker.timezoneAdjust(e,$.timepicker.timezoneOffsetString(-e.getTimezoneOffset()),f.timezone)),this._updateDatepicker(c),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(a,e,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(a,b){var c=this._getInst(a);if(c){var d=this._get(c,"timepicker");if(d){void 0===
73
+ c.lastVal&&this._setDateFromField(c,b);var e=this._getDate(c),f=null;return f=d.$altInput&&d._defaults.altFieldTimeOnly?d.$input.val()+" "+d.$altInput.val():"INPUT"!==d.$input.get(0).tagName&&d.$altInput?d.$altInput.val():d.$input.val(),e&&d._parseTime(f,!c.settings.timeOnly)&&(e.setHours(d.hour,d.minute,d.second,d.millisec),e.setMicroseconds(d.microsec),null!=d.timezone&&(d.support.timezone||null!==d._defaults.timezone||(d.timezone=-1*e.getTimezoneOffset()),e=$.timepicker.timezoneAdjust(e,d.timezone,
74
+ $.timepicker.timezoneOffsetString(-e.getTimezoneOffset())))),e}return this._base_getDateDatepicker(a,b)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(a,b,c){var d;try{d=this._base_parseDate(a,b,c)}catch(e){if(!(e.indexOf(":")>=0))throw e;d=this._base_parseDate(a,b.substring(0,b.length-(e.length-e.indexOf(":")-2)),c),$.timepicker.log("Error parsing the date string: "+e+"\ndate string = "+b+"\ndate format = "+a)}return d},$.datepicker._base_formatDate=$.datepicker._formatDate,
75
+ $.datepicker._formatDate=function(a,b,c,d){var e=this._get(a,"timepicker");return e?(e._updateDateTime(a),e.$input.val()):this._base_formatDate(a)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(a,b,c){var d,e=this._getInst(a);if(!e)return null;var f=this._get(e,"timepicker");if(f){var g,h,i,j,k=null,l=null,m=null,n=f._defaults.evnts,o={};if("string"==typeof b)if("minDate"===b||"minDateTime"===b)k=c;else if("maxDate"===b||"maxDateTime"===
76
+ b)l=c;else if("onSelect"===b)m=c;else{if(n.hasOwnProperty(b)){if("undefined"==typeof c)return n[b];o[b]=c,d={}}}else if("object"==typeof b){b.minDate?k=b.minDate:b.minDateTime?k=b.minDateTime:b.maxDate?l=b.maxDate:b.maxDateTime&&(l=b.maxDateTime);for(g in n)n.hasOwnProperty(g)&&b[g]&&(o[g]=b[g])}for(g in o)o.hasOwnProperty(g)&&(n[g]=o[g],d||(d=$.extend({},b)),delete d[g]);if(d&&isEmptyObject(d))return;if(k?(k=0===k?new Date:new Date(k),f._defaults.minDate=k,f._defaults.minDateTime=k):l?(l=0===l?new Date:
77
+ new Date(l),f._defaults.maxDate=l,f._defaults.maxDateTime=l):m&&(f._defaults.onSelect=m),k||l)return j=$(a),i=j.datetimepicker("getDate"),h=this._base_optionDatepicker.call($.datepicker,a,d||b,c),j.datetimepicker("setDate",i),h}return void 0===c?this._base_optionDatepicker.call($.datepicker,a,b):this._base_optionDatepicker.call($.datepicker,a,d||b,c)};var isEmptyObject=function(a){var b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0},extendRemove=function(a,b){$.extend(a,b);for(var c in b)(null===
78
+ b[c]||void 0===b[c])&&(a[c]=b[c]);return a},detectSupport=function(a){var b=a.replace(/'.*?'/g,"").toLowerCase(),c=function(a,b){return-1!==a.indexOf(b)?!0:!1};return{hour:c(b,"h"),minute:c(b,"m"),second:c(b,"s"),millisec:c(b,"l"),microsec:c(b,"c"),timezone:c(b,"z"),ampm:c(b,"t")&&c(a,"h"),iso8601:c(a,"Z")}},convert24to12=function(a){return a%=12,0===a&&(a=12),String(a)},computeEffectiveSetting=function(a,b){return a&&a[b]?a[b]:$.timepicker._defaults[b]},splitDateTime=function(a,b){var c=computeEffectiveSetting(b,
79
+ "separator"),d=computeEffectiveSetting(b,"timeFormat"),e=d.split(c),f=e.length,g=a.split(c),h=g.length;return h>1?{dateString:g.splice(0,h-f).join(c),timeString:g.splice(0,f).join(c)}:{dateString:a,timeString:""}},parseDateTimeInternal=function(a,b,c,d,e){var f,g,h;if(g=splitDateTime(c,e),f=$.datepicker._base_parseDate(a,g.dateString,d),""===g.timeString)return{date:f};if(h=$.datepicker.parseTime(b,g.timeString,e),!h)throw"Wrong time format";return{date:f,timeObj:h}},selectLocalTimezone=function(a,
80
+ b){if(a&&a.timezone_select){var c=b||new Date;a.timezone_select.val(-c.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(a,b){if(isNaN(a)||a>840||-720>a)return a;var c=a,d=c%60,e=(c-d)/60,f=b?":":"",g=(c>=0?"+":"-")+("0"+Math.abs(e)).slice(-2)+f+("0"+Math.abs(d)).slice(-2);return"+00:00"===g?"Z":g},$.timepicker.timezoneOffsetNumber=function(a){var b=a.toString().replace(":","");return"Z"===b.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(b)?("-"===b.substr(0,1)?
81
+ -1:1)*(60*parseInt(b.substr(1,2),10)+parseInt(b.substr(3,2),10)):parseInt(a,10)},$.timepicker.timezoneAdjust=function(a,b,c){var d=$.timepicker.timezoneOffsetNumber(b),e=$.timepicker.timezoneOffsetNumber(c);return isNaN(e)||a.setMinutes(a.getMinutes()+-d- -e),a},$.timepicker.timeRange=function(a,b,c){return $.timepicker.handleRange("timepicker",a,b,c)},$.timepicker.datetimeRange=function(a,b,c){$.timepicker.handleRange("datetimepicker",a,b,c)},$.timepicker.dateRange=function(a,b,c){$.timepicker.handleRange("datepicker",
82
+ a,b,c)},$.timepicker.handleRange=function(a,b,c,d){function e(e,f){var g=b[a]("getDate"),h=c[a]("getDate"),i=e[a]("getDate");if(null!==g){var j=new Date(g.getTime()),k=new Date(g.getTime());j.setMilliseconds(j.getMilliseconds()+d.minInterval),k.setMilliseconds(k.getMilliseconds()+d.maxInterval),d.minInterval>0&&j>h?c[a]("setDate",j):d.maxInterval>0&&h>k?c[a]("setDate",k):g>h&&f[a]("setDate",i)}}function f(b,c,e){if(b.val()){var f=b[a].call(b,"getDate");null!==f&&d.minInterval>0&&("minDate"===e&&f.setMilliseconds(f.getMilliseconds()+
83
+ d.minInterval),"maxDate"===e&&f.setMilliseconds(f.getMilliseconds()-d.minInterval)),f.getTime&&c[a].call(c,"option",e,f)}}d=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},d);var g=!1;return"timepicker"===a&&(g=!0,a="datetimepicker"),$.fn[a].call(b,$.extend({timeOnly:g,onClose:function(a,b){e($(this),c)},onSelect:function(a){f($(this),c,"minDate")}},d,d.start)),$.fn[a].call(c,$.extend({timeOnly:g,onClose:function(a,c){e($(this),b)},onSelect:function(a){f($(this),b,"maxDate")}},d,d.end)),
84
+ e(b,c),f(b,c,"minDate"),f(c,b,"maxDate"),$([b.get(0),c.get(0)])},$.timepicker.log=function(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},
85
+ Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(a){return this.setMilliseconds(this.getMilliseconds()+Math.floor(a/1E3)),this.microseconds=a%1E3,this}),$.timepicker.version="1.6.3"}});
vendor/jquery/jquery-ui.min.css ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*! jQuery UI - v1.12.1 - 2018-06-03
2
+ * http://jqueryui.com
3
+ * Includes: draggable.css, core.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-button-icon-only,.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-checkboxradio-disabled,.ui-state-disabled{pointer-events:none}.ui-helper-reset,.ui-menu{outline:0;list-style:none}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;line-height:1.3;text-decoration:none;font-size:100%}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-autocomplete,.ui-menu .ui-menu{position:absolute}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{top:0;left:0;cursor:default}.ui-menu{padding:0;margin:0;display:block}.ui-button,.ui-controlgroup{display:inline-block;vertical-align:middle}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-state-active,.ui-menu .ui-state-focus{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:active,.ui-button:hover,.ui-button:link,.ui-button:visited{text-decoration:none}.ui-button-icon-only{width:2em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}button.ui-button::-moz-focus-inner,input.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup>.ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup>.ui-controlgroup-item.ui-visual-focus,.ui-controlgroup>.ui-controlgroup-item:focus{z-index:9999}.ui-controlgroup-vertical>.ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label+.ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label+.ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc(100% - 2.4em)}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-multi .ui-datepicker-group,.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0 0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw,.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:700;line-height:1.5;padding:2px .4em;margin:.5em 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-text{display:block;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.ui-selectmenu-button.ui-button{text-align:left;white-space:nowrap;width:14em}.ui-selectmenu-icon.ui-icon{float:right;margin-top:0}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:0 0;color:inherit;padding:.222em 0;margin:.2em 2em .2em .4em;vertical-align:middle}.ui-widget-content a,.ui-widget-header,.ui-widget-header a{color:#333}.ui-spinner-button{width:1.6em;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-widget,.ui-widget .ui-widget{font-size:1em}.ui-spinner a.ui-spinner-button{border-top-style:none;border-bottom-style:none;border-right-style:none}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0 0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;font-weight:700}.ui-button,.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,html .ui-button.ui-state-disabled:active,html .ui-button.ui-state-disabled:hover{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:400;color:#454545}.ui-button,.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button{color:#454545;text-decoration:none}.ui-button:focus,.ui-button:hover,.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #ccc;background:#ededed;font-weight:400;color:#2b2b2b}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,a.ui-button:focus,a.ui-button:hover{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px #5e9ed6}.ui-button.ui-state-active:hover,.ui-button:active,.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active{border:1px solid #003eff;background:#007fff;font-weight:400;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-state-error-text,.ui-widget-content .ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error a,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon,.ui-widget-header .ui-icon{background-image:url(images/ui-icons_444444_256x240.png)}.ui-button:focus .ui-icon,.ui-button:hover .ui-icon,.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(images/ui-icons_555555_256x240.png)}.ui-button:active .ui-icon,.ui-state-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-button .ui-state-highlight.ui-icon,.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_777620_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cc0000_256x240.png)}.ui-button .ui-icon{background-image:url(images/ui-icons_777777_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-first,.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:3px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666}
wordpress_file_upload.php CHANGED
@@ -4,7 +4,7 @@ if( !session_id() ) { session_start(); }
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
- Version: 4.5.0
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
@@ -128,16 +128,16 @@ function wfu_enqueue_frontpage_scripts() {
128
  //do not load JQuery UI css if $ret_data denotes incompatibility issues
129
  if ( ( !isset($ret_data["correct_NextGenGallery_incompatibility"]) || $ret_data["correct_NextGenGallery_incompatibility"] != "true" ) &&
130
  ( !isset($ret_data["correct_JQueryUI_incompatibility"]) || $ret_data["correct_JQueryUI_incompatibility"] != "true" ) )
131
- wp_enqueue_style('jquery-ui-css', '//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.min.css');
132
  //do not load timepicker css if $ret_data exclude_timepicker flag is true
133
  if ( !isset($ret_data["exclude_timepicker"]) || $ret_data["exclude_timepicker"] != "true" )
134
- wp_enqueue_style('jquery-ui-timepicker-addon-css', '//cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.3/jquery-ui-timepicker-addon.min.css');
135
  wp_enqueue_script('json2');
136
  wp_enqueue_script('wordpress_file_upload_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_functions.js');
137
  //do not load timepicker js if $ret_data exclude_timepicker flag is true
138
  if ( !isset($ret_data["exclude_timepicker"]) || $ret_data["exclude_timepicker"] != "true" ) {
139
  wp_enqueue_script('jquery-ui-slider');
140
- wp_enqueue_script('jquery-ui-timepicker-addon-js', '//cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.3/jquery-ui-timepicker-addon.min.js', array("jquery-ui-datepicker"));
141
  }
142
  }
143
 
@@ -190,6 +190,8 @@ function wordpress_file_upload_function($incomingfromhandler) {
190
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
191
  $shortcode_tag = 'wordpress_file_upload';
192
  $params = wfu_plugin_parse_array($incomingfromhandler);
 
 
193
  $sid = $params["uploadid"];
194
  // store current page and blog id in params array
195
  $params["pageid"] = $post->ID;
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
+ Version: 4.5.1
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
128
  //do not load JQuery UI css if $ret_data denotes incompatibility issues
129
  if ( ( !isset($ret_data["correct_NextGenGallery_incompatibility"]) || $ret_data["correct_NextGenGallery_incompatibility"] != "true" ) &&
130
  ( !isset($ret_data["correct_JQueryUI_incompatibility"]) || $ret_data["correct_JQueryUI_incompatibility"] != "true" ) )
131
+ wp_enqueue_style('jquery-ui-css', WPFILEUPLOAD_DIR.'vendor/jquery/jquery-ui.min.css');
132
  //do not load timepicker css if $ret_data exclude_timepicker flag is true
133
  if ( !isset($ret_data["exclude_timepicker"]) || $ret_data["exclude_timepicker"] != "true" )
134
+ wp_enqueue_style('jquery-ui-timepicker-addon-css', WPFILEUPLOAD_DIR.'vendor/jquery/jquery-ui-timepicker-addon.min.css');
135
  wp_enqueue_script('json2');
136
  wp_enqueue_script('wordpress_file_upload_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_functions.js');
137
  //do not load timepicker js if $ret_data exclude_timepicker flag is true
138
  if ( !isset($ret_data["exclude_timepicker"]) || $ret_data["exclude_timepicker"] != "true" ) {
139
  wp_enqueue_script('jquery-ui-slider');
140
+ wp_enqueue_script('jquery-ui-timepicker-addon-js', WPFILEUPLOAD_DIR.'vendor/jquery/jquery-ui-timepicker-addon.min.js', array("jquery-ui-datepicker"));
141
  }
142
  }
143
 
190
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
191
  $shortcode_tag = 'wordpress_file_upload';
192
  $params = wfu_plugin_parse_array($incomingfromhandler);
193
+ //sanitize params
194
+ $params = wfu_sanitize_shortcode_array($params, $shortcode_tag);
195
  $sid = $params["uploadid"];
196
  // store current page and blog id in params array
197
  $params["pageid"] = $post->ID;