WordPress File Upload - Version 3.3.0

Version Description

  • userdatalabel attribute changed to allow many field types
  • added the following user data field types: simple text, multiline text, number, email, confirmation email, password, confirmation password, checkbox, radiobutton, date, time, datetime, listbox and dropdown list
  • added several options to configure the new user data fields: label text (to define the label of the field), label position (to define the position of the label in relation to the field), required option (to define if the field needs to be filled before file upload), do-not-autocomplete option (to prevent the browsers for completing the field automatically), validate option (to perform validity checks of the field before file upload depending on its type), default text (to define a default value), group id (to group fields together such as multiple radio buttons), format text (to define field formatting depending on the field type), typehook option (to enable field validation during typing inside the field), hint position (to define the position of the message that will be shown to prompt the user that a required field is empty or is not validated) as well as an option to define additional data depending on the field type (e.g. define list of items of a listbox or dropdown list)
  • Shortcode Composer changed to support the new user data fields and options
  • placement attribute can accept more than one instances of userdata
  • fixed bug not showing date selector of date fields in Shortcode Composer when working with Firefox or IE browsers
  • in some cases required userdata input field will turn red if not populated
  • shortcode_exists and wp_slash fixes for working before 3.6 Wordpress version
  • minor bug fixes
Download this release

Release Info

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

Code changes from version 3.2.1 to 3.3.0

css/wordpress_file_upload_adminstyle.css CHANGED
@@ -1 +1 @@
1
- div.wfu_help_container,div.wfu_restore_container{display:inline-block;top:4px}div.wfu_shortcode_container{display:inline-block;position:relative;width:50%;padding:0;margin:0;background:0 0;border:none}div.wfu_container input.wfu_long_text,textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container,div.wfu_restore_container,div.wfu_td_div{padding:0;position:relative;margin:0;background:0 0;border:none}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 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%}div.wfu_container input.wfu_short_text{width:60px}div.wfu_container input{width:200px}div.wfu_container input[type=checkbox]{width:auto}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}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{background-color:#ddd}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;height:auto;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;user-select:none;cursor:default}select.wfu_variable,span.wfu_variable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;margin:0;font-size:smaller;background-color:#ddd;border:1px solid #ccc;color:#333}span.wfu_variable{padding:1px;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;user-select:none;cursor:default}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{border:none;margin:0;padding:0;background:0 0}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{margin:0;width:100%;padding: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_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_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;filter:alpha(opacity=40);-khtml-opacity:.4;opacity:.4}div.wfu_component_box_base,div.wfu_component_box_dragged{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";-moz-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_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;cursor:default;z-index:1}div.wfu_component_box_dragged{filter:alpha(opacity=40);-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{position:absolute;padding:0;background-color:silver;border:none;display:none}div.wfu_component_bar_hor{width:auto;height:4px;left:10px;right:0;margin:11px 0 0}div.wfu_component_bar_ver{width:4px;height:40px;margin:-6px 0 0 11px}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_userdata_action,div.wfu_userdata_container{position:relative;padding:0;margin:0;background:0 0}div.wfu_componentlist_dragdrop_dragover{border:4px dashed #555}div.wfu_userdata_container{display:block;width:100%;height:100%;border:none}div.wfu_userdata_action{display:inline-block;top:2px;width:16px;height:16px;text-align:center;border:1px solid transparent;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px}div.wfu_userdata_action:hover{border:1px solid #aaa}div.wfu_userdata_action.wfu_userdata_action_disabled:hover{border:1px solid transparent}div.wfu_color_container,div.wfu_userdata_line{margin:0;display:block;position:relative;padding:0;background:0 0;border:none;white-space:nowrap}div.wfu_userdata_action>img{width:12px;height:12px}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_color_container{z-index:1}span.wfu_save_label,span.wfu_save_label_fail{font-size:smaller;border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;opacity:0}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}button.wfu_columns_addbutton{margin:0 10px;font-size:smaller}option.wfu_columns_item_required{color:gray}
1
+ div.wfu_help_container,div.wfu_restore_container{display:inline-block;top:4px}div.wfu_shortcode_container{display:inline-block;position:relative;width:50%;padding:0;margin:0;background:0 0;border:none}div.wfu_container input.wfu_long_text,textarea.wfu_shortcode{width:100%}div.wfu_container{margin-top:10px}div.wfu_help_container,div.wfu_restore_container,div.wfu_td_div{position:relative;padding:0;margin:0;background:0 0;border:none}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 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%}div.wfu_container input.wfu_short_text{width:60px}div.wfu_container input{width:200px}div.wfu_container input[type=checkbox]{width:auto}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}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{background-color:#ddd}table.wfu_main_table tr.wfu_subcategory>th{padding-top:0;padding-bottom:0}select.wfu_variable{padding:0;height:auto;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;user-select:none;cursor:default}select.wfu_variable,span.wfu_variable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;margin:0;font-size:smaller;background-color:#ddd;border:1px solid #ccc;color:#333}span.wfu_variable{padding:1px;-webkit-border-radius:5px;-moz-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;user-select:none;cursor:default}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{border:none;margin:0;padding:0;background:0 0}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{margin:0;width:100%;padding: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_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_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,div.wfu_component_box_base{cursor:default;font-size:12px;line-height:1;white-space:normal}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_base{display:block;position:absolute;left:-1px;top:-1px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:4px;filter:alpha(opacity=40);-khtml-opacity:.4;opacity:.4}div.wfu_component_box_base,div.wfu_component_box_dragged{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";-moz-opacity:.4}div.wfu_component_box,div.wfu_component_box_base{width:80px;height:30px;background-color:#ddd;border:1px solid #bbb}div.wfu_component_box{display:inline-block;position:relative;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;padding:4px;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;cursor:default;z-index:1}div.wfu_component_box_dragged{filter:alpha(opacity=40);-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{padding:0;position:absolute;background-color:silver;border:none;display:none}div.wfu_component_bar_hor{width:auto;height:4px;left:10px;right:0;margin:11px 0 0}div.wfu_component_bar_ver{width:4px;height:40px;margin:-6px 0 0 11px}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{font-size:smaller;border-radius:6px;padding:1px 2px;box-shadow:1px 1px 1px;opacity:0}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}button.wfu_columns_addbutton{margin:0 10px;font-size:smaller}option.wfu_columns_item_required{color:gray}
css/wordpress_file_upload_style.css CHANGED
@@ -1 +1 @@
1
- table.wfu_overlay_table td,td.file_messageblock_filenumber_td{text-align:center;vertical-align:middle}input[type=text].file_input_textbox{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:#fff;color:#000}input[type=text].file_input_textbox:disabled{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:#fff;color:silver}input[type=text].file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:red;color:#000}form.file_input_uploadform{position:relative;width:100px;height:27px;overflow:hidden;margin:0;padding:0}input[type=button].file_input_button{color:#555;border-color:#BBB;border-radius:2px}input[type=button].file_input_button,input[type=button].file_input_button_hover{top:0;position:absolute;width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input[type=button].file_input_button_hover{color:#111;border-color:#333;border-radius:2px}input[type=button].file_input_button:disabled,input[type=button].file_input_button_hover:disabled{position:absolute;top:0;color:silver;border-radius:2px}input[type=button].file_input_button:disabled,input[type=button].file_input_button_hover:disabled,input[type=button].file_input_submit{width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input[type=button].file_input_submit{position:relative;color:#555;border-radius:2px}input[type=button].file_input_submit:focus,input[type=button].file_input_submit:hover{color:#111;border-color:#333;border-radius:2px}input[type=button].file_input_submit:disabled,input[type=button].file_input_submit:focus,input[type=button].file_input_submit:hover{margin:0;padding:0;width:100px;height:27px;position:relative;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input[type=button].file_input_submit:disabled{color:silver;border-color:#BBB;border-radius:2px}input[type=file].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:auto;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:#fff}span.file_progress_noanimation,span.file_progress_progressive,span.file_progress_shuffle{overflow:hidden;margin:0;display:block;height:6px;padding:0;border-style:none;background-color:#2bc253;position:relative}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{width:0}span.file_progress_progressive{width:auto}span.file_progress_shuffle{width:25%;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0}to{left:75%}}@-moz-keyframes shuffle{from{left:0}to{left:75%}}@-o-keyframes shuffle{from{left:0}to{left:75%}}@keyframes shuffle{from{left:0}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;color:#000;line-height:1.2}div.file_div_clean,div.file_space_clean,div.subfolder_container,span.subfolder_label,table.file_table_clean,td.file_td_clean{padding:0;background:0 0}div.file_div_clean{display:table;position:relative;margin:0;border-style:none;color:#000;line-height:1}div.file_space_clean{display:block;margin:0 0 2px;border-style:none;color:#000}table.file_table_clean{margin:0;border:none;border-spacing:0;color:#000;width:auto}td.file_td_clean{margin:0;border:none;border-spacing:0;color:#000;vertical-align:middle}span.subfolder_label{margin:0;border-style:none;color:#000}div.subfolder_container{margin:0;height:25px;border-style:none;color:#000;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;border-style:none;background:0 0;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:0 0;overflow:hidden}select.subfolder_autoplus_dropdown,select.subfolder_autoplus_dropdown:disabled,select.subfolder_autoplus_dropdown_prompt{padding:0;width:100%;left:-100%;position:absolute;border:none}input[type=text].subfolder_autoplus{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0}input[type=text].subfolder_autoplus:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver}input[type=text].subfolder_autoplus_match{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic}input[type=text].subfolder_autoplus_match:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic;color:silver}input[type=text].subfolder_autoplus_empty{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver;font-style:italic}input[type=text].subfolder_autoplus_prompt{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;background:red}select.subfolder_dropdown{margin:0;padding:0;height:25px;border:none;background:0 0;color:#000}select.subfolder_autoplus_dropdown{height:100%;background:0 0;color:#000;margin:0 0 0 20px}select.subfolder_dropdown_prompt{margin:0;padding:0;height:25px;border:none;background:red;color:#000}select.subfolder_autoplus_dropdown_prompt{height:100%;background:red;color:#000;margin:0 0 0 20px}select.subfolder_dropdown:disabled{margin:0;padding:0;height:25px;border:none;background:0 0;color:silver}select.subfolder_autoplus_dropdown:disabled{height:100%;background:0 0;color:silver;margin:0 0 0 20px}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option,select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:#fff;color:#000}span.file_title_clean{margin:0;padding:0;border-style:none;background:0 0;color:#000}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{margin:0;width:40%;display:inline-block}input[type=text].file_userdata_message,input[type=text].file_userdata_message_required{width:60%;height:25px;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:#000}input[type=text].file_userdata_message:disabled,input[type=text].file_userdata_message_required:disabled{width:60%;height:25px;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:silver}input[type=text].file_userdata_message_required_empty{width:60%;height:25px;margin:0;padding:0;border:1px solid #BBB;box-shadow:inset 0 0 2px 2px red;color:#000}input[type=text].file_userdata_message_required_empty::after{content:'not empty'}div.file_userdata_hint:after,div.file_userdata_hint:before{position:absolute;content:'';display:inline-block}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_down,div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;margin:5px 1px 1px 5px;font-size:0;line-height:0}div.file_messageblock_header_arrow_up{border-bottom:5px solid #555}div.file_messageblock_header_arrow_down{border-top:5px solid #555}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:0 0;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:0 0;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}label.file_messageblock_fileheader_label,td.file_messageblock_filenumber_td{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}td.file_messageblock_filearrow_td{margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_down,div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;margin:5px 1px 1px 6px;font-size:0;line-height:0}div.file_messageblock_file_arrow_up{border-bottom:4px solid #555}div.file_messageblock_file_arrow_down{border-top:4px solid #555}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:#fff;line-height:1}.wfu_browser_container:hover div.wfu_overlay_editor,.wfu_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:#ff0}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:0 0;border:none;margin:0;padding:0;width:100%;height:100%;outline:0}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table td,table.wfu_overlay_table tr{border:none;margin:0;padding:0;background:0 0;width:100%;height:100%}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:0 0}div.wfu_overlay_container label{margin-left:4px}
1
+ input[type=text].file_input_textbox{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:#fff;color:#000}input[type=text].file_input_textbox:disabled{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:#fff;color:silver}input[type=text].file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:red;color:#000}form.file_input_uploadform{position:relative;width:100px;height:27px;overflow:hidden;margin:0;padding:0}input[type=button].file_input_button{color:#555;border-color:#BBB;border-radius:2px}input[type=button].file_input_button,input[type=button].file_input_button_hover{top:0;position:absolute;width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input[type=button].file_input_button_hover{color:#111;border-color:#333;border-radius:2px}input[type=button].file_input_button:disabled,input[type=button].file_input_button_hover:disabled{position:absolute;top:0;color:silver;border-radius:2px}input[type=button].file_input_button:disabled,input[type=button].file_input_button_hover:disabled,input[type=button].file_input_submit{width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input[type=button].file_input_submit{position:relative;color:#555;border-radius:2px}input[type=button].file_input_submit:focus,input[type=button].file_input_submit:hover{color:#111;border-color:#333;border-radius:2px}input[type=button].file_input_submit:disabled,input[type=button].file_input_submit:focus,input[type=button].file_input_submit:hover{margin:0;padding:0;width:100px;height:27px;position:relative;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input[type=button].file_input_submit:disabled{color:silver;border-color:#BBB;border-radius:2px}input[type=file].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:auto;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:#fff}span.file_progress_noanimation,span.file_progress_progressive,span.file_progress_shuffle{overflow:hidden;margin:0;display:block;height:6px;padding:0;border-style:none;background-color:#2bc253;position:relative}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{width:0}span.file_progress_progressive{width:auto}span.file_progress_shuffle{width:25%;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0}to{left:75%}}@-moz-keyframes shuffle{from{left:0}to{left:75%}}@-o-keyframes shuffle{from{left:0}to{left:75%}}@keyframes shuffle{from{left:0}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;color:#000;line-height:1.2}div.file_div_clean,div.file_space_clean,div.subfolder_container,span.subfolder_label,table.file_table_clean,td.file_td_clean{padding:0;background:0 0}div.file_div_clean{display:table;position:relative;margin:0;border-style:none;color:#000;line-height:1}div.file_space_clean{display:block;margin:0 0 2px;border-style:none;color:#000}table.file_table_clean{margin:0;border:none;border-spacing:0;color:#000;width:auto}td.file_td_clean{margin:0;border:none;border-spacing:0;color:#000;vertical-align:middle}span.subfolder_label{margin:0;border-style:none;color:#000}div.subfolder_container{margin:0;height:25px;border-style:none;color:#000;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;border-style:none;background:0 0;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:0 0;overflow:hidden}select.subfolder_autoplus_dropdown,select.subfolder_autoplus_dropdown:disabled,select.subfolder_autoplus_dropdown_prompt{padding:0;border:none;width:100%;left:-100%;position:absolute}input[type=text].subfolder_autoplus{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0}input[type=text].subfolder_autoplus:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver}input[type=text].subfolder_autoplus_match{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic}input[type=text].subfolder_autoplus_match:disabled{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;font-weight:700;font-style:italic;color:silver}input[type=text].subfolder_autoplus_empty{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;color:silver;font-style:italic}input[type=text].subfolder_autoplus_prompt{width:100%;height:100%;border:none;box-shadow:none;padding:0;margin:0;background:red}select.subfolder_dropdown{margin:0;padding:0;height:25px;border:none;background:0 0;color:#000}select.subfolder_autoplus_dropdown{height:100%;background:0 0;color:#000;margin:0 0 0 20px}select.subfolder_dropdown_prompt{margin:0;padding:0;height:25px;border:none;background:red;color:#000}select.subfolder_autoplus_dropdown_prompt{height:100%;background:red;color:#000;margin:0 0 0 20px}select.subfolder_dropdown:disabled{margin:0;padding:0;height:25px;border:none;background:0 0;color:silver}select.subfolder_autoplus_dropdown:disabled{height:100%;background:0 0;color:silver;margin:0 0 0 20px}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option,select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:#fff;color:#000}span.file_title_clean{margin:0;padding:0;border-style:none;background:0 0;color:#000}div.file_userdata_fieldwrapper,div.file_userdata_fieldwrapper_required,div.file_userdata_fieldwrapper_required_empty{position:relative;display:inline-block;width:60%;height:25px;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_fieldwrapper div.wfu_fieldwrapper_overlay,div.file_userdata_fieldwrapper_required div.wfu_fieldwrapper_overlay{position:absolute;display:none;width:100%;height:100%;margin:0;padding:0;background:0 0;border:none;box-shadow:none;z-index:1000001}div.file_userdata_fieldwrapper_required_empty div.wfu_fieldwrapper_overlay{position:absolute;display:block;width:100%;height:100%;margin:0;padding:0;background:0 0;border:2px solid red;box-shadow:none;z-index:1000001}div.file_userdata_radio_wrapper{position:relative;display:inline-block;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{margin:0;width:40%;display:inline-block}.file_userdata_message,.file_userdata_message_required{width:100%;height:100%;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:#000}.file_userdata_message:disabled,.file_userdata_message_required:disabled{width:100%;height:100%;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:silver}.file_userdata_message_required_empty{width:100%;height:100%;margin:0;padding:0;border:1px solid #BBB;box-shadow:inset 0 0 2px 2px red;color:#000}.file_userdata_message_required_empty::after{content:'not empty'}div.file_userdata_hint:after,div.file_userdata_hint:before{content:'';position:absolute;display:inline-block}.file_userdata_checkbox_description{width:100%;height:100%;white-space:normal}.file_userdata_dropdown,.file_userdata_listbox{width:100%;height:100%}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_none{display:none}div.file_userdata_hint_inline{position:absolute;display:table;background:#eee;border:none;padding:6px;margin:auto 0;box-shadow:none;z-index:1000000}div.file_userdata_hint_bottom,div.file_userdata_hint_left,div.file_userdata_hint_right,div.file_userdata_hint_top{background:#eee;padding:6px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_bottom:after,div.file_userdata_hint_bottom:before,div.file_userdata_hint_left:after,div.file_userdata_hint_left:before,div.file_userdata_hint_right:after,div.file_userdata_hint_right:before,div.file_userdata_hint_top:after,div.file_userdata_hint_top:before{position:absolute;content:'';display:inline-block}div.file_userdata_hint_right{position:absolute;border:1px solid red;border-radius:6px;margin-left:10px}div.file_userdata_hint_right:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint_right:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_left{position:absolute;border:1px solid red;border-radius:6px;margin-right:10px}div.file_userdata_hint_left:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #eee;border-left-color:red;right:-8px;top:6px}div.file_userdata_hint_left:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #eee;right:-6px;top:7px}div.file_userdata_hint_top{position:absolute;border:1px solid red;border-radius:6px;margin-bottom:10px}div.file_userdata_hint_top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #eee;border-top-color:red;bottom:-8px;left:6px}div.file_userdata_hint_top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #eee;bottom:-6px;left:7px}div.file_userdata_hint_bottom{position:absolute;border:1px solid red;border-radius:6px;margin-top:10px}div.file_userdata_hint_bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #eee;border-bottom-color:red;top:-8px;left:6px}div.file_userdata_hint_bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #eee;top:-6px;left:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_down,div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;margin:5px 1px 1px 5px;font-size:0;line-height:0}div.file_messageblock_header_arrow_up{border-bottom:5px solid #555}div.file_messageblock_header_arrow_down{border-top:5px solid #555}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:0 0;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:0 0;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}label.file_messageblock_fileheader_label,td.file_messageblock_filenumber_td{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;text-align:center;vertical-align:middle;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}td.file_messageblock_filearrow_td{margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_down,div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;margin:5px 1px 1px 6px;font-size:0;line-height:0}div.file_messageblock_file_arrow_up{border-bottom:4px solid #555}div.file_messageblock_file_arrow_down{border-top:4px solid #555}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:#fff;line-height:1}.wfu_browser_container:hover div.wfu_overlay_editor,.wfu_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:#ff0}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:0 0;border:none;margin:0;padding:0;width:100%;height:100%;outline:0}img.wfu_overlay_editor_img{vertical-align:top}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table td,table.wfu_overlay_table tr{border:none;margin:0;padding:0;background:0 0;width:100%;height:100%}table.wfu_overlay_table td{text-align:center;vertical-align:middle}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:0 0}div.wfu_overlay_container label{margin-left:4px}
css/wordpress_file_upload_style_relaxed.css CHANGED
@@ -1 +1 @@
1
- table.wfu_overlay_table td,td.file_messageblock_filenumber_td{text-align:center;vertical-align:middle}input[type=text].file_input_textbox,input[type=text].file_input_textbox:disabled,input[type=text].file_input_textbox_nofile{position:relative}form.file_input_uploadform{position:relative;overflow:hidden}input[type=file].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:auto;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:#fff}span.file_progress_noanimation,span.file_progress_progressive,span.file_progress_shuffle{overflow:hidden;margin:0;display:block;height:6px;padding:0;border-style:none;background-color:#2bc253;position:relative}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{width:0}span.file_progress_progressive{width:auto}span.file_progress_shuffle{width:25%;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0}to{left:75%}}@-moz-keyframes shuffle{from{left:0}to{left:75%}}@-o-keyframes shuffle{from{left:0}to{left:75%}}@keyframes shuffle{from{left:0}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;line-height:1.2}div.file_div_clean,div.file_space_clean,div.subfolder_autoplus_container,div.subfolder_container{background:0 0;border-style:none}div.file_div_clean{display:table;position:relative;margin:0;padding:0;line-height:1}div.file_space_clean{display:block;margin:0 0 2px;padding:0}table.file_table_clean{margin:0;padding:0;border:none;border-spacing:0;background:0 0;width:auto}td.file_td_clean{margin:0;padding:0;border:none;border-spacing:0;background:0 0;vertical-align:middle}div.subfolder_container{margin:0;padding:0;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:0 0;overflow:hidden}select.subfolder_autoplus_dropdown_prompt,select.subfolder_dropdown_prompt{background:red}select.subfolder_autoplus_dropdown,select.subfolder_autoplus_dropdown:disabled,select.subfolder_autoplus_dropdown_prompt{width:100%;height:100%;left:-100%;position:absolute;margin-left:20px}input[type=text].subfolder_autoplus,input[type=text].subfolder_autoplus:disabled{width:100%}input[type=text].subfolder_autoplus_match,input[type=text].subfolder_autoplus_match:disabled{width:100%;font-weight:700;font-style:italic}input[type=text].subfolder_autoplus_empty{width:100%;font-style:italic}input[type=text].subfolder_autoplus_prompt{width:100%;background:red}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option,select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:#fff}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{width:40%;display:inline-block}input[type=text].file_userdata_message,input[type=text].file_userdata_message:disabled,input[type=text].file_userdata_message_required,input[type=text].file_userdata_message_required:disabled{width:60%}input[type=text].file_userdata_message_required_empty{width:60%;box-shadow:inset 0 0 2px 2px red}input[type=text].file_userdata_message_required_empty::after{content:'not empty'}div.file_userdata_hint:after,div.file_userdata_hint:before{position:absolute;content:'';display:inline-block}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_down,div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;margin:5px 1px 1px 5px;font-size:0;line-height:0}div.file_messageblock_header_arrow_up{border-bottom:5px solid #555}div.file_messageblock_header_arrow_down{border-top:5px solid #555}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:0 0;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:0 0;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}label.file_messageblock_fileheader_label,td.file_messageblock_filenumber_td{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}td.file_messageblock_filearrow_td{margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_down,div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;margin:5px 1px 1px 6px;font-size:0;line-height:0}div.file_messageblock_file_arrow_up{border-bottom:4px solid #555}div.file_messageblock_file_arrow_down{border-top:4px solid #555}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:#fff;line-height:1}.wfu_browser_container:hover div.wfu_overlay_editor,.wfu_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:#ff0}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:0 0;border:none;margin:0;padding:0;width:100%;height:100%;outline:0}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table td,table.wfu_overlay_table tr{border:none;margin:0;padding:0;background:0 0;width:100%;height:100%}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:0 0}div.wfu_overlay_container label{margin-left:4px}
1
+ input[type=text].file_input_textbox,input[type=text].file_input_textbox:disabled,input[type=text].file_input_textbox_nofile{position:relative}form.file_input_uploadform{position:relative;overflow:hidden}input[type=file].file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}div.file_progress_bar{display:block;position:relative;width:auto;border:1px solid #333;margin:0;padding:4px}div.file_progress_inner{display:block;width:100%;height:6px;margin:0;padding:0;border:1px solid silver;background-color:#fff}span.file_progress_noanimation,span.file_progress_progressive,span.file_progress_shuffle{overflow:hidden;margin:0;display:block;height:6px;padding:0;border-style:none;background-color:#2bc253;position:relative}img.file_progress_imagesafe{width:100%;height:6px}span.file_progress_noanimation{width:0}span.file_progress_progressive{width:auto}span.file_progress_shuffle{width:25%;-webkit-animation:shuffle 1s linear infinite alternate;-moz-animation:shuffle 1s linear infinite alternate;-o-animation:shuffle 1s linear infinite alternate;animation:shuffle 1s linear infinite alternate}span.file_progress_progressive:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;-webkit-animation:lengthen 2s linear infinite;-moz-animation:lengthen 2s linear infinite;-o-animation:lengthen 2s linear infinite;animation:lengthen 2s linear infinite;overflow:hidden}@-webkit-keyframes shuffle{from{left:0}to{left:75%}}@-moz-keyframes shuffle{from{left:0}to{left:75%}}@-o-keyframes shuffle{from{left:0}to{left:75%}}@keyframes shuffle{from{left:0}to{left:75%}}@-webkit-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-moz-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@-o-keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}@keyframes lengthen{from{background-position:0 0}to{background-position:30px 30px}}span.file_messagebox_inner{display:block;width:340px;margin:0;font-size:small;padding:10px;border-style:solid;border-width:1px;border-color:#D3D3D3;background-color:#F5F5F5;line-height:1.2}div.file_div_clean,div.file_space_clean,div.subfolder_autoplus_container,div.subfolder_container{background:0 0;border-style:none}div.file_div_clean{display:table;position:relative;margin:0;padding:0;line-height:1}div.file_space_clean{display:block;margin:0 0 2px;padding:0}table.file_table_clean{margin:0;padding:0;border:none;border-spacing:0;background:0 0;width:auto}td.file_td_clean{margin:0;padding:0;border:none;border-spacing:0;background:0 0;vertical-align:middle}div.subfolder_container{margin:0;padding:0;position:relative;display:inline-block}div.subfolder_autoplus_container{margin:0;padding:0 20px 0 0;display:inline-block;width:100%;height:100%}div.subfolder_autoplus_select_container{position:absolute;width:100%;height:100%;top:0;left:100%;margin:0 0 0 -20px;padding:0;border:none;background:0 0;overflow:hidden}select.subfolder_autoplus_dropdown_prompt,select.subfolder_dropdown_prompt{background:red}select.subfolder_autoplus_dropdown,select.subfolder_autoplus_dropdown:disabled,select.subfolder_autoplus_dropdown_prompt{height:100%;width:100%;left:-100%;position:absolute;margin-left:20px}input[type=text].subfolder_autoplus,input[type=text].subfolder_autoplus:disabled{width:100%}input[type=text].subfolder_autoplus_match,input[type=text].subfolder_autoplus_match:disabled{width:100%;font-weight:700;font-style:italic}input[type=text].subfolder_autoplus_empty{width:100%;font-style:italic}input[type=text].subfolder_autoplus_prompt{width:100%;background:red}select.subfolder_autoplus_dropdown option,select.subfolder_autoplus_dropdown_prompt option,select.subfolder_dropdown option,select.subfolder_dropdown_prompt option{background:#fff}div.file_userdata_fieldwrapper,div.file_userdata_fieldwrapper_required,div.file_userdata_fieldwrapper_required_empty{position:relative;display:inline-block;width:60%;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_fieldwrapper div.wfu_fieldwrapper_overlay,div.file_userdata_fieldwrapper_required div.wfu_fieldwrapper_overlay{position:absolute;display:none;width:100%;height:100%;margin:0;padding:0;background:0 0;border:none;box-shadow:none;z-index:1000001}div.file_userdata_fieldwrapper_required_empty div.wfu_fieldwrapper_overlay{position:absolute;display:block;width:100%;height:100%;margin:0;padding:0;background:0 0;border:2px solid red;box-shadow:none;z-index:1000001}div.file_userdata_radio_wrapper{position:relative;display:inline-block;margin:0;padding:0;background:0 0;border:none;box-shadow:none}div.file_userdata_container{margin:0;padding:0;white-space:nowrap;position:relative}label.file_userdata_label{width:40%;display:inline-block}.file_userdata_checkbox_description,.file_userdata_dropdown,.file_userdata_listbox,.file_userdata_message,.file_userdata_message:disabled,.file_userdata_message_required,.file_userdata_message_required:disabled{width:100%;height:100%}.file_userdata_message_required_empty{width:100%;height:100%;box-shadow:inset 0 0 2px 2px red}.file_userdata_message_required_empty::after{content:'not empty'}div.file_userdata_hint:after,div.file_userdata_hint:before{content:'';position:absolute;display:inline-block}.file_userdata_checkbox_description{white-space:normal}div.file_userdata_hint{position:absolute;background:#eee;border:1px solid red;border-radius:6px;padding:6px;margin-left:10px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_none{display:none}div.file_userdata_hint_inline{position:absolute;display:table;background:#eee;border:none;padding:6px;margin:auto 0;box-shadow:none;z-index:1000000}div.file_userdata_hint_bottom,div.file_userdata_hint_left,div.file_userdata_hint_right,div.file_userdata_hint_top{background:#eee;padding:6px;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:1000000}div.file_userdata_hint_bottom:after,div.file_userdata_hint_bottom:before,div.file_userdata_hint_left:after,div.file_userdata_hint_left:before,div.file_userdata_hint_right:after,div.file_userdata_hint_right:before,div.file_userdata_hint_top:after,div.file_userdata_hint_top:before{position:absolute;content:'';display:inline-block}div.file_userdata_hint_right{position:absolute;border:1px solid red;border-radius:6px;margin-left:10px}div.file_userdata_hint_right:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #eee;border-right-color:red;left:-8px;top:6px}div.file_userdata_hint_right:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #eee;left:-6px;top:7px}div.file_userdata_hint_left{position:absolute;border:1px solid red;border-radius:6px;margin-right:10px}div.file_userdata_hint_left:before{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #eee;border-left-color:red;right:-8px;top:6px}div.file_userdata_hint_left:after{border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #eee;right:-6px;top:7px}div.file_userdata_hint_top{position:absolute;border:1px solid red;border-radius:6px;margin-bottom:10px}div.file_userdata_hint_top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #eee;border-top-color:red;bottom:-8px;left:6px}div.file_userdata_hint_top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #eee;bottom:-6px;left:7px}div.file_userdata_hint_bottom{position:absolute;border:1px solid red;border-radius:6px;margin-top:10px}div.file_userdata_hint_bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #eee;border-bottom-color:red;top:-8px;left:6px}div.file_userdata_hint_bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #eee;top:-6px;left:7px}table.file_messageblock_table{margin:0;padding:0;border:none}td.file_messageblock_header_td{border:1px solid #ddd;margin:0;padding:0}div.file_messageblock_header{margin:0;padding:2px}label.file_messageblock_header_label{font-weight:700;font-size:12px;line-height:1}td.file_messageblock_arrow_td{border:1px solid #ddd;margin:0;padding:0;width:20px;vertical-align:middle}div.file_messageblock_header_arrow_down,div.file_messageblock_header_arrow_up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;margin:5px 1px 1px 5px;font-size:0;line-height:0}div.file_messageblock_header_arrow_up{border-bottom:5px solid #555}div.file_messageblock_header_arrow_down{border-top:5px solid #555}td.file_messageblock_subheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_subheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_subheader_messagelabel{font-weight:400;font-size:12px;line-height:1}div.file_messageblock_subheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7;overflow:scroll}label.file_messageblock_subheader_debugmessage_label{margin:0;padding:0;background:0 0;border:none;font-weight:700}div.file_messageblock_subheader_debugmessage_container{margin:0 0 0 20px;padding:0;background:0 0;border:none;font-size:10px}label.file_messageblock_subheader_adminmessagelabel{font-weight:400;font-size:12px;font-style:italic;line-height:1}label.file_messageblock_fileheader_label,td.file_messageblock_filenumber_td{font-weight:700;font-size:11px;line-height:1}td.file_messageblock_filenumber_td{width:30px;margin:0;padding:2px;text-align:center;vertical-align:middle;border:1px solid #ddd}td.file_messageblock_fileheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_fileheader{margin:0;padding:2px}td.file_messageblock_filearrow_td{margin:0;padding:0;width:20px;border:1px solid #ddd;vertical-align:middle}div.file_messageblock_file_arrow_down,div.file_messageblock_file_arrow_up{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;margin:5px 1px 1px 6px;font-size:0;line-height:0}div.file_messageblock_file_arrow_up{border-bottom:4px solid #555}div.file_messageblock_file_arrow_down{border-top:4px solid #555}td.file_messageblock_filesubheaderempty_td{width:30px;margin:0;padding:0;border:1px solid #ddd}td.file_messageblock_filesubheader_td{margin:0;padding:0;border:1px solid #ddd}div.file_messageblock_filesubheader_message{margin:0;padding:2px;background:0 0}label.file_messageblock_filesubheader_messagelabel{font-weight:400;font-size:11px;line-height:1}div.file_messageblock_filesubheader_adminmessage{margin:0;padding:2px;background-color:#F7F7F7}label.file_messageblock_filesubheader_adminmessagelabel{font-weight:400;font-size:11px;font-style:italic;line-height:1}div.wfu_overlay_editor{width:18px;height:18px;padding:2px;box-shadow:1px 1px 2px #aaa;position:absolute;top:0;left:0;z-index:2;display:none;background-color:#fff;line-height:1}.wfu_browser_container:hover div.wfu_overlay_editor,.wfu_container:hover div.wfu_overlay_editor{display:block}div.wfu_overlay_editor:hover{background-color:#ff0}button.wfu_overlay_editor_button,button.wfu_overlay_editor_button:focus{background:0 0;border:none;margin:0;padding:0;width:100%;height:100%;outline:0}img.wfu_overlay_editor_img{vertical-align:top}div.wfu_overlay_container{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background-color:rgba(255,255,255,.7);z-index:2;display:none}table.wfu_overlay_table,table.wfu_overlay_table td,table.wfu_overlay_table tr{border:none;margin:0;padding:0;background:0 0;width:100%;height:100%}table.wfu_overlay_table td{text-align:center;vertical-align:middle}div.wfu_overlay_container_inner{position:absolute;width:100%;height:100%;top:0;left:0;margin:0;padding:0;background:0 0}div.wfu_overlay_container label{margin-left:4px}
css/wordpress_file_upload_style_safe.css CHANGED
@@ -1 +1 @@
1
- input.file_input_textbox,input.file_input_textbox:disabled,input.file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB}input.file_input_textbox{background-color:#fff;color:#000}input.file_input_textbox:disabled{background-color:#fff;color:silver}input.file_input_textbox_nofile{background-color:red;color:#000}input.file_input_button,input.file_input_button_hover{top:0;width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-khtml-border-radius:2px}input.file_input_button{position:absolute;color:#555;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}input.file_input_button_hover{position:absolute;color:#111;border-color:#333;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}input.file_input_button:disabled,input.file_input_button_hover:disabled{position:absolute;top:0;color:silver;-moz-border-radius:2px;border-radius:2px}input.file_input_button:disabled,input.file_input_button_hover:disabled,input.file_input_submit{width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-khtml-border-radius:2px}input.file_input_submit{position:relative;color:#555;-moz-border-radius:2px;border-radius:2px}input.file_input_submit:focus,input.file_input_submit:hover{color:#111;border-color:#333;border-radius:2px}input.file_input_submit:disabled,input.file_input_submit:focus,input.file_input_submit:hover{margin:0;padding:0;width:100px;height:27px;position:relative;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input.file_input_submit:disabled{color:silver;border-color:#BBB;border-radius:2px}input.file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}input.file_userdata_message,input.file_userdata_message_required{width:60%;height:25px;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:#000}input.file_userdata_message:disabled,input.file_userdata_message_required:disabled{width:60%;height:25px;margin:0;padding:0;border:1px solid #BBB;background:0 0;color:silver}input.file_userdata_message_required_empty{width:60%;height:25px;margin:0;padding:0;border:1px solid #BBB;background-color:red;color:#000}
1
+ input.file_input_textbox,input.file_input_textbox:disabled,input.file_input_textbox_nofile{position:relative;width:150px;height:25px;margin:0;padding:0;border:1px solid #BBB}input.file_input_textbox{background-color:#fff;color:#000}input.file_input_textbox:disabled{background-color:#fff;color:silver}input.file_input_textbox_nofile{background-color:red;color:#000}input.file_input_button{color:#555;border-color:#BBB;-moz-border-radius:2px;border-radius:2px}input.file_input_button,input.file_input_button_hover{top:0;position:absolute;width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-khtml-border-radius:2px}input.file_input_button_hover{color:#111;border-color:#333;-moz-border-radius:2px;border-radius:2px}input.file_input_button:disabled,input.file_input_button_hover:disabled{position:absolute;top:0;color:silver;border-radius:2px}input.file_input_button:disabled,input.file_input_button_hover:disabled,input.file_input_submit{width:100px;height:27px;margin:0;padding:0;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#BBB;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input.file_input_submit{position:relative;color:#555;border-radius:2px}input.file_input_submit:focus,input.file_input_submit:hover{color:#111;border-color:#333;border-radius:2px}input.file_input_submit:disabled,input.file_input_submit:focus,input.file_input_submit:hover{margin:0;padding:0;width:100px;height:27px;position:relative;background-color:#EEE;background-image:url(../images/white-grad-active.png);background-position:left top;background-repeat:repeat-x;border-style:solid;border-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;-khtml-border-radius:2px}input.file_input_submit:disabled{color:silver;border-color:#BBB;border-radius:2px}input.file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}
css/wordpress_file_upload_style_safe_relaxed.css CHANGED
@@ -1 +1 @@
1
- input.file_input_textbox,input.file_input_textbox:disabled,input.file_input_textbox_nofile{position:relative}input.file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}input.file_userdata_message,input.file_userdata_message:disabled,input.file_userdata_message_required,input.file_userdata_message_required:disabled{width:60%}input.file_userdata_message_required_empty{width:60%;background-color:red}
1
+ input.file_input_textbox,input.file_input_textbox:disabled,input.file_input_textbox_nofile{position:relative}input.file_input_hidden{font-size:45px;position:absolute;right:0;top:0;margin:0;padding:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0}
js/wordpress_file_upload_adminfunctions.js CHANGED
@@ -1,2 +1,3 @@
1
- function wfu_admin_activate_tab(e){for(var t,l,a=document.getElementById("wfu_tab_container"),d=0;d<a.childNodes.length;d++)t=a.childNodes[d],1===t.nodeType&&(l=t.id.substr(8),t.className.indexOf("nav-tab-active")>-1&&(t.className="nav-tab",document.getElementById("wfu_container_"+l).style.display="none"));document.getElementById("wfu_tab_"+e).className="nav-tab nav-tab-active",document.getElementById("wfu_container_"+e).style.display="block"}function wfu_admin_onoff_clicked(e){var t=document.getElementById("wfu_attribute_"+e),l=document.getElementById("wfu_wrapper"),a=document.getElementsByClassName("wfu_shadow_"+e,"div",l),d=document.getElementsByClassName("wfu_shadow_"+e+"_inv","div",l),n="on"==t.className.substr(t.className.length-2);if(n=!n){document.getElementById("wfu_attribute_value_"+e).value="true",t.className="wfu_onoff_container_on";for(var u=0;u<a.length;u++)a[u].style.display="none";for(var u=0;u<d.length;u++)d[u].style.display="block"}else{document.getElementById("wfu_attribute_value_"+e).value="false",t.className="wfu_onoff_container_off";for(var u=0;u<a.length;u++)a[u].style.display="block";for(var u=0;u<d.length;u++)d[u].style.display="none"}wfu_generate_shortcode(),"userdata"==e&&wfu_update_userfield_variables()}function wfu_admin_radio_clicked(e){var t=document.getElementsByName("wfu_radioattribute_"+e),l=document.getElementById("wfu_wrapper"),a=document.getElementsByClassName("wfu_shadow_"+e,"div",l),d=document.getElementsByClassName("wfu_shadow_"+e+"_inv","div",l),n="";for(r=0;r<t.length;r++)t[r].checked&&(n=t[r].value);var u="*"==n.substr(0,1);if(u){n=n.substr(1);for(var r=0;r<a.length;r++)a[r].style.display="none";for(var r=0;r<d.length;r++)d[r].style.display="block"}else{for(var r=0;r<a.length;r++)a[r].style.display="block";for(var r=0;r<d.length;r++)d[r].style.display="none"}document.getElementById("wfu_attribute_value_"+e).value=n,wfu_generate_shortcode()}function wfu_addEventHandler(e,t,l){e.addEventListener?e.addEventListener(t,l,!1):e.attachEvent?e.attachEvent("on"+t,l):e["on"+t]=l}function wfu_attach_separator_dragdrop_events(){for(var e,t=document.getElementById("wfu_placements_container"),l=0;l<t.childNodes.length;l++)e=t.childNodes[l],("wfu_component_separator_hor"==e.className||"wfu_component_separator_ver"==e.className)&&(wfu_addEventHandler(e,"dragenter",wfu_separator_dragenter),wfu_addEventHandler(e,"dragover",wfu_default_dragover),wfu_addEventHandler(e,"dragleave",wfu_separator_dragleave),wfu_addEventHandler(e,"drop",wfu_separator_drop))}function wfu_Attach_Admin_DragDrop_Events(){if(window.FileReader){var e=document.getElementById("wfu_placements_container");if(e){for(var t,l=document.getElementById("wfu_componentlist_container"),a=0;a<e.childNodes.length;a++)t=e.childNodes[a],"wfu_component_box"==t.className&&(wfu_addEventHandler(t,"dragstart",wfu_component_dragstart),wfu_addEventHandler(t,"dragend",wfu_component_dragend));for(var a=0;a<l.childNodes.length;a++)if(t=l.childNodes[a],"wfu_component_box_container"==t.className)for(var d=0;d<t.childNodes.length;d++)"wfu_component_box wfu_inbase"==t.childNodes[d].className&&(wfu_addEventHandler(t.childNodes[d],"dragstart",wfu_component_dragstart),wfu_addEventHandler(t.childNodes[d],"dragend",wfu_component_dragend));t=document.getElementById("wfu_componentlist_dragdrop"),wfu_addEventHandler(t,"dragenter",wfu_componentlist_dragenter),wfu_addEventHandler(t,"dragover",wfu_default_dragover),wfu_addEventHandler(t,"dragleave",wfu_componentlist_dragleave),wfu_addEventHandler(t,"drop",wfu_componentlist_drop),wfu_attach_separator_dragdrop_events()}}}function wfu_componentlist_dragenter(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;var t=document.getElementById("wfu_componentlist_dragdrop");return-1==t.className.indexOf("wfu_componentlist_dragdrop_dragover")&&(t.className+=" wfu_componentlist_dragdrop_dragover"),!1}function wfu_componentlist_dragleave(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;var t=document.getElementById("wfu_componentlist_dragdrop");return t.className=t.className.replace(" wfu_componentlist_dragdrop_dragover",""),!1}function wfu_componentlist_drop(e){e=e||window.event,e.preventDefault&&e.preventDefault();var t=e.dataTransfer.getData("Component");if(!t)return!1;var l=document.getElementById("wfu_component_box_"+t);l.className="wfu_component_box wfu_inbase",l.style.display="block",document.getElementById("wfu_component_box_container_"+t).appendChild(l);var a=wfu_admin_recreate_placements_text(null,"");return wfu_admin_recreate_placements_panel(a),document.getElementById("wfu_attribute_value_placements").value=a,wfu_generate_shortcode(),!1}function wfu_separator_dragenter(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;if("wfu_component_separator_hor"==e.target.className){var t=document.getElementById("wfu_component_bar_hor");t.style.top=e.target.offsetTop+"px",t.style.display="block"}else if("wfu_component_separator_ver"==e.target.className){var t=document.getElementById("wfu_component_bar_ver");t.style.top=e.target.offsetTop+"px",t.style.left=e.target.offsetLeft+"px",t.style.display="block"}return!1}function wfu_default_dragover(e){return e=e||window.event,e.preventDefault&&e.preventDefault(),!1}function wfu_separator_dragleave(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;if("wfu_component_separator_hor"==e.target.className){var t=document.getElementById("wfu_component_bar_hor");t.style.display="none"}else if("wfu_component_separator_ver"==e.target.className){var t=document.getElementById("wfu_component_bar_ver");t.style.display="none"}return!1}function wfu_separator_drop(e){e=e||window.event,e.preventDefault&&e.preventDefault();var t=e.dataTransfer.getData("Component");if(!t)return!1;var l=document.getElementById("wfu_component_box_"+t);l.style.display="none",l.className="wfu_component_box wfu_inbase",document.getElementById("wfu_component_box_container_"+t).appendChild(l);var a=wfu_admin_recreate_placements_text(e.target,t);return wfu_admin_recreate_placements_panel(a),document.getElementById("wfu_attribute_value_placements").value=a,wfu_generate_shortcode(),!1}function wfu_component_dragstart(e){e=e||window.event,e.dataTransfer.setData("Component",e.target.id.replace("wfu_component_box_","")),-1==e.target.className.indexOf("wfu_component_box_dragged")&&(e.target.className+=" wfu_component_box_dragged",DraggedItem=e.target),e.target.style.zIndex=3;var t=document.getElementById("wfu_componentlist_dragdrop");return t.className="wfu_componentlist_dragdrop wfu_componentlist_dragdrop_dragover",t.style.display="block",!1}function wfu_component_dragend(e){e=e||window.event,DraggedItem=null,e.target.style.zIndex=1;var t=document.getElementById("wfu_componentlist_dragdrop");return t.style.display="none",t.className="wfu_componentlist_dragdrop",e.target.className=e.target.className.replace(" wfu_component_box_dragged",""),document.getElementById("wfu_component_bar_ver").style.display="none",document.getElementById("wfu_component_bar_hor").style.display="none",!1}function wfu_admin_recreate_placements_text(e,t){function l(e){""!=n&&(n+=d),n+=e,d=""}for(var a=document.getElementById("wfu_placements_container"),d="",n="",u=0;u<a.childNodes.length;u++)item=a.childNodes[u],"wfu_component_separator_ver"==item.className?(""==d&&(d="+"),item==e&&(l(t),d="+")):"wfu_component_separator_hor"==item.className?(d="/",item==e&&(l(t),d="/")):"wfu_component_box"==item.className&&l(item.id.replace("wfu_component_box_",""));return n}function wfu_admin_recreate_placements_panel(e){for(var t,l,a,d=document.getElementById("wfu_placements_container"),n="",u=0;u<d.childNodes.length;u++)t=d.childNodes[u],"wfu_component_box"==t.className&&(n=t.id.replace("wfu_component_box_",""),t.style.display="inline-block",t.className="wfu_component_box wfu_inbase",document.getElementById("wfu_component_box_container_"+n).appendChild(t));d.innerHTML="",l=e.split("/");for(var u=0;u<l.length;u++){t=document.createElement("DIV"),t.className="wfu_component_separator_hor",t.setAttribute("draggable",!0),d.appendChild(t),t=document.createElement("DIV"),t.className="wfu_component_separator_ver",t.setAttribute("draggable",!0),d.appendChild(t),a=l[u].split("+");for(var r=0;r<a.length;r++)t=document.getElementById("wfu_component_box_"+a[r]),t&&(d.appendChild(t),t.className="wfu_component_box",t.style.display="inline-block",t=document.createElement("DIV"),t.className="wfu_component_separator_ver",t.setAttribute("draggable",!0),d.appendChild(t))}t=document.createElement("DIV"),t.className="wfu_component_separator_hor",t.setAttribute("draggable",!0),d.appendChild(t),t=document.createElement("DIV"),t.id="wfu_component_bar_hor",t.className="wfu_component_bar_hor",d.appendChild(t),t=document.createElement("DIV"),t.id="wfu_component_bar_ver",t.className="wfu_component_bar_ver",d.appendChild(t),wfu_attach_separator_dragdrop_events()}function wfu_subfolders_input_changed(e){e=e||window.event;var t=e.target,l=t.id.replace("wfu_subfolders_path_","");l=l.replace("wfu_subfolders_label_","");var a=document.getElementById("wfu_attribute_"+l);if(!(a.selectedIndex<0)){var d,n,u=document.getElementById("wfu_subfolders_path_"+l),r=document.getElementById("wfu_subfolders_label_"+l),o=document.getElementById("wfu_subfolders_ok_"+l),_="1"==document.getElementById("wfu_subfolders_isnewitem_"+l).value;if(_)d="",n="";else{var s=a.data;t=s[a.selectedIndex],d=t.path,n=t.label}if(u.value==d&&r.value==n)o.disabled=!0,_||wfu_subfolders_update_nav(l);else{o.disabled=!1;for(var c=document.getElementsByName("wfu_subfolder_nav_"+l),f=0;f<c.length;f++)c[f].disabled=!0}}}function wfu_subfolders_auto_changed(e){var t=document.getElementById("wfu_attribute_"+e),l=document.getElementById("wfu_subfolders_auto_"+e),a=document.getElementById("wfu_subfolders_editable_"+e),d=document.getElementById("wfu_subfolders_manualtext_"+e);if(l.checked){var n=document.getElementById("wfu_attribute_value_"+e).value;"auto"!=n.substr(0,4)&&(d.value=n),a.parentNode.style.display="inline",wfu_apply_value(e,"folderlist","auto"+(a.checked?"+":"")),t.disabled=!0}else t.disabled=!1,a.parentNode.style.display="none",wfu_apply_value(e,"folderlist",d.value)}function wfu_subfolders_up_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data;item=l[t.selectedIndex];var a=item.index-1;if(!(0>a)){for(var d=-1,n=t.selectedIndex-1;n>=0;){if(l[n].level==item.level&&l[n].index==a){d=n;break}n--}if(-1!=d){var u=0;for(n=t.selectedIndex+1;n<l.length&&l[n].level>item.level;)u++,n++;l[d].index=item.index,item.index=a,t.data=l.slice(0,d).concat(l.slice(t.selectedIndex,t.selectedIndex+1+u)).concat(l.slice(d,t.selectedIndex)).concat(l.slice(t.selectedIndex+1+u));var r=wfu_update_subfolder_list(e);t.selectedIndex=d,wfu_subfolders_update_toolnav(e),item=t,r!==item.oldVal&&(item.oldVal=r,document.getElementById("wfu_attribute_value_"+e).value=r,wfu_generate_shortcode())}}}}function wfu_subfolders_down_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data;item=l[t.selectedIndex];var a=item.index+1,d=-1;for(curind=t.selectedIndex+1;curind<l.length;){if(l[curind].level==item.level){d=curind;break}if(l[curind].level<item.level)break;curind++}if(-1!=d){var n=0;for(curind=d+1;curind<l.length&&l[curind].level>item.level;)n++,curind++;l[d].index=item.index,item.index=a,t.data=l.slice(0,t.selectedIndex).concat(l.slice(d,d+1+n)).concat(l.slice(t.selectedIndex,d)).concat(l.slice(d+1+n));var u=wfu_update_subfolder_list(e);t.selectedIndex=t.selectedIndex+n+1,wfu_subfolders_update_toolnav(e),item=t,u!==item.oldVal&&(item.oldVal=u,document.getElementById("wfu_attribute_value_"+e).value=u,wfu_generate_shortcode())}}}function wfu_subfolders_left_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data;for(item=l[t.selectedIndex],curind=t.selectedIndex+1;curind<l.length&&l[curind].level>item.level;)l[curind].level--,curind++;item.level--;var a=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,a!==item.oldVal&&(item.oldVal=a,document.getElementById("wfu_attribute_value_"+e).value=a,wfu_generate_shortcode())}}function wfu_subfolders_right_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data;for(item=l[t.selectedIndex],curind=t.selectedIndex+1;curind<l.length&&l[curind].level>item.level;)l[curind].level++,curind++;item.level++;var a=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,a!==item.oldVal&&(item.oldVal=a,document.getElementById("wfu_attribute_value_"+e).value=a,wfu_generate_shortcode())}}function wfu_subfolders_def_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data;if(item=l[t.selectedIndex],item.default)item.default=!1;else{for(var a=0;a<l.length;a++)l[a].default=!1;item.default=!0}var d=wfu_update_subfolder_list(e);wfu_subfolders_update_toolnav(e),item=t,d!==item.oldVal&&(item.oldVal=d,document.getElementById("wfu_attribute_value_"+e).value=d,wfu_generate_shortcode())}}function wfu_subfolders_ok_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=document.getElementById("wfu_subfolders_path_"+e),a=document.getElementById("wfu_subfolders_label_"+e);if(""==l.value||""==a.value)return void alert("Path or label cannot be empty!");var d=t.data,n="1"==document.getElementById("wfu_subfolders_isnewitem_"+e).value;if(n){var u=parseInt(document.getElementById("wfu_subfolders_newitemlevel_"+e).value),r={label:a.value,path:l.value,level:u,"default":!1},o=parseInt(document.getElementById("wfu_subfolders_newitemindex_"+e).value);o>=d.length?d.push(r):d.splice(o,0,r)}else item=d[t.selectedIndex],item.path=l.value,item.label=a.value;var _=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,_!==item.oldVal&&(item.oldVal=_,document.getElementById("wfu_attribute_value_"+e).value=_,wfu_generate_shortcode())}}function wfu_subfolders_del_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data;item=l[t.selectedIndex];var a=0;for(curind=t.selectedIndex+1;curind<l.length&&l[curind].level>item.level;)a++,curind++;if(!(a>0)||confirm("Children items will be deleted as well. Proceed?")){l.splice(t.selectedIndex,1+a);var d=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,d!==item.oldVal&&(item.oldVal=d,document.getElementById("wfu_attribute_value_"+e).value=d,wfu_generate_shortcode())}}}function wfu_subfolders_add_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l=t.data,a=t.selectedIndex;item=l[a];var d=t.options,n=document.createElement("option");n.value="",n.innerHTML="",d.add(n,a),t.selectedIndex=a;var u=document.getElementById("wfu_subfolder_tools_"+e),r=document.getElementById("wfu_subfolders_path_"+e),o=document.getElementById("wfu_subfolders_label_"+e),_=document.getElementById("wfu_subfolders_ok_"+e),s=document.getElementById("wfu_subfolders_browse_"+e);u.className="wfu_subfolder_tools_container",o.disabled=!1,_.disabled=!0,document.getElementById("wfu_subfolders_isnewitem_"+e).value="1",document.getElementById("wfu_subfolders_newitemindex_"+e).value=a,document.getElementById("wfu_subfolders_newitemlevel_"+e).value=item.level,document.getElementById("wfu_subfolders_newitemlevel2_"+e).value="",r.disabled=0==item.level,s.disabled=0==item.level,0==item.level?(r.value="{root}",o.value="{upload folder}"):(r.value="",o.value="");for(var c=document.getElementsByName("wfu_subfolder_nav_"+e),f=0;f<c.length;f++)c[f].disabled=!0}}function wfu_subfolders_browse_clicked(e){var t=wfu_GetHttpRequestObject();if(null!=t){var l=null;try{var l=new FormData}catch(a){}if(null!=l){for(var d=document.getElementById("wfu_global_dialog_container"),n=document.getElementById("wfu_subfolders_browser_"+e),u=document.getElementById("wfu_subfolders_browse_"+e),r=document.getElementById("wfu_subfolders_inner_shadow_"+e),o=document.getElementById("wfu_subfolders_browser_msgcont_"+e),_=document.getElementById("wfu_subfolders_browser_msg_"+e),s=document.getElementById("wfu_subfolders_browser_img_"+e),c=document.getElementById("wfu_subfolders_browser_ok_"+e),f=document.getElementById("wfu_subfolders_browser_list_"+e);f.options.length>0;)f.options.remove(0);c.disabled=!0,c.onclick=function(){wfu_folder_browser_cancel_clicked(e)},_.innerHTML="loading folder contents...",s.style.display="inline",o.style.display="block",d.style.display="block",n.style.display="block",n.style.left=u.offsetLeft+u.offsetWidth-n.offsetWidth+"px",n.style.top=u.offsetTop+u.offsetHeight-n.offsetHeight+"px",r.style.display="block",d.onclick=function(){wfu_folder_browser_cancel_clicked(e)};var i=document.getElementById("wfu_attribute_uploadpath").value;"/"==i.substr(i.length-1)&&(i=i.substr(0,i.length-1));var m=wfu_get_relative_path(e).split(","),w=i+m[0];"/"!=w.substr(0)&&(w="/"+w);var p="";2==m.length&&(p=m[1]),l.append("action","wfu_ajax_action_read_subfolders"),l.append("folder1",wfu_plugin_encode_string(w)),l.append("folder2",wfu_plugin_encode_string(p)),t.key=e,t.addEventListener("load",wfu_readfolderComplete,!1),t.addEventListener("error",wfu_readfolderFailed,!1),t.addEventListener("abort",wfu_readfolderCanceled,!1),t.open("POST",AdminParams.wfu_ajax_url),t.send(l)}}}function wfu_readfolderComplete(e){var t=e.target.key,l=document.getElementById("wfu_subfolders_browser_msgcont_"+t),a=document.getElementById("wfu_subfolders_browser_msg_"+t),d=document.getElementById("wfu_subfolders_browser_img_"+t),n=document.getElementById("wfu_subfolders_browser_list_"+t),u=document.getElementById("wfu_subfolders_browser_ok_"+t),r=document.getElementById("wfu_subfolders_path_"+t),o=document.getElementById("wfu_subfolders_label_"+t),_=e.target.responseText;if(-1!=_){var s="wfu_read_subfolders:",c=e.target.responseText.indexOf(s);-1==c&&(c=e.target.responseText.length);var f=(e.target.responseText.substr(0,c),e.target.responseText.substr(c+s.length,e.target.responseText.length-c-s.length));c=f.indexOf(":");var i=f.substr(0,c);if(txt_value=f.substr(c+1,f.length-c-1),"success"==i){for(var m,w=wfu_plugin_decode_string(txt_value),p=w.split(","),g=0,v=0;v<p.length;v++)""!=p[v]&&(m=document.createElement("option"),m.value=p[v],m.innerHTML=p[v].replace("*","&nbsp;&nbsp;&nbsp;"),n.add(m),g++);0==g&&(m=document.createElement("option"),m.value="",m.innerHTML="{empty}",m.disabled=!0,n.add(m)),n.selectedIndex=-1,u.onclick=function(){var e=n.options[n.selectedIndex].value,l=parseInt(document.getElementById("wfu_subfolders_newitemlevel_"+t).value);("*"==e.substr(0,1)||0==l)&&(document.getElementById("wfu_subfolders_newitemlevel_"+t).value=l+1,l>0&&(e=e.substr(1))),r.value=e,o.value=e,wfu_folder_browser_cancel_clicked(t),wfu_subfolders_ok_clicked(t)},l.style.display="none"}else"error"==i?(a.innerHTML=txt_value,d.style.display="none",u.disabled=!1):(a.innerHTML="Unknown error",d.style.display="none",u.disabled=!1)}}function wfu_readfolderFailed(e){var t=e.target.key,l=document.getElementById("wfu_subfolders_browser_msg_"+t),a=document.getElementById("wfu_subfolders_browser_img_"+t),d=document.getElementById("wfu_subfolders_browser_ok_"+t);l.innerHTML="Unknown error",a.style.display="none",d.disabled=!1}function wfu_readfolderCanceled(e){var t=e.target.key,l=document.getElementById("wfu_subfolders_browser_msg_"+t),a=document.getElementById("wfu_subfolders_browser_img_"+t),d=document.getElementById("wfu_subfolders_browser_ok_"+t);l.innerHTML="Unknown error",a.style.display="none",d.disabled=!1}function wfu_subfolders_browser_list_changed(e){var t=document.getElementById("wfu_subfolders_browser_list_"+e),l=document.getElementById("wfu_subfolders_browser_ok_"+e);l.disabled=t.selectedIndex<0}function wfu_folder_browser_cancel_clicked(e){var t=document.getElementById("wfu_global_dialog_container"),l=document.getElementById("wfu_subfolders_browser_"+e),a=(document.getElementById("wfu_subfolders_browse_"+e),document.getElementById("wfu_subfolders_inner_shadow_"+e));t.onclick=null,a.style.display="none",l.style.display="none",t.style.display="none"}function wfu_get_relative_path(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var l,a=t.data,d="1"==document.getElementById("wfu_subfolders_isnewitem_"+e).value;l=d?parseInt(document.getElementById("wfu_subfolders_newitemlevel_"+e).value):a[t.selectedIndex].level;for(var n="/",u=t.selectedIndex-1,r=l;u>=0&&r>1;)a[u].level<r&&(n="/"+a[u].path+n,r=a[u].level),u--;return d&&"1"==document.getElementById("wfu_subfolders_newitemlevel2_"+e).value&&l>0&&t.selectedIndex>0&&(n+=","+a[t.selectedIndex-1].path),n}}function wfu_subfolders_changed(e){wfu_update_subfolder_list(e),wfu_subfolders_update_toolnav(e)}function wfu_subfolders_update_toolnav(e){var t,l,a=document.getElementById("wfu_attribute_"+e),d=document.getElementById("wfu_subfolder_tools_"+e),n=document.getElementById("wfu_subfolders_path_"+e),u=document.getElementById("wfu_subfolders_label_"+e),r=document.getElementById("wfu_subfolders_ok_"+e),o=document.getElementById("wfu_subfolders_browse_"+e),_=document.getElementById("wfu_subfolders_auto_"+e);if(document.getElementById("wfu_subfolders_isnewitem_"+e).value="",document.getElementById("wfu_subfolders_newitemindex_"+e).value="",document.getElementById("wfu_subfolders_newitemlevel_"+e).value="",document.getElementById("wfu_subfolders_newitemlevel2_"+e).value="",null==a.data?(t=wfu_decode_subfolder_list(e),a.data=t):t=a.data,0===a.data.length?(a.className="wfu_select_folders wfu_select_folders_empty",a.options[0].innerHTML=_.checked?"":"press here"):a.className="wfu_select_folders",a.selectedIndex<0)d.className="wfu_subfolder_tools_container wfu_subfolder_tools_disabled",n.disabled=!0,u.disabled=!0,r.disabled=!0,o.disabled=!0,u.value="",n.value="";else if(a.selectedIndex>=a.options.length-1){d.className="wfu_subfolder_tools_container",u.disabled=!1,r.disabled=!0,document.getElementById("wfu_subfolders_isnewitem_"+e).value="1",document.getElementById("wfu_subfolders_newitemindex_"+e).value=t.length;var s;s=0==t.length?0:0==t[t.length-1].level?1:t[t.length-1].level,document.getElementById("wfu_subfolders_newitemlevel_"+e).value=s,document.getElementById("wfu_subfolders_newitemlevel2_"+e).value="1",n.disabled=0==s,o.disabled=!1,0==s?(n.value="{root}",u.value="{upload folder}"):(n.value="",u.value="")}else d.className="wfu_subfolder_tools_container",u.disabled=!1,r.disabled=!0,l=t[a.selectedIndex],n.disabled=0==l.level,o.disabled=0==l.level,u.value=l.label,n.value=l.path;var c=document.getElementsByName("wfu_subfolder_nav_"+e);if(a.selectedIndex<0||a.selectedIndex>=a.options.length-1)for(var f=0;f<c.length;f++)c[f].disabled=!0;else wfu_subfolders_update_nav(e)}function wfu_subfolders_update_nav(e){var t=document.getElementById("wfu_attribute_"+e),l=document.getElementById("wfu_subfolders_up_"+e),a=document.getElementById("wfu_subfolders_down_"+e),d=document.getElementById("wfu_subfolders_left_"+e),n=document.getElementById("wfu_subfolders_right_"+e),u=document.getElementById("wfu_subfolders_add_"+e),r=document.getElementById("wfu_subfolders_def_"+e),o=document.getElementById("wfu_subfolders_del_"+e),_=t.data,s=_[t.selectedIndex];for(l.disabled=s.index<=0,ind=t.selectedIndex+1,nextind=0;ind<_.length;){if(_[ind].level==s.level){nextind=_[ind].index;break}if(_[ind].level<s.level)break;ind++}a.disabled=0==s.level||0==nextind,d.disabled=0==t.selectedIndex&&s.level<1||t.selectedIndex>0&&s.level<=1,prevlevel=t.selectedIndex>=1?_[t.selectedIndex-1].level:0,n.disabled=s.level-prevlevel>0,u.disabled=0==s.level,r.disabled=!1,r.className="button"+(s.default?" wfu_subfolder_nav_pressed":""),o.disabled=!1}function wfu_decode_subfolder(e){var t={label:"",path:"",level:0,"default":!1};e=e.trim();for(var l=0,a=!1;l<e.length&&"*"==e.substr(l,1);)l++;e=e.substr(l,e.length-l),"&"==e.substr(0,1)&&(e=e.substr(1),a=!0),t.level=l,t.default=a;var d=e.split("/");return 1==d.length?(t.path=d[0],t.label=d[0]):d.length>1&&(t.path=d[0],t.label=d[1]),0==l&&(t.path="{root}",""==t.label&&(t.label="{upload folder}")),t}function wfu_decode_subfolder_list(e){for(var t,l=document.getElementById("wfu_attribute_"+e).options,a=Array(),d=["root"],n=[0],u=-1,r=0;r<l.length-1;r++){for(a.push(wfu_decode_subfolder(wfu_plugin_decode_string(l[r].value))),d.length>a[r].level?d[a[r].level]=a[r].path:d.push(a[r].path),t="",j=1;j<=a[r].level;j++)t+=d[j]+"/";a[r].fullpath=t,n.length<=a[r].level&&n.push(0),a[r].index=a[r].level>u?0:n[a[r].level]+1,n[a[r].level]=a[r].index,u=a[r].level}return a}function wfu_update_subfolder_list(e){var t=document.getElementById("wfu_attribute_"+e).options,l=document.getElementById("wfu_attribute_"+e),a=l.data;if(null!=a){var d,n,u="";t.length=a.length+1;for(var r=0;r<a.length;r++){for(d="",n="",j=0;j<a[r].level;j++)d+="*",n+="&nbsp;&nbsp;&nbsp;";a[r].default?(d+="&",t[r].className="wfu_select_folders_option_default"):t[r].className="",d+=a[r].path+"/"+a[r].label,n+=a[r].label,t[r].value=wfu_plugin_encode_string(d),t[r].innerHTML=n,""!=u&&(u+=","),u+=d}return t[a.length].value="",t[a.length].innerHTML="",u}}function wfu_userdata_edit_field(e,t,l){for(var a,d=0;d<e.childNodes.length;d++)a=e.childNodes[d],"INPUT"==a.tagName?"text"==a.type?(a.value=t,wfu_attach_element_handlers(a,wfu_update_userfield_value)):"checkbox"==a.type&&(a.checked=l):"DIV"==a.tagName&&(a.className="wfu_userdata_action")}function wfu_userdata_add_field(e){var t=e.parentNode,l=t.cloneNode(!0);wfu_userdata_edit_field(l,"",!1),t.parentNode.insertBefore(l,t.nextSibling)}function wfu_userdata_remove_field(e){for(var t=e.parentNode,l=t.parentNode,a=null,d=0;d<l.childNodes.length;d++)if(1===l.childNodes[d].nodeType){a=l.childNodes[d];break}if(t!=a){t.parentNode.removeChild(t);for(var d=0;d<a.childNodes.length;d++)if(1===a.childNodes[d].nodeType){wfu_update_userfield_value({target:a.childNodes[d]});break}}}function wfu_generate_shortcode(){for(var e,t=document.getElementById("wfu_shortcode_tag").value,l=document.getElementById("wfu_attribute_defaults"),a=(document.getElementById("wfu_attribute_values"),""),d="",n="["+t,u="",r=0;r<l.childNodes.length;r++)e=l.childNodes[r],1===e.nodeType&&(a=e.id.replace("wfu_attribute_default_",""),d=document.getElementById("wfu_attribute_value_"+a).value,e.value!=d&&(u+=" "+a+'="'+d+'"'));n+=u+"]",document.getElementById("wfu_shortcode").value=n,ShortcodeString=u.substr(1),document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode").disabled=wfu_plugin_encode_string(n)==document.getElementById("wfu_shortcode_original_enc").value),Autosave&&wfu_schedule_save_shortcode()}function wfu_update_text_value(e){e=e||window.event;var t=e.target,l=t.id.replace("wfu_attribute_",""),a=t.value;a=a.replace(/(\r\n|\n|\r)/gm,"%n%"),a=a.replace(/\"/gm,"%dq%"),a=a.replace(/\[/gm,"%brl%"),a=a.replace(/\]/gm,"%brr%"),a!==t.oldVal&&(t.oldVal=a,document.getElementById("wfu_attribute_value_"+l).value=a,wfu_generate_shortcode())}function wfu_update_date_value(e){e=e||window.event;var t=e.target,l=t.id.replace("wfu_attribute_",""),a=t.value;a!==t.oldVal&&(t.oldVal=a,document.getElementById("wfu_attribute_value_"+l).value=a,wfu_generate_shortcode())}function wfu_update_stringmatch_textvalue(e){e=e||window.event;var t=e.target,l=t.id.replace("wfu_attribute_","");l=l.replace("_matchfield","").replace("_matchvalue",""),wfu_update_stringmatch_value(l)}function wfu_update_triplecolor_value(e){e=e||window.event;var t=e.target,l=t.id.replace("wfu_attribute_","");l=l.replace("_color",""),l=l.replace("_bgcolor",""),l=l.replace("_borcolor",""),t=document.getElementById("wfu_attribute_"+l+"_color");var a=t.value+","+document.getElementById("wfu_attribute_"+l+"_bgcolor").value+","+document.getElementById("wfu_attribute_"+l+"_borcolor").value;a!==t.oldVal&&(t.oldVal=a,document.getElementById("wfu_attribute_value_"+l).value=a,wfu_generate_shortcode())}function wfu_update_dimension_value(e){e=e||window.event;var t=e.target,l=t.name.replace("wfu_dimension_elements_",""),a=document.getElementsByName(t.name);t=a[0];for(var d="",n="",u=0;u<a.length;u++)n=a[u].id.replace("wfu_attribute_"+l+"_",""),""!=d&&""!=a[u].value&&(d+=", "),""!=a[u].value&&(d+=n+":"+a[u].value);d!==t.oldVal&&(t.oldVal=d,document.getElementById("wfu_attribute_value_"+l).value=d,wfu_generate_shortcode())}function wfu_update_ptext_value(e){e=e||window.event;var t=e.target,l=t.id.replace("wfu_attribute_","");l=l.substr(2);var a=document.getElementById("wfu_attribute_s_"+l).value,d=document.getElementById("wfu_attribute_p_"+l).value,n=a+"/"+d;n!==t.oldVal&&(t.oldVal=n,document.getElementById("wfu_attribute_value_"+l).value=n),wfu_generate_shortcode()}function wfu_update_mchecklist_value(e){var t="",l=(document.getElementById("wfu_attribute_"+e),document.getElementById("wfu_attribute_"+e+"_all"));l.checked?(jQuery("#wfu_attribute_"+e+" input").prop("disabled",!0),jQuery("#wfu_attribute_"+e+" input").prop("checked",!0),t="all"):(jQuery("#wfu_attribute_"+e+" input").prop("disabled",!1),jQuery("#wfu_attribute_"+e+" input").each(function(){jQuery(this).prop("checked")&&(t+=","+jQuery(this).next().html())}),t=t.substr(1)),document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_rolelist_value(e){var t="",l=document.getElementById("wfu_attribute_"+e),a=document.getElementById("wfu_attribute_"+e+"_guests"),d=document.getElementById("wfu_attribute_"+e+"_all");if(d.checked)l.disabled=!0,t="all";else{l.disabled=!1;for(var n=l.options,u=0;u<n.length;u++)n[u].selected&&(""!=t&&(t+=","),t+=n[u].value)}a.checked&&(""!=t&&(t+=","),t+="guests"),document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_userlist_value(e){var t="",l=document.getElementById("wfu_attribute_"+e),a=document.getElementById("wfu_attribute_"+e+"_current"),d=document.getElementById("wfu_attribute_"+e+"_guests"),n=document.getElementById("wfu_attribute_"+e+"_all");if(a&&a.checked)l.disabled=!0,n.disabled=!0,d.disabled=!0,t="current";else{if(n.disabled=!1,d.disabled=!1,n.checked)l.disabled=!0,t="all";else{l.disabled=!1;for(var u=l.options,r=0;r<u.length;r++)u[r].selected&&(""!=t&&(t+=","),t+=u[r].value)}d.checked&&(""!=t&&(t+=","),t+="guests")}document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_postlist_value(e){for(var t="",l=Array(),a=Array(),d=document.getElementById("wfu_attribute_"+e+"_postlist").value.split(","),n=0;n<d.length;n++)l.push(document.getElementById("wfu_attribute_"+e+"_"+d[n])),a.push(document.getElementById("wfu_attribute_"+e+"_all_"+d[n]));var u=document.getElementById("wfu_attribute_"+e+"_current");if(u&&u.checked){for(var n=0;n<d.length;n++)l[n].disabled=!0,a[n].disabled=!0;t="current"}else{var r=!0;t="";for(var n=0;n<d.length;n++)if(a[n].disabled=!1,a[n].checked)l[n].disabled=!0,""!=t&&(t+=","),t+="all"+d[n];else{l[n].disabled=!1,r=!1;for(var o=l[n].options,_=0;_<o.length;_++)o[_].selected&&(""!=t&&(t+=","),t+=o[_].value)}r&&(t="all")}document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_bloglist_value(e){var t="",l=document.getElementById("wfu_attribute_"+e),a=document.getElementById("wfu_attribute_"+e+"_current"),d=document.getElementById("wfu_attribute_"+e+"_all");if(a&&a.checked)l.disabled=!0,d.disabled=!0,t="current";else if(d.disabled=!1,d.checked)l.disabled=!0,t="all";else{l.disabled=!1;for(var n=l.options,u=0;u<n.length;u++)n[u].selected&&(""!=t&&(t+=","),t+=n[u].value)}document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_stringmatch_value(e){var t=document.getElementById("wfu_attribute_"+e+"_matchfield").value,l=document.getElementById("wfu_attribute_"+e+"_matchcriterion").value,a=document.getElementById("wfu_attribute_"+e+"_matchvalue").value;
2
- t=t.replace(";",""),document.getElementById("wfu_attribute_value_"+e).value=""==t.trim()?"":"field:"+t+";criterion:"+l+";value:"+a,wfu_generate_shortcode()}function wfu_update_userfield_value(e){e=e||window.event;for(var t=e.target,l=t.parentNode,a=l.parentNode,d="",n=!1,u="",r=0;r<a.childNodes.length;r++)if(l=a.childNodes[r],"DIV"===l.tagName){for(var o=0;o<l.childNodes.length;o++)"INPUT"==l.childNodes[o].tagName&&("text"==l.childNodes[o].type?(d=l.childNodes[o].value,0==r&&(t=l.childNodes[o])):"checkbox"==l.childNodes[o].type&&(n=l.childNodes[o].checked));""!=u&&""!=d&&(u+="/"),""!=d&&n&&(u+="*"),""!=d&&(u+=d)}u!==t.oldVal&&(t.oldVal=u,document.getElementById("wfu_attribute_value_userdatalabel").value=u,wfu_generate_shortcode(),wfu_update_userfield_variables())}function wfu_update_userfield_variables(){var e=document.getElementById("wfu_attribute_value_userdatalabel");if(e){for(var t=document.getElementById("wfu_wrapper"),l=document.getElementsByClassName("wfu_shadow_userdata","div",t),a=document.getElementsByName("wfu_userfield_select"),d=0;d<a.length;d++)a[d].style.display="none";if(0!=l.length&&"block"!=l[0].style.display){for(var n='<option style="display:none;">%userdataXXX%</option>',u=e.value.split("/"),r="",d=1;d<=u.length;d++)r=u[d-1],"*"==r[0]&&(r=r.substr(1)),n+='<option value="%userdata'+d+'%">'+d+": "+r+"</option>";for(var d=0;d<a.length;d++)a[d].innerHTML=n,a[d].style.display="inline-block"}}}function wfu_attach_element_handlers(e,t){for(var l=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],a=0;a<l.length;a++)wfu_addEventHandler(e,l[a],t)}function wfu_Attach_Admin_Events(e){Autosave=e,wfu_generate_shortcode(),wfu_update_userfield_variables(),wfu_Attach_Admin_DragDrop_Events();for(var t=document.getElementsByName("wfu_text_elements"),l=0;l<t.length;l++)wfu_attach_element_handlers(t[l],wfu_update_text_value);for(var a=document.getElementsByName("wfu_ptext_elements"),l=0;l<a.length;l++)wfu_attach_element_handlers(a[l],wfu_update_ptext_value);for(var d=document.getElementsByName("wfu_date_elements"),l=0;l<d.length;l++)wfu_attach_element_handlers(d[l],wfu_update_date_value);for(var n=document.getElementsByName("wfu_stringmatch_elements"),l=0;l<n.length;l++)wfu_attach_element_handlers(n[l],wfu_update_stringmatch_textvalue);for(var u=document.getElementsByName("wfu_triplecolor_elements"),l=0;l<u.length;l++)wfu_attach_element_handlers(u[l],wfu_update_triplecolor_value);for(var r=document.getElementsByName("wfu_dimension_elements_widths"),l=0;l<r.length;l++)wfu_attach_element_handlers(r[l],wfu_update_dimension_value);r=document.getElementsByName("wfu_dimension_elements_heights");for(var l=0;l<r.length;l++)wfu_attach_element_handlers(r[l],wfu_update_dimension_value);for(var o=document.getElementsByName("wfu_userfield_elements"),l=0;l<o.length;l++)wfu_attach_element_handlers(o[l],wfu_update_userfield_value);for(var _=document.getElementsByName("wfu_subfolder_tools_input"),l=0;l<_.length;l++)wfu_attach_element_handlers(_[l],wfu_subfolders_input_changed);""!=document.getElementById("wfu_shortcode_postid").value&&setTimeout(function(){wfu_check_page_obsolescence()},CheckObsolescenceTimeOut)}function wfu_insert_variable(e){var t=e.className.replace("wfu_variable wfu_variable_",""),l=document.getElementById("wfu_attribute_"+t),a=l.selectionStart,d=l.value;l.value=d.substr(0,a)+e.innerHTML+d.substr(a),wfu_update_text_value({target:l})}function wfu_insert_userfield_variable(e){var t=e.className.replace("wfu_variable wfu_variable_",""),l=document.getElementById("wfu_attribute_"+t),a=l.selectionStart,d=l.value;l.value=d.substr(0,a)+e.value+d.substr(a),e.value="%userdataXXX%",wfu_update_text_value({target:l})}function wfu_columns_itemclicked(e){var t=e.parentNode;if("SELECT"==t.tagName)for(var l=0;l<t.options.length;l++)t.options[l].selected=t.options[l]==e}function wfu_columns_buttonaction(e,t){var l=document.getElementById("wfu_attribute_"+e+"_sourcelist"),a=document.getElementById("wfu_attribute_"+e);if("add"==t){for(var d=0;d<l.options.length;d++)if(l.options[d].selected||"wfu_columns_item_required"==l.options[d].className){for(var n=!1,u=0;u<a.options.length;u++)if(a.options[u].value==l.options[d].value){n=!0;break}if(!n){var r=document.createElement("OPTION");r.value=l.options[d].value,r.innerHTML=l.options[d].innerHTML,r.className=l.options[d].className,a.appendChild(r)}}}else if("del"==t)for(var d=0;d<a.options.length;)a.options[d].selected&&"wfu_columns_item_required"!=a.options[d].className?a.options.remove(d):d++;else if("up"==t||"down"==t){for(var o=-1,d=0;d<a.options.length;d++)a.options[d].selected&&-1==o?o=d:a.options[d].selected&&o>-1&&(a.options[d].selected=!1);"up"==t&&o>0?a.insertBefore(a.options[o],a.options[o-1]):"down"==t&&o<a.options.length-1&&a.insertBefore(a.options[o+1],a.options[o])}wfu_update_columns(e)}function wfu_update_columns(e){for(var t=document.getElementById("wfu_attribute_"+e),l="",a=0;a<t.options.length;a++)""!=l&&(l+=","),l+=t.options[a].value;document.getElementById("wfu_attribute_value_"+e).value=l,wfu_generate_shortcode()}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(t){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(l){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(t){}return e}function wfu_plugin_encode_string(e){var t,l=0,a="",d="";for(l=0;l<e.length;l++)t=e.charCodeAt(l),t>=2048?t=((16773120&t|917504)<<4)+((4032&t|8192)<<2)+(63&t|128):t>=128&&(t=((65472&t|12288)<<2)+(63&t|128)),d=t.toString(16),(1==d.length||3==d.length||5==d.length)&&(d="0"+d),a+=d;return a}function wfu_plugin_decode_string(e){for(var t,l,a=0,d="";a<e.length;)t=parseInt(e.substr(a,2),16),l=128>t?t:224>t?((31&t)<<6)+(63&parseInt(e.substr(a+=2,2),16)):((15&t)<<12)+((63&parseInt(e.substr(a+=2,2),16))<<6)+(63&parseInt(e.substr(a+=2,2),16)),d+=String.fromCharCode(l),a+=2;return d}function wfu_schedule_save_shortcode(){var e=new Date,t=ShortcodeNextSave-e.getTime();null!=ShortcodeTimeOut&&(clearTimeout(ShortcodeTimeOut),ShortcodeTimeOut=null),0>=t?wfu_save_shortcode():ShortcodeTimeOut=setTimeout(function(){wfu_save_shortcode()},t)}function wfu_check_page_obsolescence(){PageObsolete||PageUpdating||""==document.getElementById("wfu_shortcode_postid").value}function wfu_save_shortcode(){if(!PageObsolete){var e=wfu_GetHttpRequestObject();if(null!=e){PageUpdating=!0,document.getElementById("wfu_update_failed_message").style.display="none";var t=AdminParams.wfu_ajax_url;params=new Array(7),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_save_shortcode",params[1]=new Array(2),params[1][0]="shortcode",params[1][1]=wfu_plugin_encode_string(ShortcodeString),params[2]=new Array(2),params[2][0]="shortcode_original",params[2][1]=document.getElementById("wfu_shortcode_original_enc").value,params[3]=new Array(2),params[3][0]="post_id",params[3][1]=document.getElementById("wfu_shortcode_postid").value,params[4]=new Array(2),params[4][0]="post_hash",params[4][1]=document.getElementById("wfu_shortcode_posthash").value,params[5]=new Array(2),params[5][0]="shortcode_position",params[5][1]=document.getElementById("wfu_shortcode_position").value,params[6]=new Array(2),params[6][0]="shortcode_tag",params[6][1]=document.getElementById("wfu_shortcode_tag").value;for(var l="",a=0;a<params.length;a++)l+=(a>0?"&":"")+params[a][0]+"="+encodeURI(params[a][1]);var d=new Date;Autosave?ShortcodeNextSave=d.getTime()+5e3:document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode_wait").style.display="inline"),e.open("POST",t,!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.onreadystatechange=function(){if(4==e.readyState&&200==e.status){PageUpdating=!1;var t="wfu_save_shortcode:",l=e.responseText.indexOf(t);-1==l&&(l=e.responseText.length);var a=(e.responseText.substr(0,l),e.responseText.substr(l+t.length,e.responseText.length-l-t.length));l=a.indexOf(":");var n=a.substr(0,l);if(txt_value=a.substr(l+1,a.length-l-1),"success"==n){if(Autosave?(document.getElementById("wfu_save_label").innerHTML="saved",document.getElementById("wfu_save_label").className="wfu_save_label",document.getElementById("wfu_save_label").style.opacity=1,wfu_fadeout_element(300),ShortcodeNextSave=d.getTime()+1e3,null!=ShortcodeTimeOut&&wfu_schedule_save_shortcode()):document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode_wait").style.display="none",document.getElementById("wfu_update_shortcode").disabled=!0,window.plugin_window&&window.plugin_window.location.reload(!0)),""!=document.getElementById("wfu_shortcode_postid").value){var u=document.getElementById("wfu_shortcode_tag").value;document.getElementById("wfu_shortcode_original_enc").value=wfu_plugin_encode_string("["+u+" "+ShortcodeString+"]"),document.getElementById("wfu_shortcode_posthash").value=txt_value,setTimeout(function(){wfu_check_page_obsolescence()},CheckObsolescenceTimeOut)}}else Autosave&&(document.getElementById("wfu_save_label").innerHTML="not saved",document.getElementById("wfu_save_label").className="wfu_save_label_fail",document.getElementById("wfu_save_label").style.opacity=1,wfu_fadeout_element(300)),"fail"==n&&("post_modified"==txt_value?(PageObsolete=!0,document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode").disabled=!0),document.getElementById("wfu_update_rejected_message").style.display="block"):document.getElementById("wfu_update_failed_message").style.display="block")}},e.send(l)}}}function wfu_adjust_opacity(e){document.getElementById("wfu_save_label").style.opacity=e}function wfu_fadeout_element(e){for(var t=20,l=0,a=0;t>a;a++)l=1-a/t,setTimeout('wfu_adjust_opacity("'+l.toString()+'")',a*e/t);setTimeout('wfu_adjust_opacity("0.0")',a*e/t)}function wfu_apply_value(e,t,l){if("onoff"==t)document.getElementById("wfu_attribute_"+e).className="wfu_onoff_container_"+("true"!=l?"on":"off"),wfu_admin_onoff_clicked(e);else if("text"==t||"ltext"==t||"integer"==t||"float"==t||"mtext"==t||"color"==t){var a=document.getElementById("wfu_attribute_"+e);if(l=l.replace(/\%n\%/gm,"\n"),l=l.replace(/\%dq\%/gm,'"'),l=l.replace(/\%brl\%/gm,"["),l=l.replace(/\%brr\%/gm,"]"),"color"==t){var d=colourNameToHex(l);d||(d=l),jQuery("#wfu_attribute_"+e).wpColorPicker("color",d)}a.value=l,wfu_update_text_value({target:a})}else if("date"==t){var a=document.getElementById("wfu_attribute_"+e);a.value=l,wfu_update_date_value({target:a})}else if("placements"==t)wfu_admin_recreate_placements_panel(l),document.getElementById("wfu_attribute_value_placements").value=l,wfu_generate_shortcode();else if("radio"==t){for(var n=document.getElementsByName("wfu_radioattribute_"+e),u=0;u<n.length;u++)n[u].checked=n[u].value==l||"*"+n[u].value==l;wfu_admin_radio_clicked(e)}else if("ptext"==t){l=l.replace(/\%n\%/gm,"\n"),l=l.replace(/\%dq\%/gm,'"'),l=l.replace(/\%brl\%/gm,"["),l=l.replace(/\%brr\%/gm,"]");var r=l.split("/"),o=r.length<1?"":r[0],_=r.length<2?o:r[1],s=document.getElementById("wfu_attribute_s_"+e);s.value=o;var c=document.getElementById("wfu_attribute_p_"+e);c.value=_,wfu_update_ptext_value({target:s}),wfu_update_ptext_value({target:c})}else if("mchecklist"==t){if(l=l.toLowerCase(),"all"==l)document.getElementById("wfu_attribute_"+e+"_all").checked=!0;else{document.getElementById("wfu_attribute_"+e+"_all").checked=!1;for(var f=l.split(","),u=0;u<f.length;u++)f[u]=f[u].trim();jQuery("#wfu_attribute_"+e+" input").each(function(){jQuery(this).prop("checked",f.indexOf(jQuery(this).next().html())>-1)})}wfu_update_mchecklist_value(e)}else if("rolelist"==t){var a=document.getElementById("wfu_attribute_"+e),i=document.getElementById("wfu_attribute_"+e+"_all"),m=i.className.indexOf("wfu_default_administrator")>-1,w=l.split(",");if(w.indexOf("all")>-1){i.checked=!0;for(var u=0;u<a.options.length;u++)a.options[u].selected=m&&"administrator"==a.options[u].value}else{i.checked=!1;for(var u=0;u<w.length;u++)w[u]=w[u].trim();for(var u=0;u<a.options.length;u++)a.options[u].selected=w.indexOf(a.options[u].value)>-1}document.getElementById("wfu_attribute_"+e+"_guests").checked=w.indexOf("guests")>-1,wfu_update_rolelist_value(e)}else if("userlist"==t){var a=document.getElementById("wfu_attribute_"+e),i=document.getElementById("wfu_attribute_"+e+"_all"),p=i.className.indexOf("wfu_default_0")>-1,g=document.getElementById("wfu_attribute_"+e+"_current");if(g&&"current"==l){g.checked=!0,i.checked=!1,document.getElementById("wfu_attribute_"+e+"_guests").checked=!1;for(var u=0;u<a.options.length;u++)a.options[u].selected=p&&1>u}else{g&&(g.checked=!1);var v=l.split(",");if(v.indexOf("all")>-1){i.checked=!0;for(var u=0;u<a.options.length;u++)a.options[u].selected=p&&1>u}else{i.checked=!1;for(var u=0;u<v.length;u++)v[u]=v[u].trim();for(var u=0;u<a.options.length;u++)a.options[u].selected=v.indexOf(a.options[u].value)>-1}document.getElementById("wfu_attribute_"+e+"_guests").checked=v.indexOf("guests")>-1}wfu_update_userlist_value(e)}else if("postlist"==t){for(var b=Array(),i=Array(),h=document.getElementById("wfu_attribute_"+e+"_postlist").value.split(","),u=0;u<h.length;u++)b.push(document.getElementById("wfu_attribute_"+e+"_"+h[u])),i.push(document.getElementById("wfu_attribute_"+e+"_all_"+h[u]));var g=document.getElementById("wfu_attribute_"+e+"_current");if(g&&"current"==l){g.checked=!0;for(var u=0;u<h.length;u++){i[u].checked=!1;for(var y=0;y<b[u].options.length;y++)b[u].options[y].selected=!1}}else{g&&(g.checked=!1);for(var I=l.split(","),u=0;u<h.length;u++){("all"==l||I.indexOf("all"+h[u])>-1)&&(i[u].checked=!0);for(var y=0;y<b[u].options.length;y++)b[u].options[y].selected=I.indexOf(b[u].options[y].value)>-1}}wfu_update_postlist_value(e)}else if("bloglist"==t){var g=document.getElementById("wfu_attribute_"+e+"_current");if(g&&"current"==l){g.checked=!0,document.getElementById("wfu_attribute_"+e+"_all").checked=!1;for(var a=document.getElementById("wfu_attribute_"+e),u=0;u<a.options.length;u++)a.options[u].selected=!1}else{g&&(g.checked=!1);var E=l.split(",");if("all"==l)document.getElementById("wfu_attribute_"+e+"_all").checked=!0;else{document.getElementById("wfu_attribute_"+e+"_all").checked=!1;for(var u=0;u<E.length;u++)E[u]=E[u].trim();for(var a=document.getElementById("wfu_attribute_"+e),u=0;u<a.options.length;u++)a.options[u].selected=E.indexOf(a.options[u].value)>-1}}wfu_update_bloglist_value(e)}else if("stringmatch"==t){var B="",k="equal to",x="",N=l.match(/^field:(.*?);\s*criterion:(.*?)\s*;\s*value:(.*)$/);N&&4==N.length&&(B=N[1],k=N[2],x=N[3]),document.getElementById("wfu_attribute_"+e+"_matchfield").value=B,document.getElementById("wfu_attribute_"+e+"_matchcriterion").value=k,document.getElementById("wfu_attribute_"+e+"_matchvalue").value=x,wfu_update_stringmatch_value(e)}else if("columns"==t){var T=document.getElementById("wfu_attribute_"+e+"_sourcelist"),O=document.getElementById("wfu_attribute_"+e);O.innerHTML="";for(var H=l.split(","),u=0;u<T.options.length;u++)if("wfu_columns_item_required"==T.options[u].className&&-1==H.indexOf(T.options[u].value)){var A=document.createElement("OPTION");A.value=T.options[u].value,A.innerHTML=T.options[u].innerHTML,A.className=T.options[u].className,O.appendChild(A)}for(var u=0;u<H.length;u++){for(var j=-1,y=0;y<T.options.length;y++)if(T.options[y].value==H[u]){j=y;break}for(var C=!1,y=0;y<O.options.length;y++)if(O.options[y].value==H[u]){C=!0;break}if(j>-1&&!C){var A=document.createElement("OPTION");A.value=T.options[j].value,A.innerHTML=T.options[j].innerHTML,A.className=T.options[j].className,O.appendChild(A)}}wfu_update_columns(e)}else if("dimensions"==t){for(var D,L,S,a,V=l.split(","),M=document.getElementsByName("wfu_dimension_elements_"+e),u=0;u<M.length;u++)M[u].value="";for(var u=0;u<V.length;u++)D=V[u].split(":",2),L=D.length<1?"":D[0],S=D.length<2?L:D[1],a=document.getElementById("wfu_attribute_"+e+"_"+L.trim()),a&&(a.value=S.trim());a=M[0],wfu_update_dimension_value({target:a})}else if("userfields"==t){for(var P,q=l.split("/"),R=Array(),u=0;u<q.length;u++)P="*"==q[u].substr(0,1),P&&(q[u]=q[u].substr(1)),""!=q[u]&&R.push({name:q[u],required:P});for(var F=document.getElementById("wfu_attribute_"+e),Q=null,U=Array(),u=0;u<F.childNodes.length;u++)1===F.childNodes[u].nodeType&&(null==Q?Q=F.childNodes[u]:U.push(F.childNodes[u]));for(var u=0;u<U.length;u++)F.removeChild(U[u]);wfu_userdata_edit_field(Q,"",!1);for(var X,G=Q,u=0;u<R.length;u++)0==u?wfu_userdata_edit_field(Q,R[u].name,R[u].required):(X=G.cloneNode(!0),wfu_userdata_edit_field(X,R[u].name,R[u].required),F.insertBefore(X,G.nextSibling),G=X);for(var a,u=0;u<Q.childNodes.length&&(a=Q.childNodes[u],"INPUT"!=a.tagName);u++);wfu_update_userfield_value({target:a})}else if("color-triplet"==t){for(var W=l.split(","),u=0;u<W.length;u++)W[u]=W[u].trim();2==W.length?W=[W[0],W[1],"#000000"]:1==W.length?W=[W[0],"#FFFFFF","#000000"]:W.length<3&&(W=["#000000","#FFFFFF","#000000"]);var d=colourNameToHex(W[0]);d||(d=W[0]),jQuery("#wfu_attribute_"+e+"_color").wpColorPicker("color",d);var a=document.getElementById("wfu_attribute_"+e+"_color");a.value=W[0],d=colourNameToHex(W[1]),d||(d=W[1]),jQuery("#wfu_attribute_"+e+"_bgcolor").wpColorPicker("color",d),document.getElementById("wfu_attribute_"+e+"_bgcolor").value=W[1],d=colourNameToHex(W[2]),d||(d=W[2]),jQuery("#wfu_attribute_"+e+"_borcolor").wpColorPicker("color",d),document.getElementById("wfu_attribute_"+e+"_borcolor").value=W[2],wfu_update_triplecolor_value({target:a})}else if("folderlist"==t){for(var f=wfu_parse_folderlist_js(l),z=document.getElementById("wfu_attribute_"+e).options;z.length>0;)z.remove(0);for(var A,$,J,K,Y,Z,u=0;u<f.path.length;u++){$=f.path[u],"/"==$.substr($.length,1)&&($=$.substr(0,$.length-1)),J=$.split("/"),$=J[J.length-1],Y=parseInt(f.level[u]),K="",Z="";for(var y=0;Y>y;y++)K+="&nbsp;&nbsp;&nbsp;",Z+="*";K+=f.label[u],f.default[u]&&(Z+="&"),Z+=""==$?"{root}/"+f.label[u]:$+f.label[u],A=document.createElement("option"),A.className=f.default[u]?"wfu_select_folders_option_default":"",A.value=wfu_plugin_encode_string(Z),A.innerHTML=K,z.add(A)}A=document.createElement("option"),A.value="",A.innerHTML="",z.add(A);var et=document.getElementById("wfu_attribute_"+e);et.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),a=et,l!==a.oldVal&&(a.oldVal=l,document.getElementById("wfu_attribute_value_"+e).value=l,wfu_generate_shortcode())}}function wfu_parse_folderlist_js(e){var t=Object();if(t.path=Array(),t.label=Array(),t.level=Array(),t.default=Array(),"auto"==e.substr(0,4))return t;var l=e.split(",");if(0==l.length)return t;if(1==l.length&&""==l[0].trim())return t;for(var a,d,n,u,r,o,_,s=["root"],c=0,f=0,i=-1,m=0;m<l.length;m++){for(a=l[m].trim(),d=0,n="",u=!1;d<a.length&&"*"==a.substr(d,1);)d++,n+="&nbsp;&nbsp;&nbsp;";if(1>=d-c&&(d>0||0==f)&&(a=a.substr(d,a.length-d),"&"==a.substr(0,1)&&(a=a.substr(1),u=!0),subfolder_items=a.split("/"),subfolder_items.length<2&&subfolder_items.push(""),""!=subfolder_items[1]?(r=subfolder_items[0],o=subfolder_items[1]):(r=a,o=a),""!=r)){u&&-1==i?i=t.path.length:u=!1,0==d&&(f=1),s.length>d?s[d]=r:s.push(r),_="";for(var w=1;d>=w;w++)_+=s[w]+"/";t.path.push(_),t.label.push(o),t.level.push(d),t.default.push(u),c=d}}return t}function colourNameToHex(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"undefined"!=typeof t[e.toLowerCase()]?t[e.toLowerCase()]:!1}function wfu_download_file(e,t,l){var a=wfu_GetHttpRequestObject();if(null!=a){var d=AdminParams.wfu_ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_download_file_invoker",params[1]=new Array(2),params[1][0]="file",params[1][1]=e,params[2]=new Array(2),params[2][0]="nonce",params[2][1]=l;for(var n="",u=0;u<params.length;u++)n+=(u>0?"&":"")+params[u][0]+"="+encodeURI(params[u][1]);a.open("POST",d,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.onreadystatechange=function(){if(4==a.readyState&&200==a.status){var l="wfu_ajax_action_download_file_invoker:",d=a.responseText.indexOf(l);-1==d&&(d=a.responseText.length);var n=(a.responseText.substr(0,d),a.responseText.substr(d+l.length,a.responseText.length-d-l.length));d=n.indexOf(":");var u=n.substr(0,d);if(txt_value=n.substr(d+1,n.length-d-1),"wfu_download_id;"==u.substr(0,16)){var r=u.substr(16),o=document.getElementById("wfu_file_download_container_"+t);o.innerHTML=txt_value,setTimeout("wfu_download_file_monitor('"+e+"', "+t+", '"+r+"')",100)}}},a.send(n)}}function wfu_download_file_monitor(e,t,l){var a=wfu_GetHttpRequestObject();if(null!=a){var d=AdminParams.wfu_ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_download_file_monitor",params[1]=new Array(2),params[1][0]="file",params[1][1]=e,params[2]=new Array(2),params[2][0]="id",params[2][1]=l;for(var n="",u=0;u<params.length;u++)n+=(u>0?"&":"")+params[u][0]+"="+encodeURI(params[u][1]);a.open("POST",d,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.onreadystatechange=function(){if(4==a.readyState&&200==a.status){var l="wfu_ajax_action_download_file_monitor:",d=a.responseText.indexOf(l);-1==d&&(d=a.responseText.length);var n=(a.responseText.substr(0,d),a.responseText.substr(d+l.length,a.responseText.length-d-l.length));d=n.indexOf(":");var u=n.substr(0,d);if(txt_value=n.substr(d+1,n.length-d-1),"repeat"!=u){var r=document.getElementById("wfu_file_download_container_"+t);r.innerHTML=""}else"repeat"==u&&setTimeout("wfu_download_file_monitor('"+e+"', "+t+", '"+txt_value+"')",100)}},a.send(n)}}function wfu_filedetails_userdata_changed(){for(var e,t,l=document.getElementsByName("wfu_filedetails_userdata"),a=!1,d=0;d<l.length;d++)if(e=document.getElementById(l[d].id.replace("wfu_filedetails_userdata_value_","wfu_filedetails_userdata_default_")),t=document.getElementById(l[d].id.replace("wfu_filedetails_userdata_value_","wfu_filedetails_userdata_")),t.value=l[d].value,l[d].value!=e.value){a=!0;break}document.getElementById("dp_filedetails_submit_fields").disabled=!a}function wfu_Attach_FileDetails_Admin_Events(){for(var e=document.getElementsByName("wfu_filedetails_userdata"),t=0;t<e.length;t++)wfu_attach_element_handlers(e[t],wfu_filedetails_userdata_changed)}function wfu_update_browserpermission_option(e,t){var l=document.getElementById("wfu_fbperm_users"),a=document.getElementById("wfu_fbperm_roles"),d=document.getElementById("wfu_fbperm_"+e+"_"+t+"_view"),n=document.getElementById("wfu_fbperm_"+e+"_"+t+"_dl"),u=document.getElementById("wfu_fbperm_"+e+"_"+t+"_edit"),r=document.getElementById("wfu_fbperm_"+e+"_"+t+"_del");if("role"==e){if("0"==t){n.checked=d.checked&&n.checked,u.checked=d.checked&&u.checked,r.checked=d.checked&&r.checked,n.disabled=!d.checked,u.disabled=!d.checked,r.disabled=!d.checked;for(var o=a.value.split(","),_=0;_<o.length;_++){var s=o[_].indexOf("["),c=o[_].substr(0,s);"0"!=c&&wfu_update_browserpermission_option("role",c)}var f=(d.checked?"v":"")+(n.checked?"d":"")+(u.checked?"e":"")+(r.checked?"l":"");a.value=a.value.replace(/^0\[\w*\]/,"0["+f+"]")}else if("administrator"!=t){var i=document.getElementById("wfu_fbperm_role_"+t+"_row"),m=document.getElementById("wfu_fbperm_role_"+t+"_def"),w=document.getElementById("wfu_fbperm_role_0_view"),p=document.getElementById("wfu_fbperm_role_0_dl"),g=document.getElementById("wfu_fbperm_role_0_edit"),v=document.getElementById("wfu_fbperm_role_0_del");d.checked=m.checked?w.checked:d.checked,i.style.fontWeight=m.checked?"":"bold",n.checked=m.checked?p.checked:d.checked&&n.checked,u.checked=m.checked?g.checked:d.checked&&u.checked,r.checked=m.checked?v.checked:d.checked&&r.checked,d.disabled=m.checked,n.disabled=m.checked||!d.checked,u.disabled=m.checked||!d.checked,r.disabled=m.checked||!d.checked;var f=m.checked?"":"D"+(d.checked?"v":"")+(n.checked?"d":"")+(u.checked?"e":"")+(r.checked?"l":"");a.value=a.value.replace(new RegExp(","+t+"\\[\\w*\\]"),","+t+"["+f+"]")}for(var b=l.value.split(","),_=0;_<b.length;_++){var s=b[_].indexOf("["),h=b[_].substr(0,s);"0"!=h&&wfu_update_browserpermission_option("user",h)}}else if("user"==e){var y=document.getElementById("wfu_fbperm_user_"+t+"_role");if("0"==t){d.checked=y.checked?!1:d.checked,n.checked=y.checked?!1:d.checked&&n.checked,u.checked=y.checked?!1:d.checked&&u.checked,r.checked=y.checked?!1:d.checked&&r.checked,d.disabled=y.checked,n.disabled=y.checked||!d.checked,u.disabled=y.checked||!d.checked,r.disabled=y.checked||!d.checked,d.indeterminate=y.checked,n.indeterminate=y.checked,u.indeterminate=y.checked,r.indeterminate=y.checked;for(var b=l.value.split(","),_=0;_<b.length;_++){var s=b[_].indexOf("["),h=b[_].substr(0,s);"0"!=h&&wfu_update_browserpermission_option("user",h)}var f=y.checked?"":"R"+(d.checked?"v":"")+(n.checked?"d":"")+(u.checked?"e":"")+(r.checked?"l":"");l.value=l.value.replace(/^0\[\w*\]/,"0["+f+"]")}else{var I=document.getElementById("wfu_fbperm_user_"+t+"_roles").value.split(",");if(1==I.length&&""==I[0]&&(I=Array()),I.indexOf("administrator")<0){var i=document.getElementById("wfu_fbperm_user_"+t+"_row"),m=document.getElementById("wfu_fbperm_user_"+t+"_def"),E=document.getElementById("wfu_fbperm_user_0_role"),w=document.getElementById("wfu_fbperm_user_0_view"),p=document.getElementById("wfu_fbperm_user_0_dl"),g=document.getElementById("wfu_fbperm_user_0_edit"),v=document.getElementById("wfu_fbperm_user_0_del");if(I.length>0)for(var B=!1,k=!1,x=!1,N=!1,_=0;_<I.length;_++)B=B||document.getElementById("wfu_fbperm_role_"+I[_]+"_view").checked,k=B&&(k||document.getElementById("wfu_fbperm_role_"+I[_]+"_dl").checked),x=B&&(x||document.getElementById("wfu_fbperm_role_"+I[_]+"_edit").checked),N=B&&(N||document.getElementById("wfu_fbperm_role_"+I[_]+"_del").checked);else var B=document.getElementById("wfu_fbperm_role_0_view"),k=document.getElementById("wfu_fbperm_role_0_dl"),x=document.getElementById("wfu_fbperm_role_0_edit"),N=document.getElementById("wfu_fbperm_role_0_del");i.style.fontWeight=m.checked?"":"bold",y.checked=m.checked?E.checked:y.checked,d.checked=m.checked?E.checked?B:w.checked:y.checked?B:d.checked,n.checked=m.checked?E.checked?k:p.checked:y.checked?k:d.checked&&n.checked,u.checked=m.checked?E.checked?x:g.checked:y.checked?x:d.checked&&u.checked,r.checked=m.checked?E.checked?N:v.checked:y.checked?N:d.checked&&r.checked,y.disabled=m.checked,d.disabled=m.checked||y.checked,n.disabled=m.checked||y.checked||!d.checked,u.disabled=m.checked||y.checked||!d.checked,r.disabled=m.checked||y.checked||!d.checked;var f=m.checked?"":"D"+(y.checked?"":"R"+(d.checked?"v":"")+(n.checked?"d":"")+(u.checked?"e":"")+(r.checked?"l":""));l.value=l.value.replace(new RegExp(","+t+"\\[\\w*\\]"),","+t+"["+f+"]")}}}}var DraggedItem=null,ShortcodeNextSave=0,ShortcodeTimeOut=null,ShortcodeString="",Autosave=!1,PageObsolete=!1,PageUpdating=!1,CheckObsolescenceTimeOut=5e3;jQuery(document).ready(function(e){e(".wfu_color_field").wpColorPicker({change:function(e,t){e.target.value=t.color.toString(),"wfu_text_elements"==e.target.name?wfu_update_text_value(e):"wfu_triplecolor_elements"==e.target.name&&wfu_update_triplecolor_value(e)}})});
 
1
+ function wfu_admin_activate_tab(e){for(var t,a,l=document.getElementById("wfu_tab_container"),d=0;d<l.childNodes.length;d++)t=l.childNodes[d],1===t.nodeType&&(a=t.id.substr(8),t.className.indexOf("nav-tab-active")>-1&&(t.className="nav-tab",document.getElementById("wfu_container_"+a).style.display="none"));document.getElementById("wfu_tab_"+e).className="nav-tab nav-tab-active",document.getElementById("wfu_container_"+e).style.display="block"}function wfu_admin_onoff_clicked(e){var t=document.getElementById("wfu_attribute_"+e),a=document.getElementById("wfu_wrapper"),l=document.getElementsByClassName("wfu_shadow_"+e,"div",a),d=document.getElementsByClassName("wfu_shadow_"+e+"_inv","div",a),n="on"==t.className.substr(t.className.length-2);if(n=!n){document.getElementById("wfu_attribute_value_"+e).value="true",t.className="wfu_onoff_container_on";for(var r=0;r<l.length;r++)l[r].style.display="none";for(var r=0;r<d.length;r++)d[r].style.display="block"}else{document.getElementById("wfu_attribute_value_"+e).value="false",t.className="wfu_onoff_container_off";for(var r=0;r<l.length;r++)l[r].style.display="block";for(var r=0;r<d.length;r++)d[r].style.display="none"}wfu_generate_shortcode(),("userdata"==e||"formdata"==e)&&wfu_update_formfield_variables()}function wfu_admin_radio_clicked(e){var t=document.getElementsByName("wfu_radioattribute_"+e),a=document.getElementById("wfu_wrapper"),l=document.getElementsByClassName("wfu_shadow_"+e,"div",a),d=document.getElementsByClassName("wfu_shadow_"+e+"_inv","div",a),n="";for(u=0;u<t.length;u++)t[u].checked&&(n=t[u].value);var r="*"==n.substr(0,1);if(r){n=n.substr(1);for(var u=0;u<l.length;u++)l[u].style.display="none";for(var u=0;u<d.length;u++)d[u].style.display="block"}else{for(var u=0;u<l.length;u++)l[u].style.display="block";for(var u=0;u<d.length;u++)d[u].style.display="none"}document.getElementById("wfu_attribute_value_"+e).value=n,wfu_generate_shortcode()}function wfu_addEventHandler(e,t,a){e.addEventListener?e.addEventListener(t,a,!1):e.attachEvent?e.attachEvent("on"+t,a):e["on"+t]=a}function wfu_attach_separator_dragdrop_events(){for(var e,t=document.getElementById("wfu_placements_container"),a=0;a<t.childNodes.length;a++)e=t.childNodes[a],("wfu_component_separator_hor"==e.className||"wfu_component_separator_ver"==e.className)&&(wfu_addEventHandler(e,"dragenter",wfu_separator_dragenter),wfu_addEventHandler(e,"dragover",wfu_default_dragover),wfu_addEventHandler(e,"dragleave",wfu_separator_dragleave),wfu_addEventHandler(e,"drop",wfu_separator_drop))}function wfu_Attach_Admin_DragDrop_Events(){if(window.FileReader){var e=document.getElementById("wfu_placements_container");if(e){for(var t,a=document.getElementById("wfu_componentlist_container"),l=0;l<e.childNodes.length;l++)t=e.childNodes[l],"wfu_component_box"==t.className&&(wfu_addEventHandler(t,"dragstart",wfu_component_dragstart),wfu_addEventHandler(t,"dragend",wfu_component_dragend));for(var l=0;l<a.childNodes.length;l++)if(t=a.childNodes[l],"wfu_component_box_container"==t.className)for(var d=0;d<t.childNodes.length;d++)"wfu_component_box wfu_inbase"==t.childNodes[d].className&&(wfu_addEventHandler(t.childNodes[d],"dragstart",wfu_component_dragstart),wfu_addEventHandler(t.childNodes[d],"dragend",wfu_component_dragend));t=document.getElementById("wfu_componentlist_dragdrop"),wfu_addEventHandler(t,"dragenter",wfu_componentlist_dragenter),wfu_addEventHandler(t,"dragover",wfu_default_dragover),wfu_addEventHandler(t,"dragleave",wfu_componentlist_dragleave),wfu_addEventHandler(t,"drop",wfu_componentlist_drop),wfu_attach_separator_dragdrop_events()}}}function wfu_componentlist_dragenter(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;var t=document.getElementById("wfu_componentlist_dragdrop");return-1==t.className.indexOf("wfu_componentlist_dragdrop_dragover")&&(t.className+=" wfu_componentlist_dragdrop_dragover"),!1}function wfu_componentlist_dragleave(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;var t=document.getElementById("wfu_componentlist_dragdrop");return t.className=t.className.replace(" wfu_componentlist_dragdrop_dragover",""),!1}function wfu_componentlist_drop(e){e=e||window.event,e.preventDefault&&e.preventDefault();var t=e.dataTransfer.getData("Component");if(!t)return!1;var a=t.split("_"),l=a[0],d=parseInt(a[1]),n=document.getElementById("wfu_component_box_"+l+"_"+d);0==d?(n.className="wfu_component_box wfu_inbase",n.style.display="block",document.getElementById("wfu_component_box_container_"+l).appendChild(n)):n.parentNode.removeChild(n);var r=wfu_admin_recreate_placements_text(null,"");return wfu_admin_recreate_placements_panel(r),document.getElementById("wfu_attribute_value_placements").value=r,wfu_update_multiplacement_attributes(),wfu_generate_shortcode(),!1}function wfu_separator_dragenter(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;if("wfu_component_separator_hor"==e.target.className){var t=document.getElementById("wfu_component_bar_hor");t.style.top=e.target.offsetTop+"px",t.style.display="block"}else if("wfu_component_separator_ver"==e.target.className){var t=document.getElementById("wfu_component_bar_ver");t.style.top=e.target.offsetTop+"px",t.style.left=e.target.offsetLeft+"px",t.style.display="block"}return!1}function wfu_default_dragover(e){return e=e||window.event,e.preventDefault&&e.preventDefault(),!1}function wfu_separator_dragleave(e){if(e=e||window.event,e.preventDefault&&e.preventDefault(),!DraggedItem)return!1;if("wfu_component_separator_hor"==e.target.className){var t=document.getElementById("wfu_component_bar_hor");t.style.display="none"}else if("wfu_component_separator_ver"==e.target.className){var t=document.getElementById("wfu_component_bar_ver");t.style.display="none"}return!1}function wfu_separator_drop(e){e=e||window.event,e.preventDefault&&e.preventDefault();var t=e.dataTransfer.getData("Component");if(!t)return!1;var a=t.split("_"),l=a[0],d=parseInt(a[1]),n=document.getElementById("wfu_component_box_"+l+"_"+d);n.style.display="none",n.className="wfu_component_box wfu_inbase",document.getElementById("wfu_component_box_container_"+l).appendChild(n);var r=wfu_admin_recreate_placements_text(e.target,l);return wfu_admin_recreate_placements_panel(r),document.getElementById("wfu_attribute_value_placements").value=r,wfu_update_multiplacement_attributes(),wfu_generate_shortcode(),!1}function wfu_component_dragstart(e){e=e||window.event,e.dataTransfer.setData("Component",e.target.id.replace("wfu_component_box_","")),-1==e.target.className.indexOf("wfu_component_box_dragged")&&(e.target.className+=" wfu_component_box_dragged",DraggedItem=e.target),e.target.style.zIndex=3;var t=document.getElementById("wfu_componentlist_dragdrop");return t.className="wfu_componentlist_dragdrop wfu_componentlist_dragdrop_dragover",t.style.display="block",!1}function wfu_component_dragend(e){e=e||window.event,DraggedItem=null,e.target.style.zIndex=1;var t=document.getElementById("wfu_componentlist_dragdrop");return t.style.display="none",t.className="wfu_componentlist_dragdrop",e.target.className=e.target.className.replace(" wfu_component_box_dragged",""),document.getElementById("wfu_component_bar_ver").style.display="none",document.getElementById("wfu_component_bar_hor").style.display="none",!1}function wfu_admin_recreate_placements_text(e,t){function a(e){""!=n&&(n+=d),n+=e,d=""}for(var l=document.getElementById("wfu_placements_container"),d="",n="",r=0;r<l.childNodes.length;r++)item=l.childNodes[r],"wfu_component_separator_ver"==item.className?(""==d&&(d="+"),item==e&&(a(t),d="+")):"wfu_component_separator_hor"==item.className?(d="/",item==e&&(a(t),d="/")):"wfu_component_box"==item.className&&a(item.id.replace("wfu_component_box_","").replace(/_.*$/,""));return n}function wfu_admin_recreate_placements_panel(e){for(var t,a,l,d,n,r,u,o=document.getElementById("wfu_placements_container"),_="",s=0;s<o.childNodes.length;s++)t=o.childNodes[s],"wfu_component_box"==t.className&&(d=t.id.replace("wfu_component_box_",""),n=d.split("_"),_=n[0],r=parseInt(n[1]),0==r?(t.style.display="inline-block",t.className="wfu_component_box wfu_inbase",document.getElementById("wfu_component_box_container_"+_).appendChild(t)):t.parentNode.removeChild(t));for(var c=document.querySelectorAll("div.wfu_component_box_container"),f={},s=0;s<c.length;s++)_=c[s].id.replace("wfu_component_box_container_",""),f[_]=0,u=document.querySelector("div#"+c[s].id+" div.wfu_component_box_index"),u&&(u.innerHTML="1");o.innerHTML="",a=e.split("/");for(var s=0;s<a.length;s++){t=document.createElement("DIV"),t.className="wfu_component_separator_hor",t.setAttribute("draggable",!0),o.appendChild(t),t=document.createElement("DIV"),t.className="wfu_component_separator_ver",t.setAttribute("draggable",!0),o.appendChild(t),l=a[s].split("+");for(var i=0;i<l.length;i++)t=document.querySelector("div#wfu_component_box_container_"+l[i]+" div.wfu_component_box.wfu_inbase"),t&&(d=t.id.replace("wfu_component_box_",""),n=d.split("_"),_=n[0],r=parseInt(n[1]),0==r?o.appendChild(t):(f[_]++,t.id="wfu_component_box_"+_+"_"+(f[_]+1).toString(),t.style.display="block",u=document.querySelector("div#"+t.id+" div.wfu_component_box_index"),u.innerHTML=(f[_]+1).toString(),t=t.cloneNode(!0),o.appendChild(t),t.id="wfu_component_box_"+_+"_"+f[_].toString(),u=document.querySelector("div#"+t.id+" div.wfu_component_box_index"),u.innerHTML=f[_].toString(),wfu_addEventHandler(t,"dragstart",wfu_component_dragstart),wfu_addEventHandler(t,"dragend",wfu_component_dragend)),t.className="wfu_component_box",t.style.display="inline-block",t=document.createElement("DIV"),t.className="wfu_component_separator_ver",t.setAttribute("draggable",!0),o.appendChild(t))}t=document.createElement("DIV"),t.className="wfu_component_separator_hor",t.setAttribute("draggable",!0),o.appendChild(t),t=document.createElement("DIV"),t.id="wfu_component_bar_hor",t.className="wfu_component_bar_hor",o.appendChild(t),t=document.createElement("DIV"),t.id="wfu_component_bar_ver",t.className="wfu_component_bar_ver",o.appendChild(t),wfu_attach_separator_dragdrop_events()}function wfu_update_multiplacement_attributes(){for(var e=document.querySelectorAll("div.wfu_component_box_container"),t=0;t<e.length;t++){itemname=e[t].id.replace("wfu_component_box_container_","");var a=document.querySelector("div#"+e[t].id+" div.wfu_component_box_index");if(a)for(var l=Math.max(1,parseInt(a.innerHTML)-1),d=document.getElementsByName("wfu_attribute_governor_"+itemname),n=0;n<d.length;n++)wfu_update_multiplacement_attribute(d[n].value,l)}}function wfu_update_multiplacement_attribute(e,t){if("userdatalabel"==e){var a=document.querySelectorAll("div.wfu_formdata_container"),l=a.length;if(1>l)return;for(var d,n,r=a[0],u=2;u<=Math.max(l,t);){if(u>l){var o=e+u.toString();for(d=r.parentNode;null!=d&&"TR"!=d.tagName;)d=d.parentNode;if(null==d||"TR"!=d.tagName)return;n=d.cloneNode(!0),n.id="tr_"+wfu_randomString(4),d.parentNode.appendChild(n);var _=document.querySelector("tr#"+n.id+' label[for="wfu_attribute_'+e+'"]');_.setAttribute("for","wfu_attribute_"+o),_.innerHTML+=" ("+u.toString()+")",_=document.querySelector("tr#"+n.id+" input.wfu_attribute_governor"),_.setAttribute("name","wfu_attribute_governor_independent"),_.value=o,_=document.querySelector("tr#"+n.id+" div.wfu_formdata_container"),_.id+=u.toString();var s=document.getElementById("wfu_attribute_default_"+o);s||(s=document.createElement("INPUT"),s.id="wfu_attribute_default_"+o,s.type="hidden",s.value=document.getElementById("wfu_attribute_default_"+e).value,document.getElementById("wfu_attribute_defaults").appendChild(s));var c=document.getElementById("wfu_attribute_value_"+o);c||(c=document.createElement("INPUT"),c.id="wfu_attribute_value_"+o,c.type="hidden",c.value=s.value,document.getElementById("wfu_attribute_values").appendChild(c)),window["wfu_attribute_"+o+"_formtemplate"]=window["wfu_attribute_"+e+"_formtemplate"],window["wfu_attribute_"+o+"_typeprops"]=window["wfu_attribute_"+e+"_typeprops"],wfu_apply_value(o,"formfields",c.value)}else if(u>t){for(n=a[u-1].parentNode;null!=n&&"TR"!=n.tagName;)n=n.parentNode;if(null==n||"TR"!=n.tagName)return;n.parentNode.removeChild(n),wfu_update_formfield_variables()}u++}}}function wfu_subfolders_input_changed(e){e=e||window.event;var t=e.target,a=t.id.replace("wfu_subfolders_path_","");a=a.replace("wfu_subfolders_label_","");var l=document.getElementById("wfu_attribute_"+a);if(!(l.selectedIndex<0)){var d,n,r=document.getElementById("wfu_subfolders_path_"+a),u=document.getElementById("wfu_subfolders_label_"+a),o=document.getElementById("wfu_subfolders_ok_"+a),_="1"==document.getElementById("wfu_subfolders_isnewitem_"+a).value;if(_)d="",n="";else{var s=l.data;t=s[l.selectedIndex],d=t.path,n=t.label}if(r.value==d&&u.value==n)o.disabled=!0,_||wfu_subfolders_update_nav(a);else{o.disabled=!1;for(var c=document.getElementsByName("wfu_subfolder_nav_"+a),f=0;f<c.length;f++)c[f].disabled=!0}}}function wfu_subfolders_auto_changed(e){var t=document.getElementById("wfu_attribute_"+e),a=document.getElementById("wfu_subfolders_auto_"+e),l=document.getElementById("wfu_subfolders_editable_"+e),d=document.getElementById("wfu_subfolders_manualtext_"+e);if(a.checked){var n=document.getElementById("wfu_attribute_value_"+e).value;"auto"!=n.substr(0,4)&&(d.value=n),l.parentNode.style.display="inline",wfu_apply_value(e,"folderlist","auto"+(l.checked?"+":"")),t.disabled=!0}else t.disabled=!1,l.parentNode.style.display="none",wfu_apply_value(e,"folderlist",d.value)}function wfu_subfolders_up_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data;item=a[t.selectedIndex];var l=item.index-1;if(!(0>l)){for(var d=-1,n=t.selectedIndex-1;n>=0;){if(a[n].level==item.level&&a[n].index==l){d=n;break}n--}if(-1!=d){var r=0;for(n=t.selectedIndex+1;n<a.length&&a[n].level>item.level;)r++,n++;a[d].index=item.index,item.index=l,t.data=a.slice(0,d).concat(a.slice(t.selectedIndex,t.selectedIndex+1+r)).concat(a.slice(d,t.selectedIndex)).concat(a.slice(t.selectedIndex+1+r));var u=wfu_update_subfolder_list(e);t.selectedIndex=d,wfu_subfolders_update_toolnav(e),item=t,u!==item.oldVal&&(item.oldVal=u,document.getElementById("wfu_attribute_value_"+e).value=u,wfu_generate_shortcode())}}}}function wfu_subfolders_down_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data;item=a[t.selectedIndex];var l=item.index+1,d=-1;for(curind=t.selectedIndex+1;curind<a.length;){if(a[curind].level==item.level){d=curind;break}if(a[curind].level<item.level)break;curind++}if(-1!=d){var n=0;for(curind=d+1;curind<a.length&&a[curind].level>item.level;)n++,curind++;a[d].index=item.index,item.index=l,t.data=a.slice(0,t.selectedIndex).concat(a.slice(d,d+1+n)).concat(a.slice(t.selectedIndex,d)).concat(a.slice(d+1+n));var r=wfu_update_subfolder_list(e);t.selectedIndex=t.selectedIndex+n+1,wfu_subfolders_update_toolnav(e),item=t,r!==item.oldVal&&(item.oldVal=r,document.getElementById("wfu_attribute_value_"+e).value=r,wfu_generate_shortcode())}}}function wfu_subfolders_left_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data;for(item=a[t.selectedIndex],curind=t.selectedIndex+1;curind<a.length&&a[curind].level>item.level;)a[curind].level--,curind++;item.level--;var l=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,l!==item.oldVal&&(item.oldVal=l,document.getElementById("wfu_attribute_value_"+e).value=l,wfu_generate_shortcode())}}function wfu_subfolders_right_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data;for(item=a[t.selectedIndex],curind=t.selectedIndex+1;curind<a.length&&a[curind].level>item.level;)a[curind].level++,curind++;item.level++;var l=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,l!==item.oldVal&&(item.oldVal=l,document.getElementById("wfu_attribute_value_"+e).value=l,wfu_generate_shortcode())}}function wfu_subfolders_def_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data;if(item=a[t.selectedIndex],item.default)item.default=!1;else{for(var l=0;l<a.length;l++)a[l].default=!1;item.default=!0}var d=wfu_update_subfolder_list(e);wfu_subfolders_update_toolnav(e),item=t,d!==item.oldVal&&(item.oldVal=d,document.getElementById("wfu_attribute_value_"+e).value=d,wfu_generate_shortcode())}}function wfu_subfolders_ok_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=document.getElementById("wfu_subfolders_path_"+e),l=document.getElementById("wfu_subfolders_label_"+e);if(""==a.value||""==l.value)return void alert("Path or label cannot be empty!");var d=t.data,n="1"==document.getElementById("wfu_subfolders_isnewitem_"+e).value;if(n){var r=parseInt(document.getElementById("wfu_subfolders_newitemlevel_"+e).value),u={label:l.value,path:a.value,level:r,"default":!1},o=parseInt(document.getElementById("wfu_subfolders_newitemindex_"+e).value);o>=d.length?d.push(u):d.splice(o,0,u)}else item=d[t.selectedIndex],item.path=a.value,item.label=l.value;var _=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,_!==item.oldVal&&(item.oldVal=_,document.getElementById("wfu_attribute_value_"+e).value=_,wfu_generate_shortcode())}}function wfu_subfolders_del_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data;item=a[t.selectedIndex];var l=0;for(curind=t.selectedIndex+1;curind<a.length&&a[curind].level>item.level;)l++,curind++;if(!(l>0)||confirm("Children items will be deleted as well. Proceed?")){a.splice(t.selectedIndex,1+l);var d=wfu_update_subfolder_list(e);t.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),item=t,d!==item.oldVal&&(item.oldVal=d,document.getElementById("wfu_attribute_value_"+e).value=d,wfu_generate_shortcode())}}}function wfu_subfolders_add_clicked(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a=t.data,l=t.selectedIndex;item=a[l];var d=t.options,n=document.createElement("option");n.value="",n.innerHTML="",d.add(n,l),t.selectedIndex=l;var r=document.getElementById("wfu_subfolder_tools_"+e),u=document.getElementById("wfu_subfolders_path_"+e),o=document.getElementById("wfu_subfolders_label_"+e),_=document.getElementById("wfu_subfolders_ok_"+e),s=document.getElementById("wfu_subfolders_browse_"+e);r.className="wfu_subfolder_tools_container",o.disabled=!1,_.disabled=!0,document.getElementById("wfu_subfolders_isnewitem_"+e).value="1",document.getElementById("wfu_subfolders_newitemindex_"+e).value=l,document.getElementById("wfu_subfolders_newitemlevel_"+e).value=item.level,document.getElementById("wfu_subfolders_newitemlevel2_"+e).value="",u.disabled=0==item.level,s.disabled=0==item.level,0==item.level?(u.value="{root}",o.value="{upload folder}"):(u.value="",o.value="");for(var c=document.getElementsByName("wfu_subfolder_nav_"+e),f=0;f<c.length;f++)c[f].disabled=!0}}function wfu_subfolders_browse_clicked(e){var t=wfu_GetHttpRequestObject();if(null!=t){var a=null;try{var a=new FormData}catch(l){}if(null!=a){for(var d=document.getElementById("wfu_global_dialog_container"),n=document.getElementById("wfu_subfolders_browser_"+e),r=document.getElementById("wfu_subfolders_browse_"+e),u=document.getElementById("wfu_subfolders_inner_shadow_"+e),o=document.getElementById("wfu_subfolders_browser_msgcont_"+e),_=document.getElementById("wfu_subfolders_browser_msg_"+e),s=document.getElementById("wfu_subfolders_browser_img_"+e),c=document.getElementById("wfu_subfolders_browser_ok_"+e),f=document.getElementById("wfu_subfolders_browser_list_"+e);f.options.length>0;)f.options.remove(0);c.disabled=!0,c.onclick=function(){wfu_folder_browser_cancel_clicked(e)},_.innerHTML="loading folder contents...",s.style.display="inline",o.style.display="block",d.style.display="block",n.style.display="block",n.style.left=r.offsetLeft+r.offsetWidth-n.offsetWidth+"px",n.style.top=r.offsetTop+r.offsetHeight-n.offsetHeight+"px",u.style.display="block",d.onclick=function(){wfu_folder_browser_cancel_clicked(e)};var i=document.getElementById("wfu_attribute_uploadpath").value;"/"==i.substr(i.length-1)&&(i=i.substr(0,i.length-1));var m=wfu_get_relative_path(e).split(","),p=i+m[0];"/"!=p.substr(0)&&(p="/"+p);var w="";2==m.length&&(w=m[1]),a.append("action","wfu_ajax_action_read_subfolders"),a.append("folder1",wfu_plugin_encode_string(p)),a.append("folder2",wfu_plugin_encode_string(w)),t.key=e,t.addEventListener("load",wfu_readfolderComplete,!1),t.addEventListener("error",wfu_readfolderFailed,!1),t.addEventListener("abort",wfu_readfolderCanceled,!1),t.open("POST",AdminParams.wfu_ajax_url),t.send(a)}}}function wfu_readfolderComplete(e){var t=e.target.key,a=document.getElementById("wfu_subfolders_browser_msgcont_"+t),l=document.getElementById("wfu_subfolders_browser_msg_"+t),d=document.getElementById("wfu_subfolders_browser_img_"+t),n=document.getElementById("wfu_subfolders_browser_list_"+t),r=document.getElementById("wfu_subfolders_browser_ok_"+t),u=document.getElementById("wfu_subfolders_path_"+t),o=document.getElementById("wfu_subfolders_label_"+t),_=e.target.responseText;if(-1!=_){var s="wfu_read_subfolders:",c=e.target.responseText.indexOf(s);-1==c&&(c=e.target.responseText.length);var f=(e.target.responseText.substr(0,c),e.target.responseText.substr(c+s.length,e.target.responseText.length-c-s.length));c=f.indexOf(":");var i=f.substr(0,c);if(txt_value=f.substr(c+1,f.length-c-1),"success"==i){for(var m,p=wfu_plugin_decode_string(txt_value),w=p.split(","),g=0,v=0;v<w.length;v++)""!=w[v]&&(m=document.createElement("option"),m.value=w[v],m.innerHTML=w[v].replace("*","&nbsp;&nbsp;&nbsp;"),n.add(m),g++);0==g&&(m=document.createElement("option"),m.value="",m.innerHTML="{empty}",m.disabled=!0,n.add(m)),n.selectedIndex=-1,r.onclick=function(){var e=n.options[n.selectedIndex].value,a=parseInt(document.getElementById("wfu_subfolders_newitemlevel_"+t).value);("*"==e.substr(0,1)||0==a)&&(document.getElementById("wfu_subfolders_newitemlevel_"+t).value=a+1,a>0&&(e=e.substr(1))),u.value=e,o.value=e,wfu_folder_browser_cancel_clicked(t),wfu_subfolders_ok_clicked(t)},a.style.display="none"}else"error"==i?(l.innerHTML=txt_value,d.style.display="none",r.disabled=!1):(l.innerHTML="Unknown error",d.style.display="none",r.disabled=!1)}}function wfu_readfolderFailed(e){var t=e.target.key,a=document.getElementById("wfu_subfolders_browser_msg_"+t),l=document.getElementById("wfu_subfolders_browser_img_"+t),d=document.getElementById("wfu_subfolders_browser_ok_"+t);a.innerHTML="Unknown error",l.style.display="none",d.disabled=!1}function wfu_readfolderCanceled(e){var t=e.target.key,a=document.getElementById("wfu_subfolders_browser_msg_"+t),l=document.getElementById("wfu_subfolders_browser_img_"+t),d=document.getElementById("wfu_subfolders_browser_ok_"+t);a.innerHTML="Unknown error",l.style.display="none",d.disabled=!1}function wfu_subfolders_browser_list_changed(e){var t=document.getElementById("wfu_subfolders_browser_list_"+e),a=document.getElementById("wfu_subfolders_browser_ok_"+e);a.disabled=t.selectedIndex<0}function wfu_folder_browser_cancel_clicked(e){var t=document.getElementById("wfu_global_dialog_container"),a=document.getElementById("wfu_subfolders_browser_"+e),l=(document.getElementById("wfu_subfolders_browse_"+e),document.getElementById("wfu_subfolders_inner_shadow_"+e));t.onclick=null,l.style.display="none",a.style.display="none",t.style.display="none"}function wfu_get_relative_path(e){var t=document.getElementById("wfu_attribute_"+e);if(!(t.selectedIndex<0)){var a,l=t.data,d="1"==document.getElementById("wfu_subfolders_isnewitem_"+e).value;a=d?parseInt(document.getElementById("wfu_subfolders_newitemlevel_"+e).value):l[t.selectedIndex].level;for(var n="/",r=t.selectedIndex-1,u=a;r>=0&&u>1;)l[r].level<u&&(n="/"+l[r].path+n,u=l[r].level),r--;return d&&"1"==document.getElementById("wfu_subfolders_newitemlevel2_"+e).value&&a>0&&t.selectedIndex>0&&(n+=","+l[t.selectedIndex-1].path),n}}function wfu_subfolders_changed(e){wfu_update_subfolder_list(e),wfu_subfolders_update_toolnav(e)}function wfu_subfolders_update_toolnav(e){var t,a,l=document.getElementById("wfu_attribute_"+e),d=document.getElementById("wfu_subfolder_tools_"+e),n=document.getElementById("wfu_subfolders_path_"+e),r=document.getElementById("wfu_subfolders_label_"+e),u=document.getElementById("wfu_subfolders_ok_"+e),o=document.getElementById("wfu_subfolders_browse_"+e),_=document.getElementById("wfu_subfolders_auto_"+e);if(document.getElementById("wfu_subfolders_isnewitem_"+e).value="",document.getElementById("wfu_subfolders_newitemindex_"+e).value="",document.getElementById("wfu_subfolders_newitemlevel_"+e).value="",document.getElementById("wfu_subfolders_newitemlevel2_"+e).value="",null==l.data?(t=wfu_decode_subfolder_list(e),l.data=t):t=l.data,0===l.data.length?(l.className="wfu_select_folders wfu_select_folders_empty",l.options[0].innerHTML=_.checked?"":"press here"):l.className="wfu_select_folders",l.selectedIndex<0)d.className="wfu_subfolder_tools_container wfu_subfolder_tools_disabled",n.disabled=!0,r.disabled=!0,u.disabled=!0,o.disabled=!0,r.value="",n.value="";else if(l.selectedIndex>=l.options.length-1){d.className="wfu_subfolder_tools_container",r.disabled=!1,u.disabled=!0,document.getElementById("wfu_subfolders_isnewitem_"+e).value="1",document.getElementById("wfu_subfolders_newitemindex_"+e).value=t.length;var s;s=0==t.length?0:0==t[t.length-1].level?1:t[t.length-1].level,document.getElementById("wfu_subfolders_newitemlevel_"+e).value=s,document.getElementById("wfu_subfolders_newitemlevel2_"+e).value="1",n.disabled=0==s,o.disabled=!1,0==s?(n.value="{root}",r.value="{upload folder}"):(n.value="",r.value="")}else d.className="wfu_subfolder_tools_container",r.disabled=!1,u.disabled=!0,a=t[l.selectedIndex],n.disabled=0==a.level,o.disabled=0==a.level,r.value=a.label,n.value=a.path;var c=document.getElementsByName("wfu_subfolder_nav_"+e);if(l.selectedIndex<0||l.selectedIndex>=l.options.length-1)for(var f=0;f<c.length;f++)c[f].disabled=!0;else wfu_subfolders_update_nav(e)}function wfu_subfolders_update_nav(e){var t=document.getElementById("wfu_attribute_"+e),a=document.getElementById("wfu_subfolders_up_"+e),l=document.getElementById("wfu_subfolders_down_"+e),d=document.getElementById("wfu_subfolders_left_"+e),n=document.getElementById("wfu_subfolders_right_"+e),r=document.getElementById("wfu_subfolders_add_"+e),u=document.getElementById("wfu_subfolders_def_"+e),o=document.getElementById("wfu_subfolders_del_"+e),_=t.data,s=_[t.selectedIndex];for(a.disabled=s.index<=0,ind=t.selectedIndex+1,nextind=0;ind<_.length;){if(_[ind].level==s.level){nextind=_[ind].index;break}if(_[ind].level<s.level)break;ind++}l.disabled=0==s.level||0==nextind,d.disabled=0==t.selectedIndex&&s.level<1||t.selectedIndex>0&&s.level<=1,prevlevel=t.selectedIndex>=1?_[t.selectedIndex-1].level:0,n.disabled=s.level-prevlevel>0,r.disabled=0==s.level,u.disabled=!1,u.className="button"+(s.default?" wfu_subfolder_nav_pressed":""),o.disabled=!1}function wfu_decode_subfolder(e){var t={label:"",path:"",level:0,"default":!1};e=e.trim();for(var a=0,l=!1;a<e.length&&"*"==e.substr(a,1);)a++;e=e.substr(a,e.length-a),"&"==e.substr(0,1)&&(e=e.substr(1),l=!0),t.level=a,t.default=l;var d=e.split("/");return 1==d.length?(t.path=d[0],t.label=d[0]):d.length>1&&(t.path=d[0],t.label=d[1]),0==a&&(t.path="{root}",""==t.label&&(t.label="{upload folder}")),t}function wfu_decode_subfolder_list(e){for(var t,a=document.getElementById("wfu_attribute_"+e).options,l=Array(),d=["root"],n=[0],r=-1,u=0;u<a.length-1;u++){for(l.push(wfu_decode_subfolder(wfu_plugin_decode_string(a[u].value))),d.length>l[u].level?d[l[u].level]=l[u].path:d.push(l[u].path),t="",j=1;j<=l[u].level;j++)t+=d[j]+"/";l[u].fullpath=t,n.length<=l[u].level&&n.push(0),l[u].index=l[u].level>r?0:n[l[u].level]+1,n[l[u].level]=l[u].index,r=l[u].level}return l}function wfu_update_subfolder_list(e){var t=document.getElementById("wfu_attribute_"+e).options,a=document.getElementById("wfu_attribute_"+e),l=a.data;if(null!=l){var d,n,r="";t.length=l.length+1;for(var u=0;u<l.length;u++){for(d="",n="",j=0;j<l[u].level;j++)d+="*",n+="&nbsp;&nbsp;&nbsp;";l[u].default?(d+="&",t[u].className="wfu_select_folders_option_default"):t[u].className="",d+=l[u].path+"/"+l[u].label,n+=l[u].label,t[u].value=wfu_plugin_encode_string(d),t[u].innerHTML=n,""!=r&&(r+=","),r+=d}return t[l.length].value="",t[l.length].innerHTML="",r}}function wfu_userdata_edit_field(e,t,a){for(var l,d=0;d<e.childNodes.length;d++)l=e.childNodes[d],"INPUT"==l.tagName?"text"==l.type?(l.value=t,wfu_attach_element_handlers(l,wfu_update_userfield_value)):"checkbox"==l.type&&(l.checked=a):"DIV"==l.tagName&&(l.className="wfu_userdata_action")}function wfu_formdata_edit_field(){}function wfu_formdata_type_changed(e){var t=e.split("_"),a=t[0],l="wfu_formfield_"+e,d=(document.getElementById("wfu_attribute_"+a),document.getElementById(l+"_container")),n=window["wfu_attribute_"+a+"_typeprops"][document.getElementById(l+"_type").value],r={type:document.getElementById(l+"_type").value,label:document.getElementById(l+"_label").value,labelposition:document.getElementById(l+"_labelposition").value,required:"show"==n.required.substr(0,4)&&document.getElementById(l+"_required")?document.getElementById(l+"_required").checked:"true"==n.required.substr(5),donotautocomplete:"show"==n.donotautocomplete.substr(0,4)&&document.getElementById(l+"_donotautocomplete")?document.getElementById(l+"_donotautocomplete").checked:"true"==n.donotautocomplete.substr(5),validate:"show"==n.validate.substr(0,4)&&document.getElementById(l+"_validate")?document.getElementById(l+"_validate").checked:"true"==n.validate.substr(5),typehook:"show"==n.typehook.substr(0,4)&&document.getElementById(l+"_typehook")?document.getElementById(l+"_typehook").checked:"true"==n.typehook.substr(5),hintposition:"show"==n.hintposition.substr(0,4)&&document.getElementById(l+"_hintposition")?document.getElementById(l+"_hintposition").value:n.hintposition.substr(5),"default":"show"==n.default.substr(0,4)&&document.getElementById(l+"_default")?document.getElementById(l+"_default").value:n.default.substr(5),data:"show"==n.data.substr(0,4)&&document.getElementById(l+"_data")?document.getElementById(l+"_data").value:n.data.substr(5),group:"show"==n.group.substr(0,4)&&document.getElementById(l+"_group")?document.getElementById(l+"_group").value:n.group.substr(5),format:"show"==n.format.substr(0,4)&&document.getElementById(l+"_format")?document.getElementById(l+"_format").value:n.format.substr(5)},u=wfu_formdata_prepare_template(a,r,e);d.innerHTML=u;for(var o=document.querySelectorAll("div#"+l+'_container input[name="wfu_formfield_elements"]'),_=0;_<o.length;_++)wfu_attach_element_handlers(o[_],wfu_update_formfield_value);for(var s=document.querySelectorAll("div#wfu_attribute_"+a+" .wfu_formdata_action_remove"),_=0;_<s.length;_++)s[_].className="wfu_formdata_action wfu_formdata_action_remove"+(s.length>1?"":" wfu_formdata_action_disabled");wfu_update_formfield_value({target:d})}function wfu_userdata_add_field(e){var t=e.parentNode,a=t.cloneNode(!0);wfu_userdata_edit_field(a,"",!1),t.parentNode.insertBefore(a,t.nextSibling)}function wfu_formdata_add_field(e){var t=e.split("_"),a=t[0],l=(t[1],document.getElementById("wfu_attribute_"+a)),d=document.getElementById("wfu_formfield_"+e+"_container"),n=document.createElement("DIV"),r=a+"_"+wfu_randomString(4);n.id="wfu_formfield_"+r+"_container",n.className="wfu_formdata_line_container",l.insertBefore(n,d.nextSibling);var u={type:"text",label:"",labelposition:"left",required:!1,donotautocomplete:!1,validate:!1,"default":"",data:"",group:"",format:"",hintposition:"right",typehook:!1},o=wfu_formdata_prepare_template(a,u,r);n.innerHTML=o;for(var _=document.querySelectorAll("div#wfu_formfield_"+r+'_container input[name="wfu_formfield_elements"]'),s=0;s<_.length;s++)wfu_attach_element_handlers(_[s],wfu_update_formfield_value);
2
+ for(var c=document.querySelectorAll("div#wfu_attribute_"+a+" .wfu_formdata_action_remove"),s=0;s<c.length;s++)c[s].className="wfu_formdata_action wfu_formdata_action_remove"+(c.length>1?"":" wfu_formdata_action_disabled");wfu_update_formfield_value({target:n})}function wfu_formdata_prepare_template(e,t,a){var l=wfu_plugin_decode_string(window["wfu_attribute_"+e+"_formtemplate"]),d=window["wfu_attribute_"+e+"_typeprops"][t.type],n=window["wfu_attribute_"+e+"_typeprops"][0].split(","),r=["required","donotautocomplete","validate","typehook","labelposition","hintposition","default","data","group","format"],u=["none","top","right","bottom","left"],o=["none","inline","top","right","bottom","left"];l=l.replace(/\[\[key\]\]/g,a).replace(/\[\[t\]\]/g,t.type).replace(/\[\[label\]\]/g,t.label).replace(/\[\[s\]\]/g,t.labelposition).replace(/\[\[d\]\]/g,t.default).replace(/\[\[l\]\]/g,t.data).replace(/\[\[data_label\]\]/g,d.data_label).replace(/\[\[g\]\]/g,t.group).replace(/\[\[f\]\]/g,t.format).replace(/\[\[p\]\]/g,t.hintposition);for(var _=0;_<r.length;_++)l=l.replace(new RegExp("\\[\\["+r[_]+"_hint\\]\\]","g"),d[r[_]+"_hint"]);for(var _=0;_<n.length;_++)l=l.replace("[[type_"+n[_]+"_selected]]",n[_]==t.type?' selected="selected"':"");for(var _=0;_<u.length;_++)l=l.replace("[[labelposition_"+u[_]+"_selected]]",u[_]==t.labelposition?' selected="selected"':"");for(var _=0;_<o.length;_++)l=l.replace("[[hintposition_"+o[_]+"_selected]]",o[_]==t.hintposition?' selected="selected"':"");return l=l.replace("[[remove_disabled]]",""),l=t.required?l.replace(/\[\[r\-\>\]\]|\[\[\<\-r\]\]/g,""):l.replace(/\[\[r\-\>\]\].*\[\[\<\-r\]\]/g,""),l=t.donotautocomplete?l.replace(/\[\[a\-\>\]\]|\[\[\<\-a\]\]/g,""):l.replace(/\[\[a\-\>\]\].*\[\[\<\-a\]\]/g,""),l=t.validate?l.replace(/\[\[v\-\>\]\]|\[\[\<\-v\]\]/g,""):l.replace(/\[\[v\-\>\]\].*\[\[\<\-v\]\]/g,""),l=t.typehook?l.replace(/\[\[h\-\>\]\]|\[\[\<\-h\]\]/g,""):l.replace(/\[\[h\-\>\]\].*\[\[\<\-h\]\]/g,""),l="show"==d.required.substr(0,4)?l.replace(/\[\[R\-\>\]\]|\[\[\<\-R\]\]/g,""):l.replace(/\[\[R\-\>\]\][^]*\[\[\<\-R\]\]/g,""),l="show"==d.donotautocomplete.substr(0,4)?l.replace(/\[\[A\-\>\]\]|\[\[\<\-A\]\]/g,""):l.replace(/\[\[A\-\>\]\][^]*\[\[\<\-A\]\]/g,""),l="show"==d.validate.substr(0,4)?l.replace(/\[\[V\-\>\]\]|\[\[\<\-V\]\]/g,""):l.replace(/\[\[V\-\>\]\][^]*\[\[\<\-V\]\]/g,""),l="show"==d.hintposition.substr(0,4)?l.replace(/\[\[P\-\>\]\]|\[\[\<\-P\]\]/g,""):l.replace(/\[\[P\-\>\]\][^]*\[\[\<\-P\]\]/g,""),l="show"==d.typehook.substr(0,4)?l.replace(/\[\[H\-\>\]\]|\[\[\<\-H\]\]/g,""):l.replace(/\[\[H\-\>\]\][^]*\[\[\<\-H\]\]/g,""),l="show"==d.default.substr(0,4)?l.replace(/\[\[D\-\>\]\]|\[\[\<\-D\]\]/g,""):l.replace(/\[\[D\-\>\]\][^]*\[\[\<\-D\]\]/g,""),l="show"==d.data.substr(0,4)?l.replace(/\[\[L\-\>\]\]|\[\[\<\-L\]\]/g,""):l.replace(/\[\[L\-\>\]\][^]*\[\[\<\-L\]\]/g,""),l="show"==d.group.substr(0,4)?l.replace(/\[\[G\-\>\]\]|\[\[\<\-G\]\]/g,""):l.replace(/\[\[G\-\>\]\][^]*\[\[\<\-G\]\]/g,""),l="show"==d.format.substr(0,4)?l.replace(/\[\[F\-\>\]\]|\[\[\<\-F\]\]/g,""):l.replace(/\[\[F\-\>\]\][^]*\[\[\<\-F\]\]/g,"")}function wfu_userdata_remove_field(e){for(var t=e.parentNode,a=t.parentNode,l=null,d=0;d<a.childNodes.length;d++)if(1===a.childNodes[d].nodeType){l=a.childNodes[d];break}if(t!=l){t.parentNode.removeChild(t);for(var d=0;d<l.childNodes.length;d++)if(1===l.childNodes[d].nodeType){wfu_update_userfield_value({target:l.childNodes[d]});break}}}function wfu_formdata_remove_field(e){var t=e.split("_"),a=t[0],l=document.querySelectorAll("div#wfu_attribute_"+a+" .wfu_formdata_line_container");if(!(l.length<2)){var d=document.getElementById("wfu_attribute_"+a),n=document.getElementById("wfu_formfield_"+e+"_container");d.removeChild(n),n=document.querySelector("div#wfu_attribute_"+a+" .wfu_formdata_line_container");for(var r=document.querySelectorAll("div#wfu_attribute_"+a+" .wfu_formdata_action_remove"),u=0;u<r.length;u++)r[u].className="wfu_formdata_action wfu_formdata_action_remove"+(r.length>1?"":" wfu_formdata_action_disabled");wfu_update_formfield_value({target:n})}}function wfu_generate_shortcode(){for(var e,t=document.getElementById("wfu_shortcode_tag").value,a=document.getElementById("wfu_attribute_defaults"),l=(document.getElementById("wfu_attribute_values"),""),d="",n="["+t,r="",u=0;u<a.childNodes.length;u++)e=a.childNodes[u],1===e.nodeType&&(l=e.id.replace("wfu_attribute_default_",""),d=document.getElementById("wfu_attribute_value_"+l).value,e.value!=d&&(r+=" "+l+'="'+d+'"'));n+=r+"]",document.getElementById("wfu_shortcode").value=n,ShortcodeString=r.substr(1),document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode").disabled=wfu_plugin_encode_string(n)==document.getElementById("wfu_shortcode_original_enc").value),Autosave&&wfu_schedule_save_shortcode()}function wfu_update_text_value(e){e=e||window.event;var t=e.target,a=t.id.replace("wfu_attribute_",""),l=t.value;l=l.replace(/(\r\n|\n|\r)/gm,"%n%"),l=l.replace(/\"/gm,"%dq%"),l=l.replace(/\[/gm,"%brl%"),l=l.replace(/\]/gm,"%brr%"),l!==t.oldVal&&(t.oldVal=l,document.getElementById("wfu_attribute_value_"+a).value=l,wfu_generate_shortcode())}function wfu_update_date_value(e){e=e||window.event;var t=e.target,a=t.id.replace("wfu_attribute_",""),l=t.value;l!==t.oldVal&&(t.oldVal=l,document.getElementById("wfu_attribute_value_"+a).value=l,wfu_generate_shortcode())}function wfu_update_stringmatch_textvalue(e){e=e||window.event;var t=e.target,a=t.id.replace("wfu_attribute_","");a=a.replace("_matchfield","").replace("_matchvalue",""),wfu_update_stringmatch_value(a)}function wfu_update_triplecolor_value(e){e=e||window.event;var t=e.target,a=t.id.replace("wfu_attribute_","");a=a.replace("_color",""),a=a.replace("_bgcolor",""),a=a.replace("_borcolor",""),t=document.getElementById("wfu_attribute_"+a+"_color");var l=t.value+","+document.getElementById("wfu_attribute_"+a+"_bgcolor").value+","+document.getElementById("wfu_attribute_"+a+"_borcolor").value;l!==t.oldVal&&(t.oldVal=l,document.getElementById("wfu_attribute_value_"+a).value=l,wfu_generate_shortcode())}function wfu_update_dimension_value(e){e=e||window.event;var t=e.target,a=t.name.replace("wfu_dimension_elements_",""),l=document.getElementsByName(t.name);t=l[0];for(var d="",n="",r=0;r<l.length;r++)n=l[r].id.replace("wfu_attribute_"+a+"_",""),""!=d&&""!=l[r].value&&(d+=", "),""!=l[r].value&&(d+=n+":"+l[r].value);d!==t.oldVal&&(t.oldVal=d,document.getElementById("wfu_attribute_value_"+a).value=d,wfu_generate_shortcode())}function wfu_update_ptext_value(e){e=e||window.event;var t=e.target,a=t.id.replace("wfu_attribute_","");a=a.substr(2);var l=document.getElementById("wfu_attribute_s_"+a).value,d=document.getElementById("wfu_attribute_p_"+a).value,n=l+"/"+d;n!==t.oldVal&&(t.oldVal=n,document.getElementById("wfu_attribute_value_"+a).value=n),wfu_generate_shortcode()}function wfu_update_mchecklist_value(e){var t="",a=(document.getElementById("wfu_attribute_"+e),document.getElementById("wfu_attribute_"+e+"_all"));a.checked?(jQuery("#wfu_attribute_"+e+" input").prop("disabled",!0),jQuery("#wfu_attribute_"+e+" input").prop("checked",!0),t="all"):(jQuery("#wfu_attribute_"+e+" input").prop("disabled",!1),jQuery("#wfu_attribute_"+e+" input").each(function(){jQuery(this).prop("checked")&&(t+=","+jQuery(this).next().html())}),t=t.substr(1)),document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_rolelist_value(e){var t="",a=document.getElementById("wfu_attribute_"+e),l=document.getElementById("wfu_attribute_"+e+"_guests"),d=document.getElementById("wfu_attribute_"+e+"_all");if(d.checked)a.disabled=!0,t="all";else{a.disabled=!1;for(var n=a.options,r=0;r<n.length;r++)n[r].selected&&(""!=t&&(t+=","),t+=n[r].value)}l.checked&&(""!=t&&(t+=","),t+="guests"),document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_userlist_value(e){var t="",a=document.getElementById("wfu_attribute_"+e),l=document.getElementById("wfu_attribute_"+e+"_current"),d=document.getElementById("wfu_attribute_"+e+"_guests"),n=document.getElementById("wfu_attribute_"+e+"_all");if(l&&l.checked)a.disabled=!0,n.disabled=!0,d.disabled=!0,t="current";else{if(n.disabled=!1,d.disabled=!1,n.checked)a.disabled=!0,t="all";else{a.disabled=!1;for(var r=a.options,u=0;u<r.length;u++)r[u].selected&&(""!=t&&(t+=","),t+=r[u].value)}d.checked&&(""!=t&&(t+=","),t+="guests")}document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_postlist_value(e){for(var t="",a=Array(),l=Array(),d=document.getElementById("wfu_attribute_"+e+"_postlist").value.split(","),n=0;n<d.length;n++)a.push(document.getElementById("wfu_attribute_"+e+"_"+d[n])),l.push(document.getElementById("wfu_attribute_"+e+"_all_"+d[n]));var r=document.getElementById("wfu_attribute_"+e+"_current");if(r&&r.checked){for(var n=0;n<d.length;n++)a[n].disabled=!0,l[n].disabled=!0;t="current"}else{var u=!0;t="";for(var n=0;n<d.length;n++)if(l[n].disabled=!1,l[n].checked)a[n].disabled=!0,""!=t&&(t+=","),t+="all"+d[n];else{a[n].disabled=!1,u=!1;for(var o=a[n].options,_=0;_<o.length;_++)o[_].selected&&(""!=t&&(t+=","),t+=o[_].value)}u&&(t="all")}document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_bloglist_value(e){var t="",a=document.getElementById("wfu_attribute_"+e),l=document.getElementById("wfu_attribute_"+e+"_current"),d=document.getElementById("wfu_attribute_"+e+"_all");if(l&&l.checked)a.disabled=!0,d.disabled=!0,t="current";else if(d.disabled=!1,d.checked)a.disabled=!0,t="all";else{a.disabled=!1;for(var n=a.options,r=0;r<n.length;r++)n[r].selected&&(""!=t&&(t+=","),t+=n[r].value)}document.getElementById("wfu_attribute_value_"+e).value=t,wfu_generate_shortcode()}function wfu_update_stringmatch_value(e){var t=document.getElementById("wfu_attribute_"+e+"_matchfield").value,a=document.getElementById("wfu_attribute_"+e+"_matchcriterion").value,l=document.getElementById("wfu_attribute_"+e+"_matchvalue").value;t=t.replace(";",""),document.getElementById("wfu_attribute_value_"+e).value=""==t.trim()?"":"field:"+t+";criterion:"+a+";value:"+l,wfu_generate_shortcode()}function wfu_update_userfield_value(e){e=e||window.event;for(var t=e.target,a=t.parentNode,l=a.parentNode,d="",n=!1,r="",u=0;u<l.childNodes.length;u++)if(a=l.childNodes[u],"DIV"===a.tagName){for(var o=0;o<a.childNodes.length;o++)"INPUT"==a.childNodes[o].tagName&&("text"==a.childNodes[o].type?(d=a.childNodes[o].value,0==u&&(t=a.childNodes[o])):"checkbox"==a.childNodes[o].type&&(n=a.childNodes[o].checked));""!=r&&""!=d&&(r+="/"),""!=d&&n&&(r+="*"),""!=d&&(r+=d)}r!==t.oldVal&&(t.oldVal=r,document.getElementById("wfu_attribute_value_userdatalabel").value=r,wfu_generate_shortcode(),wfu_update_formfield_variables())}function wfu_update_formfield_value(e){e=e||window.event;for(var t=e.target,a=t.id.match(/^wfu_formfield_(.*?)_/)[1],l=document.querySelectorAll("div#wfu_attribute_"+a+" .wfu_formdata_line_container"),d="",n=0;n<l.length;n++){var r="",u=l[n].id.match(/^wfu_formfield_.*?_(.*?)_/)[1],o=a+"_"+u,_=document.getElementById("wfu_formfield_"+o+"_label").value;if(""!=_.trim()){r=_.trim();var s=document.getElementById("wfu_formfield_"+o+"_type").value,c=window["wfu_attribute_"+a+"_typeprops"];r+="|t:"+s,r+="|s:"+document.getElementById("wfu_formfield_"+o+"_labelposition").value,"show"==c[s].required.substr(0,4)&&(r+="|r:"+(document.getElementById("wfu_formfield_"+o+"_required").checked?"1":"0")),"show"==c[s].donotautocomplete.substr(0,4)&&(r+="|a:"+(document.getElementById("wfu_formfield_"+o+"_donotautocomplete").checked?"1":"0")),"show"==c[s].validate.substr(0,4)&&(r+="|v:"+(document.getElementById("wfu_formfield_"+o+"_validate").checked?"1":"0")),"show"==c[s].typehook.substr(0,4)&&(r+="|h:"+(document.getElementById("wfu_formfield_"+o+"_typehook").checked?"1":"0")),"show"==c[s].hintposition.substr(0,4)&&(r+="|p:"+document.getElementById("wfu_formfield_"+o+"_hintposition").value),"show"==c[s].default.substr(0,4)&&(r+="|d:"+document.getElementById("wfu_formfield_"+o+"_default").value),"show"==c[s].data.substr(0,4)&&(r+="|l:"+document.getElementById("wfu_formfield_"+o+"_data").value),"show"==c[s].group.substr(0,4)&&(r+="|g:"+document.getElementById("wfu_formfield_"+o+"_group").value),"show"==c[s].format.substr(0,4)&&(r+="|f:"+document.getElementById("wfu_formfield_"+o+"_format").value)}""!=r&&(""!=d&&(d+="/"),d+=r)}d!==t.oldVal&&(t.oldVal=d,document.getElementById("wfu_attribute_value_"+a).value=d,wfu_generate_shortcode(),wfu_update_formfield_variables())}function wfu_update_formfield_variables(){var e=document.getElementById("wfu_attribute_value_userdatalabel");if(e){for(var t=document.getElementById("wfu_wrapper"),a=document.getElementsByClassName("wfu_shadow_userdata","div",t),l=document.getElementsByName("wfu_formfield_select"),d=0;d<l.length;d++)l[d].style.display="none";if(0!=a.length&&"block"!=a[0].style.display){for(var n='<option style="display:none;">%userdataXXX%</option>',r=e.value.replace(/\//g,"[/]").replace(/\(.*\)/,function(e){return e.replace(/\[\/\]/g,"/")}).split("[/]"),u=2;document.getElementById("wfu_attribute_userdatalabel"+u);){var o=document.getElementById("wfu_attribute_value_userdatalabel"+u).value.replace(/\//g,"[/]").replace(/\(.*\)/,function(e){return e.replace(/\[\/\]/g,"/")}).split("[/]");r=r.concat(o),u++}var _="",s=0;u=1;for(var d=0;d<r.length;d++)_=r[d],"*"==_[0]&&(_=_.substr(1)),s=_.indexOf("|"),s>-1&&(_=_.substr(0,s)),""!=_.trim()&&(n+='<option value="%userdata'+u+'%">'+u+": "+_.trim()+"</option>",u++);for(var d=0;d<l.length;d++)l[d].innerHTML=n,l[d].style.display="inline-block"}}}function wfu_attach_element_handlers(e,t){for(var a=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],l=0;l<a.length;l++)wfu_addEventHandler(e,a[l],t)}function wfu_Attach_Admin_Events(e){Autosave=e,wfu_generate_shortcode(),wfu_update_formfield_variables(),wfu_Attach_Admin_DragDrop_Events();for(var t=document.getElementsByName("wfu_text_elements"),a=0;a<t.length;a++)wfu_attach_element_handlers(t[a],wfu_update_text_value);for(var l=document.getElementsByName("wfu_ptext_elements"),a=0;a<l.length;a++)wfu_attach_element_handlers(l[a],wfu_update_ptext_value);for(var d=document.getElementsByName("wfu_stringmatch_elements"),a=0;a<d.length;a++)wfu_attach_element_handlers(d[a],wfu_update_stringmatch_textvalue);for(var n=document.getElementsByName("wfu_triplecolor_elements"),a=0;a<n.length;a++)wfu_attach_element_handlers(n[a],wfu_update_triplecolor_value);for(var r=document.getElementsByName("wfu_dimension_elements_widths"),a=0;a<r.length;a++)wfu_attach_element_handlers(r[a],wfu_update_dimension_value);r=document.getElementsByName("wfu_dimension_elements_heights");for(var a=0;a<r.length;a++)wfu_attach_element_handlers(r[a],wfu_update_dimension_value);for(var u=document.getElementsByName("wfu_userfield_elements"),a=0;a<u.length;a++)wfu_attach_element_handlers(u[a],wfu_update_userfield_value);for(var o=document.getElementsByName("wfu_formfield_elements"),a=0;a<o.length;a++)wfu_attach_element_handlers(o[a],wfu_update_formfield_value);for(var _=document.getElementsByName("wfu_subfolder_tools_input"),a=0;a<_.length;a++)wfu_attach_element_handlers(_[a],wfu_subfolders_input_changed);""!=document.getElementById("wfu_shortcode_postid").value&&setTimeout(function(){wfu_check_page_obsolescence()},CheckObsolescenceTimeOut)}function wfu_insert_variable(e){var t=e.className.replace("wfu_variable wfu_variable_",""),a=document.getElementById("wfu_attribute_"+t),l=a.selectionStart,d=a.value;a.value=d.substr(0,l)+e.innerHTML+d.substr(l),wfu_update_text_value({target:a})}function wfu_insert_userfield_variable(e){var t=e.className.replace("wfu_variable wfu_variable_",""),a=document.getElementById("wfu_attribute_"+t),l=a.selectionStart,d=a.value;a.value=d.substr(0,l)+e.value+d.substr(l),e.value="%userdataXXX%",wfu_update_text_value({target:a})}function wfu_columns_itemclicked(e){var t=e.parentNode;if("SELECT"==t.tagName)for(var a=0;a<t.options.length;a++)t.options[a].selected=t.options[a]==e}function wfu_columns_buttonaction(e,t){var a=document.getElementById("wfu_attribute_"+e+"_sourcelist"),l=document.getElementById("wfu_attribute_"+e);if("add"==t){for(var d=0;d<a.options.length;d++)if(a.options[d].selected||"wfu_columns_item_required"==a.options[d].className){for(var n=!1,r=0;r<l.options.length;r++)if(l.options[r].value==a.options[d].value){n=!0;break}if(!n){var u=document.createElement("OPTION");u.value=a.options[d].value,u.innerHTML=a.options[d].innerHTML,u.className=a.options[d].className,l.appendChild(u)}}}else if("del"==t)for(var d=0;d<l.options.length;)l.options[d].selected&&"wfu_columns_item_required"!=l.options[d].className?l.options.remove(d):d++;else if("up"==t||"down"==t){for(var o=-1,d=0;d<l.options.length;d++)l.options[d].selected&&-1==o?o=d:l.options[d].selected&&o>-1&&(l.options[d].selected=!1);"up"==t&&o>0?l.insertBefore(l.options[o],l.options[o-1]):"down"==t&&o<l.options.length-1&&l.insertBefore(l.options[o+1],l.options[o])}wfu_update_columns(e)}function wfu_update_columns(e){for(var t=document.getElementById("wfu_attribute_"+e),a="",l=0;l<t.options.length;l++)""!=a&&(a+=","),a+=t.options[l].value;document.getElementById("wfu_attribute_value_"+e).value=a,wfu_generate_shortcode()}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(t){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(t){}return e}function wfu_plugin_encode_string(e){var t,a=0,l="",d="";for(a=0;a<e.length;a++)t=e.charCodeAt(a),t>=2048?t=((16773120&t|917504)<<4)+((4032&t|8192)<<2)+(63&t|128):t>=128&&(t=((65472&t|12288)<<2)+(63&t|128)),d=t.toString(16),(1==d.length||3==d.length||5==d.length)&&(d="0"+d),l+=d;return l}function wfu_plugin_decode_string(e){for(var t,a,l=0,d="";l<e.length;)t=parseInt(e.substr(l,2),16),a=128>t?t:224>t?((31&t)<<6)+(63&parseInt(e.substr(l+=2,2),16)):((15&t)<<12)+((63&parseInt(e.substr(l+=2,2),16))<<6)+(63&parseInt(e.substr(l+=2,2),16)),d+=String.fromCharCode(a),l+=2;return d}function wfu_randomString(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",a=e,l="",d=0;a>d;d++){var n=Math.floor(Math.random()*t.length);l+=t.substring(n,n+1)}return l}function wfu_schedule_save_shortcode(){var e=new Date,t=ShortcodeNextSave-e.getTime();null!=ShortcodeTimeOut&&(clearTimeout(ShortcodeTimeOut),ShortcodeTimeOut=null),0>=t?wfu_save_shortcode():ShortcodeTimeOut=setTimeout(function(){wfu_save_shortcode()},t)}function wfu_check_page_obsolescence(){PageObsolete||PageUpdating||""==document.getElementById("wfu_shortcode_postid").value}function wfu_save_shortcode(){if(!PageObsolete){var e=wfu_GetHttpRequestObject();if(null!=e){PageUpdating=!0,document.getElementById("wfu_update_failed_message").style.display="none";var t=AdminParams.wfu_ajax_url;params=new Array(7),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_save_shortcode",params[1]=new Array(2),params[1][0]="shortcode",params[1][1]=wfu_plugin_encode_string(ShortcodeString),params[2]=new Array(2),params[2][0]="shortcode_original",params[2][1]=document.getElementById("wfu_shortcode_original_enc").value,params[3]=new Array(2),params[3][0]="post_id",params[3][1]=document.getElementById("wfu_shortcode_postid").value,params[4]=new Array(2),params[4][0]="post_hash",params[4][1]=document.getElementById("wfu_shortcode_posthash").value,params[5]=new Array(2),params[5][0]="shortcode_position",params[5][1]=document.getElementById("wfu_shortcode_position").value,params[6]=new Array(2),params[6][0]="shortcode_tag",params[6][1]=document.getElementById("wfu_shortcode_tag").value;for(var a="",l=0;l<params.length;l++)a+=(l>0?"&":"")+params[l][0]+"="+encodeURI(params[l][1]);var d=new Date;Autosave?ShortcodeNextSave=d.getTime()+5e3:document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode_wait").style.display="inline"),e.open("POST",t,!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.onreadystatechange=function(){if(4==e.readyState&&200==e.status){PageUpdating=!1;var t="wfu_save_shortcode:",a=e.responseText.indexOf(t);-1==a&&(a=e.responseText.length);var l=(e.responseText.substr(0,a),e.responseText.substr(a+t.length,e.responseText.length-a-t.length));a=l.indexOf(":");var n=l.substr(0,a);if(txt_value=l.substr(a+1,l.length-a-1),"success"==n){if(Autosave?(document.getElementById("wfu_save_label").innerHTML="saved",document.getElementById("wfu_save_label").className="wfu_save_label",document.getElementById("wfu_save_label").style.opacity=1,wfu_fadeout_element(300),ShortcodeNextSave=d.getTime()+1e3,null!=ShortcodeTimeOut&&wfu_schedule_save_shortcode()):document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode_wait").style.display="none",document.getElementById("wfu_update_shortcode").disabled=!0,window.plugin_window&&window.plugin_window.location.reload(!0)),""!=document.getElementById("wfu_shortcode_postid").value){var r=document.getElementById("wfu_shortcode_tag").value;document.getElementById("wfu_shortcode_original_enc").value=wfu_plugin_encode_string("["+r+" "+ShortcodeString+"]"),document.getElementById("wfu_shortcode_posthash").value=txt_value,setTimeout(function(){wfu_check_page_obsolescence()},CheckObsolescenceTimeOut)}}else Autosave&&(document.getElementById("wfu_save_label").innerHTML="not saved",document.getElementById("wfu_save_label").className="wfu_save_label_fail",document.getElementById("wfu_save_label").style.opacity=1,wfu_fadeout_element(300)),"fail"==n&&("post_modified"==txt_value?(PageObsolete=!0,document.getElementById("wfu_update_shortcode")&&(document.getElementById("wfu_update_shortcode").disabled=!0),document.getElementById("wfu_update_rejected_message").style.display="block"):document.getElementById("wfu_update_failed_message").style.display="block")}},e.send(a)}}}function wfu_adjust_opacity(e){document.getElementById("wfu_save_label").style.opacity=e}function wfu_fadeout_element(e){for(var t=20,a=0,l=0;t>l;l++)a=1-l/t,setTimeout('wfu_adjust_opacity("'+a.toString()+'")',l*e/t);setTimeout('wfu_adjust_opacity("0.0")',l*e/t)}function wfu_apply_value(e,t,a){if("onoff"==t)document.getElementById("wfu_attribute_"+e).className="wfu_onoff_container_"+("true"!=a?"on":"off"),wfu_admin_onoff_clicked(e);else if("text"==t||"ltext"==t||"integer"==t||"float"==t||"mtext"==t||"color"==t){var l=document.getElementById("wfu_attribute_"+e);if(a=a.replace(/\%n\%/gm,"\n"),a=a.replace(/\%dq\%/gm,'"'),a=a.replace(/\%brl\%/gm,"["),a=a.replace(/\%brr\%/gm,"]"),"color"==t){var d=colourNameToHex(a);d||(d=a),jQuery("#wfu_attribute_"+e).wpColorPicker("color",d)}l.value=a,wfu_update_text_value({target:l})}else if("date"==t){var l=document.getElementById("wfu_attribute_"+e);l.value=a,wfu_update_date_value({target:l})}else if("placements"==t)wfu_admin_recreate_placements_panel(a),document.getElementById("wfu_attribute_value_placements").value=a,wfu_generate_shortcode();else if("radio"==t){for(var n=document.getElementsByName("wfu_radioattribute_"+e),r=0;r<n.length;r++)n[r].checked=n[r].value==a||"*"+n[r].value==a;wfu_admin_radio_clicked(e)}else if("ptext"==t){a=a.replace(/\%n\%/gm,"\n"),a=a.replace(/\%dq\%/gm,'"'),a=a.replace(/\%brl\%/gm,"["),a=a.replace(/\%brr\%/gm,"]");var u=a.split("/"),o=u.length<1?"":u[0],_=u.length<2?o:u[1],s=document.getElementById("wfu_attribute_s_"+e);s.value=o;var c=document.getElementById("wfu_attribute_p_"+e);c.value=_,wfu_update_ptext_value({target:s}),wfu_update_ptext_value({target:c})}else if("mchecklist"==t){if(a=a.toLowerCase(),"all"==a)document.getElementById("wfu_attribute_"+e+"_all").checked=!0;else{document.getElementById("wfu_attribute_"+e+"_all").checked=!1;for(var f=a.split(","),r=0;r<f.length;r++)f[r]=f[r].trim();jQuery("#wfu_attribute_"+e+" input").each(function(){jQuery(this).prop("checked",f.indexOf(jQuery(this).next().html())>-1)})}wfu_update_mchecklist_value(e)}else if("rolelist"==t){var l=document.getElementById("wfu_attribute_"+e),i=document.getElementById("wfu_attribute_"+e+"_all"),m=i.className.indexOf("wfu_default_administrator")>-1,p=a.split(",");if(p.indexOf("all")>-1){i.checked=!0;for(var r=0;r<l.options.length;r++)l.options[r].selected=m&&"administrator"==l.options[r].value}else{i.checked=!1;for(var r=0;r<p.length;r++)p[r]=p[r].trim();for(var r=0;r<l.options.length;r++)l.options[r].selected=p.indexOf(l.options[r].value)>-1}document.getElementById("wfu_attribute_"+e+"_guests").checked=p.indexOf("guests")>-1,wfu_update_rolelist_value(e)}else if("userlist"==t){var l=document.getElementById("wfu_attribute_"+e),i=document.getElementById("wfu_attribute_"+e+"_all"),w=i.className.indexOf("wfu_default_0")>-1,g=document.getElementById("wfu_attribute_"+e+"_current");if(g&&"current"==a){g.checked=!0,i.checked=!1,document.getElementById("wfu_attribute_"+e+"_guests").checked=!1;for(var r=0;r<l.options.length;r++)l.options[r].selected=w&&1>r}else{g&&(g.checked=!1);var v=a.split(",");if(v.indexOf("all")>-1){i.checked=!0;for(var r=0;r<l.options.length;r++)l.options[r].selected=w&&1>r}else{i.checked=!1;for(var r=0;r<v.length;r++)v[r]=v[r].trim();for(var r=0;r<l.options.length;r++)l.options[r].selected=v.indexOf(l.options[r].value)>-1}document.getElementById("wfu_attribute_"+e+"_guests").checked=v.indexOf("guests")>-1}wfu_update_userlist_value(e)}else if("postlist"==t){for(var b=Array(),i=Array(),h=document.getElementById("wfu_attribute_"+e+"_postlist").value.split(","),r=0;r<h.length;r++)b.push(document.getElementById("wfu_attribute_"+e+"_"+h[r])),i.push(document.getElementById("wfu_attribute_"+e+"_all_"+h[r]));var g=document.getElementById("wfu_attribute_"+e+"_current");if(g&&"current"==a){g.checked=!0;for(var r=0;r<h.length;r++){i[r].checked=!1;for(var y=0;y<b[r].options.length;y++)b[r].options[y].selected=!1}}else{g&&(g.checked=!1);for(var I=a.split(","),r=0;r<h.length;r++){("all"==a||I.indexOf("all"+h[r])>-1)&&(i[r].checked=!0);for(var y=0;y<b[r].options.length;y++)b[r].options[y].selected=I.indexOf(b[r].options[y].value)>-1}}wfu_update_postlist_value(e)}else if("bloglist"==t){var g=document.getElementById("wfu_attribute_"+e+"_current");if(g&&"current"==a){g.checked=!0,document.getElementById("wfu_attribute_"+e+"_all").checked=!1;for(var l=document.getElementById("wfu_attribute_"+e),r=0;r<l.options.length;r++)l.options[r].selected=!1}else{g&&(g.checked=!1);var E=a.split(",");if("all"==a)document.getElementById("wfu_attribute_"+e+"_all").checked=!0;else{document.getElementById("wfu_attribute_"+e+"_all").checked=!1;for(var r=0;r<E.length;r++)E[r]=E[r].trim();for(var l=document.getElementById("wfu_attribute_"+e),r=0;r<l.options.length;r++)l.options[r].selected=E.indexOf(l.options[r].value)>-1}}wfu_update_bloglist_value(e)}else if("stringmatch"==t){var B="",k="equal to",x="",N=a.match(/^field:(.*?);\s*criterion:(.*?)\s*;\s*value:(.*)$/);N&&4==N.length&&(B=N[1],k=N[2],x=N[3]),document.getElementById("wfu_attribute_"+e+"_matchfield").value=B,document.getElementById("wfu_attribute_"+e+"_matchcriterion").value=k,document.getElementById("wfu_attribute_"+e+"_matchvalue").value=x,wfu_update_stringmatch_value(e)}else if("columns"==t){var T=document.getElementById("wfu_attribute_"+e+"_sourcelist"),A=document.getElementById("wfu_attribute_"+e);A.innerHTML="";for(var H=a.split(","),r=0;r<T.options.length;r++)if("wfu_columns_item_required"==T.options[r].className&&-1==H.indexOf(T.options[r].value)){var S=document.createElement("OPTION");S.value=T.options[r].value,S.innerHTML=T.options[r].innerHTML,S.className=T.options[r].className,A.appendChild(S)}for(var r=0;r<H.length;r++){for(var q=-1,y=0;y<T.options.length;y++)if(T.options[y].value==H[r]){q=y;break}for(var O=!1,y=0;y<A.options.length;y++)if(A.options[y].value==H[r]){O=!0;break}if(q>-1&&!O){var S=document.createElement("OPTION");S.value=T.options[q].value,S.innerHTML=T.options[q].innerHTML,S.className=T.options[q].className,A.appendChild(S)}}wfu_update_columns(e)}else if("dimensions"==t){for(var C,L,D,l,M=a.split(","),j=document.getElementsByName("wfu_dimension_elements_"+e),r=0;r<j.length;r++)j[r].value="";for(var r=0;r<M.length;r++)C=M[r].split(":",2),L=C.length<1?"":C[0],D=C.length<2?L:C[1],l=document.getElementById("wfu_attribute_"+e+"_"+L.trim()),l&&(l.value=D.trim());l=j[0],wfu_update_dimension_value({target:l})}else if("userfields"==t){for(var V,P=a.replace(/\//g,"[/]").replace(/\(.*\)/,function(e){return e.replace(/\[\/\]/g,"/")}).split("[/]"),R=Array(),r=0;r<P.length;r++)V="*"==P[r].substr(0,1),V&&(P[r]=P[r].substr(1)),""!=P[r]&&R.push({name:P[r],required:V});for(var F=document.getElementById("wfu_attribute_"+e),U=null,Q=Array(),r=0;r<F.childNodes.length;r++)1===F.childNodes[r].nodeType&&(null==U?U=F.childNodes[r]:Q.push(F.childNodes[r]));for(var r=0;r<Q.length;r++)F.removeChild(Q[r]);wfu_userdata_edit_field(U,"",!1);for(var X,G=U,r=0;r<R.length;r++)0==r?wfu_userdata_edit_field(U,R[r].name,R[r].required):(X=G.cloneNode(!0),wfu_userdata_edit_field(X,R[r].name,R[r].required),F.insertBefore(X,G.nextSibling),G=X);for(var l,r=0;r<U.childNodes.length&&(l=U.childNodes[r],"INPUT"!=l.tagName);r++);wfu_update_userfield_value({target:l})}else if("formfields"==t){for(var R=Array(),W=window["wfu_attribute_"+e+"_typeprops"],z=W[0].split(","),$={},r=0;r<z.length;r++){var J=W[z[r]],K={};K.type=z[r],K.label="",K.labelposition=J.labelposition.substr(5),K.required="true"==J.required.substr(5),K.donotautocomplete="true"==J.donotautocomplete.substr(5),K.validate="true"==J.validate.substr(5),K.typehook="true"==J.typehook.substr(5),K.hintposition=J.hintposition.substr(5),K.default=J.default.substr(5),K.data=J.data.substr(5),K.group=J.group.substr(5),K.format=J.format.substr(5),$[z[r]]=K}for(var P=a.replace(/\//g,"[/]").replace(/\(.*\)/,function(e){return e.replace(/\[\/\]/g,"/")}).split("[/]"),r=0;r<P.length;r++){var Z=P[r].trim(),Y={};for(prop in $.text)Y[prop]=$.text[prop];"*"==Z.substr(0,1)&&(Y.required=!0,Z=Z.substr(1));var et=Z.split("|");if(""!=et[0].trim()){for(var tt=-1,at="",y=0;y<et.length;y++){var lt=et[y].replace(/^\s+/gm,""),dt=lt.substr(0,2),D=lt.substr(2);if("t:"==dt&&y>0&&z.indexOf(D)>-1){at=D,tt=y;break}}if(""!=at){for(prop in $[at])Y[prop]=$[at][prop];et.splice(tt,1)}Y.label=et[0].trim(),et.splice(0,1);for(var y=0;y<et.length;y++){var lt=et[y].replace(/^\s+/gm,""),dt=lt.substr(0,2),D=lt.substr(2);"s:"==dt?Y.labelposition=D:"r:"==dt?Y.required="1"==D:"a:"==dt?Y.donotautocomplete="1"==D:"v:"==dt?Y.validate="1"==D:"d:"==dt?Y.default=D:"l:"==dt?Y.data=D:"g:"==dt?Y.group=D:"f:"==dt?Y.format=D:"p:"==dt?Y.hintposition=D:"h:"==dt&&(Y.typehook="1"==D)}R.push(Y)}}0==R.length&&R.push(fieldprops_default);for(var F=document.getElementById("wfu_attribute_"+e),nt=document.querySelectorAll("div#wfu_attribute_"+e+" .wfu_formdata_line_container"),r=1;r<nt.length;r++)F.removeChild(nt[r]);for(var rt=nt[0],r=0;r<R.length;r++){var ut=e+"_"+wfu_randomString(4),ot=wfu_formdata_prepare_template(e,R[r],ut);r>0&&(rt=document.createElement("DIV")),rt.id="wfu_formfield_"+ut+"_container",rt.className="wfu_formdata_line_container",r>0&&F.insertBefore(rt,null),rt.innerHTML=ot}for(var _t=document.querySelectorAll("div#wfu_attribute_"+e+' input[name="wfu_formfield_elements"]'),r=0;r<_t.length;r++)wfu_attach_element_handlers(_t[r],wfu_update_formfield_value);for(var st=document.querySelectorAll("div#wfu_attribute_"+e+" .wfu_formdata_action_remove"),r=0;r<st.length;r++)st[r].className="wfu_formdata_action wfu_formdata_action_remove"+(st.length>1?"":" wfu_formdata_action_disabled");wfu_update_formfield_value({target:nt[0]})}else if("color-triplet"==t){for(var ct=a.split(","),r=0;r<ct.length;r++)ct[r]=ct[r].trim();2==ct.length?ct=[ct[0],ct[1],"#000000"]:1==ct.length?ct=[ct[0],"#FFFFFF","#000000"]:ct.length<3&&(ct=["#000000","#FFFFFF","#000000"]);var d=colourNameToHex(ct[0]);d||(d=ct[0]),jQuery("#wfu_attribute_"+e+"_color").wpColorPicker("color",d);
3
+ var l=document.getElementById("wfu_attribute_"+e+"_color");l.value=ct[0],d=colourNameToHex(ct[1]),d||(d=ct[1]),jQuery("#wfu_attribute_"+e+"_bgcolor").wpColorPicker("color",d),document.getElementById("wfu_attribute_"+e+"_bgcolor").value=ct[1],d=colourNameToHex(ct[2]),d||(d=ct[2]),jQuery("#wfu_attribute_"+e+"_borcolor").wpColorPicker("color",d),document.getElementById("wfu_attribute_"+e+"_borcolor").value=ct[2],wfu_update_triplecolor_value({target:l})}else if("folderlist"==t){for(var f=wfu_parse_folderlist_js(a),ft=document.getElementById("wfu_attribute_"+e).options;ft.length>0;)ft.remove(0);for(var S,it,mt,pt,wt,gt,r=0;r<f.path.length;r++){it=f.path[r],"/"==it.substr(it.length,1)&&(it=it.substr(0,it.length-1)),mt=it.split("/"),it=mt[mt.length-1],wt=parseInt(f.level[r]),pt="",gt="";for(var y=0;wt>y;y++)pt+="&nbsp;&nbsp;&nbsp;",gt+="*";pt+=f.label[r],f.default[r]&&(gt+="&"),gt+=""==it?"{root}/"+f.label[r]:it+f.label[r],S=document.createElement("option"),S.className=f.default[r]?"wfu_select_folders_option_default":"",S.value=wfu_plugin_encode_string(gt),S.innerHTML=pt,ft.add(S)}S=document.createElement("option"),S.value="",S.innerHTML="",ft.add(S);var vt=document.getElementById("wfu_attribute_"+e);vt.data=wfu_decode_subfolder_list(e),wfu_subfolders_update_toolnav(e),l=vt,a!==l.oldVal&&(l.oldVal=a,document.getElementById("wfu_attribute_value_"+e).value=a,wfu_generate_shortcode())}}function wfu_parse_folderlist_js(e){var t=Object();if(t.path=Array(),t.label=Array(),t.level=Array(),t.default=Array(),"auto"==e.substr(0,4))return t;var a=e.split(",");if(0==a.length)return t;if(1==a.length&&""==a[0].trim())return t;for(var l,d,n,r,u,o,_,s=["root"],c=0,f=0,i=-1,m=0;m<a.length;m++){for(l=a[m].trim(),d=0,n="",r=!1;d<l.length&&"*"==l.substr(d,1);)d++,n+="&nbsp;&nbsp;&nbsp;";if(1>=d-c&&(d>0||0==f)&&(l=l.substr(d,l.length-d),"&"==l.substr(0,1)&&(l=l.substr(1),r=!0),subfolder_items=l.split("/"),subfolder_items.length<2&&subfolder_items.push(""),""!=subfolder_items[1]?(u=subfolder_items[0],o=subfolder_items[1]):(u=l,o=l),""!=u)){r&&-1==i?i=t.path.length:r=!1,0==d&&(f=1),s.length>d?s[d]=u:s.push(u),_="";for(var p=1;d>=p;p++)_+=s[p]+"/";t.path.push(_),t.label.push(o),t.level.push(d),t.default.push(r),c=d}}return t}function colourNameToHex(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"undefined"!=typeof t[e.toLowerCase()]?t[e.toLowerCase()]:!1}function wfu_download_file(e,t,a){var l=wfu_GetHttpRequestObject();if(null!=l){var d=AdminParams.wfu_ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_download_file_invoker",params[1]=new Array(2),params[1][0]="file",params[1][1]=e,params[2]=new Array(2),params[2][0]="nonce",params[2][1]=a;for(var n="",r=0;r<params.length;r++)n+=(r>0?"&":"")+params[r][0]+"="+encodeURI(params[r][1]);l.open("POST",d,!0),l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l.onreadystatechange=function(){if(4==l.readyState&&200==l.status){var a="wfu_ajax_action_download_file_invoker:",d=l.responseText.indexOf(a);-1==d&&(d=l.responseText.length);var n=(l.responseText.substr(0,d),l.responseText.substr(d+a.length,l.responseText.length-d-a.length));d=n.indexOf(":");var r=n.substr(0,d);if(txt_value=n.substr(d+1,n.length-d-1),"wfu_download_id;"==r.substr(0,16)){var u=r.substr(16),o=document.getElementById("wfu_file_download_container_"+t);o.innerHTML=txt_value,setTimeout("wfu_download_file_monitor('"+e+"', "+t+", '"+u+"')",100)}}},l.send(n)}}function wfu_download_file_monitor(e,t,a){var l=wfu_GetHttpRequestObject();if(null!=l){var d=AdminParams.wfu_ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_download_file_monitor",params[1]=new Array(2),params[1][0]="file",params[1][1]=e,params[2]=new Array(2),params[2][0]="id",params[2][1]=a;for(var n="",r=0;r<params.length;r++)n+=(r>0?"&":"")+params[r][0]+"="+encodeURI(params[r][1]);l.open("POST",d,!0),l.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l.onreadystatechange=function(){if(4==l.readyState&&200==l.status){var a="wfu_ajax_action_download_file_monitor:",d=l.responseText.indexOf(a);-1==d&&(d=l.responseText.length);var n=(l.responseText.substr(0,d),l.responseText.substr(d+a.length,l.responseText.length-d-a.length));d=n.indexOf(":");var r=n.substr(0,d);if(txt_value=n.substr(d+1,n.length-d-1),"repeat"!=r){var u=document.getElementById("wfu_file_download_container_"+t);u.innerHTML=""}else"repeat"==r&&setTimeout("wfu_download_file_monitor('"+e+"', "+t+", '"+txt_value+"')",100)}},l.send(n)}}function wfu_filedetails_userdata_changed(){for(var e,t,a=document.getElementsByName("wfu_filedetails_userdata"),l=!1,d=0;d<a.length;d++)if(e=document.getElementById(a[d].id.replace("wfu_filedetails_userdata_value_","wfu_filedetails_userdata_default_")),t=document.getElementById(a[d].id.replace("wfu_filedetails_userdata_value_","wfu_filedetails_userdata_")),t.value=a[d].value,a[d].value!=e.value){l=!0;break}document.getElementById("dp_filedetails_submit_fields").disabled=!l}function wfu_Attach_FileDetails_Admin_Events(){for(var e=document.getElementsByName("wfu_filedetails_userdata"),t=0;t<e.length;t++)wfu_attach_element_handlers(e[t],wfu_filedetails_userdata_changed)}function wfu_update_browserpermission_option(e,t){var a=document.getElementById("wfu_fbperm_users"),l=document.getElementById("wfu_fbperm_roles"),d=document.getElementById("wfu_fbperm_"+e+"_"+t+"_view"),n=document.getElementById("wfu_fbperm_"+e+"_"+t+"_dl"),r=document.getElementById("wfu_fbperm_"+e+"_"+t+"_edit"),u=document.getElementById("wfu_fbperm_"+e+"_"+t+"_del");if("role"==e){if("0"==t){n.checked=d.checked&&n.checked,r.checked=d.checked&&r.checked,u.checked=d.checked&&u.checked,n.disabled=!d.checked,r.disabled=!d.checked,u.disabled=!d.checked;for(var o=l.value.split(","),_=0;_<o.length;_++){var s=o[_].indexOf("["),c=o[_].substr(0,s);"0"!=c&&wfu_update_browserpermission_option("role",c)}var f=(d.checked?"v":"")+(n.checked?"d":"")+(r.checked?"e":"")+(u.checked?"l":"");l.value=l.value.replace(/^0\[\w*\]/,"0["+f+"]")}else if("administrator"!=t){var i=document.getElementById("wfu_fbperm_role_"+t+"_row"),m=document.getElementById("wfu_fbperm_role_"+t+"_def"),p=document.getElementById("wfu_fbperm_role_0_view"),w=document.getElementById("wfu_fbperm_role_0_dl"),g=document.getElementById("wfu_fbperm_role_0_edit"),v=document.getElementById("wfu_fbperm_role_0_del");d.checked=m.checked?p.checked:d.checked,i.style.fontWeight=m.checked?"":"bold",n.checked=m.checked?w.checked:d.checked&&n.checked,r.checked=m.checked?g.checked:d.checked&&r.checked,u.checked=m.checked?v.checked:d.checked&&u.checked,d.disabled=m.checked,n.disabled=m.checked||!d.checked,r.disabled=m.checked||!d.checked,u.disabled=m.checked||!d.checked;var f=m.checked?"":"D"+(d.checked?"v":"")+(n.checked?"d":"")+(r.checked?"e":"")+(u.checked?"l":"");l.value=l.value.replace(new RegExp(","+t+"\\[\\w*\\]"),","+t+"["+f+"]")}for(var b=a.value.split(","),_=0;_<b.length;_++){var s=b[_].indexOf("["),h=b[_].substr(0,s);"0"!=h&&wfu_update_browserpermission_option("user",h)}}else if("user"==e){var y=document.getElementById("wfu_fbperm_user_"+t+"_role");if("0"==t){d.checked=y.checked?!1:d.checked,n.checked=y.checked?!1:d.checked&&n.checked,r.checked=y.checked?!1:d.checked&&r.checked,u.checked=y.checked?!1:d.checked&&u.checked,d.disabled=y.checked,n.disabled=y.checked||!d.checked,r.disabled=y.checked||!d.checked,u.disabled=y.checked||!d.checked,d.indeterminate=y.checked,n.indeterminate=y.checked,r.indeterminate=y.checked,u.indeterminate=y.checked;for(var b=a.value.split(","),_=0;_<b.length;_++){var s=b[_].indexOf("["),h=b[_].substr(0,s);"0"!=h&&wfu_update_browserpermission_option("user",h)}var f=y.checked?"":"R"+(d.checked?"v":"")+(n.checked?"d":"")+(r.checked?"e":"")+(u.checked?"l":"");a.value=a.value.replace(/^0\[\w*\]/,"0["+f+"]")}else{var I=document.getElementById("wfu_fbperm_user_"+t+"_roles").value.split(",");if(1==I.length&&""==I[0]&&(I=Array()),I.indexOf("administrator")<0){var i=document.getElementById("wfu_fbperm_user_"+t+"_row"),m=document.getElementById("wfu_fbperm_user_"+t+"_def"),E=document.getElementById("wfu_fbperm_user_0_role"),p=document.getElementById("wfu_fbperm_user_0_view"),w=document.getElementById("wfu_fbperm_user_0_dl"),g=document.getElementById("wfu_fbperm_user_0_edit"),v=document.getElementById("wfu_fbperm_user_0_del");if(I.length>0)for(var B=!1,k=!1,x=!1,N=!1,_=0;_<I.length;_++)B=B||document.getElementById("wfu_fbperm_role_"+I[_]+"_view").checked,k=B&&(k||document.getElementById("wfu_fbperm_role_"+I[_]+"_dl").checked),x=B&&(x||document.getElementById("wfu_fbperm_role_"+I[_]+"_edit").checked),N=B&&(N||document.getElementById("wfu_fbperm_role_"+I[_]+"_del").checked);else var B=document.getElementById("wfu_fbperm_role_0_view"),k=document.getElementById("wfu_fbperm_role_0_dl"),x=document.getElementById("wfu_fbperm_role_0_edit"),N=document.getElementById("wfu_fbperm_role_0_del");i.style.fontWeight=m.checked?"":"bold",y.checked=m.checked?E.checked:y.checked,d.checked=m.checked?E.checked?B:p.checked:y.checked?B:d.checked,n.checked=m.checked?E.checked?k:w.checked:y.checked?k:d.checked&&n.checked,r.checked=m.checked?E.checked?x:g.checked:y.checked?x:d.checked&&r.checked,u.checked=m.checked?E.checked?N:v.checked:y.checked?N:d.checked&&u.checked,y.disabled=m.checked,d.disabled=m.checked||y.checked,n.disabled=m.checked||y.checked||!d.checked,r.disabled=m.checked||y.checked||!d.checked,u.disabled=m.checked||y.checked||!d.checked;var f=m.checked?"":"D"+(y.checked?"":"R"+(d.checked?"v":"")+(n.checked?"d":"")+(r.checked?"e":"")+(u.checked?"l":""));a.value=a.value.replace(new RegExp(","+t+"\\[\\w*\\]"),","+t+"["+f+"]")}}}}var DraggedItem=null,ShortcodeNextSave=0,ShortcodeTimeOut=null,ShortcodeString="",Autosave=!1,PageObsolete=!1,PageUpdating=!1,CheckObsolescenceTimeOut=5e3;jQuery(document).ready(function(e){e(".wfu_color_field").wpColorPicker({change:function(e,t){e.target.value=t.color.toString(),"wfu_text_elements"==e.target.name?wfu_update_text_value(e):"wfu_triplecolor_elements"==e.target.name&&wfu_update_triplecolor_value(e)}})});
js/wordpress_file_upload_functions.js CHANGED
@@ -1,2 +1,2 @@
1
- function wfu_Initialize_Consts(e){if("undefined"==typeof GlobalData.consts){GlobalData.consts=new Object;for(var a=e.split(";"),s=0;s<a.length;s++)const_txt=a[s].split(":"),GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}function wfu_plugin_load_action(e){wfu_install_unload_hook();var a=document.getElementById("selectsubdiredit_"+e);a&&"none"!=a.style.display&&wfu_attach_element_handlers(a,new Function("wfu_selectsubdiredit_change("+e+");"))}function wfu_install_unload_hook(){window.onbeforeunload=wfu_unload_hook}function wfu_unload_hook(){return""!=GlobalData.UploadInProgressString&&""!=GlobalData.UploadInProgressString.trim()?GlobalData.consts.wfu_pageexit_prompt:void 0}function wfu_Check_Browser_Capabilities(){if("undefined"==typeof wfu_BrowserCaps){wfu_BrowserCaps=new Object;var e=wfu_GetHttpRequestObject();wfu_BrowserCaps.supportsAJAX=null!=e,wfu_BrowserCaps.supportsUploadProgress=!!(e&&"upload"in e&&"onprogress"in e.upload);var a=null;try{var a=new FormData}catch(s){}wfu_BrowserCaps.supportsHTML5=null!=a;var s=document.createElement("iframe");wfu_BrowserCaps.supportsIFRAME=null!=s,wfu_BrowserCaps.supportsDRAGDROP=window.FileReader?!0:!1,wfu_BrowserCaps.supportsAnimation=wfu_check_animation(),wfu_BrowserCaps.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0}}function wfu_check_animation(){var e=!1,a="animation",s="",t="Webkit Moz O ms Khtml".split(" "),n="",l=document.createElement("DIV");if(l.style.animationName&&(e=!0),e===!1)for(var r=0;r<t.length;r++)if(void 0!==l.style[t[r]+"AnimationName"]){n=t[r],a=n+"Animation",s="-"+n.toLowerCase()+"-",e=!0;break}return e}function wfu_join_strings(e){for(var a=[].slice.call(arguments),s="",t="",n=1;n<a.length;n++)t=""==s||""==a[n]?"":e,s+=t+a[n];return s}function wfu_plugin_decode_string(e){for(var a,s,t=0,n="";t<e.length;)a=parseInt(e.substr(t,2),16),s=128>a?a:224>a?((31&a)<<6)+(63&parseInt(e.substr(t+=2,2),16)):((15&a)<<12)+((63&parseInt(e.substr(t+=2,2),16))<<6)+(63&parseInt(e.substr(t+=2,2),16)),n+=String.fromCharCode(s),t+=2;return n}function wfu_plugin_encode_string(e){var a=0,s="",t="";for(a=0;a<e.length;a++)num=e.charCodeAt(a),num>=2048?num=((16773120&num|917504)<<4)+((4032&num|8192)<<2)+(63&num|128):num>=128&&(num=((65472&num|12288)<<2)+(63&num|128)),t=num.toString(16),(1==t.length||3==t.length||5==t.length)&&(t="0"+t),s+=t;return s}function wfu_randomString(e){for(var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",s=e,t="",n=0;s>n;n++){var l=Math.floor(Math.random()*a.length);t+=a.substring(l,l+1)}return t}function wfu_addEventHandler(e,a,s){e.addEventListener?e.addEventListener(a,s,!1):e.attachEvent?e.attachEvent("on"+a,s):e["on"+a]=s}function wfu_attach_element_handlers(e,a){for(var s=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],t=0;t<s.length;t++)wfu_addEventHandler(e,s[t],a)}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(a){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(s){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(a){}return e}function wfu_filedetails_showhide(e,a,s){var t=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a)),n=document.getElementById("wfu_messageblock_arrow_"+e+"_down_"+a),l=document.getElementById("wfu_messageblock_subheader_"+e+"_"+a),r=document.getElementById("wfu_messageblock_header_"+e+"_state_"+a);s?(t.style.display="",n.style.display="none",l.style.display="",r.value=""):(t.style.display="none",n.style.display="",l.style.display="none",r.value="none")}function wfu_get_file_ids(e){for(var a=(document.getElementById("wfu_messageblock_"+e),document.getElementById("wfu_messageblock_subheader_"+e).nextSibling),s="wfu_messageblock_"+e+"_",t=[];null!=a;)1===a.nodeType&&a.id.substr(0,s.length)==s&&t.push(a.id.substr(a.id.lastIndexOf("_")+1)),a=a.nextSibling;return t}function wfu_get_filelist(e,a){a="undefined"!=typeof a?a:!0;var s=document.getElementById("upfile_"+e),t=s.files;return t||(t=s.value?[{name:s.value}]:[]),a&&"undefined"!=typeof s.filearray&&(t=s.filearray),t}function wfu_filedetails_toggle(e,a){var s=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a));wfu_filedetails_showhide(e,a,"none"==s.style.display)}function wfu_headerdetails_showhide(e,a){var s=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up")),t=document.getElementById("wfu_messageblock_arrow_"+e+"_down"),n=document.getElementById("wfu_messageblock_subheader_"+e),l=document.getElementById("wfu_messageblock_subheader_"+e+"_message"),r=document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage"),i=document.getElementById("wfu_messageblock_header_"+e+"_state"),o=wfu_get_file_ids(e);if(a){s.style.display="",t.style.display="none",("none"!=l.style.display||"none"!=r.style.display)&&(n.style.display=""),i.value="";for(var _=0;_<o.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+o[_]).style.display="",document.getElementById("wfu_messageblock_subheader_"+e+"_"+o[_]).style.display=document.getElementById("wfu_messageblock_header_"+e+"_state_"+o[_]).value}else{s.style.display="none",t.style.display="",n.style.display="none",i.value="none";for(var _=0;_<o.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+o[_]).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_"+o[_]).style.display="none"}}function wfu_headerdetails_toggle(e){var a=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up"));wfu_headerdetails_showhide(e,"none"==a.style.display)}function wfu_selectbutton_changed(e,a){wfu_BrowserCaps.supportsAJAX&&wfu_BrowserCaps.supportsHTML5||(a=0);var s=document.getElementById("upfile_"+e),t=wfu_get_filelist(e,!1);if(1==a){"undefined"==typeof s.filearray&&(s.filearray=Array());for(var n=0;n<t.length;n++)s.filearray.push(t[n])}else"undefined"!=typeof s.filearray&&delete s.filearray;wfu_update_filename_text(e)}function wfu_selectbutton_clicked(e){var a=document.getElementById("wordpress_file_upload_message_"+e);a&&(a.style.display="none"),wfu_reset_message(e),document.getElementById("upfile_"+e).value="";var s=document.getElementById("fileName_"+e);s&&(s.value="",s.className="file_input_textbox")}function wfu_update_uploadbutton_status(e){var a=document.getElementById("upload_"+e);if(a){var s=wfu_get_filelist(e),t=s.length>0;a.disabled=!t}}function wfu_update_filename_text(e){var a=document.getElementById("fileName_"+e);if(a){for(var s=wfu_get_filelist(e),t="",n=0;n<s.length;n++)""!=t&&(t+=", "),t+=s[n].name.replace(/c:\\fakepath\\/i,"");a.value=t}}function wfu_selectsubdir_check(e){var a=document.getElementById("selectsubdir_"+e);if(!a)return!0;var s=document.getElementById("selectsubdiredit_"+e),t="none"!=s.style.display;return t&&a.selectedIndex>0&&(s.value=a.value.replace(/^\s+/,""),s.className="file_item_clean_match subfolder_autoplus_match",wfu_selectsubdiredit_change(e)),document.getElementById("hiddeninput_"+e).value=t?s.value:a.selectedIndex,!t&&0==a.selectedIndex||t&&(""==s.value||"file_item_clean_empty subfolder_autoplus_empty"==s.className)?(t?(a.className="subfolder_autoplus_dropdown_prompt",s.value="",GlobalData.FreeChangeHandler=!0,s.className="file_item_clean_prompt subfolder_autoplus_prompt",GlobalData.FreeChangeHandler=!1):a.className="file_item_clean_prompt subfolder_dropdown_prompt",!1):(a.className=t?"subfolder_autoplus_dropdown":"file_item_clean subfolder_dropdown",t&&"file_item_clean_prompt subfolder_autoplus_prompt"==s.className&&(s.className="file_item_clean subfolder_autoplus"),a.options[0].style.display="none",!0)}function wfu_selectsubdiredit_enter(e){var a=document.getElementById("selectsubdir_"+e),s=document.getElementById("selectsubdiredit_"+e);"file_item_clean_empty subfolder_autoplus_empty"==s.className&&(s.value=""),a.className="subfolder_autoplus_dropdown",s.className="file_item_clean subfolder_autoplus"}function wfu_selectsubdiredit_exit(e){var a=document.getElementById("selectsubdiredit_"+e);""==a.value&&(a.value=GlobalData.consts.wfu_subdir_typedir,a.className="file_item_clean_empty subfolder_autoplus_empty")}function wfu_selectsubdiredit_change(e){if(!GlobalData.FreeChangeHandler){var a=document.getElementById("selectsubdir_"+e),s=document.getElementById("selectsubdiredit_"+e);if("none"!=s.style.display){if("file_item_clean_empty subfolder_autoplus_empty"==s.className)return a.selectedIndex=0,void(document.getElementById("hiddeninput_"+e).value="");document.getElementById("hiddeninput_"+e).value=s.value;for(var t,n=!1,l=1;l<a.options.length;l++)t=a.options[l].value.replace(/^\s+/,"").toLowerCase(),a.options[l].style.display=s.value.length>=3?t.substr(0,s.value.length)==s.value.toLowerCase()?"block":"none":"block",a.options[l].value.replace(/^\s+/,"")==s.value&&(a.selectedIndex=l,s.className="file_item_clean_match subfolder_autoplus_match",n=!0);n||(a.selectedIndex=0,s.className="file_item_clean subfolder_autoplus")}}}function wfu_selectsubdir_disable_onoff(e,a){var s=document.getElementById("selectsubdir_"+e);if(!s)return!0;var t=document.getElementById("selectsubdiredit_"+e),n="none"!=t.style.display;s.disabled=a,n&&(t.disabled=a)}function wfu_userdata_focused(e){if("file_userdata_message_required_empty"==e.className){e.className="file_userdata_message_required";var a=document.getElementById(e.id.replace("_message_","_hint_"));a.style.display="none"}}function wfu_Redirect(e){window.location=e}function wfu_loadStart(){}function wfu_uploadProgress(e,a,s,t){t&&"undefined"==typeof this.xhr&&(console.log("total="+e.total+", loaded="+e.loaded),console.log(e));var n=GlobalData[a].xhrs[s],l=0,r=0,i=document.getElementById("progressbar_"+a+"_animation");if(e.lengthComputable){if(n.sizeloaded=e.loaded,n.size<e.total&&e.total>0){r=e.total-n.size,n.deltasize+=r,n.size+=r;for(var o=0;o<GlobalData[a].xhrs.length;o++)GlobalData[a].xhrs[o].file_id==n.file_id&&(GlobalData[a].xhrs[o].totalsize+=r)}if(i){for(var _=0,d=0,u=[],o=0;o<GlobalData[a].xhrs.length;o++)u[GlobalData[a].xhrs[o].file_id]=0;for(var o=0;o<GlobalData[a].xhrs.length;o++)u[GlobalData[a].xhrs[o].file_id]=Math.max(GlobalData[a].xhrs[o].totalsize,u[GlobalData[a].xhrs[o].file_id]);for(var o=0;o<u.length;o++)"undefined"!=typeof u[o]&&(_+=u[o]);for(var o=0;o<GlobalData[a].xhrs.length;o++)d+=GlobalData[a].xhrs[o].sizeloaded;l=Math.round(100*d/_),i.style.width=l.toString()+"%"}}else i&&(i.style.width="0%")}function wfu_notify_WPFilebase(e,a){var s=wfu_GetHttpRequestObject();if(null==s){var t=document.createElement("iframe");return t.style.display="none",t.src=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_notify_wpfilebase&params_index="+e+"&session_token="+a,void document.body.appendChild(t)}var n=GlobalData.consts.ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_notify_wpfilebase",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=e,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=a;for(var l="",t=0;t<params.length;t++)l+=(t>0?"&":"")+params[t][0]+"="+encodeURI(params[t][1]);s.open("POST",n,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){},s.send(l)}function wfu_send_email_notification(e,a,s,t,n,l,r,i,o){var _=wfu_GetHttpRequestObject();if(null!=_){var d=GlobalData.consts.ajax_url,u=wfu_get_userdata_count(e);params=new Array(7+u),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_send_email_notification",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=s,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=t,params[3]=new Array(2),params[3][0]="only_filename_list",params[3][1]=n,params[4]=new Array(2),params[4][0]="target_path_list",params[4][1]=l,params[5]=new Array(2),params[5][0]="attachment_list",params[5][1]=r,params[6]=new Array(2),params[6][0]="uniqueuploadid_"+e,params[6][1]=a;for(var m=0;u>m;m++)params[7+m]=new Array(2),params[7+m][0]="userdata_"+m,params[7+m][1]=wfu_plugin_encode_string(document.getElementById("hiddeninput_"+e+"_userdata_"+m).value);for(var c="",m=0;m<params.length;m++)c+=(m>0?"&":"")+params[m][0]+"="+encodeURI(params[m][1]);var f=new Date;_.xhrid=-1,_.shortcode_id=e,_.requesttype="email",_.file_id=0,_.loading=!1,_.aborted=!1,_.unique_id=a,_.debugmode=i,_.is_admin=o,_.params_index=s,_.session_token=t,_.start_time=f.getTime(),_.end_time=_.start_time,_.finish_time=_.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),_.fail_colors=GlobalData.consts.fail_colors,_.error_message_header="",_.error_message_failed=GlobalData.consts.message_failed,_.error_message_cancelled=GlobalData.consts.message_cancelled,_.error_adminmessage_unknown="",_.open("POST",d,!0),_.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_.addEventListener("load",wfu_uploadComplete,!1),_.addEventListener("error",wfu_uploadFailed,!1),_.addEventListener("abort",wfu_uploadCanceled,!1),_.send(c)}}function wfu_format_debug_data(e,a){return output='<label class="file_messageblock_subheader_debugmessage_label">',output+="Debug Data"+a,output+="</label>",output+='<div class="file_messageblock_subheader_debugmessage_container">',output+=e,output+="</div>"}function wfu_uploadComplete(e){var a=new Date,s=this.shortcode_id,t=(this.file_id,!1),n="",l="",r="",i="unknown",o="",_="",d="wfu_fileupload_success:";this.loading=!1,this.end_time=a.getTime();var u=e.target.responseText,m=u,c="error";if(-1!=u&&u.indexOf("force_errorabort_code")>-1&&(c="errorabort",u=u.replace("force_errorabort_code","")),-1!=u){var f=u.indexOf(d);if(f>-1&&("true"==this.debugmode&&(_=u.substr(0,f)),m=u.substr(f+d.length),f=m.indexOf(":"),n=m.substr(0,f),m=m.substr(f+1),f=m.indexOf(":"),r=m.substr(0,f),l=m.substr(f+1)),""!=_){var p="";"fileupload"==this.requesttype?p=" - File: "+this.file_id:"email"==this.requesttype&&(p=" - Email Notification"),_=wfu_format_debug_data(_,p)}if(""!=r){var g=r.split(";");if(1==parseInt(g[2])){var b=g[3].split(",");i=wfu_plugin_decode_string(b[0]),o=b[4]}}}if(""==l||""==r){var y=this.fail_colors.split(","),w=wfu_Initialize_Params();w.general.shortcode_id=s,w.general.unique_id=this.unique_id,w.general.state=7,w.general.files_count="fileupload"==this.requesttype?1:0,w.general.upload_finish_time=this.finish_time,w.general.fail_message=GlobalData.consts.message_unknown,w.general.fail_admin_message=wfu_join_strings("<br />",this.error_adminmessage_unknown,this.requesttype+":"+m),w.general.files_count>0?(w[0]={},w[0].color=y[0],w[0].bgcolor=y[1],w[0].borcolor=y[2],w[0].message_type=c,i=c,w[0].header=this.error_message_header,w[0].message=GlobalData.consts.message_timelimit,w[0].admin_messages="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:""):w.general.admin_messages.other="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:"",w.general.upload_finish_time>0&&a.getTime()<w.general.upload_finish_time&&(w.general.files_count>0?(w[0].message=w.general.fail_message,w[0].admin_messages="true"==this.is_admin?w.general.fail_admin_message:""):w.general.admin_messages.other="true"==this.is_admin?w.general.fail_admin_message:"")}return t=""==l||""==r?wfu_ProcessUploadComplete(s,this.file_id,w,this.unique_id,this.params_index,this.session_token,"",[this.debugmode,_,this.is_admin],this.requesttype,""):wfu_ProcessUploadComplete(s,this.file_id,l,this.unique_id,this.params_index,this.session_token,r,[this.debugmode,_,this.is_admin],this.requesttype,n),t&&(wfu_unlock_upload(e.target.shortcode_id),wfu_hide_simple_progressbar(s),wfu_clear(e.target.shortcode_id)),e.target.return_status?i:void 0}function wfu_ProcessUploadComplete(sid,file_id,upload_params,unique_id,params_index,session_token,safe_output,debug_data,request_type,js_script_enc){if(sid&&!(0>sid)&&null!=upload_params&&""!=upload_params&&""!=unique_id&&("no-ajax"==unique_id||GlobalData[sid])){var do_redirect=!1;if("string"==typeof upload_params){upload_params=wfu_plugin_decode_string(upload_params.replace(/^\s+|\s+$/g,""));var Params=null;try{Params=JSON.parse(upload_params)}catch(e){}if(null==Params){var safe_parts=safe_output.split(";");Params=wfu_Initialize_Params(),Params.general.shortcode_id=sid,Params.general.unique_id=unique_id,Params.general.state=safe_parts[0],4==Params.general.state&&Params.general.state++;var default_colors=safe_parts[1].split(","),filedata="",error_jsonparse_filemessage=GlobalData.consts.jsonparse_filemessage,error_jsonparse_message=GlobalData.consts.jsonparse_message,error_jsonparse_adminmessage=GlobalData.consts.jsonparse_adminmessage;Params.general.files_count=parseInt(safe_parts[2]);for(var i=0;i<Params.general.files_count;i++)Params[i]={},Params[i].color=default_colors[0],Params[i].bgcolor=default_colors[1],Params[i].borcolor=default_colors[2],filedata=safe_parts[i+3].split(","),Params[i].message_type=wfu_plugin_decode_string(filedata[0]),Params[i].header=wfu_plugin_decode_string(filedata[1]),"success"==Params[i].message_type&&(Params[i].header+=error_jsonparse_filemessage,Params[i].message_type="warning"),Params[i].message=wfu_join_strings("<br />",error_jsonparse_message,wfu_plugin_decode_string(filedata[2])),Params[i].admin_messages=wfu_join_strings("<br />",error_jsonparse_adminmessage,wfu_plugin_decode_string(filedata[3]))}}else{if("object"!=typeof upload_params)return;var Params=upload_params}for(i=0;Params[i];)Params[i].message_type&&"error"==Params[i].message_type.substr(0,5)&&(Params[i].message_type=Params[i].message_type.substr(0,5)),i++;var message_table=document.getElementById("wfu_messageblock_"+sid),UploadStates_Ok=!0;if(!UploadStates[sid]&&message_table){var upload_states=document.getElementById("wfu_messageblock_header_"+sid+"_states").value;upload_states=wfu_plugin_decode_string(upload_states.replace(/^\s+|\s+$/g,"")),UploadStates[sid]=null;try{UploadStates[sid]=JSON.parse(upload_states)}catch(e){}null==UploadStates[sid]&&(UploadStates_Ok=!1)}GlobalData[sid]||(GlobalData[sid]=Object());var G=GlobalData[sid];if("no-ajax"==unique_id)G.last=!1,G.unique_id="",G.files_count=Params.general.files_count,0==Params.general.state&&(Params.general.files_count=0),G.files_processed=Params.general.files_count,G.upload_state=UploadStates_Ok?Params.general.state:10,G.message=Params.general.message,G.update_wpfilebase=Params.general.update_wpfilebase,G.redirect_link=Params.general.redirect_link,G.notify_only_filename_list="",G.notify_target_path_list="",G.notify_attachment_list="",G.admin_messages={},G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase,G.admin_messages.notify=Params.general.admin_messages.notify,G.admin_messages.redirect=Params.general.admin_messages.redirect,G.admin_messages.debug=debug_data[1],G.admin_messages.other=Params.general.admin_messages.other,G.errors={},G.errors.wpfilebase=Params.general.errors.wpfilebase,G.errors.notify=Params.general.errors.notify,G.errors.redirect=Params.general.errors.redirect,G.current_size=0,G.total_size=0;else{if(""==G.unique_id||G.unique_id!=unique_id||G.unique_id!=Params.general.unique_id)return;if(G.last)return;0==Params.general.files_count&&Params[0]&&"error"==Params[0].message_type&&(Params.general.files_count=1);for(var file_status="",i=0;i<Params.general.files_count;i++)file_status="error"==Params[i].message_type&&0==G.files_processed?"error1":"error"==Params[i].message_type&&G.files_processed>0?"error2":Params[i].message_type,G.upload_state=GlobalData.filestatematch[file_status][G.upload_state];UploadStates_Ok||(G.upload_state=10),G.files_processed+=Params.general.files_count,G.message=wfu_join_strings("<br />",G.message,Params.general.message),""==G.update_wpfilebase&&(G.update_wpfilebase=Params.general.update_wpfilebase),(!request_type||request_type&&"email"!=request_type)&&(G.redirect_link=Params.general.redirect_link),G.notify_only_filename_list=wfu_join_strings(", ",G.notify_only_filename_list,Params.general.notify_only_filename_list),G.notify_target_path_list=wfu_join_strings(", ",G.notify_target_path_list,Params.general.notify_target_path_list),G.notify_attachment_list=wfu_join_strings(",",G.notify_attachment_list,Params.general.notify_attachment_list),G.admin_messages.debug=wfu_join_strings("<br />",G.admin_messages.debug,debug_data[1]),G.admin_messages.other=wfu_join_strings("<br />",G.admin_messages.other,Params.general.admin_messages.other),""==G.admin_messages.wpfilebase&&(G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase),""==G.admin_messages.notify&&(G.admin_messages.notify=Params.general.admin_messages.notify),""==G.admin_messages.redirect&&(G.admin_messages.redirect=Params.general.admin_messages.redirect),""==G.errors.wpfilebase&&(G.errors.wpfilebase=Params.general.errors.wpfilebase),""==G.errors.notify&&(G.errors.notify=Params.general.errors.notify),""==G.errors.redirect&&(G.errors.redirect=Params.general.errors.redirect)}G.files_processed==G.files_count&&(G.last=!0,""!=G.update_wpfilebase&&(G.admin_messages.wpfilebase="",wfu_notify_WPFilebase(params_index,session_token)),""!=G.notify_only_filename_list&&(G.admin_messages.notify="",wfu_send_email_notification(sid,unique_id,params_index,session_token,G.notify_only_filename_list,G.notify_target_path_list,G.notify_attachment_list,debug_data[0],debug_data[2]),G.last=!1,G.notify_only_filename_list=""),G.last&&("no-ajax"!=unique_id&&wfu_notify_server_upload_ended(sid,unique_id,params_index,session_token),GlobalData.UploadInProgressString=GlobalData.UploadInProgressString.replace(new RegExp("\\["+unique_id+"\\]","g"),"")),""!=G.errors.redirect&&(G.redirect_link=""),""!=G.redirect_link&&G.last&&""==GlobalData.UploadInProgressString.trim()&&(G.upload_state=11,do_redirect=!0));var nonadmin_message=G.message,admin_message=wfu_join_strings("<br />",G.admin_messages.other,G.admin_messages.wpfilebase,G.admin_messages.notify,G.admin_messages.redirect,G.admin_messages.debug);if(!UploadStates_Ok){var error_jsonparse_headermessage=GlobalData.consts.jsonparse_headermessage,error_jsonparse_headeradminmessage=GlobalData.consts.jsonparse_headeradminmessage;nonadmin_message=wfu_join_strings("<br />",error_jsonparse_headermessage,nonadmin_message),admin_message=wfu_join_strings("<br />",error_jsonparse_headeradminmessage,admin_message)}if(G.last){0==G.files_count?G.upload_state=8:G.upload_state<4&&(G.upload_state+=4);var admin_messages_exist=""!=G.admin_messages.wpfilebase||""!=G.admin_messages.notify||""!=G.admin_messages.redirect||""!=G.admin_messages.other;4==G.upload_state&&""!=admin_message?G.upload_state++:5==G.upload_state&&""==!admin_message&&""==nonadmin_message&&G.upload_state--}if(message_table){var subheader_state=document.getElementById("wfu_messageblock_header_"+sid+"_state"),single_file_shown=1==G.files_count&&""==nonadmin_message&&""==admin_message&&G.last&&!do_redirect;if(single_file_shown)document.getElementById("wfu_messageblock_header_"+sid).style.display="none";else{document.getElementById("wfu_messageblock_header_"+sid).style.display="";var header_container=document.getElementById("wfu_messageblock_header_"+sid+"_container");if(UploadStates_Ok){var suffix="";1!=G.files_count||5!=G.upload_state&&7!=G.upload_state||(suffix="_singlefile"),header_container.innerHTML=UploadStates[sid]["State"+G.upload_state+suffix]}else{header_container.innerHTML="";var safe_container=document.getElementById("wfu_messageblock_header_"+sid+"_safecontainer");header_container.innerHTML=safe_container.innerHTML.replace(/_safe/g,"")}var subheader_show=!1;""!=nonadmin_message?(document.getElementById("wfu_messageblock_subheader_"+sid+"_message").style.display="",document.getElementById("wfu_messageblock_subheader_"+sid+"_messagelabel").innerHTML=nonadmin_message,subheader_show=!0):document.getElementById("wfu_messageblock_subheader_"+sid+"_message").style.display="none",""!=admin_message?(document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage").style.display="",document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessagelabel").innerHTML=admin_message,subheader_show=!0):document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage").style.display="none",document.getElementById("wfu_messageblock_subheader_"+sid).style.display=subheader_show?subheader_state.value:"none",subheader_show||G.files_processed>0?(header_container.colSpan=2,document.getElementById("wfu_messageblock_arrow_"+sid).style.display=""):(document.getElementById("wfu_messageblock_arrow_"+sid).style.display="none",header_container.colSpan=3)}for(var next_block=document.getElementById("wfu_messageblock_subheader_"+sid),next_block_id=0,file_block=null,file_template_container=document.getElementById("wfu_messageblock_"+sid+"_filetemplate"),file_contents="",door=document.getElementById("wfu_messageblock_"+sid+"_door"),ii=0,headerspan=1,subheaderspan=2,file_template=wfu_plugin_decode_string(file_template_container.value.replace(/^\s+|\s+$/g,"")),i=0;i<Params.general.files_count;i++){for(ii=i+file_id,file_contents=file_template.replace(/\[file_id\]/g,ii),file_contents=file_contents.replace(/\[filenumber_display\]/g,""),file_contents=file_contents.replace(/\[fileheader_color\]/g,Params[i].color),file_contents=file_contents.replace(/\[fileheader_bgcolor\]/g,Params[i].bgcolor),file_contents=file_contents.replace(/\[fileheader_borcolor\]/g,Params[i].borcolor),file_contents=file_contents.replace(/\[fileheader_message\]/g,Params[i].header),file_contents=file_contents.replace(/\[filesubheadermessage_display\]/g,'style="display:none;"'),file_contents=file_contents.replace(/\[filesubheader_message\]/g,Params[i].message),file_contents=file_contents.replace(/\[filesubheaderadminmessage_display\]/g,'style="display:none;"'),file_contents=file_contents.replace(/\[filesubheader_adminmessage\]/g,Params[i].admin_messages),file_contents="<table><tbody>"+file_contents+"</tbody></table>",door.innerHTML=file_contents,headerspan=1,subheaderspan=2,subheader_show=!1,file_block=document.getElementById("wfu_messageblock_"+sid+"_"+ii),1==G.files_count?(document.getElementById("wfu_messageblock_"+sid+"_filenumber_"+ii).style.display="none",document.getElementById("wfu_messageblock_subheader_"+sid+"_fileempty_"+ii).style.display="none",file_block.style.display=single_file_shown?"":subheader_state.value,headerspan++,subheaderspan++):file_block.style.display=subheader_state.value,""!=Params[i].message&&(document.getElementById("wfu_messageblock_subheader_"+sid+"_message_"+ii).style.display="",subheader_show=!0),""!=Params[i].admin_messages&&(document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage_"+ii).style.display="",subheader_show=!0),subheader_show||(document.getElementById("wfu_messageblock_arrow_"+sid+"_"+ii).style.display="none",headerspan++),document.getElementById("wfu_messageblock_header_"+sid+"_container_"+ii).colSpan=headerspan,document.getElementById("wfu_messageblock_subheader_"+sid+"_container_"+ii).colSpan=subheaderspan;ii>next_block_id&&(next_block=next_block.nextSibling,null!=next_block);)1===next_block.nodeType&&(next_block_id=next_block.id.substr(next_block.id.lastIndexOf("_")+1));message_table.tBodies[0].insertBefore(file_block,next_block),next_block=file_block.nextSibling,file_block=document.getElementById("wfu_messageblock_subheader_"+sid+"_"+ii),message_table.tBodies[0].insertBefore(file_block,next_block),next_block=file_block,next_block_id=ii}single_file_shown&&(document.getElementById("wfu_messageblock_"+sid+"_1").style.display=""),message_table.style.display="",document.getElementById("wordpress_file_upload_message_"+sid).style.display=""}return js_script_enc&&eval(wfu_plugin_decode_string(js_script_enc)),do_redirect&&wfu_Redirect(G.redirect_link),G.last}}function wfu_uploadFailed(e,a){a&&(console.log("failure report following"),console.log(e));var s=e.target,t={target:{responseText:"",shortcode_id:s.shortcode_id}};wfu_uploadComplete.call(s,t)}function wfu_uploadCanceled(){}function wfu_notify_server_upload_ended(e,a,s,t){var n=wfu_GetHttpRequestObject();if(null!=n){var l=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action",params[1]=new Array(2),params[1][0]="uniqueuploadid_"+e,params[1][1]=a,params[2]=new Array(2),params[2][0]="params_index",params[2][1]=s,params[3]=new Array(2),params[3][0]="session_token",params[3][1]=t,params[4]=new Array(2),params[4][0]="upload_finished",params[4][1]=1;for(var r="",i=0;i<params.length;i++)r+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);n.open("POST",l,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){4==n.readyState&&200==n.status},n.send(r)}}function wfu_Initialize_Params(){var e={};return e.version="full",e.general={},e.general.shortcode_id=0,e.general.unique_id="",e.general.state=0,e.general.files_count=0,e.general.update_wpfilebase="",e.general.redirect_link="",e.general.upload_finish_time=0,e.general.message="",e.general.message_type="",e.general.admin_messages={},e.general.admin_messages.wpfilebase="",e.general.admin_messages.notify="",e.general.admin_messages.redirect="",e.general.admin_messages.other="",e.general.errors={},e.general.errors.wpfilebase="",e.general.errors.notify="",e.general.errors.redirect="",e.general.color="",e.general.bgcolor="",e.general.borcolor="",e.general.notify_only_filename_list="",e.general.notify_target_path_list="",e.general.notify_attachment_list="",e.general.fail_message="",e.general.fail_admin_message="",e}function wfu_redirect_to_classic(e,a,s,t){0!=wfu_filesselected(e)&&wfu_selectsubdir_check(e)&&wfu_check_required_userdata(e,!0)&&wfu_redirect_to_classic_cont(e,a,s,t,[""])}function wfu_redirect_to_classic_cont(e,a,s,t){var n=function(n){if(n.indexOf("wfu_response_success:")>-1){var l=wfu_Initialize_Params();if(l.general.shortcode_id=e,l.general.unique_id="",l.general.files_count=wfu_filesselected(e),wfu_ProcessUploadComplete(e,0,l,"no-ajax","",a,"",["false","","false"]),1==s){var r="";document.getElementById("upfile_"+e).name="uploadedfile_"+e+"_redirected"+r}document.getElementById("adminerrorcodes_"+e).value=t>0?t:"",document.getElementById("upfile_"+e).disabled=!1,document.getElementById("uniqueuploadid_"+e).value=wfu_randomString(10),document.getElementById("uploadform_"+e).submit()}},l="",r=new Date,i=GlobalData.consts.ajax_url+"?action=wfu_ajax_action&sid="+e+"&start_time="+r.getTime()+"&session_token="+a+l;wfu_lock_upload(e);var o=wfu_GetHttpRequestObject();if(null==o){var _=document.createElement("iframe");return _?(_.style.display="none",_.src=i,document.body.appendChild(_),void(_.onload=function(){n(_.contentDocument.body.innerHTML)})):void 0}o.open("GET",i,!0),o.onreadystatechange=function(){4==o.readyState&&200==o.status&&n(o.responseText)},o.send(null)}function wfu_filesselected(e){var a=document.getElementById("fileName_"+e),s=wfu_get_filelist(e);return 0==s.length&&a&&(a.value=GlobalData.consts.nofilemessage,a.className="file_input_textbox_nofile"),s.length}function wfu_check_required_userdata(e,a){for(var s=wfu_get_userdata_count(e),t=!1,n=0;s>n;n++){var l=document.getElementById("hiddeninput_"+e+"_userdata_"+n),r=document.getElementById("userdata_"+e+"_message_"+n),i=document.getElementById("userdata_"+e+"_"+n),o=document.getElementById("userdata_"+e+"_hint_"+n),_="file_userdata_message_required";if(r.className.substr(0,_.length)==_&&""==l.value){if(a){r.className=_+"_empty";var d=i.getBoundingClientRect(),u=r.getBoundingClientRect();o.style.left=parseInt(u.right-d.left)+"px",o.style.top=parseInt(u.top-d.top)+"px",o.innerHTML=GlobalData.consts.userdata_empty,o.style.display="block"}t=!0}}return!t}function wfu_HTML5UploadFile(e,a,s){if(!wfu_BrowserCaps.supportsAJAX)return void wfu_redirect_to_classic(e,s,1,1);if(!wfu_BrowserCaps.supportsHTML5)return void wfu_redirect_to_classic(e,s,1,2);
2
- a=wfu_plugin_decode_string(a.replace(/^\s+|\s+$/g,""));var t=null;try{t=JSON.parse(a)}catch(n){}if(null==t)return void wfu_redirect_to_classic(e,s,1,3);var l=wfu_GetHttpRequestObject();if(null!=l){var r=wfu_filesselected(e);if(0!=r){var i=document.getElementById("upload_"+e),o=!i;if(!wfu_selectsubdir_check(e))return void(o&&wfu_clear_files(e));var _=r;return _+=_,wfu_check_required_userdata(e,!0)?void wfu_HTML5UploadFile_cont(e,t,s,[""]):void(o&&wfu_clear_files(e))}}}function wfu_HTML5UploadFile_cont(e,a,s){function t(l,r,i,m){f=!0;var p=wfu_GetHttpRequestObject(),g=wfu_GetHttpRequestObject();if(null!=p&&null!=g){var b=null,y=null;try{var b=new FormData,y=new FormData}catch(w){}if(null!=b&&null!=y){i||b.append("uploadedfile_"+e+_,r),b.append("uploadedfile_"+e+"_index",l),b.append("uploadedfile_"+e+"_name",wfu_plugin_encode_string(o[l].name)),b.append("uploadedfile_"+e+"_size",o[l].size),b.append("action","wfu_ajax_action"),b.append("uniqueuploadid_"+e,u),b.append("params_index",a.params_index),b.append("subdir_sel_index",n),i?b.append("only_check","1"):b.append("only_check","0"),b.append("session_token",s),b.append("unique_id",d);for(var h=wfu_get_userdata_count(e),v=0;h>v;v++)b.append("hiddeninput_"+e+"_userdata_"+v,document.getElementById("hiddeninput_"+e+"_userdata_"+v).value);var G=GlobalData[e].xhrs.push(p)-1,k=new Date;if(p.xhrid=G,p.shortcode_id=e,p.requesttype="fileupload",p.file_id=l+1,i?(p.size=0,p.totalsize=0,p.loading=!1):(p.size=r.size,p.totalsize=o[l].size,p.loading=!0),p.deltasize=0,p.sizeloaded=0,p.aborted=!1,p.unique_id=u,p.params_index=a.params_index,p.session_token=s,p.debugmode=a.debugmode,p.is_admin=a.is_admin,p.start_time=k.getTime(),p.end_time=p.start_time,p.finish_time=p.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),p.fail_colors=a.fail_colors,p.error_message_header=a.error_header.replace(/%username%/g,"no data"),p.error_message_header=p.error_message_header.replace(/%useremail%/g,"no data"),p.error_message_header=p.error_message_header.replace(/%filename%/g,o[l].name),p.error_message_header=p.error_message_header.replace(/%filepath%/g,o[l].name),p.error_message_failed=GlobalData.consts.message_failed,p.error_message_cancelled=GlobalData.consts.message_cancelled,p.error_adminmessage_unknown=GlobalData.consts.adminmessage_unknown.replace(/%username%/g,"no data"),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%useremail%/g,"no data"),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%filename%/g,o[l].name),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%filepath%/g,o[l].name),m){y.append("action","wfu_ajax_action"),y.append("params_index",a.params_index),y.append("session_token",s),y.append("force_connection_close","1"),g.open("POST",GlobalData.consts.ajax_url,!1);try{g.send(y)}catch(I){}f="success"==g.responseText}if(f)i?(p.addEventListener("load",function(a){a={target:{responseText:a.target.responseText,shortcode_id:e,return_status:!0}};var s=wfu_uploadComplete.call(p,a);f="success"==s||"warning"==s,f&&t(l,r,!1,!1)},!1),p.addEventListener("error",function(){},!1),p.open("POST",GlobalData.consts.ajax_url,!0),p.send(b)):(p.upload.xhr=p,p.upload.dummy=1,p.upload.addEventListener("loadstart",wfu_loadStart,!1),p.upload.addEventListener("progress",new Function("evt","wfu_uploadProgress(evt, "+e+", "+G+", "+a.debugmode+");"),!1),p.addEventListener("load",wfu_uploadComplete,!1),p.addEventListener("error",new Function("evt","wfu_uploadFailed(evt, "+a.debugmode+");"),!1),p.addEventListener("abort",wfu_uploadCanceled,!1),p.open("POST",GlobalData.consts.ajax_url,!0),p.send(b));else{var B={target:{responseText:"",shortcode_id:e}};wfu_uploadComplete.call(p,B)}return c++,f}}}var n=-1,l=document.getElementById("selectsubdir_"+e);if(l){var r=document.getElementById("selectsubdiredit_"+e),i="none"!=r.style.display;n=i?r.value:l.selectedIndex}var o=wfu_get_filelist(e),_="",d=wfu_randomString(10),u=d;GlobalData.UploadInProgressString+="["+u+"]",GlobalData[e]={},GlobalData[e].unique_id=u,GlobalData[e].last=!1,GlobalData[e].files_count=1,GlobalData[e].files_processed=0,GlobalData[e].upload_state=0,GlobalData[e].message="",GlobalData[e].update_wpfilebase="",GlobalData[e].redirect_link="",GlobalData[e].notify_only_filename_list="",GlobalData[e].notify_target_path_list="",GlobalData[e].notify_attachment_list="",GlobalData[e].admin_messages={},GlobalData[e].admin_messages.wpfilebase="",GlobalData[e].admin_messages.notify="",GlobalData[e].admin_messages.redirect="",GlobalData[e].admin_messages.debug="",GlobalData[e].admin_messages.other="",GlobalData[e].errors={},GlobalData[e].errors.wpfilebase="",GlobalData[e].errors.notify="",GlobalData[e].errors.redirect="",GlobalData[e].xhrs=Array(),wfu_show_simple_progressbar(a.shortcode_id,"progressive");var m=wfu_Initialize_Params();m.general.shortcode_id=e,m.general.unique_id=u,wfu_ProcessUploadComplete(e,0,m,u,a.params_index,s,"",["false","","false"]);var c=0,f=!0,p=0;t(p,o[p],!0,!1)}function wfu_get_userdata_count(e){for(var a=0;document.getElementById("userdata_"+e+"_"+a);)a++;return a}function wfu_lock_upload(e){var a=document.getElementById("fileName_"+e);a&&(a.disabled=!0),document.getElementById("input_"+e).disabled=!0,document.getElementById("upfile_"+e).disabled=!0,wfu_selectsubdir_disable_onoff(e,!0);var s=document.getElementById("upload_"+e);s&&(s.disabled=!0);for(var t=wfu_get_userdata_count(e),n=0;t>n;n++)document.getElementById("userdata_"+e+"_message_"+n).disabled=!0}function wfu_unlock_upload(e){var a=document.getElementById("fileName_"+e);a&&(a.disabled=!1),document.getElementById("input_"+e).disabled=!1,document.getElementById("upfile_"+e).disabled=!1,wfu_selectsubdir_disable_onoff(e,!1);var s=document.getElementById("upload_"+e);s&&(s.disabled=!1);for(var t=wfu_get_userdata_count(e),n=0;t>n;n++)document.getElementById("userdata_"+e+"_message_"+n).disabled=!1}function wfu_clear_files(e){document.getElementById("uploadform_"+e).reset();var a=document.getElementById("fileName_"+e);a&&(a.value="",a.className="file_input_textbox")}function wfu_clear(e){wfu_clear_files(e);var a=document.getElementById("selectsubdir_"+e);if(a){var s=document.getElementById("selectsubdiredit_"+e),t="none"!=s.style.display;t?(a.selectedIndex=-1,s.value=""):a.selectedIndex=parseInt(document.getElementById("selectsubdirdefault_"+e).value)}for(var n=wfu_get_userdata_count(e),l=0;n>l;l++)document.getElementById("userdata_"+e+"_message_"+l).value="",document.getElementById("hiddeninput_"+e+"_userdata_"+l).value=""}function wfu_reset_message(e){var a=document.getElementById("wfu_messageblock_"+e);if(a){document.getElementById("wfu_messageblock_header_"+e).style.display="";var s=document.getElementById("wfu_messageblock_header_"+e+"_container");UploadStates[e]&&(s.innerHTML=UploadStates[e].State0),document.getElementById("wfu_messageblock_header_"+e+"_state").value="none",document.getElementById("wfu_messageblock_arrow_"+e).style.display="none",s.colSpan=3,document.getElementById("wfu_messageblock_subheader_"+e+"_messagelabel").innerHTML="",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessagelabel").innerHTML="",document.getElementById("wfu_messageblock_subheader_"+e).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_message").style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage").style.display="none";for(var t=wfu_get_file_ids(e),n=1;n<=t.length;n++)a.tBodies[0].removeChild(document.getElementById("wfu_messageblock_"+e+"_"+n)),a.tBodies[0].removeChild(document.getElementById("wfu_messageblock_subheader_"+e+"_"+n))}}function wfu_show_simple_progressbar(e,a){var s=document.getElementById("progressbar_"+e+"_animation"),t=document.getElementById("progressbar_"+e+"_imagesafe");s&&("progressive"==a?(s.style.width="0%",s.className="file_progress_progressive",t.style.display="none",s.style.display="block"):wfu_BrowserCaps.supportsAnimation?(s.style.width="25%",s.className="file_progress_shuffle",t.style.display="none",s.style.display="block"):(s.style.width="0%",s.className="file_progress_noanimation",s.style.display="none",t.style.display="block"),document.getElementById("wordpress_file_upload_progressbar_"+e).style.display="block")}function wfu_hide_simple_progressbar(e){var a=document.getElementById("progressbar_"+e+"_animation"),s=document.getElementById("progressbar_"+e+"_imagesafe");a&&(document.getElementById("wordpress_file_upload_progressbar_"+e).style.display="none",a.style.width="0%",a.className="file_progress_noanimation",s.style.display="none",a.style.display="block")}function wfu_invoke_shortcode_editor(e,a,s,t){for(var n=document.getElementsByTagName("BUTTON"),l=0,r=null,i=0;i<n.length;i++)n[i].parentNode&&n[i].parentNode.id==t+"_editor_"+e&&(r=n[i],l++);if(0!=l){if(l>1)return void alert(GlobalData.consts.same_pluginid);var o=wfu_GetHttpRequestObject();if(null!=o){r.parentNode.style.display="none",document.getElementById(t+"_overlay_"+e).style.display="block";var _=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_edit_shortcode",params[1]=new Array(2),params[1][0]="upload_id",params[1][1]=e,params[2]=new Array(2),params[2][0]="post_id",params[2][1]=a,params[3]=new Array(2),params[3][0]="post_hash",params[3][1]=s,params[4]=new Array(2),params[4][0]="shortcode_tag",params[4][1]=t;for(var d="",i=0;i<params.length;i++)d+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);o.open("POST",_,!0),o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.onreadystatechange=function(){if(4==o.readyState&&200==o.status){document.getElementById(t+"_overlay_"+e).style.display="none",r.parentNode.removeAttribute("style");var a="wfu_edit_shortcode:",s=o.responseText.indexOf(a);-1==s&&(s=o.responseText.length);var n=(o.responseText.substr(0,s),o.responseText.substr(s+a.length,o.responseText.length-s-a.length));s=n.indexOf(":");var l=n.substr(0,s);if(txt_value=n.substr(s+1,n.length-s-1),"success"==l){var i=window.open(wfu_plugin_decode_string(txt_value),"_blank");i.plugin_window=window}else"check_page_obsolete"==l&&alert(txt_value)}},o.send(d)}}}GlobalData={},UploadStates={},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=!1,wfu_Check_Browser_Capabilities();
1
+ function wfu_Initialize_Consts(e){if("undefined"==typeof GlobalData.consts){GlobalData.consts=new Object;for(var a=e.split(";"),s=0;s<a.length;s++)const_txt=a[s].split(":"),GlobalData.consts[wfu_plugin_decode_string(const_txt[0])]=wfu_plugin_decode_string(const_txt[1])}}function wfu_plugin_load_action(e){wfu_install_unload_hook();var a=document.getElementById("selectsubdiredit_"+e);a&&"none"!=a.style.display&&wfu_attach_element_handlers(a,new Function("wfu_selectsubdiredit_change("+e+");"))}function wfu_install_unload_hook(){window.onbeforeunload=wfu_unload_hook}function wfu_unload_hook(){return""!=GlobalData.UploadInProgressString&&""!=GlobalData.UploadInProgressString.trim()?GlobalData.consts.wfu_pageexit_prompt:void 0}function wfu_Check_Browser_Capabilities(){if("undefined"==typeof wfu_BrowserCaps){wfu_BrowserCaps=new Object;var e=wfu_GetHttpRequestObject();wfu_BrowserCaps.supportsAJAX=null!=e,wfu_BrowserCaps.supportsUploadProgress=!!(e&&"upload"in e&&"onprogress"in e.upload);var a=null;try{var a=new FormData}catch(s){}wfu_BrowserCaps.supportsHTML5=null!=a;var s=document.createElement("iframe");wfu_BrowserCaps.supportsIFRAME=null!=s,wfu_BrowserCaps.supportsDRAGDROP=window.FileReader?!0:!1,wfu_BrowserCaps.supportsAnimation=wfu_check_animation(),wfu_BrowserCaps.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0}}function wfu_check_animation(){var e=!1,a="animation",s="",t="Webkit Moz O ms Khtml".split(" "),n="",l=document.createElement("DIV");if(l.style.animationName&&(e=!0),e===!1)for(var r=0;r<t.length;r++)if(void 0!==l.style[t[r]+"AnimationName"]){n=t[r],a=n+"Animation",s="-"+n.toLowerCase()+"-",e=!0;break}return e}function wfu_join_strings(e){for(var a=[].slice.call(arguments),s="",t="",n=1;n<a.length;n++)t=""==s||""==a[n]?"":e,s+=t+a[n];return s}function wfu_plugin_decode_string(e){for(var a,s,t=0,n="";t<e.length;)a=parseInt(e.substr(t,2),16),s=128>a?a:224>a?((31&a)<<6)+(63&parseInt(e.substr(t+=2,2),16)):((15&a)<<12)+((63&parseInt(e.substr(t+=2,2),16))<<6)+(63&parseInt(e.substr(t+=2,2),16)),n+=String.fromCharCode(s),t+=2;return n}function wfu_plugin_encode_string(e){var a=0,s="",t="";for(a=0;a<e.length;a++)num=e.charCodeAt(a),num>=2048?num=((16773120&num|917504)<<4)+((4032&num|8192)<<2)+(63&num|128):num>=128&&(num=((65472&num|12288)<<2)+(63&num|128)),t=num.toString(16),(1==t.length||3==t.length||5==t.length)&&(t="0"+t),s+=t;return s}function wfu_randomString(e){for(var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",s=e,t="",n=0;s>n;n++){var l=Math.floor(Math.random()*a.length);t+=a.substring(l,l+1)}return t}function wfu_addEventHandler(e,a,s){e.addEventListener?e.addEventListener(a,s,!1):e.attachEvent?e.attachEvent("on"+a,s):e["on"+a]=s}function wfu_attach_element_handlers(e,a){for(var s=["DOMAttrModified","textInput","input","change","keypress","paste","focus","propertychange"],t=0;t<s.length;t++)wfu_addEventHandler(e,s[t],a)}function wfu_GetHttpRequestObject(){var e=null;try{e=new XMLHttpRequest}catch(a){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(s){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}}if(null==e&&window.createRequest)try{xmlhttp=window.createRequest()}catch(a){}return e}function wfu_filedetails_showhide(e,a,s){var t=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a)),n=document.getElementById("wfu_messageblock_arrow_"+e+"_down_"+a),l=document.getElementById("wfu_messageblock_subheader_"+e+"_"+a),r=document.getElementById("wfu_messageblock_header_"+e+"_state_"+a);s?(t.style.display="",n.style.display="none",l.style.display="",r.value=""):(t.style.display="none",n.style.display="",l.style.display="none",r.value="none")}function wfu_get_file_ids(e){for(var a=(document.getElementById("wfu_messageblock_"+e),document.getElementById("wfu_messageblock_subheader_"+e).nextSibling),s="wfu_messageblock_"+e+"_",t=[];null!=a;)1===a.nodeType&&a.id.substr(0,s.length)==s&&t.push(a.id.substr(a.id.lastIndexOf("_")+1)),a=a.nextSibling;return t}function wfu_get_filelist(e,a){a="undefined"!=typeof a?a:!0;var s=document.getElementById("upfile_"+e),t=s.files;return t||(t=s.value?[{name:s.value}]:[]),a&&"undefined"!=typeof s.filearray&&(t=s.filearray),t}function wfu_filedetails_toggle(e,a){var s=(document.getElementById("wfu_messageblock_arrow_"+e+"_"+a),document.getElementById("wfu_messageblock_arrow_"+e+"_up_"+a));wfu_filedetails_showhide(e,a,"none"==s.style.display)}function wfu_headerdetails_showhide(e,a){var s=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up")),t=document.getElementById("wfu_messageblock_arrow_"+e+"_down"),n=document.getElementById("wfu_messageblock_subheader_"+e),l=document.getElementById("wfu_messageblock_subheader_"+e+"_message"),r=document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage"),i=document.getElementById("wfu_messageblock_header_"+e+"_state"),o=wfu_get_file_ids(e);if(a){s.style.display="",t.style.display="none",("none"!=l.style.display||"none"!=r.style.display)&&(n.style.display=""),i.value="";for(var _=0;_<o.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+o[_]).style.display="",document.getElementById("wfu_messageblock_subheader_"+e+"_"+o[_]).style.display=document.getElementById("wfu_messageblock_header_"+e+"_state_"+o[_]).value}else{s.style.display="none",t.style.display="",n.style.display="none",i.value="none";for(var _=0;_<o.length;_++)document.getElementById("wfu_messageblock_"+e+"_"+o[_]).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_"+o[_]).style.display="none"}}function wfu_headerdetails_toggle(e){var a=(document.getElementById("wfu_messageblock_arrow_"+e),document.getElementById("wfu_messageblock_arrow_"+e+"_up"));wfu_headerdetails_showhide(e,"none"==a.style.display)}function wfu_selectbutton_changed(e,a){wfu_BrowserCaps.supportsAJAX&&wfu_BrowserCaps.supportsHTML5||(a=0);var s=document.getElementById("upfile_"+e),t=wfu_get_filelist(e,!1);if(1==a){"undefined"==typeof s.filearray&&(s.filearray=Array());for(var n=0;n<t.length;n++)s.filearray.push(t[n])}else"undefined"!=typeof s.filearray&&delete s.filearray;wfu_update_filename_text(e)}function wfu_selectbutton_clicked(e){var a=document.getElementById("wordpress_file_upload_message_"+e);a&&(a.style.display="none"),wfu_reset_message(e),document.getElementById("upfile_"+e).value="";var s=document.getElementById("fileName_"+e);s&&(s.value="",s.className="file_input_textbox")}function wfu_update_uploadbutton_status(e){var a=document.getElementById("upload_"+e);if(a){var s=wfu_get_filelist(e),t=s.length>0;a.disabled=!t}}function wfu_update_filename_text(e){var a=document.getElementById("fileName_"+e);if(a){for(var s=wfu_get_filelist(e),t="",n=0;n<s.length;n++)""!=t&&(t+=", "),t+=s[n].name.replace(/c:\\fakepath\\/i,"");a.value=t}}function wfu_selectsubdir_check(e){var a=document.getElementById("selectsubdir_"+e);if(!a)return!0;var s=document.getElementById("selectsubdiredit_"+e),t="none"!=s.style.display;return t&&a.selectedIndex>0&&(s.value=a.value.replace(/^\s+/,""),s.className="file_item_clean_match subfolder_autoplus_match",wfu_selectsubdiredit_change(e)),document.getElementById("hiddeninput_"+e).value=t?s.value:a.selectedIndex,!t&&0==a.selectedIndex||t&&(""==s.value||"file_item_clean_empty subfolder_autoplus_empty"==s.className)?(t?(a.className="subfolder_autoplus_dropdown_prompt",s.value="",GlobalData.FreeChangeHandler=!0,s.className="file_item_clean_prompt subfolder_autoplus_prompt",GlobalData.FreeChangeHandler=!1):a.className="file_item_clean_prompt subfolder_dropdown_prompt",!1):(a.className=t?"subfolder_autoplus_dropdown":"file_item_clean subfolder_dropdown",t&&"file_item_clean_prompt subfolder_autoplus_prompt"==s.className&&(s.className="file_item_clean subfolder_autoplus"),a.options[0].style.display="none",!0)}function wfu_selectsubdiredit_enter(e){var a=document.getElementById("selectsubdir_"+e),s=document.getElementById("selectsubdiredit_"+e);"file_item_clean_empty subfolder_autoplus_empty"==s.className&&(s.value=""),a.className="subfolder_autoplus_dropdown",s.className="file_item_clean subfolder_autoplus"}function wfu_selectsubdiredit_exit(e){var a=document.getElementById("selectsubdiredit_"+e);""==a.value&&(a.value=GlobalData.consts.wfu_subdir_typedir,a.className="file_item_clean_empty subfolder_autoplus_empty")}function wfu_selectsubdiredit_change(e){if(!GlobalData.FreeChangeHandler){var a=document.getElementById("selectsubdir_"+e),s=document.getElementById("selectsubdiredit_"+e);if("none"!=s.style.display){if("file_item_clean_empty subfolder_autoplus_empty"==s.className)return a.selectedIndex=0,void(document.getElementById("hiddeninput_"+e).value="");document.getElementById("hiddeninput_"+e).value=s.value;for(var t,n=!1,l=1;l<a.options.length;l++)t=a.options[l].value.replace(/^\s+/,"").toLowerCase(),a.options[l].style.display=s.value.length>=3?t.substr(0,s.value.length)==s.value.toLowerCase()?"block":"none":"block",a.options[l].value.replace(/^\s+/,"")==s.value&&(a.selectedIndex=l,s.className="file_item_clean_match subfolder_autoplus_match",n=!0);n||(a.selectedIndex=0,s.className="file_item_clean subfolder_autoplus")}}}function wfu_selectsubdir_disable_onoff(e,a){var s=document.getElementById("selectsubdir_"+e);if(!s)return!0;var t=document.getElementById("selectsubdiredit_"+e),n="none"!=t.style.display;s.disabled=a,n&&(t.disabled=a)}function wfu_userdata_focused(e){var a=document.getElementById(e.id.replace("_field_","_fieldwrapper_"));if("file_userdata_fieldwrapper_required_empty"==a.className){a.className="file_userdata_fieldwrapper_required";var s=document.getElementById(e.id.replace("_field_","_hint_"));s.style.display="none"}}function wfu_Redirect(e){window.location=e}function wfu_loadStart(){}function wfu_uploadProgress(e,a,s,t){t&&"undefined"==typeof this.xhr&&(console.log("total="+e.total+", loaded="+e.loaded),console.log(e));var n=GlobalData[a].xhrs[s],l=0,r=0,i=document.getElementById("progressbar_"+a+"_animation");if(e.lengthComputable){if(n.sizeloaded=e.loaded,n.size<e.total&&e.total>0){r=e.total-n.size,n.deltasize+=r,n.size+=r;for(var o=0;o<GlobalData[a].xhrs.length;o++)GlobalData[a].xhrs[o].file_id==n.file_id&&(GlobalData[a].xhrs[o].totalsize+=r)}if(i){for(var _=0,d=0,u=[],o=0;o<GlobalData[a].xhrs.length;o++)u[GlobalData[a].xhrs[o].file_id]=0;for(var o=0;o<GlobalData[a].xhrs.length;o++)u[GlobalData[a].xhrs[o].file_id]=Math.max(GlobalData[a].xhrs[o].totalsize,u[GlobalData[a].xhrs[o].file_id]);for(var o=0;o<u.length;o++)"undefined"!=typeof u[o]&&(_+=u[o]);for(var o=0;o<GlobalData[a].xhrs.length;o++)d+=GlobalData[a].xhrs[o].sizeloaded;l=Math.round(100*d/_),i.style.width=l.toString()+"%"}}else i&&(i.style.width="0%")}function wfu_notify_WPFilebase(e,a){var s=wfu_GetHttpRequestObject();if(null==s){var t=document.createElement("iframe");return t.style.display="none",t.src=GlobalData.consts.ajax_url+"?action=wfu_ajax_action_notify_wpfilebase&params_index="+e+"&session_token="+a,void document.body.appendChild(t)}var n=GlobalData.consts.ajax_url;params=new Array(3),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_notify_wpfilebase",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=e,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=a;for(var l="",t=0;t<params.length;t++)l+=(t>0?"&":"")+params[t][0]+"="+encodeURI(params[t][1]);s.open("POST",n,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){},s.send(l)}function wfu_send_email_notification(e,a,s,t,n,l,r,i,o){var _=wfu_GetHttpRequestObject();if(null!=_){var d=GlobalData.consts.ajax_url,u=wfu_get_userdata_count(e);params=new Array(7+u),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_send_email_notification",params[1]=new Array(2),params[1][0]="params_index",params[1][1]=s,params[2]=new Array(2),params[2][0]="session_token",params[2][1]=t,params[3]=new Array(2),params[3][0]="only_filename_list",params[3][1]=n,params[4]=new Array(2),params[4][0]="target_path_list",params[4][1]=l,params[5]=new Array(2),params[5][0]="attachment_list",params[5][1]=r,params[6]=new Array(2),params[6][0]="uniqueuploadid_"+e,params[6][1]=a;for(var m=0;u>m;m++)params[7+m]=new Array(2),params[7+m][0]="userdata_"+m,params[7+m][1]=wfu_plugin_encode_string(document.getElementById("hiddeninput_"+e+"_userdata_"+m).value);for(var c="",m=0;m<params.length;m++)c+=(m>0?"&":"")+params[m][0]+"="+encodeURI(params[m][1]);var f=new Date;_.xhrid=-1,_.shortcode_id=e,_.requesttype="email",_.file_id=0,_.loading=!1,_.aborted=!1,_.unique_id=a,_.debugmode=i,_.is_admin=o,_.params_index=s,_.session_token=t,_.start_time=f.getTime(),_.end_time=_.start_time,_.finish_time=_.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),_.fail_colors=GlobalData.consts.fail_colors,_.error_message_header="",_.error_message_failed=GlobalData.consts.message_failed,_.error_message_cancelled=GlobalData.consts.message_cancelled,_.error_adminmessage_unknown="",_.open("POST",d,!0),_.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_.addEventListener("load",wfu_uploadComplete,!1),_.addEventListener("error",wfu_uploadFailed,!1),_.addEventListener("abort",wfu_uploadCanceled,!1),_.send(c)}}function wfu_format_debug_data(e,a){return output='<label class="file_messageblock_subheader_debugmessage_label">',output+="Debug Data"+a,output+="</label>",output+='<div class="file_messageblock_subheader_debugmessage_container">',output+=e,output+="</div>"}function wfu_uploadComplete(e){var a=new Date,s=this.shortcode_id,t=(this.file_id,!1),n="",l="",r="",i="unknown",o="",_="",d="wfu_fileupload_success:";this.loading=!1,this.end_time=a.getTime();var u=e.target.responseText,m=u,c="error";if(-1!=u&&u.indexOf("force_errorabort_code")>-1&&(c="errorabort",u=u.replace("force_errorabort_code","")),-1!=u){var f=u.indexOf(d);if(f>-1&&("true"==this.debugmode&&(_=u.substr(0,f)),m=u.substr(f+d.length),f=m.indexOf(":"),n=m.substr(0,f),m=m.substr(f+1),f=m.indexOf(":"),r=m.substr(0,f),l=m.substr(f+1)),""!=_){var p="";"fileupload"==this.requesttype?p=" - File: "+this.file_id:"email"==this.requesttype&&(p=" - Email Notification"),_=wfu_format_debug_data(_,p)}if(""!=r){var g=r.split(";");if(1==parseInt(g[2])){var b=g[3].split(",");i=wfu_plugin_decode_string(b[0]),o=b[4]}}}if(""==l||""==r){var y=this.fail_colors.split(","),w=wfu_Initialize_Params();w.general.shortcode_id=s,w.general.unique_id=this.unique_id,w.general.state=7,w.general.files_count="fileupload"==this.requesttype?1:0,w.general.upload_finish_time=this.finish_time,w.general.fail_message=GlobalData.consts.message_unknown,w.general.fail_admin_message=wfu_join_strings("<br />",this.error_adminmessage_unknown,this.requesttype+":"+m),w.general.files_count>0?(w[0]={},w[0].color=y[0],w[0].bgcolor=y[1],w[0].borcolor=y[2],w[0].message_type=c,i=c,w[0].header=this.error_message_header,w[0].message=GlobalData.consts.message_timelimit,w[0].admin_messages="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:""):w.general.admin_messages.other="true"==this.is_admin?GlobalData.consts.message_admin_timelimit:"",w.general.upload_finish_time>0&&a.getTime()<w.general.upload_finish_time&&(w.general.files_count>0?(w[0].message=w.general.fail_message,w[0].admin_messages="true"==this.is_admin?w.general.fail_admin_message:""):w.general.admin_messages.other="true"==this.is_admin?w.general.fail_admin_message:"")}return t=""==l||""==r?wfu_ProcessUploadComplete(s,this.file_id,w,this.unique_id,this.params_index,this.session_token,"",[this.debugmode,_,this.is_admin],this.requesttype,""):wfu_ProcessUploadComplete(s,this.file_id,l,this.unique_id,this.params_index,this.session_token,r,[this.debugmode,_,this.is_admin],this.requesttype,n),t&&(wfu_unlock_upload(e.target.shortcode_id),wfu_hide_simple_progressbar(s),wfu_clear(e.target.shortcode_id)),e.target.return_status?i:void 0}function wfu_ProcessUploadComplete(sid,file_id,upload_params,unique_id,params_index,session_token,safe_output,debug_data,request_type,js_script_enc){if(sid&&!(0>sid)&&null!=upload_params&&""!=upload_params&&""!=unique_id&&("no-ajax"==unique_id||GlobalData[sid])){var do_redirect=!1;if("string"==typeof upload_params){upload_params=wfu_plugin_decode_string(upload_params.replace(/^\s+|\s+$/g,""));var Params=null;try{Params=JSON.parse(upload_params)}catch(e){}if(null==Params){var safe_parts=safe_output.split(";");Params=wfu_Initialize_Params(),Params.general.shortcode_id=sid,Params.general.unique_id=unique_id,Params.general.state=safe_parts[0],4==Params.general.state&&Params.general.state++;var default_colors=safe_parts[1].split(","),filedata="",error_jsonparse_filemessage=GlobalData.consts.jsonparse_filemessage,error_jsonparse_message=GlobalData.consts.jsonparse_message,error_jsonparse_adminmessage=GlobalData.consts.jsonparse_adminmessage;Params.general.files_count=parseInt(safe_parts[2]);for(var i=0;i<Params.general.files_count;i++)Params[i]={},Params[i].color=default_colors[0],Params[i].bgcolor=default_colors[1],Params[i].borcolor=default_colors[2],filedata=safe_parts[i+3].split(","),Params[i].message_type=wfu_plugin_decode_string(filedata[0]),Params[i].header=wfu_plugin_decode_string(filedata[1]),"success"==Params[i].message_type&&(Params[i].header+=error_jsonparse_filemessage,Params[i].message_type="warning"),Params[i].message=wfu_join_strings("<br />",error_jsonparse_message,wfu_plugin_decode_string(filedata[2])),Params[i].admin_messages=wfu_join_strings("<br />",error_jsonparse_adminmessage,wfu_plugin_decode_string(filedata[3]))}}else{if("object"!=typeof upload_params)return;var Params=upload_params}for(i=0;Params[i];)Params[i].message_type&&"error"==Params[i].message_type.substr(0,5)&&(Params[i].message_type=Params[i].message_type.substr(0,5)),i++;var message_table=document.getElementById("wfu_messageblock_"+sid),UploadStates_Ok=!0;if(!UploadStates[sid]&&message_table){var upload_states=document.getElementById("wfu_messageblock_header_"+sid+"_states").value;upload_states=wfu_plugin_decode_string(upload_states.replace(/^\s+|\s+$/g,"")),UploadStates[sid]=null;try{UploadStates[sid]=JSON.parse(upload_states)}catch(e){}null==UploadStates[sid]&&(UploadStates_Ok=!1)}GlobalData[sid]||(GlobalData[sid]=Object());var G=GlobalData[sid];if("no-ajax"==unique_id)G.last=!1,G.unique_id="",G.files_count=Params.general.files_count,0==Params.general.state&&(Params.general.files_count=0),G.files_processed=Params.general.files_count,G.upload_state=UploadStates_Ok?Params.general.state:10,G.message=Params.general.message,G.update_wpfilebase=Params.general.update_wpfilebase,G.redirect_link=Params.general.redirect_link,G.notify_only_filename_list="",G.notify_target_path_list="",G.notify_attachment_list="",G.admin_messages={},G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase,G.admin_messages.notify=Params.general.admin_messages.notify,G.admin_messages.redirect=Params.general.admin_messages.redirect,G.admin_messages.debug=debug_data[1],G.admin_messages.other=Params.general.admin_messages.other,G.errors={},G.errors.wpfilebase=Params.general.errors.wpfilebase,G.errors.notify=Params.general.errors.notify,G.errors.redirect=Params.general.errors.redirect,G.current_size=0,G.total_size=0;else{if(""==G.unique_id||G.unique_id!=unique_id||G.unique_id!=Params.general.unique_id)return;if(G.last)return;0==Params.general.files_count&&Params[0]&&"error"==Params[0].message_type&&(Params.general.files_count=1);for(var file_status="",i=0;i<Params.general.files_count;i++)file_status="error"==Params[i].message_type&&0==G.files_processed?"error1":"error"==Params[i].message_type&&G.files_processed>0?"error2":Params[i].message_type,G.upload_state=GlobalData.filestatematch[file_status][G.upload_state];UploadStates_Ok||(G.upload_state=10),G.files_processed+=Params.general.files_count,G.message=wfu_join_strings("<br />",G.message,Params.general.message),""==G.update_wpfilebase&&(G.update_wpfilebase=Params.general.update_wpfilebase),(!request_type||request_type&&"email"!=request_type)&&(G.redirect_link=Params.general.redirect_link),G.notify_only_filename_list=wfu_join_strings(", ",G.notify_only_filename_list,Params.general.notify_only_filename_list),G.notify_target_path_list=wfu_join_strings(", ",G.notify_target_path_list,Params.general.notify_target_path_list),G.notify_attachment_list=wfu_join_strings(",",G.notify_attachment_list,Params.general.notify_attachment_list),G.admin_messages.debug=wfu_join_strings("<br />",G.admin_messages.debug,debug_data[1]),G.admin_messages.other=wfu_join_strings("<br />",G.admin_messages.other,Params.general.admin_messages.other),""==G.admin_messages.wpfilebase&&(G.admin_messages.wpfilebase=Params.general.admin_messages.wpfilebase),""==G.admin_messages.notify&&(G.admin_messages.notify=Params.general.admin_messages.notify),""==G.admin_messages.redirect&&(G.admin_messages.redirect=Params.general.admin_messages.redirect),""==G.errors.wpfilebase&&(G.errors.wpfilebase=Params.general.errors.wpfilebase),""==G.errors.notify&&(G.errors.notify=Params.general.errors.notify),""==G.errors.redirect&&(G.errors.redirect=Params.general.errors.redirect)}G.files_processed==G.files_count&&(G.last=!0,""!=G.update_wpfilebase&&(G.admin_messages.wpfilebase="",wfu_notify_WPFilebase(params_index,session_token)),""!=G.notify_only_filename_list&&(G.admin_messages.notify="",wfu_send_email_notification(sid,unique_id,params_index,session_token,G.notify_only_filename_list,G.notify_target_path_list,G.notify_attachment_list,debug_data[0],debug_data[2]),G.last=!1,G.notify_only_filename_list=""),G.last&&("no-ajax"!=unique_id&&wfu_notify_server_upload_ended(sid,unique_id,params_index,session_token),GlobalData.UploadInProgressString=GlobalData.UploadInProgressString.replace(new RegExp("\\["+unique_id+"\\]","g"),"")),""!=G.errors.redirect&&(G.redirect_link=""),""!=G.redirect_link&&G.last&&""==GlobalData.UploadInProgressString.trim()&&(G.upload_state=11,do_redirect=!0));var nonadmin_message=G.message,admin_message=wfu_join_strings("<br />",G.admin_messages.other,G.admin_messages.wpfilebase,G.admin_messages.notify,G.admin_messages.redirect,G.admin_messages.debug);if(!UploadStates_Ok){var error_jsonparse_headermessage=GlobalData.consts.jsonparse_headermessage,error_jsonparse_headeradminmessage=GlobalData.consts.jsonparse_headeradminmessage;nonadmin_message=wfu_join_strings("<br />",error_jsonparse_headermessage,nonadmin_message),admin_message=wfu_join_strings("<br />",error_jsonparse_headeradminmessage,admin_message)}if(G.last){0==G.files_count?G.upload_state=8:G.upload_state<4&&(G.upload_state+=4);var admin_messages_exist=""!=G.admin_messages.wpfilebase||""!=G.admin_messages.notify||""!=G.admin_messages.redirect||""!=G.admin_messages.other;4==G.upload_state&&""!=admin_message?G.upload_state++:5==G.upload_state&&""==!admin_message&&""==nonadmin_message&&G.upload_state--}if(message_table){var subheader_state=document.getElementById("wfu_messageblock_header_"+sid+"_state"),single_file_shown=1==G.files_count&&""==nonadmin_message&&""==admin_message&&G.last&&!do_redirect;if(single_file_shown)document.getElementById("wfu_messageblock_header_"+sid).style.display="none";else{document.getElementById("wfu_messageblock_header_"+sid).style.display="";var header_container=document.getElementById("wfu_messageblock_header_"+sid+"_container");if(UploadStates_Ok){var suffix="";1!=G.files_count||5!=G.upload_state&&7!=G.upload_state||(suffix="_singlefile"),header_container.innerHTML=UploadStates[sid]["State"+G.upload_state+suffix]}else{header_container.innerHTML="";var safe_container=document.getElementById("wfu_messageblock_header_"+sid+"_safecontainer");header_container.innerHTML=safe_container.innerHTML.replace(/_safe/g,"")}var subheader_show=!1;""!=nonadmin_message?(document.getElementById("wfu_messageblock_subheader_"+sid+"_message").style.display="",document.getElementById("wfu_messageblock_subheader_"+sid+"_messagelabel").innerHTML=nonadmin_message,subheader_show=!0):document.getElementById("wfu_messageblock_subheader_"+sid+"_message").style.display="none",""!=admin_message?(document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage").style.display="",document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessagelabel").innerHTML=admin_message,subheader_show=!0):document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage").style.display="none",document.getElementById("wfu_messageblock_subheader_"+sid).style.display=subheader_show?subheader_state.value:"none",subheader_show||G.files_processed>0?(header_container.colSpan=2,document.getElementById("wfu_messageblock_arrow_"+sid).style.display=""):(document.getElementById("wfu_messageblock_arrow_"+sid).style.display="none",header_container.colSpan=3)}for(var next_block=document.getElementById("wfu_messageblock_subheader_"+sid),next_block_id=0,file_block=null,file_template_container=document.getElementById("wfu_messageblock_"+sid+"_filetemplate"),file_contents="",door=document.getElementById("wfu_messageblock_"+sid+"_door"),ii=0,headerspan=1,subheaderspan=2,file_template=wfu_plugin_decode_string(file_template_container.value.replace(/^\s+|\s+$/g,"")),i=0;i<Params.general.files_count;i++){for(ii=i+file_id,file_contents=file_template.replace(/\[file_id\]/g,ii),file_contents=file_contents.replace(/\[filenumber_display\]/g,""),file_contents=file_contents.replace(/\[fileheader_color\]/g,Params[i].color),file_contents=file_contents.replace(/\[fileheader_bgcolor\]/g,Params[i].bgcolor),file_contents=file_contents.replace(/\[fileheader_borcolor\]/g,Params[i].borcolor),file_contents=file_contents.replace(/\[fileheader_message\]/g,Params[i].header),file_contents=file_contents.replace(/\[filesubheadermessage_display\]/g,'style="display:none;"'),file_contents=file_contents.replace(/\[filesubheader_message\]/g,Params[i].message),file_contents=file_contents.replace(/\[filesubheaderadminmessage_display\]/g,'style="display:none;"'),file_contents=file_contents.replace(/\[filesubheader_adminmessage\]/g,Params[i].admin_messages),file_contents="<table><tbody>"+file_contents+"</tbody></table>",door.innerHTML=file_contents,headerspan=1,subheaderspan=2,subheader_show=!1,file_block=document.getElementById("wfu_messageblock_"+sid+"_"+ii),1==G.files_count?(document.getElementById("wfu_messageblock_"+sid+"_filenumber_"+ii).style.display="none",document.getElementById("wfu_messageblock_subheader_"+sid+"_fileempty_"+ii).style.display="none",file_block.style.display=single_file_shown?"":subheader_state.value,headerspan++,subheaderspan++):file_block.style.display=subheader_state.value,""!=Params[i].message&&(document.getElementById("wfu_messageblock_subheader_"+sid+"_message_"+ii).style.display="",subheader_show=!0),""!=Params[i].admin_messages&&(document.getElementById("wfu_messageblock_subheader_"+sid+"_adminmessage_"+ii).style.display="",subheader_show=!0),subheader_show||(document.getElementById("wfu_messageblock_arrow_"+sid+"_"+ii).style.display="none",headerspan++),document.getElementById("wfu_messageblock_header_"+sid+"_container_"+ii).colSpan=headerspan,document.getElementById("wfu_messageblock_subheader_"+sid+"_container_"+ii).colSpan=subheaderspan;ii>next_block_id&&(next_block=next_block.nextSibling,null!=next_block);)1===next_block.nodeType&&(next_block_id=next_block.id.substr(next_block.id.lastIndexOf("_")+1));message_table.tBodies[0].insertBefore(file_block,next_block),next_block=file_block.nextSibling,file_block=document.getElementById("wfu_messageblock_subheader_"+sid+"_"+ii),message_table.tBodies[0].insertBefore(file_block,next_block),next_block=file_block,next_block_id=ii}single_file_shown&&(document.getElementById("wfu_messageblock_"+sid+"_1").style.display=""),message_table.style.display="",document.getElementById("wordpress_file_upload_message_"+sid).style.display=""}return js_script_enc&&eval(wfu_plugin_decode_string(js_script_enc)),do_redirect&&wfu_Redirect(G.redirect_link),G.last}}function wfu_uploadFailed(e,a){a&&(console.log("failure report following"),console.log(e));var s=e.target,t={target:{responseText:"",shortcode_id:s.shortcode_id}};wfu_uploadComplete.call(s,t)}function wfu_uploadCanceled(){}function wfu_notify_server_upload_ended(e,a,s,t){var n=wfu_GetHttpRequestObject();if(null!=n){var l=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action",params[1]=new Array(2),params[1][0]="uniqueuploadid_"+e,params[1][1]=a,params[2]=new Array(2),params[2][0]="params_index",params[2][1]=s,params[3]=new Array(2),params[3][0]="session_token",params[3][1]=t,params[4]=new Array(2),params[4][0]="upload_finished",params[4][1]=1;for(var r="",i=0;i<params.length;i++)r+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);n.open("POST",l,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){4==n.readyState&&200==n.status},n.send(r)}}function wfu_Initialize_Params(){var e={};return e.version="full",e.general={},e.general.shortcode_id=0,e.general.unique_id="",e.general.state=0,e.general.files_count=0,e.general.update_wpfilebase="",e.general.redirect_link="",e.general.upload_finish_time=0,e.general.message="",e.general.message_type="",e.general.admin_messages={},e.general.admin_messages.wpfilebase="",e.general.admin_messages.notify="",e.general.admin_messages.redirect="",e.general.admin_messages.other="",e.general.errors={},e.general.errors.wpfilebase="",e.general.errors.notify="",e.general.errors.redirect="",e.general.color="",e.general.bgcolor="",e.general.borcolor="",e.general.notify_only_filename_list="",e.general.notify_target_path_list="",e.general.notify_attachment_list="",e.general.fail_message="",e.general.fail_admin_message="",e}function wfu_redirect_to_classic(e,a,s,t){0!=wfu_filesselected(e)&&wfu_selectsubdir_check(e)&&wfu_check_required_userdata(e,!0)&&wfu_redirect_to_classic_cont(e,a,s,t,[""])}function wfu_redirect_to_classic_cont(e,a,s,t){var n=function(n){if(n.indexOf("wfu_response_success:")>-1){var l=wfu_Initialize_Params();if(l.general.shortcode_id=e,l.general.unique_id="",l.general.files_count=wfu_filesselected(e),wfu_ProcessUploadComplete(e,0,l,"no-ajax","",a,"",["false","","false"]),1==s){var r="";document.getElementById("upfile_"+e).name="uploadedfile_"+e+"_redirected"+r}document.getElementById("adminerrorcodes_"+e).value=t>0?t:"",document.getElementById("upfile_"+e).disabled=!1,document.getElementById("uniqueuploadid_"+e).value=wfu_randomString(10),document.getElementById("uploadform_"+e).submit()}},l="",r=new Date,i=GlobalData.consts.ajax_url+"?action=wfu_ajax_action&sid="+e+"&start_time="+r.getTime()+"&session_token="+a+l;wfu_lock_upload(e);var o=wfu_GetHttpRequestObject();if(null==o){var _=document.createElement("iframe");return _?(_.style.display="none",_.src=i,document.body.appendChild(_),void(_.onload=function(){n(_.contentDocument.body.innerHTML)})):void 0}o.open("GET",i,!0),o.onreadystatechange=function(){4==o.readyState&&200==o.status&&n(o.responseText)},o.send(null)}function wfu_filesselected(e){var a=document.getElementById("fileName_"+e),s=wfu_get_filelist(e);return 0==s.length&&a&&(a.value=GlobalData.consts.nofilemessage,a.className="file_input_textbox_nofile"),s.length}function wfu_check_required_userdata(e,a){for(var s=wfu_get_userdata_count(e),t=!1,n=0;s>n;n++){var l=document.getElementById("hiddeninput_"+e+"_userdata_"+n),r=document.getElementById("userdata_"+e+"_fieldwrapper_"+n),i=document.getElementById("userdata_"+e+"_field_"+n),o=document.getElementById("userdata_"+e+"_"+n),_=document.getElementById("userdata_"+e+"_hint_"+n);l.value=window["userdata_"+e+"_codes_"+n].value(i);for(var d={hintposition:"none"},u=document.getElementById("userdata_"+e+"_props_"+n).value.split("|"),m=0;m<u.length;m++)"p:"==u[m].substr(0,2)&&(d.hintposition=u[m].substr(2));var c="";if("file_userdata_fieldwrapper_required"==r.className.substr(0,35)&&(c=window["userdata_"+e+"_codes_"+n].empty(l)),""===c&&window["userdata_"+e+"_codes_"+n].validate&&(c=window["userdata_"+e+"_codes_"+n].validate(l)),""!==c){if(a)if("none"==d.hintposition)_.className="file_userdata_hint_none";
2
+ else{r.className="file_userdata_fieldwrapper_required_empty";var f=o.getBoundingClientRect(),p=r.getBoundingClientRect();"inline"==d.hintposition?(_.className="file_userdata_hint_inline",_.style.left=parseInt(p.left-f.left)+"px",_.style.top=parseInt(p.top-f.top)+"px",_.style.right=parseInt(f.right-p.right)+"px",_.style.bottom=parseInt(f.bottom-p.bottom)+"px"):"top"==d.hintposition?(_.className="file_userdata_hint_top",_.style.left=parseInt(p.left-f.left)+"px",_.style.bottom=parseInt(f.bottom-p.top)+"px"):"right"==d.hintposition?(_.className="file_userdata_hint_right",_.style.left=parseInt(p.right-f.left)+"px",_.style.top=parseInt(p.top-f.top)+"px"):"bottom"==d.hintposition?(_.className="file_userdata_hint_bottom",_.style.left=parseInt(p.left-f.left)+"px",_.style.top=parseInt(p.bottom-f.top)+"px"):"left"==d.hintposition&&(_.className="file_userdata_hint_left",_.style.right=parseInt(f.right-p.left)+"px",_.style.top=parseInt(p.top-f.top)+"px"),_.innerHTML=c,_.style.display="block"}t=!0}}return!t}function wfu_HTML5UploadFile(e,a,s){if(!wfu_BrowserCaps.supportsAJAX)return void wfu_redirect_to_classic(e,s,1,1);if(!wfu_BrowserCaps.supportsHTML5)return void wfu_redirect_to_classic(e,s,1,2);a=wfu_plugin_decode_string(a.replace(/^\s+|\s+$/g,""));var t=null;try{t=JSON.parse(a)}catch(n){}if(null==t)return void wfu_redirect_to_classic(e,s,1,3);var l=wfu_GetHttpRequestObject();if(null!=l){var r=wfu_filesselected(e);if(0!=r){var i=document.getElementById("upload_"+e),o=!i;if(!wfu_selectsubdir_check(e))return void(o&&wfu_clear_files(e));var _=r;return _+=_,wfu_check_required_userdata(e,!0)?void wfu_HTML5UploadFile_cont(e,t,s,[""]):void(o&&wfu_clear_files(e))}}}function wfu_HTML5UploadFile_cont(e,a,s){function t(l,r,i,m){f=!0;var p=wfu_GetHttpRequestObject(),g=wfu_GetHttpRequestObject();if(null!=p&&null!=g){var b=null,y=null;try{var b=new FormData,y=new FormData}catch(w){}if(null!=b&&null!=y){i||b.append("uploadedfile_"+e+_,r),b.append("uploadedfile_"+e+"_index",l),b.append("uploadedfile_"+e+"_name",wfu_plugin_encode_string(o[l].name)),b.append("uploadedfile_"+e+"_size",o[l].size),b.append("action","wfu_ajax_action"),b.append("uniqueuploadid_"+e,u),b.append("params_index",a.params_index),b.append("subdir_sel_index",n),i?b.append("only_check","1"):b.append("only_check","0"),b.append("session_token",s),b.append("unique_id",d);for(var h=wfu_get_userdata_count(e),v=0;h>v;v++)b.append("hiddeninput_"+e+"_userdata_"+v,document.getElementById("hiddeninput_"+e+"_userdata_"+v).value);var G=GlobalData[e].xhrs.push(p)-1,I=new Date;if(p.xhrid=G,p.shortcode_id=e,p.requesttype="fileupload",p.file_id=l+1,i?(p.size=0,p.totalsize=0,p.loading=!1):(p.size=r.size,p.totalsize=o[l].size,p.loading=!0),p.deltasize=0,p.sizeloaded=0,p.aborted=!1,p.unique_id=u,p.params_index=a.params_index,p.session_token=s,p.debugmode=a.debugmode,p.is_admin=a.is_admin,p.start_time=I.getTime(),p.end_time=p.start_time,p.finish_time=p.start_time+1e3*parseInt(GlobalData.consts.max_time_limit),p.fail_colors=a.fail_colors,p.error_message_header=a.error_header.replace(/%username%/g,"no data"),p.error_message_header=p.error_message_header.replace(/%useremail%/g,"no data"),p.error_message_header=p.error_message_header.replace(/%filename%/g,o[l].name),p.error_message_header=p.error_message_header.replace(/%filepath%/g,o[l].name),p.error_message_failed=GlobalData.consts.message_failed,p.error_message_cancelled=GlobalData.consts.message_cancelled,p.error_adminmessage_unknown=GlobalData.consts.adminmessage_unknown.replace(/%username%/g,"no data"),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%useremail%/g,"no data"),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%filename%/g,o[l].name),p.error_adminmessage_unknown=p.error_adminmessage_unknown.replace(/%filepath%/g,o[l].name),m){y.append("action","wfu_ajax_action"),y.append("params_index",a.params_index),y.append("session_token",s),y.append("force_connection_close","1"),g.open("POST",GlobalData.consts.ajax_url,!1);try{g.send(y)}catch(k){}f="success"==g.responseText}if(f)i?(p.addEventListener("load",function(a){a={target:{responseText:a.target.responseText,shortcode_id:e,return_status:!0}};var s=wfu_uploadComplete.call(p,a);f="success"==s||"warning"==s,f&&t(l,r,!1,!1)},!1),p.addEventListener("error",function(){},!1),p.open("POST",GlobalData.consts.ajax_url,!0),p.send(b)):(p.upload.xhr=p,p.upload.dummy=1,p.upload.addEventListener("loadstart",wfu_loadStart,!1),p.upload.addEventListener("progress",new Function("evt","wfu_uploadProgress(evt, "+e+", "+G+", "+a.debugmode+");"),!1),p.addEventListener("load",wfu_uploadComplete,!1),p.addEventListener("error",new Function("evt","wfu_uploadFailed(evt, "+a.debugmode+");"),!1),p.addEventListener("abort",wfu_uploadCanceled,!1),p.open("POST",GlobalData.consts.ajax_url,!0),p.send(b));else{var B={target:{responseText:"",shortcode_id:e}};wfu_uploadComplete.call(p,B)}return c++,f}}}var n=-1,l=document.getElementById("selectsubdir_"+e);if(l){var r=document.getElementById("selectsubdiredit_"+e),i="none"!=r.style.display;n=i?r.value:l.selectedIndex}var o=wfu_get_filelist(e),_="",d=wfu_randomString(10),u=d;GlobalData.UploadInProgressString+="["+u+"]",GlobalData[e]={},GlobalData[e].unique_id=u,GlobalData[e].last=!1,GlobalData[e].files_count=1,GlobalData[e].files_processed=0,GlobalData[e].upload_state=0,GlobalData[e].message="",GlobalData[e].update_wpfilebase="",GlobalData[e].redirect_link="",GlobalData[e].notify_only_filename_list="",GlobalData[e].notify_target_path_list="",GlobalData[e].notify_attachment_list="",GlobalData[e].admin_messages={},GlobalData[e].admin_messages.wpfilebase="",GlobalData[e].admin_messages.notify="",GlobalData[e].admin_messages.redirect="",GlobalData[e].admin_messages.debug="",GlobalData[e].admin_messages.other="",GlobalData[e].errors={},GlobalData[e].errors.wpfilebase="",GlobalData[e].errors.notify="",GlobalData[e].errors.redirect="",GlobalData[e].xhrs=Array(),wfu_show_simple_progressbar(a.shortcode_id,"progressive");var m=wfu_Initialize_Params();m.general.shortcode_id=e,m.general.unique_id=u,wfu_ProcessUploadComplete(e,0,m,u,a.params_index,s,"",["false","","false"]);var c=0,f=!0,p=0;t(p,o[p],!0,!1)}function wfu_get_userdata_count(e){for(var a=0;document.getElementById("userdata_"+e+"_"+a);)a++;return a}function wfu_lock_upload(e){var a=document.getElementById("fileName_"+e);a&&(a.disabled=!0),document.getElementById("input_"+e).disabled=!0,document.getElementById("upfile_"+e).disabled=!0,wfu_selectsubdir_disable_onoff(e,!0);var s=document.getElementById("upload_"+e);s&&(s.disabled=!0);for(var t=wfu_get_userdata_count(e),n=0;t>n;n++)window["userdata_"+e+"_codes_"+n].lock(document.getElementById("userdata_"+e+"_field_"+n))}function wfu_unlock_upload(e){var a=document.getElementById("fileName_"+e);a&&(a.disabled=!1),document.getElementById("input_"+e).disabled=!1,document.getElementById("upfile_"+e).disabled=!1,wfu_selectsubdir_disable_onoff(e,!1);var s=document.getElementById("upload_"+e);s&&(s.disabled=!1);for(var t=wfu_get_userdata_count(e),n=0;t>n;n++)window["userdata_"+e+"_codes_"+n].unlock(document.getElementById("userdata_"+e+"_field_"+n))}function wfu_clear_files(e){document.getElementById("uploadform_"+e).reset();var a=document.getElementById("fileName_"+e);a&&(a.value="",a.className="file_input_textbox")}function wfu_clear(e){wfu_clear_files(e);var a=document.getElementById("selectsubdir_"+e);if(a){var s=document.getElementById("selectsubdiredit_"+e),t="none"!=s.style.display;t?(a.selectedIndex=-1,s.value=""):a.selectedIndex=parseInt(document.getElementById("selectsubdirdefault_"+e).value)}for(var n=wfu_get_userdata_count(e),l=0;n>l;l++)window["userdata_"+e+"_codes_"+l].reset(document.getElementById("userdata_"+e+"_field_"+l),document.getElementById("hiddeninput_"+e+"_userdata_"+l))}function wfu_reset_message(e){var a=document.getElementById("wfu_messageblock_"+e);if(a){document.getElementById("wfu_messageblock_header_"+e).style.display="";var s=document.getElementById("wfu_messageblock_header_"+e+"_container");UploadStates[e]&&(s.innerHTML=UploadStates[e].State0),document.getElementById("wfu_messageblock_header_"+e+"_state").value="none",document.getElementById("wfu_messageblock_arrow_"+e).style.display="none",s.colSpan=3,document.getElementById("wfu_messageblock_subheader_"+e+"_messagelabel").innerHTML="",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessagelabel").innerHTML="",document.getElementById("wfu_messageblock_subheader_"+e).style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_message").style.display="none",document.getElementById("wfu_messageblock_subheader_"+e+"_adminmessage").style.display="none";for(var t=wfu_get_file_ids(e),n=1;n<=t.length;n++)a.tBodies[0].removeChild(document.getElementById("wfu_messageblock_"+e+"_"+n)),a.tBodies[0].removeChild(document.getElementById("wfu_messageblock_subheader_"+e+"_"+n))}}function wfu_show_simple_progressbar(e,a){var s=document.getElementById("progressbar_"+e+"_animation"),t=document.getElementById("progressbar_"+e+"_imagesafe");s&&("progressive"==a?(s.style.width="0%",s.className="file_progress_progressive",t.style.display="none",s.style.display="block"):wfu_BrowserCaps.supportsAnimation?(s.style.width="25%",s.className="file_progress_shuffle",t.style.display="none",s.style.display="block"):(s.style.width="0%",s.className="file_progress_noanimation",s.style.display="none",t.style.display="block"),document.getElementById("wordpress_file_upload_progressbar_"+e).style.display="block")}function wfu_hide_simple_progressbar(e){var a=document.getElementById("progressbar_"+e+"_animation"),s=document.getElementById("progressbar_"+e+"_imagesafe");a&&(document.getElementById("wordpress_file_upload_progressbar_"+e).style.display="none",a.style.width="0%",a.className="file_progress_noanimation",s.style.display="none",a.style.display="block")}function wfu_invoke_shortcode_editor(e,a,s,t){for(var n=document.getElementsByTagName("BUTTON"),l=0,r=null,i=0;i<n.length;i++)n[i].parentNode&&n[i].parentNode.id==t+"_editor_"+e&&(r=n[i],l++);if(0!=l){if(l>1)return void alert(GlobalData.consts.same_pluginid);var o=wfu_GetHttpRequestObject();if(null!=o){r.parentNode.style.display="none",document.getElementById(t+"_overlay_"+e).style.display="block";var _=GlobalData.consts.ajax_url;params=new Array(5),params[0]=new Array(2),params[0][0]="action",params[0][1]="wfu_ajax_action_edit_shortcode",params[1]=new Array(2),params[1][0]="upload_id",params[1][1]=e,params[2]=new Array(2),params[2][0]="post_id",params[2][1]=a,params[3]=new Array(2),params[3][0]="post_hash",params[3][1]=s,params[4]=new Array(2),params[4][0]="shortcode_tag",params[4][1]=t;for(var d="",i=0;i<params.length;i++)d+=(i>0?"&":"")+params[i][0]+"="+encodeURI(params[i][1]);o.open("POST",_,!0),o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.onreadystatechange=function(){if(4==o.readyState&&200==o.status){document.getElementById(t+"_overlay_"+e).style.display="none",r.parentNode.removeAttribute("style");var a="wfu_edit_shortcode:",s=o.responseText.indexOf(a);-1==s&&(s=o.responseText.length);var n=(o.responseText.substr(0,s),o.responseText.substr(s+a.length,o.responseText.length-s-a.length));s=n.indexOf(":");var l=n.substr(0,s);if(txt_value=n.substr(s+1,n.length-s-1),"success"==l){var i=window.open(wfu_plugin_decode_string(txt_value),"_blank");i?i.plugin_window=window:alert(GlobalData.consts.enable_popups)}else"check_page_obsolete"==l&&alert(txt_value)}},o.send(d)}}}GlobalData={},UploadStates={},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=!1,wfu_Check_Browser_Capabilities();
languages/wordpress-file-upload-de_DE.mo CHANGED
Binary file
languages/wordpress-file-upload-de_DE.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-06-25 14:29+0200\n"
6
- "PO-Revision-Date: 2015-06-25 14:30+0200\n"
7
  "Last-Translator: nickboss <info@iptanus.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: de_DE\n"
@@ -294,10 +294,51 @@ msgstr ""
294
  "aufgetreten beim Parsen von JSON."
295
 
296
  #: lib/wfu_constants.php:97
 
 
 
 
 
297
  msgid "cannot be empty!"
298
  msgstr "darf nicht leer sein!"
299
 
300
- #: lib/wfu_constants.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  msgid ""
302
  "There are more than one instances of the plugin in this page with the same "
303
  "id. Please change it."
@@ -305,7 +346,7 @@ msgstr ""
305
  "Es gibt mehrere Instanzen des Plugins auf dieser Seite mit der gleichen ID. "
306
  "Bitte ändern Sie dies."
307
 
308
- #: lib/wfu_constants.php:99
309
  msgid ""
310
  "Cannot edit the shortcode because the page has been modified. Please reload "
311
  "the page."
@@ -313,27 +354,27 @@ msgstr ""
313
  "Der Shortcode kann nicht bearbeitet werden, da die Seite geändert wurde. "
314
  "Laden Sie die Seite erneut."
315
 
316
- #: lib/wfu_constants.php:102
317
  msgid "Upload skipped! File already exists."
318
  msgstr "Hochladen abgebrochen! Datei ist bereits vorhanden."
319
 
320
- #: lib/wfu_constants.php:103
321
  msgid "No files have been selected!"
322
  msgstr "Keine Dateien ausgewählt!"
323
 
324
- #: lib/wfu_constants.php:104
325
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
326
  msgstr ""
327
  "WPFilebase Plugin konnte nicht aktualisiert werden, da keine Dateien "
328
  "hochgeladen wurden."
329
 
330
- #: lib/wfu_constants.php:105
331
  msgid "Notification email was not sent because there were no files uploaded."
332
  msgstr ""
333
  "Benachrichtigung per E-Mail wurde nicht gesendet, weil keine Dateien "
334
  "hochgeladen worden sind."
335
 
336
- #: lib/wfu_constants.php:106
337
  msgid ""
338
  "Notification email was not sent because no recipients were defined. Please "
339
  "check notifyrecipients attribute in the shortcode."
@@ -342,7 +383,7 @@ msgstr ""
342
  "definiert wurde. Bitte überprüfen Sie das notifyrecipients-Attribut im "
343
  "Shortcode."
344
 
345
- #: lib/wfu_constants.php:107
346
  msgid ""
347
  "Notification email was not sent due to an error. Please check "
348
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
@@ -350,7 +391,7 @@ msgstr ""
350
  "E-Mail-Benachrichtigung wurde wegen eines Fehlers nicht gesendet. Bitte "
351
  "überprüfen Sie das notifysubject und das notifymessage Attribut auf Fehler."
352
 
353
- #: lib/wfu_constants.php:108
354
  msgid ""
355
  "Redirection not executed because redirection link is empty. Please check "
356
  "redirectlink attribute."
@@ -358,76 +399,76 @@ msgstr ""
358
  "Umleitung nicht ausgeführt, da der Umleitungs-Link leer ist. Bitte "
359
  "überprüfen Sie das redirectlink Attribut."
360
 
361
- #: lib/wfu_constants.php:109
362
  msgid ""
363
  "Redirection not executed because not all files were successfully uploaded."
364
  msgstr ""
365
  "Umleitung nicht ausgeführt, da nicht alle Dateien erfolgreich hochgeladen "
366
  "wurden."
367
 
368
- #: lib/wfu_constants.php:112
369
  msgid "Test Mode"
370
  msgstr "Test Modus"
371
 
372
- #: lib/wfu_constants.php:113
373
  msgid "select dir..."
374
  msgstr "Wählen Sie das Verzeichnis ..."
375
 
376
- #: lib/wfu_constants.php:114
377
  msgid "type dir"
378
  msgstr "Geben Sie das Verzeichnis ein"
379
 
380
- #: lib/wfu_constants.php:115
381
  msgid "Upload path: %filepath%"
382
  msgstr "Upload-Pfad: %filepath%"
383
 
384
- #: lib/wfu_constants.php:116
385
  msgid "Failed upload path: %filepath%"
386
  msgstr "Fehlerhafter Upload-Pfad: %filepath%"
387
 
388
- #: lib/wfu_constants.php:117
389
  msgid " (required)"
390
  msgstr "(erforderlich)"
391
 
392
- #: lib/wfu_constants.php:118
393
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
394
  msgstr ""
395
  "Dateien werden hochgeladen wird. Sind Sie sicher, dass Sie die Seite "
396
  "verlassen wollen?"
397
 
398
- #: lib/wfu_constants.php:121
399
  msgid "This is a test message"
400
  msgstr "This is a test message"
401
 
402
- #: lib/wfu_constants.php:122
403
  msgid "This is a test administrator message"
404
  msgstr "Dies ist eine Test-Admin-Nachricht"
405
 
406
- #: lib/wfu_constants.php:123
407
  msgid "File testfile 1 under test"
408
  msgstr "Datei testfile 1 wird getestet"
409
 
410
- #: lib/wfu_constants.php:124
411
  msgid "File testfile 1 message"
412
  msgstr "Datei testfile 1 Nachricht"
413
 
414
- #: lib/wfu_constants.php:125
415
  msgid "File testfile 1 administrator message"
416
  msgstr "Datei testfile 1 Admin-Nachricht"
417
 
418
- #: lib/wfu_constants.php:126
419
  msgid "File testfile 2 under test"
420
  msgstr "File testfile 2 wird getestet"
421
 
422
- #: lib/wfu_constants.php:127
423
  msgid "File testfile 2 message"
424
  msgstr "Datei testfile 2 Nachricht"
425
 
426
- #: lib/wfu_constants.php:128
427
  msgid "File testfile 2 administrator message"
428
  msgstr "Datei testfile 2 Admin-Nachricht"
429
 
430
- #: lib/wfu_constants.php:131
431
  msgid ""
432
  "Failed to add the shortcode to the page/post. Please try again. If the "
433
  "message persists, contact administrator."
@@ -436,7 +477,7 @@ msgstr ""
436
  "versuche es erneut. Wenn die Meldung weiterhin, wenden Sie sich "
437
  "Administrator."
438
 
439
- #: lib/wfu_constants.php:132
440
  msgid ""
441
  "Failed to edit the shortcode because the contents of the page changed. Try "
442
  "again to edit the shortcode."
@@ -444,7 +485,7 @@ msgstr ""
444
  "Der Shortcode konnte nicht bearbeitet, da sich der Inhalt der Seite geändert "
445
  "hat. Versuchen Sie erneut den Shortcode zu bearbeiten."
446
 
447
- #: lib/wfu_constants.php:133
448
  msgid ""
449
  "Failed to delete the shortcode because the contents of the page changed. Try "
450
  "again to delete it."
@@ -452,7 +493,7 @@ msgstr ""
452
  "Der Shortcode konnte nicht gelöscht werden, da sich der Inhalt der Seite "
453
  "geändert hat. Versuchen Sie erneut den Shortcode zu löschen."
454
 
455
- #: lib/wfu_constants.php:134
456
  msgid ""
457
  "The page containing the shortcode has been modified and it is no longer "
458
  "valid. Please go back to reload the shortcode."
@@ -460,7 +501,7 @@ msgstr ""
460
  "Die Seite mit dem Shortcode wurde modifiziert und ist nicht mehr gültig. "
461
  "Bitte gehen Sie zurück um zu den Shortcode zu laden."
462
 
463
- #: lib/wfu_constants.php:135
464
  msgid ""
465
  "Failed to update the shortcode because the contents of the page changed. Go "
466
  "back to reload the shortcode."
@@ -468,7 +509,7 @@ msgstr ""
468
  "Der Shortcode konnte nicht aktualisiert werden, da sich der Inhalt der Seite "
469
  "geändert geändert hat. Gehen Sie zurück um zu den Shortcode neu zu laden."
470
 
471
- #: lib/wfu_constants.php:136
472
  msgid ""
473
  "Failed to update the shortcode. Please try again. If the problem persists, "
474
  "go back and reload the shortcode."
@@ -477,7 +518,7 @@ msgstr ""
477
  "Wenn das Problem weiterhin besteht, gehen Sie zurück und laden Sie den "
478
  "Shortcode neu."
479
 
480
- #: lib/wfu_constants.php:139
481
  msgid ""
482
  "Insert variable %userid% inside text. It will be replaced by the id of the "
483
  "current user."
@@ -485,7 +526,7 @@ msgstr ""
485
  "Fügen Sie die Variable %userid% in den Text ein. Sie wird durch die ID des "
486
  "aktuellen Benutzers ersetzt."
487
 
488
- #: lib/wfu_constants.php:140
489
  msgid ""
490
  "Insert variable %username% inside text. It will be replaced by the username "
491
  "of the current user."
@@ -493,7 +534,7 @@ msgstr ""
493
  "Fügen Sie die Variable %username% in den Text ein. Sie wird durch den "
494
  "Benutzernamen des aktuellen Benutzers ersetzt."
495
 
496
- #: lib/wfu_constants.php:141
497
  msgid ""
498
  "Insert variable %useremail% inside text. It will be replaced by the email of "
499
  "the current user."
@@ -501,7 +542,7 @@ msgstr ""
501
  "Fügen Sie die Variable %useremail% in den Text ein. Sie wird durch die E-"
502
  "Mail-Adresse des aktuellen Benutzers ersetzt."
503
 
504
- #: lib/wfu_constants.php:142
505
  msgid ""
506
  "Insert variable %filename% inside text. It will be replaced by the filename "
507
  "of the uploaded file."
@@ -509,7 +550,7 @@ msgstr ""
509
  "Fügen Sie die Variable %filename% in den Text. Sie wird durch den Dateinamen "
510
  "der hochgeladenen Dateien ersetzt."
511
 
512
- #: lib/wfu_constants.php:143
513
  msgid ""
514
  "Insert variable %filepath% inside text. It will be replaced by the full "
515
  "filepath of the uploaded file."
@@ -517,7 +558,7 @@ msgstr ""
517
  "Fügen Sie die Variable %filepath% in den Text ein. Sie wird durch die "
518
  "vollständige Dateipfad der hochgeladenen Dateien ersetzt."
519
 
520
- #: lib/wfu_constants.php:144
521
  msgid ""
522
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
523
  "the website."
@@ -525,7 +566,7 @@ msgstr ""
525
  "Fügen Sie die Variable %blogid% in den Text ein. Sie wird durch die Blog-ID "
526
  "der Website ersetzt werden."
527
 
528
- #: lib/wfu_constants.php:145
529
  msgid ""
530
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
531
  "current page."
@@ -533,7 +574,7 @@ msgstr ""
533
  "Fügen Sie die Variable %pageid% in den Text ein. Sie wird durch die ID der "
534
  "aktuellen Seite ersetzt."
535
 
536
- #: lib/wfu_constants.php:146
537
  msgid ""
538
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
539
  "the current page."
@@ -541,7 +582,7 @@ msgstr ""
541
  "Fügen Sie die Variable %pagetitle% in den Text ein. Sie wird durch dden "
542
  "Title des aktuellen Benutzers ersetzt."
543
 
544
- #: lib/wfu_constants.php:147
545
  msgid ""
546
  "Insert variable %userdataXXX% inside text. Select the user field from the "
547
  "drop-down list. It will be replaced by the value that the user entered in "
@@ -551,73 +592,73 @@ msgstr ""
551
  "Feld \"Benutzer\" aus der Dropdown Liste. Die Variable wird durch den Wert "
552
  "ersetzt, die der Benutzer in dieses Feld eingetragen hat."
553
 
554
- #: lib/wfu_constants.php:148
555
  msgid "Insert variable %n% inside text to denote a line change."
556
  msgstr ""
557
  "Fügen Sie die Variable %n% in den Text ein, um eine Änderung der Zeile zu "
558
  "kennzeichnen."
559
 
560
- #: lib/wfu_constants.php:151
561
  msgid "Upload in progress"
562
  msgstr "Upload läuft"
563
 
564
- #: lib/wfu_constants.php:152
565
  msgid "Upload in progress with warnings!"
566
  msgstr "Upload läuft mit Warnhinweisen!"
567
 
568
- #: lib/wfu_constants.php:153
569
  msgid "Upload in progress but some files already failed!"
570
  msgstr "Upload läuft, aber einige Dateien bereits gescheitert!"
571
 
572
- #: lib/wfu_constants.php:154
573
  msgid "Upload in progress but no files uploaded so far!"
574
  msgstr "Upload läuft aber keine Dateien hochgeladen bis jetzt!"
575
 
576
- #: lib/wfu_constants.php:155
577
  msgid "All files uploaded successfully"
578
  msgstr "Alle Dateien erfolgreich hochgeladen"
579
 
580
- #: lib/wfu_constants.php:156
581
  msgid "All files uploaded successfully but there are warnings!"
582
  msgstr "Alle Dateien erfolgreich hochgeladen, aber es gibt Warnhinweise!"
583
 
584
- #: lib/wfu_constants.php:157
585
  msgid "File uploaded successfully but there are warnings!"
586
  msgstr "Datei erfolgreich hochgeladen, aber es gibt Warnhinweise!"
587
 
588
- #: lib/wfu_constants.php:158
589
  msgid "Some files failed to upload!"
590
  msgstr "Einige Dateien konnten nicht hochgeladen werden!"
591
 
592
- #: lib/wfu_constants.php:159
593
  msgid "All files failed to upload"
594
  msgstr "Alle Dateien konnten nicht hochgeladen werden"
595
 
596
- #: lib/wfu_constants.php:160
597
  msgid "File failed to upload"
598
  msgstr "Datei konnte nicht hochgeladen werden"
599
 
600
- #: lib/wfu_constants.php:161
601
  msgid "There are no files to upload!"
602
  msgstr "Es gibt keine Dateien zum Hochladen!"
603
 
604
- #: lib/wfu_constants.php:162
605
  msgid "Test upload message"
606
  msgstr "Test-Upload-Nachricht"
607
 
608
- #: lib/wfu_constants.php:163
609
  msgid "JSON parse warning!"
610
  msgstr "JSON parse Warnung!"
611
 
612
- #: lib/wfu_constants.php:164
613
  msgid "please wait while redirecting..."
614
  msgstr "Bitte warten Sie, Sie werden umgeleitet ..."
615
 
616
- #: lib/wfu_constants.php:165
617
  msgid "Open visual shortcode editor in new window"
618
  msgstr "Offenen des visuellen Shortcode-Editor in neuem Fenster"
619
 
620
- #: lib/wfu_constants.php:166
621
  msgid "loading visual editor"
622
  msgstr "visueller Editor laden"
623
 
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-21 21:16+0200\n"
6
+ "PO-Revision-Date: 2015-09-21 21:16+0200\n"
7
  "Last-Translator: nickboss <info@iptanus.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: de_DE\n"
294
  "aufgetreten beim Parsen von JSON."
295
 
296
  #: lib/wfu_constants.php:97
297
+ msgid "Please enable popup windows from the browser's settings!"
298
+ msgstr ""
299
+ "Bitte aktivieren Sie diese Popup-Fenster aus den Browser-Einstellungen!"
300
+
301
+ #: lib/wfu_constants.php:98
302
  msgid "cannot be empty!"
303
  msgstr "darf nicht leer sein!"
304
 
305
+ #: lib/wfu_constants.php:99
306
+ msgid "number not valid!"
307
+ msgstr "Nummer nicht gültig!"
308
+
309
+ #: lib/wfu_constants.php:100
310
+ msgid "email not valid!"
311
+ msgstr "email adresse ist ungültig!"
312
+
313
+ #: lib/wfu_constants.php:101
314
+ msgid "emails do not match!"
315
+ msgstr "emails stimmen nicht überein!"
316
+
317
+ #: lib/wfu_constants.php:102
318
+ msgid "no base email field in group!"
319
+ msgstr "keine basis email feld in der gruppe!"
320
+
321
+ #: lib/wfu_constants.php:103
322
+ msgid "passwords do not match!"
323
+ msgstr "passwörter stimmen nicht überein"
324
+
325
+ #: lib/wfu_constants.php:104
326
+ msgid "no base password field in group!"
327
+ msgstr "keine basispasswortfeld in der gruppe!"
328
+
329
+ #: lib/wfu_constants.php:105
330
+ msgid "checkbox unchecked!"
331
+ msgstr "checkBox nicht aktiviert!"
332
+
333
+ #: lib/wfu_constants.php:106
334
+ msgid "no option selected!"
335
+ msgstr "keine optionen selektiert!"
336
+
337
+ #: lib/wfu_constants.php:107
338
+ msgid "no item selected!"
339
+ msgstr "keine dateien ausgewählt!"
340
+
341
+ #: lib/wfu_constants.php:108
342
  msgid ""
343
  "There are more than one instances of the plugin in this page with the same "
344
  "id. Please change it."
346
  "Es gibt mehrere Instanzen des Plugins auf dieser Seite mit der gleichen ID. "
347
  "Bitte ändern Sie dies."
348
 
349
+ #: lib/wfu_constants.php:109
350
  msgid ""
351
  "Cannot edit the shortcode because the page has been modified. Please reload "
352
  "the page."
354
  "Der Shortcode kann nicht bearbeitet werden, da die Seite geändert wurde. "
355
  "Laden Sie die Seite erneut."
356
 
357
+ #: lib/wfu_constants.php:112
358
  msgid "Upload skipped! File already exists."
359
  msgstr "Hochladen abgebrochen! Datei ist bereits vorhanden."
360
 
361
+ #: lib/wfu_constants.php:113
362
  msgid "No files have been selected!"
363
  msgstr "Keine Dateien ausgewählt!"
364
 
365
+ #: lib/wfu_constants.php:114
366
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
367
  msgstr ""
368
  "WPFilebase Plugin konnte nicht aktualisiert werden, da keine Dateien "
369
  "hochgeladen wurden."
370
 
371
+ #: lib/wfu_constants.php:115
372
  msgid "Notification email was not sent because there were no files uploaded."
373
  msgstr ""
374
  "Benachrichtigung per E-Mail wurde nicht gesendet, weil keine Dateien "
375
  "hochgeladen worden sind."
376
 
377
+ #: lib/wfu_constants.php:116
378
  msgid ""
379
  "Notification email was not sent because no recipients were defined. Please "
380
  "check notifyrecipients attribute in the shortcode."
383
  "definiert wurde. Bitte überprüfen Sie das notifyrecipients-Attribut im "
384
  "Shortcode."
385
 
386
+ #: lib/wfu_constants.php:117
387
  msgid ""
388
  "Notification email was not sent due to an error. Please check "
389
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
391
  "E-Mail-Benachrichtigung wurde wegen eines Fehlers nicht gesendet. Bitte "
392
  "überprüfen Sie das notifysubject und das notifymessage Attribut auf Fehler."
393
 
394
+ #: lib/wfu_constants.php:118
395
  msgid ""
396
  "Redirection not executed because redirection link is empty. Please check "
397
  "redirectlink attribute."
399
  "Umleitung nicht ausgeführt, da der Umleitungs-Link leer ist. Bitte "
400
  "überprüfen Sie das redirectlink Attribut."
401
 
402
+ #: lib/wfu_constants.php:119
403
  msgid ""
404
  "Redirection not executed because not all files were successfully uploaded."
405
  msgstr ""
406
  "Umleitung nicht ausgeführt, da nicht alle Dateien erfolgreich hochgeladen "
407
  "wurden."
408
 
409
+ #: lib/wfu_constants.php:122
410
  msgid "Test Mode"
411
  msgstr "Test Modus"
412
 
413
+ #: lib/wfu_constants.php:123
414
  msgid "select dir..."
415
  msgstr "Wählen Sie das Verzeichnis ..."
416
 
417
+ #: lib/wfu_constants.php:124
418
  msgid "type dir"
419
  msgstr "Geben Sie das Verzeichnis ein"
420
 
421
+ #: lib/wfu_constants.php:125
422
  msgid "Upload path: %filepath%"
423
  msgstr "Upload-Pfad: %filepath%"
424
 
425
+ #: lib/wfu_constants.php:126
426
  msgid "Failed upload path: %filepath%"
427
  msgstr "Fehlerhafter Upload-Pfad: %filepath%"
428
 
429
+ #: lib/wfu_constants.php:127
430
  msgid " (required)"
431
  msgstr "(erforderlich)"
432
 
433
+ #: lib/wfu_constants.php:128
434
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
435
  msgstr ""
436
  "Dateien werden hochgeladen wird. Sind Sie sicher, dass Sie die Seite "
437
  "verlassen wollen?"
438
 
439
+ #: lib/wfu_constants.php:131
440
  msgid "This is a test message"
441
  msgstr "This is a test message"
442
 
443
+ #: lib/wfu_constants.php:132
444
  msgid "This is a test administrator message"
445
  msgstr "Dies ist eine Test-Admin-Nachricht"
446
 
447
+ #: lib/wfu_constants.php:133
448
  msgid "File testfile 1 under test"
449
  msgstr "Datei testfile 1 wird getestet"
450
 
451
+ #: lib/wfu_constants.php:134
452
  msgid "File testfile 1 message"
453
  msgstr "Datei testfile 1 Nachricht"
454
 
455
+ #: lib/wfu_constants.php:135
456
  msgid "File testfile 1 administrator message"
457
  msgstr "Datei testfile 1 Admin-Nachricht"
458
 
459
+ #: lib/wfu_constants.php:136
460
  msgid "File testfile 2 under test"
461
  msgstr "File testfile 2 wird getestet"
462
 
463
+ #: lib/wfu_constants.php:137
464
  msgid "File testfile 2 message"
465
  msgstr "Datei testfile 2 Nachricht"
466
 
467
+ #: lib/wfu_constants.php:138
468
  msgid "File testfile 2 administrator message"
469
  msgstr "Datei testfile 2 Admin-Nachricht"
470
 
471
+ #: lib/wfu_constants.php:141
472
  msgid ""
473
  "Failed to add the shortcode to the page/post. Please try again. If the "
474
  "message persists, contact administrator."
477
  "versuche es erneut. Wenn die Meldung weiterhin, wenden Sie sich "
478
  "Administrator."
479
 
480
+ #: lib/wfu_constants.php:142
481
  msgid ""
482
  "Failed to edit the shortcode because the contents of the page changed. Try "
483
  "again to edit the shortcode."
485
  "Der Shortcode konnte nicht bearbeitet, da sich der Inhalt der Seite geändert "
486
  "hat. Versuchen Sie erneut den Shortcode zu bearbeiten."
487
 
488
+ #: lib/wfu_constants.php:143
489
  msgid ""
490
  "Failed to delete the shortcode because the contents of the page changed. Try "
491
  "again to delete it."
493
  "Der Shortcode konnte nicht gelöscht werden, da sich der Inhalt der Seite "
494
  "geändert hat. Versuchen Sie erneut den Shortcode zu löschen."
495
 
496
+ #: lib/wfu_constants.php:144
497
  msgid ""
498
  "The page containing the shortcode has been modified and it is no longer "
499
  "valid. Please go back to reload the shortcode."
501
  "Die Seite mit dem Shortcode wurde modifiziert und ist nicht mehr gültig. "
502
  "Bitte gehen Sie zurück um zu den Shortcode zu laden."
503
 
504
+ #: lib/wfu_constants.php:145
505
  msgid ""
506
  "Failed to update the shortcode because the contents of the page changed. Go "
507
  "back to reload the shortcode."
509
  "Der Shortcode konnte nicht aktualisiert werden, da sich der Inhalt der Seite "
510
  "geändert geändert hat. Gehen Sie zurück um zu den Shortcode neu zu laden."
511
 
512
+ #: lib/wfu_constants.php:146
513
  msgid ""
514
  "Failed to update the shortcode. Please try again. If the problem persists, "
515
  "go back and reload the shortcode."
518
  "Wenn das Problem weiterhin besteht, gehen Sie zurück und laden Sie den "
519
  "Shortcode neu."
520
 
521
+ #: lib/wfu_constants.php:149
522
  msgid ""
523
  "Insert variable %userid% inside text. It will be replaced by the id of the "
524
  "current user."
526
  "Fügen Sie die Variable %userid% in den Text ein. Sie wird durch die ID des "
527
  "aktuellen Benutzers ersetzt."
528
 
529
+ #: lib/wfu_constants.php:150
530
  msgid ""
531
  "Insert variable %username% inside text. It will be replaced by the username "
532
  "of the current user."
534
  "Fügen Sie die Variable %username% in den Text ein. Sie wird durch den "
535
  "Benutzernamen des aktuellen Benutzers ersetzt."
536
 
537
+ #: lib/wfu_constants.php:151
538
  msgid ""
539
  "Insert variable %useremail% inside text. It will be replaced by the email of "
540
  "the current user."
542
  "Fügen Sie die Variable %useremail% in den Text ein. Sie wird durch die E-"
543
  "Mail-Adresse des aktuellen Benutzers ersetzt."
544
 
545
+ #: lib/wfu_constants.php:152
546
  msgid ""
547
  "Insert variable %filename% inside text. It will be replaced by the filename "
548
  "of the uploaded file."
550
  "Fügen Sie die Variable %filename% in den Text. Sie wird durch den Dateinamen "
551
  "der hochgeladenen Dateien ersetzt."
552
 
553
+ #: lib/wfu_constants.php:153
554
  msgid ""
555
  "Insert variable %filepath% inside text. It will be replaced by the full "
556
  "filepath of the uploaded file."
558
  "Fügen Sie die Variable %filepath% in den Text ein. Sie wird durch die "
559
  "vollständige Dateipfad der hochgeladenen Dateien ersetzt."
560
 
561
+ #: lib/wfu_constants.php:154
562
  msgid ""
563
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
564
  "the website."
566
  "Fügen Sie die Variable %blogid% in den Text ein. Sie wird durch die Blog-ID "
567
  "der Website ersetzt werden."
568
 
569
+ #: lib/wfu_constants.php:155
570
  msgid ""
571
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
572
  "current page."
574
  "Fügen Sie die Variable %pageid% in den Text ein. Sie wird durch die ID der "
575
  "aktuellen Seite ersetzt."
576
 
577
+ #: lib/wfu_constants.php:156
578
  msgid ""
579
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
580
  "the current page."
582
  "Fügen Sie die Variable %pagetitle% in den Text ein. Sie wird durch dden "
583
  "Title des aktuellen Benutzers ersetzt."
584
 
585
+ #: lib/wfu_constants.php:157
586
  msgid ""
587
  "Insert variable %userdataXXX% inside text. Select the user field from the "
588
  "drop-down list. It will be replaced by the value that the user entered in "
592
  "Feld \"Benutzer\" aus der Dropdown Liste. Die Variable wird durch den Wert "
593
  "ersetzt, die der Benutzer in dieses Feld eingetragen hat."
594
 
595
+ #: lib/wfu_constants.php:158
596
  msgid "Insert variable %n% inside text to denote a line change."
597
  msgstr ""
598
  "Fügen Sie die Variable %n% in den Text ein, um eine Änderung der Zeile zu "
599
  "kennzeichnen."
600
 
601
+ #: lib/wfu_constants.php:161
602
  msgid "Upload in progress"
603
  msgstr "Upload läuft"
604
 
605
+ #: lib/wfu_constants.php:162
606
  msgid "Upload in progress with warnings!"
607
  msgstr "Upload läuft mit Warnhinweisen!"
608
 
609
+ #: lib/wfu_constants.php:163
610
  msgid "Upload in progress but some files already failed!"
611
  msgstr "Upload läuft, aber einige Dateien bereits gescheitert!"
612
 
613
+ #: lib/wfu_constants.php:164
614
  msgid "Upload in progress but no files uploaded so far!"
615
  msgstr "Upload läuft aber keine Dateien hochgeladen bis jetzt!"
616
 
617
+ #: lib/wfu_constants.php:165
618
  msgid "All files uploaded successfully"
619
  msgstr "Alle Dateien erfolgreich hochgeladen"
620
 
621
+ #: lib/wfu_constants.php:166
622
  msgid "All files uploaded successfully but there are warnings!"
623
  msgstr "Alle Dateien erfolgreich hochgeladen, aber es gibt Warnhinweise!"
624
 
625
+ #: lib/wfu_constants.php:167
626
  msgid "File uploaded successfully but there are warnings!"
627
  msgstr "Datei erfolgreich hochgeladen, aber es gibt Warnhinweise!"
628
 
629
+ #: lib/wfu_constants.php:168
630
  msgid "Some files failed to upload!"
631
  msgstr "Einige Dateien konnten nicht hochgeladen werden!"
632
 
633
+ #: lib/wfu_constants.php:169
634
  msgid "All files failed to upload"
635
  msgstr "Alle Dateien konnten nicht hochgeladen werden"
636
 
637
+ #: lib/wfu_constants.php:170
638
  msgid "File failed to upload"
639
  msgstr "Datei konnte nicht hochgeladen werden"
640
 
641
+ #: lib/wfu_constants.php:171
642
  msgid "There are no files to upload!"
643
  msgstr "Es gibt keine Dateien zum Hochladen!"
644
 
645
+ #: lib/wfu_constants.php:172
646
  msgid "Test upload message"
647
  msgstr "Test-Upload-Nachricht"
648
 
649
+ #: lib/wfu_constants.php:173
650
  msgid "JSON parse warning!"
651
  msgstr "JSON parse Warnung!"
652
 
653
+ #: lib/wfu_constants.php:174
654
  msgid "please wait while redirecting..."
655
  msgstr "Bitte warten Sie, Sie werden umgeleitet ..."
656
 
657
+ #: lib/wfu_constants.php:175
658
  msgid "Open visual shortcode editor in new window"
659
  msgstr "Offenen des visuellen Shortcode-Editor in neuem Fenster"
660
 
661
+ #: lib/wfu_constants.php:176
662
  msgid "loading visual editor"
663
  msgstr "visueller Editor laden"
664
 
languages/wordpress-file-upload-el_GR.mo CHANGED
Binary file
languages/wordpress-file-upload-el_GR.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-06-25 14:30+0200\n"
6
- "PO-Revision-Date: 2015-06-25 14:30+0200\n"
7
  "Last-Translator: nickboss <info@iptanus.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: el\n"
@@ -285,10 +285,52 @@ msgstr ""
285
  "JSON."
286
 
287
  #: lib/wfu_constants.php:97
 
 
 
 
 
 
288
  msgid "cannot be empty!"
289
  msgstr "δεν μπορεί να είναι κενό!"
290
 
291
- #: lib/wfu_constants.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  msgid ""
293
  "There are more than one instances of the plugin in this page with the same "
294
  "id. Please change it."
@@ -296,7 +338,7 @@ msgstr ""
296
  "Υπάρχουν περισσότερες από μία εμφανίσεις του plugin σε αυτή τη σελίδα με το "
297
  "ίδιο id. Παρακαλούμε να το αλλάξετε."
298
 
299
- #: lib/wfu_constants.php:99
300
  msgid ""
301
  "Cannot edit the shortcode because the page has been modified. Please reload "
302
  "the page."
@@ -304,24 +346,24 @@ msgstr ""
304
  "Δεν είναι δυνατή η επεξεργασία του shortcode διότι η σελίδα τροποποιήθηκε. "
305
  "Παρακαλούμε ξαναφορτώστε τη σελίδα."
306
 
307
- #: lib/wfu_constants.php:102
308
  msgid "Upload skipped! File already exists."
309
  msgstr "Η αποστολή παραβλέφθηκε! Το αρχείο υπάρχει ήδη."
310
 
311
- #: lib/wfu_constants.php:103
312
  msgid "No files have been selected!"
313
  msgstr "Δεν επιλέχθηκαν αρχεία!"
314
 
315
- #: lib/wfu_constants.php:104
316
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
317
  msgstr "Το plugin WPFilebase δεν ενημερώθηκε διότι δεν απεστάλη κανένα αρχείο."
318
 
319
- #: lib/wfu_constants.php:105
320
  msgid "Notification email was not sent because there were no files uploaded."
321
  msgstr ""
322
  "Δεν πραγματοποιήθηκε ειδοποίηση με email διότι δεν απεστάλη κανένα αρχείο."
323
 
324
- #: lib/wfu_constants.php:106
325
  msgid ""
326
  "Notification email was not sent because no recipients were defined. Please "
327
  "check notifyrecipients attribute in the shortcode."
@@ -329,7 +371,7 @@ msgstr ""
329
  "Δεν πραγματοποιήθηκε ειδοποίηση με email διότι δεν ορίστηκαν παραλήπτες. "
330
  "Παρακαλούμε ελέγξτε την ιδιότητα notifyrecipients στο shortcode."
331
 
332
- #: lib/wfu_constants.php:107
333
  msgid ""
334
  "Notification email was not sent due to an error. Please check "
335
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
@@ -337,7 +379,7 @@ msgstr ""
337
  "Δεν πραγματοποιήθηκε ειδοποίηση με email λόγω σφάλματος. Παρακαλούμε ελέγξτε "
338
  "τις ιδιότητες notifyrecipients, notifysubject και notifymessage για σφάλματα."
339
 
340
- #: lib/wfu_constants.php:108
341
  msgid ""
342
  "Redirection not executed because redirection link is empty. Please check "
343
  "redirectlink attribute."
@@ -345,75 +387,75 @@ msgstr ""
345
  "Δεν πραγματοποιήθηκε αναδρομολόγηση διότι ο σύνδεσμος αναδρομολόγησης είναι "
346
  "κενός. Παρακαλούμε ελέγξτε την ιδιότητα redirectlink."
347
 
348
- #: lib/wfu_constants.php:109
349
  msgid ""
350
  "Redirection not executed because not all files were successfully uploaded."
351
  msgstr ""
352
  "Δεν πραγματοποιήθηκε αναδρομολόγηση διότι δεν αποεστάλησαν όλα τα αρχεία "
353
  "επιτυχώς."
354
 
355
- #: lib/wfu_constants.php:112
356
  msgid "Test Mode"
357
  msgstr "Κατάσταση Ελέγχου"
358
 
359
- #: lib/wfu_constants.php:113
360
  msgid "select dir..."
361
  msgstr "επιλογή καταλόγου..."
362
 
363
- #: lib/wfu_constants.php:114
364
  msgid "type dir"
365
  msgstr "εισάγετε κατάλογο"
366
 
367
- #: lib/wfu_constants.php:115
368
  msgid "Upload path: %filepath%"
369
  msgstr "Διαδρομή προορισμού: %filepath%"
370
 
371
- #: lib/wfu_constants.php:116
372
  msgid "Failed upload path: %filepath%"
373
  msgstr "Εσφαλμένη διαδρομή προορισμού: %filepath%"
374
 
375
- #: lib/wfu_constants.php:117
376
  msgid " (required)"
377
  msgstr " (απαραίτητο)"
378
 
379
- #: lib/wfu_constants.php:118
380
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
381
  msgstr ""
382
  "Υπάρχουν αρχεία που αποστέλλονται. Σίγουρα θέλετε να φύγετε από τη σελίδα;"
383
 
384
- #: lib/wfu_constants.php:121
385
  msgid "This is a test message"
386
  msgstr "Αυτό είναι ένα μήνυμα ελέγχου"
387
 
388
- #: lib/wfu_constants.php:122
389
  msgid "This is a test administrator message"
390
  msgstr "Αυτό είναι ένα μήνυμα διαχειριστή ελέγχου"
391
 
392
- #: lib/wfu_constants.php:123
393
  msgid "File testfile 1 under test"
394
  msgstr "Αρχείο testfile 1 υπό έλεγχο"
395
 
396
- #: lib/wfu_constants.php:124
397
  msgid "File testfile 1 message"
398
  msgstr "Μήνυμα αρχείου testfile 1"
399
 
400
- #: lib/wfu_constants.php:125
401
  msgid "File testfile 1 administrator message"
402
  msgstr "Μήνυμα διαχειριστή αρχείου testfile 1"
403
 
404
- #: lib/wfu_constants.php:126
405
  msgid "File testfile 2 under test"
406
  msgstr "Αρχείο testfile 2 υπό έλεγχο"
407
 
408
- #: lib/wfu_constants.php:127
409
  msgid "File testfile 2 message"
410
  msgstr "Μήνυμα αρχείου testfile 2"
411
 
412
- #: lib/wfu_constants.php:128
413
  msgid "File testfile 2 administrator message"
414
  msgstr "Μήνυμα διαχειριστή αρχείου testfile 2"
415
 
416
- #: lib/wfu_constants.php:131
417
  msgid ""
418
  "Failed to add the shortcode to the page/post. Please try again. If the "
419
  "message persists, contact administrator."
@@ -421,7 +463,7 @@ msgstr ""
421
  "Δεν κατέστη δυνατή η προσθήκη του shortcode στη σελίδα / άρθρο. Παρακαλώ "
422
  "προσπάθησε ξανά. Αν το μήνυμα συνεχίζει, επικοινωνήστε με το διαχειριστή."
423
 
424
- #: lib/wfu_constants.php:132
425
  msgid ""
426
  "Failed to edit the shortcode because the contents of the page changed. Try "
427
  "again to edit the shortcode."
@@ -429,7 +471,7 @@ msgstr ""
429
  "Δεν ήταν δυνατή η επεξεργασία του shortcode διότι τα περιεχόμενα της σελίδας "
430
  "άλλαξαν. Παρακαλούμε δοκιμάστε ξανά να επεξεργαστείτε το shortcode."
431
 
432
- #: lib/wfu_constants.php:133
433
  msgid ""
434
  "Failed to delete the shortcode because the contents of the page changed. Try "
435
  "again to delete it."
@@ -437,7 +479,7 @@ msgstr ""
437
  "Δεν ήταν δυνατή η διαγραφή του shortcode διότι τα περιεχόμενα της σελίδας "
438
  "άλλαξαν. Παρακαλούμε δοκιμάστε ξανά να διαγράψετε το shortcode."
439
 
440
- #: lib/wfu_constants.php:134
441
  msgid ""
442
  "The page containing the shortcode has been modified and it is no longer "
443
  "valid. Please go back to reload the shortcode."
@@ -445,7 +487,7 @@ msgstr ""
445
  "Η σελίδα που περιέχει το shortcode τροποποιήθηκε και δεν είναι πλέον σε "
446
  "ισχύ. Παρακαλούμε πηγαίνετε πίσω και ξαναφορτώστε το shortcode."
447
 
448
- #: lib/wfu_constants.php:135
449
  msgid ""
450
  "Failed to update the shortcode because the contents of the page changed. Go "
451
  "back to reload the shortcode."
@@ -453,7 +495,7 @@ msgstr ""
453
  "Δεν ήταν δυνατή η ενημέρωση του shortcode διότι τα περιεχόμενα της σελίδας "
454
  "άλλαξαν. Πηγαίνετε πίσω και ξαναφορτώστε το shortcode."
455
 
456
- #: lib/wfu_constants.php:136
457
  msgid ""
458
  "Failed to update the shortcode. Please try again. If the problem persists, "
459
  "go back and reload the shortcode."
@@ -461,7 +503,7 @@ msgstr ""
461
  "Δεν ήταν δυνατή η ενημέρωση του shortcode. Παρακαλούμε ξαναδοκιμάστε. Αν το "
462
  "πρόβλημα παραμείνει, πηγαίνετε πίσω και ξαναφορτώστε το shortcode."
463
 
464
- #: lib/wfu_constants.php:139
465
  msgid ""
466
  "Insert variable %userid% inside text. It will be replaced by the id of the "
467
  "current user."
@@ -469,7 +511,7 @@ msgstr ""
469
  "Εισάγετε τη μεταβλητή %userid% στο κείμενο. Θα αντικατασταθεί από το id του "
470
  "τρέχοντος χρήστη."
471
 
472
- #: lib/wfu_constants.php:140
473
  msgid ""
474
  "Insert variable %username% inside text. It will be replaced by the username "
475
  "of the current user."
@@ -477,7 +519,7 @@ msgstr ""
477
  "Εισάγετε τη μεταβλητή %username% στο κείμενο. Θα αντικατασταθεί από το όνομα "
478
  "του τρέχοντος χρήστη."
479
 
480
- #: lib/wfu_constants.php:141
481
  msgid ""
482
  "Insert variable %useremail% inside text. It will be replaced by the email of "
483
  "the current user."
@@ -485,7 +527,7 @@ msgstr ""
485
  "Εισάγετε τη μεταβλητή %useremail% στο κείμενο. Θα αντικατασταθεί από το "
486
  "email του τρέχοντος χρήστη."
487
 
488
- #: lib/wfu_constants.php:142
489
  msgid ""
490
  "Insert variable %filename% inside text. It will be replaced by the filename "
491
  "of the uploaded file."
@@ -493,7 +535,7 @@ msgstr ""
493
  "Εισάγετε τη μεταβλητή %filename% στο κείμενο. Θα αντικατασταθεί από το όνομα "
494
  "του αποστελλομένου αρχείου."
495
 
496
- #: lib/wfu_constants.php:143
497
  msgid ""
498
  "Insert variable %filepath% inside text. It will be replaced by the full "
499
  "filepath of the uploaded file."
@@ -501,7 +543,7 @@ msgstr ""
501
  "Εισάγετε τη μεταβλητή %filepath% στο κείμενο. Θα αντικατασταθεί από την "
502
  "πλήρη διαδρομή του αποστελλομένου αρχείου."
503
 
504
- #: lib/wfu_constants.php:144
505
  msgid ""
506
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
507
  "the website."
@@ -509,7 +551,7 @@ msgstr ""
509
  "Εισάγετε τη μεταβλητή %blogid% στο κείμενο. Θα αντικατασταθεί από το blog id "
510
  "της ιστοσελίδας."
511
 
512
- #: lib/wfu_constants.php:145
513
  msgid ""
514
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
515
  "current page."
@@ -517,7 +559,7 @@ msgstr ""
517
  "Εισάγετε τη μεταβλητή %pageid% στο κείμενο. Θα αντικατασταθεί από το id της "
518
  "τρέχουσας σελίδας."
519
 
520
- #: lib/wfu_constants.php:146
521
  msgid ""
522
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
523
  "the current page."
@@ -525,7 +567,7 @@ msgstr ""
525
  "Εισάγετε τη μεταβλητή %pagetitle% στο κείμενο. Θα αντικατασταθεί από τον "
526
  "τίτλο της τρέχουσας σελίδας."
527
 
528
- #: lib/wfu_constants.php:147
529
  msgid ""
530
  "Insert variable %userdataXXX% inside text. Select the user field from the "
531
  "drop-down list. It will be replaced by the value that the user entered in "
@@ -535,72 +577,72 @@ msgstr ""
535
  "από την εμφανιζόμενη dropdown λίστα. Θα αντικατασταθεί από την τιμή που "
536
  "εισήγαγε ο χρήστης σε αυτό το πεδίο."
537
 
538
- #: lib/wfu_constants.php:148
539
  msgid "Insert variable %n% inside text to denote a line change."
540
  msgstr ""
541
  "Εισάγετε τη μεταβλητή %n% στο κείμενο για να υποδείξετε αλλαγή γραμμής."
542
 
543
- #: lib/wfu_constants.php:151
544
  msgid "Upload in progress"
545
  msgstr "Αποστολή σε εξέλιξη"
546
 
547
- #: lib/wfu_constants.php:152
548
  msgid "Upload in progress with warnings!"
549
  msgstr "Αποστολή σε εξέλιξη με προειδοποιήσεις!"
550
 
551
- #: lib/wfu_constants.php:153
552
  msgid "Upload in progress but some files already failed!"
553
  msgstr "Αποστολή σε εξέλιξη αλλά κάποια αρχεία ήδη απέτυχαν!"
554
 
555
- #: lib/wfu_constants.php:154
556
  msgid "Upload in progress but no files uploaded so far!"
557
  msgstr "Αποστολή σε εξέλιξη αλλά δεν απεστάλη κανένα αρχείο μέχρι τώρα!"
558
 
559
- #: lib/wfu_constants.php:155
560
  msgid "All files uploaded successfully"
561
  msgstr "Όλα τα αρχεία απεστάλησαν επιτυχώς"
562
 
563
- #: lib/wfu_constants.php:156
564
  msgid "All files uploaded successfully but there are warnings!"
565
  msgstr "Όλα τα αρχεία απεστάλησαν επιτυχώς αλλά υπάρχουν προειδοποιήσεις!"
566
 
567
- #: lib/wfu_constants.php:157
568
  msgid "File uploaded successfully but there are warnings!"
569
  msgstr "Το αρχείο απεστάλη επιτυχώς αλλά υπάρχουν προειδοποιήσεις!"
570
 
571
- #: lib/wfu_constants.php:158
572
  msgid "Some files failed to upload!"
573
  msgstr "Μερικά αρχεία απέτυχαν να αποσταλούν!"
574
 
575
- #: lib/wfu_constants.php:159
576
  msgid "All files failed to upload"
577
  msgstr "Όλα τα αρχεία απέτυχαν να αποσταλούν"
578
 
579
- #: lib/wfu_constants.php:160
580
  msgid "File failed to upload"
581
  msgstr "Το αρχείο απέτυχε να αποσταλεί"
582
 
583
- #: lib/wfu_constants.php:161
584
  msgid "There are no files to upload!"
585
  msgstr "Δεν υπάρχουν αρχεία για αποστολή!"
586
 
587
- #: lib/wfu_constants.php:162
588
  msgid "Test upload message"
589
  msgstr "Μήνυμα αποστολής ελέγχου"
590
 
591
- #: lib/wfu_constants.php:163
592
  msgid "JSON parse warning!"
593
  msgstr "Προειδοποίηση μετατροπής JSON!"
594
 
595
- #: lib/wfu_constants.php:164
596
  msgid "please wait while redirecting..."
597
  msgstr "παρακαλούμε περιμένετε ενώ γίνεται αναδρομολόγηση..."
598
 
599
- #: lib/wfu_constants.php:165
600
  msgid "Open visual shortcode editor in new window"
601
  msgstr "Ανοίξτε τη γραφική επεξεργασία του shortcode σε νέο παράθυρο"
602
 
603
- #: lib/wfu_constants.php:166
604
  msgid "loading visual editor"
605
  msgstr "φόρτωση του γραφικού επεξεργαστή"
606
 
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-21 21:16+0200\n"
6
+ "PO-Revision-Date: 2015-09-21 21:16+0200\n"
7
  "Last-Translator: nickboss <info@iptanus.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: el\n"
285
  "JSON."
286
 
287
  #: lib/wfu_constants.php:97
288
+ msgid "Please enable popup windows from the browser's settings!"
289
+ msgstr ""
290
+ "Παρακαλούμε ενεργοποιήστε τα αναδυόμενα παράθυρα από τις ρυθμίσεις του "
291
+ "προγράμματος περιήγησης!"
292
+
293
+ #: lib/wfu_constants.php:98
294
  msgid "cannot be empty!"
295
  msgstr "δεν μπορεί να είναι κενό!"
296
 
297
+ #: lib/wfu_constants.php:99
298
+ msgid "number not valid!"
299
+ msgstr "μη έγκυρος αριθμός!"
300
+
301
+ #: lib/wfu_constants.php:100
302
+ msgid "email not valid!"
303
+ msgstr "το email δεν είναι έγκυρο!"
304
+
305
+ #: lib/wfu_constants.php:101
306
+ msgid "emails do not match!"
307
+ msgstr "τα emails δεν ταιριάζουν!"
308
+
309
+ #: lib/wfu_constants.php:102
310
+ msgid "no base email field in group!"
311
+ msgstr "δεν υπάρχει αρχικό πεδίο email στο group!"
312
+
313
+ #: lib/wfu_constants.php:103
314
+ msgid "passwords do not match!"
315
+ msgstr "οι κωδικοί δεν ταιριάζουν!"
316
+
317
+ #: lib/wfu_constants.php:104
318
+ msgid "no base password field in group!"
319
+ msgstr "δεν υπάρχει αρχικό πεδίο κωδικού στο group!"
320
+
321
+ #: lib/wfu_constants.php:105
322
+ msgid "checkbox unchecked!"
323
+ msgstr "το checkbox είναι μη επιλεγμένο!"
324
+
325
+ #: lib/wfu_constants.php:106
326
+ msgid "no option selected!"
327
+ msgstr "δεν έχει γίνει επιλογή!"
328
+
329
+ #: lib/wfu_constants.php:107
330
+ msgid "no item selected!"
331
+ msgstr "δεν έχει γίνει επιλογή!"
332
+
333
+ #: lib/wfu_constants.php:108
334
  msgid ""
335
  "There are more than one instances of the plugin in this page with the same "
336
  "id. Please change it."
338
  "Υπάρχουν περισσότερες από μία εμφανίσεις του plugin σε αυτή τη σελίδα με το "
339
  "ίδιο id. Παρακαλούμε να το αλλάξετε."
340
 
341
+ #: lib/wfu_constants.php:109
342
  msgid ""
343
  "Cannot edit the shortcode because the page has been modified. Please reload "
344
  "the page."
346
  "Δεν είναι δυνατή η επεξεργασία του shortcode διότι η σελίδα τροποποιήθηκε. "
347
  "Παρακαλούμε ξαναφορτώστε τη σελίδα."
348
 
349
+ #: lib/wfu_constants.php:112
350
  msgid "Upload skipped! File already exists."
351
  msgstr "Η αποστολή παραβλέφθηκε! Το αρχείο υπάρχει ήδη."
352
 
353
+ #: lib/wfu_constants.php:113
354
  msgid "No files have been selected!"
355
  msgstr "Δεν επιλέχθηκαν αρχεία!"
356
 
357
+ #: lib/wfu_constants.php:114
358
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
359
  msgstr "Το plugin WPFilebase δεν ενημερώθηκε διότι δεν απεστάλη κανένα αρχείο."
360
 
361
+ #: lib/wfu_constants.php:115
362
  msgid "Notification email was not sent because there were no files uploaded."
363
  msgstr ""
364
  "Δεν πραγματοποιήθηκε ειδοποίηση με email διότι δεν απεστάλη κανένα αρχείο."
365
 
366
+ #: lib/wfu_constants.php:116
367
  msgid ""
368
  "Notification email was not sent because no recipients were defined. Please "
369
  "check notifyrecipients attribute in the shortcode."
371
  "Δεν πραγματοποιήθηκε ειδοποίηση με email διότι δεν ορίστηκαν παραλήπτες. "
372
  "Παρακαλούμε ελέγξτε την ιδιότητα notifyrecipients στο shortcode."
373
 
374
+ #: lib/wfu_constants.php:117
375
  msgid ""
376
  "Notification email was not sent due to an error. Please check "
377
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
379
  "Δεν πραγματοποιήθηκε ειδοποίηση με email λόγω σφάλματος. Παρακαλούμε ελέγξτε "
380
  "τις ιδιότητες notifyrecipients, notifysubject και notifymessage για σφάλματα."
381
 
382
+ #: lib/wfu_constants.php:118
383
  msgid ""
384
  "Redirection not executed because redirection link is empty. Please check "
385
  "redirectlink attribute."
387
  "Δεν πραγματοποιήθηκε αναδρομολόγηση διότι ο σύνδεσμος αναδρομολόγησης είναι "
388
  "κενός. Παρακαλούμε ελέγξτε την ιδιότητα redirectlink."
389
 
390
+ #: lib/wfu_constants.php:119
391
  msgid ""
392
  "Redirection not executed because not all files were successfully uploaded."
393
  msgstr ""
394
  "Δεν πραγματοποιήθηκε αναδρομολόγηση διότι δεν αποεστάλησαν όλα τα αρχεία "
395
  "επιτυχώς."
396
 
397
+ #: lib/wfu_constants.php:122
398
  msgid "Test Mode"
399
  msgstr "Κατάσταση Ελέγχου"
400
 
401
+ #: lib/wfu_constants.php:123
402
  msgid "select dir..."
403
  msgstr "επιλογή καταλόγου..."
404
 
405
+ #: lib/wfu_constants.php:124
406
  msgid "type dir"
407
  msgstr "εισάγετε κατάλογο"
408
 
409
+ #: lib/wfu_constants.php:125
410
  msgid "Upload path: %filepath%"
411
  msgstr "Διαδρομή προορισμού: %filepath%"
412
 
413
+ #: lib/wfu_constants.php:126
414
  msgid "Failed upload path: %filepath%"
415
  msgstr "Εσφαλμένη διαδρομή προορισμού: %filepath%"
416
 
417
+ #: lib/wfu_constants.php:127
418
  msgid " (required)"
419
  msgstr " (απαραίτητο)"
420
 
421
+ #: lib/wfu_constants.php:128
422
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
423
  msgstr ""
424
  "Υπάρχουν αρχεία που αποστέλλονται. Σίγουρα θέλετε να φύγετε από τη σελίδα;"
425
 
426
+ #: lib/wfu_constants.php:131
427
  msgid "This is a test message"
428
  msgstr "Αυτό είναι ένα μήνυμα ελέγχου"
429
 
430
+ #: lib/wfu_constants.php:132
431
  msgid "This is a test administrator message"
432
  msgstr "Αυτό είναι ένα μήνυμα διαχειριστή ελέγχου"
433
 
434
+ #: lib/wfu_constants.php:133
435
  msgid "File testfile 1 under test"
436
  msgstr "Αρχείο testfile 1 υπό έλεγχο"
437
 
438
+ #: lib/wfu_constants.php:134
439
  msgid "File testfile 1 message"
440
  msgstr "Μήνυμα αρχείου testfile 1"
441
 
442
+ #: lib/wfu_constants.php:135
443
  msgid "File testfile 1 administrator message"
444
  msgstr "Μήνυμα διαχειριστή αρχείου testfile 1"
445
 
446
+ #: lib/wfu_constants.php:136
447
  msgid "File testfile 2 under test"
448
  msgstr "Αρχείο testfile 2 υπό έλεγχο"
449
 
450
+ #: lib/wfu_constants.php:137
451
  msgid "File testfile 2 message"
452
  msgstr "Μήνυμα αρχείου testfile 2"
453
 
454
+ #: lib/wfu_constants.php:138
455
  msgid "File testfile 2 administrator message"
456
  msgstr "Μήνυμα διαχειριστή αρχείου testfile 2"
457
 
458
+ #: lib/wfu_constants.php:141
459
  msgid ""
460
  "Failed to add the shortcode to the page/post. Please try again. If the "
461
  "message persists, contact administrator."
463
  "Δεν κατέστη δυνατή η προσθήκη του shortcode στη σελίδα / άρθρο. Παρακαλώ "
464
  "προσπάθησε ξανά. Αν το μήνυμα συνεχίζει, επικοινωνήστε με το διαχειριστή."
465
 
466
+ #: lib/wfu_constants.php:142
467
  msgid ""
468
  "Failed to edit the shortcode because the contents of the page changed. Try "
469
  "again to edit the shortcode."
471
  "Δεν ήταν δυνατή η επεξεργασία του shortcode διότι τα περιεχόμενα της σελίδας "
472
  "άλλαξαν. Παρακαλούμε δοκιμάστε ξανά να επεξεργαστείτε το shortcode."
473
 
474
+ #: lib/wfu_constants.php:143
475
  msgid ""
476
  "Failed to delete the shortcode because the contents of the page changed. Try "
477
  "again to delete it."
479
  "Δεν ήταν δυνατή η διαγραφή του shortcode διότι τα περιεχόμενα της σελίδας "
480
  "άλλαξαν. Παρακαλούμε δοκιμάστε ξανά να διαγράψετε το shortcode."
481
 
482
+ #: lib/wfu_constants.php:144
483
  msgid ""
484
  "The page containing the shortcode has been modified and it is no longer "
485
  "valid. Please go back to reload the shortcode."
487
  "Η σελίδα που περιέχει το shortcode τροποποιήθηκε και δεν είναι πλέον σε "
488
  "ισχύ. Παρακαλούμε πηγαίνετε πίσω και ξαναφορτώστε το shortcode."
489
 
490
+ #: lib/wfu_constants.php:145
491
  msgid ""
492
  "Failed to update the shortcode because the contents of the page changed. Go "
493
  "back to reload the shortcode."
495
  "Δεν ήταν δυνατή η ενημέρωση του shortcode διότι τα περιεχόμενα της σελίδας "
496
  "άλλαξαν. Πηγαίνετε πίσω και ξαναφορτώστε το shortcode."
497
 
498
+ #: lib/wfu_constants.php:146
499
  msgid ""
500
  "Failed to update the shortcode. Please try again. If the problem persists, "
501
  "go back and reload the shortcode."
503
  "Δεν ήταν δυνατή η ενημέρωση του shortcode. Παρακαλούμε ξαναδοκιμάστε. Αν το "
504
  "πρόβλημα παραμείνει, πηγαίνετε πίσω και ξαναφορτώστε το shortcode."
505
 
506
+ #: lib/wfu_constants.php:149
507
  msgid ""
508
  "Insert variable %userid% inside text. It will be replaced by the id of the "
509
  "current user."
511
  "Εισάγετε τη μεταβλητή %userid% στο κείμενο. Θα αντικατασταθεί από το id του "
512
  "τρέχοντος χρήστη."
513
 
514
+ #: lib/wfu_constants.php:150
515
  msgid ""
516
  "Insert variable %username% inside text. It will be replaced by the username "
517
  "of the current user."
519
  "Εισάγετε τη μεταβλητή %username% στο κείμενο. Θα αντικατασταθεί από το όνομα "
520
  "του τρέχοντος χρήστη."
521
 
522
+ #: lib/wfu_constants.php:151
523
  msgid ""
524
  "Insert variable %useremail% inside text. It will be replaced by the email of "
525
  "the current user."
527
  "Εισάγετε τη μεταβλητή %useremail% στο κείμενο. Θα αντικατασταθεί από το "
528
  "email του τρέχοντος χρήστη."
529
 
530
+ #: lib/wfu_constants.php:152
531
  msgid ""
532
  "Insert variable %filename% inside text. It will be replaced by the filename "
533
  "of the uploaded file."
535
  "Εισάγετε τη μεταβλητή %filename% στο κείμενο. Θα αντικατασταθεί από το όνομα "
536
  "του αποστελλομένου αρχείου."
537
 
538
+ #: lib/wfu_constants.php:153
539
  msgid ""
540
  "Insert variable %filepath% inside text. It will be replaced by the full "
541
  "filepath of the uploaded file."
543
  "Εισάγετε τη μεταβλητή %filepath% στο κείμενο. Θα αντικατασταθεί από την "
544
  "πλήρη διαδρομή του αποστελλομένου αρχείου."
545
 
546
+ #: lib/wfu_constants.php:154
547
  msgid ""
548
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
549
  "the website."
551
  "Εισάγετε τη μεταβλητή %blogid% στο κείμενο. Θα αντικατασταθεί από το blog id "
552
  "της ιστοσελίδας."
553
 
554
+ #: lib/wfu_constants.php:155
555
  msgid ""
556
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
557
  "current page."
559
  "Εισάγετε τη μεταβλητή %pageid% στο κείμενο. Θα αντικατασταθεί από το id της "
560
  "τρέχουσας σελίδας."
561
 
562
+ #: lib/wfu_constants.php:156
563
  msgid ""
564
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
565
  "the current page."
567
  "Εισάγετε τη μεταβλητή %pagetitle% στο κείμενο. Θα αντικατασταθεί από τον "
568
  "τίτλο της τρέχουσας σελίδας."
569
 
570
+ #: lib/wfu_constants.php:157
571
  msgid ""
572
  "Insert variable %userdataXXX% inside text. Select the user field from the "
573
  "drop-down list. It will be replaced by the value that the user entered in "
577
  "από την εμφανιζόμενη dropdown λίστα. Θα αντικατασταθεί από την τιμή που "
578
  "εισήγαγε ο χρήστης σε αυτό το πεδίο."
579
 
580
+ #: lib/wfu_constants.php:158
581
  msgid "Insert variable %n% inside text to denote a line change."
582
  msgstr ""
583
  "Εισάγετε τη μεταβλητή %n% στο κείμενο για να υποδείξετε αλλαγή γραμμής."
584
 
585
+ #: lib/wfu_constants.php:161
586
  msgid "Upload in progress"
587
  msgstr "Αποστολή σε εξέλιξη"
588
 
589
+ #: lib/wfu_constants.php:162
590
  msgid "Upload in progress with warnings!"
591
  msgstr "Αποστολή σε εξέλιξη με προειδοποιήσεις!"
592
 
593
+ #: lib/wfu_constants.php:163
594
  msgid "Upload in progress but some files already failed!"
595
  msgstr "Αποστολή σε εξέλιξη αλλά κάποια αρχεία ήδη απέτυχαν!"
596
 
597
+ #: lib/wfu_constants.php:164
598
  msgid "Upload in progress but no files uploaded so far!"
599
  msgstr "Αποστολή σε εξέλιξη αλλά δεν απεστάλη κανένα αρχείο μέχρι τώρα!"
600
 
601
+ #: lib/wfu_constants.php:165
602
  msgid "All files uploaded successfully"
603
  msgstr "Όλα τα αρχεία απεστάλησαν επιτυχώς"
604
 
605
+ #: lib/wfu_constants.php:166
606
  msgid "All files uploaded successfully but there are warnings!"
607
  msgstr "Όλα τα αρχεία απεστάλησαν επιτυχώς αλλά υπάρχουν προειδοποιήσεις!"
608
 
609
+ #: lib/wfu_constants.php:167
610
  msgid "File uploaded successfully but there are warnings!"
611
  msgstr "Το αρχείο απεστάλη επιτυχώς αλλά υπάρχουν προειδοποιήσεις!"
612
 
613
+ #: lib/wfu_constants.php:168
614
  msgid "Some files failed to upload!"
615
  msgstr "Μερικά αρχεία απέτυχαν να αποσταλούν!"
616
 
617
+ #: lib/wfu_constants.php:169
618
  msgid "All files failed to upload"
619
  msgstr "Όλα τα αρχεία απέτυχαν να αποσταλούν"
620
 
621
+ #: lib/wfu_constants.php:170
622
  msgid "File failed to upload"
623
  msgstr "Το αρχείο απέτυχε να αποσταλεί"
624
 
625
+ #: lib/wfu_constants.php:171
626
  msgid "There are no files to upload!"
627
  msgstr "Δεν υπάρχουν αρχεία για αποστολή!"
628
 
629
+ #: lib/wfu_constants.php:172
630
  msgid "Test upload message"
631
  msgstr "Μήνυμα αποστολής ελέγχου"
632
 
633
+ #: lib/wfu_constants.php:173
634
  msgid "JSON parse warning!"
635
  msgstr "Προειδοποίηση μετατροπής JSON!"
636
 
637
+ #: lib/wfu_constants.php:174
638
  msgid "please wait while redirecting..."
639
  msgstr "παρακαλούμε περιμένετε ενώ γίνεται αναδρομολόγηση..."
640
 
641
+ #: lib/wfu_constants.php:175
642
  msgid "Open visual shortcode editor in new window"
643
  msgstr "Ανοίξτε τη γραφική επεξεργασία του shortcode σε νέο παράθυρο"
644
 
645
+ #: lib/wfu_constants.php:176
646
  msgid "loading visual editor"
647
  msgstr "φόρτωση του γραφικού επεξεργαστή"
648
 
languages/wordpress-file-upload-fr_FR.mo CHANGED
Binary file
languages/wordpress-file-upload-fr_FR.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-06-25 14:30+0200\n"
6
- "PO-Revision-Date: 2015-06-25 14:30+0200\n"
7
  "Last-Translator: nickboss <nickboss@iptanus.com>\n"
8
  "Language-Team: \n"
9
  "Language: fr_FR\n"
@@ -289,10 +289,51 @@ msgstr ""
289
  "à cause d'une erreur d'analyse JSON."
290
 
291
  #: lib/wfu_constants.php:97
 
 
 
 
 
292
  msgid "cannot be empty!"
293
  msgstr "ne peut pas être vide!"
294
 
295
- #: lib/wfu_constants.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  msgid ""
297
  "There are more than one instances of the plugin in this page with the same "
298
  "id. Please change it."
@@ -300,7 +341,7 @@ msgstr ""
300
  "Il ya plus d'un cas de le plugin dans cette page avec le même id. S'il vous "
301
  "plaît changer."
302
 
303
- #: lib/wfu_constants.php:99
304
  msgid ""
305
  "Cannot edit the shortcode because the page has been modified. Please reload "
306
  "the page."
@@ -308,27 +349,27 @@ msgstr ""
308
  "Impossible de modifier le shortcode car la page a été modifiée. Veuillez "
309
  "recharger la page."
310
 
311
- #: lib/wfu_constants.php:102
312
  msgid "Upload skipped! File already exists."
313
  msgstr "Envoi passé! Le fichier existe déjà."
314
 
315
- #: lib/wfu_constants.php:103
316
  msgid "No files have been selected!"
317
  msgstr "Aucun fichier n'a été envoyés!"
318
 
319
- #: lib/wfu_constants.php:104
320
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
321
  msgstr ""
322
  "WPFilebase Plugin n'a pas été mis à jour car il n'y a pas de fichiers à "
323
  "envoyer."
324
 
325
- #: lib/wfu_constants.php:105
326
  msgid "Notification email was not sent because there were no files uploaded."
327
  msgstr ""
328
  "Le mail de notification n'a pas été envoyé car il n'y a pas de fichiers à "
329
  "envoyer."
330
 
331
- #: lib/wfu_constants.php:106
332
  msgid ""
333
  "Notification email was not sent because no recipients were defined. Please "
334
  "check notifyrecipients attribute in the shortcode."
@@ -336,7 +377,7 @@ msgstr ""
336
  "Le mail de notification n'a pas été envoyé car il n'y a pas de destinataire. "
337
  "Merci de vérifier l'attribut notifyrecipients dans le shortcode."
338
 
339
- #: lib/wfu_constants.php:107
340
  msgid ""
341
  "Notification email was not sent due to an error. Please check "
342
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
@@ -344,7 +385,7 @@ msgstr ""
344
  "Le mail de notification n'a pas été envoyé car il n'y a une erreur. Merci de "
345
  "vérifier les attributs notifyrecipients, notifysubject et notifymessage."
346
 
347
- #: lib/wfu_constants.php:108
348
  msgid ""
349
  "Redirection not executed because redirection link is empty. Please check "
350
  "redirectlink attribute."
@@ -352,73 +393,73 @@ msgstr ""
352
  "La redirection n'a pas été effectuée car le lien de redirection est vide. "
353
  "Merci de vérifier l'attribut redirectlink."
354
 
355
- #: lib/wfu_constants.php:109
356
  msgid ""
357
  "Redirection not executed because not all files were successfully uploaded."
358
  msgstr ""
359
  "La redirection n'est pas éxécuté car tous les fichiers n'ont pas été envoyés."
360
 
361
- #: lib/wfu_constants.php:112
362
  msgid "Test Mode"
363
  msgstr "Mode de test"
364
 
365
- #: lib/wfu_constants.php:113
366
  msgid "select dir..."
367
  msgstr "sélectionnez dir"
368
 
369
- #: lib/wfu_constants.php:114
370
  msgid "type dir"
371
  msgstr "tapez dir"
372
 
373
- #: lib/wfu_constants.php:115
374
  msgid "Upload path: %filepath%"
375
  msgstr "Chemin d'Upload : %filepath%"
376
 
377
- #: lib/wfu_constants.php:116
378
  msgid "Failed upload path: %filepath%"
379
  msgstr "Mauvais répertoir d'envoi: %filepath%"
380
 
381
- #: lib/wfu_constants.php:117
382
  msgid " (required)"
383
  msgstr " (requis)"
384
 
385
- #: lib/wfu_constants.php:118
386
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
387
  msgstr "Les fichiers sont envoyés. Êtes-vous sûr de vouloir quitter la page?"
388
 
389
- #: lib/wfu_constants.php:121
390
  msgid "This is a test message"
391
  msgstr "Ceci est un message de test"
392
 
393
- #: lib/wfu_constants.php:122
394
  msgid "This is a test administrator message"
395
  msgstr "Ceci est un message administrateur de test"
396
 
397
- #: lib/wfu_constants.php:123
398
  msgid "File testfile 1 under test"
399
  msgstr "File testfile 1 under test"
400
 
401
- #: lib/wfu_constants.php:124
402
  msgid "File testfile 1 message"
403
  msgstr "File testfile 1 message"
404
 
405
- #: lib/wfu_constants.php:125
406
  msgid "File testfile 1 administrator message"
407
  msgstr "Message administrateur File testfile"
408
 
409
- #: lib/wfu_constants.php:126
410
  msgid "File testfile 2 under test"
411
  msgstr "En test File testfile"
412
 
413
- #: lib/wfu_constants.php:127
414
  msgid "File testfile 2 message"
415
  msgstr "Message File testfile 2"
416
 
417
- #: lib/wfu_constants.php:128
418
  msgid "File testfile 2 administrator message"
419
  msgstr "Message administrateur File testfile 2"
420
 
421
- #: lib/wfu_constants.php:131
422
  msgid ""
423
  "Failed to add the shortcode to the page/post. Please try again. If the "
424
  "message persists, contact administrator."
@@ -426,7 +467,7 @@ msgstr ""
426
  "Impossible d' ajouter le shortcode à la page / poste. S' il vous plaît "
427
  "essayer à nouveau. Si le message persiste, contactez l' administrateur."
428
 
429
- #: lib/wfu_constants.php:132
430
  msgid ""
431
  "Failed to edit the shortcode because the contents of the page changed. Try "
432
  "again to edit the shortcode."
@@ -434,7 +475,7 @@ msgstr ""
434
  "Impossible de modifier le shortcode parce que le contenu de la page changé. "
435
  "Essayez à nouveau de modifier le shortcode."
436
 
437
- #: lib/wfu_constants.php:133
438
  msgid ""
439
  "Failed to delete the shortcode because the contents of the page changed. Try "
440
  "again to delete it."
@@ -442,7 +483,7 @@ msgstr ""
442
  "Impossible de supprimer le shortcode parce que le contenu de la page changé. "
443
  "Essayez à nouveau de le supprimer."
444
 
445
- #: lib/wfu_constants.php:134
446
  msgid ""
447
  "The page containing the shortcode has been modified and it is no longer "
448
  "valid. Please go back to reload the shortcode."
@@ -450,7 +491,7 @@ msgstr ""
450
  "La page contenant le shortcode a été modifié et il est plus valide. S'il "
451
  "vous plaît revenir à recharger le shortcode."
452
 
453
- #: lib/wfu_constants.php:135
454
  msgid ""
455
  "Failed to update the shortcode because the contents of the page changed. Go "
456
  "back to reload the shortcode."
@@ -458,7 +499,7 @@ msgstr ""
458
  "Impossible de mettre à jour le shortcode parce que le contenu de la page "
459
  "changé. Retour à recharger le shortcode."
460
 
461
- #: lib/wfu_constants.php:136
462
  msgid ""
463
  "Failed to update the shortcode. Please try again. If the problem persists, "
464
  "go back and reload the shortcode."
@@ -466,7 +507,7 @@ msgstr ""
466
  "Impossible de mettre à jour le shortcode. S'il vous plaît essayer à nouveau. "
467
  "Si le problème persiste, revenir en arrière et recharger le shortcode."
468
 
469
- #: lib/wfu_constants.php:139
470
  msgid ""
471
  "Insert variable %userid% inside text. It will be replaced by the id of the "
472
  "current user."
@@ -474,7 +515,7 @@ msgstr ""
474
  "Insérez %userid% variable dans le texte. Il sera remplacé par l'id de "
475
  "l'utilisateur courant."
476
 
477
- #: lib/wfu_constants.php:140
478
  msgid ""
479
  "Insert variable %username% inside text. It will be replaced by the username "
480
  "of the current user."
@@ -482,7 +523,7 @@ msgstr ""
482
  "Insérez la variable %username% dans le texte. Il sera remplacé par le "
483
  "username de l'utilisateur courant."
484
 
485
- #: lib/wfu_constants.php:141
486
  msgid ""
487
  "Insert variable %useremail% inside text. It will be replaced by the email of "
488
  "the current user."
@@ -490,7 +531,7 @@ msgstr ""
490
  "Insérez la variable %useremail% dans le texte. Il sera remplacé par l'email "
491
  "de l'utilisateur courant."
492
 
493
- #: lib/wfu_constants.php:142
494
  msgid ""
495
  "Insert variable %filename% inside text. It will be replaced by the filename "
496
  "of the uploaded file."
@@ -498,7 +539,7 @@ msgstr ""
498
  "Insérez la variable %filename% dans le texte. Il sera remplacé par le nom du "
499
  "fichier à envoyer."
500
 
501
- #: lib/wfu_constants.php:143
502
  msgid ""
503
  "Insert variable %filepath% inside text. It will be replaced by the full "
504
  "filepath of the uploaded file."
@@ -506,7 +547,7 @@ msgstr ""
506
  "Insérez la variable %filepath% dans le texte. Il sera remplacé par le chemin "
507
  "complet du fichier envoyé."
508
 
509
- #: lib/wfu_constants.php:144
510
  msgid ""
511
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
512
  "the website."
@@ -514,7 +555,7 @@ msgstr ""
514
  "Insérez la variable %blogid% dans le texte. Il sera remplacé par l'id du "
515
  "blog du site web."
516
 
517
- #: lib/wfu_constants.php:145
518
  msgid ""
519
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
520
  "current page."
@@ -522,7 +563,7 @@ msgstr ""
522
  "Insérez %pageid% variable dans le texte. Il sera remplacé par l'id de la "
523
  "page en cours."
524
 
525
- #: lib/wfu_constants.php:146
526
  msgid ""
527
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
528
  "the current page."
@@ -530,7 +571,7 @@ msgstr ""
530
  "Insérez %pagetitle% variable dans le texte. Il sera remplacé par le titre de "
531
  "la page courante."
532
 
533
- #: lib/wfu_constants.php:147
534
  msgid ""
535
  "Insert variable %userdataXXX% inside text. Select the user field from the "
536
  "drop-down list. It will be replaced by the value that the user entered in "
@@ -540,74 +581,74 @@ msgstr ""
540
  "l'utilisateur dans la liste déroulante. Il sera remplacé par la valeur que "
541
  "l'utilisateur aura entré dans ce champs."
542
 
543
- #: lib/wfu_constants.php:148
544
  msgid "Insert variable %n% inside text to denote a line change."
545
  msgstr ""
546
  "Insérez la variable %n% à l'intérieur du texte pour indiquer un changement "
547
  "de ligne."
548
 
549
- #: lib/wfu_constants.php:151
550
  msgid "Upload in progress"
551
  msgstr "Envoi en cours"
552
 
553
- #: lib/wfu_constants.php:152
554
  msgid "Upload in progress with warnings!"
555
  msgstr "Envoi en cours mais avec des avertissements!"
556
 
557
- #: lib/wfu_constants.php:153
558
  msgid "Upload in progress but some files already failed!"
559
  msgstr "Envoi en cours mais certains fichiers ont échoués!"
560
 
561
- #: lib/wfu_constants.php:154
562
  msgid "Upload in progress but no files uploaded so far!"
563
  msgstr "Envoi en cours mais aucun fichiers n'a été envoyé pour le moment!"
564
 
565
- #: lib/wfu_constants.php:155
566
  msgid "All files uploaded successfully"
567
  msgstr "Tous les fichiers ont été envoyés avec succès"
568
 
569
- #: lib/wfu_constants.php:156
570
  msgid "All files uploaded successfully but there are warnings!"
571
  msgstr ""
572
  "Tous les fichiers ont été envoyer avec succès mais avec des avertissements!"
573
 
574
- #: lib/wfu_constants.php:157
575
  msgid "File uploaded successfully but there are warnings!"
576
  msgstr "Fichiers envoyés avec succès mais certain avec un avertissement."
577
 
578
- #: lib/wfu_constants.php:158
579
  msgid "Some files failed to upload!"
580
  msgstr "Certains fichiers n'ont pas été envoyé"
581
 
582
- #: lib/wfu_constants.php:159
583
  msgid "All files failed to upload"
584
  msgstr "Impossible d'envoyer les fichiers"
585
 
586
- #: lib/wfu_constants.php:160
587
  msgid "File failed to upload"
588
  msgstr "Impossible d'envoyer le fichier"
589
 
590
- #: lib/wfu_constants.php:161
591
  msgid "There are no files to upload!"
592
  msgstr "Il n'y a pas de fichiers à envoyer"
593
 
594
- #: lib/wfu_constants.php:162
595
  msgid "Test upload message"
596
  msgstr "Message de test d'upload"
597
 
598
- #: lib/wfu_constants.php:163
599
  msgid "JSON parse warning!"
600
  msgstr "Avertisements d'analyse JSON."
601
 
602
- #: lib/wfu_constants.php:164
603
  msgid "please wait while redirecting..."
604
  msgstr "merci de patienter pendans la redirection..."
605
 
606
- #: lib/wfu_constants.php:165
607
  msgid "Open visual shortcode editor in new window"
608
  msgstr "Ouvrez l'éditeur de shortcode visuelle dans une nouvelle fenêtre"
609
 
610
- #: lib/wfu_constants.php:166
611
  msgid "loading visual editor"
612
  msgstr "chargement éditeur visuel"
613
 
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-21 21:17+0200\n"
6
+ "PO-Revision-Date: 2015-09-21 21:17+0200\n"
7
  "Last-Translator: nickboss <nickboss@iptanus.com>\n"
8
  "Language-Team: \n"
9
  "Language: fr_FR\n"
289
  "à cause d'une erreur d'analyse JSON."
290
 
291
  #: lib/wfu_constants.php:97
292
+ msgid "Please enable popup windows from the browser's settings!"
293
+ msgstr ""
294
+ "Veuillez activer les fenêtres contextuelles des paramètres du navigateur !"
295
+
296
+ #: lib/wfu_constants.php:98
297
  msgid "cannot be empty!"
298
  msgstr "ne peut pas être vide!"
299
 
300
+ #: lib/wfu_constants.php:99
301
+ msgid "number not valid!"
302
+ msgstr "nombre non valide!"
303
+
304
+ #: lib/wfu_constants.php:100
305
+ msgid "email not valid!"
306
+ msgstr "email n'est pas valable"
307
+
308
+ #: lib/wfu_constants.php:101
309
+ msgid "emails do not match!"
310
+ msgstr "emails ne correspondent pas!"
311
+
312
+ #: lib/wfu_constants.php:102
313
+ msgid "no base email field in group!"
314
+ msgstr "aucun champ de base email en groupe!"
315
+
316
+ #: lib/wfu_constants.php:103
317
+ msgid "passwords do not match!"
318
+ msgstr "mots de passe ne correspondent pas!"
319
+
320
+ #: lib/wfu_constants.php:104
321
+ msgid "no base password field in group!"
322
+ msgstr "aucun champ de base de mot de passe dans le groupe!"
323
+
324
+ #: lib/wfu_constants.php:105
325
+ msgid "checkbox unchecked!"
326
+ msgstr "case à cocher désactivée!"
327
+
328
+ #: lib/wfu_constants.php:106
329
+ msgid "no option selected!"
330
+ msgstr "aucune option sélectionnée!"
331
+
332
+ #: lib/wfu_constants.php:107
333
+ msgid "no item selected!"
334
+ msgstr "Aucun article sélectionné!"
335
+
336
+ #: lib/wfu_constants.php:108
337
  msgid ""
338
  "There are more than one instances of the plugin in this page with the same "
339
  "id. Please change it."
341
  "Il ya plus d'un cas de le plugin dans cette page avec le même id. S'il vous "
342
  "plaît changer."
343
 
344
+ #: lib/wfu_constants.php:109
345
  msgid ""
346
  "Cannot edit the shortcode because the page has been modified. Please reload "
347
  "the page."
349
  "Impossible de modifier le shortcode car la page a été modifiée. Veuillez "
350
  "recharger la page."
351
 
352
+ #: lib/wfu_constants.php:112
353
  msgid "Upload skipped! File already exists."
354
  msgstr "Envoi passé! Le fichier existe déjà."
355
 
356
+ #: lib/wfu_constants.php:113
357
  msgid "No files have been selected!"
358
  msgstr "Aucun fichier n'a été envoyés!"
359
 
360
+ #: lib/wfu_constants.php:114
361
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
362
  msgstr ""
363
  "WPFilebase Plugin n'a pas été mis à jour car il n'y a pas de fichiers à "
364
  "envoyer."
365
 
366
+ #: lib/wfu_constants.php:115
367
  msgid "Notification email was not sent because there were no files uploaded."
368
  msgstr ""
369
  "Le mail de notification n'a pas été envoyé car il n'y a pas de fichiers à "
370
  "envoyer."
371
 
372
+ #: lib/wfu_constants.php:116
373
  msgid ""
374
  "Notification email was not sent because no recipients were defined. Please "
375
  "check notifyrecipients attribute in the shortcode."
377
  "Le mail de notification n'a pas été envoyé car il n'y a pas de destinataire. "
378
  "Merci de vérifier l'attribut notifyrecipients dans le shortcode."
379
 
380
+ #: lib/wfu_constants.php:117
381
  msgid ""
382
  "Notification email was not sent due to an error. Please check "
383
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
385
  "Le mail de notification n'a pas été envoyé car il n'y a une erreur. Merci de "
386
  "vérifier les attributs notifyrecipients, notifysubject et notifymessage."
387
 
388
+ #: lib/wfu_constants.php:118
389
  msgid ""
390
  "Redirection not executed because redirection link is empty. Please check "
391
  "redirectlink attribute."
393
  "La redirection n'a pas été effectuée car le lien de redirection est vide. "
394
  "Merci de vérifier l'attribut redirectlink."
395
 
396
+ #: lib/wfu_constants.php:119
397
  msgid ""
398
  "Redirection not executed because not all files were successfully uploaded."
399
  msgstr ""
400
  "La redirection n'est pas éxécuté car tous les fichiers n'ont pas été envoyés."
401
 
402
+ #: lib/wfu_constants.php:122
403
  msgid "Test Mode"
404
  msgstr "Mode de test"
405
 
406
+ #: lib/wfu_constants.php:123
407
  msgid "select dir..."
408
  msgstr "sélectionnez dir"
409
 
410
+ #: lib/wfu_constants.php:124
411
  msgid "type dir"
412
  msgstr "tapez dir"
413
 
414
+ #: lib/wfu_constants.php:125
415
  msgid "Upload path: %filepath%"
416
  msgstr "Chemin d'Upload : %filepath%"
417
 
418
+ #: lib/wfu_constants.php:126
419
  msgid "Failed upload path: %filepath%"
420
  msgstr "Mauvais répertoir d'envoi: %filepath%"
421
 
422
+ #: lib/wfu_constants.php:127
423
  msgid " (required)"
424
  msgstr " (requis)"
425
 
426
+ #: lib/wfu_constants.php:128
427
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
428
  msgstr "Les fichiers sont envoyés. Êtes-vous sûr de vouloir quitter la page?"
429
 
430
+ #: lib/wfu_constants.php:131
431
  msgid "This is a test message"
432
  msgstr "Ceci est un message de test"
433
 
434
+ #: lib/wfu_constants.php:132
435
  msgid "This is a test administrator message"
436
  msgstr "Ceci est un message administrateur de test"
437
 
438
+ #: lib/wfu_constants.php:133
439
  msgid "File testfile 1 under test"
440
  msgstr "File testfile 1 under test"
441
 
442
+ #: lib/wfu_constants.php:134
443
  msgid "File testfile 1 message"
444
  msgstr "File testfile 1 message"
445
 
446
+ #: lib/wfu_constants.php:135
447
  msgid "File testfile 1 administrator message"
448
  msgstr "Message administrateur File testfile"
449
 
450
+ #: lib/wfu_constants.php:136
451
  msgid "File testfile 2 under test"
452
  msgstr "En test File testfile"
453
 
454
+ #: lib/wfu_constants.php:137
455
  msgid "File testfile 2 message"
456
  msgstr "Message File testfile 2"
457
 
458
+ #: lib/wfu_constants.php:138
459
  msgid "File testfile 2 administrator message"
460
  msgstr "Message administrateur File testfile 2"
461
 
462
+ #: lib/wfu_constants.php:141
463
  msgid ""
464
  "Failed to add the shortcode to the page/post. Please try again. If the "
465
  "message persists, contact administrator."
467
  "Impossible d' ajouter le shortcode à la page / poste. S' il vous plaît "
468
  "essayer à nouveau. Si le message persiste, contactez l' administrateur."
469
 
470
+ #: lib/wfu_constants.php:142
471
  msgid ""
472
  "Failed to edit the shortcode because the contents of the page changed. Try "
473
  "again to edit the shortcode."
475
  "Impossible de modifier le shortcode parce que le contenu de la page changé. "
476
  "Essayez à nouveau de modifier le shortcode."
477
 
478
+ #: lib/wfu_constants.php:143
479
  msgid ""
480
  "Failed to delete the shortcode because the contents of the page changed. Try "
481
  "again to delete it."
483
  "Impossible de supprimer le shortcode parce que le contenu de la page changé. "
484
  "Essayez à nouveau de le supprimer."
485
 
486
+ #: lib/wfu_constants.php:144
487
  msgid ""
488
  "The page containing the shortcode has been modified and it is no longer "
489
  "valid. Please go back to reload the shortcode."
491
  "La page contenant le shortcode a été modifié et il est plus valide. S'il "
492
  "vous plaît revenir à recharger le shortcode."
493
 
494
+ #: lib/wfu_constants.php:145
495
  msgid ""
496
  "Failed to update the shortcode because the contents of the page changed. Go "
497
  "back to reload the shortcode."
499
  "Impossible de mettre à jour le shortcode parce que le contenu de la page "
500
  "changé. Retour à recharger le shortcode."
501
 
502
+ #: lib/wfu_constants.php:146
503
  msgid ""
504
  "Failed to update the shortcode. Please try again. If the problem persists, "
505
  "go back and reload the shortcode."
507
  "Impossible de mettre à jour le shortcode. S'il vous plaît essayer à nouveau. "
508
  "Si le problème persiste, revenir en arrière et recharger le shortcode."
509
 
510
+ #: lib/wfu_constants.php:149
511
  msgid ""
512
  "Insert variable %userid% inside text. It will be replaced by the id of the "
513
  "current user."
515
  "Insérez %userid% variable dans le texte. Il sera remplacé par l'id de "
516
  "l'utilisateur courant."
517
 
518
+ #: lib/wfu_constants.php:150
519
  msgid ""
520
  "Insert variable %username% inside text. It will be replaced by the username "
521
  "of the current user."
523
  "Insérez la variable %username% dans le texte. Il sera remplacé par le "
524
  "username de l'utilisateur courant."
525
 
526
+ #: lib/wfu_constants.php:151
527
  msgid ""
528
  "Insert variable %useremail% inside text. It will be replaced by the email of "
529
  "the current user."
531
  "Insérez la variable %useremail% dans le texte. Il sera remplacé par l'email "
532
  "de l'utilisateur courant."
533
 
534
+ #: lib/wfu_constants.php:152
535
  msgid ""
536
  "Insert variable %filename% inside text. It will be replaced by the filename "
537
  "of the uploaded file."
539
  "Insérez la variable %filename% dans le texte. Il sera remplacé par le nom du "
540
  "fichier à envoyer."
541
 
542
+ #: lib/wfu_constants.php:153
543
  msgid ""
544
  "Insert variable %filepath% inside text. It will be replaced by the full "
545
  "filepath of the uploaded file."
547
  "Insérez la variable %filepath% dans le texte. Il sera remplacé par le chemin "
548
  "complet du fichier envoyé."
549
 
550
+ #: lib/wfu_constants.php:154
551
  msgid ""
552
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
553
  "the website."
555
  "Insérez la variable %blogid% dans le texte. Il sera remplacé par l'id du "
556
  "blog du site web."
557
 
558
+ #: lib/wfu_constants.php:155
559
  msgid ""
560
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
561
  "current page."
563
  "Insérez %pageid% variable dans le texte. Il sera remplacé par l'id de la "
564
  "page en cours."
565
 
566
+ #: lib/wfu_constants.php:156
567
  msgid ""
568
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
569
  "the current page."
571
  "Insérez %pagetitle% variable dans le texte. Il sera remplacé par le titre de "
572
  "la page courante."
573
 
574
+ #: lib/wfu_constants.php:157
575
  msgid ""
576
  "Insert variable %userdataXXX% inside text. Select the user field from the "
577
  "drop-down list. It will be replaced by the value that the user entered in "
581
  "l'utilisateur dans la liste déroulante. Il sera remplacé par la valeur que "
582
  "l'utilisateur aura entré dans ce champs."
583
 
584
+ #: lib/wfu_constants.php:158
585
  msgid "Insert variable %n% inside text to denote a line change."
586
  msgstr ""
587
  "Insérez la variable %n% à l'intérieur du texte pour indiquer un changement "
588
  "de ligne."
589
 
590
+ #: lib/wfu_constants.php:161
591
  msgid "Upload in progress"
592
  msgstr "Envoi en cours"
593
 
594
+ #: lib/wfu_constants.php:162
595
  msgid "Upload in progress with warnings!"
596
  msgstr "Envoi en cours mais avec des avertissements!"
597
 
598
+ #: lib/wfu_constants.php:163
599
  msgid "Upload in progress but some files already failed!"
600
  msgstr "Envoi en cours mais certains fichiers ont échoués!"
601
 
602
+ #: lib/wfu_constants.php:164
603
  msgid "Upload in progress but no files uploaded so far!"
604
  msgstr "Envoi en cours mais aucun fichiers n'a été envoyé pour le moment!"
605
 
606
+ #: lib/wfu_constants.php:165
607
  msgid "All files uploaded successfully"
608
  msgstr "Tous les fichiers ont été envoyés avec succès"
609
 
610
+ #: lib/wfu_constants.php:166
611
  msgid "All files uploaded successfully but there are warnings!"
612
  msgstr ""
613
  "Tous les fichiers ont été envoyer avec succès mais avec des avertissements!"
614
 
615
+ #: lib/wfu_constants.php:167
616
  msgid "File uploaded successfully but there are warnings!"
617
  msgstr "Fichiers envoyés avec succès mais certain avec un avertissement."
618
 
619
+ #: lib/wfu_constants.php:168
620
  msgid "Some files failed to upload!"
621
  msgstr "Certains fichiers n'ont pas été envoyé"
622
 
623
+ #: lib/wfu_constants.php:169
624
  msgid "All files failed to upload"
625
  msgstr "Impossible d'envoyer les fichiers"
626
 
627
+ #: lib/wfu_constants.php:170
628
  msgid "File failed to upload"
629
  msgstr "Impossible d'envoyer le fichier"
630
 
631
+ #: lib/wfu_constants.php:171
632
  msgid "There are no files to upload!"
633
  msgstr "Il n'y a pas de fichiers à envoyer"
634
 
635
+ #: lib/wfu_constants.php:172
636
  msgid "Test upload message"
637
  msgstr "Message de test d'upload"
638
 
639
+ #: lib/wfu_constants.php:173
640
  msgid "JSON parse warning!"
641
  msgstr "Avertisements d'analyse JSON."
642
 
643
+ #: lib/wfu_constants.php:174
644
  msgid "please wait while redirecting..."
645
  msgstr "merci de patienter pendans la redirection..."
646
 
647
+ #: lib/wfu_constants.php:175
648
  msgid "Open visual shortcode editor in new window"
649
  msgstr "Ouvrez l'éditeur de shortcode visuelle dans une nouvelle fenêtre"
650
 
651
+ #: lib/wfu_constants.php:176
652
  msgid "loading visual editor"
653
  msgstr "chargement éditeur visuel"
654
 
languages/wordpress-file-upload-sr_RS.mo CHANGED
Binary file
languages/wordpress-file-upload-sr_RS.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-07-01 20:13+0200\n"
6
- "PO-Revision-Date: 2015-07-01 20:13+0200\n"
7
  "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: sr\n"
@@ -286,10 +286,50 @@ msgstr ""
286
  "greške prilikom parsiranja."
287
 
288
  #: lib/wfu_constants.php:97
 
 
 
 
289
  msgid "cannot be empty!"
290
  msgstr "ne može biti prazno!"
291
 
292
- #: lib/wfu_constants.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  msgid ""
294
  "There are more than one instances of the plugin in this page with the same "
295
  "id. Please change it."
@@ -297,7 +337,7 @@ msgstr ""
297
  "Na ovoj stranici ima više od jednog primera plugin-a sa istom "
298
  "identifikacijom."
299
 
300
- #: lib/wfu_constants.php:99
301
  msgid ""
302
  "Cannot edit the shortcode because the page has been modified. Please reload "
303
  "the page."
@@ -305,24 +345,24 @@ msgstr ""
305
  "Shortcode ne može da se uredi zato što stranica nije modifikovana. Ponovo "
306
  "učitajte stranicu."
307
 
308
- #: lib/wfu_constants.php:102
309
  msgid "Upload skipped! File already exists."
310
  msgstr "Otpremanje preskočeno! Datoteka već postoji."
311
 
312
- #: lib/wfu_constants.php:103
313
  msgid "No files have been selected!"
314
  msgstr "Datoteke nisu odabrane!"
315
 
316
- #: lib/wfu_constants.php:104
317
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
318
  msgstr ""
319
  "WPFilebase Plugin nije ažuriran zato što nije bilo otpremljenih datoteka."
320
 
321
- #: lib/wfu_constants.php:105
322
  msgid "Notification email was not sent because there were no files uploaded."
323
  msgstr "Mail obaveštenja nije poslat jer nije bilo otpremljenih datoteka."
324
 
325
- #: lib/wfu_constants.php:106
326
  msgid ""
327
  "Notification email was not sent because no recipients were defined. Please "
328
  "check notifyrecipients attribute in the shortcode."
@@ -330,7 +370,7 @@ msgstr ""
330
  "Mail obaveštenja nije poslat jer nije bilo navedenih primalaca. Proverite "
331
  "notifyrecipients atribut u shortcode-u."
332
 
333
- #: lib/wfu_constants.php:107
334
  msgid ""
335
  "Notification email was not sent due to an error. Please check "
336
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
@@ -338,7 +378,7 @@ msgstr ""
338
  "Mail obaveštenja nije poslat zbog greške. Proverite notifyrecipients, "
339
  "notifysubject i notifymessage atribute da biste našli greške."
340
 
341
- #: lib/wfu_constants.php:108
342
  msgid ""
343
  "Redirection not executed because redirection link is empty. Please check "
344
  "redirectlink attribute."
@@ -346,79 +386,79 @@ msgstr ""
346
  "Preusmeravanje nije izvršeno zato što je link za preusmeravanje prazan. "
347
  "Proverite redirectlink atribut."
348
 
349
- #: lib/wfu_constants.php:109
350
  msgid ""
351
  "Redirection not executed because not all files were successfully uploaded."
352
  msgstr ""
353
  "Preusmeravanje nije izvršeno zato što nisu sve datoteke uspešno otpremljene."
354
 
355
- #: lib/wfu_constants.php:112
356
  msgid "Test Mode"
357
  msgstr "Režim testiranja"
358
 
359
- #: lib/wfu_constants.php:113
360
  msgid "select dir..."
361
  msgstr "odaberite dir..."
362
 
363
- #: lib/wfu_constants.php:114
364
  msgid "type dir"
365
  msgstr "vrsta direktorijuma "
366
 
367
- #: lib/wfu_constants.php:115
368
  msgid "Upload path: %filepath%"
369
  msgstr "Putanja otpremanja: %filepath%"
370
 
371
- #: lib/wfu_constants.php:116
372
  msgid "Failed upload path: %filepath%"
373
  msgstr "Putanja otpremanja neuspešna: %filepath%"
374
 
375
- #: lib/wfu_constants.php:117
376
  msgid " (required)"
377
  msgstr "(obavezna)"
378
 
379
- #: lib/wfu_constants.php:118
380
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
381
  msgstr "Datoteke su otpremljene. Da li sigurno želite da napustite stranicu?"
382
 
383
- #: lib/wfu_constants.php:121
384
  msgid "This is a test message"
385
  msgstr "Ovo je poruka testa"
386
 
387
- #: lib/wfu_constants.php:122
388
  msgid "This is a test administrator message"
389
  msgstr "Ovo je poruka testa administratora "
390
 
391
- #: lib/wfu_constants.php:123
392
  msgid "File testfile 1 under test"
393
  msgstr "Datoteka testfile 1 na testiranju"
394
 
395
- #: lib/wfu_constants.php:124
396
  msgid "File testfile 1 message"
397
  msgstr "Datoteka testfile 1 poruka"
398
 
399
- #: lib/wfu_constants.php:125
400
  msgid "File testfile 1 administrator message"
401
  msgstr "Datoteka testfile 1 poruka administratora"
402
 
403
- #: lib/wfu_constants.php:126
404
  msgid "File testfile 2 under test"
405
  msgstr "Datoteka testfile 2 na testiranju"
406
 
407
- #: lib/wfu_constants.php:127
408
  msgid "File testfile 2 message"
409
  msgstr "Datoteka testfile 2 poruka"
410
 
411
- #: lib/wfu_constants.php:128
412
  msgid "File testfile 2 administrator message"
413
  msgstr "Datoteka testfile 2 poruka administratora"
414
 
415
- #: lib/wfu_constants.php:131
416
  msgid ""
417
  "Failed to add the shortcode to the page/post. Please try again. If the "
418
  "message persists, contact administrator."
419
  msgstr ""
420
 
421
- #: lib/wfu_constants.php:132
422
  msgid ""
423
  "Failed to edit the shortcode because the contents of the page changed. Try "
424
  "again to edit the shortcode."
@@ -426,7 +466,7 @@ msgstr ""
426
  "Neuspešno uređivanje shortcode-a zbog izmene sadržaja stranice. Pokušajte "
427
  "ponovo da uredite shortcode."
428
 
429
- #: lib/wfu_constants.php:133
430
  msgid ""
431
  "Failed to delete the shortcode because the contents of the page changed. Try "
432
  "again to delete it."
@@ -434,7 +474,7 @@ msgstr ""
434
  "Neuspešno brisanje shortcode-a zbog izmene sadržaja stranice. Pokušajte "
435
  "ponovo da ga obrišete."
436
 
437
- #: lib/wfu_constants.php:134
438
  msgid ""
439
  "The page containing the shortcode has been modified and it is no longer "
440
  "valid. Please go back to reload the shortcode."
@@ -442,7 +482,7 @@ msgstr ""
442
  "Stranica koja sadrži shortcode je izmenjena i više nije validna. Vratite se "
443
  "da ponovo učitate shortcode."
444
 
445
- #: lib/wfu_constants.php:135
446
  msgid ""
447
  "Failed to update the shortcode because the contents of the page changed. Go "
448
  "back to reload the shortcode."
@@ -450,7 +490,7 @@ msgstr ""
450
  "Neuspešno ažuriranje shortcode-a zbog izmene sadržaja stranice. Vratite se "
451
  "da ponovo učitate shortcode."
452
 
453
- #: lib/wfu_constants.php:136
454
  msgid ""
455
  "Failed to update the shortcode. Please try again. If the problem persists, "
456
  "go back and reload the shortcode."
@@ -458,7 +498,7 @@ msgstr ""
458
  "Neuspešno ažuriranje shortcode-a. Pokušajte ponovo. Ako se problem ne reši, "
459
  "vratite se i opet učitajte shortcode."
460
 
461
- #: lib/wfu_constants.php:139
462
  msgid ""
463
  "Insert variable %userid% inside text. It will be replaced by the id of the "
464
  "current user."
@@ -466,7 +506,7 @@ msgstr ""
466
  "Unesite promenljivu %idkorisnika% u tekst. Biće zamenjena id-jem tekućeg "
467
  "korisnika."
468
 
469
- #: lib/wfu_constants.php:140
470
  msgid ""
471
  "Insert variable %username% inside text. It will be replaced by the username "
472
  "of the current user."
@@ -474,7 +514,7 @@ msgstr ""
474
  "Unesite promenljivu %korisničko ime% u tekst. Biće zamenjena korisničkim "
475
  "imenom tekućeg korisnika."
476
 
477
- #: lib/wfu_constants.php:141
478
  msgid ""
479
  "Insert variable %useremail% inside text. It will be replaced by the email of "
480
  "the current user."
@@ -482,7 +522,7 @@ msgstr ""
482
  "Unesite promenljivu %mailkorisnika% u tekst. Biće zamenjena mail-om tekućeg "
483
  "korisnika."
484
 
485
- #: lib/wfu_constants.php:142
486
  msgid ""
487
  "Insert variable %filename% inside text. It will be replaced by the filename "
488
  "of the uploaded file."
@@ -490,7 +530,7 @@ msgstr ""
490
  "Unesite promenljivu %nazivdatoteke% u tekst. Biće zamenjena nazivom "
491
  "otpremljene datoteke."
492
 
493
- #: lib/wfu_constants.php:143
494
  msgid ""
495
  "Insert variable %filepath% inside text. It will be replaced by the full "
496
  "filepath of the uploaded file."
@@ -498,7 +538,7 @@ msgstr ""
498
  "Unesite promenljivu %putanjadatoteke% u tekst. Biće zamenjena celom putanjom "
499
  "otpremljene datoteke."
500
 
501
- #: lib/wfu_constants.php:144
502
  msgid ""
503
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
504
  "the website."
@@ -506,7 +546,7 @@ msgstr ""
506
  "Unesite promenljivu %idbloga% u tekst. Biće zamenjena id-jem bloga web site-"
507
  "a."
508
 
509
- #: lib/wfu_constants.php:145
510
  msgid ""
511
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
512
  "current page."
@@ -514,7 +554,7 @@ msgstr ""
514
  "Unesite promenljivu %idstranice% u tekst. Biće zamenjena id-jem tekuće "
515
  "stranice."
516
 
517
- #: lib/wfu_constants.php:146
518
  msgid ""
519
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
520
  "the current page."
@@ -522,7 +562,7 @@ msgstr ""
522
  "Unesite promenljivu %naslovstranice% u tekst. Biće zamenjena naslovom tekuće "
523
  "stranice."
524
 
525
- #: lib/wfu_constants.php:147
526
  msgid ""
527
  "Insert variable %userdataXXX% inside text. Select the user field from the "
528
  "drop-down list. It will be replaced by the value that the user entered in "
@@ -531,71 +571,71 @@ msgstr ""
531
  "Unesite promenljivu %korisnički podaciXXX%. Odaberite korisničko polje iz "
532
  "opadajuće liste. Biće zamenjena vrednošću koju je korisnik uneo u ovo polje."
533
 
534
- #: lib/wfu_constants.php:148
535
  msgid "Insert variable %n% inside text to denote a line change."
536
  msgstr "Unesite promenljivu %n% u tekst kako biste označili promenu reda."
537
 
538
- #: lib/wfu_constants.php:151
539
  msgid "Upload in progress"
540
  msgstr "Otpremanje u toku"
541
 
542
- #: lib/wfu_constants.php:152
543
  msgid "Upload in progress with warnings!"
544
  msgstr "Otpremanje sa upozorenjima u toku!"
545
 
546
- #: lib/wfu_constants.php:153
547
  msgid "Upload in progress but some files already failed!"
548
  msgstr "Otpremanje u toku, ali neke datoteke već nisu uspešno otpremljene!"
549
 
550
- #: lib/wfu_constants.php:154
551
  msgid "Upload in progress but no files uploaded so far!"
552
  msgstr "Otpremanje u toku, ali do sada nisu otpremljene nikakve datoteke!"
553
 
554
- #: lib/wfu_constants.php:155
555
  msgid "All files uploaded successfully"
556
  msgstr "Sve datoteke uspešno su otpremljene"
557
 
558
- #: lib/wfu_constants.php:156
559
  msgid "All files uploaded successfully but there are warnings!"
560
  msgstr "Sve datoteke uspešno su otpremljene, ali postoje upozorenja!"
561
 
562
- #: lib/wfu_constants.php:157
563
  msgid "File uploaded successfully but there are warnings!"
564
  msgstr "Datoteka je uspešno otpremljena, ali postoje upozorenja!"
565
 
566
- #: lib/wfu_constants.php:158
567
  msgid "Some files failed to upload!"
568
  msgstr "Neke datoteke nisu otpremljene!"
569
 
570
- #: lib/wfu_constants.php:159
571
  msgid "All files failed to upload"
572
  msgstr "Nijedna datoteka nije otpremljena"
573
 
574
- #: lib/wfu_constants.php:160
575
  msgid "File failed to upload"
576
  msgstr "Datoteka nije uspešno otpremljena"
577
 
578
- #: lib/wfu_constants.php:161
579
  msgid "There are no files to upload!"
580
  msgstr "Nema datoteka za otpremanje"
581
 
582
- #: lib/wfu_constants.php:162
583
  msgid "Test upload message"
584
  msgstr "Testiraj poruku za otpremanje"
585
 
586
- #: lib/wfu_constants.php:163
587
  msgid "JSON parse warning!"
588
  msgstr "Upozorenje za JSON parsiranje!"
589
 
590
- #: lib/wfu_constants.php:164
591
  msgid "please wait while redirecting..."
592
  msgstr "Molimo sačekajte preusmeravanje..."
593
 
594
- #: lib/wfu_constants.php:165
595
  msgid "Open visual shortcode editor in new window"
596
  msgstr "Otvori vizuelni shortcode uređivač u novom prozoru"
597
 
598
- #: lib/wfu_constants.php:166
599
  msgid "loading visual editor"
600
  msgstr "učitavanje vizuelnog uređivača"
601
 
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-21 21:17+0200\n"
6
+ "PO-Revision-Date: 2015-09-21 21:17+0200\n"
7
  "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: sr\n"
286
  "greške prilikom parsiranja."
287
 
288
  #: lib/wfu_constants.php:97
289
+ msgid "Please enable popup windows from the browser's settings!"
290
+ msgstr ""
291
+
292
+ #: lib/wfu_constants.php:98
293
  msgid "cannot be empty!"
294
  msgstr "ne može biti prazno!"
295
 
296
+ #: lib/wfu_constants.php:99
297
+ msgid "number not valid!"
298
+ msgstr ""
299
+
300
+ #: lib/wfu_constants.php:100
301
+ msgid "email not valid!"
302
+ msgstr ""
303
+
304
+ #: lib/wfu_constants.php:101
305
+ msgid "emails do not match!"
306
+ msgstr ""
307
+
308
+ #: lib/wfu_constants.php:102
309
+ msgid "no base email field in group!"
310
+ msgstr ""
311
+
312
+ #: lib/wfu_constants.php:103
313
+ msgid "passwords do not match!"
314
+ msgstr ""
315
+
316
+ #: lib/wfu_constants.php:104
317
+ msgid "no base password field in group!"
318
+ msgstr ""
319
+
320
+ #: lib/wfu_constants.php:105
321
+ msgid "checkbox unchecked!"
322
+ msgstr ""
323
+
324
+ #: lib/wfu_constants.php:106
325
+ msgid "no option selected!"
326
+ msgstr ""
327
+
328
+ #: lib/wfu_constants.php:107
329
+ msgid "no item selected!"
330
+ msgstr ""
331
+
332
+ #: lib/wfu_constants.php:108
333
  msgid ""
334
  "There are more than one instances of the plugin in this page with the same "
335
  "id. Please change it."
337
  "Na ovoj stranici ima više od jednog primera plugin-a sa istom "
338
  "identifikacijom."
339
 
340
+ #: lib/wfu_constants.php:109
341
  msgid ""
342
  "Cannot edit the shortcode because the page has been modified. Please reload "
343
  "the page."
345
  "Shortcode ne može da se uredi zato što stranica nije modifikovana. Ponovo "
346
  "učitajte stranicu."
347
 
348
+ #: lib/wfu_constants.php:112
349
  msgid "Upload skipped! File already exists."
350
  msgstr "Otpremanje preskočeno! Datoteka već postoji."
351
 
352
+ #: lib/wfu_constants.php:113
353
  msgid "No files have been selected!"
354
  msgstr "Datoteke nisu odabrane!"
355
 
356
+ #: lib/wfu_constants.php:114
357
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
358
  msgstr ""
359
  "WPFilebase Plugin nije ažuriran zato što nije bilo otpremljenih datoteka."
360
 
361
+ #: lib/wfu_constants.php:115
362
  msgid "Notification email was not sent because there were no files uploaded."
363
  msgstr "Mail obaveštenja nije poslat jer nije bilo otpremljenih datoteka."
364
 
365
+ #: lib/wfu_constants.php:116
366
  msgid ""
367
  "Notification email was not sent because no recipients were defined. Please "
368
  "check notifyrecipients attribute in the shortcode."
370
  "Mail obaveštenja nije poslat jer nije bilo navedenih primalaca. Proverite "
371
  "notifyrecipients atribut u shortcode-u."
372
 
373
+ #: lib/wfu_constants.php:117
374
  msgid ""
375
  "Notification email was not sent due to an error. Please check "
376
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
378
  "Mail obaveštenja nije poslat zbog greške. Proverite notifyrecipients, "
379
  "notifysubject i notifymessage atribute da biste našli greške."
380
 
381
+ #: lib/wfu_constants.php:118
382
  msgid ""
383
  "Redirection not executed because redirection link is empty. Please check "
384
  "redirectlink attribute."
386
  "Preusmeravanje nije izvršeno zato što je link za preusmeravanje prazan. "
387
  "Proverite redirectlink atribut."
388
 
389
+ #: lib/wfu_constants.php:119
390
  msgid ""
391
  "Redirection not executed because not all files were successfully uploaded."
392
  msgstr ""
393
  "Preusmeravanje nije izvršeno zato što nisu sve datoteke uspešno otpremljene."
394
 
395
+ #: lib/wfu_constants.php:122
396
  msgid "Test Mode"
397
  msgstr "Režim testiranja"
398
 
399
+ #: lib/wfu_constants.php:123
400
  msgid "select dir..."
401
  msgstr "odaberite dir..."
402
 
403
+ #: lib/wfu_constants.php:124
404
  msgid "type dir"
405
  msgstr "vrsta direktorijuma "
406
 
407
+ #: lib/wfu_constants.php:125
408
  msgid "Upload path: %filepath%"
409
  msgstr "Putanja otpremanja: %filepath%"
410
 
411
+ #: lib/wfu_constants.php:126
412
  msgid "Failed upload path: %filepath%"
413
  msgstr "Putanja otpremanja neuspešna: %filepath%"
414
 
415
+ #: lib/wfu_constants.php:127
416
  msgid " (required)"
417
  msgstr "(obavezna)"
418
 
419
+ #: lib/wfu_constants.php:128
420
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
421
  msgstr "Datoteke su otpremljene. Da li sigurno želite da napustite stranicu?"
422
 
423
+ #: lib/wfu_constants.php:131
424
  msgid "This is a test message"
425
  msgstr "Ovo je poruka testa"
426
 
427
+ #: lib/wfu_constants.php:132
428
  msgid "This is a test administrator message"
429
  msgstr "Ovo je poruka testa administratora "
430
 
431
+ #: lib/wfu_constants.php:133
432
  msgid "File testfile 1 under test"
433
  msgstr "Datoteka testfile 1 na testiranju"
434
 
435
+ #: lib/wfu_constants.php:134
436
  msgid "File testfile 1 message"
437
  msgstr "Datoteka testfile 1 poruka"
438
 
439
+ #: lib/wfu_constants.php:135
440
  msgid "File testfile 1 administrator message"
441
  msgstr "Datoteka testfile 1 poruka administratora"
442
 
443
+ #: lib/wfu_constants.php:136
444
  msgid "File testfile 2 under test"
445
  msgstr "Datoteka testfile 2 na testiranju"
446
 
447
+ #: lib/wfu_constants.php:137
448
  msgid "File testfile 2 message"
449
  msgstr "Datoteka testfile 2 poruka"
450
 
451
+ #: lib/wfu_constants.php:138
452
  msgid "File testfile 2 administrator message"
453
  msgstr "Datoteka testfile 2 poruka administratora"
454
 
455
+ #: lib/wfu_constants.php:141
456
  msgid ""
457
  "Failed to add the shortcode to the page/post. Please try again. If the "
458
  "message persists, contact administrator."
459
  msgstr ""
460
 
461
+ #: lib/wfu_constants.php:142
462
  msgid ""
463
  "Failed to edit the shortcode because the contents of the page changed. Try "
464
  "again to edit the shortcode."
466
  "Neuspešno uređivanje shortcode-a zbog izmene sadržaja stranice. Pokušajte "
467
  "ponovo da uredite shortcode."
468
 
469
+ #: lib/wfu_constants.php:143
470
  msgid ""
471
  "Failed to delete the shortcode because the contents of the page changed. Try "
472
  "again to delete it."
474
  "Neuspešno brisanje shortcode-a zbog izmene sadržaja stranice. Pokušajte "
475
  "ponovo da ga obrišete."
476
 
477
+ #: lib/wfu_constants.php:144
478
  msgid ""
479
  "The page containing the shortcode has been modified and it is no longer "
480
  "valid. Please go back to reload the shortcode."
482
  "Stranica koja sadrži shortcode je izmenjena i više nije validna. Vratite se "
483
  "da ponovo učitate shortcode."
484
 
485
+ #: lib/wfu_constants.php:145
486
  msgid ""
487
  "Failed to update the shortcode because the contents of the page changed. Go "
488
  "back to reload the shortcode."
490
  "Neuspešno ažuriranje shortcode-a zbog izmene sadržaja stranice. Vratite se "
491
  "da ponovo učitate shortcode."
492
 
493
+ #: lib/wfu_constants.php:146
494
  msgid ""
495
  "Failed to update the shortcode. Please try again. If the problem persists, "
496
  "go back and reload the shortcode."
498
  "Neuspešno ažuriranje shortcode-a. Pokušajte ponovo. Ako se problem ne reši, "
499
  "vratite se i opet učitajte shortcode."
500
 
501
+ #: lib/wfu_constants.php:149
502
  msgid ""
503
  "Insert variable %userid% inside text. It will be replaced by the id of the "
504
  "current user."
506
  "Unesite promenljivu %idkorisnika% u tekst. Biće zamenjena id-jem tekućeg "
507
  "korisnika."
508
 
509
+ #: lib/wfu_constants.php:150
510
  msgid ""
511
  "Insert variable %username% inside text. It will be replaced by the username "
512
  "of the current user."
514
  "Unesite promenljivu %korisničko ime% u tekst. Biće zamenjena korisničkim "
515
  "imenom tekućeg korisnika."
516
 
517
+ #: lib/wfu_constants.php:151
518
  msgid ""
519
  "Insert variable %useremail% inside text. It will be replaced by the email of "
520
  "the current user."
522
  "Unesite promenljivu %mailkorisnika% u tekst. Biće zamenjena mail-om tekućeg "
523
  "korisnika."
524
 
525
+ #: lib/wfu_constants.php:152
526
  msgid ""
527
  "Insert variable %filename% inside text. It will be replaced by the filename "
528
  "of the uploaded file."
530
  "Unesite promenljivu %nazivdatoteke% u tekst. Biće zamenjena nazivom "
531
  "otpremljene datoteke."
532
 
533
+ #: lib/wfu_constants.php:153
534
  msgid ""
535
  "Insert variable %filepath% inside text. It will be replaced by the full "
536
  "filepath of the uploaded file."
538
  "Unesite promenljivu %putanjadatoteke% u tekst. Biće zamenjena celom putanjom "
539
  "otpremljene datoteke."
540
 
541
+ #: lib/wfu_constants.php:154
542
  msgid ""
543
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
544
  "the website."
546
  "Unesite promenljivu %idbloga% u tekst. Biće zamenjena id-jem bloga web site-"
547
  "a."
548
 
549
+ #: lib/wfu_constants.php:155
550
  msgid ""
551
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
552
  "current page."
554
  "Unesite promenljivu %idstranice% u tekst. Biće zamenjena id-jem tekuće "
555
  "stranice."
556
 
557
+ #: lib/wfu_constants.php:156
558
  msgid ""
559
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
560
  "the current page."
562
  "Unesite promenljivu %naslovstranice% u tekst. Biće zamenjena naslovom tekuće "
563
  "stranice."
564
 
565
+ #: lib/wfu_constants.php:157
566
  msgid ""
567
  "Insert variable %userdataXXX% inside text. Select the user field from the "
568
  "drop-down list. It will be replaced by the value that the user entered in "
571
  "Unesite promenljivu %korisnički podaciXXX%. Odaberite korisničko polje iz "
572
  "opadajuće liste. Biće zamenjena vrednošću koju je korisnik uneo u ovo polje."
573
 
574
+ #: lib/wfu_constants.php:158
575
  msgid "Insert variable %n% inside text to denote a line change."
576
  msgstr "Unesite promenljivu %n% u tekst kako biste označili promenu reda."
577
 
578
+ #: lib/wfu_constants.php:161
579
  msgid "Upload in progress"
580
  msgstr "Otpremanje u toku"
581
 
582
+ #: lib/wfu_constants.php:162
583
  msgid "Upload in progress with warnings!"
584
  msgstr "Otpremanje sa upozorenjima u toku!"
585
 
586
+ #: lib/wfu_constants.php:163
587
  msgid "Upload in progress but some files already failed!"
588
  msgstr "Otpremanje u toku, ali neke datoteke već nisu uspešno otpremljene!"
589
 
590
+ #: lib/wfu_constants.php:164
591
  msgid "Upload in progress but no files uploaded so far!"
592
  msgstr "Otpremanje u toku, ali do sada nisu otpremljene nikakve datoteke!"
593
 
594
+ #: lib/wfu_constants.php:165
595
  msgid "All files uploaded successfully"
596
  msgstr "Sve datoteke uspešno su otpremljene"
597
 
598
+ #: lib/wfu_constants.php:166
599
  msgid "All files uploaded successfully but there are warnings!"
600
  msgstr "Sve datoteke uspešno su otpremljene, ali postoje upozorenja!"
601
 
602
+ #: lib/wfu_constants.php:167
603
  msgid "File uploaded successfully but there are warnings!"
604
  msgstr "Datoteka je uspešno otpremljena, ali postoje upozorenja!"
605
 
606
+ #: lib/wfu_constants.php:168
607
  msgid "Some files failed to upload!"
608
  msgstr "Neke datoteke nisu otpremljene!"
609
 
610
+ #: lib/wfu_constants.php:169
611
  msgid "All files failed to upload"
612
  msgstr "Nijedna datoteka nije otpremljena"
613
 
614
+ #: lib/wfu_constants.php:170
615
  msgid "File failed to upload"
616
  msgstr "Datoteka nije uspešno otpremljena"
617
 
618
+ #: lib/wfu_constants.php:171
619
  msgid "There are no files to upload!"
620
  msgstr "Nema datoteka za otpremanje"
621
 
622
+ #: lib/wfu_constants.php:172
623
  msgid "Test upload message"
624
  msgstr "Testiraj poruku za otpremanje"
625
 
626
+ #: lib/wfu_constants.php:173
627
  msgid "JSON parse warning!"
628
  msgstr "Upozorenje za JSON parsiranje!"
629
 
630
+ #: lib/wfu_constants.php:174
631
  msgid "please wait while redirecting..."
632
  msgstr "Molimo sačekajte preusmeravanje..."
633
 
634
+ #: lib/wfu_constants.php:175
635
  msgid "Open visual shortcode editor in new window"
636
  msgstr "Otvori vizuelni shortcode uređivač u novom prozoru"
637
 
638
+ #: lib/wfu_constants.php:176
639
  msgid "loading visual editor"
640
  msgstr "učitavanje vizuelnog uređivača"
641
 
languages/wordpress-file-upload.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-08-14 22:02+0200\n"
6
- "PO-Revision-Date: 2015-08-14 22:02+0200\n"
7
  "Last-Translator: nickboss <info@iptanus.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: en\n"
@@ -241,275 +241,315 @@ msgid ""
241
  msgstr ""
242
 
243
  #: lib/wfu_constants.php:97
244
- msgid "cannot be empty!"
245
  msgstr ""
246
 
247
  #: lib/wfu_constants.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  msgid ""
249
  "There are more than one instances of the plugin in this page with the same "
250
  "id. Please change it."
251
  msgstr ""
252
 
253
- #: lib/wfu_constants.php:99
254
  msgid ""
255
  "Cannot edit the shortcode because the page has been modified. Please reload "
256
  "the page."
257
  msgstr ""
258
 
259
- #: lib/wfu_constants.php:102
260
  msgid "Upload skipped! File already exists."
261
  msgstr ""
262
 
263
- #: lib/wfu_constants.php:103
264
  msgid "No files have been selected!"
265
  msgstr ""
266
 
267
- #: lib/wfu_constants.php:104
268
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
269
  msgstr ""
270
 
271
- #: lib/wfu_constants.php:105
272
  msgid "Notification email was not sent because there were no files uploaded."
273
  msgstr ""
274
 
275
- #: lib/wfu_constants.php:106
276
  msgid ""
277
  "Notification email was not sent because no recipients were defined. Please "
278
  "check notifyrecipients attribute in the shortcode."
279
  msgstr ""
280
 
281
- #: lib/wfu_constants.php:107
282
  msgid ""
283
  "Notification email was not sent due to an error. Please check "
284
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
285
  msgstr ""
286
 
287
- #: lib/wfu_constants.php:108
288
  msgid ""
289
  "Redirection not executed because redirection link is empty. Please check "
290
  "redirectlink attribute."
291
  msgstr ""
292
 
293
- #: lib/wfu_constants.php:109
294
  msgid ""
295
  "Redirection not executed because not all files were successfully uploaded."
296
  msgstr ""
297
 
298
- #: lib/wfu_constants.php:112
299
  msgid "Test Mode"
300
  msgstr ""
301
 
302
- #: lib/wfu_constants.php:113
303
  msgid "select dir..."
304
  msgstr ""
305
 
306
- #: lib/wfu_constants.php:114
307
  msgid "type dir"
308
  msgstr ""
309
 
310
- #: lib/wfu_constants.php:115
311
  msgid "Upload path: %filepath%"
312
  msgstr ""
313
 
314
- #: lib/wfu_constants.php:116
315
  msgid "Failed upload path: %filepath%"
316
  msgstr ""
317
 
318
- #: lib/wfu_constants.php:117
319
  msgid " (required)"
320
  msgstr ""
321
 
322
- #: lib/wfu_constants.php:118
323
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
324
  msgstr ""
325
 
326
- #: lib/wfu_constants.php:121
327
  msgid "This is a test message"
328
  msgstr ""
329
 
330
- #: lib/wfu_constants.php:122
331
  msgid "This is a test administrator message"
332
  msgstr ""
333
 
334
- #: lib/wfu_constants.php:123
335
  msgid "File testfile 1 under test"
336
  msgstr ""
337
 
338
- #: lib/wfu_constants.php:124
339
  msgid "File testfile 1 message"
340
  msgstr ""
341
 
342
- #: lib/wfu_constants.php:125
343
  msgid "File testfile 1 administrator message"
344
  msgstr ""
345
 
346
- #: lib/wfu_constants.php:126
347
  msgid "File testfile 2 under test"
348
  msgstr ""
349
 
350
- #: lib/wfu_constants.php:127
351
  msgid "File testfile 2 message"
352
  msgstr ""
353
 
354
- #: lib/wfu_constants.php:128
355
  msgid "File testfile 2 administrator message"
356
  msgstr ""
357
 
358
- #: lib/wfu_constants.php:131
359
  msgid ""
360
  "Failed to add the shortcode to the page/post. Please try again. If the "
361
  "message persists, contact administrator."
362
  msgstr ""
363
 
364
- #: lib/wfu_constants.php:132
365
  msgid ""
366
  "Failed to edit the shortcode because the contents of the page changed. Try "
367
  "again to edit the shortcode."
368
  msgstr ""
369
 
370
- #: lib/wfu_constants.php:133
371
  msgid ""
372
  "Failed to delete the shortcode because the contents of the page changed. Try "
373
  "again to delete it."
374
  msgstr ""
375
 
376
- #: lib/wfu_constants.php:134
377
  msgid ""
378
  "The page containing the shortcode has been modified and it is no longer "
379
  "valid. Please go back to reload the shortcode."
380
  msgstr ""
381
 
382
- #: lib/wfu_constants.php:135
383
  msgid ""
384
  "Failed to update the shortcode because the contents of the page changed. Go "
385
  "back to reload the shortcode."
386
  msgstr ""
387
 
388
- #: lib/wfu_constants.php:136
389
  msgid ""
390
  "Failed to update the shortcode. Please try again. If the problem persists, "
391
  "go back and reload the shortcode."
392
  msgstr ""
393
 
394
- #: lib/wfu_constants.php:139
395
  msgid ""
396
  "Insert variable %userid% inside text. It will be replaced by the id of the "
397
  "current user."
398
  msgstr ""
399
 
400
- #: lib/wfu_constants.php:140
401
  msgid ""
402
  "Insert variable %username% inside text. It will be replaced by the username "
403
  "of the current user."
404
  msgstr ""
405
 
406
- #: lib/wfu_constants.php:141
407
  msgid ""
408
  "Insert variable %useremail% inside text. It will be replaced by the email of "
409
  "the current user."
410
  msgstr ""
411
 
412
- #: lib/wfu_constants.php:142
413
  msgid ""
414
  "Insert variable %filename% inside text. It will be replaced by the filename "
415
  "of the uploaded file."
416
  msgstr ""
417
 
418
- #: lib/wfu_constants.php:143
419
  msgid ""
420
  "Insert variable %filepath% inside text. It will be replaced by the full "
421
  "filepath of the uploaded file."
422
  msgstr ""
423
 
424
- #: lib/wfu_constants.php:144
425
  msgid ""
426
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
427
  "the website."
428
  msgstr ""
429
 
430
- #: lib/wfu_constants.php:145
431
  msgid ""
432
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
433
  "current page."
434
  msgstr ""
435
 
436
- #: lib/wfu_constants.php:146
437
  msgid ""
438
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
439
  "the current page."
440
  msgstr ""
441
 
442
- #: lib/wfu_constants.php:147
443
  msgid ""
444
  "Insert variable %userdataXXX% inside text. Select the user field from the "
445
  "drop-down list. It will be replaced by the value that the user entered in "
446
  "this field."
447
  msgstr ""
448
 
449
- #: lib/wfu_constants.php:148
450
  msgid "Insert variable %n% inside text to denote a line change."
451
  msgstr ""
452
 
453
- #: lib/wfu_constants.php:151
454
  msgid "Upload in progress"
455
  msgstr ""
456
 
457
- #: lib/wfu_constants.php:152
458
  msgid "Upload in progress with warnings!"
459
  msgstr ""
460
 
461
- #: lib/wfu_constants.php:153
462
  msgid "Upload in progress but some files already failed!"
463
  msgstr ""
464
 
465
- #: lib/wfu_constants.php:154
466
  msgid "Upload in progress but no files uploaded so far!"
467
  msgstr ""
468
 
469
- #: lib/wfu_constants.php:155
470
  msgid "All files uploaded successfully"
471
  msgstr ""
472
 
473
- #: lib/wfu_constants.php:156
474
  msgid "All files uploaded successfully but there are warnings!"
475
  msgstr ""
476
 
477
- #: lib/wfu_constants.php:157
478
  msgid "File uploaded successfully but there are warnings!"
479
  msgstr ""
480
 
481
- #: lib/wfu_constants.php:158
482
  msgid "Some files failed to upload!"
483
  msgstr ""
484
 
485
- #: lib/wfu_constants.php:159
486
  msgid "All files failed to upload"
487
  msgstr ""
488
 
489
- #: lib/wfu_constants.php:160
490
  msgid "File failed to upload"
491
  msgstr ""
492
 
493
- #: lib/wfu_constants.php:161
494
  msgid "There are no files to upload!"
495
  msgstr ""
496
 
497
- #: lib/wfu_constants.php:162
498
  msgid "Test upload message"
499
  msgstr ""
500
 
501
- #: lib/wfu_constants.php:163
502
  msgid "JSON parse warning!"
503
  msgstr ""
504
 
505
- #: lib/wfu_constants.php:164
506
  msgid "please wait while redirecting..."
507
  msgstr ""
508
 
509
- #: lib/wfu_constants.php:165
510
  msgid "Open visual shortcode editor in new window"
511
  msgstr ""
512
 
513
- #: lib/wfu_constants.php:166
514
  msgid "loading visual editor"
515
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Wordpress File Upload\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-21 21:15+0200\n"
6
+ "PO-Revision-Date: 2015-09-21 21:16+0200\n"
7
  "Last-Translator: nickboss <info@iptanus.com>\n"
8
  "Language-Team: Iptanus Team <info@iptanus.com>\n"
9
  "Language: en\n"
241
  msgstr ""
242
 
243
  #: lib/wfu_constants.php:97
244
+ msgid "Please enable popup windows from the browser's settings!"
245
  msgstr ""
246
 
247
  #: lib/wfu_constants.php:98
248
+ msgid "cannot be empty!"
249
+ msgstr ""
250
+
251
+ #: lib/wfu_constants.php:99
252
+ msgid "number not valid!"
253
+ msgstr ""
254
+
255
+ #: lib/wfu_constants.php:100
256
+ msgid "email not valid!"
257
+ msgstr ""
258
+
259
+ #: lib/wfu_constants.php:101
260
+ msgid "emails do not match!"
261
+ msgstr ""
262
+
263
+ #: lib/wfu_constants.php:102
264
+ msgid "no base email field in group!"
265
+ msgstr ""
266
+
267
+ #: lib/wfu_constants.php:103
268
+ msgid "passwords do not match!"
269
+ msgstr ""
270
+
271
+ #: lib/wfu_constants.php:104
272
+ msgid "no base password field in group!"
273
+ msgstr ""
274
+
275
+ #: lib/wfu_constants.php:105
276
+ msgid "checkbox unchecked!"
277
+ msgstr ""
278
+
279
+ #: lib/wfu_constants.php:106
280
+ msgid "no option selected!"
281
+ msgstr ""
282
+
283
+ #: lib/wfu_constants.php:107
284
+ msgid "no item selected!"
285
+ msgstr ""
286
+
287
+ #: lib/wfu_constants.php:108
288
  msgid ""
289
  "There are more than one instances of the plugin in this page with the same "
290
  "id. Please change it."
291
  msgstr ""
292
 
293
+ #: lib/wfu_constants.php:109
294
  msgid ""
295
  "Cannot edit the shortcode because the page has been modified. Please reload "
296
  "the page."
297
  msgstr ""
298
 
299
+ #: lib/wfu_constants.php:112
300
  msgid "Upload skipped! File already exists."
301
  msgstr ""
302
 
303
+ #: lib/wfu_constants.php:113
304
  msgid "No files have been selected!"
305
  msgstr ""
306
 
307
+ #: lib/wfu_constants.php:114
308
  msgid "WPFilebase Plugin not updated because there were no files uploaded."
309
  msgstr ""
310
 
311
+ #: lib/wfu_constants.php:115
312
  msgid "Notification email was not sent because there were no files uploaded."
313
  msgstr ""
314
 
315
+ #: lib/wfu_constants.php:116
316
  msgid ""
317
  "Notification email was not sent because no recipients were defined. Please "
318
  "check notifyrecipients attribute in the shortcode."
319
  msgstr ""
320
 
321
+ #: lib/wfu_constants.php:117
322
  msgid ""
323
  "Notification email was not sent due to an error. Please check "
324
  "notifyrecipients, notifysubject and notifymessage attributes for errors."
325
  msgstr ""
326
 
327
+ #: lib/wfu_constants.php:118
328
  msgid ""
329
  "Redirection not executed because redirection link is empty. Please check "
330
  "redirectlink attribute."
331
  msgstr ""
332
 
333
+ #: lib/wfu_constants.php:119
334
  msgid ""
335
  "Redirection not executed because not all files were successfully uploaded."
336
  msgstr ""
337
 
338
+ #: lib/wfu_constants.php:122
339
  msgid "Test Mode"
340
  msgstr ""
341
 
342
+ #: lib/wfu_constants.php:123
343
  msgid "select dir..."
344
  msgstr ""
345
 
346
+ #: lib/wfu_constants.php:124
347
  msgid "type dir"
348
  msgstr ""
349
 
350
+ #: lib/wfu_constants.php:125
351
  msgid "Upload path: %filepath%"
352
  msgstr ""
353
 
354
+ #: lib/wfu_constants.php:126
355
  msgid "Failed upload path: %filepath%"
356
  msgstr ""
357
 
358
+ #: lib/wfu_constants.php:127
359
  msgid " (required)"
360
  msgstr ""
361
 
362
+ #: lib/wfu_constants.php:128
363
  msgid "Files are being uploaded. Are you sure you want to exit the page?"
364
  msgstr ""
365
 
366
+ #: lib/wfu_constants.php:131
367
  msgid "This is a test message"
368
  msgstr ""
369
 
370
+ #: lib/wfu_constants.php:132
371
  msgid "This is a test administrator message"
372
  msgstr ""
373
 
374
+ #: lib/wfu_constants.php:133
375
  msgid "File testfile 1 under test"
376
  msgstr ""
377
 
378
+ #: lib/wfu_constants.php:134
379
  msgid "File testfile 1 message"
380
  msgstr ""
381
 
382
+ #: lib/wfu_constants.php:135
383
  msgid "File testfile 1 administrator message"
384
  msgstr ""
385
 
386
+ #: lib/wfu_constants.php:136
387
  msgid "File testfile 2 under test"
388
  msgstr ""
389
 
390
+ #: lib/wfu_constants.php:137
391
  msgid "File testfile 2 message"
392
  msgstr ""
393
 
394
+ #: lib/wfu_constants.php:138
395
  msgid "File testfile 2 administrator message"
396
  msgstr ""
397
 
398
+ #: lib/wfu_constants.php:141
399
  msgid ""
400
  "Failed to add the shortcode to the page/post. Please try again. If the "
401
  "message persists, contact administrator."
402
  msgstr ""
403
 
404
+ #: lib/wfu_constants.php:142
405
  msgid ""
406
  "Failed to edit the shortcode because the contents of the page changed. Try "
407
  "again to edit the shortcode."
408
  msgstr ""
409
 
410
+ #: lib/wfu_constants.php:143
411
  msgid ""
412
  "Failed to delete the shortcode because the contents of the page changed. Try "
413
  "again to delete it."
414
  msgstr ""
415
 
416
+ #: lib/wfu_constants.php:144
417
  msgid ""
418
  "The page containing the shortcode has been modified and it is no longer "
419
  "valid. Please go back to reload the shortcode."
420
  msgstr ""
421
 
422
+ #: lib/wfu_constants.php:145
423
  msgid ""
424
  "Failed to update the shortcode because the contents of the page changed. Go "
425
  "back to reload the shortcode."
426
  msgstr ""
427
 
428
+ #: lib/wfu_constants.php:146
429
  msgid ""
430
  "Failed to update the shortcode. Please try again. If the problem persists, "
431
  "go back and reload the shortcode."
432
  msgstr ""
433
 
434
+ #: lib/wfu_constants.php:149
435
  msgid ""
436
  "Insert variable %userid% inside text. It will be replaced by the id of the "
437
  "current user."
438
  msgstr ""
439
 
440
+ #: lib/wfu_constants.php:150
441
  msgid ""
442
  "Insert variable %username% inside text. It will be replaced by the username "
443
  "of the current user."
444
  msgstr ""
445
 
446
+ #: lib/wfu_constants.php:151
447
  msgid ""
448
  "Insert variable %useremail% inside text. It will be replaced by the email of "
449
  "the current user."
450
  msgstr ""
451
 
452
+ #: lib/wfu_constants.php:152
453
  msgid ""
454
  "Insert variable %filename% inside text. It will be replaced by the filename "
455
  "of the uploaded file."
456
  msgstr ""
457
 
458
+ #: lib/wfu_constants.php:153
459
  msgid ""
460
  "Insert variable %filepath% inside text. It will be replaced by the full "
461
  "filepath of the uploaded file."
462
  msgstr ""
463
 
464
+ #: lib/wfu_constants.php:154
465
  msgid ""
466
  "Insert variable %blogid% inside text. It will be replaced by the blog id of "
467
  "the website."
468
  msgstr ""
469
 
470
+ #: lib/wfu_constants.php:155
471
  msgid ""
472
  "Insert variable %pageid% inside text. It will be replaced by the id of the "
473
  "current page."
474
  msgstr ""
475
 
476
+ #: lib/wfu_constants.php:156
477
  msgid ""
478
  "Insert variable %pagetitle% inside text. It will be replaced by the title of "
479
  "the current page."
480
  msgstr ""
481
 
482
+ #: lib/wfu_constants.php:157
483
  msgid ""
484
  "Insert variable %userdataXXX% inside text. Select the user field from the "
485
  "drop-down list. It will be replaced by the value that the user entered in "
486
  "this field."
487
  msgstr ""
488
 
489
+ #: lib/wfu_constants.php:158
490
  msgid "Insert variable %n% inside text to denote a line change."
491
  msgstr ""
492
 
493
+ #: lib/wfu_constants.php:161
494
  msgid "Upload in progress"
495
  msgstr ""
496
 
497
+ #: lib/wfu_constants.php:162
498
  msgid "Upload in progress with warnings!"
499
  msgstr ""
500
 
501
+ #: lib/wfu_constants.php:163
502
  msgid "Upload in progress but some files already failed!"
503
  msgstr ""
504
 
505
+ #: lib/wfu_constants.php:164
506
  msgid "Upload in progress but no files uploaded so far!"
507
  msgstr ""
508
 
509
+ #: lib/wfu_constants.php:165
510
  msgid "All files uploaded successfully"
511
  msgstr ""
512
 
513
+ #: lib/wfu_constants.php:166
514
  msgid "All files uploaded successfully but there are warnings!"
515
  msgstr ""
516
 
517
+ #: lib/wfu_constants.php:167
518
  msgid "File uploaded successfully but there are warnings!"
519
  msgstr ""
520
 
521
+ #: lib/wfu_constants.php:168
522
  msgid "Some files failed to upload!"
523
  msgstr ""
524
 
525
+ #: lib/wfu_constants.php:169
526
  msgid "All files failed to upload"
527
  msgstr ""
528
 
529
+ #: lib/wfu_constants.php:170
530
  msgid "File failed to upload"
531
  msgstr ""
532
 
533
+ #: lib/wfu_constants.php:171
534
  msgid "There are no files to upload!"
535
  msgstr ""
536
 
537
+ #: lib/wfu_constants.php:172
538
  msgid "Test upload message"
539
  msgstr ""
540
 
541
+ #: lib/wfu_constants.php:173
542
  msgid "JSON parse warning!"
543
  msgstr ""
544
 
545
+ #: lib/wfu_constants.php:174
546
  msgid "please wait while redirecting..."
547
  msgstr ""
548
 
549
+ #: lib/wfu_constants.php:175
550
  msgid "Open visual shortcode editor in new window"
551
  msgstr ""
552
 
553
+ #: lib/wfu_constants.php:176
554
  msgid "loading visual editor"
555
  msgstr ""
lib/wfu_admin.php CHANGED
@@ -495,12 +495,13 @@ function wfu_manage_instances_of_shortcode($tag, $title, $slug, $inc) {
495
  }
496
 
497
  function wfu_get_content_shortcodes($post, $tag) {
 
498
  $found_shortcodes = array();
499
  $content = $post->post_content;
500
  if ( false === strpos( $content, '[' ) ) return false;
501
  $hash = hash('md5', $content);
502
 
503
- if ( shortcode_exists( $tag ) ) wfu_match_shortcode_nested($tag, $post, $hash, $content, 0, $found_shortcodes);
504
 
505
  if ( count($found_shortcodes) == 0 ) return false;
506
  return $found_shortcodes;
@@ -535,14 +536,14 @@ function wfu_add_shortcode($postid, $tag) {
535
  $post = get_post($postid);
536
  $new_content = '['.$tag.']'.$post->post_content;
537
  $new_post = array( 'ID' => $postid, 'post_content' => $new_content );
538
- return ( wp_update_post( wp_slash($new_post) ) === 0 ? false : true );
539
  }
540
 
541
  function wfu_replace_shortcode($data, $new_shortcode) {
542
  $post = get_post($data['post_id']);
543
  $new_content = substr($post->post_content, 0, $data['position']).$new_shortcode.substr($post->post_content, (int)$data['position'] + strlen($data['shortcode']));
544
  $new_post = array( 'ID' => $data['post_id'], 'post_content' => $new_content );
545
- return ( wp_update_post( wp_slash($new_post) ) === 0 ? false : true );
546
  }
547
 
548
  function wfu_delete_shortcode_prompt($data_enc) {
495
  }
496
 
497
  function wfu_get_content_shortcodes($post, $tag) {
498
+ global $shortcode_tags;
499
  $found_shortcodes = array();
500
  $content = $post->post_content;
501
  if ( false === strpos( $content, '[' ) ) return false;
502
  $hash = hash('md5', $content);
503
 
504
+ if ( array_key_exists( $tag, $shortcode_tags ) ) wfu_match_shortcode_nested($tag, $post, $hash, $content, 0, $found_shortcodes);
505
 
506
  if ( count($found_shortcodes) == 0 ) return false;
507
  return $found_shortcodes;
536
  $post = get_post($postid);
537
  $new_content = '['.$tag.']'.$post->post_content;
538
  $new_post = array( 'ID' => $postid, 'post_content' => $new_content );
539
+ return ( wp_update_post( wfu_slash($new_post) ) === 0 ? false : true );
540
  }
541
 
542
  function wfu_replace_shortcode($data, $new_shortcode) {
543
  $post = get_post($data['post_id']);
544
  $new_content = substr($post->post_content, 0, $data['position']).$new_shortcode.substr($post->post_content, (int)$data['position'] + strlen($data['shortcode']));
545
  $new_post = array( 'ID' => $data['post_id'], 'post_content' => $new_content );
546
+ return ( wp_update_post( wfu_slash($new_post) ) === 0 ? false : true );
547
  }
548
 
549
  function wfu_delete_shortcode_prompt($data_enc) {
lib/wfu_admin_browser.php CHANGED
@@ -689,7 +689,8 @@ function wfu_file_details($file_code, $errorstatus) {
689
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>'.$userdata->property.'</label>';
690
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
691
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
692
- $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" type="text"'.( $is_admin ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'" />';
 
693
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_default_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
694
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_'.$userdata->propkey.'" name="wfu_filedetails_userdata_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
695
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
689
  $echo_str .= "\n\t\t\t\t\t\t\t".'<label>'.$userdata->property.'</label>';
690
  $echo_str .= "\n\t\t\t\t\t\t".'</th>';
691
  $echo_str .= "\n\t\t\t\t\t\t".'<td>';
692
+ // $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" type="text"'.( $is_admin ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'" />';
693
+ $echo_str .= "\n\t\t\t\t\t\t\t".'<textarea id="wfu_filedetails_userdata_value_'.$userdata->propkey.'" name="wfu_filedetails_userdata" '.( $is_admin ? '' : ' readonly="readonly"' ).' value="'.$userdata->propvalue.'">'.$userdata->propvalue.'</textarea>';
694
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_default_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
695
  $echo_str .= "\n\t\t\t\t\t\t\t".'<input id="wfu_filedetails_userdata_'.$userdata->propkey.'" name="wfu_filedetails_userdata_'.$userdata->propkey.'" type="hidden" value="'.$userdata->propvalue.'" />';
696
  $echo_str .= "\n\t\t\t\t\t\t".'</td>';
lib/wfu_admin_composer.php CHANGED
@@ -37,21 +37,71 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
37
  $autosave = false;
38
  }
39
 
 
 
 
 
 
40
  $shortcode_attrs = wfu_shortcode_string_to_array($shortcode);
41
  $shortcode_id = '';
42
  foreach ( $defs as $key => $def ) {
 
43
  $defs[$key]['default'] = $def['value'];
44
- if ( array_key_exists($def['attribute'], $shortcode_attrs) ) {
45
- $defs[$key]['value'] = $shortcode_attrs[$def['attribute']];
46
- }
47
- if ( $def['attribute'] == 'uploadid' || $def['attribute'] == 'browserid' ) $shortcode_id = $defs[$key]['value'];
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
 
50
- // index $components
51
- $components_indexed = array();
52
- foreach ( $components as $component ) $components_indexed[$component['id']] = $component;
53
- // index dependiencies
54
- $governors = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  $echo_str = '<div id="wfu_wrapper" class="wrap">';
57
  $echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
@@ -86,8 +136,12 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
86
  $echo_str .= "\n\t\t\t\t".'<input id="wfu_attribute_default_'.$def['attribute'].'" type="hidden" value="'.$def['default'].'" />';
87
  $echo_str .= "\n\t\t\t".'</div>';
88
  $echo_str .= "\n\t\t\t".'<div id="wfu_attribute_values" style="display:none;">';
89
- foreach ( $defs as $def )
90
  $echo_str .= "\n\t\t\t\t".'<input id="wfu_attribute_value_'.$def['attribute'].'" type="hidden" value="'.$def['value'].'" />';
 
 
 
 
91
  $echo_str .= "\n\t\t\t".'</div>';
92
  $echo_str .= "\n\t\t".'</div>';
93
  $echo_str .= "\n\t".'</div>';
@@ -106,19 +160,6 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
106
  $subblock_open = false;
107
  foreach ( $defs as $def ) {
108
  $attr = $def['attribute'];
109
- $subblock_active = false;
110
- //detect if the dependencies of this attribute will be disabled or not
111
- if ( ( $def['type'] == "onoff" && $def['value'] == "true" ) ||
112
- ( $def['type'] == "radio" && in_array("*".$def['value'], $def['listitems']) ) )
113
- $subblock_active = true;
114
- // assign dependencies if exist
115
- if ( $def['dependencies'] != null )
116
- foreach ( $def['dependencies'] as $dependency ) {
117
- if ( substr($dependency, 0, 1) == "!" ) //invert state for this dependency if an exclamation mark is defined
118
- $governors[substr($dependency, 1)] = array( 'attribute' => $attr, 'active' => !$subblock_active, 'inv' => '_inv' );
119
- else
120
- $governors[$dependency] = array( 'attribute' => $attr, 'active' => $subblock_active, 'inv' => '' );
121
- }
122
  //check if this attribute depends on other
123
  if ( !array_key_exists($attr, $governors) ) $governors[$attr] = "";
124
  if ( $governors[$attr] != "" ) $governor = $governors[$attr];
@@ -178,6 +219,7 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
178
  if ( $def['parent'] == "" ) $echo_str .= $dlp."\t\t".'<div class="wfu_shadow wfu_shadow_'.$governor['attribute'].$governor['inv'].'" style="display:'.( $governor['active'] ? 'none' : 'block' ).';"></div>';
179
  $echo_str .= $dlp."\t\t".'<div class="wfu_restore_container" title="Double-click to restore defaults setting"><img src="'.WFU_IMAGE_ADMIN_RESTOREDEFAULT.'" ondblclick="wfu_apply_value(\''.$attr.'\', \''.$def['type'].'\', \''.$def['default'].'\');" /></div>';
180
  $echo_str .= $dlp."\t\t".'<label for="wfu_attribute_'.$attr.'">'.$def['name'].'</label>';
 
181
  $echo_str .= $dlp."\t\t".'<div class="wfu_help_container" title="'.$def['help'].'"><img src="'.WFU_IMAGE_ADMIN_HELP.'" /></div>';
182
  $echo_str .= $dlp."\t".'</div></th>';
183
  $echo_str .= $dlp."\t".'<td style="vertical-align:top;"><div class="wfu_td_div">';
@@ -196,8 +238,9 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
196
  }
197
  elseif ( $def['type'] == "placements" ) {
198
  $components_used = array();
199
- foreach ( $components as $component ) $components_used[$component['id']] = false;
200
- $centered_content = '<div style="display:table; width:100%; height:100%;"><div style="display:table-cell; text-align:center; vertical-align:middle;">XXX</div></div>';
 
201
  $echo_str .= $dlp."\t\t".'<div class="wfu_placements_wrapper">';
202
  $echo_str .= $dlp."\t\t\t".'<div id="wfu_placements_container" class="wfu_placements_container">';
203
  $itemplaces = explode("/", $def['value']);
@@ -208,9 +251,16 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
208
  $section_array = array( );
209
  foreach ( $items_in_section as $item_in_section ) {
210
  if ( key_exists($item_in_section, $components_indexed) ) {
211
- $components_used[$item_in_section] = true;
212
- $echo_str .= $dlp."\t\t\t\t".'<div id="wfu_component_box_'.$item_in_section.'" class="wfu_component_box" draggable="true" title="'.$components_indexed[$item_in_section]['help'].'">'.str_replace("XXX", $components_indexed[$item_in_section]['name'], $centered_content).'</div>';
213
- $echo_str .= $dlp."\t\t\t\t".'<div class="wfu_component_separator_ver"></div>';
 
 
 
 
 
 
 
214
  }
215
  }
216
  }
@@ -224,8 +274,12 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
224
  foreach ( $components as $component ) {
225
  $echo_str .= $dlp."\t\t\t\t".'<div id="wfu_component_box_container_'.$component['id'].'" class="wfu_component_box_container">';
226
  $echo_str .= $dlp."\t\t\t\t\t".'<div class="wfu_component_box_base">'.str_replace("XXX", $component['name'], $centered_content).'</div>';
227
- if ( !$components_used[$component['id']] )
228
- $echo_str .= $dlp."\t\t\t\t\t".'<div id="wfu_component_box_'.$component['id'].'" class="wfu_component_box wfu_inbase" draggable="true" title="'.$component['help'].'">'.str_replace("XXX", $component['name'], $centered_content).'</div>';
 
 
 
 
229
  $echo_str .= $dlp."\t\t\t\t".'</div>'.( ($ii++) % 3 == 0 ? '<br />' : '' );
230
  }
231
  $echo_str .= $dlp."\t\t\t".'</div>';
@@ -248,7 +302,8 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
248
  }
249
  elseif ( $def['type'] == "date" ) {
250
  $val = $def['value'];
251
- $echo_str .= $dlp."\t\t".'<input id="wfu_attribute_'.$attr.'" type="date" name="wfu_date_elements" value="'.$val.'" />';
 
252
  }
253
  elseif ( $def['type'] == "radio" ) {
254
  $echo_str .= $dlp."\t\t";
@@ -466,7 +521,7 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
466
  $processed = true;
467
  }
468
  }
469
- if ( !processed ) {
470
  $val = str_replace(array( "%n%", "%dq%", "%brl%", "%brr%" ), array( "\n", "&quot;", "[", "]" ), $def['value']);
471
  $echo_str .= $dlp."\t\t".'<input id="wfu_attribute_'.$attr.'" type="text" name="wfu_text_elements" value="'.$val.'" />';
472
  }
@@ -614,6 +669,96 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
614
  }
615
  $echo_str .= $dlp."\t\t".'</div>';
616
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  elseif ( $def['type'] == "color" ) {
618
  $val = str_replace(array( "%n%", "%dq%", "%brl%", "%brr%" ), array( "\n", "&quot;", "[", "]" ), $def['value']);
619
  $echo_str .= $dlp."\t\t".'<input id="wfu_attribute_'.$attr.'" type="text" name="wfu_text_elements" class="wfu_color_field" value="'.$val.'" />';
@@ -667,7 +812,7 @@ function wfu_shortcode_composer($data = '', $shortcode_tag = 'wordpress_file_upl
667
  function wfu_insert_variables($variables, $class) {
668
  $ret = "";
669
  foreach ( $variables as $variable )
670
- if ( $variable == "%userdataXXX%" ) $ret .= "\t\t".'<select class="'.$class.'" name="wfu_userfield_select" title="'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" onchange="wfu_insert_userfield_variable(this);"><option style="display:none;">%userdataXXX%</option></select>';
671
  elseif ( $variable != "%n%" && $variable != "%dq%" && $variable != "%brl%" && $variable != "%brr%" ) $ret .= "\t\t".'<span class="'.$class.'" title="'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" ondblclick="wfu_insert_variable(this);">'.$variable.'</span>';
672
  return $ret;
673
  }
37
  $autosave = false;
38
  }
39
 
40
+ // index $components
41
+ $components_indexed = array();
42
+ foreach ( $components as $component ) $components_indexed[$component['id']] = $component;
43
+ // complete defs array and index dependencies
44
+ $governors = array();
45
  $shortcode_attrs = wfu_shortcode_string_to_array($shortcode);
46
  $shortcode_id = '';
47
  foreach ( $defs as $key => $def ) {
48
+ $attr = $def['attribute'];
49
  $defs[$key]['default'] = $def['value'];
50
+ if ( array_key_exists($attr, $shortcode_attrs) ) $defs[$key]['value'] = $shortcode_attrs[$attr];
51
+ $subblock_active = false;
52
+ //detect if the dependencies of this attribute will be disabled or not
53
+ if ( ( $def['type'] == "onoff" && $defs[$key]['value'] == "true" ) ||
54
+ ( $def['type'] == "radio" && in_array("*".$defs[$key]['value'], $def['listitems']) ) )
55
+ $subblock_active = true;
56
+ // assign dependencies if exist
57
+ if ( $def['dependencies'] != null )
58
+ foreach ( $def['dependencies'] as $dependency ) {
59
+ if ( substr($dependency, 0, 1) == "!" ) //invert state for this dependency if an exclamation mark is defined
60
+ $governors[substr($dependency, 1)] = array( 'attribute' => $attr, 'active' => !$subblock_active, 'inv' => '_inv' );
61
+ else
62
+ $governors[$dependency] = array( 'attribute' => $attr, 'active' => $subblock_active, 'inv' => '' );
63
+ }
64
+ if ( $attr == 'uploadid' || $attr == 'browserid' ) $shortcode_id = $defs[$key]['value'];
65
  }
66
 
67
+ //check if attributes need to be generated more than once because their governor is a component field that appears more than once in placements attribute
68
+ $key = 0;
69
+ while ( $key < count($defs) ) {
70
+ $defs[$key]['additional_values'] = array();
71
+ $def = $defs[$key];
72
+ $attr = $def['attribute'];
73
+ //check if this attribute needs to be generated more than once
74
+ if ( array_key_exists($attr, $governors) ) $governor = $governors[$attr]['attribute'];
75
+ else $governor = "";
76
+ if ( $governor != "" && isset($components_indexed[$governor]) && $components_indexed[$governor]['multiplacements'] && isset($shortcode_attrs['placements']) ) {
77
+ //count how many occurrences of the governor attribute appear inside placements attribute
78
+ $occurrences = 0;
79
+ $sections = explode("/", $shortcode_attrs['placements']);
80
+ foreach ( $sections as $section ) {
81
+ $items_in_section = explode("+", trim($section));
82
+ foreach ( $items_in_section as $item )
83
+ if ( trim($item) == $governor ) $occurrences++;
84
+ }
85
+ //add indexed attributes if there is more than one occurrence
86
+ for ( $ii = 2; $ii <= $occurrences; $ii++ ) {
87
+ $def2 = $def;
88
+ $def2['attribute'] .= $ii;
89
+ $def2['name'] .= ' ('.$ii.')';
90
+ if ( array_key_exists($def2['attribute'], $shortcode_attrs) )
91
+ $def2['value'] = $shortcode_attrs[$def2['attribute']];
92
+ else $def2['value'] = $def2['default'];
93
+ array_splice($defs, $key + 1, 0, array($def2));
94
+ $key++;
95
+ }
96
+ //check if the shortcode contains additional indexed definitions and store them in 'additional_values'
97
+ $ii = max(1, $occurrences) + 1;
98
+ while ( array_key_exists($attr.$ii, $shortcode_attrs) ) {
99
+ $defs[$key]['additional_values'][$ii] = $shortcode_attrs[$attr.$ii];
100
+ $ii++;
101
+ }
102
+ }
103
+ $key++;
104
+ }
105
 
106
  $echo_str = '<div id="wfu_wrapper" class="wrap">';
107
  $echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
136
  $echo_str .= "\n\t\t\t\t".'<input id="wfu_attribute_default_'.$def['attribute'].'" type="hidden" value="'.$def['default'].'" />';
137
  $echo_str .= "\n\t\t\t".'</div>';
138
  $echo_str .= "\n\t\t\t".'<div id="wfu_attribute_values" style="display:none;">';
139
+ foreach ( $defs as $def ) {
140
  $echo_str .= "\n\t\t\t\t".'<input id="wfu_attribute_value_'.$def['attribute'].'" type="hidden" value="'.$def['value'].'" />';
141
+ //add additional values, if exist
142
+ foreach( $def['additional_values'] as $key => $val )
143
+ $echo_str .= "\n\t\t\t\t".'<input id="wfu_attribute_value_'.$def['attribute'].$key.'" type="hidden" value="'.$val.'" />';
144
+ }
145
  $echo_str .= "\n\t\t\t".'</div>';
146
  $echo_str .= "\n\t\t".'</div>';
147
  $echo_str .= "\n\t".'</div>';
160
  $subblock_open = false;
161
  foreach ( $defs as $def ) {
162
  $attr = $def['attribute'];
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  //check if this attribute depends on other
164
  if ( !array_key_exists($attr, $governors) ) $governors[$attr] = "";
165
  if ( $governors[$attr] != "" ) $governor = $governors[$attr];
219
  if ( $def['parent'] == "" ) $echo_str .= $dlp."\t\t".'<div class="wfu_shadow wfu_shadow_'.$governor['attribute'].$governor['inv'].'" style="display:'.( $governor['active'] ? 'none' : 'block' ).';"></div>';
220
  $echo_str .= $dlp."\t\t".'<div class="wfu_restore_container" title="Double-click to restore defaults setting"><img src="'.WFU_IMAGE_ADMIN_RESTOREDEFAULT.'" ondblclick="wfu_apply_value(\''.$attr.'\', \''.$def['type'].'\', \''.$def['default'].'\');" /></div>';
221
  $echo_str .= $dlp."\t\t".'<label for="wfu_attribute_'.$attr.'">'.$def['name'].'</label>';
222
+ $echo_str .= $dlp."\t\t".'<input type="hidden" name="wfu_attribute_governor_'.$governor['attribute'].'" class="wfu_attribute_governor" value="'.$attr.'" />';
223
  $echo_str .= $dlp."\t\t".'<div class="wfu_help_container" title="'.$def['help'].'"><img src="'.WFU_IMAGE_ADMIN_HELP.'" /></div>';
224
  $echo_str .= $dlp."\t".'</div></th>';
225
  $echo_str .= $dlp."\t".'<td style="vertical-align:top;"><div class="wfu_td_div">';
238
  }
239
  elseif ( $def['type'] == "placements" ) {
240
  $components_used = array();
241
+ foreach ( $components as $component ) $components_used[$component['id']] = 0;
242
+ $centered_content = '<div class="wfu_component_box_inner"><div class="wfu_component_box_label">XXX</div></div>';
243
+ $centered_content_multi = '<div class="wfu_component_box_inner"><div class="wfu_component_box_label">XXX</div><div class="wfu_component_box_index">YYY</div></div>';
244
  $echo_str .= $dlp."\t\t".'<div class="wfu_placements_wrapper">';
245
  $echo_str .= $dlp."\t\t\t".'<div id="wfu_placements_container" class="wfu_placements_container">';
246
  $itemplaces = explode("/", $def['value']);
251
  $section_array = array( );
252
  foreach ( $items_in_section as $item_in_section ) {
253
  if ( key_exists($item_in_section, $components_indexed) ) {
254
+ if ( $components_indexed[$item_in_section]['multiplacements'] || $components_used[$item_in_section] == 0 ) {
255
+ $components_used[$item_in_section] ++;
256
+ if ( $components_indexed[$item_in_section]['multiplacements'] ) {
257
+ $multi_index = $components_used[$item_in_section];
258
+ $echo_str .= $dlp."\t\t\t\t".'<div id="wfu_component_box_'.$item_in_section.'_'.$multi_index.'" class="wfu_component_box" draggable="true" title="'.$components_indexed[$item_in_section]['help'].'">'.str_replace(array("XXX", "YYY"), array($components_indexed[$item_in_section]['name'], $multi_index), $centered_content_multi).'</div>';
259
+ }
260
+ else
261
+ $echo_str .= $dlp."\t\t\t\t".'<div id="wfu_component_box_'.$item_in_section.'_0" class="wfu_component_box" draggable="true" title="'.$components_indexed[$item_in_section]['help'].'">'.str_replace("XXX", $components_indexed[$item_in_section]['name'], $centered_content).'</div>';
262
+ $echo_str .= $dlp."\t\t\t\t".'<div class="wfu_component_separator_ver"></div>';
263
+ }
264
  }
265
  }
266
  }
274
  foreach ( $components as $component ) {
275
  $echo_str .= $dlp."\t\t\t\t".'<div id="wfu_component_box_container_'.$component['id'].'" class="wfu_component_box_container">';
276
  $echo_str .= $dlp."\t\t\t\t\t".'<div class="wfu_component_box_base">'.str_replace("XXX", $component['name'], $centered_content).'</div>';
277
+ if ( $component['multiplacements'] ) {
278
+ $multi_index = $components_used[$component['id']] + 1;
279
+ $echo_str .= $dlp."\t\t\t\t\t".'<div id="wfu_component_box_'.$component['id'].'_'.$multi_index.'" class="wfu_component_box wfu_inbase" draggable="true" title="'.$component['help'].'">'.str_replace(array("XXX", "YYY"), array($component['name'], $multi_index), $centered_content_multi).'</div>';
280
+ }
281
+ elseif ( $components_used[$component['id']] == 0 )
282
+ $echo_str .= $dlp."\t\t\t\t\t".'<div id="wfu_component_box_'.$component['id'].'_0" class="wfu_component_box wfu_inbase" draggable="true" title="'.$component['help'].'">'.str_replace("XXX", $component['name'], $centered_content).'</div>';
283
  $echo_str .= $dlp."\t\t\t\t".'</div>'.( ($ii++) % 3 == 0 ? '<br />' : '' );
284
  }
285
  $echo_str .= $dlp."\t\t\t".'</div>';
302
  }
303
  elseif ( $def['type'] == "date" ) {
304
  $val = $def['value'];
305
+ $echo_str .= $dlp."\t\t".'<div class="wfu_date_container"><input id="wfu_attribute_'.$attr.'" type="text" value="'.$val.'" readonly style="padding-right:16px; background-color:white;" /><img class="wfu_datereset_button" src="'.WFU_IMAGE_ADMIN_SUBFOLDER_CANCEL.'" onclick="var f = document.getElementById(\'wfu_attribute_'.$attr.'\'); f.value = \'\'; wfu_update_date_value({target:f});" /></div><label style="font-size:smaller; margin-left:4px;">format: YYYY-MM-DD</label>';
306
+ $echo_str .= wfu_inject_js_code('jQuery(function() {jQuery("#wfu_attribute_'.$attr.'").datepicker({dateFormat: "yy-mm-dd", onClose: function(date, picker) {wfu_update_date_value({target:this});}});});');
307
  }
308
  elseif ( $def['type'] == "radio" ) {
309
  $echo_str .= $dlp."\t\t";
521
  $processed = true;
522
  }
523
  }
524
+ if ( !$processed ) {
525
  $val = str_replace(array( "%n%", "%dq%", "%brl%", "%brr%" ), array( "\n", "&quot;", "[", "]" ), $def['value']);
526
  $echo_str .= $dlp."\t\t".'<input id="wfu_attribute_'.$attr.'" type="text" name="wfu_text_elements" value="'.$val.'" />';
527
  }
669
  }
670
  $echo_str .= $dlp."\t\t".'</div>';
671
  }
672
+ elseif ( $def['type'] == "formfields" ) {
673
+ //get field type definitions
674
+ $fielddefs_array = $def['listitems'];
675
+ foreach ( $fielddefs_array as $fielddef ) $fielddefs[$fielddef['type']] = $fielddef;
676
+ //initialize editable field properties
677
+ $fieldprops_basic = array('required', 'donotautocomplete', 'validate', 'typehook', 'labelposition', 'hintposition', 'default', 'data', 'group', 'format');
678
+ $fieldprops_default = array ( "type" => "text", "label" => "", "labelposition" => "left", "required" => false, "donotautocomplete" => false, "validate" => false, "default" => "", "data" => "", "group" => "", "format" => "", "hintposition" => "right", "typehook" => false );
679
+ //parse shortcode attribute to $fields
680
+ $fields = wfu_parse_userdata_attribute($def['value']);
681
+ $labelpositions = array("none", "top", "right", "bottom", "left");
682
+ $hintpositions = array("none", "inline", "top", "right", "bottom", "left");
683
+ if ( count($fields) == 0 ) array_push($fields, $fieldprops_default);
684
+ //set html template variable
685
+ $template = $dlp."\t\t\t\t".'<table class="wfu_formdata_props_table"><tbody>';
686
+ $template .= $dlp."\t\t\t\t".'<tr><td colspan="2"><label class="wfu_formdata_label">Type</label><select id="wfu_formfield_[[key]]_type" value="[[t]]" onchange="wfu_formdata_type_changed(\'[[key]]\');">';
687
+ foreach( $fielddefs as $item ) $template .= $dlp."\t\t\t\t\t".'<option value="'.$item['type'].'"[[type_'.$item['type'].'_selected]]>'.$item['type_description'].'</option>';
688
+ $template .= $dlp."\t\t\t\t".'</select></td><td>';
689
+ $template .= $dlp."\t\t\t\t".'<div class="wfu_formdata_action wfu_formdata_action_add" onclick="wfu_formdata_add_field(\'[[key]]\');"><img src="'.WFU_IMAGE_ADMIN_USERDATA_ADD.'" ></div>';
690
+ $template .= $dlp."\t\t\t\t".'<div class="wfu_formdata_action wfu_formdata_action_remove[[remove_disabled]]" onclick="wfu_formdata_remove_field(\'[[key]]\');"><img src="'.WFU_IMAGE_ADMIN_USERDATA_REMOVE.'" ></div></td></tr>';
691
+ $template .= $dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_label">Label</label></td><td><input type="text" id="wfu_formfield_[[key]]_label" name="wfu_formfield_elements" value="[[label]]" /></td><td></td></tr>';
692
+ $labelpos_options = "";
693
+ foreach ( $labelpositions as $pos ) $labelpos_options .= '<option value="'.$pos.'"[[labelposition_'.$pos.'_selected]]>'.$pos.'</option>';
694
+ $template .= $dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_labelposition" title="[[labelposition_hint]]">Label Position</label></td><td><select id="wfu_formfield_[[key]]_labelposition" value="[[s]]" title="[[labelposition_hint]]" onchange="wfu_update_formfield_value({target:this});">'.$labelpos_options.'</select></td><td></td></tr>';
695
+ $template .= '[[R->]]'.$dlp."\t\t\t\t".'<tr><td colspan="2" class="wfu_formdata_props"><input id="wfu_formfield_[[key]]_required" type="checkbox"[[r->]] checked="checked"[[<-r]] title="[[required_hint]]" onchange="wfu_update_formfield_value({target:this});" /><label for="wfu_formfield_[[key]]_required" title="[[required_hint]]"> Required</label></td><td></td></tr>[[<-R]]';
696
+ $template .= '[[A->]]'.$dlp."\t\t\t\t".'<tr><td colspan="2" class="wfu_formdata_props"><input id="wfu_formfield_[[key]]_donotautocomplete" type="checkbox"[[a->]] checked="checked"[[<-a]] title="[[donotautocomplete_hint]]" onchange="wfu_update_formfield_value({target:this});" /><label for="wfu_formfield_[[key]]_donotautocomplete" title="[[donotautocomplete_hint]]"> Do not autocomplete</label></td><td></td></tr>[[<-A]]';
697
+ $template .= '[[V->]]'.$dlp."\t\t\t\t".'<tr><td colspan="2" class="wfu_formdata_props"><input id="wfu_formfield_[[key]]_validate" type="checkbox"[[v->]] checked="checked"[[<-v]] title="[[validate_hint]]" onchange="wfu_update_formfield_value({target:this});" /><label for="wfu_formfield_[[key]]_validate" title="[[validate_hint]]"> Validate</label></td><td></td></tr>[[<-V]]';
698
+ $hint_options = "";
699
+ foreach ( $hintpositions as $pos ) $hint_options .= '<option value="'.$pos.'"[[hintposition_'.$pos.'_selected]]>'.$pos.'</option>';
700
+ $template .= '[[P->]]'.$dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_label" title="[[hintposition_hint]]">Hint Position</label></td><td><select id="wfu_formfield_[[key]]_hintposition" value="[[p]]" title="[[hintposition_hint]]" onchange="wfu_update_formfield_value({target:this});">'.$hint_options.'</select></td><td></td></tr>[[<-P]]';
701
+ $template .= '[[H->]]'.$dlp."\t\t\t\t".'<tr><td colspan="2" class="wfu_formdata_props"><input id="wfu_formfield_[[key]]_typehook" type="checkbox"[[h->]] checked="checked"[[<-h]] title="[[typehook_hint]]" onchange="wfu_update_formfield_value({target:this});" /><label for="wfu_formfield_[[key]]_typehook" title="[[typehook_hint]]"> Type hook</label></td><td></td></tr>[[<-H]]';
702
+ $template .= '[[D->]]'.$dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_label" title="[[default_hint]]">Default</label></td><td><input id="wfu_formfield_[[key]]_default" type="text" name="wfu_formfield_elements" value="[[d]]" title="[[default_hint]]" /></td><td></td></tr>[[<-D]]';
703
+ $template .= '[[L->]]'.$dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_label" title="[[data_hint]]">[[data_label]]</label></td><td><input id="wfu_formfield_[[key]]_data" type="text" name="wfu_formfield_elements" value="[[l]]" title="[[data_hint]]" /></td><td></td></tr>[[<-L]]';
704
+ $template .= '[[G->]]'.$dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_label" title="[[group_hint]]">Group ID</label></td><td><input id="wfu_formfield_[[key]]_group" type="text" name="wfu_formfield_elements" value="[[g]]" title="[[group_hint]]" /></td><td></td></tr>[[<-G]]';
705
+ $template .= '[[F->]]'.$dlp."\t\t\t\t".'<tr><td class="wfu_formdata_props"><label class="wfu_formdata_label" title="[[format_hint]]">Format</label></td><td><input id="wfu_formfield_[[key]]_format" type="text" name="wfu_formfield_elements" value="[[f]]" title="[[format_hint]]" /></td><td></td></tr>[[<-F]]';
706
+ $template .= $dlp."\t\t\t\t".'</tbody></table>';
707
+ //draw html elements
708
+ $echo_str .= $dlp."\t\t".'<div id="wfu_attribute_'.$attr.'" class="wfu_formdata_container">';
709
+ $echo_str .= $dlp."\t\t\t".'<div id="wfu_attribute_'.$attr.'_codeadd" style="display:none;">';
710
+ //pass template and type props to client javascript variable and then erase the code
711
+ $echo_str .= $dlp."\t\t\t\t".'<script type="text/javascript">';
712
+ $echo_str .= $dlp."\t\t\t\t\t".'var wfu_attribute_'.$attr.'_formtemplate = "'.wfu_plugin_encode_string($template).'";';
713
+ $echo_str .= $dlp."\t\t\t\t\t".'var wfu_attribute_'.$attr.'_typeprops = {};';
714
+ $fielddef_array = array();
715
+ foreach( $fielddefs as $item ) array_push($fielddef_array, $item['type']);
716
+ //prepare storage of field definitions to browser context
717
+ $echo_str .= $dlp."\t\t\t\t\t".'wfu_attribute_'.$attr.'_typeprops[0] = \''.implode(",", $fielddef_array).'\'';
718
+ foreach( $fielddefs as $item ) {
719
+ $typeprops = array();
720
+ foreach ( $fieldprops_basic as $prop ) {
721
+ array_push($typeprops, $prop.': \''.$item[$prop].'\'');
722
+ array_push($typeprops, $prop.'_hint: \''.$item[$prop.'_hint'].'\'');
723
+ }
724
+ array_push($typeprops, 'data_label: \''.$item['data_label'].'\'');
725
+ $echo_str .= $dlp."\t\t\t\t\t".'wfu_attribute_'.$attr.'_typeprops["'.$item['type'].'"] = {'.implode(", ", $typeprops).'};';
726
+ }
727
+ $echo_str .= $dlp."\t\t\t\t\t".'var self = document.getElementById("wfu_attribute_'.$attr.'_codeadd"); self.parentNode.removeChild(self);';
728
+ $echo_str .= $dlp."\t\t\t\t".'</script>';
729
+ $echo_str .= $dlp."\t\t\t".'</div>';
730
+ foreach ( $fields as $field ) {
731
+ $ind = wfu_create_random_string(4);
732
+ $key = $attr."_".$ind;
733
+ $fielddef = $fielddefs[$field["type"]];
734
+ $echo_str .= $dlp."\t\t\t".'<div id="wfu_formfield_'.$key.'_container" class="wfu_formdata_line_container">';
735
+ //generate html elements from template, replacing variables where applicable
736
+ $from_template = str_replace(array('[[key]]', '[[t]]', '[[label]]', '[[s]]', '[[d]]', '[[l]]', '[[data_label]]', '[[g]]', '[[f]]', '[[p]]'), array($key, $field['type'], $field['label'], $field['labelposition'], $field['default'], $field['data'], $fielddef['data_label'], $field['group'], $field['format'], $field['hintposition']), $template);
737
+ foreach ( $fieldprops_basic as $prop ) $from_template = str_replace('[['.$prop.'_hint]]', str_replace('\r\n', "\r\n", $fielddef[$prop.'_hint']), $from_template);
738
+ foreach( $fielddefs as $item ) $from_template = str_replace('[[type_'.$item['type'].'_selected]]', ( $item['type'] == $field['type'] ? ' selected = "selected"' : '' ), $from_template);
739
+ foreach( $labelpositions as $pos ) $from_template = str_replace('[[labelposition_'.$pos.'_selected]]', ( $pos == $field['labelposition'] ? ' selected = "selected"' : '' ), $from_template);
740
+ foreach( $hintpositions as $pos ) $from_template = str_replace('[[hintposition_'.$pos.'_selected]]', ( $pos == $field['hintposition'] ? ' selected = "selected"' : '' ), $from_template);
741
+ $from_template = str_replace('[[remove_disabled]]', ( count($fields) <= 1 ? ' wfu_formdata_action_disabled' : '' ), $from_template);
742
+ //adjust checkbox field values
743
+ $from_template = preg_replace('/\[\[r\-\>\]\]'.( $field['required'] ? '|' : '.*' ).'\[\[\<\-r\]\]/', '', $from_template);
744
+ $from_template = preg_replace('/\[\[a\-\>\]\]'.( $field['donotautocomplete'] ? '|' : '.*' ).'\[\[\<\-a\]\]/', '', $from_template);
745
+ $from_template = preg_replace('/\[\[v\-\>\]\]'.( $field['validate'] ? '|' : '.*' ).'\[\[\<\-v\]\]/', '', $from_template);
746
+ $from_template = preg_replace('/\[\[h\-\>\]\]'.( $field['typehook'] ? '|' : '.*' ).'\[\[\<\-h\]\]/', '', $from_template);
747
+ //adjust visibility of properties
748
+ $from_template = preg_replace('/\[\[R\-\>\]\]'.( substr($fielddef["required"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-R\]\]/s', '', $from_template);
749
+ $from_template = preg_replace('/\[\[A\-\>\]\]'.( substr($fielddef["donotautocomplete"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-A\]\]/s', '', $from_template);
750
+ $from_template = preg_replace('/\[\[V\-\>\]\]'.( substr($fielddef["validate"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-V\]\]/s', '', $from_template);
751
+ $from_template = preg_replace('/\[\[P\-\>\]\]'.( substr($fielddef["hintposition"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-P\]\]/s', '', $from_template);
752
+ $from_template = preg_replace('/\[\[H\-\>\]\]'.( substr($fielddef["typehook"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-H\]\]/s', '', $from_template);
753
+ $from_template = preg_replace('/\[\[D\-\>\]\]'.( substr($fielddef["default"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-D\]\]/s', '', $from_template);
754
+ $from_template = preg_replace('/\[\[L\-\>\]\]'.( substr($fielddef["data"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-L\]\]/s', '', $from_template);
755
+ $from_template = preg_replace('/\[\[G\-\>\]\]'.( substr($fielddef["group"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-G\]\]/s', '', $from_template);
756
+ $from_template = preg_replace('/\[\[F\-\>\]\]'.( substr($fielddef["format"], 0, 4) == "show" ? '|' : '.*' ).'\[\[\<\-F\]\]/s', '', $from_template);
757
+ $echo_str .= $from_template;
758
+ $echo_str .= $dlp."\t\t\t".'</div>';
759
+ }
760
+ $echo_str .= $dlp."\t\t".'</div>';
761
+ }
762
  elseif ( $def['type'] == "color" ) {
763
  $val = str_replace(array( "%n%", "%dq%", "%brl%", "%brr%" ), array( "\n", "&quot;", "[", "]" ), $def['value']);
764
  $echo_str .= $dlp."\t\t".'<input id="wfu_attribute_'.$attr.'" type="text" name="wfu_text_elements" class="wfu_color_field" value="'.$val.'" />';
812
  function wfu_insert_variables($variables, $class) {
813
  $ret = "";
814
  foreach ( $variables as $variable )
815
+ if ( $variable == "%userdataXXX%" ) $ret .= "\t\t".'<select class="'.$class.'" name="wfu_formfield_select" title="'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" onchange="wfu_insert_userfield_variable(this);"><option style="display:none;">%userdataXXX%</option></select>';
816
  elseif ( $variable != "%n%" && $variable != "%dq%" && $variable != "%brl%" && $variable != "%brr%" ) $ret .= "\t\t".'<span class="'.$class.'" title="'.constant("WFU_VARIABLE_TITLE_".strtoupper(str_replace("%", "", $variable))).'" ondblclick="wfu_insert_variable(this);">'.$variable.'</span>';
817
  return $ret;
818
  }
lib/wfu_attributes.php CHANGED
@@ -3,60 +3,68 @@
3
  function wfu_component_definitions() {
4
  $components = array(
5
  array(
6
- "id" => "title",
7
- "name" => "Title",
8
- "mode" => "free",
9
- "dimensions" => null,
10
- "help" => "A title text for the plugin"
 
11
  ),
12
  array(
13
- "id" => "filename",
14
- "name" => "Filename",
15
- "mode" => "free",
16
- "dimensions" => null,
17
- "help" => "It shows the name of the selected file (useful only for single file uploads)."
 
18
  ),
19
  array(
20
- "id" => "selectbutton",
21
- "name" => "Select Button",
22
- "mode" => "free",
23
- "dimensions" => null,
24
- "help" => "Represents the button to select the files for upload."
 
25
  ),
26
  array(
27
- "id" => "uploadbutton",
28
- "name" => "Upload Button",
29
- "mode" => "free",
30
- "dimensions" => null,
31
- "help" => "Represents the button to execute the upload after some files have been selected."
 
32
  ),
33
  array(
34
- "id" => "subfolders",
35
- "name" => "Subfolders",
36
- "mode" => "free",
37
- "dimensions" => array("uploadfolder_label/Upload Folder Label", "subfolders_label/Subfolders Label", "subfolders_select/Subfolders List"),
38
- "help" => "Allows the user to select the upload folder from a dropdown list."
 
39
  ),
40
  array(
41
- "id" => "progressbar",
42
- "name" => "Progressbar",
43
- "mode" => "free",
44
- "dimensions" => null,
45
- "help" => "Displays a simple progress bar, showing total progress of upload."
 
46
  ),
47
  array(
48
- "id" => "userdata",
49
- "name" => "User Fields",
50
- "mode" => "free",
51
- "dimensions" => array("userdata/User Fields", "userdata_label/User Fields Label", "userdata_value/User Fields Value"),
52
- "help" => "Displays additional fields that the user must fill-in together with the uploaded files."
 
53
  ),
54
  array(
55
- "id" => "message",
56
- "name" => "Message",
57
- "mode" => "free",
58
- "dimensions" => null,
59
- "help" => "Displays a message block with information about the upload, together with any warnings or errors."
 
60
  )
61
  );
62
 
@@ -82,6 +90,612 @@ function wfu_category_definitions() {
82
  return $cats;
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  function wfu_attribute_definitions() {
86
  $defs = array(
87
  array(
@@ -756,7 +1370,7 @@ function wfu_attribute_definitions() {
756
  "variables" => null,
757
  "help" => "If enabled, then user can send additional information together with uploaded files (e.g. name, email etc), defined in userdatalabel attribute."
758
  ),
759
- array(
760
  "name" => "Additional Data Fields",
761
  "attribute" => "userdatalabel",
762
  "type" => "userfields",
@@ -769,6 +1383,20 @@ function wfu_attribute_definitions() {
769
  "dependencies" => null,
770
  "variables" => null,
771
  "help" => "It defines the labels of the additional data fields and whether they are required or not."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
772
  ),
773
  array(
774
  "name" => "WP Filebase Plugin Connection",
3
  function wfu_component_definitions() {
4
  $components = array(
5
  array(
6
+ "id" => "title",
7
+ "name" => "Title",
8
+ "mode" => "free",
9
+ "dimensions" => null,
10
+ "multiplacements" => false,
11
+ "help" => "A title text for the plugin"
12
  ),
13
  array(
14
+ "id" => "filename",
15
+ "name" => "Filename",
16
+ "mode" => "free",
17
+ "dimensions" => null,
18
+ "multiplacements" => false,
19
+ "help" => "It shows the name of the selected file (useful only for single file uploads)."
20
  ),
21
  array(
22
+ "id" => "selectbutton",
23
+ "name" => "Select Button",
24
+ "mode" => "free",
25
+ "dimensions" => null,
26
+ "multiplacements" => false,
27
+ "help" => "Represents the button to select the files for upload."
28
  ),
29
  array(
30
+ "id" => "uploadbutton",
31
+ "name" => "Upload Button",
32
+ "mode" => "free",
33
+ "dimensions" => null,
34
+ "multiplacements" => false,
35
+ "help" => "Represents the button to execute the upload after some files have been selected."
36
  ),
37
  array(
38
+ "id" => "subfolders",
39
+ "name" => "Subfolders",
40
+ "mode" => "free",
41
+ "dimensions" => array("uploadfolder_label/Upload Folder Label", "subfolders_label/Subfolders Label", "subfolders_select/Subfolders List"),
42
+ "multiplacements" => false,
43
+ "help" => "Allows the user to select the upload folder from a dropdown list."
44
  ),
45
  array(
46
+ "id" => "progressbar",
47
+ "name" => "Progressbar",
48
+ "mode" => "free",
49
+ "dimensions" => null,
50
+ "multiplacements" => false,
51
+ "help" => "Displays a simple progress bar, showing total progress of upload."
52
  ),
53
  array(
54
+ "id" => "userdata",
55
+ "name" => "User Fields",
56
+ "mode" => "free",
57
+ "dimensions" => array("userdata/User Fields", "userdata_label/User Fields Label", "userdata_value/User Fields Value"),
58
+ "multiplacements" => true,
59
+ "help" => "Displays additional fields that the user must fill-in together with the uploaded files."
60
  ),
61
  array(
62
+ "id" => "message",
63
+ "name" => "Message",
64
+ "mode" => "free",
65
+ "dimensions" => null,
66
+ "multiplacements" => false,
67
+ "help" => "Displays a message block with information about the upload, together with any warnings or errors."
68
  )
69
  );
70
 
90
  return $cats;
91
  }
92
 
93
+ function wfu_formfield_definitions() {
94
+ //field properties have 2 parts separated by "/"; the first part determines if the property will be shown to the user (show or hide); the second part determines default value)
95
+ //when making changes in the structure of formfield definitions, the following are affected:
96
+ // - wfu_admin_composer.php function wfu_shortcode_composer
97
+ // variable $fieldprops_basic
98
+ // variable $fieldprops_default
99
+ // variable $template
100
+ // variable wfu_attribute_..._typeprops
101
+ // variable $from_template
102
+ // - wfu_functions.php function wfu_parse_userdata_attribute
103
+ // variable $default
104
+ // variable $fieldprops
105
+ // - wfu_blocks.php function wfu_userdata_apply_template
106
+ // return variable
107
+ // - wordpress_file_upload_adminfuctions.js function wfu_formdata_type_changed
108
+ // variable field
109
+ // - wordpress_file_upload_adminfuctions.js function wfu_formdata_add_field
110
+ // variable field
111
+ // - wordpress_file_upload_adminfuctions.js function wfu_formdata_prepare_template
112
+ // variable fieldprops_basic
113
+ // variable template
114
+ // - wordpress_file_upload_adminfuctions.js function wfu_update_formfield_value
115
+ // variable part
116
+ // - wordpress_file_upload_adminfuctions.js function wfu_apply_value
117
+ // variable def
118
+ // variable fieldprops
119
+ $formfields = array(
120
+ array(
121
+ "type" => "text",
122
+ "type_description" => "Simple Text",
123
+ //checkbox properties
124
+ "required" => "show/false",
125
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
126
+ "donotautocomplete" => "show/false",
127
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
128
+ "validate" => "hide/false",
129
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
130
+ "typehook" => "hide/false",
131
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
132
+ //dropdown properties
133
+ "labelposition" => "show/left",
134
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
135
+ "hintposition" => "show/right",
136
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
137
+ //text properties
138
+ "default" => "show/",
139
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
140
+ "data" => "hide/",
141
+ "data_label" => "Data",
142
+ "data_hint" => "complete a list of values to be shown to the user",
143
+ "group" => "hide/",
144
+ "group_hint" => "if a value is set, then all fields having the same value will belong to the same group",
145
+ "format" => "hide/",
146
+ "format_hint" => "enter a format to format user selection",
147
+ //html templates
148
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="[default]" autocomplete="[autocomplete]" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
149
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="Test message" autocomplete="off" readonly="readonly" />',
150
+ //javascript mandatory code
151
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
152
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
153
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
154
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
155
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
156
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field, store) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
157
+ //javascript optional code
158
+ "validate_code" => "",
159
+ "typehook_code" => ""
160
+ ),
161
+ array(
162
+ "type" => "multitext",
163
+ "type_description" => "Multiple Lines Text",
164
+ //checkbox properties
165
+ "required" => "show/false",
166
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
167
+ "donotautocomplete" => "hide/true",
168
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
169
+ "validate" => "hide/false",
170
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
171
+ "typehook" => "hide/false",
172
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
173
+ //dropdown properties
174
+ "labelposition" => "show/left",
175
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
176
+ "hintposition" => "show/right",
177
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
178
+ //text properties
179
+ "default" => "hide/",
180
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
181
+ "data" => "hide/",
182
+ "data_label" => "Data",
183
+ "data_hint" => "complete a list of values to be shown to the user",
184
+ "group" => "hide/",
185
+ "group_hint" => "if a value is set, then all fields having the same value will belong to the same group",
186
+ "format" => "hide/",
187
+ "format_hint" => "enter a format to format user selection",
188
+ //html templates
189
+ "template" => '<textarea id="userdata_[sid]_field_[key]" class="file_userdata_message" value="[default]" onfocus="wfu_userdata_focused(this);">[default]</textarea><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
190
+ "template_testmode" => '<textarea id="userdata_[sid]_field_[key]" class="file_userdata_message" value="Test message" readonly="readonly">Test message</textarea>',
191
+ //javascript mandatory code
192
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
193
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
194
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
195
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
196
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
197
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field, store) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
198
+ //javascript optional code
199
+ "validate_code" => "",
200
+ "typehook_code" => ""
201
+ ),
202
+ array(
203
+ "type" => "number",
204
+ "type_description" => "Number",
205
+ //checkbox properties
206
+ "required" => "show/false",
207
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
208
+ "donotautocomplete" => "show/true",
209
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
210
+ "validate" => "show/true",
211
+ "validate_hint" => "if checked, then the number entered by the user will be checked if it is a valid number, based on the format defined, before file upload",
212
+ "typehook" => "show/false",
213
+ "typehook_hint" => "if checked, then only valid characters will be allowed during typing",
214
+ //dropdown properties
215
+ "labelposition" => "show/left",
216
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
217
+ "hintposition" => "show/right",
218
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
219
+ //text properties
220
+ "default" => "show/",
221
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
222
+ "data" => "hide/",
223
+ "data_label" => "Data",
224
+ "data_hint" => "complete a list of values to be shown to the user",
225
+ "group" => "hide/",
226
+ "group_hint" => "if a non-empty group value is set, then another email confirmation field belonging to the same group must have the same email value",
227
+ "format" => "show/d",
228
+ "format_hint" => "enter a format for the number:\\r\\n d for integers\\r\\n f for floating point numbers\\r\\nthe dot (.) symbol is used as a decimal separator",
229
+ //html templates
230
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="[default]" autocomplete="[autocomplete]" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
231
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="Test message" autocomplete="off" readonly="readonly" />',
232
+ //javascript mandatory code
233
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { if (window["userdata_[sid]_codes_[key]"].typehook) window["userdata_[sid]_codes_[key]"].typehook(e); else document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
234
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
235
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
236
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
237
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
238
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
239
+ //javascript optional code
240
+ "validate_code" => 'window["userdata_[sid]_codes_[key]"].validate = function(field) { var re = /^(\+|\-)?[0-9]*$/i; if ("[format]" == "f") re = /^(\+|\-)?[0-9]*?\.?[0-9]*$/i; return (re.test(field.value) ? "" : "'.WFU_ERROR_USERDATANUMBER_INVALID.'"); };',
241
+ "typehook_code" => 'window["userdata_[sid]_codes_[key]"].typehook = function(e) { var re = /^(\+|\-)?[0-9]*$/i; if ("[format]" == "f") re = /^(\+|\-)?[0-9]*?\.?[0-9]*$/i; if (re.test(e.target.value)) document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; else e.target.value = document.getElementById("hiddeninput_[sid]_userdata_[key]").value; };',
242
+ ),
243
+ array(
244
+ "type" => "email",
245
+ "type_description" => "Email",
246
+ //checkbox properties
247
+ "required" => "show/false",
248
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
249
+ "donotautocomplete" => "show/true",
250
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
251
+ "validate" => "show/true",
252
+ "validate_hint" => "if checked, then the email entered by the user will be checked if it is valid before file upload",
253
+ "typehook" => "hide/false",
254
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
255
+ //dropdown properties
256
+ "labelposition" => "show/left",
257
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
258
+ "hintposition" => "show/right",
259
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
260
+ //text properties
261
+ "default" => "show/",
262
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
263
+ "data" => "hide/",
264
+ "data_label" => "Data",
265
+ "data_hint" => "complete a list of values to be shown to the user",
266
+ "group" => "show/0",
267
+ "group_hint" => "if a non-empty group value is set, then another email confirmation field belonging to the same group must have the same email value",
268
+ "format" => "hide/",
269
+ "format_hint" => "enter a format to format user selection",
270
+ //html templates
271
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message file_userdata_[sid]_emailgroup_[group]" value="[default]" autocomplete="[autocomplete]" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
272
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message file_userdata_emailgroup_[group]" value="Test message" autocomplete="off" readonly="readonly" />',
273
+ //javascript mandatory code
274
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
275
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
276
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
277
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
278
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
279
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
280
+ //javascript optional code
281
+ "validate_code" => 'window["userdata_[sid]_codes_[key]"].validate = function(field) { var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return (re.test(field.value) ? "" : "'.WFU_ERROR_USERDATAEMAIL_INVALID.'"); };',
282
+ "typehook_code" => ""
283
+ ),
284
+ array(
285
+ "type" => "confirmemail",
286
+ "type_description" => "Confirmation Email",
287
+ //checkbox properties
288
+ "required" => "show/true",
289
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
290
+ "donotautocomplete" => "show/true",
291
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
292
+ "validate" => "hide/true",
293
+ "validate_hint" => "if checked, then the confirmation email entered by the user will be checked if it is the same with the email belonging to the same group",
294
+ "typehook" => "hide/false",
295
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
296
+ //dropdown properties
297
+ "labelposition" => "show/left",
298
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
299
+ "hintposition" => "show/right",
300
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
301
+ //text properties
302
+ "default" => "hide/",
303
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
304
+ "data" => "hide/",
305
+ "data_label" => "Data",
306
+ "data_hint" => "complete a list of values to be shown to the user",
307
+ "group" => "show/0",
308
+ "group_hint" => "enter a non-empty value to match this email confirmation field with another email field",
309
+ "format" => "hide/",
310
+ "format_hint" => "enter a format to format user selection",
311
+ //html templates
312
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="[default]" autocomplete="[autocomplete]" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
313
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="Test message" autocomplete="off" readonly="readonly" />',
314
+ //javascript mandatory code
315
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
316
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
317
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
318
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
319
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
320
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
321
+ //javascript optional code
322
+ "validate_code" => 'window["userdata_[sid]_codes_[key]"].validate = function(field) { var base = document.querySelector("input.file_userdata_[sid]_emailgroup_[group]"); return (base ? (field.value == base.value ? "" : "'.WFU_ERROR_USERDATACONFIRMEMAIL_NOMATCH.'") : "'.WFU_ERROR_USERDATACONFIRMEMAIL_NOBASE.'"); };',
323
+ "typehook_code" => ""
324
+ ),
325
+ array(
326
+ "type" => "password",
327
+ "type_description" => "Password",
328
+ //checkbox properties
329
+ "required" => "show/true",
330
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
331
+ "donotautocomplete" => "false/true",
332
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
333
+ "validate" => "hide/false",
334
+ "validate_hint" => "if checked, then the value entered by the user will be validated",
335
+ "typehook" => "hide/false",
336
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
337
+ //dropdown properties
338
+ "labelposition" => "show/left",
339
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
340
+ "hintposition" => "show/right",
341
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
342
+ //text properties
343
+ "default" => "hide/",
344
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
345
+ "data" => "hide/",
346
+ "data_label" => "Data",
347
+ "data_hint" => "complete a list of values to be shown to the user",
348
+ "group" => "show/0",
349
+ "group_hint" => "if a non-empty group value is set, then another password confirmation field belonging to the same group must have the same password",
350
+ "format" => "hide/",
351
+ "format_hint" => "enter a format to format user selection",
352
+ //html templates
353
+ "template" => '<input type="password" id="userdata_[sid]_field_[key]" class="file_userdata_message file_userdata_[sid]_passwordgroup_[group]" value="[default]" autocomplete="[autocomplete]" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
354
+ "template_testmode" => '<input type="password" id="userdata_[sid]_field_[key]" class="file_userdata_message file_userdata_passwordgroup_[group]" value="Test message" autocomplete="off" readonly="readonly" />',
355
+ //javascript mandatory code
356
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
357
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
358
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
359
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
360
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
361
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
362
+ //javascript optional code
363
+ "validate_code" => "",
364
+ "typehook_code" => ""
365
+ ),
366
+ array(
367
+ "type" => "confirmpassword",
368
+ "type_description" => "Confirmation Password",
369
+ //checkbox properties
370
+ "required" => "show/true",
371
+ "required_hint" => "if checked, then this field must have a non-empty value for the file to be uploaded",
372
+ "donotautocomplete" => "false/true",
373
+ "donotautocomplete_hint" => "if checked, then the field will notify the browsers not to fill it with autocomplete data when the plugin is reloaded",
374
+ "validate" => "hide/true",
375
+ "validate_hint" => "if checked, then the value entered by the user will be validated",
376
+ "typehook" => "hide/false",
377
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
378
+ //dropdown properties
379
+ "labelposition" => "show/left",
380
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
381
+ "hintposition" => "show/right",
382
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
383
+ //text properties
384
+ "default" => "hide/",
385
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
386
+ "data" => "hide/",
387
+ "data_label" => "Data",
388
+ "data_hint" => "complete a list of values to be shown to the user",
389
+ "group" => "show/0",
390
+ "group_hint" => "if a non-empty group value is set, then another password confirmation field belonging to the same group must have the same password",
391
+ "format" => "hide/",
392
+ "format_hint" => "enter a format to format user selection",
393
+ //html templates
394
+ "template" => '<input type="password" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="[default]" autocomplete="[autocomplete]" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
395
+ "template_testmode" => '<input type="password" id="userdata_[sid]_field_[key]" class="file_userdata_message" value="Test message" autocomplete="off" readonly="readonly" />',
396
+ //javascript mandatory code
397
+ "init_code" => 'wfu_attach_element_handlers(document.getElementById("userdata_[sid]_field_[key]"), function(e) { document.getElementById("hiddeninput_[sid]_userdata_[key]").value = e.target.value; }); window["userdata_[sid]_codes_[key]"] = {};',
398
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
399
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
400
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
401
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.value = "[default]"; store.value = "[default]"; };',
402
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
403
+ //javascript optional code
404
+ "validate_code" => 'window["userdata_[sid]_codes_[key]"].validate = function(field) { var base = document.querySelector("input.file_userdata_[sid]_passwordgroup_[group]"); return (base ? (field.value == base.value ? "" : "'.WFU_ERROR_USERDATACONFIRMPASSWORD_NOMATCH.'") : "'.WFU_ERROR_USERDATACONFIRMPASSWORD_NOBASE.'"); };',
405
+ "typehook_code" => ""
406
+ ),
407
+ array(
408
+ "type" => "checkbox",
409
+ "type_description" => "Checkbox",
410
+ //checkbox properties
411
+ "required" => "show/false",
412
+ "required_hint" => "if checked, then this checkbox field must be checked before file upload",
413
+ "donotautocomplete" => "show/true",
414
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
415
+ "validate" => "hide/false",
416
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
417
+ "typehook" => "hide/false",
418
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
419
+ //dropdown properties
420
+ "labelposition" => "show/none",
421
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
422
+ "hintposition" => "show/right",
423
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
424
+ //text properties
425
+ "default" => "show/false",
426
+ "default_hint" => "enter a default value (true or false) for the field or leave it empty if you do not want a default value",
427
+ "data" => "show/",
428
+ "data_label" => "Description",
429
+ "data_hint" => "enter a description for the checkbox",
430
+ "group" => "hide/",
431
+ "group_hint" => "if a value is set, then all fields having the same value will belong to the same group",
432
+ "format" => "show/right",
433
+ "format_hint" => "define the location of the description in relation to the check box\\r\\npossible values are: top, right, bottom, left",
434
+ //html templates
435
+ "template" => '<input type="checkbox" id="userdata_[sid]_field_[key]" class="file_userdata_checkbox" autocomplete="[autocomplete]" onchange="document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = (this.checked ? \'true\' : \'false\');" style="display:none;" onfocus="wfu_userdata_focused(this);" /><label id="userdata_[sid]_checklabel_[key]" class="file_userdata_checkbox_description" for="userdata_[sid]_field_[key]" style="display:none;">[data]</label><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
436
+ "template_testmode" => '<input type="checkbox" id="userdata_[sid]_field_[key]" class="file_userdata_checkbox" autocomplete="off" readonly="readonly" /><label id="userdata_[sid]_checklabel_[key]" for="userdata_[sid]_field_[key]" style="display:none;">[list]</label>',
437
+ //javascript mandatory code
438
+ "init_code" => 'function wfu_checkbox_init() { var f = document.getElementById("userdata_[sid]_field_[key]"); var l = document.getElementById("userdata_[sid]_checklabel_[key]"); var p = f.parentNode; var pos = "[format]"; if (pos == "top") {p.insertBefore(l, f); p.insertBefore(document.createElement("BR"), f);} else if (pos == "bottom") {p.insertBefore(document.createElement("BR"), l);} else if (pos == "left") {p.insertBefore(l, f);} f.style.display = "inline-block"; l.style.display = "inline-block"; f.checked = ("[default]" == "true"); }; wfu_checkbox_init(); window["userdata_[sid]_codes_[key]"] = {};',
439
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return (field.checked ? "true" : "false"); };',
440
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
441
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
442
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { field.checked = ("[default]" == "true"); store.value = (field.checked ? "true" : "false"); };',
443
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value != "true" ? "'.WFU_ERROR_USERDATACHECKBOX_NOTCHECKED.'" : ""); };',
444
+ //javascript optional code
445
+ "validate_code" => "",
446
+ "typehook_code" => ""
447
+ ),
448
+ array(
449
+ "type" => "radiobutton",
450
+ "type_description" => "Radio button",
451
+ //checkbox properties
452
+ "required" => "show/false",
453
+ "required_hint" => "if checked, then a radio button must be selected before file upload",
454
+ "donotautocomplete" => "show/true",
455
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
456
+ "validate" => "hide/false",
457
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
458
+ "typehook" => "hide/false",
459
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
460
+ //dropdown properties
461
+ "labelposition" => "show/left",
462
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
463
+ "hintposition" => "show/right",
464
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
465
+ //text properties
466
+ "default" => "show/",
467
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
468
+ "data" => "show/",
469
+ "data_label" => "Items",
470
+ "data_hint" => "enter a comma delimited list of radio button items",
471
+ "group" => "show/0",
472
+ "group_hint" => "all radio buttons having the same group id belong to the same group",
473
+ "format" => "show/",
474
+ "format_hint" => "define the location of the radio labels in relation to their radio buttons (top, right, bottom, left)\\r\\nand the placement of the radio buttons (horizontal, vertical)",
475
+ //html templates
476
+ "template" => '<input type="radio" id="userdata_[sid]_field_[key]" class="file_userdata_radiobutton" name="userdata_[sid]_radiogroup_[group]" autocomplete="[autocomplete]" onchange="var items = document.getElementsByName(this.name); for (var i = 0; i < items.length; i++) if (items[i].checked) {document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = items[i].value; break;}" style="display:none;" onfocus="wfu_userdata_focused(document.getElementById(\'userdata_[sid]_field_[key]\'));" /><label id="userdata_[sid]_radiolabel_[key]" class="file_userdata_radiobutton_label" for="userdata_[sid]_field_[key]" style="display:none;">[data]</label><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
477
+ "template_testmode" => '<input type="radio" id="userdata_[sid]_field_[key]" class="file_userdata_radiobutton" name="userdata_[sid]_radiogroup_[group]" autocomplete="off" readonly="readonly" /><label id="userdata_[sid]_radiolabel_[key]" for="userdata_[sid]_field_[key]" style="display:none;">[list]</label>',
478
+ //javascript mandatory code
479
+ "init_code" => 'function wfu_radiobutton_init() { var data = "[data]"; var items = data.split(","); var f = document.getElementById("userdata_[sid]_field_[key]"); var l = document.getElementById("userdata_[sid]_radiolabel_[key]"); var p = f.parentNode; var fo = "[format]"; var pos = (fo.indexOf("top") > -1 ? "top" : (fo.indexOf("bottom") > -1 ? "bottom" : (fo.indexOf("left") > -1 ? "left" : "right"))); var or = (fo.indexOf("vertical") > -1 ? "vertical" : "horizontal"); var def = "[default]"; for (var i = 0; i < items.length; i++) { var f2 = f; var l2 = l; if (i > 0) {var f2 = f.cloneNode(true); f2.id += "_item_" + i; l2 = l.cloneNode(true); l2.id += "_item_" + i; l2.setAttribute("for", f2.id);} f2.value = items[i]; l2.innerHTML = items[i]; var w = document.createElement("DIV"); w.className = "file_userdata_radio_wrapper"; if (pos == "top") {w.appendChild(l2); w.appendChild(document.createElement("BR")); w.appendChild(f2);} else if (pos == "right") {w.appendChild(f2); w.appendChild(l2);} else if (pos == "bottom") {w.appendChild(f2); w.appendChild(document.createElement("BR")); w.appendChild(l2);} else if (pos == "left") {w.appendChild(l2); w.appendChild(f2);} f2.style.display = "inline-block"; l2.style.display = "inline-block"; f2.checked = (def == f2.value); if (i > 0 && or == "vertical") p.appendChild(document.createElement("BR")); p.appendChild(w); } }; wfu_radiobutton_init(); window["userdata_[sid]_codes_[key]"] = {};',
480
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { var value = ""; var items = document.getElementsByName(field.name); for (var i = 0; i < items.length; i++) if (items[i].checked) {value = items[i].value; break;} return value; };',
481
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { var items = document.getElementsByName(field.name); for (var i = 0; i < items.length; i++) items[i].disabled = true; };',
482
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { var items = document.getElementsByName(field.name); for (var i = 0; i < items.length; i++) items[i].disabled = false; };',
483
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { var items = document.getElementsByName(field.name); for (var i = 0; i < items.length; i++) {items[i].checked = (items[i].value == "[default]"); if (items[i].checked) store.value = items[i].value;} };',
484
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "" ? "'.WFU_ERROR_USERDATARADIO_NOTSELECTED.'" : ""); };',
485
+ //javascript optional code
486
+ "validate_code" => "",
487
+ "typehook_code" => ""
488
+ ),
489
+ array(
490
+ "type" => "date",
491
+ "type_description" => "Date",
492
+ //checkbox properties
493
+ "required" => "show/false",
494
+ "required_hint" => "if checked, then a date must be entered before file upload",
495
+ "donotautocomplete" => "show/true",
496
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
497
+ "validate" => "hide/false",
498
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
499
+ "typehook" => "hide/false",
500
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
501
+ //dropdown properties
502
+ "labelposition" => "show/left",
503
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
504
+ "hintposition" => "show/right",
505
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
506
+ //text properties
507
+ "default" => "show/",
508
+ "default_hint" => "enter a default date for the field or leave it empty if you do not want a default value",
509
+ "data" => "hide/",
510
+ "data_label" => "Data",
511
+ "data_hint" => "enter data items",
512
+ "group" => "hide/",
513
+ "group_hint" => "enter a group value",
514
+ "format" => "show/",
515
+ "format_hint" => "define the format of the date field as follows:\\r\\n d - day of month (no leading zero)\\r\\n dd - day of month (two digit)\\r\\n o - day of the year (no leading zeros)\\r\\n oo - day of the year (three digit)\\r\\n D - day name short\\r\\n DD - day name long\\r\\n m - month of year (no leading zero)\\r\\n mm - month of year (two digit)\\r\\n M - month name short\\r\\n MM - month name long\\r\\n y - year (two digit)\\r\\n yy - year (four digit)\\r\\n @ - Unix timestamp (ms since 01/01/1970)\\r\\n ! - Windows ticks (100ns since 01/01/0001)\\r\\n &#39;...&#39; - literal text\\r\\n &#39;&#39; - single quote\\r\\n anything else - literal text",
516
+ //html templates
517
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" autocomplete="[autocomplete]" readonly="readonly" onchange="document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = this.value;" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
518
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" autocomplete="off" readonly="readonly" />',
519
+ //javascript mandatory code
520
+ "init_code" => 'jQuery(function() {var format = "[format]"; format = format.trim(); if (format.substr(0, 1) == "(" && format.substr(format.length - 1, 1) == ")") format = format.substr(1, format.length - 2); else format = ""; if (format == "") format = "yy-mm-dd"; var def = "[default]"; def = def.trim(); if (def.substr(0, 1) == "(" && def.substr(def.length - 1, 1) == ")") def = def.substr(1, def.length - 2); else def = ""; jQuery("#userdata_[sid]_field_[key]").datepicker({dateFormat: format, showButtonPanel: true}).datepicker("setDate", def); }); window["userdata_[sid]_codes_[key]"] = {};',
521
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
522
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
523
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
524
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { var def = "[default]"; def = def.trim(); if (def.substr(0, 1) == "(" && def.substr(def.length - 1, 1) == ")") def = def.substr(1, def.length - 2); else def = ""; jQuery("#userdata_[sid]_field_[key]").datepicker("setDate", def); store.value = field.value; };',
525
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field, store) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
526
+ //javascript optional code
527
+ "validate_code" => "",
528
+ "typehook_code" => ""
529
+ ),
530
+ array(
531
+ "type" => "time",
532
+ "type_description" => "Time",
533
+ //checkbox properties
534
+ "required" => "show/false",
535
+ "required_hint" => "if checked, then a time must be entered before file upload",
536
+ "donotautocomplete" => "show/true",
537
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
538
+ "validate" => "hide/false",
539
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
540
+ "typehook" => "hide/false",
541
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
542
+ //dropdown properties
543
+ "labelposition" => "show/left",
544
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
545
+ "hintposition" => "show/right",
546
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
547
+ //text properties
548
+ "default" => "show/",
549
+ "default_hint" => "enter a default time for the field or leave it empty if you do not want a default value",
550
+ "data" => "hide/",
551
+ "data_label" => "Data",
552
+ "data_hint" => "enter data items",
553
+ "group" => "hide/",
554
+ "group_hint" => "enter a group value",
555
+ "format" => "show/",
556
+ "format_hint" => "define the format of the time field as follows:\\r\\n H - hour with no leading 0 (24 hour)\\r\\n HH - hour with leading 0 (24 hour)\\r\\n h - hour with no leading 0 (12 hour)\\r\\n hh - hour with leading 0 (12 hour)\\r\\n m - minute with no leading 0\\r\\n mm - minute with leading 0\\r\\n s - second with no leading 0\\r\\n ss - second with leading 0\\r\\n l - milliseconds always with leading 0\\r\\n c - microseconds always with leading 0\\r\\n t - a or p for AM/PM\\r\\n T - A or P for AM/PM\\r\\n tt - am or pm for AM/PM\\r\\n TT - AM or PM for AM/PM\\r\\n z - timezone as defined by timezoneList\\r\\n Z - timezone in Iso 8601 format (+04:45)\\r\\n &#39;...&#39; - literal text",
557
+ //html templates
558
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" autocomplete="[autocomplete]" readonly="readonly" onchange="document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = this.value;" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
559
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" autocomplete="off" readonly="readonly" />',
560
+ //javascript mandatory code
561
+ "init_code" => 'jQuery(function() {var format = "[format]"; format = format.trim(); if (format.substr(0, 1) == "(" && format.substr(format.length - 1, 1) == ")") format = format.substr(1, format.length - 2); else format = ""; if (format == "") format = "HH:mm"; var def = "[default]"; def = def.trim(); if (def.substr(0, 1) == "(" && def.substr(def.length - 1, 1) == ")") def = def.substr(1, def.length - 2); else def = ""; jQuery("#userdata_[sid]_field_[key]").timepicker({timeFormat: format}).datepicker("setTime", def); }); window["userdata_[sid]_codes_[key]"] = {};',
562
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
563
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
564
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
565
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { var def = "[default]"; def = def.trim(); if (def.substr(0, 1) == "(" && def.substr(def.length - 1, 1) == ")") def = def.substr(1, def.length - 2); else def = ""; jQuery("#userdata_[sid]_field_[key]").datepicker("setTime", def); store.value = field.value; };',
566
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field, store) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
567
+ //javascript optional code
568
+ "validate_code" => "",
569
+ "typehook_code" => ""
570
+ ),
571
+ array(
572
+ "type" => "datetime",
573
+ "type_description" => "DateTime",
574
+ //checkbox properties
575
+ "required" => "show/false",
576
+ "required_hint" => "if checked, then a date and time must be entered before file upload",
577
+ "donotautocomplete" => "show/true",
578
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
579
+ "validate" => "hide/false",
580
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
581
+ "typehook" => "hide/false",
582
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
583
+ //dropdown properties
584
+ "labelposition" => "show/left",
585
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
586
+ "hintposition" => "show/right",
587
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
588
+ //text properties
589
+ "default" => "show/",
590
+ "default_hint" => "enter a default date and time for the field or leave it empty if you do not want a default value",
591
+ "data" => "hide/",
592
+ "data_label" => "Data",
593
+ "data_hint" => "enter data items",
594
+ "group" => "hide/",
595
+ "group_hint" => "enter a group value",
596
+ "format" => "show/",
597
+ "format_hint" => "define the format of the datetime field as follows:\\r\\n date(dateformat) where dateformat is:\\r\\n d - day of month (no leading zero)\\r\\n dd - day of month (two digit)\\r\\n o - day of the year (no leading zeros)\\r\\n oo - day of the year (three digit)\\r\\n D - day name short\\r\\n DD - day name long\\r\\n m - month of year (no leading zero)\\r\\n mm - month of year (two digit)\\r\\n M - month name short\\r\\n MM - month name long\\r\\n y - year (two digit)\\r\\n yy - year (four digit)\\r\\n @ - Unix timestamp (ms since 01/01/1970)\\r\\n ! - Windows ticks (100ns since 01/01/0001)\\r\\n &#39;...&#39; - literal text\\r\\n &#39;&#39; - single quote\\r\\n anything else - literal text\\r\\n time(timeformat) where timeformat is:\\r\\n H - hour with no leading 0 (24 hour)\\r\\n HH - hour with leading 0 (24 hour)\\r\\n h - hour with no leading 0 (12 hour)\\r\\n hh - hour with leading 0 (12 hour)\\r\\n m - minute with no leading 0\\r\\n mm - minute with leading 0\\r\\n s - second with no leading 0\\r\\n ss - second with leading 0\\r\\n l - milliseconds always with leading 0\\r\\n c - microseconds always with leading 0\\r\\n t - a or p for AM/PM\\r\\n T - A or P for AM/PM\\r\\n tt - am or pm for AM/PM\\r\\n TT - AM or PM for AM/PM\\r\\n z - timezone as defined by timezoneList\\r\\n Z - timezone in Iso 8601 format (+04:45)\\r\\n &#39;...&#39; - literal text",
598
+ //html templates
599
+ "template" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" autocomplete="[autocomplete]" readonly="readonly" onchange="document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = this.value;" onfocus="wfu_userdata_focused(this);" /><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
600
+ "template_testmode" => '<input type="text" id="userdata_[sid]_field_[key]" class="file_userdata_message" autocomplete="off" readonly="readonly" />',
601
+ //javascript mandatory code
602
+ "init_code" => 'jQuery(function() {var format = "[format]"; var dateformat = "yy-mm-dd"; var timeformat = "HH:mm"; var re = /(date|time)\((.*?)\)/g; var f; while ((f = re.exec(format)) !== null) {if (f[1] == "date") dateformat = f[2]; else if (f[1] == "time") timeformat = f[2];} var def = "[default]"; def = def.trim(); if (def.substr(0, 1) == "(" && def.substr(def.length - 1, 1) == ")") def = def.substr(1, def.length - 2); else def = ""; jQuery("#userdata_[sid]_field_[key]").datetimepicker({dateFormat: dateformat, timeFormat: timeformat}).datetimepicker("setDate", def); }); window["userdata_[sid]_codes_[key]"] = {};',
603
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
604
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
605
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
606
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { var def = "[default]"; def = def.trim(); if (def.substr(0, 1) == "(" && def.substr(def.length - 1, 1) == ")") def = def.substr(1, def.length - 2); else def = ""; jQuery("#userdata_[sid]_field_[key]").datetimepicker("setDate", def); store.value = field.value; };',
607
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field, store) { return (field.value === "") ? "'.WFU_ERROR_USERDATA_EMPTY.'" : ""; };',
608
+ //javascript optional code
609
+ "validate_code" => "",
610
+ "typehook_code" => ""
611
+ ),
612
+ array(
613
+ "type" => "list",
614
+ "type_description" => "Listbox",
615
+ //checkbox properties
616
+ "required" => "show/false",
617
+ "required_hint" => "if checked, then a list item must be selected before file upload",
618
+ "donotautocomplete" => "show/true",
619
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
620
+ "validate" => "hide/false",
621
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
622
+ "typehook" => "hide/false",
623
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
624
+ //dropdown properties
625
+ "labelposition" => "show/left",
626
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
627
+ "hintposition" => "show/right",
628
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
629
+ //text properties
630
+ "default" => "show/",
631
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
632
+ "data" => "show/",
633
+ "data_label" => "List Items",
634
+ "data_hint" => "enter a comma delimited list of items",
635
+ "group" => "hide/",
636
+ "group_hint" => "all items having the same group id belong to the same group",
637
+ "format" => "hide/",
638
+ "format_hint" => "enter the format of the list",
639
+ //html templates
640
+ "template" => '<select id="userdata_[sid]_field_[key]" class="file_userdata_listbox" multiple="multiple" autocomplete="[autocomplete]" value="[default]" onchange="document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = this.value;" onfocus="wfu_userdata_focused(this);"><option id="userdata_[sid]_listitem_[key]" style="display:none;"></option></select><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
641
+ "template_testmode" => '<select id="userdata_[sid]_field_[key]" class="file_userdata_listbox" multiple="multiple" autocomplete="off" readonly="readonly"><option>Test value</option></select>',
642
+ //javascript mandatory code
643
+ "init_code" => 'function wfu_listbox_init() { var data = "[data]"; var items = data.split(","); var f = document.getElementById("userdata_[sid]_field_[key]"); var o = document.getElementById("userdata_[sid]_listitem_[key]"); var def = "[default]"; for (var i = 0; i < items.length; i++) { var o2 = o; if (i > 0) o2 = o.cloneNode(true); o2.value = items[i]; o2.innerHTML = items[i]; o2.selected = (o2.value == def); o2.style.display = "block"; if (i > 0) f.appendChild(o2); } }; wfu_listbox_init(); window["userdata_[sid]_codes_[key]"] = {};',
644
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
645
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
646
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
647
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { for (var i = 0; i < field.options.length; i++) {field.options[i].checked = (field.options[i].value == "[default]"); if (field.options[i].checked) store.value = field.options[i].value;} };',
648
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "" ? "'.WFU_ERROR_USERDATALIST_NOITEMSELECTED.'" : ""); };',
649
+ //javascript optional code
650
+ "validate_code" => "",
651
+ "typehook_code" => ""
652
+ ),
653
+ array(
654
+ "type" => "dropdown",
655
+ "type_description" => "Dropdown",
656
+ //checkbox properties
657
+ "required" => "show/false",
658
+ "required_hint" => "if checked, then an item from the dropdown list must be selected before file upload",
659
+ "donotautocomplete" => "show/true",
660
+ "donotautocomplete_hint" => "if checked, then the field will not be autocompleted by browsers",
661
+ "validate" => "hide/false",
662
+ "validate_hint" => "if checked, then the field value entered by the user will be validated before file upload",
663
+ "typehook" => "hide/false",
664
+ "typehook_hint" => "if checked, then text suggestions will be shown below the field as the user types more text inside",
665
+ //dropdown properties
666
+ "labelposition" => "show/left",
667
+ "labelposition_hint" => "select the position of the field&#39;s label; the position is relative to the field",
668
+ "hintposition" => "show/right",
669
+ "hintposition_hint" => "select the position of the hint that will be shown to notify the user that something is wrong\\r\\nthe position is relative to the field",
670
+ //text properties
671
+ "default" => "show/",
672
+ "default_hint" => "enter a default value for the field or leave it empty if you do not want a default value",
673
+ "data" => "show/",
674
+ "data_label" => "List Items",
675
+ "data_hint" => "enter a comma delimited list of items",
676
+ "group" => "hide/",
677
+ "group_hint" => "all items having the same group id belong to the same group",
678
+ "format" => "hide/",
679
+ "format_hint" => "enter the format of the list",
680
+ //html templates
681
+ "template" => '<select id="userdata_[sid]_field_[key]" class="file_userdata_dropdown" autocomplete="[autocomplete]" value="[default]" onchange="document.getElementById(\'hiddeninput_[sid]_userdata_[key]\').value = this.value;" onfocus="wfu_userdata_focused(this);"><option id="userdata_[sid]_listitem_[key]" style="display:none;"></option></select><input id="userdata_[sid]_props_[key]" type="hidden" value="p:[hintposition]" />',
682
+ "template_testmode" => '<select id="userdata_[sid]_field_[key]" class="file_userdata_dropdown" autocomplete="off" readonly="readonly"><option>Test value</option></select>',
683
+ //javascript mandatory code
684
+ "init_code" => 'function wfu_dropdown_init() { var data = "[data]"; var items = data.split(","); var f = document.getElementById("userdata_[sid]_field_[key]"); var o = document.getElementById("userdata_[sid]_listitem_[key]"); var def = "[default]"; for (var i = 0; i < items.length; i++) { var o2 = o.cloneNode(true); o2.value = items[i]; o2.innerHTML = items[i]; o2.selected = (o2.value == def); o2.style.display = "block"; f.appendChild(o2); } }; wfu_dropdown_init(); window["userdata_[sid]_codes_[key]"] = {};',
685
+ "value_code" => 'window["userdata_[sid]_codes_[key]"].value = function(field) { return field.value; };',
686
+ "lock_code" => 'window["userdata_[sid]_codes_[key]"].lock = function(field) { field.disabled = true; };',
687
+ "unlock_code" => 'window["userdata_[sid]_codes_[key]"].unlock = function(field) { field.disabled = false; };',
688
+ "reset_code" => 'window["userdata_[sid]_codes_[key]"].reset = function(field, store) { for (var i = 0; i < field.options.length; i++) {field.options[i].selected = (field.options[i].value == "[default]"); if (field.options[i].selected) store.value = field.options[i].value;} };',
689
+ "empty_code" => 'window["userdata_[sid]_codes_[key]"].empty = function(field) { return (field.value === "" ? "'.WFU_ERROR_USERDATALIST_NOITEMSELECTED.'" : ""); };',
690
+ //javascript optional code
691
+ "validate_code" => "",
692
+ "typehook_code" => ""
693
+ )
694
+ );
695
+
696
+ return $formfields;
697
+ }
698
+
699
  function wfu_attribute_definitions() {
700
  $defs = array(
701
  array(
1370
  "variables" => null,
1371
  "help" => "If enabled, then user can send additional information together with uploaded files (e.g. name, email etc), defined in userdatalabel attribute."
1372
  ),
1373
+ /* array(
1374
  "name" => "Additional Data Fields",
1375
  "attribute" => "userdatalabel",
1376
  "type" => "userfields",
1383
  "dependencies" => null,
1384
  "variables" => null,
1385
  "help" => "It defines the labels of the additional data fields and whether they are required or not."
1386
+ ),*/
1387
+ array(
1388
+ "name" => "Additional Data Fields",
1389
+ "attribute" => "userdatalabel",
1390
+ "type" => "formfields",
1391
+ "listitems" => wfu_formfield_definitions(),
1392
+ "value" => WFU_USERDATALABEL,
1393
+ "mode" => "free",
1394
+ "category" => "userdata",
1395
+ "subcategory" => "Additional Data Fields",
1396
+ "parent" => "userdata",
1397
+ "dependencies" => null,
1398
+ "variables" => null,
1399
+ "help" => "It defines the labels of the additional data fields and whether they are required or not."
1400
  ),
1401
  array(
1402
  "name" => "WP Filebase Plugin Connection",
lib/wfu_blocks.php CHANGED
@@ -1,12 +1,14 @@
1
  <?php
2
 
3
  /* Prepare information about directory or selection of target subdirectory */
4
- function wfu_prepare_subfolders_block($params, $widths, $heights) {
5
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
6
  $relaxcss = false;
7
  if ( isset($plugin_options['relaxcss']) ) $relaxcss = ( $plugin_options['relaxcss'] == "1" );
8
 
9
  $sid = $params["uploadid"];
 
 
10
  $selectsubdir = 'selectsubdir_'.$sid;
11
  $editbox = 'selectsubdiredit_'.$sid;
12
  $defaultvalue = 'selectsubdirdefault_'.$sid;
@@ -26,7 +28,6 @@ function wfu_prepare_subfolders_block($params, $widths, $heights) {
26
  if ( $heights["subfolders_select"] != "" ) $styles4 .= 'height: '.$heights["subfolders_select"].'; ';
27
  $styles3 = ' style="'.( $relaxcss ? '' : $styles3 ).$styles4.'"';
28
  if ( $styles4 != "" ) $styles4 = ' style="'.$styles4.'"';
29
- $subfolder_paths = array ( );
30
  $linebr = "";
31
  if ( $params["showtargetfolder"] == "true" || $params["askforsubfolders"] == "true" ) {
32
  $linebr = '<br />';
@@ -53,7 +54,6 @@ function wfu_prepare_subfolders_block($params, $widths, $heights) {
53
  else {
54
  $zeroind = $i;
55
  $subfolders_item["line".$i++] = "\t".'<option'.( substr($params["subfoldertree"], 0, 5) == "auto+" ? ' style="display:none;"' : '' ).'>'.WFU_SUBDIR_SELECTDIR.'</option>';
56
- array_push($subfolder_paths, "");
57
  if ( substr($params["subfoldertree"], 0, 4) == "auto" ) {
58
  $upload_directory = wfu_upload_plugin_full_path($params);
59
  $dirtree = wfu_getTree($upload_directory);
@@ -69,7 +69,6 @@ function wfu_prepare_subfolders_block($params, $widths, $heights) {
69
  }
70
  $default = -1;
71
  foreach ($subfolders['path'] as $ind => $subfolder) {
72
- array_push($subfolder_paths, $subfolder);
73
  if ( $subfolders['default'][$ind] ) $default = intval($ind) + 1;
74
  $subfolders_item["line".$i++] = "\t".'<option'.( $subfolders['default'][$ind] ? ' selected="selected"' : '' ).'>'.str_repeat("&nbsp;&nbsp;&nbsp;", intval($subfolders['level'][$ind])).$subfolders['label'][$ind].'</option>';
75
  }
@@ -81,15 +80,14 @@ function wfu_prepare_subfolders_block($params, $widths, $heights) {
81
  $subfolders_item["line".$i++] = '<input id="'.$defaultvalue.'" type="hidden" value="'.$default.'" />';
82
  }
83
 
84
- $subfolders['item'] = $subfolders_item;
85
- $subfolders['paths'] = $subfolder_paths;
86
-
87
- return $subfolders;
88
  }
89
 
90
  /* Prepare the title */
91
- function wfu_prepare_title_block($params, $widths, $heights) {
92
  $sid = $params["uploadid"];
 
 
93
  $title_item = null;
94
  if ( $params["uploadtitle"] ) {
95
  $title_item["title"] = 'wordpress_file_upload_title_'.$sid;
@@ -105,8 +103,10 @@ function wfu_prepare_title_block($params, $widths, $heights) {
105
  }
106
 
107
  /* Prepare the text box showing filename */
108
- function wfu_prepare_textbox_block($params, $widths, $heights) {
109
  $sid = $params["uploadid"];
 
 
110
  $textfile = 'fileName_'.$sid;
111
  $textbox_item["title"] = 'wordpress_file_upload_textbox_'.$sid;
112
  $textbox_item["hidden"] = false;
@@ -120,8 +120,11 @@ function wfu_prepare_textbox_block($params, $widths, $heights) {
120
  }
121
 
122
  /* Prepare the upload form (required) */
123
- function wfu_prepare_uploadform_block($params, $widths, $heights, $clickaction, $additional_params) {
124
  $sid = $params["uploadid"];
 
 
 
125
  $uploadform = 'uploadform_'.$sid;
126
  $uploadedfile = 'uploadedfile_'.$sid;
127
  $upfile = 'upfile_'.$sid;
@@ -159,8 +162,11 @@ function wfu_prepare_uploadform_block($params, $widths, $heights, $clickaction,
159
  }
160
 
161
  /* Prepare the submit button */
162
- function wfu_prepare_submit_block($params, $widths, $heights, $clickaction) {
163
  $sid = $params["uploadid"];
 
 
 
164
  $upload = 'upload_'.$sid;
165
  $default = $params["uploadbutton"];
166
 
@@ -179,8 +185,10 @@ function wfu_prepare_submit_block($params, $widths, $heights, $clickaction) {
179
 
180
 
181
  /* Prepare the progress bar */
182
- function wfu_prepare_progressbar_block($params, $widths, $heights) {
183
  $sid = $params["uploadid"];
 
 
184
  $progress_bar = 'progressbar_'.$sid;
185
 
186
  $progressbar_item["title"] = 'wordpress_file_upload_progressbar_'.$sid;
@@ -200,8 +208,10 @@ function wfu_prepare_progressbar_block($params, $widths, $heights) {
200
  }
201
 
202
  /* Prepare the message block */
203
- function wfu_prepare_message_block($params, $widths, $heights) {
204
  $sid = $params["uploadid"];
 
 
205
  $styles = "";
206
  if ( $widths["message"] != "" ) $styles .= 'width: '.$widths["message"].'; ';
207
  if ( $heights["message"] != "" ) $styles .= 'height: '.$heights["message"].'; ';
@@ -215,8 +225,14 @@ function wfu_prepare_message_block($params, $widths, $heights) {
215
  }
216
 
217
  /* Prepare the user data block */
218
- function wfu_prepare_userdata_block($params, $widths, $heights) {
219
  $sid = $params["uploadid"];
 
 
 
 
 
 
220
  $userdata = 'userdata_'.$sid;
221
  $hiddeninput = 'hiddeninput_'.$sid;
222
 
@@ -235,20 +251,57 @@ function wfu_prepare_userdata_block($params, $widths, $heights) {
235
  if ( $heights["userdata_value"] != "" ) $styles3 .= 'height: '.$heights["userdata_value"].'; ';
236
  if ( $styles3 != "" ) $styles3 = ' style="'.$styles3.'"';
237
  $i = 1;
 
 
238
  foreach ($params["userdata_fields"] as $userdata_key => $userdata_field) {
239
- $userdata_item["line".$i++] = '<div id="'.$userdata.'_'.$userdata_key.'" class="file_userdata_container"'.$styles1.'>';
240
- $userdata_item_label = $userdata_field["label"].( $userdata_field["required"] == "true" ? WFU_USERDATA_REQUIREDLABEL : "" );
241
- $userdata_item["line".$i++] = "\t".'<label id="'.$userdata.'_label_'.$userdata_key.'" for="'.$userdata.'_message_'.$userdata_key.'" class="file_userdata_label"'.$styles2.'>'.$userdata_item_label.'</label>';
242
- $userdata_item_class = ( $userdata_field["required"] == "true" ? "file_userdata_message_required" : "file_userdata_message" );
243
- if ( $params["testmode"] == "true" )
244
- $userdata_item["line".$i++] = "\t".'<input type="text" id="'.$userdata.'_message_'.$userdata_key.'" class="'.$userdata_item_class.'" value="Test message" readonly="readonly"'.$styles3.' />';
245
- else
246
- $userdata_item["line".$i++] = "\t".'<input type="text" id="'.$userdata.'_message_'.$userdata_key.'" class="'.$userdata_item_class.'" value=""'.$styles3.' onchange="javascript: document.getElementById(\''.$hiddeninput.'_userdata_'.$userdata_key.'\').value = this.value;" onfocus="wfu_userdata_focused(this);" />';
247
- $userdata_item["line".$i++] = "\t".'<div id="'.$userdata.'_hint_'.$userdata_key.'" class="file_userdata_hint" style="display:none;">empty</div>';
248
- $userdata_item["line".$i++] = '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  }
250
 
251
  return $userdata_item;
252
  }
253
 
 
 
 
 
254
  ?>
1
  <?php
2
 
3
  /* Prepare information about directory or selection of target subdirectory */
4
+ function wfu_prepare_subfolders_block($params, $additional_params, $occurrence_index) {
5
  $plugin_options = wfu_decode_plugin_options(get_option( "wordpress_file_upload_options" ));
6
  $relaxcss = false;
7
  if ( isset($plugin_options['relaxcss']) ) $relaxcss = ( $plugin_options['relaxcss'] == "1" );
8
 
9
  $sid = $params["uploadid"];
10
+ $widths = $additional_params['widths'];
11
+ $heights = $additional_params['heights'];
12
  $selectsubdir = 'selectsubdir_'.$sid;
13
  $editbox = 'selectsubdiredit_'.$sid;
14
  $defaultvalue = 'selectsubdirdefault_'.$sid;
28
  if ( $heights["subfolders_select"] != "" ) $styles4 .= 'height: '.$heights["subfolders_select"].'; ';
29
  $styles3 = ' style="'.( $relaxcss ? '' : $styles3 ).$styles4.'"';
30
  if ( $styles4 != "" ) $styles4 = ' style="'.$styles4.'"';
 
31
  $linebr = "";
32
  if ( $params["showtargetfolder"] == "true" || $params["askforsubfolders"] == "true" ) {
33
  $linebr = '<br />';
54
  else {
55
  $zeroind = $i;
56
  $subfolders_item["line".$i++] = "\t".'<option'.( substr($params["subfoldertree"], 0, 5) == "auto+" ? ' style="display:none;"' : '' ).'>'.WFU_SUBDIR_SELECTDIR.'</option>';
 
57
  if ( substr($params["subfoldertree"], 0, 4) == "auto" ) {
58
  $upload_directory = wfu_upload_plugin_full_path($params);
59
  $dirtree = wfu_getTree($upload_directory);
69
  }
70
  $default = -1;
71
  foreach ($subfolders['path'] as $ind => $subfolder) {
 
72
  if ( $subfolders['default'][$ind] ) $default = intval($ind) + 1;
73
  $subfolders_item["line".$i++] = "\t".'<option'.( $subfolders['default'][$ind] ? ' selected="selected"' : '' ).'>'.str_repeat("&nbsp;&nbsp;&nbsp;", intval($subfolders['level'][$ind])).$subfolders['label'][$ind].'</option>';
74
  }
80
  $subfolders_item["line".$i++] = '<input id="'.$defaultvalue.'" type="hidden" value="'.$default.'" />';
81
  }
82
 
83
+ return $subfolders_item;
 
 
 
84
  }
85
 
86
  /* Prepare the title */
87
+ function wfu_prepare_title_block($params, $additional_params, $occurrence_index) {
88
  $sid = $params["uploadid"];
89
+ $widths = $additional_params['widths'];
90
+ $heights = $additional_params['heights'];
91
  $title_item = null;
92
  if ( $params["uploadtitle"] ) {
93
  $title_item["title"] = 'wordpress_file_upload_title_'.$sid;
103
  }
104
 
105
  /* Prepare the text box showing filename */
106
+ function wfu_prepare_textbox_block($params, $additional_params, $occurrence_index) {
107
  $sid = $params["uploadid"];
108
+ $widths = $additional_params['widths'];
109
+ $heights = $additional_params['heights'];
110
  $textfile = 'fileName_'.$sid;
111
  $textbox_item["title"] = 'wordpress_file_upload_textbox_'.$sid;
112
  $textbox_item["hidden"] = false;
120
  }
121
 
122
  /* Prepare the upload form (required) */
123
+ function wfu_prepare_uploadform_block($params, $additional_params, $occurrence_index) {
124
  $sid = $params["uploadid"];
125
+ $widths = $additional_params['widths'];
126
+ $heights = $additional_params['heights'];
127
+ $clickaction = $additional_params['clickaction'];
128
  $uploadform = 'uploadform_'.$sid;
129
  $uploadedfile = 'uploadedfile_'.$sid;
130
  $upfile = 'upfile_'.$sid;
162
  }
163
 
164
  /* Prepare the submit button */
165
+ function wfu_prepare_submit_block($params, $additional_params, $occurrence_index) {
166
  $sid = $params["uploadid"];
167
+ $widths = $additional_params['widths'];
168
+ $heights = $additional_params['heights'];
169
+ $clickaction = $additional_params['clickaction'];
170
  $upload = 'upload_'.$sid;
171
  $default = $params["uploadbutton"];
172
 
185
 
186
 
187
  /* Prepare the progress bar */
188
+ function wfu_prepare_progressbar_block($params, $additional_params, $occurrence_index) {
189
  $sid = $params["uploadid"];
190
+ $widths = $additional_params['widths'];
191
+ $heights = $additional_params['heights'];
192
  $progress_bar = 'progressbar_'.$sid;
193
 
194
  $progressbar_item["title"] = 'wordpress_file_upload_progressbar_'.$sid;
208
  }
209
 
210
  /* Prepare the message block */
211
+ function wfu_prepare_message_block($params, $additional_params, $occurrence_index) {
212
  $sid = $params["uploadid"];
213
+ $widths = $additional_params['widths'];
214
+ $heights = $additional_params['heights'];
215
  $styles = "";
216
  if ( $widths["message"] != "" ) $styles .= 'width: '.$widths["message"].'; ';
217
  if ( $heights["message"] != "" ) $styles .= 'height: '.$heights["message"].'; ';
225
  }
226
 
227
  /* Prepare the user data block */
228
+ function wfu_prepare_userdata_block($params, $additional_params, $occurrence_index) {
229
  $sid = $params["uploadid"];
230
+ $widths = $additional_params['widths'];
231
+ $heights = $additional_params['heights'];
232
+ $definitions_unindexed = wfu_formfield_definitions();
233
+ $definitions = array();
234
+ foreach ( $definitions_unindexed as $def ) $definitions[$def["type"]] = $def;
235
+
236
  $userdata = 'userdata_'.$sid;
237
  $hiddeninput = 'hiddeninput_'.$sid;
238
 
251
  if ( $heights["userdata_value"] != "" ) $styles3 .= 'height: '.$heights["userdata_value"].'; ';
252
  if ( $styles3 != "" ) $styles3 = ' style="'.$styles3.'"';
253
  $i = 1;
254
+ $label_template = '<label id="userdata_[sid]_label_[key]" for="userdata_[sid]_field_[key]" class="file_userdata_label"'.$styles2.'>[label]</label>';
255
+ $hint_template = '<div id="userdata_[sid]_hint_[key]" class="file_userdata_hint" style="display:none;" onclick="document.getElementById(\'userdata_[sid]_field_[key]\').focus();">empty</div>';
256
  foreach ($params["userdata_fields"] as $userdata_key => $userdata_field) {
257
+ //show only fields belonging to $occurrence_index
258
+ if ( $occurrence_index == 0 || $userdata_field["occurrence"] == $occurrence_index ) {
259
+ $userdata_field["sid"] = $sid;
260
+ $userdata_field["key"] = $userdata_key;
261
+ //get field template
262
+ if ( $params["testmode"] == "true" ) $template = $definitions[$userdata_field["type"]]["template_testmode"];
263
+ else $template = $definitions[$userdata_field["type"]]["template"];
264
+ //add field wrapper
265
+ $template = '<div id="userdata_[sid]_fieldwrapper_[key]" class="file_userdata_fieldwrapper[required]"'.$styles3.'><div class="wfu_fieldwrapper_overlay" onclick="document.getElementById(\'userdata_[sid]_field_[key]\').focus();"></div>'.$template.'</div>';
266
+ //add field label, depending on label position
267
+ if ( $userdata_field["labelposition"] == "top" ) $template = $label_template.'<br />'.$template;
268
+ elseif ( $userdata_field["labelposition"] == "right" ) $template = $template.$label_template;
269
+ elseif ( $userdata_field["labelposition"] == "bottom" ) $template = $template.'<br />'.$label_template;
270
+ elseif ( $userdata_field["labelposition"] != "none" ) $template = $label_template.$template;
271
+ //apply template data to templates
272
+ $template = wfu_userdata_apply_template($template, $userdata_field);
273
+ $hint_html = wfu_userdata_apply_template($hint_template, $userdata_field);
274
+ $init_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["init_code"], $userdata_field);
275
+ $value_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["value_code"], $userdata_field);
276
+ $lock_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["lock_code"], $userdata_field);
277
+ $unlock_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["unlock_code"], $userdata_field);
278
+ $reset_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["reset_code"], $userdata_field);
279
+ $empty_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["empty_code"], $userdata_field);
280
+ $validate_code = "";
281
+ if ( $userdata_field["validate"] ) $validate_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["validate_code"], $userdata_field);
282
+ $typehook_code = "";
283
+ if ( $userdata_field["typehook"] ) $typehook_code = wfu_userdata_apply_template($definitions[$userdata_field["type"]]["typehook_code"], $userdata_field);
284
+ //generate html code
285
+ $userdata_item["line".$i++] = '<div id="'.$userdata.'_'.$userdata_key.'" class="file_userdata_container"'.$styles1.'>';
286
+ $userdata_item["line".$i++] = "\t".$template;
287
+ $userdata_item["line".$i++] = "\t".$hint_html;
288
+ $userdata_item["line".$i++] = "\t".wfu_inject_js_code($init_code);
289
+ $userdata_item["line".$i++] = "\t".wfu_inject_js_code($value_code);
290
+ $userdata_item["line".$i++] = "\t".wfu_inject_js_code($lock_code);
291
+ $userdata_item["line".$i++] = "\t".wfu_inject_js_code($unlock_code);
292
+ $userdata_item["line".$i++] = "\t".wfu_inject_js_code($reset_code);
293
+ $userdata_item["line".$i++] = "\t".wfu_inject_js_code($empty_code);
294
+ if ( $validate_code != "" ) $userdata_item["line".$i++] = "\t".wfu_inject_js_code($validate_code);
295
+ if ( $typehook_code != "" ) $userdata_item["line".$i++] = "\t".wfu_inject_js_code($typehook_code);
296
+ $userdata_item["line".$i++] = '</div>';
297
+ }
298
  }
299
 
300
  return $userdata_item;
301
  }
302
 
303
+ function wfu_userdata_apply_template($template, $params) {
304
+ return str_replace(array('[sid]', '[key]', '[label]', '[required]', '[default]', '[autocomplete]', '[hintposition]', '[format]', '[group]', '[data]'), array($params["sid"], $params['key'], $params["label"].( $params["required"] ? WFU_USERDATA_REQUIREDLABEL : "" ), ( $params["required"] ? '_required' : '' ), $params["default"], ( $params["donotautocomplete"] ? 'off' : 'on' ), $params["hintposition"], $params["format"], $params["group"], $params["data"]), $template);
305
+ }
306
+
307
  ?>
lib/wfu_constants.php CHANGED
@@ -52,7 +52,7 @@ DEFINE("WFU_WIDTHS", "");
52
  DEFINE("WFU_HEIGHTS", "");
53
  DEFINE("WFU_PLACEMENTS", "title/filename+selectbutton+uploadbutton/subfolders"."/userdata"."/message");
54
  DEFINE("WFU_USERDATA", "false");
55
- DEFINE("WFU_USERDATALABEL", __('Your message', 'wordpress-file-upload'));
56
  DEFINE("WFU_MEDIALINK", "false");
57
  DEFINE("WFU_POSTLINK", "false");
58
 
@@ -94,7 +94,17 @@ DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE0", __("Redirection to classic form funct
94
  DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE1", __("Redirection to classic form functionality occurred because AJAX is not supported.", "wordpress-file-upload"));
95
  DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE2", __("Redirection to classic form functionality occurred because HTML5 is not supported.", "wordpress-file-upload"));
96
  DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE3", __("Redirection to classic form functionality occurred due to JSON parse error.", "wordpress-file-upload"));
 
97
  DEFINE("WFU_ERROR_USERDATA_EMPTY", __("cannot be empty!", "wordpress-file-upload"));
 
 
 
 
 
 
 
 
 
98
  DEFINE("WFU_ERROR_SAME_PLUGINID", __("There are more than one instances of the plugin in this page with the same id. Please change it.", "wordpress-file-upload"));
99
  DEFINE("WFU_ERROR_PAGE_OBSOLETE", __("Cannot edit the shortcode because the page has been modified. Please reload the page.", "wordpress-file-upload"));
100
 
@@ -204,7 +214,7 @@ DEFINE("WFU_IMAGE_VERSION_COMPARISON", $siteurl.WPFILEUPLOAD_DIR.'images/Version
204
  function wfu_set_javascript_constants() {
205
  $consts = array(
206
  "nofilemessage" => WFU_ERROR_UPLOAD_NOFILESELECTED,
207
- "userdata_empty" => WFU_ERROR_USERDATA_EMPTY,
208
  "remoteserver_noresult" => WFU_ERROR_REMOTESERVER_NORESULT,
209
  "message_header" => WFU_ERRORMESSAGE,
210
  "message_failed" => WFU_ERROR_UPLOAD_FAILED_WHILE,
52
  DEFINE("WFU_HEIGHTS", "");
53
  DEFINE("WFU_PLACEMENTS", "title/filename+selectbutton+uploadbutton/subfolders"."/userdata"."/message");
54
  DEFINE("WFU_USERDATA", "false");
55
+ DEFINE("WFU_USERDATALABEL", __('Your message', 'wordpress-file-upload')."|t:text|s:left|r:0|a:0|p:inline|d:");
56
  DEFINE("WFU_MEDIALINK", "false");
57
  DEFINE("WFU_POSTLINK", "false");
58
 
94
  DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE1", __("Redirection to classic form functionality occurred because AJAX is not supported.", "wordpress-file-upload"));
95
  DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE2", __("Redirection to classic form functionality occurred because HTML5 is not supported.", "wordpress-file-upload"));
96
  DEFINE("WFU_ERROR_REDIRECTION_ERRORCODE3", __("Redirection to classic form functionality occurred due to JSON parse error.", "wordpress-file-upload"));
97
+ DEFINE("WFU_ERROR_ENABLE_POPUPS", __("Please enable popup windows from the browser's settings!", "wordpress-file-upload"));
98
  DEFINE("WFU_ERROR_USERDATA_EMPTY", __("cannot be empty!", "wordpress-file-upload"));
99
+ DEFINE("WFU_ERROR_USERDATANUMBER_INVALID", __("number not valid!", "wordpress-file-upload"));
100
+ DEFINE("WFU_ERROR_USERDATAEMAIL_INVALID", __("email not valid!", "wordpress-file-upload"));
101
+ DEFINE("WFU_ERROR_USERDATACONFIRMEMAIL_NOMATCH", __("emails do not match!", "wordpress-file-upload"));
102
+ DEFINE("WFU_ERROR_USERDATACONFIRMEMAIL_NOBASE", __("no base email field in group!", "wordpress-file-upload"));
103
+ DEFINE("WFU_ERROR_USERDATACONFIRMPASSWORD_NOMATCH", __("passwords do not match!", "wordpress-file-upload"));
104
+ DEFINE("WFU_ERROR_USERDATACONFIRMPASSWORD_NOBASE", __("no base password field in group!", "wordpress-file-upload"));
105
+ DEFINE("WFU_ERROR_USERDATACHECKBOX_NOTCHECKED", __("checkbox unchecked!", "wordpress-file-upload"));
106
+ DEFINE("WFU_ERROR_USERDATARADIO_NOTSELECTED", __("no option selected!", "wordpress-file-upload"));
107
+ DEFINE("WFU_ERROR_USERDATALIST_NOITEMSELECTED", __("no item selected!", "wordpress-file-upload"));
108
  DEFINE("WFU_ERROR_SAME_PLUGINID", __("There are more than one instances of the plugin in this page with the same id. Please change it.", "wordpress-file-upload"));
109
  DEFINE("WFU_ERROR_PAGE_OBSOLETE", __("Cannot edit the shortcode because the page has been modified. Please reload the page.", "wordpress-file-upload"));
110
 
214
  function wfu_set_javascript_constants() {
215
  $consts = array(
216
  "nofilemessage" => WFU_ERROR_UPLOAD_NOFILESELECTED,
217
+ "enable_popups" => WFU_ERROR_ENABLE_POPUPS,
218
  "remoteserver_noresult" => WFU_ERROR_REMOTESERVER_NORESULT,
219
  "message_header" => WFU_ERRORMESSAGE,
220
  "message_failed" => WFU_ERROR_UPLOAD_FAILED_WHILE,
lib/wfu_functions.php CHANGED
@@ -97,6 +97,24 @@ function wfu_sanitize_tag($code) {
97
  return preg_replace("/[^A-Za-z_]/", "", $code);
98
  }
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  //********************* Array Functions ****************************************************************************************************
101
 
102
  function wfu_encode_array_to_string($arr) {
@@ -1241,6 +1259,40 @@ function wfu_get_filtered_recs($filter) {
1241
 
1242
  //********************* Shortcode Options Functions ****************************************************************************************
1243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1244
  function wfu_generate_current_params_index($shortcode_id, $user_login) {
1245
  global $post;
1246
  $cur_index_str = '||'.$post->ID.'||'.$shortcode_id.'||'.$user_login;
@@ -1467,7 +1519,100 @@ function wfu_process_media_insert($file_path, $page_id){
1467
  return $attach_id;
1468
  }
1469
 
1470
- //********************* Media Functions ****************************************************************************************************
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1471
 
1472
  function wfu_safe_store_browser_actions($action_list) {
1473
  $code = wfu_create_random_string(16);
97
  return preg_replace("/[^A-Za-z_]/", "", $code);
98
  }
99
 
100
+ function wfu_slash( $value ) {
101
+ if ( is_array( $value ) ) {
102
+ foreach ( $value as $k => $v ) {
103
+ if ( is_array( $v ) ) {
104
+ $value[$k] = wfu_slash( $v );
105
+ }
106
+ else {
107
+ $value[$k] = addslashes( $v );
108
+ }
109
+ }
110
+ }
111
+ else {
112
+ $value = addslashes( $value );
113
+ }
114
+
115
+ return $value;
116
+ }
117
+
118
  //********************* Array Functions ****************************************************************************************************
119
 
120
  function wfu_encode_array_to_string($arr) {
1259
 
1260
  //********************* Shortcode Options Functions ****************************************************************************************
1261
 
1262
+ function wfu_shortcode_attribute_definitions_adjusted($shortcode_atts) {
1263
+ //get attribute definitions
1264
+ $defs = wfu_attribute_definitions();
1265
+ $defs_indexed = array();
1266
+ $defs_indexed_flat = array();
1267
+ foreach ( $defs as $def ) {
1268
+ $defs_indexed[$def["attribute"]] = $def;
1269
+ $defs_indexed_flat[$def["attribute"]] = $def["value"];
1270
+ }
1271
+ //get placement attribute from shortcode
1272
+ $placements = "";
1273
+ if ( isset($shortcode_atts["placements"]) ) $placements = $shortcode_atts["placements"];
1274
+ else $placements = $defs_indexed_flat["placements"];
1275
+ //get component definitions
1276
+ $components = wfu_component_definitions();
1277
+ //analyse components that can appear more than once in placements
1278
+ foreach ( $components as $component ) {
1279
+ if ( $component["multiplacements"] ) {
1280
+ $componentid = $component["id"];
1281
+ //count component occurrences in placements
1282
+ $component_occurrences = substr_count($placements, $componentid);
1283
+ if ( $component_occurrences > 1 && isset($defs_indexed[$componentid]) ) {
1284
+ //add incremented attribute definitions in $defs_indexed_flat array if occurrences are more than one
1285
+ for ( $i = 2; $i <= $component_occurrences; $i++ ) {
1286
+ foreach ( $defs_indexed[$componentid]["dependencies"] as $attribute )
1287
+ $defs_indexed_flat[$attribute.$i] = $defs_indexed_flat[$attribute];
1288
+ }
1289
+ }
1290
+ }
1291
+ }
1292
+
1293
+ return $defs_indexed_flat;
1294
+ }
1295
+
1296
  function wfu_generate_current_params_index($shortcode_id, $user_login) {
1297
  global $post;
1298
  $cur_index_str = '||'.$post->ID.'||'.$shortcode_id.'||'.$user_login;
1519
  return $attach_id;
1520
  }
1521
 
1522
+ //********************* Form Fields Functions ****************************************************************************************************
1523
+
1524
+ // function wfu_parse_userdata_attribute parses the shortcode attribute to a form field array
1525
+ function wfu_parse_userdata_attribute($value){
1526
+ $fields = array();
1527
+ //read defaults
1528
+ $definitions_unindexed = wfu_formfield_definitions();
1529
+ $defaults = array();
1530
+ foreach ( $definitions_unindexed as $def ) {
1531
+ $default = array();
1532
+ $default["type"] = $def["type"];
1533
+ $default["label"] = "";
1534
+ $default["labelposition"] = substr($def["labelposition"], 5);
1535
+ $default["required"] = ( substr($def["required"], 5) == "true" );
1536
+ $default["donotautocomplete"] = ( substr($def["donotautocomplete"], 5) == "true" );
1537
+ $default["validate"] = ( substr($def["validate"], 5) == "true" );
1538
+ $default["typehook"] = ( substr($def["typehook"], 5) == "true" );
1539
+ $default["hintposition"] = substr($def["hintposition"], 5);
1540
+ $default["default"] = substr($def["default"], 5);
1541
+ $default["data"] = substr($def["data"], 5);
1542
+ $default["group"] = substr($def["group"], 5);
1543
+ $default["format"] = substr($def["format"], 5);
1544
+ $defaults[$def["type"]] = $default;
1545
+ }
1546
+ // $fields_arr = explode("/", $value);
1547
+ $value = str_replace("/", "[/]", $value);
1548
+ $value = preg_replace_callback("/\(.*\)/", function ($m) {return str_replace("[/]", "/", $m[0]);}, $value);
1549
+ $fields_arr = explode("[/]", $value);
1550
+ //parse shortcode attribute to $fields
1551
+ foreach ( $fields_arr as $field_raw ) {
1552
+ $field_raw = trim($field_raw);
1553
+ $fieldprops = $defaults["text"];
1554
+ //read old default attribute
1555
+ if ( substr($field_raw, 0, 1) == "*" ) {
1556
+ $fieldprops["required"] = true;
1557
+ $field_raw = substr($field_raw, 1);
1558
+ }
1559
+ $field_parts = explode("|", $field_raw);
1560
+ //proceed if the first part, which is the label, is non-empty
1561
+ if ( trim($field_parts[0]) != "" ) {
1562
+ //get type, if exists, in order to adjust defaults
1563
+ $type_key = -1;
1564
+ $new_type = "";
1565
+ foreach ( $field_parts as $key => $part ) {
1566
+ $part = ltrim($part);
1567
+ $flag = substr($part, 0, 2);
1568
+ $val = substr($part, 2);
1569
+ if ( $flag == "t:" && $key > 0 && array_key_exists($val, $defaults) ) {
1570
+ $new_type = $val;
1571
+ $type_key = $key;
1572
+ break;
1573
+ }
1574
+ }
1575
+ if ( $new_type != "" ) {
1576
+ $fieldprops = $defaults[$new_type];
1577
+ unset($field_parts[$type_key]);
1578
+ }
1579
+ //store label
1580
+ $fieldprops["label"] = trim($field_parts[0]);
1581
+ unset($field_parts[0]);
1582
+ //get other properties
1583
+ foreach ( $field_parts as $part ) {
1584
+ $part = ltrim($part);
1585
+ $flag = substr($part, 0, 2);
1586
+ $val = substr($part, 2);
1587
+ if ( $flag == "s:" ) $fieldprops["labelposition"] = $val;
1588
+ elseif ( $flag == "r:" ) $fieldprops["required"] = ( $val == "1" );
1589
+ elseif ( $flag == "a:" ) $fieldprops["donotautocomplete"] = ( $val == "1" );
1590
+ elseif ( $flag == "v:" ) $fieldprops["validate"] = ( $val == "1" );
1591
+ elseif ( $flag == "d:" ) $fieldprops["default"] = $val;
1592
+ elseif ( $flag == "l:" ) $fieldprops["data"] = $val;
1593
+ elseif ( $flag == "g:" ) $fieldprops["group"] = $val;
1594
+ elseif ( $flag == "f:" ) $fieldprops["format"] = $val;
1595
+ elseif ( $flag == "p:" ) $fieldprops["hintposition"] = $val;
1596
+ elseif ( $flag == "h:" ) $fieldprops["typehook"] = ( $val == "1" );
1597
+ }
1598
+ array_push($fields, $fieldprops);
1599
+ }
1600
+ }
1601
+
1602
+ return $fields;
1603
+ }
1604
+
1605
+ //********************* Javascript Related Functions ****************************************************************************************************
1606
+
1607
+ // function wfu_inject_js_code generates html code for injecting js code and then erase the trace
1608
+ function wfu_inject_js_code($code){
1609
+ $id = 'code_'.wfu_create_random_string(8);
1610
+ $html = '<div id="'.$id.'" style="display:none;"><script type="text/javascript">'.$code.'</script><script type="text/javascript">var div = document.getElementById("'.$id.'"); div.parentNode.removeChild(div);</script></div>';
1611
+
1612
+ return $html;
1613
+ }
1614
+
1615
+ //********************* Browser Functions ****************************************************************************************************
1616
 
1617
  function wfu_safe_store_browser_actions($action_list) {
1618
  $code = wfu_create_random_string(16);
lib/wfu_processfiles.php CHANGED
@@ -35,8 +35,9 @@ function wfu_process_files($params, $method) {
35
  $allowed_patterns[$key] = trim($allowed_pattern);
36
  }
37
  $userdata_fields = $params["userdata_fields"];
38
- foreach ( $userdata_fields as $userdata_key => $userdata_field )
39
- $userdata_fields[$userdata_key]["value"] = ( isset($_POST[$hiddeninput.'_userdata_'.$userdata_key]) ? sanitize_text_field($_POST[$hiddeninput.'_userdata_'.$userdata_key]) : "" );
 
40
  $params_output_array["version"] = "full";
41
  $params_output_array["general"]['shortcode_id'] = $sid;
42
  $params_output_array["general"]['unique_id'] = $unique_id;
35
  $allowed_patterns[$key] = trim($allowed_pattern);
36
  }
37
  $userdata_fields = $params["userdata_fields"];
38
+ foreach ( $userdata_fields as $userdata_key => $userdata_field ) {
39
+ $userdata_fields[$userdata_key]["value"] = ( isset($_POST[$hiddeninput.'_userdata_'.$userdata_key]) ? strip_tags($_POST[$hiddeninput.'_userdata_'.$userdata_key]) : "" );
40
+ }
41
  $params_output_array["version"] = "full";
42
  $params_output_array["general"]['shortcode_id'] = $sid;
43
  $params_output_array["general"]['unique_id'] = $unique_id;
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Wordpress File Upload ===
2
  Contributors: nickboss
3
  Donate link: http://www.iptanus.com/support/wordpress-file-upload
4
- Tags: upload, upload file, upload files, multiple, multiple upload, multiple uploads, captcha, progress bar, form, ajax, directory, HTML5, filelist, gallery, image gallery, browser, file browser, gallery, image gallery, shortcode, logging, file logging
5
  Requires at least: 2.9.2
6
- Tested up to: 4.2.2
7
  Stable tag: "trunk"
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,21 +16,21 @@ With this plugin you or other users can upload files to your site from any page,
16
 
17
  Simply put the shortcode [wordpress_file_upload] to the contents of any WordPress page and you will be able to upload files to any directory inside wp-contents of your WordPress site.
18
 
19
- The plugin includes a file browser to access and manage the uploaded files from the Dashboard (only for admins currently).
20
 
21
- Current version supports filters and actions before and after file upload, in order to extend its capabilities.
22
 
23
- Please note that this plugin is the successor of **Inline Upload** plugin.
24
 
25
  The characteristics of the plugin are:
26
 
27
  * It does not use flash and handles uploads using various technologies (HTML5, AJAX, classic HTML forms) depending on browser's capabilities, which detects automatically. As a result it can work in any browser, including mobiles phones (even old ones).
28
  * You can have more than one instances of the shortcode in the same page.
 
29
  * It supports multilingual characters and localization.
30
  * Uploaded files can be added to Media or be attached to the current page.
31
  * It is highly customizable with many (more than 50) options.
32
  * It produces notification messages and e-mails.
33
- * You can create additional fields that the user must fill in along with the uploaded file.
34
  * You can select from a list of subfolders.
35
  * Upload progress can be monitored with a progress bar.
36
  * It supports redirection to another url after successful upload.
@@ -122,13 +122,24 @@ There is an option in plugin's settings in Dashboard to relax the CSS rules, so
122
  1. A screenshot of the plugin in its most simple form.
123
  2. A screenshot of the plugin showing the progress bar.
124
  3. A screenshot of the plugin showing the successful upload message.
125
- 4. A screenshot of the plugin with different placement.
126
- 5. A screenshot of the plugin with user fields.
127
  6. A screenshot of the shortcode composer.
128
  7. A screenshot of the file browser.
129
 
130
  == Changelog ==
131
 
 
 
 
 
 
 
 
 
 
 
 
132
  = 3.2.1 =
133
  * removed 'form-field' class from admin table tr elements
134
  * corrected bug that was causing problems in uploadrole and uploaduser attributes when a username or role contained uppercase letters
@@ -477,6 +488,9 @@ Initial version.
477
 
478
  == Upgrade Notice ==
479
 
 
 
 
480
  = 3.2.1 =
481
  Upgrade to fix some bugs and add some features.
482
 
@@ -714,7 +728,7 @@ A detailed list of attributes, together with instructions is shown below:
714
 
715
  *Plugin Component Positions*
716
 
717
- * **placements:** This attribute can be used to change the placement of the objects of the plugin. Default value is "title/filename+selectbutton+uploadbutton/subfolders/userdata/progressbar/message". Every line is separated by a slash (/). To put more than one objects to the same line, separate them with a plus (+). The name of every object is shown below.
718
 
719
  **Labels**
720
 
@@ -774,7 +788,55 @@ A detailed list of attributes, together with instructions is shown below:
774
  *Additional Data Fields*
775
 
776
  * **userdata:** This attribute defines if additional text information will be requested by the user. If set to "true", then an additional textbox will appear, prompting the user to put text data. These data will be sent to email recipients, if email notification has been activated and %userdata% variable exists inside notifymessage attribute. Default value is "false".
777
- * **userdatalabel:** This attribute defines the labels of the userdata fields. Separate each field with slash "/". If you want a field to be required, then preceed an asterisk (*) before the label. Example to create 2 fields, an optional Name and a required Email field: userdatalabel="Name/*Email (required)". Default value is "Your message".
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
778
 
779
  **Interoperability**
780
 
1
  === Wordpress File Upload ===
2
  Contributors: nickboss
3
  Donate link: http://www.iptanus.com/support/wordpress-file-upload
4
+ Tags: upload, upload file, file upload, upload files, form, upload form, field, fields, form field, form fields, multiple, multiple uploads, captcha, progress bar, ajax, directory, HTML5, filelist, gallery, image gallery, browser, file browser, shortcode
5
  Requires at least: 2.9.2
6
+ Tested up to: 4.2.4
7
  Stable tag: "trunk"
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
16
 
17
  Simply put the shortcode [wordpress_file_upload] to the contents of any WordPress page and you will be able to upload files to any directory inside wp-contents of your WordPress site.
18
 
19
+ You can add custom fields to submit additional data together with the uploaded file.
20
 
21
+ The plugin includes a file browser to access and manage the uploaded files from the Dashboard (only for admins currently).
22
 
23
+ Several filters and actions before and after file upload enable extension of its capabilities.
24
 
25
  The characteristics of the plugin are:
26
 
27
  * It does not use flash and handles uploads using various technologies (HTML5, AJAX, classic HTML forms) depending on browser's capabilities, which detects automatically. As a result it can work in any browser, including mobiles phones (even old ones).
28
  * You can have more than one instances of the shortcode in the same page.
29
+ * You can set additional fields (like checkboxes, text fields, email fields, dropdown lists etc) that the user must fill in along with the uploaded file.
30
  * It supports multilingual characters and localization.
31
  * Uploaded files can be added to Media or be attached to the current page.
32
  * It is highly customizable with many (more than 50) options.
33
  * It produces notification messages and e-mails.
 
34
  * You can select from a list of subfolders.
35
  * Upload progress can be monitored with a progress bar.
36
  * It supports redirection to another url after successful upload.
122
  1. A screenshot of the plugin in its most simple form.
123
  2. A screenshot of the plugin showing the progress bar.
124
  3. A screenshot of the plugin showing the successful upload message.
125
+ 4. A screenshot of the plugin with additional form fields.
126
+ 5. A screenshot of the plugin with subfolder selection.
127
  6. A screenshot of the shortcode composer.
128
  7. A screenshot of the file browser.
129
 
130
  == Changelog ==
131
 
132
+ = 3.3.0 =
133
+ * userdatalabel attribute changed to allow many field types
134
+ * added the following user data field types: simple text, multiline text, number, email, confirmation email, password, confirmation password, checkbox, radiobutton, date, time, datetime, listbox and dropdown list
135
+ * added several options to configure the new user data fields: label text (to define the label of the field), label position (to define the position of the label in relation to the field), required option (to define if the field needs to be filled before file upload), do-not-autocomplete option (to prevent the browsers for completing the field automatically), validate option (to perform validity checks of the field before file upload depending on its type), default text (to define a default value), group id (to group fields together such as multiple radio buttons), format text (to define field formatting depending on the field type), typehook option (to enable field validation during typing inside the field), hint position (to define the position of the message that will be shown to prompt the user that a required field is empty or is not validated) as well as an option to define additional data depending on the field type (e.g. define list of items of a listbox or dropdown list)
136
+ * Shortcode Composer changed to support the new user data fields and options
137
+ * placement attribute can accept more than one instances of userdata
138
+ * fixed bug not showing date selector of date fields in Shortcode Composer when working with Firefox or IE browsers
139
+ * in some cases required userdata input field will turn red if not populated
140
+ * shortcode_exists and wp_slash fixes for working before 3.6 Wordpress version
141
+ * minor bug fixes
142
+
143
  = 3.2.1 =
144
  * removed 'form-field' class from admin table tr elements
145
  * corrected bug that was causing problems in uploadrole and uploaduser attributes when a username or role contained uppercase letters
488
 
489
  == Upgrade Notice ==
490
 
491
+ = 3.3.0 =
492
+ Major upgrade to add some new featuresand fix some minor bugs.
493
+
494
  = 3.2.1 =
495
  Upgrade to fix some bugs and add some features.
496
 
728
 
729
  *Plugin Component Positions*
730
 
731
+ * **placements:** This attribute can be used to change the placement of the objects of the plugin. Default value is "title/filename+selectbutton+uploadbutton/subfolders/userdata/progressbar/message". Every line is separated by a slash (/). To put more than one objects to the same line, separate them with a plus (+). The objects supported are: title, filename, selectbutton, uploadbutton, subfolders, progressbar, userdata and message. You can have more than one instances of userdata inside placements.
732
 
733
  **Labels**
734
 
788
  *Additional Data Fields*
789
 
790
  * **userdata:** This attribute defines if additional text information will be requested by the user. If set to "true", then an additional textbox will appear, prompting the user to put text data. These data will be sent to email recipients, if email notification has been activated and %userdata% variable exists inside notifymessage attribute. Default value is "false".
791
+ * **userdatalabel:** This attribute defines the userdata fields. Separate each field definition with slash "/". The most simple is to define the field's label (text field will be assumed), e.g. Name/Email will define two text fields, one with label "Name" and one with label "Email". Additional options can be defined for each field, appended after the label using a "|" separator, an option designator (a single character plus ":" sign) and an option value. The available options are described below. Default value is "Your message|t:text|s:left|r:0|a:0|p:inline|d:".
792
+ - **t:** field type, can take the values: text, multitext, number, email, confirmemail, password, confirmpassword, checkbox, radiobutton, date, time, datetime, list, dropdown
793
+ - **s:** label position relative to the field, can take the values: none, top, right, bottom, left
794
+ - **r:** is field required, can take the values: 0, 1
795
+ - **a:** do not allow browser to auto-complete the field, can take the values: 0, 1
796
+ - **v:** validate the field, can take the values: 0, 1
797
+ - **d:** default field value
798
+ - **l:** custom field data, this option depends on the field type; for checkbox it is the description shown next to the check box, for radiobutton it is a comma-separated list of radio button labels, for list and dropdown it is a comma-separated list of items
799
+ - **g:** a group value used to group together relevant fields; it is used for grouping email with confirmemail, password with confirmpassword and radiobutton fields together
800
+ - **p:** the position of the hint that is shown to the user when a required field is empty or its validation fails; it can have the values: none, inline, top, right, bottom, left
801
+ - **h:** validate the field during typing, can take the values: 0, 1
802
+ - **f:** define field format; it depends on the field type; for number field it can take the value d (for integer numbers) or f (for floating-point numbers), for checkbox it defines the location of the description in relation to the checkbox (top, right, bottom, left), for radiobutton it defines the location of the label in relation to its radio button (top, right, bottom, left) and placement of the radio buttons (vertical, horizontal), for date, time and datetime fields it defines the format of the date (or time) as shown below:
803
+
804
+ date formats:
805
+ - **d** - day of month (no leading zero)
806
+ - **dd** - day of month (two digit)
807
+ - **o** - day of the year (no leading zeros)
808
+ - **oo** - day of the year (three digit)
809
+ - **D** - day name short
810
+ - **DD** - day name long
811
+ - **m** - month of year (no leading zero)
812
+ - **mm** - month of year (two digit)
813
+ - **M** - month name short
814
+ - **MM** - month name long
815
+ - **y** - year (two digit)
816
+ - **yy** - year (four digit)
817
+ - **@** - Unix timestamp (ms since 01/01/1970)
818
+ - **!** - Windows ticks (100ns since 01/01/0001)
819
+ - **'...'** - literal text
820
+ - **''** - single quote
821
+ - anything else - literal text
822
+
823
+ time formats:
824
+ - **H** - hour with no leading 0 (24 hour)
825
+ - **HH** - hour with leading 0 (24 hour)
826
+ - **h** - hour with no leading 0 (12 hour)
827
+ - **hh** - hour with leading 0 (12 hour)
828
+ - **m** - minute with no leading 0
829
+ - **mm** - minute with leading 0
830
+ - **s** - second with no leading 0
831
+ - **ss** - second with leading 0
832
+ - **l** - milliseconds always with leading 0
833
+ - **c** - microseconds always with leading 0
834
+ - **t** - a or p for AM/PM
835
+ - **T** - A or P for AM/PM
836
+ - **tt** - am or pm for AM/PM
837
+ - **TT** - AM or PM for AM/PM
838
+ - **z** - timezone as defined by timezoneList
839
+ - **Z** - timezone in Iso 8601 format (+04:45)
840
 
841
  **Interoperability**
842
 
release_notes.txt CHANGED
@@ -1 +1 @@
1
- <span><strong>Latest release notes: </strong>This version introduces some minor bug fixes and code improvements.<!-- --> The professional version of the plugin introduces some important improvements to the front-end file list viewer feature. For details, please check the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">page</a><span>.<!-- --><!-- --></span>
1
+ <span><strong>Latest release notes: </strong>This is a major feature upgrade. Now you can submit additional data together with the uploaded files </span><span style="text-decoration:underline;">using various form fields</span><span>. The new field types supported are: <strong>text, multi-text, number, email, confirmation-email, password, confirmation-password, check-box, radio-buttons, date, time, date/time, list-box and drop-down list</strong>. Several options are provided to configure the fields, such as define if they are required or not, set a default value, set a comma-separated list of contained items (e.g. for listboxes), define if they need to be validated, set the location of the label etc. All these options can be set using the <strong>userdatalabel</strong> attribute as before. Its syntax has been extended to accept the additional options, however </span><span style="text-decoration:underline;">backward compatibility is maintained</span><span> to read the old format. A description of the new format is included in the plugin's instructions, however </span><span style="text-decoration:underline;">it is much easier to configure the attribute using the Shortcode Composer</span><span> which has also been updated. Furthermore, a detailed description of the new fields feature is described in a separate article </span><a href="http://www.iptanus.com/the-new-form-fields-of-wordpress-file-upload-plugin">here</a><span>.<br /><br />In order to make the form fields even more flexible, <strong>placements</strong> attributes, which defines the locations of the building blocks of the plugin, allows to use </span><span style="text-decoration:underline;">more than one instances of <em>userdata</em> block</span><span> (the block that contains the form fields). This means that you can have form fields existing in many locations, e.g. you can have form fields before the select button and form fields after the select button at the same time. The fields of the first instance of <em>userdata</em> block are set using <strong>userdatalabel</strong> attribute, the fields of the second instance using the <strong>userdatalabel2</strong> attribute and show on.</span>
screenshot-1.jpg CHANGED
Binary file
screenshot-2.jpg CHANGED
Binary file
screenshot-3.jpg CHANGED
Binary file
screenshot-4.jpg CHANGED
Binary file
screenshot-5.jpg CHANGED
Binary file
screenshot-6.jpg CHANGED
Binary file
screenshot-7.jpg CHANGED
Binary file
vendor/datetimepicker/jquery-ui-timepicker-addon.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! jQuery Timepicker Addon - v1.5.5 - 2015-05-24
2
+ * http://trentrichardson.com/examples/timepicker
3
+ * Copyright (c) 2015 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-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/datetimepicker/jquery-ui-timepicker-addon.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery","jquery.ui"],e):e(jQuery)}(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.5"}});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",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,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,{$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:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),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]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,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(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&void 0===$.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,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):-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: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: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&&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 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(e){var t=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_afterInject:function(){var e=this.inst.settings;$.isFunction(e.afterInject)&&e.afterInject.call(this)},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=" ui_tpicker_unit_hide",d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+(t.oneLine&&"select"===t.controlType?" ui-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+(t.showTime?"":m)+'">'+t.timeText+'</dt><dd class="ui_tpicker_time '+(t.showTime?"":m)+'"></dd>';for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+"_label"+(n?"":m)+'">'+t[s+"Text"]+'</dt><dd class="ui_tpicker_'+s+(n?"":m)+'"><div class="ui_tpicker_'+s+"_slider"+(n?"":m)+'"></div>',n&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label'+(f?"":m)+'">'+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone'+(f?"":m)+'"></dd>',d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div></div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),void 0!==this.timezone&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else void 0!==this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler(),i._afterInject()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.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=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=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.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=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!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.minuteMin=this._defaults.hourMin===o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?o.getMinutes():0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):this._defaults.minuteMax=this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?c.getMinutes():59}if(void 0!==t&&t===!0){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=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:u,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,max:m,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:d,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,max:h,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:p,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 e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&this.$timeObj.text(l===r.timeFormat?this.formattedTime+o:$.datepicker.formatTime(l,this,r)+o),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?r=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,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(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);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 e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+c,l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min>=0?n.min:r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),$.map(i.amNames,function(e){return e.toUpperCase()}))?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),a=this._get(s,"timepicker");a&&s.settings.showTimepicker?(a._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(e.input.val()?n:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);t.dpDiv;var i=this._get(t,"timepicker");selectLocalTimezone(i);var s=new Date;this._setTime(t,s),this._setDate(t,s),this._base_gotoToday(e)},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))
2
+ }},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&(s=new Date(t),s.getTime()||(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var a,n=this._get(i,"timepicker");s instanceof Date?(a=new Date(s.getTime()),a.setMicroseconds(s.getMicroseconds())):a=s,n&&a&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,n.timezone),a=$.timepicker.timezoneAdjust(a,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i),n=$.trim(s.$altInput&&s._defaults.altFieldTimeOnly?s.$input.val()+" "+s.$altInput.val():s.$input.val());return a&&s._parseTime(n,!i.settings.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l,o,c,u=null,m=null,d=null,h=n._defaults.evnts,p={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else if(h.hasOwnProperty(t)){if(void 0===i)return h[t];p[t]=i,s={}}}else if("object"==typeof t){t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime);for(r in h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r])}for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),n._defaults.minDate=u,n._defaults.minDateTime=u):m?(m=0===m?new Date:new Date(m),n._defaults.maxDate=m,n._defaults.maxDateTime=m):d&&(n._defaults.onSelect=d),u||m)return c=$(e),o=c.datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s);var r=!1;return"timepicker"===e&&(r=!0,e="datetimepicker"),$.fn[e].call(t,$.extend({timeOnly:r,onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({timeOnly:r,onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(){window.console&&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},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="1.5.5"}});
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: 3.2.1
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
@@ -85,8 +85,13 @@ function wfu_enqueue_frontpage_scripts() {
85
  wp_enqueue_style('wordpress-file-upload-style', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_style.css',false,'1.0','all');
86
  wp_enqueue_style('wordpress-file-upload-style-safe', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_style_safe.css',false,'1.0','all');
87
  }
 
 
88
  wp_enqueue_script('json_class', WPFILEUPLOAD_DIR.'js/json2.js');
89
  wp_enqueue_script('wordpress_file_upload_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_functions.js');
 
 
 
90
  }
91
 
92
  function wfu_include_lib() {
@@ -107,9 +112,7 @@ if ( is_admin() ) return;
107
 
108
  function wordpress_file_upload_handler($incomingfrompost) {
109
  //process incoming attributes assigning defaults if required
110
- $defs = wfu_attribute_definitions();
111
- $defs_indexed = array();
112
- foreach ( $defs as $def ) $defs_indexed[$def["attribute"]] = $def["value"];
113
  $incomingfrompost = shortcode_atts($defs_indexed, $incomingfrompost);
114
  //run function that actually does the work of the plugin
115
  $wordpress_file_upload_output = wordpress_file_upload_function($incomingfrompost);
@@ -138,7 +141,7 @@ function wordpress_file_upload_function($incomingfromhandler) {
138
  // store current page and blog id in params array
139
  $params["pageid"] = $post->ID;
140
  $params["blogid"] = $blog_id;
141
-
142
  if ( !isset($_SESSION['wfu_token_'.$sid]) || $_SESSION['wfu_token_'.$sid] == "" )
143
  $_SESSION['wfu_token_'.$sid] = uniqid(mt_rand(), TRUE);
144
  //store the server environment (32 or 64bit) for use when checking file size limits
@@ -147,6 +150,10 @@ function wordpress_file_upload_function($incomingfromhandler) {
147
  $user = wp_get_current_user();
148
  $widths = wfu_decode_dimensions($params["widths"]);
149
  $heights = wfu_decode_dimensions($params["heights"]);
 
 
 
 
150
 
151
  $uploadedfile = 'uploadedfile_'.$sid;
152
  $hiddeninput = 'hiddeninput_'.$sid;
@@ -177,28 +184,23 @@ function wordpress_file_upload_function($incomingfromhandler) {
177
 
178
  /* Determine if userdata fields have been defined */
179
  $userdata_fields = array();
180
- if ( $params["userdata"] == "true" && $params["userdatalabel"] != "" ) {
181
- $userdata_rawfields = explode("/", $params["userdatalabel"]);
182
- foreach ($userdata_rawfields as $userdata_rawitem) {
183
- if ( $userdata_rawitem != "" ) {
184
- $is_required = ( $userdata_rawitem[0] == "*" ? "true" : "false" );
185
- if ( $is_required == "true" ) $userdata_rawitem = substr($userdata_rawitem, 1);
186
- if ( $userdata_rawitem != "" ) {
187
- array_push($userdata_fields, array( "label" => $userdata_rawitem, "required" => $is_required ));
188
- }
189
- }
190
  }
191
-
192
  }
193
  $params["userdata_fields"] = $userdata_fields;
194
 
195
  /* If medialink or postlink is activated, then subfolders are deactivated */
196
  if ( $params["medialink"] == "true" || $params["postlink"] == "true" ) $params["askforsubfolders"] = "false";
197
 
198
- /* Prepare information about directory or selection of target subdirectory */
199
- $subfolders = wfu_prepare_subfolders_block($params, $widths, $heights);
200
- $subfolders_item = $subfolders['item'];
201
- $params['subfoldersarray'] = $subfolders['paths'];
202
 
203
  //____________________________________________________________________________________________________________________________________________________________________________________
204
 
@@ -238,21 +240,7 @@ function wordpress_file_upload_function($incomingfromhandler) {
238
  }
239
  $upload_onclick = ' onclick="'.$upload_clickaction.'"';
240
 
241
- /* Prepare the title */
242
- $title_item = wfu_prepare_title_block($params, $widths, $heights);
243
- /* Prepare the text box showing filename */
244
- $textbox_item = wfu_prepare_textbox_block($params, $widths, $heights);
245
- /* Prepare the upload form */
246
- $additional_params = array( );
247
- $uploadform_item = wfu_prepare_uploadform_block($params, $widths, $heights, $upload_clickaction, $additional_params);
248
- /* Prepare the submit button */
249
- $submit_item = wfu_prepare_submit_block($params, $widths, $heights, $upload_clickaction);
250
- /* Prepare the progress bar */
251
- $progressbar_item = wfu_prepare_progressbar_block($params, $widths, $heights);
252
- /* Prepare the message */
253
- $message_item = wfu_prepare_message_block($params, $widths, $heights);
254
- /* Prepare user data */
255
- $userdata_item = wfu_prepare_userdata_block($params, $widths, $heights);
256
 
257
  /* Compose the html code for the plugin */
258
  $wordpress_file_upload_output = "";
@@ -261,32 +249,43 @@ function wordpress_file_upload_function($incomingfromhandler) {
261
  if ( current_user_can( 'manage_options' ) ) {
262
  $wordpress_file_upload_output .= wfu_add_visual_editor_button($shortcode_tag, $sid);
263
  }
 
 
 
 
 
 
 
264
  $itemplaces = explode("/", $params["placements"]);
265
  foreach ( $itemplaces as $section ) {
266
  $items_in_section = explode("+", trim($section));
267
  $section_array = array( );
268
  foreach ( $items_in_section as $item_in_section ) {
269
  $item_in_section = strtolower(trim($item_in_section));
270
- if ( $item_in_section == "title" ) array_push($section_array, $title_item);
271
- elseif ( $item_in_section == "filename" ) array_push($section_array, $textbox_item);
272
- elseif ( $item_in_section == "selectbutton" ) array_push($section_array, $uploadform_item);
273
- elseif ( $item_in_section == "uploadbutton" && $params["singlebutton"] != "true" ) array_push($section_array, $submit_item);
274
- elseif ( $item_in_section == "subfolders" ) array_push($section_array, $subfolders_item);
275
- elseif ( $item_in_section == "progressbar" ) array_push($section_array, $progressbar_item);
276
- elseif ( $item_in_section == "message" ) array_push($section_array, $message_item);
277
- elseif ( $item_in_section == "userdata" && $params["userdata"] == "true" ) array_push($section_array, $userdata_item);
 
 
 
 
278
  }
279
  $wordpress_file_upload_output .= call_user_func_array("wfu_add_div", $section_array);
280
  }
281
  /* Append mandatory blocks, if have not been included in placements attribute */
282
  if ( $params["userdata"] == "true" && strpos($params["placements"], "userdata") === false ) {
283
  $section_array = array( );
284
- array_push($section_array, $userdata_item);
285
  $wordpress_file_upload_output .= call_user_func_array("wfu_add_div", $section_array);
286
  }
287
  if ( strpos($params["placements"], "selectbutton") === false ) {
288
  $section_array = array( );
289
- array_push($section_array, $uploadform_item);
290
  $wordpress_file_upload_output .= call_user_func_array("wfu_add_div", $section_array);
291
  }
292
 
@@ -355,7 +354,7 @@ function wordpress_file_upload_function($incomingfromhandler) {
355
  function wfu_add_visual_editor_button($shortcode_tag, $sid) {
356
  global $post;
357
  $echo_str = "\n\t".'<div id="'.$shortcode_tag.'_editor_'.$sid.'" class="wfu_overlay_editor">';
358
- $echo_str .= "\n\t\t".'<button class="wfu_overlay_editor_button" title="'.WFU_PAGE_PLUGINEDITOR_BUTTONTITLE.'" onclick="wfu_invoke_shortcode_editor('.$sid.', '.$post->ID.', \''.hash('md5', $post->post_content).'\', \''.$shortcode_tag.'\');"><img src="'.WFU_IMAGE_OVERLAY_EDITOR.'" width="20px" height="20px" /></button>';
359
  $echo_str .= "\n\t".'</div>';
360
  $echo_str .= "\n\t".'<div id="'.$shortcode_tag.'_overlay_'.$sid.'" class="wfu_overlay_container">';
361
  $echo_str .= "\n\t\t".'<table class="wfu_overlay_table"><tbody><tr><td><img src="'.WFU_IMAGE_OVERLAY_LOADING.'" /><label>'.WFU_PAGE_PLUGINEDITOR_LOADING.'</label></td></tr></tbody></table>';
@@ -371,4 +370,22 @@ function wfu_post_plugin_actions($params) {
371
  return $echo_str;
372
  }
373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  ?>
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
+ Version: 3.3.0
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
85
  wp_enqueue_style('wordpress-file-upload-style', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_style.css',false,'1.0','all');
86
  wp_enqueue_style('wordpress-file-upload-style-safe', WPFILEUPLOAD_DIR.'css/wordpress_file_upload_style_safe.css',false,'1.0','all');
87
  }
88
+ wp_enqueue_style('jquery-ui-css', '//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css');
89
+ wp_enqueue_style('jquery-ui-timepicker-addon-css', WPFILEUPLOAD_DIR.'vendor/datetimepicker/jquery-ui-timepicker-addon.min.css',false,'1.0','all');
90
  wp_enqueue_script('json_class', WPFILEUPLOAD_DIR.'js/json2.js');
91
  wp_enqueue_script('wordpress_file_upload_script', WPFILEUPLOAD_DIR.'js/wordpress_file_upload_functions.js');
92
+ wp_enqueue_script('jquery-ui-slider', false, array(), false, true);
93
+ wp_enqueue_script('jquery-ui-datepicker', false, array(), false, true);
94
+ wp_enqueue_script('jquery-ui-timepicker-addon-js', WPFILEUPLOAD_DIR.'vendor/datetimepicker/jquery-ui-timepicker-addon.min.js', array(), false, true);
95
  }
96
 
97
  function wfu_include_lib() {
112
 
113
  function wordpress_file_upload_handler($incomingfrompost) {
114
  //process incoming attributes assigning defaults if required
115
+ $defs_indexed = wfu_shortcode_attribute_definitions_adjusted($incomingfrompost);
 
 
116
  $incomingfrompost = shortcode_atts($defs_indexed, $incomingfrompost);
117
  //run function that actually does the work of the plugin
118
  $wordpress_file_upload_output = wordpress_file_upload_function($incomingfrompost);
141
  // store current page and blog id in params array
142
  $params["pageid"] = $post->ID;
143
  $params["blogid"] = $blog_id;
144
+
145
  if ( !isset($_SESSION['wfu_token_'.$sid]) || $_SESSION['wfu_token_'.$sid] == "" )
146
  $_SESSION['wfu_token_'.$sid] = uniqid(mt_rand(), TRUE);
147
  //store the server environment (32 or 64bit) for use when checking file size limits
150
  $user = wp_get_current_user();
151
  $widths = wfu_decode_dimensions($params["widths"]);
152
  $heights = wfu_decode_dimensions($params["heights"]);
153
+ //additional parameters to pass to visualization routines
154
+ $additional_params = array( );
155
+ $additional_params['widths'] = $widths;
156
+ $additional_params['heights'] = $heights;
157
 
158
  $uploadedfile = 'uploadedfile_'.$sid;
159
  $hiddeninput = 'hiddeninput_'.$sid;
184
 
185
  /* Determine if userdata fields have been defined */
186
  $userdata_fields = array();
187
+ $userdata_occurrencies = substr_count($params["placements"], "userdata");
188
+ if ( $userdata_occurrencies == 0 ) $userdata_occurrencies = 1;
189
+ if ( $params["userdata"] == "true" ) {
190
+ for ( $i = 1; $i <= $userdata_occurrencies; $i++ ) {
191
+ $userdata_fields2 = wfu_parse_userdata_attribute($params["userdatalabel".( $i > 1 ? $i : "" )]);
192
+ foreach ( $userdata_fields2 as $key => $item ) $userdata_fields2[$key]["occurrence"] = $i;
193
+ $userdata_fields = array_merge($userdata_fields, $userdata_fields2);
 
 
 
194
  }
 
195
  }
196
  $params["userdata_fields"] = $userdata_fields;
197
 
198
  /* If medialink or postlink is activated, then subfolders are deactivated */
199
  if ( $params["medialink"] == "true" || $params["postlink"] == "true" ) $params["askforsubfolders"] = "false";
200
 
201
+ /* Generate the array of subfolder paths */
202
+ $params['subfoldersarray'] = wfu_get_subfolders_paths($params);
203
+
 
204
 
205
  //____________________________________________________________________________________________________________________________________________________________________________________
206
 
240
  }
241
  $upload_onclick = ' onclick="'.$upload_clickaction.'"';
242
 
243
+ $additional_params['clickaction'] = $upload_clickaction;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  /* Compose the html code for the plugin */
246
  $wordpress_file_upload_output = "";
249
  if ( current_user_can( 'manage_options' ) ) {
250
  $wordpress_file_upload_output .= wfu_add_visual_editor_button($shortcode_tag, $sid);
251
  }
252
+ //read indexed component definitions
253
+ $components = wfu_component_definitions();
254
+ $components_indexed = array();
255
+ foreach ( $components as $component ) {
256
+ $components_indexed[$component['id']] = $component;
257
+ $components_indexed[$component['id']]['occurrencies'] = 0;
258
+ }
259
  $itemplaces = explode("/", $params["placements"]);
260
  foreach ( $itemplaces as $section ) {
261
  $items_in_section = explode("+", trim($section));
262
  $section_array = array( );
263
  foreach ( $items_in_section as $item_in_section ) {
264
  $item_in_section = strtolower(trim($item_in_section));
265
+ if ( $components_indexed[$item_in_section]['multiplacements'] || $components_indexed[$item_in_section]['occurrencies'] == 0 ) {
266
+ $components_indexed[$item_in_section]['occurrencies'] ++;
267
+ $occurrence_index = ( $components_indexed[$item_in_section]['multiplacements'] ? $components_indexed[$item_in_section]['occurrencies'] : 0 );
268
+ if ( $item_in_section == "title" ) array_push($section_array, wfu_prepare_title_block($params, $additional_params, $occurrence_index));
269
+ elseif ( $item_in_section == "filename" ) array_push($section_array, wfu_prepare_textbox_block($params, $additional_params, $occurrence_index));
270
+ elseif ( $item_in_section == "selectbutton" ) array_push($section_array, wfu_prepare_uploadform_block($params, $additional_params, $occurrence_index));
271
+ elseif ( $item_in_section == "uploadbutton" && $params["singlebutton"] != "true" ) array_push($section_array, wfu_prepare_submit_block($params, $additional_params, $occurrence_index));
272
+ elseif ( $item_in_section == "subfolders" ) array_push($section_array, wfu_prepare_subfolders_block($params, $additional_params, $occurrence_index));
273
+ elseif ( $item_in_section == "progressbar" ) array_push($section_array, wfu_prepare_progressbar_block($params, $additional_params, $occurrence_index));
274
+ elseif ( $item_in_section == "message" ) array_push($section_array, wfu_prepare_message_block($params, $additional_params, $occurrence_index));
275
+ elseif ( $item_in_section == "userdata" && $params["userdata"] == "true" ) array_push($section_array, wfu_prepare_userdata_block($params, $additional_params, $occurrence_index));
276
+ }
277
  }
278
  $wordpress_file_upload_output .= call_user_func_array("wfu_add_div", $section_array);
279
  }
280
  /* Append mandatory blocks, if have not been included in placements attribute */
281
  if ( $params["userdata"] == "true" && strpos($params["placements"], "userdata") === false ) {
282
  $section_array = array( );
283
+ array_push($section_array, wfu_prepare_userdata_block($params, $additional_params, 0));
284
  $wordpress_file_upload_output .= call_user_func_array("wfu_add_div", $section_array);
285
  }
286
  if ( strpos($params["placements"], "selectbutton") === false ) {
287
  $section_array = array( );
288
+ array_push($section_array, wfu_prepare_uploadform_block($params, $additional_params, 0));
289
  $wordpress_file_upload_output .= call_user_func_array("wfu_add_div", $section_array);
290
  }
291
 
354
  function wfu_add_visual_editor_button($shortcode_tag, $sid) {
355
  global $post;
356
  $echo_str = "\n\t".'<div id="'.$shortcode_tag.'_editor_'.$sid.'" class="wfu_overlay_editor">';
357
+ $echo_str .= "\n\t\t".'<button class="wfu_overlay_editor_button" title="'.WFU_PAGE_PLUGINEDITOR_BUTTONTITLE.'" onclick="wfu_invoke_shortcode_editor('.$sid.', '.$post->ID.', \''.hash('md5', $post->post_content).'\', \''.$shortcode_tag.'\');"><img src="'.WFU_IMAGE_OVERLAY_EDITOR.'" class="wfu_overlay_editor_img" width="20px" height="20px" /></button>';
358
  $echo_str .= "\n\t".'</div>';
359
  $echo_str .= "\n\t".'<div id="'.$shortcode_tag.'_overlay_'.$sid.'" class="wfu_overlay_container">';
360
  $echo_str .= "\n\t\t".'<table class="wfu_overlay_table"><tbody><tr><td><img src="'.WFU_IMAGE_OVERLAY_LOADING.'" /><label>'.WFU_PAGE_PLUGINEDITOR_LOADING.'</label></td></tr></tbody></table>';
370
  return $echo_str;
371
  }
372
 
373
+ function wfu_get_subfolders_paths($params) {
374
+ $subfolder_paths = array ( );
375
+ if ( $params["askforsubfolders"] == "true" && $params["testmode"] != "true" ) {
376
+ array_push($subfolder_paths, "");
377
+ if ( substr($params["subfoldertree"], 0, 4) == "auto" ) {
378
+ $upload_directory = wfu_upload_plugin_full_path($params);
379
+ $dirtree = wfu_getTree($upload_directory);
380
+ foreach ( $dirtree as &$dir ) $dir = '*'.$dir;
381
+ $params["subfoldertree"] = implode(',', $dirtree);
382
+ }
383
+ $subfolders = wfu_parse_folderlist($params["subfoldertree"]);
384
+ if ( count($subfolders['path']) == 0 ) array_push($subfolders['path'], "");
385
+ foreach ( $subfolders['path'] as $subfolder ) array_push($subfolder_paths, $subfolder);
386
+ }
387
+
388
+ return $subfolder_paths;
389
+ }
390
+
391
  ?>