Version Description
This update is a stability, maintenance, and compatibility release. Updating is recommended.
Download this release
Release Info
Developer | TobiasBg |
Plugin | TablePress |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 1.9.1
- admin/css/edit.css +5 -0
- admin/css/edit.min.css +1 -1
- admin/js/add.min.js +1 -1
- admin/js/codemirror.min.js +1 -1
- admin/js/common.min.js +1 -1
- admin/js/edit.min.js +1 -1
- admin/js/export.min.js +1 -1
- admin/js/import.min.js +1 -1
- admin/js/list.min.js +1 -1
- admin/js/quicktags-button.min.js +1 -1
- classes/class-admin-page-helper.php +1 -1
- classes/class-export.php +1 -1
- classes/class-tablepress.php +2 -2
- classes/class-wp_option.php +1 -1
- controllers/controller-admin.php +11 -1
- controllers/controller-frontend.php +2 -2
- i18n/datatables/lang-de_DE_formal.json +24 -0
- js/jquery.datatables.min.js +164 -162
- libraries/csstidy/data.inc.php +20 -0
- libraries/simplexlsx.class.php +139 -124
- models/model-table.php +5 -5
- readme.txt +11 -2
- tablepress.php +27 -6
- views/view-about.php +4 -3
- views/view-edit.php +25 -20
- views/view-editor_button_thickbox.php +2 -2
- views/view-import.php +12 -12
- views/view-list.php +12 -6
- views/view-options.php +2 -2
admin/css/edit.css
CHANGED
@@ -233,3 +233,8 @@ body #wp-link-backdrop {
|
|
233 |
#tablepress_edit-table-manipulation .column-2 {
|
234 |
width: 55%;
|
235 |
}
|
|
|
|
|
|
|
|
|
|
233 |
#tablepress_edit-table-manipulation .column-2 {
|
234 |
width: 55%;
|
235 |
}
|
236 |
+
|
237 |
+
/* Align with checkbox labels */
|
238 |
+
.checkbox-left {
|
239 |
+
padding-left: 24px; /* Checkboxes are 16px wide + 4px margin, with 4px :before */
|
240 |
+
}
|
admin/css/edit.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body.wait *{cursor:wait!important}.hidden-container{display:none}.hidden-help-box-container p{margin:6px}#wpbody-content,#wpwrap,body{overflow:visible!important}#TB_HideSelect{z-index:301099}#TB_overlay,.media-modal{z-index:301100}#TB_window{z-index:301102}#TB_load{z-index:301103}body #wp-link-backdrop{z-index:100103}#table-preview-iframe{width:100%;height:100%}#table-preview{height:100%;margin:-2px -15px -15px -15px}#advanced-editor{padding:5px}#advanced-editor .wp-editor-container{border:none}#advanced-editor .submitbox{padding:5px 5px 0;font-size:12px}#advanced-editor-confirm{float:right}#advanced-editor-cancel{line-height:30px}.spinner.animation-preview,.spinner.animation-saving{float:none;margin:0 0 0 6px}#tablepress-page div.ajax-alert{margin:-10px 0 15px}#tablepress-page div.ajax-alert p{font-weight:700}#tablepress-page div.ajax-alert pre{margin:-6px 0 .5em 2px}#tablepress-page div.ajax-alert pre+p{display:none}#tablepress-page #tablepress_edit-table-data{display:inline-block;min-width:99.9%}#tablepress-page #tablepress_edit-table-data.hide-if-js{display:none}#tablepress-page .small-text{width:65px;padding:3px 5px}#tablepress-page #table-new-id{width:120px}#table-information-shortcode,#tablepress-page .button{vertical-align:middle}#edit-form-body td{padding:2px 1px;height:32px}#edit-form-body .focus td,.no-js #edit-form-body td{height:70px}#edit-form-body .odd{background-color:#f1f1f1}#edit-form-body textarea{display:block;min-width:150px;width:100%;width:auto\0/IE;height:100%;resize:both}#edit-form-body textarea:focus{border-color:#333}#tablepress-page input[type=text],#tablepress-page select,#tablepress-page textarea{-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}#edit-form-foot input[type=checkbox]{margin:6px 0 3px}#edit-form{border-collapse:collapse}#edit-form .move-handle{display:block;margin:auto;width:16px;height:16px;text-align:center;font-weight:700}.js #edit-form .move-handle{cursor:move}#edit-form-body .move-handle{margin:auto 3px;min-width:16px;width:auto}#edit-form .move-hover{position:absolute;z-index:1000;height:26px}#edit-form .focus .move-hover{height:64px}#edit-form-body .foot-row,#edit-form-body .head-row{background-color:#d9edf7}#edit-form-head .sort-control{float:right;height:18px;cursor:pointer;margin-right:2px}#edit-form-head .sorting-indicator{visibility:visible}#edit-form-head .sort-asc .sorting-indicator:before{content:'\f142'}#edit-form-head .sort-desc .sorting-indicator:before{content:'\f140'}#edit-form .column-hidden,#edit-form .column-hidden textarea,#edit-form .row-hidden td,#edit-form .row-hidden textarea{background-color:#ffe0e0}#tablepress_edit-table-manipulation .column-1{width:45%}#tablepress_edit-table-manipulation .column-2{width:55%}
|
1 |
+
body.wait *{cursor:wait!important}.hidden-container{display:none}.hidden-help-box-container p{margin:6px}#wpbody-content,#wpwrap,body{overflow:visible!important}#TB_HideSelect{z-index:301099}#TB_overlay,.media-modal{z-index:301100}#TB_window{z-index:301102}#TB_load{z-index:301103}body #wp-link-backdrop{z-index:100103}#table-preview-iframe{width:100%;height:100%}#table-preview{height:100%;margin:-2px -15px -15px -15px}#advanced-editor{padding:5px}#advanced-editor .wp-editor-container{border:none}#advanced-editor .submitbox{padding:5px 5px 0;font-size:12px}#advanced-editor-confirm{float:right}#advanced-editor-cancel{line-height:30px}.spinner.animation-preview,.spinner.animation-saving{float:none;margin:0 0 0 6px}#tablepress-page div.ajax-alert{margin:-10px 0 15px}#tablepress-page div.ajax-alert p{font-weight:700}#tablepress-page div.ajax-alert pre{margin:-6px 0 .5em 2px}#tablepress-page div.ajax-alert pre+p{display:none}#tablepress-page #tablepress_edit-table-data{display:inline-block;min-width:99.9%}#tablepress-page #tablepress_edit-table-data.hide-if-js{display:none}#tablepress-page .small-text{width:65px;padding:3px 5px}#tablepress-page #table-new-id{width:120px}#table-information-shortcode,#tablepress-page .button{vertical-align:middle}#edit-form-body td{padding:2px 1px;height:32px}#edit-form-body .focus td,.no-js #edit-form-body td{height:70px}#edit-form-body .odd{background-color:#f1f1f1}#edit-form-body textarea{display:block;min-width:150px;width:100%;width:auto\0/IE;height:100%;resize:both}#edit-form-body textarea:focus{border-color:#333}#tablepress-page input[type=text],#tablepress-page select,#tablepress-page textarea{-webkit-box-shadow:none;box-shadow:none;-webkit-transition:none;transition:none}#edit-form-foot input[type=checkbox]{margin:6px 0 3px}#edit-form{border-collapse:collapse}#edit-form .move-handle{display:block;margin:auto;width:16px;height:16px;text-align:center;font-weight:700}.js #edit-form .move-handle{cursor:move}#edit-form-body .move-handle{margin:auto 3px;min-width:16px;width:auto}#edit-form .move-hover{position:absolute;z-index:1000;height:26px}#edit-form .focus .move-hover{height:64px}#edit-form-body .foot-row,#edit-form-body .head-row{background-color:#d9edf7}#edit-form-head .sort-control{float:right;height:18px;cursor:pointer;margin-right:2px}#edit-form-head .sorting-indicator{visibility:visible}#edit-form-head .sort-asc .sorting-indicator:before{content:'\f142'}#edit-form-head .sort-desc .sorting-indicator:before{content:'\f140'}#edit-form .column-hidden,#edit-form .column-hidden textarea,#edit-form .row-hidden td,#edit-form .row-hidden textarea{background-color:#ffe0e0}#tablepress_edit-table-manipulation .column-1{width:45%}#tablepress_edit-table-manipulation .column-2{width:55%}.checkbox-left{padding-left:24px}
|
admin/js/add.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(i){"use strict";i("#tablepress-page").find("form").on("submit",function(){var t=!0;if(i("#tablepress-page").find(".form-required").find(".placeholder").each(function(){this.value===this.defaultValue&&(this.value="",i(this).removeClass("placeholder-active"))}),validateForm(i(this))||(t=!1),i("#tablepress-page").find(".form-field-numbers-only").find("input").each(function(){var e=i(this),a=parseInt(e.attr("maxlength"),10);isNaN(a)?a="":a+=-1,new RegExp("^[1-9][0-9]{0,"+a+"}$").test(e.val())||(e.one("change",function(){i(this).closest(".form-invalid").removeClass("form-invalid")}).focus().select().closest(".form-field").addClass("form-invalid"),t=!1)}),!t)return!1;i("#tablepress-page").find(".placeholder").each(function(){this.value===this.defaultValue&&(this.value="")})})});
|
admin/js/codemirror.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(r){"use strict";var o=wp.codeEditor.initialize(document.getElementById("option-custom-css"),tablepress_codemirror_settings);r(o.codemirror.getWrapperElement()).resizable({handles:"s",resize:function(){var e=r(this);o.codemirror.setSize(e.width(),e.height())}}),r("#tablepress-page").find(".CodeMirror").on("mousedown.codemirror",function(){var e=r(this);e.hasClass("disabled")||(e.addClass("large"),o.codemirror.refresh(),e.off("mousedown.codemirror"))}),r("#option-use-custom-css").on("change",function(){var e=r(this).prop("checked");o.codemirror.setOption("readOnly",!e),r("#tablepress-page").find(".CodeMirror").toggleClass("disabled",!e)}).change()});
|
admin/js/common.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.tp=window.tp||{},jQuery(document).ready(function(
|
1 |
+
window.tp=window.tp||{},jQuery(document).ready(function(t){"use strict";postboxes.add_postbox_toggles(pagenow),t("#tablepress-page").on("focus",".placeholder",function(){this.value===this.defaultValue&&(this.value="",t(this).removeClass("placeholder-active"))}).on("blur",".placeholder",function(){""===this.value&&(this.value=this.defaultValue,t(this).addClass("placeholder-active"))}),t("#tablepress-page").on("blur",".numbers-only, .form-field-numbers-only input",function(){var e=t(this);e.val(e.val().replace(/[^0-9]/g,""))}),t("#tablepress-page").on("click",".delete-link",function(){if(!confirm(tablepress_common.ays_delete_single_table))return!1;tp.made_changes=!1}),t("#tablepress-page").on("click",".table-shortcode",function(){t(this).focus().select()})});
|
admin/js/edit.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.tp=window.tp||{},jQuery(document).ready(function(e){"use strict";var t=function(t){return e(document.getElementById(t))};tp.made_changes=!1,tp.table={id:t("table-id").val(),new_id:t("table-new-id").val(),rows:parseInt(t("number-rows").val(),10),columns:parseInt(t("number-columns").val(),10),head:t("option-table-head").prop("checked"),foot:t("option-table-foot").prop("checked"),no_data_columns_pre:2,no_data_columns_post:1,body_cells_pre:'<tr><td><span class="move-handle"></span></td><td><input type="checkbox" /><input type="hidden" class="visibility" name="table[visibility][rows][]" value="1" /></td>',body_cells_post:'<td><span class="move-handle"></span></td></tr>',body_cell:'<td><textarea rows="1"></textarea></td>',head_cell:'<th class="head"><span class="sort-control sort-desc" title="'+tablepress_strings.sort_desc+'"><span class="sorting-indicator"></span></span><span class="sort-control sort-asc" title="'+tablepress_strings.sort_asc+'"><span class="sorting-indicator"></span></span><span class="move-handle"></span></th>',foot_cell:'<th><input type="checkbox" /><input type="hidden" class="visibility" name="table[visibility][columns][]" value="1" /></th>',set_table_changed:function(){tp.made_changes=!0},unset_table_changed:function(){tp.made_changes=!1,t("edit-form-body").one("change","textarea",tp.table.set_table_changed),e("#tablepress_edit-table-information, #tablepress_edit-table-options, #tablepress_edit-datatables-features").one("change","input, textarea, select",tp.table.set_table_changed)},change_id:function(){return""===e.trim(t("table-new-id").val())?(alert(tablepress_strings.table_id_not_empty),void t("table-new-id").val(tp.table.new_id).focus().select()):"0"===e.trim(t("table-new-id").val())?(alert(tablepress_strings.table_id_not_zero),void t("table-new-id").val(tp.table.new_id).focus().select()):void(this.value!==tp.table.new_id&&(confirm(tablepress_strings.ays_change_table_id)?(tp.table.new_id=this.value,e(".table-shortcode").val("["+tablepress_options.shortcode+" id="+tp.table.new_id+" /]").click(),tp.table.set_table_changed()):e(this).val(tp.table.new_id)))},change_table_head:function(){tp.table.head=e(this).prop("checked"),t("option-use-datatables").prop("disabled",!tp.table.head).change(),t("notice-datatables-head-row").toggle(!tp.table.head),tp.rows.stripe()},change_table_foot:function(){tp.table.foot=e(this).prop("checked"),tp.rows.stripe()},change_print_name_description:function(){t(this.id+"-position").prop("disabled",!e(this).prop("checked"))},change_datatables:function(){var e=t("option-use-datatables"),a=!(e.prop("checked")&&!e.prop("disabled"));e.closest("tbody").find("input").not(e).prop("disabled",a),tp.table.change_datatables_pagination()},change_datatables_pagination:function(){var e=t("option-datatables-paginate"),a=e.prop("checked")&&!e.prop("disabled");t("option-datatables-lengthchange").prop("disabled",!a),t("option-datatables-paginate_entries").prop("disabled",!a)},prepare_ajax_request:function(a,n){var o,s=t("edit-form-body"),r=[],i={rows:tp.table.rows,columns:tp.table.columns,hidden_rows:0,hidden_columns:0},l={rows:[],columns:[]};return s.children().each(function(t,a){r[t]=e(a).find("textarea").map(function(){return e(this).val()}).get()}),r=JSON.stringify(r),o={table_head:tp.table.head,table_foot:tp.table.foot,alternating_row_colors:t("option-alternating-row-colors").prop("checked"),row_hover:t("option-row-hover").prop("checked"),print_name:t("option-print-name").prop("checked"),print_description:t("option-print-description").prop("checked"),print_name_position:t("option-print-name-position").val(),print_description_position:t("option-print-description-position").val(),extra_css_classes:t("option-extra-css-classes").val(),use_datatables:t("option-use-datatables").prop("checked"),datatables_sort:t("option-datatables-sort").prop("checked"),datatables_filter:t("option-datatables-filter").prop("checked"),datatables_paginate:t("option-datatables-paginate").prop("checked"),datatables_lengthchange:t("option-datatables-lengthchange").prop("checked"),datatables_paginate_entries:t("option-datatables-paginate_entries").val(),datatables_info:t("option-datatables-info").prop("checked"),datatables_scrollx:t("option-datatables-scrollx").prop("checked"),datatables_custom_commands:t("option-datatables-custom-commands").val()},o=JSON.stringify(o),l.rows=s.find('input[type="hidden"]').map(function(){return"1"===e(this).val()?1:(i.hidden_rows+=1,0)}).get(),l.columns=t("edit-form-foot").find('input[type="hidden"]').map(function(){return"1"===e(this).val()?1:(i.hidden_columns+=1,0)}).get(),l=JSON.stringify(l),{action:a,_ajax_nonce:e(n).val(),tablepress:{id:tp.table.id,new_id:tp.table.new_id,name:t("table-name").val(),description:t("table-description").val(),number:i,data:r,options:o,visibility:l}}},preview:{trigger:function(){return tp.made_changes?t("option-datatables-paginate").prop("checked")&&!/^[1-9][0-9]{0,4}$/.test(t("option-datatables-paginate_entries").val())?(alert(tablepress_strings.num_pagination_entries_invalid),void t("option-datatables-paginate_entries").focus().select()):/[^A-Za-z0-9- _]/.test(t("option-extra-css-classes").val())?(alert(tablepress_strings.extra_css_classes_invalid),void t("option-extra-css-classes").focus().select()):(e(this).closest("p").append('<span class="animation-preview spinner is-active" title="'+tablepress_strings.preparing_preview+'"/>'),e("body").addClass("wait"),t("table-preview").empty(),e.ajax({type:"POST",url:ajaxurl,data:tp.table.prepare_ajax_request("tablepress_preview_table","#nonce-preview-table"),success:tp.table.preview.ajax_success,error:tp.table.preview.ajax_error,dataType:"json"}),!1):(tp.table.preview.show(e(this).attr("href")+"&TB_iframe=true"),!1)},ajax_success:function(e,t){void 0===t||"success"!==t?tp.table.preview.error("AJAX call successful, but unclear status."):void 0===e||null===e||"-1"===e||void 0===e.success||!0!==e.success?tp.table.preview.error("AJAX call successful, but unclear data."):tp.table.preview.success(e)},ajax_error:function(e,t,a){tp.table.preview.error("AJAX call failed: "+t+" - "+a)},success:function(a){t("table-preview").empty(),e('<iframe id="table-preview-iframe" />').load(function(){var t=e(this).contents();t.find("head").append(a.head_html),t.find("body").append(a.body_html)}).appendTo("#table-preview"),e(".animation-preview").remove(),e("body").removeClass("wait"),tp.table.preview.show("#TB_inline?inlineId=preview-container")},error:function(t){e(".animation-preview").closest("p").after('<div class="ajax-alert preview-error error"><p>'+tablepress_strings.preview_error+": "+t+"</p></div>"),e(".animation-preview").remove(),e(".preview-error").delay(6e3).fadeOut(2e3,function(){e(this).remove()}),e("body").removeClass("wait")},show:function(t){var a=e(window).width()-120,n=e(window).height()-120;e("#wpadminbar").length&&(n-=parseInt(e("#wpadminbar").css("height"),10)),tb_show(e(".show-preview-button").first().text(),t+"&height="+n+"&width="+a,!1)}}},tp.rows={create:function(a){var n,o,s,r="";for(n=0;n<a;n++){for(r+=tp.table.body_cells_pre,o=0;o<tp.table.columns;o++)r+=tp.table.body_cell;r+=tp.table.body_cells_post}return s=t("edit-form-foot").find(".column-hidden").map(function(){return e(this).index()}).get(),e(r).each(function(t,a){e(a).children().filter(function(t){return-1!==e.inArray(t,s)}).addClass("column-hidden")})},append:function(){var e=t("rows-append-number").val();if(!/^[1-9][0-9]{0,4}$/.test(e))return alert(tablepress_strings.append_num_rows_invalid),void t("rows-append-number").focus().select();t("edit-form-body").append(tp.rows.create(e)),tp.rows.stripe(),tp.reindex()},insert:function(e){var a=t("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==a.length?(a.before(tp.rows.create(1)),tp.rows.stripe(),tp.reindex()):alert(tablepress_strings.no_rows_selected)},duplicate:function(a){var n=t("edit-form-body").find("input:checked").prop("checked",a.shiftKey).closest("tr");0!==n.length?(n.each(function(t,a){var n=e(a),o=n.find("textarea"),s=n.clone();s.find("textarea").removeAttr("id").each(function(t,a){e(a).val(o.eq(t).val())}),n.after(s)}),tp.rows.stripe(),tp.reindex()):alert(tablepress_strings.no_rows_selected)},hide:function(e){var a=t("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==a.length?(a.addClass("row-hidden").find(".visibility").val("0"),tp.rows.stripe(),tp.table.set_table_changed()):alert(tablepress_strings.no_rows_selected)},unhide:function(e){var a=t("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==a.length?(a.removeClass("row-hidden").find(".visibility").val("1"),tp.rows.stripe(),tp.table.set_table_changed()):alert(tablepress_strings.no_rows_selected)},remove:function(){var e,a=t("edit-form-body").find("input:checked").closest("tr");0!==a.length?tp.table.rows!==a.length?(e=1===a.length?tablepress_strings.ays_remove_rows_singular:tablepress_strings.ays_remove_rows_plural,confirm(e)&&(a.remove(),tp.rows.stripe(),tp.reindex())):alert(tablepress_strings.no_remove_all_rows):alert(tablepress_strings.no_rows_selected)},move:{start:function(t,a){e(a.placeholder).removeClass("row-hidden").css("visibility","visible").html('<td colspan="'+(tp.table.columns+tp.table.no_data_columns_pre+tp.table.no_data_columns_post)+'"><div/></td>'),e(a.helper).removeClass("odd head-row foot-row")},change:function(e,t){tp.rows.stripe(t.helper)},stop:function(){tp.rows.stripe()}},sort:function(){var t=e(this).parent().index(),a=e(this).hasClass("sort-asc")?1:-1,n=e("#edit-form-body"),o=n.find(".head-row").prevAll().addBack(),s=n.find(".foot-row").nextAll().addBack(),r=n.children().not(o).not(s).get();e.each(r,function(a,n){n.sort_key=(""+e(n).children().eq(t).find("textarea").val()).toLowerCase()}),r.sort(function(e,t){return a*function(e,t){var a,n,o=/(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g,s=/^\s+|\s+$/g,r=/\s+/g,i=/^0x[0-9a-f]+$/i,l=/^0/,c=e.replace(s,"")||"",d=t.replace(s,"")||"",p=c.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=d.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=parseInt(c.match(i),16)||1!==p.length&&Date.parse(c),_=parseInt(d.match(i),16)||h&&d.match(/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/)&&Date.parse(d)||null,m=function(e,t){return(!e.match(l)||1===t)&&parseFloat(e)||e.replace(r," ").replace(s,"")||0};if(_){if(h<_)return-1;if(h>_)return 1}for(var b=0,f=p.length,v=u.length,g=Math.max(f,v);b<g;b++){if(a=m(p[b]||"",f),n=m(u[b]||"",v),isNaN(a)!==isNaN(n))return isNaN(a)?1:-1;if(/[^\x00-\x80]/.test(a+n)&&a.localeCompare){var w=a.localeCompare(n);return w/Math.abs(w)}if(a<n)return-1;if(a>n)return 1}}(e.sort_key,t.sort_key)}),e.each(r,function(e,t){t.sort_key=null}),n.append(o),n.append(r),n.append(s),tp.rows.stripe(),tp.reindex()},stripe:function(a){void 0===a&&(a=null),a=e(a);var n=t("edit-form-body").children().removeClass("odd head-row foot-row").not(a);n.filter(":even").addClass("odd"),n=n.not(".row-hidden"),a.hasClass("row-hidden")&&(n=n.not(".ui-sortable-placeholder")),tp.table.head&&n.first().addClass("head-row"),tp.table.foot&&n.last().addClass("foot-row")}},tp.columns={append:function(){var a,n=t("columns-append-number").val(),o="",s="",r="";if(!/^[1-9][0-9]{0,4}$/.test(n))return alert(tablepress_strings.append_num_columns_invalid),void t("columns-append-number").focus().select();for(a=0;a<n;a++)s+=tp.table.body_cell,o+=tp.table.head_cell,r+=tp.table.foot_cell;t("edit-form-body").children().each(function(t,a){e(a).children().slice(-tp.table.no_data_columns_post).before(s)}),t("edit-form-head").children().slice(-tp.table.no_data_columns_post).before(o),t("edit-form-foot").children().slice(-tp.table.no_data_columns_post).before(r),tp.reindex()},insert:function(a){var n,o=t("edit-form-foot").find("input:checked").prop("checked",a.shiftKey).closest("th");0!==o.length?(n=o.map(function(){return e(this).index()}).get(),t("edit-form-body").children().each(function(t,a){e(a).children().filter(function(t){return-1!==e.inArray(t,n)}).before(tp.table.body_cell)}),t("edit-form-head").children().filter(function(t){return-1!==e.inArray(t,n)}).before(tp.table.head_cell),o.before(tp.table.foot_cell),tp.reindex()):alert(tablepress_strings.no_columns_selected)},duplicate:function(a){var n,o=t("edit-form-foot").find("input:checked").prop("checked",a.shiftKey).closest("th");0!==o.length?(n=o.map(function(){return e(this).index()}).get(),t("edit-form").find("tr").each(function(t,a){e(a).children().each(function(t,a){if(-1!==e.inArray(t,n)){var o=e(a),s=o.clone();s.find("textarea").removeAttr("id").val(o.find("textarea").val()),o.after(s)}})}),tp.reindex()):alert(tablepress_strings.no_columns_selected)},hide:function(a){var n,o=t("edit-form-foot").find("input:checked").prop("checked",a.shiftKey).closest("th");0!==o.length?(n=o.map(function(){return e(this).index()}).get(),t("edit-form-body").children().add("#edit-form-head").each(function(t,a){e(a).children().filter(function(t){return-1!==e.inArray(t,n)}).addClass("column-hidden")}),o.addClass("column-hidden").find(".visibility").val("0"),tp.table.set_table_changed()):alert(tablepress_strings.no_columns_selected)},unhide:function(a){var n,o=t("edit-form-foot").find("input:checked").prop("checked",a.shiftKey).closest("th");0!==o.length?(n=o.map(function(){return e(this).index()}).get(),t("edit-form-body").children().add("#edit-form-head").each(function(t,a){e(a).children().filter(function(t){return-1!==e.inArray(t,n)}).removeClass("column-hidden")}),o.removeClass("column-hidden").find(".visibility").val("1"),tp.table.set_table_changed()):alert(tablepress_strings.no_columns_selected)},remove:function(){var a,n,o=t("edit-form-foot").find("input:checked").closest("th");0!==o.length?tp.table.columns!==o.length?(n=1===o.length?tablepress_strings.ays_remove_columns_singular:tablepress_strings.ays_remove_columns_plural,confirm(n)&&(a=o.map(function(){return e(this).index()}).get(),t("edit-form-body").children().add("#edit-form-head").each(function(t,n){e(n).children().filter(function(t){return-1!==e.inArray(t,a)}).remove()}),o.remove(),tp.reindex())):alert(tablepress_strings.no_remove_all_columns):alert(tablepress_strings.no_columns_selected)},move:{source_idx:-1,target_idx:-1,$rows:null,$row_children:null,$cell:null,$cells:null,$placeholder:null,$helper:null,start:function(a,n){var o,s=e(n.item);tp.columns.move.source_idx=s.index(),tp.columns.move.$rows=t("edit-form-body").children().add("#edit-form-foot"),tp.columns.move.$cells=tp.columns.move.$rows.find(":nth-child("+(tp.columns.move.source_idx+1)+")").each(function(){tp.columns.move.$cell=e(this),e('<td class="move-placeholder"><div/></td>').insertBefore(tp.columns.move.$cell),tp.columns.move.$cell.insertAfter(tp.columns.move.$cell.nextAll().last()).clone().addClass("move-hover").insertAfter(tp.columns.move.$cell).find("textarea").val(tp.columns.move.$cell.find("textarea").val())}).hide(),tp.columns.move.$helper=tp.columns.move.$rows.find(".move-hover"),o=tp.columns.move.$helper.eq(1).width(),tp.columns.move.$helper.eq(0).width(o),tp.columns.move.$placeholder=tp.columns.move.$rows.find(".move-placeholder"),tp.columns.move.$placeholder.find("div").width(o)},change:function(t,a){tp.columns.move.target_idx=e(a.placeholder).index(),tp.columns.move.target_idx-tp.columns.move.source_idx==1?tp.columns.move.target_idx+=1:tp.columns.move.target_idx===tp.columns.move.source_idx&&(tp.columns.move.target_idx-=1),tp.columns.move.$placeholder.each(function(){tp.columns.move.$cell=e(this),tp.columns.move.$cell.insertBefore(tp.columns.move.$cell.parent().children().eq(tp.columns.move.target_idx))}),tp.columns.move.target_idx>tp.columns.move.source_idx&&(tp.columns.move.target_idx-=1),tp.columns.move.source_idx=tp.columns.move.target_idx},sort:function(e,t){tp.columns.move.$helper.css("left",t.position.left)},stop:function(){tp.columns.move.$helper.remove(),tp.columns.move.$cells.each(function(){tp.columns.move.$cell=e(this),tp.columns.move.$cell.insertBefore(tp.columns.move.$cell.parent().find(".move-placeholder"))}).show(),tp.columns.move.$placeholder.remove(),tp.columns.move.source_idx=tp.columns.move.target_idx=-1,tp.columns.move.$rows=tp.columns.move.$row_children=tp.columns.move.$cell=tp.columns.move.$cells=tp.columns.move.$placeholder=tp.columns.move.$helper=null,tp.reindex()}},number_to_letter:function(e){for(var t="";e>0;)t=String.fromCharCode(65+(e-1)%26)+t,e=Math.floor((e-1)/26);return t}},tp.cells={$focus:e(null),$textarea:null,autogrow:function(){tp.cells.$focus.removeClass("focus"),tp.cells.$focus=e(this).closest("tr").addClass("focus")},advanced_editor:{prompt_shown:!1,keyopen:function(a){if(a.shiftKey){var n=t("advanced-editor-content");tp.cells.$textarea=e(this).blur(),n.val(tp.cells.$textarea.val()),t("advanced-editor").wpdialog("open"),n.get(0).selectionStart=n.get(0).selectionEnd=n.val().length,n.focus()}},buttonopen:function(){(tp.cells.advanced_editor.prompt_shown||confirm(tablepress_strings.advanced_editor_open))&&(tp.cells.advanced_editor.prompt_shown=!0,t("edit-form-body").one("click","textarea",function(){var a=t("advanced-editor-content");tp.cells.$textarea=e(this).blur(),a.val(tp.cells.$textarea.val()),t("advanced-editor").wpdialog("open"),a.get(0).selectionStart=a.get(0).selectionEnd=a.val().length,a.focus()}))},save:function(){var e=t("advanced-editor-content").blur().val();tp.cells.$textarea.val()!==e&&(tp.cells.$textarea.val(e),tp.cells.$textarea.get(0).selectionStart=tp.cells.$textarea.get(0).selectionEnd=tp.cells.$textarea.val().length,tp.table.set_table_changed()),tp.cells.$textarea.focus(),tp.cells.advanced_editor.close()},close:function(){return t("advanced-editor").wpdialog("close"),!1}},checkboxes:{last_clicked:{"#edit-form-body":!1,"#edit-form-foot":!1},multi_select:function(t){if("undefined"===t.shiftKey)return!0;if(t.shiftKey){if(!tp.cells.checkboxes.last_clicked[t.data.parent])return!0;var a=e(t.data.parent).find(":checkbox"),n=a.index(tp.cells.checkboxes.last_clicked[t.data.parent]),o=a.index(this);n!==o&&a.slice(Math.min(n,o),Math.max(n,o)).prop("checked",e(this).prop("checked"))}return tp.cells.checkboxes.last_clicked[t.data.parent]=this,!0}}},tp.content={link:{prompt_shown:!1,add:function(){(tp.content.link.prompt_shown||confirm(tablepress_strings.link_add))&&(tp.content.link.prompt_shown=!0,t("edit-form-body").one("mousedown","textarea",function(){var t=this.id;e(document).one("mouseup",function(){"undefined"!=typeof wpLink&&(wpLink.open(t),tp.table.set_table_changed())})}))}},image:{prompt_shown:!1,add:function(){(tp.content.image.prompt_shown||confirm(tablepress_strings.image_add))&&(tp.content.image.prompt_shown=!0,t("edit-form-body").one("click","textarea",function(){var t=this.id,a={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0};this.selectionStart=this.selectionEnd=this.value.length,e(this).blur(),wp.media.editor.open(t,a),tp.table.set_table_changed()}))}},span:{prompt_shown:!1,add:function(a){var n="#rowspan#"===a?tablepress_strings.rowspan_add:tablepress_strings.colspan_add;if(!1===tp.content.span.prompt_shown&&(tp.content.span.prompt_shown={},tp.content.span.prompt_shown["#rowspan#"]=tp.content.span.prompt_shown["#colspan#"]=!1),t("option-use-datatables").prop("checked")){if(!confirm(tablepress_strings.span_add_datatables_warning))return;t("option-use-datatables").prop("checked",!1).change()}(tp.content.span.prompt_shown[a]||confirm(n))&&(tp.content.span.prompt_shown[a]=!0,t("edit-form-body").one("click","textarea",function(){var t=e(this),n=t.parent().index(),o=t.closest("tr").index();if("#rowspan#"===a){if(0===o)return void alert(tablepress_strings.no_rowspan_first_row);if(tp.table.head&&1===o)return void alert(tablepress_strings.no_rowspan_table_head);if(tp.table.foot&&tp.table.rows-1===o)return void alert(tablepress_strings.no_rowspan_table_foot)}else if("#colspan#"===a&&tp.table.no_data_columns_pre===n)return void alert(tablepress_strings.no_colspan_first_col);t.val(a),tp.table.set_table_changed()}))}}},tp.check={table_id:function(t){if(37!==t.which&&39!==t.which){var a=e(this);a.val(a.val().replace(/[^0-9a-zA-Z-_]/g,""))}},changes_saved:function(){if(tp.made_changes)return tablepress_strings.unsaved_changes_unload}},tp.reindex=function(){var a,n,o=t("edit-form-body").children(),s={};tp.table.rows=o.length,tp.table.rows>0?tp.table.columns=o.first().children().length-tp.table.no_data_columns_pre-tp.table.no_data_columns_post:tp.table.columns=0,o.each(function(o,r){(a=e(r)).find("textarea").val(function(e,a){return""===a||"="!==a.charAt(0)?a:a.replace(/([A-Z]+[0-9]+)(?::([A-Z]+[0-9]+))?/g,function(e,a,o){return s.hasOwnProperty(a)||((n=t("cell-"+a)).length?s[a]=tp.columns.number_to_letter(n.parent().index()-tp.table.no_data_columns_pre+1)+(n.closest("tr").index()+1):s[a]=a),e=s[a],void 0!==o&&""!==o&&(s.hasOwnProperty(o)||((n=t("cell-"+o)).length?s[o]=tp.columns.number_to_letter(n.parent().index()-tp.table.no_data_columns_pre+1)+(n.closest("tr").index()+1):s[o]=o),e+=":"+s[o]),e})}).attr("name",function(e){return"table[data]["+o+"]["+e+"]"}),a.find(".move-handle").html(o+1)}).each(function(t,a){e(a).find("textarea").attr("id",function(e){return"cell-"+tp.columns.number_to_letter(e+1)+(t+1)})}),t("edit-form-head").find(".move-handle").html(function(e){return tp.columns.number_to_letter(e+1)}),t("number-rows").val(tp.table.rows),t("number-columns").val(tp.table.columns),tp.table.set_table_changed()},tp.save_changes={trigger:function(a){return t("option-datatables-paginate").prop("checked")&&!/^[1-9][0-9]{0,4}$/.test(t("option-datatables-paginate_entries").val())?(alert(tablepress_strings.num_pagination_entries_invalid),void t("option-datatables-paginate_entries").focus().select()):/[^A-Za-z0-9- _]/.test(t("option-extra-css-classes").val())?(alert(tablepress_strings.extra_css_classes_invalid),void t("option-extra-css-classes").focus().select()):a.shiftKey?(tp.made_changes=!1,void t("tablepress-page").find("form").submit()):(e(this).closest("p").append('<span class="animation-saving spinner is-active" title="'+tablepress_strings.saving_changes+'"/>'),e(".save-changes-button").prop("disabled",!0),e("body").addClass("wait"),void e.ajax({type:"POST",url:ajaxurl,data:tp.table.prepare_ajax_request("tablepress_save_table","#nonce-edit-table"),success:tp.save_changes.ajax_success,error:tp.save_changes.ajax_error,dataType:"json"}))},ajax_success:function(e,t){if(void 0===t||"success"!==t)tp.save_changes.error("AJAX call successful, but unclear status. Try again while holding down the “Shift” key.");else if(void 0===e||null===e||"-1"===e||void 0===e.success)tp.save_changes.error("AJAX call successful, but unclear data. Try again while holding down the “Shift” key.");else if(!0!==e.success){var a="";void 0!==e.error_details&&tablepress_options.print_debug_output&&(a="</p><p>These errors were encountered:</p><pre>"+e.error_details+"</pre><p>"),tp.save_changes.error("AJAX call successful, internal saving process failed. Try again while holding down the “Shift” key."+a)}else tp.save_changes.success(e)},ajax_error:function(e,t,a){tp.save_changes.error("AJAX call failed: "+t+" - "+a+". Try again while holding down the “Shift” key.")},success:function(a){tp.table.id!==a.table_id&&"pushState"in window.history&&null!==window.history.pushState&&window.history.pushState("","",window.location.href.replace(/table_id=[0-9a-zA-Z-_]+/gi,"table_id="+a.table_id)),t("edit-form").removeClass("tablepress-edit-screen-id-"+tp.table.id).addClass("tablepress-edit-screen-id-"+a.table_id),tp.table.id=tp.table.new_id=a.table_id,t("table-id").val(tp.table.id),t("table-new-id").val(tp.table.new_id),e(".table-shortcode").val("["+tablepress_options.shortcode+" id="+tp.table.new_id+" /]"),t("nonce-edit-table").val(a.new_edit_nonce),t("nonce-preview-table").val(a.new_preview_nonce);var n=e(".show-preview-button");n.length&&n.attr("href",n.first().attr("href").replace(/item=[a-zA-Z0-9_-]+/g,"item="+a.table_id).replace(/&_wpnonce=[a-z0-9]+/gi,"&_wpnonce="+a.new_preview_nonce)),t("last-modified").text(a.last_modified),t("last-editor").text(a.last_editor),tp.table.unset_table_changed(),tp.save_changes.after_saving_dialog("success",tablepress_strings[a.message])},error:function(e){tp.save_changes.after_saving_dialog("error",e)},after_saving_dialog:function(t,a){a=void 0===a?"":": "+a;var n,o="save-changes-"+t;"success"===t?(o+=" notice notice-success",n=3e3):(o+=" notice notice-error",n=6e3),e(".animation-saving").closest("p").after('<div class="ajax-alert '+o+'"><p>'+tablepress_strings["save_changes_"+t]+a+"</p></div>"),e(".animation-saving").remove(),e(".save-changes-"+t).delay(n).fadeOut(2e3,function(){e(this).remove()}),e(".save-changes-button").prop("disabled",!1),e("body").removeClass("wait")}},tp.init=function(){var a={click:{"#rows-insert":tp.rows.insert,"#columns-insert":tp.columns.insert,"#rows-duplicate":tp.rows.duplicate,"#columns-duplicate":tp.columns.duplicate,"#rows-remove":tp.rows.remove,"#columns-remove":tp.columns.remove,"#rows-hide":tp.rows.hide,"#columns-hide":tp.columns.hide,"#rows-unhide":tp.rows.unhide,"#columns-unhide":tp.columns.unhide,"#rows-append":tp.rows.append,"#columns-append":tp.columns.append,"#link-add":tp.content.link.add,"#image-add":tp.content.image.add,"#span-add-rowspan":function(){tp.content.span.add("#rowspan#")},"#span-add-colspan":function(){tp.content.span.add("#colspan#")},".show-preview-button":tp.table.preview.trigger,".save-changes-button":tp.save_changes.trigger,".show-help-box":function(){e(this).next().wpdialog({title:e(this).attr("title"),height:470,width:320,modal:!0,dialogClass:"wp-dialog",resizable:!1})}},keyup:{"#table-new-id":tp.check.table_id},change:{"#option-table-head":tp.table.change_table_head,"#option-table-foot":tp.table.change_table_foot,"#option-use-datatables":tp.table.change_datatables,"#option-datatables-paginate":tp.table.change_datatables_pagination},blur:{"#table-new-id":tp.table.change_id}},n=t("edit-form-body");e.each(a,function(t,a){e.each(a,function(a,n){e(a).on(t,n)})}),e(window).on("beforeunload",tp.check.changes_saved),t("option-table-head").change(),t("option-print-name").change(tp.table.change_print_name_description).change(),t("option-print-description").change(tp.table.change_print_name_description).change(),n.one("change","textarea",tp.table.set_table_changed),e("#tablepress_edit-table-information, #tablepress_edit-table-options, #tablepress_edit-datatables-features").one("change","input, textarea, select",tp.table.set_table_changed),tablepress_options.cells_advanced_editor?(n.on("click","textarea",tp.cells.advanced_editor.keyopen),t("advanced-editor-open").on("click",tp.cells.advanced_editor.buttonopen),t("advanced-editor-confirm").on("click",tp.cells.advanced_editor.save),t("advanced-editor-cancel").on("click",tp.cells.advanced_editor.close),t("advanced-editor").wpdialog({autoOpen:!1,title:t("advanced-editor-open").val(),width:600,modal:!0,dialogClass:"wp-dialog",resizable:!1}),t("wp-link").on("focus","input",function(e){e.stopPropagation()})):t("advanced-editor-open").hide(),e("body").on("focus",".media-modal .media-frame-content input, .media-modal .media-frame-content textarea",function(e){e.stopPropagation()}),tablepress_options.cells_auto_grow&&n.on("focus","textarea",tp.cells.autogrow),t("edit-form-body").on("click","input:checkbox",{parent:"#edit-form-body"},tp.cells.checkboxes.multi_select),t("edit-form-foot").on("click","input:checkbox",{parent:"#edit-form-foot"},tp.cells.checkboxes.multi_select),t("edit-form-head").on("click",".sort-control",tp.rows.sort),t("tablepress-page").find("form").on("submit",function(){e(this).find(".tablepress-postbox-table").find("input, select").prop("disabled",!1)}),n.sortable({axis:"y",containment:t("edit-form"),forceHelperSize:!0,handle:".move-handle",start:tp.rows.move.start,change:tp.rows.move.change,stop:tp.rows.move.stop,update:tp.reindex}),t("edit-form-head").sortable({axis:"x",items:".head",containment:"parent",forceHelperSize:!0,helper:"clone",handle:".move-handle",start:tp.columns.move.start,stop:tp.columns.move.stop,change:tp.columns.move.change,sort:tp.columns.move.sort}).disableSelection()},tp.init()});
|
1 |
+
window.tp=window.tp||{},jQuery(document).ready(function(i){"use strict";var l=function(e){return i(document.getElementById(e))};tp.made_changes=!1,tp.table={id:l("table-id").val(),new_id:l("table-new-id").val(),rows:parseInt(l("number-rows").val(),10),columns:parseInt(l("number-columns").val(),10),head:l("option-table-head").prop("checked"),foot:l("option-table-foot").prop("checked"),no_data_columns_pre:2,no_data_columns_post:1,body_cells_pre:'<tr><td><span class="move-handle"></span></td><td><input type="checkbox" /><input type="hidden" class="visibility" name="table[visibility][rows][]" value="1" /></td>',body_cells_post:'<td><span class="move-handle"></span></td></tr>',body_cell:'<td><textarea rows="1"></textarea></td>',head_cell:'<th class="head"><span class="sort-control sort-desc" title="'+tablepress_strings.sort_desc+'"><span class="sorting-indicator"></span></span><span class="sort-control sort-asc" title="'+tablepress_strings.sort_asc+'"><span class="sorting-indicator"></span></span><span class="move-handle"></span></th>',foot_cell:'<th><input type="checkbox" /><input type="hidden" class="visibility" name="table[visibility][columns][]" value="1" /></th>',set_table_changed:function(){tp.made_changes=!0},unset_table_changed:function(){tp.made_changes=!1,l("edit-form-body").one("change","textarea",tp.table.set_table_changed),i("#tablepress_edit-table-information, #tablepress_edit-table-options, #tablepress_edit-datatables-features").one("change","input, textarea, select",tp.table.set_table_changed)},change_id:function(){return""===i.trim(l("table-new-id").val())?(alert(tablepress_strings.table_id_not_empty),void l("table-new-id").val(tp.table.new_id).focus().select()):"0"===i.trim(l("table-new-id").val())?(alert(tablepress_strings.table_id_not_zero),void l("table-new-id").val(tp.table.new_id).focus().select()):void(this.value!==tp.table.new_id&&(confirm(tablepress_strings.ays_change_table_id)?(tp.table.new_id=this.value,i(".table-shortcode").val("["+tablepress_options.shortcode+" id="+tp.table.new_id+" /]").click(),tp.table.set_table_changed()):i(this).val(tp.table.new_id)))},change_table_head:function(){tp.table.head=i(this).prop("checked"),l("option-use-datatables").prop("disabled",!tp.table.head).change(),l("notice-datatables-head-row").toggle(!tp.table.head),tp.rows.stripe()},change_table_foot:function(){tp.table.foot=i(this).prop("checked"),tp.rows.stripe()},change_print_name_description:function(){l(this.id+"-position").prop("disabled",!i(this).prop("checked"))},change_datatables:function(){var e=l("option-use-datatables"),t=!(e.prop("checked")&&!e.prop("disabled"));e.closest("tbody").find("input").not(e).prop("disabled",t),tp.table.change_datatables_pagination()},change_datatables_pagination:function(){var e=l("option-datatables-paginate"),t=e.prop("checked")&&!e.prop("disabled");l("option-datatables-lengthchange").prop("disabled",!t),l("option-datatables-paginate_entries").prop("disabled",!t)},prepare_ajax_request:function(e,t){var a,n=l("edit-form-body"),o=[],s={rows:tp.table.rows,columns:tp.table.columns,hidden_rows:0,hidden_columns:0},r={rows:[],columns:[]};return n.children().each(function(e,t){o[e]=i(t).find("textarea").map(function(){return i(this).val()}).get()}),o=JSON.stringify(o),a={table_head:tp.table.head,table_foot:tp.table.foot,alternating_row_colors:l("option-alternating-row-colors").prop("checked"),row_hover:l("option-row-hover").prop("checked"),print_name:l("option-print-name").prop("checked"),print_description:l("option-print-description").prop("checked"),print_name_position:l("option-print-name-position").val(),print_description_position:l("option-print-description-position").val(),extra_css_classes:l("option-extra-css-classes").val(),use_datatables:l("option-use-datatables").prop("checked"),datatables_sort:l("option-datatables-sort").prop("checked"),datatables_filter:l("option-datatables-filter").prop("checked"),datatables_paginate:l("option-datatables-paginate").prop("checked"),datatables_lengthchange:l("option-datatables-lengthchange").prop("checked"),datatables_paginate_entries:l("option-datatables-paginate_entries").val(),datatables_info:l("option-datatables-info").prop("checked"),datatables_scrollx:l("option-datatables-scrollx").prop("checked"),datatables_custom_commands:l("option-datatables-custom-commands").val()},a=JSON.stringify(a),r.rows=n.find('input[type="hidden"]').map(function(){return"1"===i(this).val()?1:(s.hidden_rows+=1,0)}).get(),r.columns=l("edit-form-foot").find('input[type="hidden"]').map(function(){return"1"===i(this).val()?1:(s.hidden_columns+=1,0)}).get(),r=JSON.stringify(r),{action:e,_ajax_nonce:i(t).val(),tablepress:{id:tp.table.id,new_id:tp.table.new_id,name:l("table-name").val(),description:l("table-description").val(),number:s,data:o,options:a,visibility:r}}},preview:{trigger:function(){return tp.made_changes?l("option-datatables-paginate").prop("checked")&&!/^[1-9][0-9]{0,4}$/.test(l("option-datatables-paginate_entries").val())?(alert(tablepress_strings.num_pagination_entries_invalid),void l("option-datatables-paginate_entries").focus().select()):/[^A-Za-z0-9- _]/.test(l("option-extra-css-classes").val())?(alert(tablepress_strings.extra_css_classes_invalid),void l("option-extra-css-classes").focus().select()):(i(this).closest("p").append('<span class="animation-preview spinner is-active" title="'+tablepress_strings.preparing_preview+'"/>'),i("body").addClass("wait"),l("table-preview").empty(),i.ajax({type:"POST",url:ajaxurl,data:tp.table.prepare_ajax_request("tablepress_preview_table","#nonce-preview-table"),success:tp.table.preview.ajax_success,error:tp.table.preview.ajax_error,dataType:"json"}),!1):(tp.table.preview.show(i(this).attr("href")+"&TB_iframe=true"),!1)},ajax_success:function(e,t){void 0===t||"success"!==t?tp.table.preview.error("AJAX call successful, but unclear status."):null==e||"-1"===e||void 0===e.success||!0!==e.success?tp.table.preview.error("AJAX call successful, but unclear data."):tp.table.preview.success(e)},ajax_error:function(e,t,a){tp.table.preview.error("AJAX call failed: "+t+" - "+a)},success:function(t){l("table-preview").empty(),i('<iframe id="table-preview-iframe" />').load(function(){var e=i(this).contents();e.find("head").append(t.head_html),e.find("body").append(t.body_html)}).appendTo("#table-preview"),i(".animation-preview").remove(),i("body").removeClass("wait"),tp.table.preview.show("#TB_inline?inlineId=preview-container")},error:function(e){i(".animation-preview").closest("p").after('<div class="ajax-alert preview-error error"><p>'+tablepress_strings.preview_error+": "+e+"</p></div>"),i(".animation-preview").remove(),i(".preview-error").delay(6e3).fadeOut(2e3,function(){i(this).remove()}),i("body").removeClass("wait")},show:function(e){var t=i(window).width()-120,a=i(window).height()-120;i("#wpadminbar").length&&(a-=parseInt(i("#wpadminbar").css("height"),10)),tb_show(i(".show-preview-button").first().text(),e+"&height="+a+"&width="+t,!1)}}},tp.rows={create:function(e){var t,a,n,o="";for(t=0;t<e;t++){for(o+=tp.table.body_cells_pre,a=0;a<tp.table.columns;a++)o+=tp.table.body_cell;o+=tp.table.body_cells_post}return n=l("edit-form-foot").find(".column-hidden").map(function(){return i(this).index()}).get(),i(o).each(function(e,t){i(t).children().filter(function(e){return-1!==i.inArray(e,n)}).addClass("column-hidden")})},append:function(){var e=l("rows-append-number").val();if(!/^[1-9][0-9]{0,4}$/.test(e))return alert(tablepress_strings.append_num_rows_invalid),void l("rows-append-number").focus().select();l("edit-form-body").append(tp.rows.create(e)),tp.rows.stripe(),tp.reindex()},insert:function(e){var t=l("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==t.length?(t.before(tp.rows.create(1)),tp.rows.stripe(),tp.reindex()):alert(tablepress_strings.no_rows_selected)},duplicate:function(e){var t=l("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==t.length?(t.each(function(e,t){var a=i(t),n=a.find("textarea"),o=a.clone();o.find("textarea").removeAttr("id").each(function(e,t){i(t).val(n.eq(e).val())}),a.after(o)}),tp.rows.stripe(),tp.reindex()):alert(tablepress_strings.no_rows_selected)},hide:function(e){var t=l("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==t.length?(t.addClass("row-hidden").find(".visibility").val("0"),tp.rows.stripe(),tp.table.set_table_changed()):alert(tablepress_strings.no_rows_selected)},unhide:function(e){var t=l("edit-form-body").find("input:checked").prop("checked",e.shiftKey).closest("tr");0!==t.length?(t.removeClass("row-hidden").find(".visibility").val("1"),tp.rows.stripe(),tp.table.set_table_changed()):alert(tablepress_strings.no_rows_selected)},remove:function(){var e,t=l("edit-form-body").find("input:checked").closest("tr");0!==t.length?tp.table.rows!==t.length?(e=1===t.length?tablepress_strings.ays_remove_rows_singular:tablepress_strings.ays_remove_rows_plural,confirm(e)&&(t.remove(),tp.rows.stripe(),tp.reindex())):alert(tablepress_strings.no_remove_all_rows):alert(tablepress_strings.no_rows_selected)},move:{start:function(e,t){i(t.placeholder).removeClass("row-hidden").css("visibility","visible").html('<td colspan="'+(tp.table.columns+tp.table.no_data_columns_pre+tp.table.no_data_columns_post)+'"><div/></td>'),i(t.helper).removeClass("odd head-row foot-row")},change:function(e,t){tp.rows.stripe(t.helper)},stop:function(){tp.rows.stripe()}},sort:function(){var a=i(this).parent().index(),n=i(this).hasClass("sort-asc")?1:-1,e=i("#edit-form-body"),t=e.find(".head-row").prevAll().addBack(),o=e.find(".foot-row").nextAll().addBack(),s=e.children().not(t).not(o).get();i.each(s,function(e,t){t.sort_key=(""+i(t).children().eq(a).find("textarea").val()).toLowerCase()}),s.sort(function(e,t){return n*function(e,t){var a,n,o=/(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g,s=/^\s+|\s+$/g,r=/\s+/g,i=/^0x[0-9a-f]+$/i,l=/^0/,c=e.replace(s,"")||"",d=t.replace(s,"")||"",p=c.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=d.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=parseInt(c.match(i),16)||1!==p.length&&Date.parse(c),_=parseInt(d.match(i),16)||h&&d.match(/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/)&&Date.parse(d)||null,m=function(e,t){return(!e.match(l)||1===t)&&parseFloat(e)||e.replace(r," ").replace(s,"")||0};if(_){if(h<_)return-1;if(_<h)return 1}for(var b=0,f=p.length,v=u.length,g=Math.max(f,v);b<g;b++){if(a=m(p[b]||"",f),n=m(u[b]||"",v),isNaN(a)!==isNaN(n))return isNaN(a)?1:-1;if(/[^\x00-\x80]/.test(a+n)&&a.localeCompare){var w=a.localeCompare(n);return w/Math.abs(w)}if(a<n)return-1;if(n<a)return 1}}(e.sort_key,t.sort_key)}),i.each(s,function(e,t){t.sort_key=null}),e.append(t),e.append(s),e.append(o),tp.rows.stripe(),tp.reindex()},stripe:function(e){void 0===e&&(e=null),e=i(e);var t=l("edit-form-body").children().removeClass("odd head-row foot-row").not(e);t.filter(":even").addClass("odd"),t=t.not(".row-hidden"),e.hasClass("row-hidden")&&(t=t.not(".ui-sortable-placeholder")),tp.table.head&&t.first().addClass("head-row"),tp.table.foot&&t.last().addClass("foot-row")}},tp.columns={append:function(){var e,t=l("columns-append-number").val(),a="",n="",o="";if(!/^[1-9][0-9]{0,4}$/.test(t))return alert(tablepress_strings.append_num_columns_invalid),void l("columns-append-number").focus().select();for(e=0;e<t;e++)n+=tp.table.body_cell,a+=tp.table.head_cell,o+=tp.table.foot_cell;l("edit-form-body").children().each(function(e,t){i(t).children().slice(-tp.table.no_data_columns_post).before(n)}),l("edit-form-head").children().slice(-tp.table.no_data_columns_post).before(a),l("edit-form-foot").children().slice(-tp.table.no_data_columns_post).before(o),tp.reindex()},insert:function(e){var a,t=l("edit-form-foot").find("input:checked").prop("checked",e.shiftKey).closest("th");0!==t.length?(a=t.map(function(){return i(this).index()}).get(),l("edit-form-body").children().each(function(e,t){i(t).children().filter(function(e){return-1!==i.inArray(e,a)}).before(tp.table.body_cell)}),l("edit-form-head").children().filter(function(e){return-1!==i.inArray(e,a)}).before(tp.table.head_cell),t.before(tp.table.foot_cell),tp.reindex()):alert(tablepress_strings.no_columns_selected)},duplicate:function(e){var o,t=l("edit-form-foot").find("input:checked").prop("checked",e.shiftKey).closest("th");0!==t.length?(o=t.map(function(){return i(this).index()}).get(),l("edit-form").find("tr").each(function(e,t){i(t).children().each(function(e,t){if(-1!==i.inArray(e,o)){var a=i(t),n=a.clone();n.find("textarea").removeAttr("id").val(a.find("textarea").val()),a.after(n)}})}),tp.reindex()):alert(tablepress_strings.no_columns_selected)},hide:function(e){var a,t=l("edit-form-foot").find("input:checked").prop("checked",e.shiftKey).closest("th");0!==t.length?(a=t.map(function(){return i(this).index()}).get(),l("edit-form-body").children().add("#edit-form-head").each(function(e,t){i(t).children().filter(function(e){return-1!==i.inArray(e,a)}).addClass("column-hidden")}),t.addClass("column-hidden").find(".visibility").val("0"),tp.table.set_table_changed()):alert(tablepress_strings.no_columns_selected)},unhide:function(e){var a,t=l("edit-form-foot").find("input:checked").prop("checked",e.shiftKey).closest("th");0!==t.length?(a=t.map(function(){return i(this).index()}).get(),l("edit-form-body").children().add("#edit-form-head").each(function(e,t){i(t).children().filter(function(e){return-1!==i.inArray(e,a)}).removeClass("column-hidden")}),t.removeClass("column-hidden").find(".visibility").val("1"),tp.table.set_table_changed()):alert(tablepress_strings.no_columns_selected)},remove:function(){var a,e,t=l("edit-form-foot").find("input:checked").closest("th");0!==t.length?tp.table.columns!==t.length?(e=1===t.length?tablepress_strings.ays_remove_columns_singular:tablepress_strings.ays_remove_columns_plural,confirm(e)&&(a=t.map(function(){return i(this).index()}).get(),l("edit-form-body").children().add("#edit-form-head").each(function(e,t){i(t).children().filter(function(e){return-1!==i.inArray(e,a)}).remove()}),t.remove(),tp.reindex())):alert(tablepress_strings.no_remove_all_columns):alert(tablepress_strings.no_columns_selected)},move:{source_idx:-1,target_idx:-1,$rows:null,$row_children:null,$cell:null,$cells:null,$placeholder:null,$helper:null,start:function(e,t){var a,n=i(t.item);tp.columns.move.source_idx=n.index(),tp.columns.move.$rows=l("edit-form-body").children().add("#edit-form-foot"),tp.columns.move.$cells=tp.columns.move.$rows.find(":nth-child("+(tp.columns.move.source_idx+1)+")").each(function(){tp.columns.move.$cell=i(this),i('<td class="move-placeholder"><div/></td>').insertBefore(tp.columns.move.$cell),tp.columns.move.$cell.insertAfter(tp.columns.move.$cell.nextAll().last()).clone().addClass("move-hover").insertAfter(tp.columns.move.$cell).find("textarea").val(tp.columns.move.$cell.find("textarea").val())}).hide(),tp.columns.move.$helper=tp.columns.move.$rows.find(".move-hover"),a=tp.columns.move.$helper.eq(1).width(),tp.columns.move.$helper.eq(0).width(a),tp.columns.move.$placeholder=tp.columns.move.$rows.find(".move-placeholder"),tp.columns.move.$placeholder.find("div").width(a)},change:function(e,t){tp.columns.move.target_idx=i(t.placeholder).index(),tp.columns.move.target_idx-tp.columns.move.source_idx==1?tp.columns.move.target_idx+=1:tp.columns.move.target_idx===tp.columns.move.source_idx&&(tp.columns.move.target_idx-=1),tp.columns.move.$placeholder.each(function(){tp.columns.move.$cell=i(this),tp.columns.move.$cell.insertBefore(tp.columns.move.$cell.parent().children().eq(tp.columns.move.target_idx))}),tp.columns.move.target_idx>tp.columns.move.source_idx&&(tp.columns.move.target_idx-=1),tp.columns.move.source_idx=tp.columns.move.target_idx},sort:function(e,t){tp.columns.move.$helper.css("left",t.position.left)},stop:function(){tp.columns.move.$helper.remove(),tp.columns.move.$cells.each(function(){tp.columns.move.$cell=i(this),tp.columns.move.$cell.insertBefore(tp.columns.move.$cell.parent().find(".move-placeholder"))}).show(),tp.columns.move.$placeholder.remove(),tp.columns.move.source_idx=tp.columns.move.target_idx=-1,tp.columns.move.$rows=tp.columns.move.$row_children=tp.columns.move.$cell=tp.columns.move.$cells=tp.columns.move.$placeholder=tp.columns.move.$helper=null,tp.reindex()}},number_to_letter:function(e){for(var t="";0<e;)t=String.fromCharCode(65+(e-1)%26)+t,e=Math.floor((e-1)/26);return t}},tp.cells={$focus:i(null),$textarea:null,autogrow:function(){tp.cells.$focus.removeClass("focus"),tp.cells.$focus=i(this).closest("tr").addClass("focus")},advanced_editor:{prompt_shown:!1,keyopen:function(e){if(e.shiftKey){var t=l("advanced-editor-content");tp.cells.$textarea=i(this).blur(),t.val(tp.cells.$textarea.val()),l("advanced-editor").wpdialog("open"),t.get(0).selectionStart=t.get(0).selectionEnd=t.val().length,t.focus()}},buttonopen:function(){(tp.cells.advanced_editor.prompt_shown||confirm(tablepress_strings.advanced_editor_open))&&(tp.cells.advanced_editor.prompt_shown=!0,l("edit-form-body").one("click","textarea",function(){var e=l("advanced-editor-content");tp.cells.$textarea=i(this).blur(),e.val(tp.cells.$textarea.val()),l("advanced-editor").wpdialog("open"),e.get(0).selectionStart=e.get(0).selectionEnd=e.val().length,e.focus()}))},save:function(){var e=l("advanced-editor-content").blur().val();tp.cells.$textarea.val()!==e&&(tp.cells.$textarea.val(e),tp.cells.$textarea.get(0).selectionStart=tp.cells.$textarea.get(0).selectionEnd=tp.cells.$textarea.val().length,tp.table.set_table_changed()),tp.cells.$textarea.focus(),tp.cells.advanced_editor.close()},close:function(){return l("advanced-editor").wpdialog("close"),!1}},checkboxes:{last_clicked:{"#edit-form-body":!1,"#edit-form-foot":!1},multi_select:function(e){if("undefined"===e.shiftKey)return!0;if(e.shiftKey){if(!tp.cells.checkboxes.last_clicked[e.data.parent])return!0;var t=i(e.data.parent).find(":checkbox"),a=t.index(tp.cells.checkboxes.last_clicked[e.data.parent]),n=t.index(this);a!==n&&t.slice(Math.min(a,n),Math.max(a,n)).prop("checked",i(this).prop("checked"))}return tp.cells.checkboxes.last_clicked[e.data.parent]=this,!0}}},tp.content={link:{prompt_shown:!1,add:function(){(tp.content.link.prompt_shown||confirm(tablepress_strings.link_add))&&(tp.content.link.prompt_shown=!0,l("edit-form-body").one("mousedown","textarea",function(){var e=this.id;i(document).one("mouseup",function(){"undefined"!=typeof wpLink&&(wpLink.open(e),tp.table.set_table_changed())})}))}},image:{prompt_shown:!1,add:function(){(tp.content.image.prompt_shown||confirm(tablepress_strings.image_add))&&(tp.content.image.prompt_shown=!0,l("edit-form-body").one("click","textarea",function(){var e=this.id,t={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0};this.selectionStart=this.selectionEnd=this.value.length,i(this).blur(),wp.media.editor.open(e,t),tp.table.set_table_changed()}))}},span:{prompt_shown:!1,add:function(n){var e="#rowspan#"===n?tablepress_strings.rowspan_add:tablepress_strings.colspan_add;if(!1===tp.content.span.prompt_shown&&(tp.content.span.prompt_shown={},tp.content.span.prompt_shown["#rowspan#"]=tp.content.span.prompt_shown["#colspan#"]=!1),l("option-use-datatables").prop("checked")){if(!confirm(tablepress_strings.span_add_datatables_warning))return;l("option-use-datatables").prop("checked",!1).change()}(tp.content.span.prompt_shown[n]||confirm(e))&&(tp.content.span.prompt_shown[n]=!0,l("edit-form-body").one("click","textarea",function(){var e=i(this),t=e.parent().index(),a=e.closest("tr").index();if("#rowspan#"===n){if(0===a)return void alert(tablepress_strings.no_rowspan_first_row);if(tp.table.head&&1===a)return void alert(tablepress_strings.no_rowspan_table_head);if(tp.table.foot&&tp.table.rows-1===a)return void alert(tablepress_strings.no_rowspan_table_foot)}else if("#colspan#"===n&&tp.table.no_data_columns_pre===t)return void alert(tablepress_strings.no_colspan_first_col);e.val(n),tp.table.set_table_changed()}))}}},tp.check={table_id:function(e){if(37!==e.which&&39!==e.which){var t=i(this);t.val(t.val().replace(/[^0-9a-zA-Z-_]/g,""))}},changes_saved:function(){if(tp.made_changes)return tablepress_strings.unsaved_changes_unload}},tp.reindex=function(){var a,n,e=l("edit-form-body").children(),o={};tp.table.rows=e.length,0<tp.table.rows?tp.table.columns=e.first().children().length-tp.table.no_data_columns_pre-tp.table.no_data_columns_post:tp.table.columns=0,e.each(function(t,e){(a=i(e)).find("textarea").val(function(e,t){return""===t||"="!==t.charAt(0)?t:t.replace(/([A-Z]+[0-9]+)(?::([A-Z]+[0-9]+))?/g,function(e,t,a){return o.hasOwnProperty(t)||((n=l("cell-"+t)).length?o[t]=tp.columns.number_to_letter(n.parent().index()-tp.table.no_data_columns_pre+1)+(n.closest("tr").index()+1):o[t]=t),e=o[t],void 0!==a&&""!==a&&(o.hasOwnProperty(a)||((n=l("cell-"+a)).length?o[a]=tp.columns.number_to_letter(n.parent().index()-tp.table.no_data_columns_pre+1)+(n.closest("tr").index()+1):o[a]=a),e+=":"+o[a]),e})}).attr("name",function(e){return"table[data]["+t+"]["+e+"]"}),a.find(".move-handle").html(t+1)}).each(function(t,e){i(e).find("textarea").attr("id",function(e){return"cell-"+tp.columns.number_to_letter(e+1)+(t+1)})}),l("edit-form-head").find(".move-handle").html(function(e){return tp.columns.number_to_letter(e+1)}),l("number-rows").val(tp.table.rows),l("number-columns").val(tp.table.columns),tp.table.set_table_changed()},tp.save_changes={trigger:function(e){return l("option-datatables-paginate").prop("checked")&&!/^[1-9][0-9]{0,4}$/.test(l("option-datatables-paginate_entries").val())?(alert(tablepress_strings.num_pagination_entries_invalid),void l("option-datatables-paginate_entries").focus().select()):/[^A-Za-z0-9- _]/.test(l("option-extra-css-classes").val())?(alert(tablepress_strings.extra_css_classes_invalid),void l("option-extra-css-classes").focus().select()):e.shiftKey?(tp.made_changes=!1,void l("tablepress-page").find("form").submit()):(i(this).closest("p").append('<span class="animation-saving spinner is-active" title="'+tablepress_strings.saving_changes+'"/>'),i(".save-changes-button").prop("disabled",!0),i("body").addClass("wait"),void i.ajax({type:"POST",url:ajaxurl,data:tp.table.prepare_ajax_request("tablepress_save_table","#nonce-edit-table"),success:tp.save_changes.ajax_success,error:tp.save_changes.ajax_error,dataType:"json"}))},ajax_success:function(e,t){if(void 0===t||"success"!==t)tp.save_changes.error("AJAX call successful, but unclear status. Try again while holding down the “Shift” key.");else if(null==e||"-1"===e||void 0===e.success)tp.save_changes.error("AJAX call successful, but unclear data. Try again while holding down the “Shift” key.");else if(!0!==e.success){var a="";void 0!==e.error_details&&tablepress_options.print_debug_output&&(a="</p><p>These errors were encountered:</p><pre>"+e.error_details+"</pre><p>"),tp.save_changes.error("AJAX call successful, internal saving process failed. Try again while holding down the “Shift” key."+a)}else tp.save_changes.success(e)},ajax_error:function(e,t,a){tp.save_changes.error("AJAX call failed: "+t+" - "+a+". Try again while holding down the “Shift” key.")},success:function(e){tp.table.id!==e.table_id&&"pushState"in window.history&&null!==window.history.pushState&&window.history.pushState("","",window.location.href.replace(/table_id=[0-9a-zA-Z-_]+/gi,"table_id="+e.table_id)),l("edit-form").removeClass("tablepress-edit-screen-id-"+tp.table.id).addClass("tablepress-edit-screen-id-"+e.table_id),tp.table.id=tp.table.new_id=e.table_id,l("table-id").val(tp.table.id),l("table-new-id").val(tp.table.new_id),i(".table-shortcode").val("["+tablepress_options.shortcode+" id="+tp.table.new_id+" /]"),l("nonce-edit-table").val(e.new_edit_nonce),l("nonce-preview-table").val(e.new_preview_nonce);var t=i(".show-preview-button");t.length&&t.attr("href",t.first().attr("href").replace(/item=[a-zA-Z0-9_-]+/g,"item="+e.table_id).replace(/&_wpnonce=[a-z0-9]+/gi,"&_wpnonce="+e.new_preview_nonce)),l("last-modified").text(e.last_modified),l("last-editor").text(e.last_editor),tp.table.unset_table_changed(),tp.save_changes.after_saving_dialog("success",tablepress_strings[e.message])},error:function(e){tp.save_changes.after_saving_dialog("error",e)},after_saving_dialog:function(e,t){t=void 0===t?"":": "+t;var a,n="save-changes-"+e;"success"===e?(n+=" notice notice-success",a=3e3):(n+=" notice notice-error",a=6e3),i(".animation-saving").closest("p").after('<div class="ajax-alert '+n+'"><p>'+tablepress_strings["save_changes_"+e]+t+"</p></div>"),i(".animation-saving").remove(),i(".save-changes-"+e).delay(a).fadeOut(2e3,function(){i(this).remove()}),i(".save-changes-button").prop("disabled",!1),i("body").removeClass("wait")}},tp.init=function(){var e={click:{"#rows-insert":tp.rows.insert,"#columns-insert":tp.columns.insert,"#rows-duplicate":tp.rows.duplicate,"#columns-duplicate":tp.columns.duplicate,"#rows-remove":tp.rows.remove,"#columns-remove":tp.columns.remove,"#rows-hide":tp.rows.hide,"#columns-hide":tp.columns.hide,"#rows-unhide":tp.rows.unhide,"#columns-unhide":tp.columns.unhide,"#rows-append":tp.rows.append,"#columns-append":tp.columns.append,"#link-add":tp.content.link.add,"#image-add":tp.content.image.add,"#span-add-rowspan":function(){tp.content.span.add("#rowspan#")},"#span-add-colspan":function(){tp.content.span.add("#colspan#")},".show-preview-button":tp.table.preview.trigger,".save-changes-button":tp.save_changes.trigger,".show-help-box":function(){i(this).next().wpdialog({title:i(this).attr("title"),height:470,width:320,modal:!0,dialogClass:"wp-dialog",resizable:!1})}},keyup:{"#table-new-id":tp.check.table_id},change:{"#option-table-head":tp.table.change_table_head,"#option-table-foot":tp.table.change_table_foot,"#option-use-datatables":tp.table.change_datatables,"#option-datatables-paginate":tp.table.change_datatables_pagination},blur:{"#table-new-id":tp.table.change_id}},t=l("edit-form-body");i.each(e,function(a,e){i.each(e,function(e,t){i(e).on(a,t)})}),i(window).on("beforeunload",tp.check.changes_saved),l("option-table-head").change(),l("option-print-name").change(tp.table.change_print_name_description).change(),l("option-print-description").change(tp.table.change_print_name_description).change(),t.one("change","textarea",tp.table.set_table_changed),i("#tablepress_edit-table-information, #tablepress_edit-table-options, #tablepress_edit-datatables-features").one("change","input, textarea, select",tp.table.set_table_changed),tablepress_options.cells_advanced_editor?(t.on("click","textarea",tp.cells.advanced_editor.keyopen),l("advanced-editor-open").on("click",tp.cells.advanced_editor.buttonopen),l("advanced-editor-confirm").on("click",tp.cells.advanced_editor.save),l("advanced-editor-cancel").on("click",tp.cells.advanced_editor.close),l("advanced-editor").wpdialog({autoOpen:!1,title:l("advanced-editor-open").val(),width:600,modal:!0,dialogClass:"wp-dialog",resizable:!1}),l("wp-link").on("focus","input",function(e){e.stopPropagation()})):l("advanced-editor-open").hide(),i("body").on("focus",".media-modal .media-frame-content input, .media-modal .media-frame-content textarea",function(e){e.stopPropagation()}),tablepress_options.cells_auto_grow&&t.on("focus","textarea",tp.cells.autogrow),l("edit-form-body").on("click","input:checkbox",{parent:"#edit-form-body"},tp.cells.checkboxes.multi_select),l("edit-form-foot").on("click","input:checkbox",{parent:"#edit-form-foot"},tp.cells.checkboxes.multi_select),l("edit-form-head").on("click",".sort-control",tp.rows.sort),l("tablepress-page").find("form").on("submit",function(){i(this).find(".tablepress-postbox-table").find("input, select").prop("disabled",!1)}),t.sortable({axis:"y",containment:l("edit-form"),forceHelperSize:!0,handle:".move-handle",start:tp.rows.move.start,change:tp.rows.move.change,stop:tp.rows.move.stop,update:tp.reindex}),l("edit-form-head").sortable({axis:"x",items:".head",containment:"parent",forceHelperSize:!0,helper:"clone",handle:".move-handle",start:tp.columns.move.start,stop:tp.columns.move.stop,change:tp.columns.move.change,sort:tp.columns.move.sort}).disableSelection()},tp.init()});
|
admin/js/export.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(o){"use strict";o("#tablepress-page").find("form").on("submit",function(){var e=o("#tables-export").val();if(0===(e?e.length:0))return!1;o("#tables-export-list").val(e.join(",")),o("#tables-export-zip-file").prop("disabled",!1)}),o("#tables-export-format").on("change",function(){var e="csv"!==o(this).val();o("#tables-export-csv-delimiter").prop("disabled",e),o("#tables-export-csv-delimiter-description").toggle(e)}).change();var l=!1;o("#tables-export-zip-file").on("change",function(){l=o(this).prop("checked")}),o("#tables-export").on("change",function(){var e=o(this).val(),t=1<(e?e.length:0);o("#tables-export-zip-file").prop("disabled",t).prop("checked",t||l),o("#tables-export-zip-file-description").toggle(t),o("#tables-export-select-all").prop("checked",0===o(this).find("option").not(":selected").length)}).change(),o("#tables-export-select-all").on("change",function(){var e=o("#tables-export");e.find("option").prop("selected",o(this).prop("checked")),e.change()}),o("#tables-export").focus()});
|
admin/js/import.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(l){"use strict";l("#row-import-type").on("change","input",function(){l("#tables-import-existing-table").prop("disabled","replace"!==l(this).val()&&"append"!==l(this).val())}).find("input:checked").change(),l("#row-import-source").on("change","input",function(){l("#row-import-source-file-upload, #row-import-source-url, #row-import-source-server, #row-import-source-form-field").hide(),l("#row-import-source-"+l(this).val()).show()}).find("input:checked").change(),l("#row-import-wp-table-reloaded-source").on("change","input",function(){l("#row-import-wp-table-reloaded-source-dump-file, #row-import-wp-table-reloaded-source-db").hide(),l("#row-import-wp-table-reloaded-source-"+l(this).val()).show()}).find("input:checked").change(),l("#tables-import-file-upload, #tables-import-url, #tables-import-server").on("change",function(e){var t,o,r=l(this).val(),i=r,a="csv";"tables-import-url"===e.target.id&&(a="html"),-1!==(t=r.lastIndexOf("\\"))?i=r.substr(t+1):-1!==(t=r.lastIndexOf("/"))&&(i=r.substr(t+1)),-1!==(o=i.lastIndexOf("."))&&(a=i.substr(o+1).toLowerCase()),"htm"===a&&(a="html"),"zip"!==a&&l("#tables-import-format").val(a)}),l("#tablepress-page").find("form").on("submit.tablepress",function(){var e=l("#row-import-source").find("input:checked").val(),t=l("#tables-import-"+e).get(0),o=!0,r=l("#row-import-type").find("input:checked").val();if(t.defaultValue===t.value&&(l(t).addClass("invalid").one("change",function(){l(this).removeClass("invalid")}).focus().select(),o=!1),"replace"!==r&&"append"!==r||""===l("#tables-import-existing-table").val()&&(l("#row-import-type").one("change","input",function(){l("#tables-import-existing-table").removeClass("invalid")}),l("#tables-import-existing-table").addClass("invalid").one("change",function(){l(this).removeClass("invalid")}).focus().select(),o=!1),!o)return!1}),l("#tablepress-page").find("#submit_wp_table_reloaded_import").on("click",function(){return l("#tablepress-page").find("form").off("submit.tablepress"),l("#import-wp-table-reloaded-source-dump-file").prop("checked")&&""===l("#tables-import-wp-table-reloaded-dump-file").val()?(l("#tables-import-wp-table-reloaded-dump-file").addClass("invalid").one("change",function(){l(this).removeClass("invalid")}).focus().select(),!1):l("#import-wp-table-reloaded-tables").prop("checked")||l("#import-wp-table-reloaded-css").prop("checked")?void 0:(alert(tablepress_import.error_wp_table_reloaded_nothing_selected),!1)})});
|
admin/js/list.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(n){"use strict";n(".tablepress-all-tables").on("click",".shortcode a",function(){return prompt(tablepress_list.shortcode_popup,n(this).attr("title")),!1}),n(".tablepress-all-tables").on("click",".table-preview a",function(){var t=n(window).width()-120,e=n(window).height()-120,a=n(this);return n("#wpadminbar").length&&(e-=parseInt(n("#wpadminbar").css("height"),10)),tb_show(a.text(),a.attr("href")+"TB_iframe=true&height="+e+"&width="+t,!1),!1}),n("#tablepress-page").on("click",".ajax-link",function(){var e=n(this),a=e.data("action"),s=e.data("item"),i=e.data("target");return n.get(ajaxurl,this.href.split("?")[1],function(t){if("1"===t)switch(a){case"hide_message":"donation_nag"===s&&""!==i&&(e.closest("div").after('<div class="donation-message-after-click-message notice notice-success"><p><strong>'+tablepress_list["donation-message-"+i]+"</strong></p></div>"),n(".donation-message-after-click-message").delay(1e4).fadeOut(2e3,function(){n(this).remove()})),e.closest("div").remove()}}),!1}),n("#doaction, #doaction2").on("click",function(){var t,e,a=n(".tablepress-all-tables").find("tbody").find("input:checked").length;return t="doaction"===this.id?"top":"bottom","-1"!==n("#bulk-action-"+t).val()&&(0!==a&&(!("delete"===n("#bulk-action-"+t).val()&&(e=1===a?tablepress_common.ays_delete_single_table:tablepress_common.ays_delete_multiple_tables,!confirm(e)))&&void 0))})});
|
admin/js/quicktags-button.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(i){"use strict";window.tablepress_open_shortcode_thickbox=function(){var t=i(window).width(),e=720<t?720:t,o=i(window).height();i("#wpadminbar").length&&(o-=parseInt(jQuery("#wpadminbar").css("height"),10)),tb_show(tablepress_editor_button.thickbox_title,tablepress_editor_button.thickbox_url+"&TB_iframe=true&height="+(o-85)+"&width="+(e-80),!1)},"undefined"!=typeof QTags&&QTags.addButton("tablepress_quicktags_button",tablepress_editor_button.caption,window.tablepress_open_shortcode_thickbox,!1,!1,tablepress_editor_button.title,115)});
|
classes/class-admin-page-helper.php
CHANGED
@@ -97,7 +97,7 @@ class TablePress_Admin_Page {
|
|
97 |
?>
|
98 |
<script type="text/javascript">
|
99 |
( function( $ ) {
|
100 |
-
var options = <?php echo wp_json_encode( $args ); ?>, setup;
|
101 |
|
102 |
if ( ! options ) {
|
103 |
return;
|
97 |
?>
|
98 |
<script type="text/javascript">
|
99 |
( function( $ ) {
|
100 |
+
var options = <?php echo wp_json_encode( $args, TABLEPRESS_JSON_OPTIONS ); ?>, setup;
|
101 |
|
102 |
if ( ! options ) {
|
103 |
return;
|
classes/class-export.php
CHANGED
@@ -128,7 +128,7 @@ class TablePress_Export {
|
|
128 |
$output = "<table>\n" . $thead . $tfoot . $tbody . "</table>\n";
|
129 |
break;
|
130 |
case 'json':
|
131 |
-
$output = wp_json_encode( $table );
|
132 |
break;
|
133 |
default:
|
134 |
$output = '';
|
128 |
$output = "<table>\n" . $thead . $tfoot . $tbody . "</table>\n";
|
129 |
break;
|
130 |
case 'json':
|
131 |
+
$output = wp_json_encode( $table, TABLEPRESS_JSON_OPTIONS );
|
132 |
break;
|
133 |
default:
|
134 |
$output = '';
|
classes/class-tablepress.php
CHANGED
@@ -26,7 +26,7 @@ abstract class TablePress {
|
|
26 |
* @since 1.0.0
|
27 |
* @const string
|
28 |
*/
|
29 |
-
const version = '1.9';
|
30 |
|
31 |
/**
|
32 |
* TablePress internal plugin version ("options scheme" version).
|
@@ -36,7 +36,7 @@ abstract class TablePress {
|
|
36 |
* @since 1.0.0
|
37 |
* @const int
|
38 |
*/
|
39 |
-
const db_version =
|
40 |
|
41 |
/**
|
42 |
* TablePress "table scheme" (data format structure) version.
|
26 |
* @since 1.0.0
|
27 |
* @const string
|
28 |
*/
|
29 |
+
const version = '1.9.1';
|
30 |
|
31 |
/**
|
32 |
* TablePress internal plugin version ("options scheme" version).
|
36 |
* @since 1.0.0
|
37 |
* @const int
|
38 |
*/
|
39 |
+
const db_version = 37;
|
40 |
|
41 |
/**
|
42 |
* TablePress "table scheme" (data format structure) version.
|
classes/class-wp_option.php
CHANGED
@@ -103,7 +103,7 @@ class TablePress_WP_Option {
|
|
103 |
*/
|
104 |
public function update( array $new_options ) {
|
105 |
$this->option_value = $new_options;
|
106 |
-
return $this->_update_option( $this->option_name, wp_json_encode( $this->option_value ) );
|
107 |
}
|
108 |
|
109 |
/**
|
103 |
*/
|
104 |
public function update( array $new_options ) {
|
105 |
$this->option_value = $new_options;
|
106 |
+
return $this->_update_option( $this->option_name, wp_json_encode( $this->option_value, TABLEPRESS_JSON_OPTIONS ) );
|
107 |
}
|
108 |
|
109 |
/**
|
controllers/controller-admin.php
CHANGED
@@ -1130,7 +1130,17 @@ class TablePress_Admin_Controller extends TablePress_Controller {
|
|
1130 |
break;
|
1131 |
case 'url':
|
1132 |
if ( ! empty( $import['url'] ) && 'http://' !== $import['url'] ) {
|
1133 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1134 |
$import_data['file_location'] = download_url( $import['url'] );
|
1135 |
$import_data['file_name'] = $import['url'];
|
1136 |
if ( ! is_wp_error( $import_data['file_location'] ) ) {
|
1130 |
break;
|
1131 |
case 'url':
|
1132 |
if ( ! empty( $import['url'] ) && 'http://' !== $import['url'] ) {
|
1133 |
+
// Check the host of the Import URL against a blacklist of hosts, which should not be accessible, e.g. for security considerations.
|
1134 |
+
$host = wp_parse_url( $import['url'], PHP_URL_HOST );
|
1135 |
+
$blocked_hosts = array(
|
1136 |
+
'169.254.169.254' // AWS Meta-data API
|
1137 |
+
);
|
1138 |
+
if ( in_array( $host, $blocked_hosts, true ) ) {
|
1139 |
+
$import_error = true;
|
1140 |
+
break;
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
// Download URL to local file.
|
1144 |
$import_data['file_location'] = download_url( $import['url'] );
|
1145 |
$import_data['file_name'] = $import['url'];
|
1146 |
if ( ! is_wp_error( $import_data['file_location'] ) ) {
|
controllers/controller-frontend.php
CHANGED
@@ -608,7 +608,7 @@ JS;
|
|
608 |
// Check if table output shall and can be loaded from the transient cache, otherwise generate the output.
|
609 |
if ( $render_options['cache_table_output'] && ! is_user_logged_in() ) {
|
610 |
// Hash the Render Options array to get a unique cache identifier.
|
611 |
-
$table_hash = md5( wp_json_encode( $render_options ) );
|
612 |
$transient_name = 'tablepress_' . $table_hash; // Attention: This string must not be longer than 45 characters!
|
613 |
$output = get_transient( $transient_name );
|
614 |
if ( false === $output || '' === $output ) {
|
@@ -628,7 +628,7 @@ JS;
|
|
628 |
if ( ! in_array( $transient_name, $caches_list, true ) ) {
|
629 |
$caches_list[] = $transient_name;
|
630 |
}
|
631 |
-
set_transient( $caches_list_transient_name, wp_json_encode( $caches_list ), 2 * DAY_IN_SECONDS );
|
632 |
} else {
|
633 |
/**
|
634 |
* Filter the cache hit comment message.
|
608 |
// Check if table output shall and can be loaded from the transient cache, otherwise generate the output.
|
609 |
if ( $render_options['cache_table_output'] && ! is_user_logged_in() ) {
|
610 |
// Hash the Render Options array to get a unique cache identifier.
|
611 |
+
$table_hash = md5( wp_json_encode( $render_options, TABLEPRESS_JSON_OPTIONS ) );
|
612 |
$transient_name = 'tablepress_' . $table_hash; // Attention: This string must not be longer than 45 characters!
|
613 |
$output = get_transient( $transient_name );
|
614 |
if ( false === $output || '' === $output ) {
|
628 |
if ( ! in_array( $transient_name, $caches_list, true ) ) {
|
629 |
$caches_list[] = $transient_name;
|
630 |
}
|
631 |
+
set_transient( $caches_list_transient_name, wp_json_encode( $caches_list, TABLEPRESS_JSON_OPTIONS ), 2 * DAY_IN_SECONDS );
|
632 |
} else {
|
633 |
/**
|
634 |
* Filter the cache hit comment message.
|
i18n/datatables/lang-de_DE_formal.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"emptyTable": "Keine Einträge vorhanden.",
|
3 |
+
"info": "_START_ bis _END_ von _TOTAL_ Einträgen",
|
4 |
+
"infoEmpty": "0 bis 0 von 0 Einträgen",
|
5 |
+
"infoFiltered": "(gefiltert von _MAX_ Einträgen)",
|
6 |
+
"infoPostFix": "",
|
7 |
+
"lengthMenu": "_MENU_ Einträge anzeigen",
|
8 |
+
"loadingRecords": "Lädt...",
|
9 |
+
"processing": "Bitte warten Sie...",
|
10 |
+
"search": "Suchen:",
|
11 |
+
"zeroRecords": "Keine Einträge vorhanden.",
|
12 |
+
"paginate": {
|
13 |
+
"first": "Anfang",
|
14 |
+
"previous": "Zurück",
|
15 |
+
"next": "Weiter",
|
16 |
+
"last": "Ende"
|
17 |
+
},
|
18 |
+
"aria": {
|
19 |
+
"sortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
|
20 |
+
"sortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
|
21 |
+
},
|
22 |
+
"decimal": ",",
|
23 |
+
"thousands": "."
|
24 |
+
}
|
js/jquery.datatables.min.js
CHANGED
@@ -1,164 +1,166 @@
|
|
1 |
/*!
|
2 |
-
DataTables 1.10.
|
3 |
-
©2008-
|
4 |
*/
|
5 |
-
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,
|
6 |
-
d[c]=e,"o"===b[1]&&
|
7 |
-
a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&
|
8 |
-
a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&
|
9 |
-
top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,
|
10 |
-
e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function
|
11 |
-
e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(
|
12 |
-
typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return
|
13 |
-
d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function
|
14 |
-
|
15 |
-
k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function
|
16 |
-
i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,
|
17 |
-
c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(
|
18 |
-
d,{settings:a,row:b,col:c})}function
|
19 |
-
b,f){var g,j;if(""!==f){j=
|
20 |
-
if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=
|
21 |
-
""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(
|
22 |
-
c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=
|
23 |
-
|
24 |
-
function
|
25 |
-
|
26 |
-
h("th, td",g).length,
|
27 |
-
if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function
|
28 |
-
for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+
|
29 |
-
|
30 |
-
f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:
|
31 |
-
c.bSort&&
|
32 |
-
|
33 |
-
j&&d.
|
34 |
-
q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;
|
35 |
-
e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var
|
36 |
-
[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?
|
37 |
-
|
38 |
-
l=f[g],i="function"==typeof
|
39 |
-
a,b.dir)}),t("iSortingCols",k.length));b=
|
40 |
-
ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?
|
41 |
-
"":this.value;b!=e.sSearch&&(
|
42 |
-
return b[0]}function
|
43 |
-
|
44 |
-
g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function
|
45 |
-
d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);
|
46 |
-
caseInsensitive:a.bCaseInsensitive}}function
|
47 |
-
1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=
|
48 |
-
f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function
|
49 |
-
d;
|
50 |
-
new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){
|
51 |
-
b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)
|
52 |
-
e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:
|
53 |
-
b?"block":"none");r(a,null,"processing",[a,b])}function
|
54 |
-
{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",
|
55 |
-
0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:
|
56 |
-
j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),
|
57 |
-
u&&(
|
58 |
-
v(d),f=p.outerWidth());
|
59 |
-
A[b]+"</div>";a.style.width=y[b]},
|
60 |
-
(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(
|
61 |
-
e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=
|
62 |
-
j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");
|
63 |
-
j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):
|
64 |
-
v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,
|
65 |
-
""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function
|
66 |
-
"string",
|
67 |
-
0;g<i;g++)if(j=h[g],c=k[j.col],e=
|
68 |
-
"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function
|
69 |
-
D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);
|
70 |
-
function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=
|
71 |
-
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:
|
72 |
-
b)}}function
|
73 |
-
k&&h.extend(a.oPreviousSearch,
|
74 |
-
" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=
|
75 |
-
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function
|
76 |
-
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function
|
77 |
-
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=
|
78 |
-
[ya(this[
|
79 |
-
function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&
|
80 |
-
this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():
|
81 |
-
|
82 |
-
this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();
|
83 |
-
a,j=0,i,e=this.getAttribute("id"),
|
84 |
-
break}else{
|
85 |
-
g=
|
86 |
-
["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback");
|
87 |
-
g.
|
88 |
-
|
89 |
-
(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(
|
90 |
-
a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};
|
91 |
-
z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||
|
92 |
-
else if(b.length>0){p.nTFoot=b[0];
|
93 |
-
"g"),
|
94 |
-
|
95 |
-
return
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
"
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
d;c
|
112 |
-
|
113 |
-
b)
|
114 |
-
b){return b},1)});
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
"
|
124 |
-
function(
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
a.
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
b
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
{
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
1 |
/*!
|
2 |
+
DataTables 1.10.19
|
3 |
+
©2008-2018 SpryMedia Ltd - datatables.net/license
|
4 |
*/
|
5 |
+
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
|
6 |
+
d[c]=e,"o"===b[1]&&Z(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Z(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=n.defaults.oLanguage,c=b.sDecimal;c&&Da(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&(d&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(d&&"Loading..."===b.sLoadingRecords)&&F(a,
|
7 |
+
a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Da(a)}}function fb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
|
8 |
+
"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&J(n.models.oSearch,a[b])}function gb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function hb(a){if(!n.__browser){var b={};n.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,
|
9 |
+
overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,n.__browser);a.oScroll.iBarWidth=n.__browser.barWidth}
|
10 |
+
function ib(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ea(a,b){var c=n.defaults.column,d=a.aoColumns.length,c=h.extend({},n.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},n.models.oSearch,c[d]);ka(a,d,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b],
|
11 |
+
d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(gb(c),J(n.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=S(g),i=b.mRender?
|
12 |
+
S(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return N(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,
|
13 |
+
b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function $(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&la(a);r(a,null,"column-sizing",[a])}function aa(a,b){var c=ma(a,"bVisible");return"number"===
|
14 |
+
typeof c[b]?c[b]:null}function ba(a,b){var c=ma(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function V(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function ma(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ga(a){var b=a.aoColumns,c=a.aoData,d=n.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<
|
15 |
+
j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function jb(a,b,c,d){var e,f,g,j,i,m,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){m=b[e];var q=m.targets!==k?m.targets:m.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ea(a);d(q[f],m)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],m);else if("string"===
|
16 |
+
typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,m)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function O(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},n.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ha(a,e,c,d);return e}function na(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,
|
17 |
+
e){c=Ia(a,e);return O(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function kb(a,
|
18 |
+
b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function Ja(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function S(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=S(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||
|
19 |
+
-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ja(f);for(var i=0,m=j.length;i<m;i++){f=j[i].match(ca);g=j[i].match(W);if(f){j[i]=j[i].replace(ca,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(m=a.length;i<m;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(W,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}
|
20 |
+
function N(a){if(h.isPlainObject(a))return N(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ja(e),f;f=e[e.length-1];for(var g,j,i=0,m=e.length-1;i<m;i++){g=e[i].match(ca);j=e[i].match(W);if(g){e[i]=e[i].replace(ca,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(m=d.length;j<m;j++)f={},b(f,d[j],g),
|
21 |
+
a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(W,""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(W))a[f.replace(W,"")](d);else a[f.replace(ca,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ka(a){return D(a.aoData,"_aData")}function oa(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function pa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,
|
22 |
+
1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ia(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;La(a,e)}}function Ia(a,b,c,d){var e=[],f=b.firstChild,g,
|
23 |
+
j,i=0,m,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),N(a)(d,b.getAttribute(c)))}},G=function(a){if(c===k||c===i)j=l[i],m=h.trim(a.innerHTML),j&&j._bAttrSrc?(N(j.mData._)(d,m),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=N(j.mData)),j._setter(d,m)):d[i]=m;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)G(f),e.push(f);f=f.nextSibling}else{e=b.anCells;
|
24 |
+
f=0;for(g=e.length;f<g;f++)G(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&N(a.rowId)(d,b);return{data:d,cells:e}}function Ha(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,m,l,q;if(null===e.nTr){j=c||H.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;La(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){m=a.aoColumns[l];i=c?d[l]:H.createElement(m.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||m.mRender||m.mData!==l)&&(!h.isPlainObject(m.mData)||m.mData._!==l+".display"))i.innerHTML=
|
25 |
+
B(a,b,l,"display");m.sClass&&(i.className+=" "+m.sClass);m.bVisible&&!c?j.appendChild(i):!m.bVisible&&c&&i.parentNode.removeChild(i);m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b,g])}e.nTr.setAttribute("role","row")}function La(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));
|
26 |
+
d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function lb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,m=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Ma(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Na(a,"header")(a,d,
|
27 |
+
f,m);i&&ea(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(m.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(m.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function fa(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,m;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=
|
28 |
+
0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(m=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+m]!==k&&g[d][f].cell==g[d][f+m].cell;){for(c=0;c<i;c++)j[d+c][f+m]=1;m++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",m)}}}}function P(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=
|
29 |
+
d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!mb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:m;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ha(a,l);var t=q.nTr;if(0!==e){var G=d[c%e];q._sRowStripe!=G&&(h(t).removeClass(q._sRowStripe).addClass(G),
|
30 |
+
q._sRowStripe=G)}r(a,"aoRowCallback",null,[t,q._aData,c,j,l]);b.push(t);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:V(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ka(a),g,m,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ka(a),g,m,i]);d=h(a.nTBody);d.children().detach();
|
31 |
+
d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&nb(a);d?ga(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;P(a);a._drawHold=!1}function ob(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=
|
32 |
+
a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,m,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];m=f[k+1];if("'"==m||'"'==m){l="";for(q=2;f[k+q]!=m;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(m=l.split("."),i.id=m[0].substr(1,m[0].length-1),i.className=m[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=pb(a);else if("f"==j&&
|
33 |
+
d.bFilter)g=qb(a);else if("r"==j&&d.bProcessing)g=rb(a);else if("t"==j)g=sb(a);else if("i"==j&&d.bInfo)g=tb(a);else if("p"==j&&d.bPaginate)g=ub(a);else if(0!==n.ext.feature.length){i=n.ext.feature;q=0;for(m=i.length;q<m;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function ea(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,m,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<
|
34 |
+
i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;m=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][m+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],ea(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||
|
35 |
+
!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var m="function"===typeof f?f(b,a):f,b="function"===typeof f&&m?m:h.extend(!0,b,m);delete g.data}m={data:b,success:function(b){var c=
|
36 |
+
b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(m,{url:g||a.sAjaxSource})):
|
37 |
+
"function"===typeof g?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(m,g)),g.data=f)}function mb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,!0),sa(a,vb(a),function(b){wb(a,b)}),!1):!0}function vb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,m,l,k=X(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength",
|
38 |
+
i);var G={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)m=b[g],l=f[g],i="function"==typeof m.mData?"function":m.mData,G.columns.push({data:i,name:m.sName,searchable:m.bSearchable,orderable:m.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,m.bSearchable)),d.bSort&&t("bSortable_"+g,m.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex",
|
39 |
+
e.bRegex));d.bSort&&(h.each(k,function(a,b){G.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+a,b.dir)}),t("iSortingCols",k.length));b=n.ext.legacy.ajax;return null===b?a.sAjaxSource?j:G:b?j:G}function wb(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}oa(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,
|
40 |
+
10);d=0;for(e=c.length;d<e;d++)O(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;P(a);a._bInitComplete||ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?S(c)(b):b}function qb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",
|
41 |
+
g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ga(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,P(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Oa(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",
|
42 |
+
c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ga(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ga(a);if("ssp"!=y(a)){xb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)yb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,
|
43 |
+
e[b].bSmart,e[b].bCaseInsensitive);zb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function zb(a){for(var b=n.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,m=c.length;i<m;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function yb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Pa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function xb(a,b,c,d,e,f){var d=Pa(b,
|
44 |
+
d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==n.ext.search.length&&(c=!0);j=Ab(a);if(0>=b.length)a.aiDisplay=g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Pa(a,b,c,d){a=b?a:Qa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',
|
45 |
+
"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function Ab(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=n.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);
|
46 |
+
h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Bb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Cb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function tb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Db,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",
|
47 |
+
b+"_info"));return d[0]}function Db(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Eb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Eb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,
|
48 |
+
c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ha(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){ob(a);lb(a);fa(a,a.aoHeader);fa(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Fa(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);T(a);e=
|
49 |
+
y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)O(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ha(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&$(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);r(a,null,"length",[a,c])}function pb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=
|
50 |
+
e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Ra(a,h(this).val());P(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===
|
51 |
+
c&&h("select",i).val(d)});return i[0]}function ub(a){var b=a.sPaginationType,c=n.ext.pager[b],d="function"===typeof c,e=function(a){P(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Na(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,
|
52 |
+
e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:K(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(r(a,null,"page",[a]),c&&P(a));return b}function rb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}
|
53 |
+
function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");r(a,null,"processing",[a,b])}function sb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),m=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",
|
54 |
+
position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",
|
55 |
+
{"class":f.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:la,sName:"scrolling"});return i[0]}function la(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,
|
56 |
+
f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,m=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),n=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,U=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),Q,L,R,w,Ua=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==
|
57 |
+
L&&a.scrollBarVis!==k)a.scrollBarVis=L,$(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();u&&(R=u.clone().prependTo(p),Q=u.find("tr"),R=R.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");L=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=aa(a,b);c.style.width=a.aoColumns[B].sWidth});u&&I(function(a){a.style.width=""},R);f=p.outerWidth();if(""===c){r.width="100%";if(U&&(p.find("tbody").height()>j.offsetHeight||
|
58 |
+
"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=v(d),f=p.outerWidth());I(C,L);I(function(a){z.push(a.innerHTML);Ua.push(v(h(a).css("width")))},L);I(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ua[b]},o);h(L).height(0);u&&(I(C,R),I(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},R),I(function(a,b){a.style.width=y[b]},Q),h(R).height(0));I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+z[b]+"</div>";a.childNodes[0].style.height=
|
59 |
+
"0";a.childNodes[0].style.overflow="hidden";a.style.width=Ua[b]},L);u&&I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+A[b]+"</div>";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},R);if(p.outerWidth()<f){Q=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(U&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(Q-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else Q="100%";q.width=v(Q);
|
60 |
+
g.width=v(Q);u&&(a.nScrollFoot.style.width=v(Q));!e&&U&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();m[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(n[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function I(a,b,c){for(var d=0,e=0,
|
61 |
+
f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Fa(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=ma(a,"bVisible"),m=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,n,o,p=a.oBrowser,d=p.bScrollOversize;(n=b.style.width)&&-1!==n.indexOf("%")&&(l=n);for(n=0;n<i.length;n++)o=c[i[n]],null!==o.sWidth&&(o.sWidth=Fb(o.sWidthOrig,k),t=!0);if(d||
|
62 |
+
!t&&!f&&!e&&j==V(a)&&j==m.length)for(n=0;n<j;n++)i=aa(a,n),null!==i&&(c[i].sWidth=v(m.eq(n).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");m=ra(a,j.find("thead")[0]);for(n=0;n<i.length;n++)o=c[i[n]],m[n].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?v(o.sWidthOrig):
|
63 |
+
"",o.sWidthOrig&&f&&h(m[n]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(n=0;n<i.length;n++)t=i[n],o=c[t],h(Gb(a,t)).clone(!1).append(o.sContentPadding).appendTo(s);h("[name]",j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):
|
64 |
+
l&&j.width(l);for(n=e=0;n<i.length;n++)k=h(m[n]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(m[n].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[n]].sWidth=v(k-g);b.style.width=v(e);o.remove()}l&&(b.style.width=v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,Oa(function(){$(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",v(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,
|
65 |
+
b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(Yb,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function X(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var m=[];f=function(a){a.length&&
|
66 |
+
!h.isArray(a[0])?m.push(a):h.merge(m,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<m.length;a++){i=m[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",m[a]._idx===k&&(m[a]._idx=h.inArray(m[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:m[a][1],index:m[a]._idx,type:j,formatter:n.ext.type.order[j+"-pre"]})}return d}function nb(a){var b,c,d=[],e=n.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ga(a);h=X(a);b=0;for(c=h.length;b<
|
67 |
+
c;b++)j=h[b],j.formatter&&g++,Ib(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,n=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=n[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,n=f[a]._aSortData,o=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=n[i.col],g=o[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],
|
68 |
+
c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=X(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,
|
69 |
+
b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==
|
70 |
+
typeof d&&d(a)}function Ma(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=X(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+
|
71 |
+
(2>e?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=n.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=n.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Bb(a.oPreviousSearch),
|
72 |
+
columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Bb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&
|
73 |
+
(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==k&&h.extend(a.oPreviousSearch,Cb(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Cb(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=
|
74 |
+
a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=n.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function K(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=n.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==
|
75 |
+
typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Xa(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).on("click.DT",b,function(b){h(a).blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",
|
76 |
+
function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=n.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===
|
77 |
+
typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Lb.numbers_length,d=Math.floor(c/2);b<=c?c=Y(0,b):a<=d?(c=Y(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=Y(b-(c-2),b):(c=Y(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function Da(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Ya)},"html-num":function(b){return za(b,
|
78 |
+
a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Ya)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Mb(a){return function(){var b=[ya(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[a].apply(this,b)}}var n=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};
|
79 |
+
this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&la(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,
|
80 |
+
b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():
|
81 |
+
c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};
|
82 |
+
this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();
|
83 |
+
(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in n.ext.internal)e&&(this[e]=Mb(e));this.each(function(){var e={},g=1<d?Xa(e,a,!0):a,j=0,i,e=this.getAttribute("id"),m=!1,l=n.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())K(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{fb(l);gb(l.column);J(l,l,!0);J(l.column,l.column,!0);J(l,h.extend(g,q.data()));var t=n.settings,
|
84 |
+
j=0;for(i=t.length;j<i;j++){var o=t[j];if(o.nTable==this||o.nTHead&&o.nTHead.parentNode==this||o.nTFoot&&o.nTFoot.parentNode==this){var s=g.bRetrieve!==k?g.bRetrieve:l.bRetrieve;if(c||s)return o.oInstance;if(g.bDestroy!==k?g.bDestroy:l.bDestroy){o.oInstance.fnDestroy();break}else{K(o,0,"Cannot reinitialise DataTable",3);return}}if(o.sTableId==this.id){t.splice(j,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+n.ext._unique++;var p=h.extend(!0,{},n.models.oSettings,{sDestroyWidth:q[0].style.width,
|
85 |
+
sInstance:e,sTableId:e});p.nTable=this;p.oApi=b.internal;p.oInit=g;t.push(p);p.oInstance=1===b.length?b:q.dataTable();fb(g);Ca(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=Xa(h.extend(!0,{},l),g);F(p.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(p,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod",
|
86 |
+
"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback");
|
87 |
+
z(p,"aoDrawCallback",g.fnDrawCallback,"user");z(p,"aoServerParams",g.fnServerParams,"user");z(p,"aoStateSaveParams",g.fnStateSaveParams,"user");z(p,"aoStateLoadParams",g.fnStateLoadParams,"user");z(p,"aoStateLoaded",g.fnStateLoaded,"user");z(p,"aoRowCallback",g.fnRowCallback,"user");z(p,"aoRowCreatedCallback",g.fnCreatedRow,"user");z(p,"aoHeaderCallback",g.fnHeaderCallback,"user");z(p,"aoFooterCallback",g.fnFooterCallback,"user");z(p,"aoInitComplete",g.fnInitComplete,"user");z(p,"aoPreDrawCallback",
|
88 |
+
g.fnPreDrawCallback,"user");p.rowIdFn=S(g.rowId);hb(p);var u=p.oClasses;h.extend(u,n.ext.classes,g.oClasses);q.addClass(u.sTable);p.iInitDisplayStart===k&&(p.iInitDisplayStart=g.iDisplayStart,p._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(p.bDeferLoading=!0,e=h.isArray(g.iDeferLoading),p._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,p._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=p.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Ca(a);
|
89 |
+
J(l.oLanguage,a);h.extend(true,v,a);ha(p)},error:function(){ha(p)}}),m=!0);null===g.asStripeClasses&&(p.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=p.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(ea(p.aoHeader,t[0]),e=ra(p));if(null===g.aoColumns){t=[];j=0;for(i=e.length;j<i;j++)t.push(null)}else t=
|
90 |
+
g.aoColumns;j=0;for(i=t.length;j<i;j++)Ea(p,e?e[j]:null);jb(p,g.aoColumnDefs,t,function(a,b){ka(p,a,b)});if(x.length){var w=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(x[0]).children("th, td").each(function(a,b){var c=p.aoColumns[a];if(c.mData===a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ka(p,a)}}})}var U=p.oFeatures,
|
91 |
+
e=function(){if(g.aaSorting===k){var a=p.aaSorting;j=0;for(i=a.length;j<i;j++)a[j][1]=p.aoColumns[j].asSorting[0]}wa(p);U.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=X(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});r(p,null,"order",[p,a,b]);Jb(p)}});z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||U.bDeferRender)&&wa(p)},"sc");var a=q.children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),b=q.children("thead");b.length===0&&(b=h("<thead/>").appendTo(q));
|
92 |
+
p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("<tbody/>").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("<tfoot/>").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);else if(b.length>0){p.nTFoot=b[0];ea(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j<g.aaData.length;j++)O(p,g.aaData[j]);else(p.bDeferLoading||y(p)=="dom")&&na(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice();
|
93 |
+
p.bInitialised=true;m===false&&ha(p)};g.bStateSave?(U.bStateSave=!0,z(p,"aoDrawCallback",xa,"state_save"),Kb(p,g,e)):e()}});b=null;return this},x,s,o,u,Za={},Nb=/[\r\n]/g,Aa=/<.*?>/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Ya=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Ob=function(a){var b=parseInt(a,10);return!isNaN(b)&&
|
94 |
+
isFinite(a)?b:null},Pb=function(a,b){Za[b]||(Za[b]=RegExp(Qa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Za[b],"."):a},$a=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Pb(a,b));c&&d&&(a=a.replace(Ya,""));return!isNaN(parseFloat(a))&&isFinite(a)},Qb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:$a(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<
|
95 |
+
f;e++)a[e]&&d.push(a[e][b]);return d},ja=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},Y=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Rb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},qa=function(a){var b;a:{if(!(2>a.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();
|
96 |
+
b=[];var e=a.length,f,g=0,d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};n.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}},escapeRegex:function(a){return a.replace($b,"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ca=/\[.*?\]$/,W=/\(\)$/,Qa=n.util.escapeRegex,va=h("<div>")[0],Wb=va.textContent!==k,Yb=
|
97 |
+
/<.*?>/g,Oa=n.util.throttle,Sb=[],w=Array.prototype,ac=function(a){var b,c,d=n.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof
|
98 |
+
s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=qa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};s.extend(this,this,Sb)};n.Api=s;h.extend(s.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=
|
99 |
+
this.context;return b.length>a?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new s(this.context,b)},flatten:function(){var a=[];return new s(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,j,h,m,l=this.context,
|
100 |
+
n,o,u=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(j=l.length;g<j;g++){var r=new s(l[g]);if("table"===b)f=c.call(r,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(r,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[g];"column-rows"===b&&(n=Ba(l[g],u.opts));h=0;for(m=o.length;h<m;h++)f=o[h],f="cell"===b?c.call(r,l[g],f.row,f.column,g,h):c.call(r,l[g],f,g,h,n),f!==k&&e.push(f)}}return e.length||d?(a=new s(l,a?
|
101 |
+
e.concat.apply([],e):e),b=a.selector,b.rows=u.rows,b.cols=u.cols,b.opts=u.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new s(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return ib(this,a,b,0,this.length,
|
102 |
+
1)},reduceRight:w.reduceRight||function(a,b){return ib(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,slice:function(){return new s(this.context,this)},sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new s(this.context,qa(this))},unshift:w.unshift});s.extend=function(a,b,c){if(c.length&&b&&(b instanceof s||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=
|
103 |
+
b.apply(a,arguments);s.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,s.extend(a,b[f.name],f.propExt)}};s.register=o=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)s.register(a[c],b);else for(var e=a.split("."),f=Sb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var m=f.length;i<m;i++)if(f[i].name===g){i=
|
104 |
+
f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};s.registerPlural=u=function(a,b,c){s.register(a,c);s.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof s?a.length?h.isArray(a[0])?new s(a.context,a[0]):a[0]:k:a})};o("tables()",function(a){var b;if(a){b=s;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,
|
105 |
+
d);return c[a]}).toArray();b=new b(a)}else b=this;return b});o("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new s(b[0]):a});u("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});u("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});u("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});u("tables().footer()",
|
106 |
+
"table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});u("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});o("draw()",function(a){return this.iterator("table",function(b){"page"===a?P(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});o("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});o("page.info()",function(){if(0===
|
107 |
+
this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});o("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:k:this.iterator("table",function(b){Ra(b,a)})});var Tb=function(a,b,c){if(c){var d=new s(a);
|
108 |
+
d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();sa(a,[],function(c){oa(a);for(var c=ta(a,c),d=0,e=c.length;d<e;d++)O(a,c[d]);T(a,b);C(a,!1)})}};o("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});o("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});o("ajax.reload()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});o("ajax.url()",function(a){var b=
|
109 |
+
this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});o("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});var ab=function(a,b,c,d,e){var f=[],g,j,i,m,l,n;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(m=b.length;i<m;i++){j=b[i]&&b[i].split&&!b[i].match(/[\[\(:]/)?b[i].split(","):
|
110 |
+
[b[i]];l=0;for(n=j.length;l<n;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=x.selector[a];if(a.length){i=0;for(m=a.length;i<m;i++)f=a[i](d,e,f)}return qa(f)},bb=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},cb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,
|
111 |
+
d,e,f=[],g=a.aiDisplay;e=a.aiDisplayMaster;var j=b.search;c=b.order;d=b.page;if("ssp"==y(a))return"removed"===j?[]:Y(0,e.length);if("current"==d){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==c||"applied"==c)if("none"==j)f=e.slice();else if("applied"==j)f=g.slice();else{if("removed"==j){var i={};c=0;for(d=g.length;c<d;c++)i[g[c]]=null;f=h.map(e,function(a){return!i.hasOwnProperty(a)?a:null})}}else if("index"==c||"original"==c){c=0;for(d=a.aoData.length;c<d;c++)"none"==
|
112 |
+
j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};o("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=b,f;return ab("row",a,function(a){var b=Ob(a),i=c.aoData;if(b!==null&&!e)return[b];f||(f=Ba(c,e));if(b!==null&&h.inArray(b,f)!==-1)return[b];if(a===null||a===k||a==="")return f;if(typeof a==="function")return h.map(f,function(b){var c=i[b];return a(b,c._aData,c.nTr)?b:null});if(a.nodeName){var b=
|
113 |
+
a._DT_RowIndex,m=a._DT_CellIndex;if(b!==k)return i[b]&&i[b].nTr===a?[b]:[];if(m)return i[m.row]&&i[m.row].nTr===a?[m.row]:[];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){b=c.aIds[a.replace(/^#/,"")];if(b!==k)return[b.idx]}b=Rb(ja(c.aoData,f,"nTr"));return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});o("rows().nodes()",function(){return this.iterator("row",
|
114 |
+
function(a,b){return a.aoData[b].nTr||k},1)});o("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ja(a.aoData,b,"_aData")},1)});u("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});u("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){da(b,c,a)})});u("rows().indexes()","row().index()",function(){return this.iterator("row",
|
115 |
+
function(a,b){return b},1)});u("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new s(c,b)});u("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,m,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(m=
|
116 |
+
l.length;i<m;i++)l[i]._DT_CellIndex.row=g}pa(b.aiDisplayMaster,c);pa(b.aiDisplay,c);pa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});o("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(na(b,c)[0]):h.push(O(b,c));return h},
|
117 |
+
1),c=this.rows(-1);c.pop();h.merge(c,b);return c});o("row()",function(a,b){return cb(this.rows(a,b))});o("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;var c=b[0].aoData[this[0]];c._aData=a;h.isArray(a)&&c.nTr.id&&N(b[0].rowId)(a,c.nTr.id);da(b[0],this[0],"data");return this});o("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});o("row.add()",function(a){a instanceof h&&
|
118 |
+
a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?na(b,a)[0]:O(b,a)});return this.row(b[0])});var db=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Ub=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new s(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");
|
119 |
+
0<D(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=V(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&db(f,c)}))}}};o("row().child()",function(a,b){var c=
|
120 |
+
this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)db(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=V(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);
|
121 |
+
c._detailsShow&&c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Ub(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Ub(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){db(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Vb=function(a,b,
|
122 |
+
c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};o("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return ab("column",e,function(a){var b=Ob(a);if(a==="")return Y(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Vb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc):
|
123 |
+
"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var n=h.map(g,function(a,b){return a.bVisible?b:null});return[n[n.length+b]]}return[aa(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},
|
124 |
+
1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Vb,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},
|
125 |
+
1)});u("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,
|
126 |
+
i,m,l;if(a!==k&&g.bVisible!==a){if(a){var n=h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(m=j.length;i<m;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[n]||null)}else h(D(b.aoData,"anCells",c)).detach();g.bVisible=a;fa(b,b.aoHeader);fa(b,b.aoFooter);b.aiDisplay.length||h(b.nTBody).find("td[colspan]").attr("colspan",V(b));xa(b)}});a!==k&&(this.iterator("column",function(c,e){r(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});u("columns().indexes()","column().index()",
|
127 |
+
function(a){return this.iterator("column",function(b,c){return"visible"===a?ba(b,c):c},1)});o("columns.adjust()",function(){return this.iterator("table",function(a){$(a)},1)});o("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return aa(c,b);if("fromData"===a||"toVisible"===a)return ba(c,b)}});o("column()",function(a,b){return cb(this.columns(a,b))});o("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));
|
128 |
+
h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=bb(c),f=b.aoData,g=Ba(b,e),j=Rb(ja(f,g,"anCells")),i=h([].concat.apply([],j)),l,m=b.aoColumns.length,n,o,u,s,r,v;return ab("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){n=[];o=0;for(u=g.length;o<u;o++){l=g[o];for(s=0;s<m;s++){r={row:l,column:s};if(c){v=f[l];a(r,B(b,l,s),v.anCells?v.anCells[s]:null)&&n.push(r)}else n.push(r)}}return n}if(h.isPlainObject(a))return a.column!==
|
129 |
+
k&&a.row!==k&&h.inArray(a.row,g)!==-1?[a]:[];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!a.nodeName)return c;v=h(a).closest("*[data-dt-row]");return v.length?[{row:v.data("dt-row"),column:v.data("dt-column")}]:[]},b,e)});var d=this.columns(b),e=this.rows(a),f,g,j,i,m;this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(m=d[b].length;i<m;i++)f.push({row:e[b][g],column:d[b][i]})}},1);var l=this.cells(f,
|
130 |
+
c);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});u("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:k},1)});o("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});u("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});u("cells().render()","cell().render()",
|
131 |
+
function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});u("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ba(a,c)}},1)});u("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){da(b,c,a,d)})});o("cell()",function(a,b,c){return cb(this.cells(a,b,c))});o("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],
|
132 |
+
c[0].row,c[0].column):k;kb(b[0],c[0].row,c[0].column,a);da(b[0],c[0].row,"data",c[0].column);return this});o("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});o("order.listener()",function(a,b,c){return this.iterator("table",function(d){Ma(d,a,b,c)})});o("order.fixed()",function(a){if(!a){var b=
|
133 |
+
this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});o(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});o("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&ga(e,
|
134 |
+
h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});u("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ga(e,e.oPreviousSearch,1))})});o("state()",function(){return this.context.length?this.context[0].oSavedState:
|
135 |
+
null});o("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});o("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});o("state.save()",function(){return this.iterator("table",function(a){xa(a)})});n.versionCheck=n.fnVersionCheck=function(a){for(var b=n.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};n.isDataTable=
|
136 |
+
n.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof n.Api)return!0;h.each(n.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};n.tables=n.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(n.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};n.camelToHungarian=J;o("$()",function(a,b){var c=
|
137 |
+
this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){oa(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a=
|
138 |
+
this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");
|
139 |
+
h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),
|
140 |
+
(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,n.settings);-1!==c&&n.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=S(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:
|
141 |
+
a._);return a.replace("%d",c)});n.version="1.10.19";n.settings=[];n.models={};n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,
|
142 |
+
sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,
|
143 |
+
bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+
|
144 |
+
a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
|
145 |
+
oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},
|
146 |
+
n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Z(n.defaults);n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};
|
147 |
+
Z(n.defaults.column);n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],
|
148 |
+
aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",
|
149 |
+
iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:
|
150 |
+
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{},
|
151 |
+
classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});
|
152 |
+
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
|
153 |
+
sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
|
154 |
+
sJUIHeader:"",sJUIFooter:""});var Lb=n.ext.pager;h.extend(Lb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e,
|
155 |
+
f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=
|
156 |
+
j.sNext;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":m=j.sLast;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:m=r+1;l=e===r?g.sPageButtonActive:""}if(m!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":n,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(m).appendTo(b);Wa(u,{action:r},v);n++}}}},s;try{s=h(b).find(H.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+
|
157 |
+
s+"]").focus()}}});h.extend(n.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||
|
158 |
+
"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(n.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," ").replace(Aa,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Pb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return M(a)?
|
159 |
+
"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});Da("");h.extend(!0,n.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:
|
160 |
+
c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]==
|
161 |
+
"asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var eb=function(a){return"string"===typeof a?a.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):a};n.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return eb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
|
162 |
+
a)+f+(e||"")}}},text:function(){return{display:eb,filter:eb}}};h.extend(n.ext.internal,{_fnExternApiFunc:Mb,_fnBuildAjax:sa,_fnAjaxUpdate:mb,_fnAjaxParameters:vb,_fnAjaxUpdateDraw:wb,_fnAjaxDataSrc:ta,_fnAddColumn:Ea,_fnColumnOptions:ka,_fnAdjustColumnSizing:$,_fnVisibleToColumnIndex:aa,_fnColumnIndexToVisible:ba,_fnVisbleColumns:V,_fnGetColumns:ma,_fnColumnTypes:Ga,_fnApplyColumnDefs:jb,_fnHungarianMap:Z,_fnCamelToHungarian:J,_fnLanguageCompat:Ca,_fnBrowserDetect:hb,_fnAddData:O,_fnAddTr:na,_fnNodeToDataIndex:function(a,
|
163 |
+
b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:kb,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:S,_fnSetObjectDataFn:N,_fnGetDataMaster:Ka,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:da,_fnGetRowElements:Ia,_fnCreateTr:Ha,_fnBuildHead:lb,_fnDrawHead:fa,_fnDraw:P,_fnReDraw:T,_fnAddOptionsHtml:ob,_fnDetectHeader:ea,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:qb,_fnFilterComplete:ga,_fnFilterCustom:zb,
|
164 |
+
_fnFilterColumn:yb,_fnFilter:xb,_fnFilterCreateSearch:Pa,_fnEscapeRegex:Qa,_fnFilterData:Ab,_fnFeatureHtmlInfo:tb,_fnUpdateInfo:Db,_fnInfoMacros:Eb,_fnInitialise:ha,_fnInitComplete:ua,_fnLengthChange:Ra,_fnFeatureHtmlLength:pb,_fnFeatureHtmlPaginate:ub,_fnPageChange:Ta,_fnFeatureHtmlProcessing:rb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:sb,_fnScrollDraw:la,_fnApplyToChildren:I,_fnCalculateColumnWidths:Fa,_fnThrottle:Oa,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:v,
|
165 |
+
_fnSortFlatten:X,_fnSort:nb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Ma,_fnSortingClasses:wa,_fnSortData:Ib,_fnSaveState:xa,_fnLoadState:Kb,_fnSettingsFromNode:ya,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Sa,_fnRenderer:Na,_fnDataSource:y,_fnRowAttributes:La,_fnExtend:Xa,_fnCalculateEnd:function(){}});h.fn.dataTable=n;n.$=h;h.fn.dataTableSettings=n.settings;h.fn.dataTableExt=n.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};
|
166 |
+
h.each(n,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
|
libraries/csstidy/data.inc.php
CHANGED
@@ -449,8 +449,26 @@ $data['csstidy']['all_properties']['font-stretch'] = 'CSS2.0,CSS3.0';
|
|
449 |
$data['csstidy']['all_properties']['font-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
450 |
$data['csstidy']['all_properties']['font-variant'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
451 |
$data['csstidy']['all_properties']['font-weight'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
$data['csstidy']['all_properties']['grid-columns'] = 'CSS3.0';
|
|
|
|
|
|
|
|
|
|
|
453 |
$data['csstidy']['all_properties']['grid-rows'] = 'CSS3.0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
$data['csstidy']['all_properties']['hanging-punctuation'] = 'CSS3.0';
|
455 |
$data['csstidy']['all_properties']['height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
456 |
$data['csstidy']['all_properties']['hyphenate-after'] = 'CSS3.0';
|
@@ -465,6 +483,8 @@ $data['csstidy']['all_properties']['image-rendering'] = 'CSS3.0';
|
|
465 |
$data['csstidy']['all_properties']['image-resolution'] = 'CSS3.0';
|
466 |
$data['csstidy']['all_properties']['inline-box-align'] = 'CSS3.0';
|
467 |
$data['csstidy']['all_properties']['justify-content'] = 'CSS3.0';
|
|
|
|
|
468 |
$data['csstidy']['all_properties']['left'] = 'CSS2.0,CSS2.1,CSS3.0';
|
469 |
$data['csstidy']['all_properties']['letter-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
470 |
$data['csstidy']['all_properties']['line-break'] = 'CSS3.0';
|
449 |
$data['csstidy']['all_properties']['font-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
450 |
$data['csstidy']['all_properties']['font-variant'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
451 |
$data['csstidy']['all_properties']['font-weight'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
452 |
+
$data['csstidy']['all_properties']['grid'] = 'CSS3.0';
|
453 |
+
$data['csstidy']['all_properties']['grid-area'] = 'CSS3.0';
|
454 |
+
$data['csstidy']['all_properties']['grid-auto-columns'] = 'CSS3.0';
|
455 |
+
$data['csstidy']['all_properties']['grid-auto-flow'] = 'CSS3.0';
|
456 |
+
$data['csstidy']['all_properties']['grid-auto-rows'] = 'CSS3.0';
|
457 |
+
$data['csstidy']['all_properties']['grid-column'] = 'CSS3.0';
|
458 |
$data['csstidy']['all_properties']['grid-columns'] = 'CSS3.0';
|
459 |
+
$data['csstidy']['all_properties']['grid-column-end'] = 'CSS3.0';
|
460 |
+
$data['csstidy']['all_properties']['grid-column-gap'] = 'CSS3.0';
|
461 |
+
$data['csstidy']['all_properties']['grid-column-start'] = 'CSS3.0';
|
462 |
+
$data['csstidy']['all_properties']['grid-gap'] = 'CSS3.0';
|
463 |
+
$data['csstidy']['all_properties']['grid-row'] = 'CSS3.0';
|
464 |
$data['csstidy']['all_properties']['grid-rows'] = 'CSS3.0';
|
465 |
+
$data['csstidy']['all_properties']['grid-row-end'] = 'CSS3.0';
|
466 |
+
$data['csstidy']['all_properties']['grid-row-gap'] = 'CSS3.0';
|
467 |
+
$data['csstidy']['all_properties']['grid-row-start'] = 'CSS3.0';
|
468 |
+
$data['csstidy']['all_properties']['grid-template'] = 'CSS3.0';
|
469 |
+
$data['csstidy']['all_properties']['grid-template-areas'] = 'CSS3.0';
|
470 |
+
$data['csstidy']['all_properties']['grid-template-columns'] = 'CSS3.0';
|
471 |
+
$data['csstidy']['all_properties']['grid-template-rows'] = 'CSS3.0';
|
472 |
$data['csstidy']['all_properties']['hanging-punctuation'] = 'CSS3.0';
|
473 |
$data['csstidy']['all_properties']['height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
474 |
$data['csstidy']['all_properties']['hyphenate-after'] = 'CSS3.0';
|
483 |
$data['csstidy']['all_properties']['image-resolution'] = 'CSS3.0';
|
484 |
$data['csstidy']['all_properties']['inline-box-align'] = 'CSS3.0';
|
485 |
$data['csstidy']['all_properties']['justify-content'] = 'CSS3.0';
|
486 |
+
$data['csstidy']['all_properties']['justify-items'] = 'CSS3.0';
|
487 |
+
$data['csstidy']['all_properties']['justify-self'] = 'CSS3.0';
|
488 |
$data['csstidy']['all_properties']['left'] = 'CSS2.0,CSS2.1,CSS3.0';
|
489 |
$data['csstidy']['all_properties']['letter-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
|
490 |
$data['csstidy']['all_properties']['line-break'] = 'CSS3.0';
|
libraries/simplexlsx.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Excel 2007-2013 Reader Class
|
4 |
*
|
5 |
-
* Based on SimpleXLSX v0.7.
|
6 |
* @link https://github.com/shuchkin/simplexlsx/
|
7 |
*
|
8 |
* @package TablePress
|
@@ -47,6 +47,14 @@ class SimpleXLSX {
|
|
47 |
*/
|
48 |
protected $sheets = array();
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
/**
|
51 |
* [$styles description]
|
52 |
*
|
@@ -202,17 +210,12 @@ class SimpleXLSX {
|
|
202 |
*
|
203 |
* @since 1.1.0
|
204 |
*
|
205 |
-
* @param [type] $
|
206 |
* @return string|bool [description]
|
207 |
*/
|
208 |
-
public function sheetName( $
|
209 |
-
if (
|
210 |
-
return
|
211 |
-
}
|
212 |
-
foreach ( $this->workbook->sheets->sheet as $s ) {
|
213 |
-
if ( 'rId' . $worksheet_id === $s->attributes( 'r', true )->id ) {
|
214 |
-
return (string) $s['name'];
|
215 |
-
}
|
216 |
}
|
217 |
return false;
|
218 |
}
|
@@ -225,11 +228,7 @@ class SimpleXLSX {
|
|
225 |
* @return array [description]
|
226 |
*/
|
227 |
public function sheetNames() {
|
228 |
-
$
|
229 |
-
foreach ( $this->workbook->sheets->sheet as $s ) {
|
230 |
-
$result[ substr( $s->attributes( 'r', true )->id, 3 ) ] = (string) $s['name'];
|
231 |
-
}
|
232 |
-
return $result;
|
233 |
}
|
234 |
|
235 |
/**
|
@@ -237,16 +236,12 @@ class SimpleXLSX {
|
|
237 |
*
|
238 |
* @since 1.1.0
|
239 |
*
|
240 |
-
* @param [type] $
|
241 |
* @return [type] [description]
|
242 |
*/
|
243 |
-
public function worksheet( $
|
244 |
-
if (
|
245 |
-
|
246 |
-
$worksheet_id = key( $this->sheets );
|
247 |
-
}
|
248 |
-
if ( isset( $this->sheets[ $worksheet_id ] ) ) {
|
249 |
-
$ws = $this->sheets[ $worksheet_id ];
|
250 |
if ( isset( $ws->hyperlinks ) ) {
|
251 |
$this->hyperlinks = array();
|
252 |
foreach ( $ws->hyperlinks->hyperlink as $hyperlink ) {
|
@@ -255,20 +250,22 @@ class SimpleXLSX {
|
|
255 |
}
|
256 |
return $ws;
|
257 |
}
|
258 |
-
$this->error( 'Worksheet ' . $
|
259 |
return false;
|
260 |
}
|
261 |
|
262 |
/**
|
263 |
* [dimension description]
|
264 |
*
|
|
|
|
|
265 |
* @since 1.1.0
|
266 |
*
|
267 |
-
* @param int $
|
268 |
* @return array|false [description]
|
269 |
*/
|
270 |
-
public function dimension( $
|
271 |
-
if ( false === ( $ws = $this->worksheet( $
|
272 |
return false;
|
273 |
}
|
274 |
|
@@ -295,20 +292,21 @@ class SimpleXLSX {
|
|
295 |
*
|
296 |
* @since 1.1.0
|
297 |
*
|
298 |
-
* @param int $
|
299 |
* @return array|bool [description]
|
300 |
*/
|
301 |
-
public function rows( $
|
302 |
-
if ( false === ( $ws = $this->worksheet( $
|
303 |
return false;
|
304 |
}
|
305 |
|
306 |
$rows = array();
|
307 |
$current_row = 0;
|
308 |
|
309 |
-
list( $cols, ) = $this->dimension( $
|
310 |
|
311 |
foreach ( $ws->sheetData->row as $row ) {
|
|
|
312 |
foreach ( $row->c as $c ) {
|
313 |
list( $current_cell, ) = $this->_columnIndex( (string) $c['r'] );
|
314 |
$rows[ $current_row ][ $current_cell ] = $this->value( $c );
|
@@ -329,23 +327,25 @@ class SimpleXLSX {
|
|
329 |
*
|
330 |
* @since 1.1.0
|
331 |
*
|
332 |
-
* @param int $
|
333 |
* @return array|bool [description]
|
334 |
*/
|
335 |
-
public function rowsEx( $
|
336 |
-
if ( false === ( $ws = $this->worksheet( $
|
337 |
return false;
|
338 |
}
|
339 |
|
340 |
$rows = array();
|
341 |
$current_row = 0;
|
342 |
-
list( $cols, ) = $this->dimension( $
|
343 |
|
344 |
foreach ( $ws->sheetData->row as $row ) {
|
|
|
345 |
foreach ( $row->c as $c ) {
|
346 |
-
|
347 |
$t = (string) $c['t'];
|
348 |
$s = (int) $c['s'];
|
|
|
349 |
if ( $s > 0 && isset( $this->workbook_cell_formats[ $s ] ) ) {
|
350 |
$format = $this->workbook_cell_formats[ $s ]['format'];
|
351 |
if ( false !== strpos( $format, 'm' ) ) {
|
@@ -357,11 +357,12 @@ class SimpleXLSX {
|
|
357 |
|
358 |
$rows[ $current_row ][ $current_cell ] = array(
|
359 |
'type' => $t,
|
360 |
-
'name' =>
|
361 |
'value' => $this->value( $c, $format ),
|
362 |
'href' => $this->href( $c ),
|
363 |
'f' => (string) $c->f,
|
364 |
'format' => $format,
|
|
|
365 |
);
|
366 |
}
|
367 |
for ( $i = 0; $i < $cols; $i++ ) {
|
@@ -378,6 +379,7 @@ class SimpleXLSX {
|
|
378 |
'href' => '',
|
379 |
'f' => '',
|
380 |
'format' => '',
|
|
|
381 |
);
|
382 |
}
|
383 |
}
|
@@ -614,45 +616,39 @@ class SimpleXLSX {
|
|
614 |
if ( strlen( $vZ ) !== (int) $aP['CS'] ) { // Check only if available.
|
615 |
$aI['E'] = 1;
|
616 |
$aI['EM'] = 'Compressed size is not equal with the value in header information.';
|
|
|
|
|
|
|
617 |
} else {
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
$vZ =
|
628 |
-
break;
|
629 |
-
case 12: // BZIP2
|
630 |
-
if ( extension_loaded( 'bz2' ) ) {
|
631 |
-
$vZ = bzdecompress( $vZ );
|
632 |
-
} else {
|
633 |
-
$aI['E'] = 7;
|
634 |
-
$aI['EM'] = 'PHP BZIP2 extension not available.';
|
635 |
-
}
|
636 |
-
break;
|
637 |
-
default:
|
638 |
-
$aI['E'] = 6;
|
639 |
-
$aI['EM'] = "De-/Compression method {$aP['CM']} is not supported.";
|
640 |
-
}
|
641 |
-
if ( ! $aI['E'] ) {
|
642 |
-
if ( false === $vZ ) {
|
643 |
-
$aI['E'] = 2;
|
644 |
-
$aI['EM'] = 'Decompression of data failed.';
|
645 |
} else {
|
646 |
-
|
647 |
-
|
648 |
-
$aI['EM'] = 'Uncompressed size is not equal with the value in header information.';
|
649 |
-
} else {
|
650 |
-
if ( crc32( $vZ ) !== $aP['CRC'] ) {
|
651 |
-
$aI['E'] = 4;
|
652 |
-
$aI['EM'] = 'CRC32 checksum is not equal with the value in header information.';
|
653 |
-
}
|
654 |
-
}
|
655 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
}
|
657 |
}
|
658 |
}
|
@@ -744,6 +740,12 @@ class SimpleXLSX {
|
|
744 |
*/
|
745 |
public function getEntryXML( $name ) {
|
746 |
if ( $entry_xml = $this->getEntryData( $name ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
747 |
// XML External Entity (XXE) Prevention.
|
748 |
$_old_value = libxml_disable_entity_loader( true );
|
749 |
$entry_xmlobj = simplexml_load_string( $entry_xml );
|
@@ -817,61 +819,71 @@ class SimpleXLSX {
|
|
817 |
// Read relations and search for officeDocument.
|
818 |
if ( $relations = $this->getEntryXML( '_rels/.rels' ) ) {
|
819 |
foreach ( $relations->Relationship as $rel ) {
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
830 |
}
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
if ( isset( $val->t ) ) {
|
839 |
-
$this->sharedstrings[] = (string) $val->t;
|
840 |
-
} elseif ( isset( $val->r ) ) {
|
841 |
-
$this->sharedstrings[] = $this->_parseRichText( $val );
|
842 |
-
}
|
843 |
}
|
844 |
}
|
845 |
-
}
|
846 |
-
|
|
|
847 |
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
}
|
853 |
}
|
|
|
854 |
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
}
|
868 |
-
$this->workbook_cell_formats[] = $v;
|
869 |
}
|
|
|
870 |
}
|
871 |
}
|
872 |
-
}
|
873 |
-
|
874 |
-
|
875 |
}
|
876 |
}
|
877 |
} // foreach
|
@@ -950,21 +962,24 @@ class SimpleXLSX {
|
|
950 |
*
|
951 |
* @since 1.8.1
|
952 |
*
|
953 |
-
* @param int $
|
954 |
* @param string $cell.
|
955 |
* @param null|int $format.
|
956 |
*
|
957 |
* @return mixed
|
958 |
*/
|
959 |
-
public function getCell( $
|
960 |
-
if ( false === ( $ws = $this->worksheet( $
|
961 |
return false;
|
962 |
}
|
963 |
|
964 |
-
list( $current_cell, $current_row ) = $this->_columnIndex( (string) $cell );
|
965 |
|
966 |
-
$
|
967 |
-
|
|
|
|
|
|
|
968 |
}
|
969 |
|
970 |
} // class SimpleXLSX
|
2 |
/**
|
3 |
* Excel 2007-2013 Reader Class
|
4 |
*
|
5 |
+
* Based on SimpleXLSX v0.7.13 by Sergey Schuchkin.
|
6 |
* @link https://github.com/shuchkin/simplexlsx/
|
7 |
*
|
8 |
* @package TablePress
|
47 |
*/
|
48 |
protected $sheets = array();
|
49 |
|
50 |
+
/**
|
51 |
+
* [$sheetNames description]
|
52 |
+
*
|
53 |
+
* @since 1.9.1
|
54 |
+
* @var array
|
55 |
+
*/
|
56 |
+
protected $sheetNames = array();
|
57 |
+
|
58 |
/**
|
59 |
* [$styles description]
|
60 |
*
|
210 |
*
|
211 |
* @since 1.1.0
|
212 |
*
|
213 |
+
* @param [type] $worksheet_index [description]
|
214 |
* @return string|bool [description]
|
215 |
*/
|
216 |
+
public function sheetName( $worksheet_index ) {
|
217 |
+
if ( isset( $this->sheetNames[ $worksheet_index ] ) ) {
|
218 |
+
return $this->sheetNames[ $worksheet_index ];
|
|
|
|
|
|
|
|
|
|
|
219 |
}
|
220 |
return false;
|
221 |
}
|
228 |
* @return array [description]
|
229 |
*/
|
230 |
public function sheetNames() {
|
231 |
+
return $this->sheetNames;
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
|
234 |
/**
|
236 |
*
|
237 |
* @since 1.1.0
|
238 |
*
|
239 |
+
* @param [type] $worksheet_index [description]. Optional.
|
240 |
* @return [type] [description]
|
241 |
*/
|
242 |
+
public function worksheet( $worksheet_index = 0 ) {
|
243 |
+
if ( isset( $this->sheets[ $worksheet_index ] ) ) {
|
244 |
+
$ws = $this->sheets[ $worksheet_index ];
|
|
|
|
|
|
|
|
|
245 |
if ( isset( $ws->hyperlinks ) ) {
|
246 |
$this->hyperlinks = array();
|
247 |
foreach ( $ws->hyperlinks->hyperlink as $hyperlink ) {
|
250 |
}
|
251 |
return $ws;
|
252 |
}
|
253 |
+
$this->error( 'Worksheet ' . $worksheet_index . ' not found.' );
|
254 |
return false;
|
255 |
}
|
256 |
|
257 |
/**
|
258 |
* [dimension description]
|
259 |
*
|
260 |
+
* "Don't trust ->dimension(), so xlsx generators very lazy and don't publish a dimension attribute."
|
261 |
+
*
|
262 |
* @since 1.1.0
|
263 |
*
|
264 |
+
* @param int $worksheet_index Optional. [description]
|
265 |
* @return array|false [description]
|
266 |
*/
|
267 |
+
public function dimension( $worksheet_index = 0 ) {
|
268 |
+
if ( false === ( $ws = $this->worksheet( $worksheet_index ) ) ) {
|
269 |
return false;
|
270 |
}
|
271 |
|
292 |
*
|
293 |
* @since 1.1.0
|
294 |
*
|
295 |
+
* @param int $worksheet_index Optional. [description]
|
296 |
* @return array|bool [description]
|
297 |
*/
|
298 |
+
public function rows( $worksheet_index = 0 ) {
|
299 |
+
if ( false === ( $ws = $this->worksheet( $worksheet_index ) ) ) {
|
300 |
return false;
|
301 |
}
|
302 |
|
303 |
$rows = array();
|
304 |
$current_row = 0;
|
305 |
|
306 |
+
list( $cols, ) = $this->dimension( $worksheet_index );
|
307 |
|
308 |
foreach ( $ws->sheetData->row as $row ) {
|
309 |
+
$rows[ $current_row ] = array();
|
310 |
foreach ( $row->c as $c ) {
|
311 |
list( $current_cell, ) = $this->_columnIndex( (string) $c['r'] );
|
312 |
$rows[ $current_row ][ $current_cell ] = $this->value( $c );
|
327 |
*
|
328 |
* @since 1.1.0
|
329 |
*
|
330 |
+
* @param int $worksheet_index Optional. [description]
|
331 |
* @return array|bool [description]
|
332 |
*/
|
333 |
+
public function rowsEx( $worksheet_index = 0 ) {
|
334 |
+
if ( false === ( $ws = $this->worksheet( $worksheet_index ) ) ) {
|
335 |
return false;
|
336 |
}
|
337 |
|
338 |
$rows = array();
|
339 |
$current_row = 0;
|
340 |
+
list( $cols, ) = $this->dimension( $worksheet_index );
|
341 |
|
342 |
foreach ( $ws->sheetData->row as $row ) {
|
343 |
+
$r_idx = (int) $row['r'];
|
344 |
foreach ( $row->c as $c ) {
|
345 |
+
$r = (string) $c['r'];
|
346 |
$t = (string) $c['t'];
|
347 |
$s = (int) $c['s'];
|
348 |
+
list( $current_cell, ) = $this->_columnIndex( $r );
|
349 |
if ( $s > 0 && isset( $this->workbook_cell_formats[ $s ] ) ) {
|
350 |
$format = $this->workbook_cell_formats[ $s ]['format'];
|
351 |
if ( false !== strpos( $format, 'm' ) ) {
|
357 |
|
358 |
$rows[ $current_row ][ $current_cell ] = array(
|
359 |
'type' => $t,
|
360 |
+
'name' => $r,
|
361 |
'value' => $this->value( $c, $format ),
|
362 |
'href' => $this->href( $c ),
|
363 |
'f' => (string) $c->f,
|
364 |
'format' => $format,
|
365 |
+
'r' => $r_idx,
|
366 |
);
|
367 |
}
|
368 |
for ( $i = 0; $i < $cols; $i++ ) {
|
379 |
'href' => '',
|
380 |
'f' => '',
|
381 |
'format' => '',
|
382 |
+
'r' => $r_idx,
|
383 |
);
|
384 |
}
|
385 |
}
|
616 |
if ( strlen( $vZ ) !== (int) $aP['CS'] ) { // Check only if available.
|
617 |
$aI['E'] = 1;
|
618 |
$aI['EM'] = 'Compressed size is not equal with the value in header information.';
|
619 |
+
} elseif ( $bE ) {
|
620 |
+
$aI['E'] = 5;
|
621 |
+
$aI['EM'] = 'File is encrypted, which is not supported by this class.';
|
622 |
} else {
|
623 |
+
switch ( $aP['CM'] ) {
|
624 |
+
case 0: // Stored
|
625 |
+
// Here is nothing to do, the file is flat.
|
626 |
+
break;
|
627 |
+
case 8: // Deflated
|
628 |
+
$vZ = gzinflate( $vZ );
|
629 |
+
break;
|
630 |
+
case 12: // BZIP2
|
631 |
+
if ( extension_loaded( 'bz2' ) ) {
|
632 |
+
$vZ = bzdecompress( $vZ );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
} else {
|
634 |
+
$aI['E'] = 7;
|
635 |
+
$aI['EM'] = 'PHP BZIP2 extension not available.';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
}
|
637 |
+
break;
|
638 |
+
default:
|
639 |
+
$aI['E'] = 6;
|
640 |
+
$aI['EM'] = "De-/Compression method {$aP['CM']} is not supported.";
|
641 |
+
}
|
642 |
+
if ( ! $aI['E'] ) {
|
643 |
+
if ( false === $vZ ) {
|
644 |
+
$aI['E'] = 2;
|
645 |
+
$aI['EM'] = 'Decompression of data failed.';
|
646 |
+
} elseif ( strlen( $vZ ) !== (int) $aP['UCS'] ) {
|
647 |
+
$aI['E'] = 3;
|
648 |
+
$aI['EM'] = 'Uncompressed size is not equal with the value in header information.';
|
649 |
+
} elseif ( crc32( $vZ ) !== $aP['CRC'] ) {
|
650 |
+
$aI['E'] = 4;
|
651 |
+
$aI['EM'] = 'CRC32 checksum is not equal with the value in header information.';
|
652 |
}
|
653 |
}
|
654 |
}
|
740 |
*/
|
741 |
public function getEntryXML( $name ) {
|
742 |
if ( $entry_xml = $this->getEntryData( $name ) ) {
|
743 |
+
// Remove dirty namespace prefixes.
|
744 |
+
$entry_xml = preg_replace( '/xmlns[^=]*="[^"]*"/i', '', $entry_xml ); // remove namespaces
|
745 |
+
$entry_xml = preg_replace( '/[a-zA-Z0-9]+:([a-zA-Z0-9]+="[^"]+")/', '$1$2', $entry_xml ); // remove namespaced attrs
|
746 |
+
$entry_xml = preg_replace( '/<[a-zA-Z0-9]+:([^>]+)>/', '<$1>', $entry_xml ); // fix namespaced opened tags
|
747 |
+
$entry_xml = preg_replace( '/<\/[a-zA-Z0-9]+:([^>]+)>/', '</$1>', $entry_xml ); // fix namespaced closed tags
|
748 |
+
|
749 |
// XML External Entity (XXE) Prevention.
|
750 |
$_old_value = libxml_disable_entity_loader( true );
|
751 |
$entry_xmlobj = simplexml_load_string( $entry_xml );
|
819 |
// Read relations and search for officeDocument.
|
820 |
if ( $relations = $this->getEntryXML( '_rels/.rels' ) ) {
|
821 |
foreach ( $relations->Relationship as $rel ) {
|
822 |
+
$rel_type = trim( (string) $rel['Type'] );
|
823 |
+
$rel_target = trim( (string) $rel['Target'] );
|
824 |
+
if ( self::SCHEMA_REL_OFFICEDOCUMENT === $rel_type && $this->workbook = $this->getEntryXML( $rel_target ) ) {
|
825 |
+
$index_rId = array(); // [0 => rId1]
|
826 |
+
|
827 |
+
$index = 0;
|
828 |
+
foreach ( $this->workbook->sheets->sheet as $s ) {
|
829 |
+
$this->sheetNames[ $index ] = (string) $s['name'];
|
830 |
+
$index_rId[ $index ] = (string) $s['id'];
|
831 |
+
$index++;
|
832 |
+
}
|
833 |
+
|
834 |
+
if ( $workbookRelations = $this->getEntryXML( dirname( $rel_target ) . '/_rels/workbook.xml.rels' ) ) {
|
835 |
+
// Loop relations for workbook and extract sheets.
|
836 |
+
foreach ( $workbookRelations->Relationship as $workbookRelation ) {
|
837 |
+
$wrel_type = trim( (string) $workbookRelation['Type'] );
|
838 |
+
$wrel_path = dirname( trim( (string) $rel['Target'] ) ) . '/' . trim( $workbookRelation['Target'] );
|
839 |
+
if ( ! $this->entryExists( $wrel_path ) ) {
|
840 |
+
continue;
|
841 |
+
}
|
842 |
+
if ( self::SCHEMA_REL_WORKSHEET === $wrel_type ) {
|
843 |
+
if ( $sheet = $this->getEntryXML( $wrel_path ) ) {
|
844 |
+
$index = array_search( (string) $workbookRelation['Id'], $index_rId, false );
|
845 |
+
$this->sheets[ $index ] = $sheet;
|
846 |
}
|
847 |
+
} elseif ( self::SCHEMA_REL_SHAREDSTRINGS === $wrel_type ) {
|
848 |
+
if ( $sharedStrings = $this->getEntryXML( $wrel_path ) ) {
|
849 |
+
foreach ( $sharedStrings->si as $val ) {
|
850 |
+
if ( isset( $val->t ) ) {
|
851 |
+
$this->sharedstrings[] = (string) $val->t;
|
852 |
+
} elseif ( isset( $val->r ) ) {
|
853 |
+
$this->sharedstrings[] = $this->_parseRichText( $val );
|
|
|
|
|
|
|
|
|
|
|
854 |
}
|
855 |
}
|
856 |
+
}
|
857 |
+
} elseif ( self::SCHEMA_REL_STYLES === $wrel_type ) {
|
858 |
+
$this->styles = $this->getEntryXML( $wrel_path );
|
859 |
|
860 |
+
$nf = array();
|
861 |
+
if ( null !== $this->styles->numFmts->numFmt ) {
|
862 |
+
foreach ( $this->styles->numFmts->numFmt as $v ) {
|
863 |
+
$nf[ (int) $v['numFmtId'] ] = (string) $v['formatCode'];
|
|
|
864 |
}
|
865 |
+
}
|
866 |
|
867 |
+
if ( null !== $this->styles->cellXfs->xf ) {
|
868 |
+
foreach ( $this->styles->cellXfs->xf as $v ) {
|
869 |
+
$v = (array) $v->attributes();
|
870 |
+
$v['format'] = '';
|
871 |
+
|
872 |
+
if ( isset( $v['@attributes']['numFmtId'] ) ) {
|
873 |
+
$v = $v['@attributes'];
|
874 |
+
$fid = (int) $v['numFmtId'];
|
875 |
+
if ( isset( self::$built_in_cell_formats[ $fid ] ) ) {
|
876 |
+
$v['format'] = self::$built_in_cell_formats[ $fid ];
|
877 |
+
} elseif ( isset( $nf[ $fid ] ) ) {
|
878 |
+
$v['format'] = $nf[ $fid ];
|
879 |
}
|
|
|
880 |
}
|
881 |
+
$this->workbook_cell_formats[] = $v;
|
882 |
}
|
883 |
}
|
884 |
+
}
|
885 |
+
} // foreach
|
886 |
+
break;
|
887 |
}
|
888 |
}
|
889 |
} // foreach
|
962 |
*
|
963 |
* @since 1.8.1
|
964 |
*
|
965 |
+
* @param int $worksheet_index.
|
966 |
* @param string $cell.
|
967 |
* @param null|int $format.
|
968 |
*
|
969 |
* @return mixed
|
970 |
*/
|
971 |
+
public function getCell( $worksheet_index = 0, $cell = 'A1', $format = null ) {
|
972 |
+
if ( false === ( $ws = $this->worksheet( $worksheet_index ) ) ) {
|
973 |
return false;
|
974 |
}
|
975 |
|
976 |
+
list( $current_cell, $current_row ) = is_array( $cell ) ? $cell : $this->_columnIndex( (string) $cell );
|
977 |
|
978 |
+
if ( isset( $ws->sheetData->row[ $current_row ], $ws->sheetData->row[ $current_row ]->c[ $current_cell ] ) ) {
|
979 |
+
$c = $ws->sheetData->row[ $current_row ]->c[ $current_cell ];
|
980 |
+
return $this->value( $c, $format );
|
981 |
+
}
|
982 |
+
return null;
|
983 |
}
|
984 |
|
985 |
} // class SimpleXLSX
|
models/model-table.php
CHANGED
@@ -237,7 +237,7 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
237 |
'post_title' => $table['name'],
|
238 |
// 'post_author' => $table['author'],
|
239 |
'post_excerpt' => $table['description'],
|
240 |
-
'post_content' => wp_json_encode( $table['data'] ),
|
241 |
'post_mime_type' => 'application/json',
|
242 |
);
|
243 |
|
@@ -1009,7 +1009,7 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
1009 |
* @return bool True on success, false on error.
|
1010 |
*/
|
1011 |
protected function _add_table_options( $post_id, array $options ) {
|
1012 |
-
$options = wp_json_encode( $options );
|
1013 |
return $this->model_post->add_meta_field( $post_id, $this->table_options_field_name, $options );
|
1014 |
}
|
1015 |
|
@@ -1023,7 +1023,7 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
1023 |
* @return bool True on success, false on error.
|
1024 |
*/
|
1025 |
protected function _update_table_options( $post_id, array $options ) {
|
1026 |
-
$options = wp_json_encode( $options );
|
1027 |
return $this->model_post->update_meta_field( $post_id, $this->table_options_field_name, $options );
|
1028 |
}
|
1029 |
|
@@ -1053,7 +1053,7 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
1053 |
* @return bool True on success, false on error.
|
1054 |
*/
|
1055 |
protected function _add_table_visibility( $post_id, array $visibility ) {
|
1056 |
-
$visibility = wp_json_encode( $visibility );
|
1057 |
return $this->model_post->add_meta_field( $post_id, $this->table_visibility_field_name, $visibility );
|
1058 |
}
|
1059 |
|
@@ -1067,7 +1067,7 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
1067 |
* @return bool True on success, false on error.
|
1068 |
*/
|
1069 |
protected function _update_table_visibility( $post_id, array $visibility ) {
|
1070 |
-
$visibility = wp_json_encode( $visibility );
|
1071 |
return $this->model_post->update_meta_field( $post_id, $this->table_visibility_field_name, $visibility );
|
1072 |
}
|
1073 |
|
237 |
'post_title' => $table['name'],
|
238 |
// 'post_author' => $table['author'],
|
239 |
'post_excerpt' => $table['description'],
|
240 |
+
'post_content' => wp_json_encode( $table['data'], TABLEPRESS_JSON_OPTIONS ),
|
241 |
'post_mime_type' => 'application/json',
|
242 |
);
|
243 |
|
1009 |
* @return bool True on success, false on error.
|
1010 |
*/
|
1011 |
protected function _add_table_options( $post_id, array $options ) {
|
1012 |
+
$options = wp_json_encode( $options, TABLEPRESS_JSON_OPTIONS );
|
1013 |
return $this->model_post->add_meta_field( $post_id, $this->table_options_field_name, $options );
|
1014 |
}
|
1015 |
|
1023 |
* @return bool True on success, false on error.
|
1024 |
*/
|
1025 |
protected function _update_table_options( $post_id, array $options ) {
|
1026 |
+
$options = wp_json_encode( $options, TABLEPRESS_JSON_OPTIONS );
|
1027 |
return $this->model_post->update_meta_field( $post_id, $this->table_options_field_name, $options );
|
1028 |
}
|
1029 |
|
1053 |
* @return bool True on success, false on error.
|
1054 |
*/
|
1055 |
protected function _add_table_visibility( $post_id, array $visibility ) {
|
1056 |
+
$visibility = wp_json_encode( $visibility, TABLEPRESS_JSON_OPTIONS );
|
1057 |
return $this->model_post->add_meta_field( $post_id, $this->table_visibility_field_name, $visibility );
|
1058 |
}
|
1059 |
|
1067 |
* @return bool True on success, false on error.
|
1068 |
*/
|
1069 |
protected function _update_table_visibility( $post_id, array $visibility ) {
|
1070 |
+
$visibility = wp_json_encode( $visibility, TABLEPRESS_JSON_OPTIONS );
|
1071 |
return $this->model_post->update_meta_field( $post_id, $this->table_visibility_field_name, $visibility );
|
1072 |
}
|
1073 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: TobiasBg
|
|
3 |
Donate link: https://tablepress.org/donate/
|
4 |
Tags: table,data,html,csv,excel
|
5 |
Requires at least: 4.9.1
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 1.9
|
8 |
License: GPLv2
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -99,6 +99,12 @@ You may use it free of charge for any purpose.
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
= Version 1.9 =
|
103 |
* Full compatibility with WordPress 4.9
|
104 |
* Feature: The "Custom CSS" text field highlights and notifies about CSS code syntax errors.
|
@@ -256,6 +262,9 @@ Initial version where most features are ready and pretty stable.
|
|
256 |
|
257 |
== Upgrade Notice ==
|
258 |
|
|
|
|
|
|
|
259 |
= 1.9 =
|
260 |
This update includes several new features, enhancements, and bugfixes. Updating is recommended.
|
261 |
|
3 |
Donate link: https://tablepress.org/donate/
|
4 |
Tags: table,data,html,csv,excel
|
5 |
Requires at least: 4.9.1
|
6 |
+
Tested up to: 4.9.8
|
7 |
+
Stable tag: 1.9.1
|
8 |
License: GPLv2
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= Version 1.9.1 =
|
103 |
+
* Enhancement: Improve accessibility on several admin screens (thanks to Boone Gorges).
|
104 |
+
* Enhancement: Update list of allowed CSS properties in "Custom CSS".
|
105 |
+
* Updated external libraries (DataTables, SimpleXLSX, CSSTidy, Build tools).
|
106 |
+
* Some internal changes for better stability, security, translations, and documentation.
|
107 |
+
|
108 |
= Version 1.9 =
|
109 |
* Full compatibility with WordPress 4.9
|
110 |
* Feature: The "Custom CSS" text field highlights and notifies about CSS code syntax errors.
|
262 |
|
263 |
== Upgrade Notice ==
|
264 |
|
265 |
+
= 1.9.1 =
|
266 |
+
This update is a stability, maintenance, and compatibility release. Updating is recommended.
|
267 |
+
|
268 |
= 1.9 =
|
269 |
This update includes several new features, enhancements, and bugfixes. Updating is recommended.
|
270 |
|
tablepress.php
CHANGED
@@ -4,14 +4,14 @@
|
|
4 |
*
|
5 |
* @package TablePress
|
6 |
* @author Tobias Bäthge
|
7 |
-
* @version 1.9
|
8 |
*/
|
9 |
|
10 |
/*
|
11 |
Plugin Name: TablePress
|
12 |
Plugin URI: https://tablepress.org/
|
13 |
Description: Embed beautiful and feature-rich tables into your posts and pages, without having to write code.
|
14 |
-
Version: 1.9
|
15 |
Author: Tobias Bäthge
|
16 |
Author URI: https://tobias.baethge.com/
|
17 |
Author email: wordpress@tobias.baethge.com
|
@@ -21,7 +21,7 @@ License: GPL 2
|
|
21 |
Donate URI: https://tablepress.org/donate/
|
22 |
*/
|
23 |
|
24 |
-
/* Copyright 2012-
|
25 |
|
26 |
This program is free software; you can redistribute it and/or modify
|
27 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -41,9 +41,30 @@ Donate URI: https://tablepress.org/donate/
|
|
41 |
defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
|
42 |
|
43 |
// Define certain plugin variables as constants.
|
44 |
-
|
45 |
-
define( '
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
/**
|
49 |
* Load TablePress class, which holds common functions and variables.
|
4 |
*
|
5 |
* @package TablePress
|
6 |
* @author Tobias Bäthge
|
7 |
+
* @version 1.9.1
|
8 |
*/
|
9 |
|
10 |
/*
|
11 |
Plugin Name: TablePress
|
12 |
Plugin URI: https://tablepress.org/
|
13 |
Description: Embed beautiful and feature-rich tables into your posts and pages, without having to write code.
|
14 |
+
Version: 1.9.1
|
15 |
Author: Tobias Bäthge
|
16 |
Author URI: https://tobias.baethge.com/
|
17 |
Author email: wordpress@tobias.baethge.com
|
21 |
Donate URI: https://tablepress.org/donate/
|
22 |
*/
|
23 |
|
24 |
+
/* Copyright 2012-2018 Tobias Bäthge
|
25 |
|
26 |
This program is free software; you can redistribute it and/or modify
|
27 |
it under the terms of the GNU General Public License, version 2, as
|
41 |
defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
|
42 |
|
43 |
// Define certain plugin variables as constants.
|
44 |
+
if ( ! defined( 'TABLEPRESS_ABSPATH' ) ) {
|
45 |
+
define( 'TABLEPRESS_ABSPATH', plugin_dir_path( __FILE__ ) );
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( ! defined( 'TABLEPRESS__FILE__' ) ) {
|
49 |
+
define( 'TABLEPRESS__FILE__', __FILE__ );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( ! defined( 'TABLEPRESS_BASENAME' ) ) {
|
53 |
+
define( 'TABLEPRESS_BASENAME', plugin_basename( TABLEPRESS__FILE__ ) );
|
54 |
+
}
|
55 |
+
|
56 |
+
/*
|
57 |
+
* Define global JSON encoding options that TablePress uses.
|
58 |
+
* We don't escape slashes (anymore), which makes search/replace of URLs in the database much easier.
|
59 |
+
*/
|
60 |
+
if ( ! defined( 'TABLEPRESS_JSON_OPTIONS' ) ) {
|
61 |
+
$tablepress_json_options = 0;
|
62 |
+
if ( defined( 'JSON_UNESCAPED_SLASHES' ) ) {
|
63 |
+
$tablepress_json_options |= JSON_UNESCAPED_SLASHES; // Introduced in PHP 5.4.
|
64 |
+
}
|
65 |
+
define( 'TABLEPRESS_JSON_OPTIONS', $tablepress_json_options );
|
66 |
+
unset( $tablepress_json_options );
|
67 |
+
}
|
68 |
|
69 |
/**
|
70 |
* Load TablePress class, which holds common functions and variables.
|
views/view-about.php
CHANGED
@@ -82,12 +82,13 @@ class TablePress_About_View extends TablePress_View {
|
|
82 |
<?php _e( 'This means that you either let the plugin create an empty table for you or that you load an existing table from either a CSV, HTML, JSON, XLS, or XLSX file.', 'tablepress' ); ?>
|
83 |
</p>
|
84 |
<p>
|
85 |
-
<?php _e( 'Then you can edit your data or change the structure of your table (e.g. by inserting, deleting, moving, or
|
86 |
<?php _e( 'To easily add a link or an image to a cell, use the provided buttons.', 'tablepress' ); ?>
|
87 |
-
<?php _e( 'Those will ask you for the necessary information and
|
88 |
</p>
|
89 |
<p>
|
90 |
-
|
|
|
91 |
<?php printf( __( 'You can also click the “%s” button in the editor toolbar to select and insert a table.', 'tablepress' ), __( 'Table', 'tablepress' ) ); ?>
|
92 |
</p>
|
93 |
<p>
|
82 |
<?php _e( 'This means that you either let the plugin create an empty table for you or that you load an existing table from either a CSV, HTML, JSON, XLS, or XLSX file.', 'tablepress' ); ?>
|
83 |
</p>
|
84 |
<p>
|
85 |
+
<?php _e( 'Then you can edit your data or change the structure of your table (e.g. by inserting, deleting, moving, or swapping rows or columns or sorting them) and select specific table features like alternating row colors or whether to print the name or description, if you want.', 'tablepress' ); ?>
|
86 |
<?php _e( 'To easily add a link or an image to a cell, use the provided buttons.', 'tablepress' ); ?>
|
87 |
+
<?php _e( 'Those will ask you for the necessary information and corresponding HTML code will be added to the cell automatically.', 'tablepress' ); ?>
|
88 |
</p>
|
89 |
<p>
|
90 |
+
<label class="screen-reader-text" for="table-shortcode-inline"><?php esc_html_e( 'Shortcode text for editor', 'tablepress' ); ?></label>
|
91 |
+
<?php printf( __( 'To insert a table into a page, post, or text widget, copy its Shortcode %s and paste it at the desired place in the editor.', 'tablepress' ), '<input type="text" class="table-shortcode table-shortcode-inline" id="table-shortcode-inline" value="' . esc_attr( '[' . TablePress::$shortcode . ' id=<ID> /]' ) . '" readonly="readonly" />' ); ?>
|
92 |
<?php printf( __( 'You can also click the “%s” button in the editor toolbar to select and insert a table.', 'tablepress' ), __( 'Table', 'tablepress' ) ); ?>
|
93 |
</p>
|
94 |
<p>
|
views/view-edit.php
CHANGED
@@ -211,7 +211,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
211 |
<table class="tablepress-postbox-table fixed">
|
212 |
<tbody>
|
213 |
<tr class="bottom-border">
|
214 |
-
<th class="column-1" scope="row"><label for="table-id"><?php _e( 'Table ID', 'tablepress' ); ?>:</label></th>
|
215 |
<td class="column-2">
|
216 |
<input type="hidden" name="table[id]" id="table-id" value="<?php echo esc_attr( $data['table']['id'] ); ?>" />
|
217 |
<input type="text" name="table[new_id]" id="table-new-id" value="<?php echo esc_attr( $data['table']['id'] ); ?>" title="<?php esc_attr_e( 'The Table ID can only consist of letters, numbers, hyphens (-), and underscores (_).', 'tablepress' ); ?>" pattern="[A-Za-z0-9-_]+" required <?php echo ( ! current_user_can( 'tablepress_edit_table_id', $data['table']['id'] ) ) ? 'readonly ' : ''; ?>/>
|
@@ -274,8 +274,8 @@ class TablePress_Edit_View extends TablePress_View {
|
|
274 |
<table id="edit-form" class="tablepress-edit-screen-id-<?php echo esc_attr( $data['table']['id'] ); ?>">
|
275 |
<thead>
|
276 |
<tr id="edit-form-head">
|
277 |
-
<th></th>
|
278 |
-
<th></th>
|
279 |
<?php
|
280 |
for ( $col_idx = 0; $col_idx < $columns; $col_idx++ ) {
|
281 |
$column_class = '';
|
@@ -283,10 +283,10 @@ class TablePress_Edit_View extends TablePress_View {
|
|
283 |
$column_class = ' column-hidden';
|
284 |
}
|
285 |
$column = TablePress::number_to_letter( $col_idx + 1 );
|
286 |
-
echo "\t\t\t<th class=\"head{$column_class}\"><span class=\"sort-control sort-desc hide-if-no-js\" title=\"" . esc_attr__( 'Sort descending', 'tablepress' ) . '"><span class="sorting-indicator"></span></span><span class="sort-control sort-asc hide-if-no-js" title="' . esc_attr__( 'Sort ascending', 'tablepress' ) . "\"><span class=\"sorting-indicator\"></span></span><span class=\"move-handle\">{$column}</span></th>\n";
|
287 |
}
|
288 |
?>
|
289 |
-
<th></th>
|
290 |
</tr>
|
291 |
</thead>
|
292 |
<tbody id="edit-form-body">
|
@@ -306,9 +306,10 @@ class TablePress_Edit_View extends TablePress_View {
|
|
306 |
$classes[] = 'row-hidden';
|
307 |
}
|
308 |
$row_class = ( ! empty( $classes ) ) ? ' class="' . implode( ' ', $classes ) . '"' : '';
|
|
|
309 |
echo "\t\t<tr{$row_class}>\n";
|
310 |
echo "\t\t\t<td><span class=\"move-handle\">{$row}</span></td>";
|
311 |
-
echo "<td><
|
312 |
foreach ( $row_data as $col_idx => $cell ) {
|
313 |
$column = TablePress::number_to_letter( $col_idx + 1 );
|
314 |
$column_class = '';
|
@@ -317,7 +318,8 @@ class TablePress_Edit_View extends TablePress_View {
|
|
317 |
}
|
318 |
// Sanitize, so that HTML is possible in table cells.
|
319 |
$cell = esc_textarea( $cell );
|
320 |
-
|
|
|
321 |
}
|
322 |
echo "<td><span class=\"move-handle\">{$row}</span></td>\n";
|
323 |
echo "\t\t</tr>\n";
|
@@ -326,19 +328,20 @@ class TablePress_Edit_View extends TablePress_View {
|
|
326 |
</tbody>
|
327 |
<tfoot>
|
328 |
<tr id="edit-form-foot">
|
329 |
-
<th></th>
|
330 |
-
<th></th>
|
331 |
<?php
|
332 |
for ( $col_idx = 0; $col_idx < $columns; $col_idx++ ) {
|
333 |
$column_class = '';
|
334 |
if ( 0 === $visibility['columns'][ $col_idx ] ) {
|
335 |
$column_class = ' class="column-hidden"';
|
336 |
}
|
337 |
-
|
|
|
338 |
echo "<input type=\"hidden\" class=\"visibility\" name=\"table[visibility][columns][]\" value=\"{$visibility['columns'][ $col_idx ]}\" /></th>\n";
|
339 |
}
|
340 |
?>
|
341 |
-
<th></th>
|
342 |
</tr>
|
343 |
</tfoot>
|
344 |
</table>
|
@@ -411,10 +414,10 @@ class TablePress_Edit_View extends TablePress_View {
|
|
411 |
</tr>
|
412 |
<tr class="top-border">
|
413 |
<td class="column-1">
|
414 |
-
|
415 |
</td>
|
416 |
<td class="column-2">
|
417 |
-
|
418 |
</td>
|
419 |
</tr>
|
420 |
</table>
|
@@ -487,6 +490,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
487 |
?>
|
488 |
<div class="hidden-container">
|
489 |
<div id="advanced-editor">
|
|
|
490 |
<?php
|
491 |
$wp_editor_options = array(
|
492 |
'textarea_rows' => 10,
|
@@ -539,24 +543,24 @@ class TablePress_Edit_View extends TablePress_View {
|
|
539 |
<td class="column-2"><label for="option-row-hover"><input type="checkbox" id="option-row-hover" name="table[options][row_hover]" value="true"<?php checked( $options['row_hover'] ); ?> /> <?php _e( 'Highlight a row while the mouse cursor hovers above it by changing its background color.', 'tablepress' ); ?></label></td>
|
540 |
</tr>
|
541 |
<tr class="top-border">
|
542 |
-
<th class="column-1" scope="row"><?php _e( 'Print Table Name', 'tablepress' );
|
543 |
<?php
|
544 |
$position_select = '<select id="option-print-name-position" name="table[options][print_name_position]">';
|
545 |
$position_select .= '<option' . selected( 'above', $options['print_name_position'], false ) . ' value="above">' . __( 'above', 'tablepress' ) . '</option>';
|
546 |
$position_select .= '<option' . selected( 'below', $options['print_name_position'], false ) . ' value="below">' . __( 'below', 'tablepress' ) . '</option>';
|
547 |
$position_select .= '</select>';
|
548 |
?>
|
549 |
-
<td class="column-2"><input type="checkbox" id="option-print-name" name="table[options][print_name]" value="true"<?php checked( $options['print_name'] ); ?> />
|
550 |
</tr>
|
551 |
<tr class="bottom-border">
|
552 |
-
<th class="column-1" scope="row"><?php _e( 'Print Table Description', 'tablepress' );
|
553 |
<?php
|
554 |
$position_select = '<select id="option-print-description-position" name="table[options][print_description_position]">';
|
555 |
$position_select .= '<option' . selected( 'above', $options['print_description_position'], false ) . ' value="above">' . __( 'above', 'tablepress' ) . '</option>';
|
556 |
$position_select .= '<option' . selected( 'below', $options['print_description_position'], false ) . ' value="below">' . __( 'below', 'tablepress' ) . '</option>';
|
557 |
$position_select .= '</select>';
|
558 |
?>
|
559 |
-
<td class="column-2"><input type="checkbox" id="option-print-description" name="table[options][print_description]" value="true"<?php checked( $options['print_description'] ); ?> />
|
560 |
</tr>
|
561 |
<tr class="top-border">
|
562 |
<th class="column-1" scope="row"><?php _e( 'Extra CSS Classes', 'tablepress' ); ?>:</th>
|
@@ -596,7 +600,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
596 |
<tr>
|
597 |
<th class="column-1" scope="row" style="vertical-align: top;"><?php _e( 'Pagination', 'tablepress' ); ?>:</th>
|
598 |
<td class="column-2"><label for="option-datatables-paginate"><input type="checkbox" id="option-datatables-paginate" name="table[options][datatables_paginate]" value="true"<?php checked( $options['datatables_paginate'] ); ?> /> <?php _e( 'Enable pagination of the table (viewing only a certain number of rows at a time) by the visitor.', 'tablepress' ); ?></label><br />
|
599 |
-
<label for="option-datatables-paginate_entries"
|
600 |
</tr>
|
601 |
<tr>
|
602 |
<th class="column-1" scope="row"><?php _e( 'Pagination Length Change', 'tablepress' ); ?>:</th>
|
@@ -615,7 +619,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
615 |
?>
|
616 |
<tr class="<?php echo current_user_can( 'unfiltered_html' ) ? 'top-border' : 'hidden'; ?>">
|
617 |
<th class="column-1" scope="row"><?php _e( 'Custom Commands', 'tablepress' ); ?>:</th>
|
618 |
-
<td class="column-2"><label for="option-datatables-custom-commands"><
|
619 |
</tr>
|
620 |
</tbody>
|
621 |
</table>
|
@@ -672,7 +676,8 @@ class TablePress_Edit_View extends TablePress_View {
|
|
672 |
<?php _e( 'For example, you can insert things like text, images, or links into the table, or change the used table features. You can also insert, delete, move, hide, and swap columns and rows.', 'tablepress' ); ?>
|
673 |
</p>
|
674 |
<p>
|
675 |
-
|
|
|
676 |
</p>
|
677 |
<?php
|
678 |
}
|
211 |
<table class="tablepress-postbox-table fixed">
|
212 |
<tbody>
|
213 |
<tr class="bottom-border">
|
214 |
+
<th class="column-1" scope="row"><label for="table-new-id"><?php _e( 'Table ID', 'tablepress' ); ?>:</label></th>
|
215 |
<td class="column-2">
|
216 |
<input type="hidden" name="table[id]" id="table-id" value="<?php echo esc_attr( $data['table']['id'] ); ?>" />
|
217 |
<input type="text" name="table[new_id]" id="table-new-id" value="<?php echo esc_attr( $data['table']['id'] ); ?>" title="<?php esc_attr_e( 'The Table ID can only consist of letters, numbers, hyphens (-), and underscores (_).', 'tablepress' ); ?>" pattern="[A-Za-z0-9-_]+" required <?php echo ( ! current_user_can( 'tablepress_edit_table_id', $data['table']['id'] ) ) ? 'readonly ' : ''; ?>/>
|
274 |
<table id="edit-form" class="tablepress-edit-screen-id-<?php echo esc_attr( $data['table']['id'] ); ?>">
|
275 |
<thead>
|
276 |
<tr id="edit-form-head">
|
277 |
+
<th scope="col"><span class="screen-reader-text"><?php esc_html_e( 'Row Number', 'tablepress' ); ?></span></th>
|
278 |
+
<th scope="col"><span class="screen-reader-text"><?php esc_html_e( 'Bulk action selectors for rows', 'tablepress' ); ?></span></th>
|
279 |
<?php
|
280 |
for ( $col_idx = 0; $col_idx < $columns; $col_idx++ ) {
|
281 |
$column_class = '';
|
283 |
$column_class = ' column-hidden';
|
284 |
}
|
285 |
$column = TablePress::number_to_letter( $col_idx + 1 );
|
286 |
+
echo "\t\t\t<th scope=\"col\" class=\"head{$column_class}\"><span class=\"sort-control sort-desc hide-if-no-js\" title=\"" . esc_attr__( 'Sort descending', 'tablepress' ) . '"><span class="sorting-indicator"></span></span><span class="sort-control sort-asc hide-if-no-js" title="' . esc_attr__( 'Sort ascending', 'tablepress' ) . "\"><span class=\"sorting-indicator\"></span></span><span class=\"move-handle\">{$column}</span></th>\n";
|
287 |
}
|
288 |
?>
|
289 |
+
<th scope="col"><span class="screen-reader-text"><?php esc_html_e( 'Row Number', 'tablepress' ); ?></span></th>
|
290 |
</tr>
|
291 |
</thead>
|
292 |
<tbody id="edit-form-body">
|
306 |
$classes[] = 'row-hidden';
|
307 |
}
|
308 |
$row_class = ( ! empty( $classes ) ) ? ' class="' . implode( ' ', $classes ) . '"' : '';
|
309 |
+
$row_selector_text = esc_html( sprintf( __( 'Bulk action selector for row %s', 'tablepress' ), number_format_i18n( $row ) ) );
|
310 |
echo "\t\t<tr{$row_class}>\n";
|
311 |
echo "\t\t\t<td><span class=\"move-handle\">{$row}</span></td>";
|
312 |
+
echo "<td><label class=\"hide-if-no-js\"><span class=\"screen-reader-text\">{$row_selector_text}</span><input type=\"checkbox\" /><input type=\"hidden\" class=\"visibility\" name=\"table[visibility][rows][]\" value=\"{$visibility['rows'][ $row_idx ]}\" /></label></td>";
|
313 |
foreach ( $row_data as $col_idx => $cell ) {
|
314 |
$column = TablePress::number_to_letter( $col_idx + 1 );
|
315 |
$column_class = '';
|
318 |
}
|
319 |
// Sanitize, so that HTML is possible in table cells.
|
320 |
$cell = esc_textarea( $cell );
|
321 |
+
$cell_label = esc_html( sprintf( __( 'Column %1$s, Row %2$s', 'tablepress' ), number_format_i18n( $col_idx + 1 ), number_format_i18n( $row ) ) );
|
322 |
+
echo "<td{$column_class}><label for=\"cell-{$column}{$row}\"><span class=\"screen-reader-text\">{$cell_label}</span></label><textarea name=\"table[data][{$row_idx}][{$col_idx}]\" id=\"cell-{$column}{$row}\" rows=\"1\">{$cell}</textarea></td>";
|
323 |
}
|
324 |
echo "<td><span class=\"move-handle\">{$row}</span></td>\n";
|
325 |
echo "\t\t</tr>\n";
|
328 |
</tbody>
|
329 |
<tfoot>
|
330 |
<tr id="edit-form-foot">
|
331 |
+
<th scope="col"><span class="screen-reader-text"><?php esc_html_e( 'Row Number', 'tablepress' ); ?></span></th>
|
332 |
+
<th scope="col"><span class="screen-reader-text"><?php esc_html_e( 'Bulk action selectors for rows', 'tablepress' ); ?></span></th>
|
333 |
<?php
|
334 |
for ( $col_idx = 0; $col_idx < $columns; $col_idx++ ) {
|
335 |
$column_class = '';
|
336 |
if ( 0 === $visibility['columns'][ $col_idx ] ) {
|
337 |
$column_class = ' class="column-hidden"';
|
338 |
}
|
339 |
+
$column_selector_text = esc_html( sprintf( __( 'Bulk action selector for column %s', 'tablepress' ), TablePress::number_to_letter( $col_idx + 1 ) ) );
|
340 |
+
echo "\t\t\t<th scope=\"col\" {$column_class}><label class=\"hide-if-no-js\"><span class=\"screen-reader-text\">{$column_selector_text}</span><input type=\"checkbox\" /></label>";
|
341 |
echo "<input type=\"hidden\" class=\"visibility\" name=\"table[visibility][columns][]\" value=\"{$visibility['columns'][ $col_idx ]}\" /></th>\n";
|
342 |
}
|
343 |
?>
|
344 |
+
<th scope="col"><span class="screen-reader-text"><?php esc_html_e( 'Row Number', 'tablepress' ); ?></span></th>
|
345 |
</tr>
|
346 |
</tfoot>
|
347 |
</table>
|
414 |
</tr>
|
415 |
<tr class="top-border">
|
416 |
<td class="column-1">
|
417 |
+
<label><?php printf( __( 'Add %s row(s)', 'tablepress' ), '<input type="number" id="rows-append-number" class="small-text numbers-only" title="' . esc_attr__( 'This field must contain a positive number.', 'tablepress' ) . '" value="1" min="1" max="99999" maxlength="5" required />' ); ?></label> <input type="button" class="button" id="rows-append" value="<?php esc_attr_e( 'Add', 'tablepress' ); ?>" />
|
418 |
</td>
|
419 |
<td class="column-2">
|
420 |
+
<label><?php printf( __( 'Add %s column(s)', 'tablepress' ), '<input type="number" id="columns-append-number" class="small-text numbers-only" title="' . esc_attr__( 'This field must contain a positive number.', 'tablepress' ) . '" value="1" min="1" max="99999" maxlength="5" required />' ); ?></label> <input type="button" class="button" id="columns-append" value="<?php esc_attr_e( 'Add', 'tablepress' ); ?>" />
|
421 |
</td>
|
422 |
</tr>
|
423 |
</table>
|
490 |
?>
|
491 |
<div class="hidden-container">
|
492 |
<div id="advanced-editor">
|
493 |
+
<label for="advanced-editor-content" class="screen-reader-text"><?php esc_html_e( 'Advanced Editor', 'tablepress' ); ?></label>
|
494 |
<?php
|
495 |
$wp_editor_options = array(
|
496 |
'textarea_rows' => 10,
|
543 |
<td class="column-2"><label for="option-row-hover"><input type="checkbox" id="option-row-hover" name="table[options][row_hover]" value="true"<?php checked( $options['row_hover'] ); ?> /> <?php _e( 'Highlight a row while the mouse cursor hovers above it by changing its background color.', 'tablepress' ); ?></label></td>
|
544 |
</tr>
|
545 |
<tr class="top-border">
|
546 |
+
<th class="column-1" scope="row"><label for="option-print-name"><?php _e( 'Print Table Name', 'tablepress' ); ?></label>:</th>
|
547 |
<?php
|
548 |
$position_select = '<select id="option-print-name-position" name="table[options][print_name_position]">';
|
549 |
$position_select .= '<option' . selected( 'above', $options['print_name_position'], false ) . ' value="above">' . __( 'above', 'tablepress' ) . '</option>';
|
550 |
$position_select .= '<option' . selected( 'below', $options['print_name_position'], false ) . ' value="below">' . __( 'below', 'tablepress' ) . '</option>';
|
551 |
$position_select .= '</select>';
|
552 |
?>
|
553 |
+
<td class="column-2"><input type="checkbox" id="option-print-name" name="table[options][print_name]" value="true"<?php checked( $options['print_name'] ); ?> /> <label><?php printf( __( 'Show the table name %s the table.', 'tablepress' ), $position_select ); ?></label></td>
|
554 |
</tr>
|
555 |
<tr class="bottom-border">
|
556 |
+
<th class="column-1" scope="row"><label for="option-print-description"><?php _e( 'Print Table Description', 'tablepress' ); ?></label>:</th>
|
557 |
<?php
|
558 |
$position_select = '<select id="option-print-description-position" name="table[options][print_description_position]">';
|
559 |
$position_select .= '<option' . selected( 'above', $options['print_description_position'], false ) . ' value="above">' . __( 'above', 'tablepress' ) . '</option>';
|
560 |
$position_select .= '<option' . selected( 'below', $options['print_description_position'], false ) . ' value="below">' . __( 'below', 'tablepress' ) . '</option>';
|
561 |
$position_select .= '</select>';
|
562 |
?>
|
563 |
+
<td class="column-2"><input type="checkbox" id="option-print-description" name="table[options][print_description]" value="true"<?php checked( $options['print_description'] ); ?> /> <label><?php printf( __( 'Show the table description %s the table.', 'tablepress' ), $position_select ); ?></label></td>
|
564 |
</tr>
|
565 |
<tr class="top-border">
|
566 |
<th class="column-1" scope="row"><?php _e( 'Extra CSS Classes', 'tablepress' ); ?>:</th>
|
600 |
<tr>
|
601 |
<th class="column-1" scope="row" style="vertical-align: top;"><?php _e( 'Pagination', 'tablepress' ); ?>:</th>
|
602 |
<td class="column-2"><label for="option-datatables-paginate"><input type="checkbox" id="option-datatables-paginate" name="table[options][datatables_paginate]" value="true"<?php checked( $options['datatables_paginate'] ); ?> /> <?php _e( 'Enable pagination of the table (viewing only a certain number of rows at a time) by the visitor.', 'tablepress' ); ?></label><br />
|
603 |
+
<label for="option-datatables-paginate_entries" class="checkbox-left"><?php printf( __( 'Show %s rows per page.', 'tablepress' ), '<input type="number" id="option-datatables-paginate_entries" name="table[options][datatables_paginate_entries]" value="' . intval( $options['datatables_paginate_entries'] ) . '" min="1" max="99999" maxlength="5" required />' ); ?></label></td>
|
604 |
</tr>
|
605 |
<tr>
|
606 |
<th class="column-1" scope="row"><?php _e( 'Pagination Length Change', 'tablepress' ); ?>:</th>
|
619 |
?>
|
620 |
<tr class="<?php echo current_user_can( 'unfiltered_html' ) ? 'top-border' : 'hidden'; ?>">
|
621 |
<th class="column-1" scope="row"><?php _e( 'Custom Commands', 'tablepress' ); ?>:</th>
|
622 |
+
<td class="column-2"><label for="option-datatables-custom-commands"><textarea id="option-datatables-custom-commands" class="large-text" name="table[options][datatables_custom_commands]" rows="1"><?php echo esc_textarea( $options['datatables_custom_commands'] ); ?></textarea><p class="description"><?php echo sprintf( __( 'Additional parameters from the <a href="%s">DataTables documentation</a> to be added to the JS call.', 'tablepress' ), 'https://www.datatables.net/' ) . ' ' . __( 'For advanced use only.', 'tablepress' ); ?></p></label></td>
|
623 |
</tr>
|
624 |
</tbody>
|
625 |
</table>
|
676 |
<?php _e( 'For example, you can insert things like text, images, or links into the table, or change the used table features. You can also insert, delete, move, hide, and swap columns and rows.', 'tablepress' ); ?>
|
677 |
</p>
|
678 |
<p>
|
679 |
+
<label class="screen-reader-only" for="table-shortcode-inline"><?php esc_html_e( 'Shortcode text for editor', 'tablepress' ); ?></label>
|
680 |
+
<?php printf( __( 'To insert the table into a page, post, or text widget, copy the Shortcode %s and paste it at the desired place in the editor.', 'tablepress' ), '<input type="text" id="table-shortcode-inline" class="table-shortcode table-shortcode-inline" value="' . esc_attr( '[' . TablePress::$shortcode . " id={$data['table']['id']} /]" ) . '" readonly="readonly" />' ); ?>
|
681 |
</p>
|
682 |
<?php
|
683 |
}
|
views/view-editor_button_thickbox.php
CHANGED
@@ -428,7 +428,7 @@ class TablePress_Editor_Button_Thickbox_List_Table extends WP_List_Table {
|
|
428 |
static $term, $json_encoded_term;
|
429 |
if ( is_null( $term ) || is_null( $json_encoded_term ) ) {
|
430 |
$term = wp_unslash( $_GET['s'] );
|
431 |
-
$json_encoded_term = substr( wp_json_encode( $term ), 1, -1 );
|
432 |
}
|
433 |
|
434 |
// Load table again, with table data, but without options and visibility settings.
|
@@ -444,7 +444,7 @@ class TablePress_Editor_Button_Thickbox_List_Table extends WP_List_Table {
|
|
444 |
|| false !== stripos( $item['description'], $term )
|
445 |
|| false !== stripos( TablePress::get_user_display_name( $item['author'] ), $term )
|
446 |
|| false !== stripos( TablePress::format_datetime( $item['last_modified'], 'mysql', ' ' ), $term )
|
447 |
-
|| false !== stripos( wp_json_encode( $item['data'] ), $json_encoded_term ) ) {
|
448 |
return true;
|
449 |
}
|
450 |
|
428 |
static $term, $json_encoded_term;
|
429 |
if ( is_null( $term ) || is_null( $json_encoded_term ) ) {
|
430 |
$term = wp_unslash( $_GET['s'] );
|
431 |
+
$json_encoded_term = substr( wp_json_encode( $term, TABLEPRESS_JSON_OPTIONS ), 1, -1 );
|
432 |
}
|
433 |
|
434 |
// Load table again, with table data, but without options and visibility settings.
|
444 |
|| false !== stripos( $item['description'], $term )
|
445 |
|| false !== stripos( TablePress::get_user_display_name( $item['author'] ), $term )
|
446 |
|| false !== stripos( TablePress::format_datetime( $item['last_modified'], 'mysql', ' ' ), $term )
|
447 |
+
|| false !== stripos( wp_json_encode( $item['data'], TABLEPRESS_JSON_OPTIONS ), $json_encoded_term ) ) {
|
448 |
return true;
|
449 |
}
|
450 |
|
views/view-import.php
CHANGED
@@ -123,14 +123,14 @@ class TablePress_Import_View extends TablePress_View {
|
|
123 |
<table class="tablepress-postbox-table fixed">
|
124 |
<tbody>
|
125 |
<tr id="row-import-source">
|
126 |
-
<th class="column-1" scope="row"><?php _e( 'Import Source', 'tablepress' ); ?>:</th>
|
127 |
<td class="column-2">
|
128 |
-
<label for="tables-import-source-file-upload"><input name="import[source]" id="tables-import-source-file-upload" type="radio" value="file-upload"<?php checked( $data['import_source'], 'file-upload', true ); ?> /> <?php _e( 'File Upload', 'tablepress' ); ?></label>
|
129 |
-
<label for="tables-import-source-url"><input name="import[source]" id="tables-import-source-url" type="radio" value="url"<?php checked( $data['import_source'], 'url', true ); ?> /> <?php _e( 'URL', 'tablepress' ); ?></label>
|
130 |
<?php if ( ( ! is_multisite() && current_user_can( 'manage_options' ) ) || is_super_admin() ) { ?>
|
131 |
-
<label for="tables-import-source-server"><input name="import[source]" id="tables-import-source-server" type="radio" value="server"<?php checked( $data['import_source'], 'server', true ); ?> /> <?php _e( 'File on server', 'tablepress' ); ?></label>
|
132 |
<?php } ?>
|
133 |
-
<label for="tables-import-source-form-field"><input name="import[source]" id="tables-import-source-form-field" type="radio" value="form-field"<?php checked( $data['import_source'], 'form-field', true ); ?> /> <?php _e( 'Manual Input', 'tablepress' ); ?></label>
|
134 |
</td>
|
135 |
</tr>
|
136 |
<tr id="row-import-source-file-upload" class="bottom-border">
|
@@ -193,11 +193,11 @@ class TablePress_Import_View extends TablePress_View {
|
|
193 |
</td>
|
194 |
</tr>
|
195 |
<tr id="row-import-type" class="top-border">
|
196 |
-
<th class="column-1" scope="row"><?php _e( 'Add, Replace, or Append?', 'tablepress' ); ?>:</th>
|
197 |
<td class="column-2">
|
198 |
-
<label for="tables-import-type-add"><input name="import[type]" id="tables-import-type-add" type="radio" value="add"<?php checked( $data['import_type'], 'add', true ); ?> /> <?php _e( 'Add as new table', 'tablepress' ); ?></label>
|
199 |
-
<label for="tables-import-type-replace"><input name="import[type]" id="tables-import-type-replace" type="radio" value="replace"<?php checked( $data['import_type'], 'replace', true ); ?><?php disabled( $data['tables_count'] > 0, false, true ); ?> /> <?php _e( 'Replace existing table', 'tablepress' ); ?></label>
|
200 |
-
<label for="tables-import-type-append"><input name="import[type]" id="tables-import-type-append" type="radio" value="append"<?php checked( $data['import_type'], 'append', true ); ?><?php disabled( $data['tables_count'] > 0, false, true ); ?> /> <?php _e( 'Append rows to existing table', 'tablepress' ); ?></label>
|
201 |
</td>
|
202 |
</tr>
|
203 |
<tr id="row-import-existing-table" class="bottom-border">
|
@@ -223,7 +223,7 @@ class TablePress_Import_View extends TablePress_View {
|
|
223 |
</td>
|
224 |
</tr>
|
225 |
<tr class="top-border">
|
226 |
-
<
|
227 |
<td class="column-2"><input type="submit" value="<?php echo esc_attr_x( 'Import', 'button', 'tablepress' ); ?>" class="button button-primary button-large" name="submit" /></td>
|
228 |
</tr>
|
229 |
</tbody>
|
@@ -268,7 +268,7 @@ class TablePress_Import_View extends TablePress_View {
|
|
268 |
</td>
|
269 |
</tr>
|
270 |
<tr id="row-import-wp-table-reloaded-source-db" class="bottom-border">
|
271 |
-
<
|
272 |
<td class="column-2" style="padding:2px;"></td>
|
273 |
</tr>
|
274 |
<tr class="top-border">
|
@@ -280,7 +280,7 @@ class TablePress_Import_View extends TablePress_View {
|
|
280 |
<td class="column-2"><label for="import-wp-table-reloaded-css"> <input type="checkbox" id="import-wp-table-reloaded-css" name="import[wp_table_reloaded][css]" value="true" checked="checked" /> <?php _e( 'Try to automatically convert the “Custom CSS” code from the “Plugin Options” screen of WP-Table Reloaded.', 'tablepress' ); ?></label></td>
|
281 |
</tr>
|
282 |
<tr class="top-border">
|
283 |
-
<
|
284 |
<td class="column-2"><input type="submit" value="<?php echo esc_attr_x( 'Import from WP-Table Reloaded', 'button', 'tablepress' ); ?>" class="button button-large" id="submit_wp_table_reloaded_import" name="submit_wp_table_reloaded_import" /></td>
|
285 |
</tr>
|
286 |
</tbody>
|
123 |
<table class="tablepress-postbox-table fixed">
|
124 |
<tbody>
|
125 |
<tr id="row-import-source">
|
126 |
+
<th class="column-1" scope="row" id="import-source-header"><?php _e( 'Import Source', 'tablepress' ); ?>:</th>
|
127 |
<td class="column-2">
|
128 |
+
<label for="tables-import-source-file-upload"><input name="import[source]" id="tables-import-source-file-upload" type="radio" aria-labelledby="import-source-header" value="file-upload"<?php checked( $data['import_source'], 'file-upload', true ); ?> /> <?php _e( 'File Upload', 'tablepress' ); ?></label>
|
129 |
+
<label for="tables-import-source-url"><input name="import[source]" id="tables-import-source-url" type="radio" aria-labelledby="import-source-header" value="url"<?php checked( $data['import_source'], 'url', true ); ?> /> <?php _e( 'URL', 'tablepress' ); ?></label>
|
130 |
<?php if ( ( ! is_multisite() && current_user_can( 'manage_options' ) ) || is_super_admin() ) { ?>
|
131 |
+
<label for="tables-import-source-server"><input name="import[source]" id="tables-import-source-server" type="radio" aria-labelledby="import-source-header" value="server"<?php checked( $data['import_source'], 'server', true ); ?> /> <?php _e( 'File on server', 'tablepress' ); ?></label>
|
132 |
<?php } ?>
|
133 |
+
<label for="tables-import-source-form-field"><input name="import[source]" id="tables-import-source-form-field" type="radio" aria-labelledby="import-source-header" value="form-field"<?php checked( $data['import_source'], 'form-field', true ); ?> /> <?php _e( 'Manual Input', 'tablepress' ); ?></label>
|
134 |
</td>
|
135 |
</tr>
|
136 |
<tr id="row-import-source-file-upload" class="bottom-border">
|
193 |
</td>
|
194 |
</tr>
|
195 |
<tr id="row-import-type" class="top-border">
|
196 |
+
<th class="column-1" scope="row" id="import-type-header"><?php _e( 'Add, Replace, or Append?', 'tablepress' ); ?>:</th>
|
197 |
<td class="column-2">
|
198 |
+
<label for="tables-import-type-add"><input name="import[type]" id="tables-import-type-add" type="radio" aria-labelledby="import-type-header" value="add"<?php checked( $data['import_type'], 'add', true ); ?> /> <?php _e( 'Add as new table', 'tablepress' ); ?></label>
|
199 |
+
<label for="tables-import-type-replace"><input name="import[type]" id="tables-import-type-replace" type="radio" aria-labelledby="import-type-header" value="replace"<?php checked( $data['import_type'], 'replace', true ); ?><?php disabled( $data['tables_count'] > 0, false, true ); ?> /> <?php _e( 'Replace existing table', 'tablepress' ); ?></label>
|
200 |
+
<label for="tables-import-type-append"><input name="import[type]" id="tables-import-type-append" type="radio" aria-labelledby="import-type-header" value="append"<?php checked( $data['import_type'], 'append', true ); ?><?php disabled( $data['tables_count'] > 0, false, true ); ?> /> <?php _e( 'Append rows to existing table', 'tablepress' ); ?></label>
|
201 |
</td>
|
202 |
</tr>
|
203 |
<tr id="row-import-existing-table" class="bottom-border">
|
223 |
</td>
|
224 |
</tr>
|
225 |
<tr class="top-border">
|
226 |
+
<td class="column-1"></td>
|
227 |
<td class="column-2"><input type="submit" value="<?php echo esc_attr_x( 'Import', 'button', 'tablepress' ); ?>" class="button button-primary button-large" name="submit" /></td>
|
228 |
</tr>
|
229 |
</tbody>
|
268 |
</td>
|
269 |
</tr>
|
270 |
<tr id="row-import-wp-table-reloaded-source-db" class="bottom-border">
|
271 |
+
<td class="column-1 top-align" scope="row" style="padding:2px;"></td>
|
272 |
<td class="column-2" style="padding:2px;"></td>
|
273 |
</tr>
|
274 |
<tr class="top-border">
|
280 |
<td class="column-2"><label for="import-wp-table-reloaded-css"> <input type="checkbox" id="import-wp-table-reloaded-css" name="import[wp_table_reloaded][css]" value="true" checked="checked" /> <?php _e( 'Try to automatically convert the “Custom CSS” code from the “Plugin Options” screen of WP-Table Reloaded.', 'tablepress' ); ?></label></td>
|
281 |
</tr>
|
282 |
<tr class="top-border">
|
283 |
+
<td class="column-1" scope="row"></td>
|
284 |
<td class="column-2"><input type="submit" value="<?php echo esc_attr_x( 'Import from WP-Table Reloaded', 'button', 'tablepress' ); ?>" class="button button-large" id="submit_wp_table_reloaded_import" name="submit_wp_table_reloaded_import" /></td>
|
285 |
</tr>
|
286 |
</tbody>
|
views/view-list.php
CHANGED
@@ -74,9 +74,9 @@ class TablePress_List_View extends TablePress_View {
|
|
74 |
'<img alt="' . esc_attr__( 'Tobias Bäthge, developer of TablePress', 'tablepress' ) . '" src="https://secure.gravatar.com/avatar/50f1cff2e27a1f522b18ce229c057bc5?s=110" height="110" width="110" style="float:left;margin:1px 10px 40px 0;" />'
|
75 |
. __( 'Hi, my name is Tobias, I’m the developer of the TablePress plugin.', 'tablepress' ) . '<br /><br />'
|
76 |
. __( 'Thanks for using it! You’ve installed TablePress over a month ago.', 'tablepress' ) . ' '
|
77 |
-
. sprintf( _n( 'If everything works and you are satisfied with the results of managing your %s table, isn’t that worth a coffee or two?', 'If everything works and you are satisfied with the results of managing your %s tables, isn’t that worth a coffee or two?', $data['table_count'], 'tablepress' ), $data['table_count'] ) . '<br />'
|
78 |
. sprintf( __( '<a href="%s">Donations</a> help me to continue user support and development of this <em>free</em> software — things for which I spend countless hours of my free time! Thank you very much!', 'tablepress' ), 'https://tablepress.org/donate/' ) . '<br /><br />'
|
79 |
-
. __( '
|
80 |
. sprintf( '<a href="%s" target="_blank"><strong>%s</strong></a>', 'https://tablepress.org/donate/', __( 'Sure, I’ll buy you a coffee and support TablePress!', 'tablepress' ) ) . ' · '
|
81 |
. $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'already-donated' ), __( 'I already donated.', 'tablepress' ) ) . ' · '
|
82 |
. $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'maybe-later' ), __( 'No, thanks. Don’t ask again.', 'tablepress' ) ),
|
@@ -186,7 +186,9 @@ class TablePress_List_View extends TablePress_View {
|
|
186 |
<?php _e( 'Click the corresponding links within the list to edit, copy, delete, or preview a table.', 'tablepress' ); ?>
|
187 |
</p>
|
188 |
<p>
|
189 |
-
|
|
|
|
|
190 |
<?php _e( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' ); ?>
|
191 |
<?php printf( __( 'You can also click the “%s” button in the editor toolbar to select and insert a table.', 'tablepress' ), __( 'Table', 'tablepress' ) ); ?>
|
192 |
</p>
|
@@ -380,7 +382,11 @@ class TablePress_All_Tables_List_Table extends WP_List_Table {
|
|
380 |
$user_can_export_table = current_user_can( 'tablepress_export_table', $item['id'] );
|
381 |
|
382 |
if ( $user_can_copy_table || $user_can_delete_table || $user_can_export_table ) {
|
383 |
-
return
|
|
|
|
|
|
|
|
|
384 |
} else {
|
385 |
return '';
|
386 |
}
|
@@ -655,7 +661,7 @@ class TablePress_All_Tables_List_Table extends WP_List_Table {
|
|
655 |
static $term, $json_encoded_term;
|
656 |
if ( is_null( $term ) || is_null( $json_encoded_term ) ) {
|
657 |
$term = wp_unslash( $_GET['s'] );
|
658 |
-
$json_encoded_term = substr( wp_json_encode( $term ), 1, -1 );
|
659 |
}
|
660 |
|
661 |
static $debug;
|
@@ -679,7 +685,7 @@ class TablePress_All_Tables_List_Table extends WP_List_Table {
|
|
679 |
|| false !== stripos( TablePress::get_user_display_name( $item['author'] ), $term )
|
680 |
|| false !== stripos( TablePress::get_user_display_name( $item['options']['last_editor'] ), $term )
|
681 |
|| false !== stripos( TablePress::format_datetime( $item['last_modified'], 'mysql', ' ' ), $term )
|
682 |
-
|| false !== stripos( wp_json_encode( $item['data'] ), $json_encoded_term ) ) {
|
683 |
return true;
|
684 |
}
|
685 |
|
74 |
'<img alt="' . esc_attr__( 'Tobias Bäthge, developer of TablePress', 'tablepress' ) . '" src="https://secure.gravatar.com/avatar/50f1cff2e27a1f522b18ce229c057bc5?s=110" height="110" width="110" style="float:left;margin:1px 10px 40px 0;" />'
|
75 |
. __( 'Hi, my name is Tobias, I’m the developer of the TablePress plugin.', 'tablepress' ) . '<br /><br />'
|
76 |
. __( 'Thanks for using it! You’ve installed TablePress over a month ago.', 'tablepress' ) . ' '
|
77 |
+
. sprintf( _n( 'If everything works and you are satisfied with the results of managing your %s table, isn’t that worth a coffee or two?', 'If everything works and you are satisfied with the results of managing your %s tables, isn’t that worth a coffee or two?', $data['table_count'], 'tablepress' ), esc_html( $data['table_count'] ) ) . '<br />'
|
78 |
. sprintf( __( '<a href="%s">Donations</a> help me to continue user support and development of this <em>free</em> software — things for which I spend countless hours of my free time! Thank you very much!', 'tablepress' ), 'https://tablepress.org/donate/' ) . '<br /><br />'
|
79 |
+
. __( 'Sincerely, Tobias', 'tablepress' ) . '<br /><br />'
|
80 |
. sprintf( '<a href="%s" target="_blank"><strong>%s</strong></a>', 'https://tablepress.org/donate/', __( 'Sure, I’ll buy you a coffee and support TablePress!', 'tablepress' ) ) . ' · '
|
81 |
. $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'already-donated' ), __( 'I already donated.', 'tablepress' ) ) . ' · '
|
82 |
. $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'maybe-later' ), __( 'No, thanks. Don’t ask again.', 'tablepress' ) ),
|
186 |
<?php _e( 'Click the corresponding links within the list to edit, copy, delete, or preview a table.', 'tablepress' ); ?>
|
187 |
</p>
|
188 |
<p>
|
189 |
+
<label class="screen-reader-only" for="table-shortcode-inline"><?php esc_html_e( 'Shortcode text for editor', 'tablepress' ); ?></label>
|
190 |
+
|
191 |
+
<?php printf( __( 'To insert a table into a page, post, or text widget, copy its Shortcode %s and paste it at the desired place in the editor.', 'tablepress' ), '<input type="text" class="table-shortcode table-shortcode-inline" id="table-shortcode-inline" value="' . esc_attr( '[' . TablePress::$shortcode . ' id=<ID> /]' ) . '" readonly="readonly" />' ); ?>
|
192 |
<?php _e( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' ); ?>
|
193 |
<?php printf( __( 'You can also click the “%s” button in the editor toolbar to select and insert a table.', 'tablepress' ), __( 'Table', 'tablepress' ) ); ?>
|
194 |
</p>
|
382 |
$user_can_export_table = current_user_can( 'tablepress_export_table', $item['id'] );
|
383 |
|
384 |
if ( $user_can_copy_table || $user_can_delete_table || $user_can_export_table ) {
|
385 |
+
return sprintf(
|
386 |
+
'<label><span class="screen-reader-text">%1$s</span><input type="checkbox" name="table[]" value="%2$s" /></label>',
|
387 |
+
esc_html__( 'Bulk action selector', 'tablepress' ),
|
388 |
+
esc_attr( $item['id'] )
|
389 |
+
);
|
390 |
} else {
|
391 |
return '';
|
392 |
}
|
661 |
static $term, $json_encoded_term;
|
662 |
if ( is_null( $term ) || is_null( $json_encoded_term ) ) {
|
663 |
$term = wp_unslash( $_GET['s'] );
|
664 |
+
$json_encoded_term = substr( wp_json_encode( $term, TABLEPRESS_JSON_OPTIONS ), 1, -1 );
|
665 |
}
|
666 |
|
667 |
static $debug;
|
685 |
|| false !== stripos( TablePress::get_user_display_name( $item['author'] ), $term )
|
686 |
|| false !== stripos( TablePress::get_user_display_name( $item['options']['last_editor'] ), $term )
|
687 |
|| false !== stripos( TablePress::format_datetime( $item['last_modified'], 'mysql', ' ' ), $term )
|
688 |
+
|| false !== stripos( wp_json_encode( $item['data'], TABLEPRESS_JSON_OPTIONS ), $json_encoded_term ) ) {
|
689 |
return true;
|
690 |
}
|
691 |
|
views/view-options.php
CHANGED
@@ -105,12 +105,12 @@ class TablePress_Options_View extends TablePress_View {
|
|
105 |
<table class="tablepress-postbox-table fixed">
|
106 |
<tbody>
|
107 |
<tr>
|
108 |
-
<th class="column-1" scope="row"><?php _e( 'Custom CSS', 'tablepress' );
|
109 |
<td class="column-2"><label for="option-use-custom-css"><input type="checkbox" id="option-use-custom-css" name="options[use_custom_css]" value="true"<?php checked( $data['frontend_options']['use_custom_css'] ); ?> /> <?php _e( 'Load these “Custom CSS” commands to influence the table styling:', 'tablepress' ); ?></label>
|
110 |
</td>
|
111 |
</tr>
|
112 |
<tr>
|
113 |
-
<
|
114 |
<td class="column-2">
|
115 |
<textarea name="options[custom_css]" id="option-custom-css" class="large-text" rows="8"><?php echo esc_textarea( $data['frontend_options']['custom_css'] ); ?></textarea>
|
116 |
<p class="description">
|
105 |
<table class="tablepress-postbox-table fixed">
|
106 |
<tbody>
|
107 |
<tr>
|
108 |
+
<th class="column-1" scope="row"><label for="option-custom-css"><?php _e( 'Custom CSS', 'tablepress' ); ?></label>:</th>
|
109 |
<td class="column-2"><label for="option-use-custom-css"><input type="checkbox" id="option-use-custom-css" name="options[use_custom_css]" value="true"<?php checked( $data['frontend_options']['use_custom_css'] ); ?> /> <?php _e( 'Load these “Custom CSS” commands to influence the table styling:', 'tablepress' ); ?></label>
|
110 |
</td>
|
111 |
</tr>
|
112 |
<tr>
|
113 |
+
<td class="column-1"></td>
|
114 |
<td class="column-2">
|
115 |
<textarea name="options[custom_css]" id="option-custom-css" class="large-text" rows="8"><?php echo esc_textarea( $data['frontend_options']['custom_css'] ); ?></textarea>
|
116 |
<p class="description">
|