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.12 |
Comparing to | |
See all releases |
Code changes from version 1.11 to 1.12
- admin/css/common.css +1 -0
- admin/css/common.min.css +1 -1
- admin/img/wsal-logo.png +0 -0
- admin/img/wsal-mark.png +0 -0
- admin/js/common.min.js +1 -1
- admin/js/edit.min.js +1 -1
- admin/js/list.min.js +1 -1
- classes/class-evaluate.php +24 -12
- classes/class-render.php +1 -1
- classes/class-tablepress.php +3 -3
- classes/class-view.php +1 -1
- controllers/controller-admin_ajax.php +4 -4
- controllers/controller-frontend.php +1 -1
- i18n/datatables/lang-mn.json +23 -0
- js/jquery.datatables.min.js +167 -156
- libraries/evalmath.class.php +1 -1
- libraries/simplexlsx.class.php +201 -142
- models/model-table.php +1 -27
- readme.txt +14 -20
- tablepress.php +2 -2
- views/view-about.php +2 -2
- views/view-add.php +1 -1
- views/view-edit.php +7 -5
- views/view-editor_button_thickbox.php +1 -1
- views/view-export.php +1 -1
- views/view-import.php +1 -1
- views/view-list.php +3 -3
- views/view-options.php +2 -2
admin/css/common.css
CHANGED
@@ -105,6 +105,7 @@
|
|
105 |
#tablepress-page form :invalid,
|
106 |
#tablepress-page form .invalid {
|
107 |
border-color: #cc0000 !important;
|
|
|
108 |
}
|
109 |
|
110 |
/* Tables in postboxes (on the "Edit" and "Plugin Options" screens) */
|
105 |
#tablepress-page form :invalid,
|
106 |
#tablepress-page form .invalid {
|
107 |
border-color: #cc0000 !important;
|
108 |
+
box-shadow: 0 0 0 1px #cc0000;
|
109 |
}
|
110 |
|
111 |
/* Tables in postboxes (on the "Edit" and "Plugin Options" screens) */
|
admin/css/common.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#tablepress-page div.notice{margin:10px 0 0}@media screen and (min-width:783px) and (max-width:1150px){#tablepress-nav{padding-top:30px}}@media screen and (max-width:700px){#tablepress-nav{border-bottom:0}#tablepress-nav .nav-tab{margin:0 0 10px .5em;border-bottom:1px solid #ccc}}#tablepress-nav .wp-heading-inline{float:left;padding:5px 0 0;line-height:inherit}#tablepress-nav .nav-tab-separator{margin-left:2em}#tablepress_add-add-table .form-wrap{max-width:500px}#tablepress_add-add-table .form-field{margin:0}#tablepress_add-add-table .form-field-small{float:left;width:150px;margin-right:20px}.tablepress-all-tables thead .column-table_id{width:50px}.tablepress-all-tables thead .column-table_name{width:30%}.tablepress-all-tables thead .column-table_author{width:12%}.tablepress-all-tables thead .column-table_last_modified{width:15%}.tablepress-all-tables tbody .column-table_id{font-weight:700}@media screen and (max-width:782px){.tablepress-all-tables .column-table_id{display:none!important;padding:3px 8px 3px 35%}}#tablepress-page .subtitle{float:left;padding-left:0}#tablepress-page .table-shortcode-inline{background:0 0;border:none;color:#333;width:120px;margin:0;padding:0;font-weight:700;box-shadow:none;text-align:center;vertical-align:baseline}#tablepress-page #tables-export{width:100%}#tablepress-page form .invalid,#tablepress-page form :invalid{border-color:#c00!important}.tablepress-postbox-table{border-spacing:0;max-width:1000px;width:100%}.tablepress-postbox-table .column-1{width:25%}.tablepress-postbox-table .column-2{width:75%}.tablepress-postbox-table th{text-align:left;font-weight:400}.tablepress-postbox-table td,.tablepress-postbox-table th{padding:2px;word-wrap:break-word}.tablepress-postbox-table .top-border td,.tablepress-postbox-table .top-border th{padding-top:6px}.tablepress-postbox-table .bottom-border td,.tablepress-postbox-table .bottom-border th{padding-bottom:6px;border-bottom:1px solid #eee}.tablepress-postbox-table .top-align{vertical-align:top;padding-top:6px}#tablepress_import-import-form .column-2 label{margin-right:20px}#uninstall-tablepress{color:#bc0b0b}#tablepress-page select{vertical-align:baseline}#tablepress-page textarea,.tablepress-postbox-table .button{margin:1px}
|
1 |
+
#tablepress-page div.notice{margin:10px 0 0}@media screen and (min-width:783px) and (max-width:1150px){#tablepress-nav{padding-top:30px}}@media screen and (max-width:700px){#tablepress-nav{border-bottom:0}#tablepress-nav .nav-tab{margin:0 0 10px .5em;border-bottom:1px solid #ccc}}#tablepress-nav .wp-heading-inline{float:left;padding:5px 0 0;line-height:inherit}#tablepress-nav .nav-tab-separator{margin-left:2em}#tablepress_add-add-table .form-wrap{max-width:500px}#tablepress_add-add-table .form-field{margin:0}#tablepress_add-add-table .form-field-small{float:left;width:150px;margin-right:20px}.tablepress-all-tables thead .column-table_id{width:50px}.tablepress-all-tables thead .column-table_name{width:30%}.tablepress-all-tables thead .column-table_author{width:12%}.tablepress-all-tables thead .column-table_last_modified{width:15%}.tablepress-all-tables tbody .column-table_id{font-weight:700}@media screen and (max-width:782px){.tablepress-all-tables .column-table_id{display:none!important;padding:3px 8px 3px 35%}}#tablepress-page .subtitle{float:left;padding-left:0}#tablepress-page .table-shortcode-inline{background:0 0;border:none;color:#333;width:120px;margin:0;padding:0;font-weight:700;box-shadow:none;text-align:center;vertical-align:baseline}#tablepress-page #tables-export{width:100%}#tablepress-page form .invalid,#tablepress-page form :invalid{border-color:#c00!important;box-shadow:0 0 0 1px #c00}.tablepress-postbox-table{border-spacing:0;max-width:1000px;width:100%}.tablepress-postbox-table .column-1{width:25%}.tablepress-postbox-table .column-2{width:75%}.tablepress-postbox-table th{text-align:left;font-weight:400}.tablepress-postbox-table td,.tablepress-postbox-table th{padding:2px;word-wrap:break-word}.tablepress-postbox-table .top-border td,.tablepress-postbox-table .top-border th{padding-top:6px}.tablepress-postbox-table .bottom-border td,.tablepress-postbox-table .bottom-border th{padding-bottom:6px;border-bottom:1px solid #eee}.tablepress-postbox-table .top-align{vertical-align:top;padding-top:6px}#tablepress_import-import-form .column-2 label{margin-right:20px}#uninstall-tablepress{color:#bc0b0b}#tablepress-page select{vertical-align:baseline}#tablepress-page textarea,.tablepress-postbox-table .button{margin:1px}
|
admin/img/wsal-logo.png
CHANGED
Binary file
|
admin/img/wsal-mark.png
CHANGED
Binary file
|
admin/js/common.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.tp=window.tp||{},jQuery(document).ready(function(t){"use strict";postboxes.add_postbox_toggles(pagenow),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(){
|
1 |
+
window.tp=window.tp||{},jQuery(document).ready(function(t){"use strict";postboxes.add_postbox_toggles(pagenow),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(){return!!confirm(tablepress_common.ays_delete_single_table)&&void(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(i){"use strict";function l(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(){function a(e,t){function a(e,t){return(!e.match(c)||1===t)&&parseFloat(e)||e.replace(i," ").replace(r,"")||0}var n,o,s=/(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g,r=/^\s+|\s+$/g,i=/\s+/g,l=/^0x[0-9a-f]+$/i,c=/^0/,d=e.replace(r,"")||"",p=t.replace(r,"")||"",u=d.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=p.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),_=parseInt(d.match(l),16)||1!==u.length&&Date.parse(d),m=parseInt(p.match(l),16)||_&&p.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(p)||null;if(m){if(_<m)return-1;if(m<_)return 1}for(var b=0,f=u.length,v=h.length,g=Math.max(f,v);b<g;b++){if(n=a(u[b]||"",f),o=a(h[b]||"",v),isNaN(n)!==isNaN(o))return isNaN(n)?1:-1;if(/[^\x00-\x80]/.test(n+o)&&n.localeCompare){var w=n.localeCompare(o);return w/Math.abs(w)}if(n<o)return-1;if(o<n)return 1}}var n=i(this).parent().index(),o=i(this).hasClass("sort-asc")?1:-1,e=i("#edit-form-body"),t=e.find(".head-row").prevAll().addBack(),s=e.find(".foot-row").nextAll().addBack(),r=e.children().not(t).not(s).get();i.each(r,function(e,t){t.sort_key=(""+i(t).children().eq(n).find("textarea").val()).toLowerCase()}),r.sort(function(e,t){return o*a(e.sort_key,t.sort_key)}),i.each(r,function(e,t){t.sort_key=null}),e.append(t),e.append(r),e.append(s),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.children(":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,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,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;a="success"===e?(n+=" notice notice-success",3e3):(n+=" notice notice-error",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()});
|
1 |
+
window.tp=window.tp||{},jQuery(document).ready(function(i){"use strict";function l(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){for(var t,a,n="",o=0;o<e;o++){for(n+=tp.table.body_cells_pre,t=0;t<tp.table.columns;t++)n+=tp.table.body_cell;n+=tp.table.body_cells_post}return a=l("edit-form-foot").find(".column-hidden").map(function(){return i(this).index()}).get(),i(n).each(function(e,t){i(t).children().filter(function(e){return-1!==i.inArray(e,a)}).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(){function a(e,t){function a(e,t){return(!e.match(c)||1===t)&&parseFloat(e)||e.replace(i," ").replace(r,"")||0}var n,o,s=/(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g,r=/^\s+|\s+$/g,i=/\s+/g,l=/^0x[0-9a-f]+$/i,c=/^0/,d=e.replace(r,"")||"",p=t.replace(r,"")||"",u=d.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=p.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),_=parseInt(d.match(l),16)||1!==u.length&&Date.parse(d),m=parseInt(p.match(l),16)||_&&p.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(p)||null;if(m){if(_<m)return-1;if(m<_)return 1}for(var b=0,f=u.length,v=h.length,g=Math.max(f,v);b<g;b++){if(n=a(u[b]||"",f),o=a(h[b]||"",v),isNaN(n)!==isNaN(o))return isNaN(n)?1:-1;if(/[^\x00-\x80]/.test(n+o)&&n.localeCompare){var w=n.localeCompare(o);return w/Math.abs(w)}if(n<o)return-1;if(o<n)return 1}}var n=i(this).parent().index(),o=i(this).hasClass("sort-asc")?1:-1,e=i("#edit-form-body"),t=e.find(".head-row").prevAll().addBack(),s=e.find(".foot-row").nextAll().addBack(),r=e.children().not(t).not(s).get();i.each(r,function(e,t){t.sort_key=(""+i(t).children().eq(n).find("textarea").val()).toLowerCase()}),r.sort(function(e,t){return o*a(e.sort_key,t.sort_key)}),i.each(r,function(e,t){t.sort_key=null}),e.append(t),e.append(r),e.append(s),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){var a,n;-1!==i.inArray(e,o)&&((n=(a=i(t)).clone()).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.children(":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,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,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){var t;e.shiftKey&&(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){var t;37!==e.which&&39!==e.which&&(t=i(this)).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){var a;void 0===t||"success"!==t?tp.save_changes.error("AJAX call successful, but unclear status. Try again while holding down the “Shift” key."):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."):!0!==e.success?(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)):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="save-changes-"+e,n="success"===e?(a+=" notice notice-success",3e3):(a+=" notice notice-error",6e3);i(".animation-saving").closest("p").after('<div class="ajax-alert '+a+'"><p>'+tablepress_strings["save_changes_"+e]+t+"</p></div>"),i(".animation-saving").remove(),i(".save-changes-"+e).delay(n).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/list.min.js
CHANGED
@@ -1 +1 @@
|
|
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
|
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=n(".tablepress-all-tables").find("tbody").find("input:checked").length,a="doaction"===this.id?"top":"bottom";return"-1"!==n("#bulk-action-"+a).val()&&(0!==e&&(!("delete"===n("#bulk-action-"+a).val()&&(t=1===e?tablepress_common.ays_delete_single_table:tablepress_common.ays_delete_multiple_tables,!confirm(t)))&&void 0))})});
|
classes/class-evaluate.php
CHANGED
@@ -63,18 +63,24 @@ class TablePress_Evaluate {
|
|
63 |
*
|
64 |
* @since 1.0.0
|
65 |
*
|
66 |
-
* @param array
|
|
|
67 |
* @return array Table data with evaluated formulas.
|
68 |
*/
|
69 |
-
public function evaluate_table_data( array $table_data ) {
|
70 |
$this->table_data = $table_data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
$rows = count( $this->table_data );
|
73 |
-
$columns = count( $this->table_data[0] );
|
74 |
// Use two for-loops instead of foreach here to be sure to always work on the "live" table data and not some in-memory copy.
|
75 |
-
for ( $row_idx = 0; $row_idx < $
|
76 |
-
for ( $col_idx = 0; $col_idx < $
|
77 |
-
$this->table_data[ $row_idx ][ $col_idx ] = $this->_evaluate_cell( $this->table_data[ $row_idx ][ $col_idx ] );
|
78 |
}
|
79 |
}
|
80 |
|
@@ -87,10 +93,12 @@ class TablePress_Evaluate {
|
|
87 |
* @since 1.0.0
|
88 |
*
|
89 |
* @param string $content Content of a cell.
|
|
|
|
|
90 |
* @param array $parents Optional. List of cells that depend on this cell (to prevent circle references).
|
91 |
* @return string Result of the parsing/evaluation.
|
92 |
*/
|
93 |
-
protected function _evaluate_cell( $content, array $parents = array() ) {
|
94 |
if ( '' === $content || '=' === $content || '=' !== $content[0] ) {
|
95 |
return $content;
|
96 |
}
|
@@ -157,7 +165,7 @@ class TablePress_Evaluate {
|
|
157 |
}
|
158 |
|
159 |
// Parse and evaluate single cell references (like A3 or XY312), while prohibiting circle references.
|
160 |
-
if ( preg_match_all( '#([A-Z]+)([0-9]+)#', $expression, $referenced_cells, PREG_SET_ORDER ) ) {
|
161 |
foreach ( $referenced_cells as $cell_reference ) {
|
162 |
if ( in_array( $cell_reference[0], $parents, true ) ) {
|
163 |
return '!ERROR! Circle Reference';
|
@@ -179,7 +187,7 @@ class TablePress_Evaluate {
|
|
179 |
$ref_parents = $parents;
|
180 |
$ref_parents[] = $cell_reference[0];
|
181 |
|
182 |
-
$result = $this->table_data[ $ref_row ][ $ref_col ] = $this->_evaluate_cell( $this->table_data[ $ref_row ][ $ref_col ], $ref_parents );
|
183 |
// Bail if there was an error already.
|
184 |
if ( false !== strpos( $result, '!ERROR!' ) ) {
|
185 |
return $result;
|
@@ -199,7 +207,7 @@ class TablePress_Evaluate {
|
|
199 |
}
|
200 |
}
|
201 |
|
202 |
-
$result = $this->_evaluate_math_expression( $expression );
|
203 |
// Support putting formulas in strings, like =Total: {A3+A4}.
|
204 |
if ( $formula_in_string ) {
|
205 |
$content = str_replace( $orig_expression, $result, $content );
|
@@ -219,7 +227,11 @@ class TablePress_Evaluate {
|
|
219 |
* @param string $expression without leading = sign.
|
220 |
* @return string Result of the evaluation.
|
221 |
*/
|
222 |
-
protected function _evaluate_math_expression( $expression ) {
|
|
|
|
|
|
|
|
|
223 |
// Straight up evaluation, without parsing of variable or function assignments (which is why we only need one instance of the object).
|
224 |
$result = $this->evalmath->evaluate( $expression );
|
225 |
if ( false === $result ) {
|
63 |
*
|
64 |
* @since 1.0.0
|
65 |
*
|
66 |
+
* @param array $table_data Table data in which formulas shall be evaluated.
|
67 |
+
* @param string $table_id ID of the passed table.
|
68 |
* @return array Table data with evaluated formulas.
|
69 |
*/
|
70 |
+
public function evaluate_table_data( array $table_data, $table_id ) {
|
71 |
$this->table_data = $table_data;
|
72 |
+
$num_rows = count( $this->table_data );
|
73 |
+
$num_columns = count( $this->table_data[0] );
|
74 |
+
|
75 |
+
// Make fixed table data available as variables in formulas.
|
76 |
+
$this->evalmath->variables['table_id'] = $table_id;
|
77 |
+
$this->evalmath->variables['num_rows'] = $num_rows;
|
78 |
+
$this->evalmath->variables['num_columns'] = $num_columns;
|
79 |
|
|
|
|
|
80 |
// Use two for-loops instead of foreach here to be sure to always work on the "live" table data and not some in-memory copy.
|
81 |
+
for ( $row_idx = 0; $row_idx < $num_rows; $row_idx++ ) {
|
82 |
+
for ( $col_idx = 0; $col_idx < $num_columns; $col_idx++ ) {
|
83 |
+
$this->table_data[ $row_idx ][ $col_idx ] = $this->_evaluate_cell( $this->table_data[ $row_idx ][ $col_idx ], $row_idx, $col_idx );
|
84 |
}
|
85 |
}
|
86 |
|
93 |
* @since 1.0.0
|
94 |
*
|
95 |
* @param string $content Content of a cell.
|
96 |
+
* @param int $row_idx Row index of the cell.
|
97 |
+
* @param int $col_idx Column index of the cell.
|
98 |
* @param array $parents Optional. List of cells that depend on this cell (to prevent circle references).
|
99 |
* @return string Result of the parsing/evaluation.
|
100 |
*/
|
101 |
+
protected function _evaluate_cell( $content, $row_idx, $col_idx, array $parents = array() ) {
|
102 |
if ( '' === $content || '=' === $content || '=' !== $content[0] ) {
|
103 |
return $content;
|
104 |
}
|
165 |
}
|
166 |
|
167 |
// Parse and evaluate single cell references (like A3 or XY312), while prohibiting circle references.
|
168 |
+
if ( preg_match_all( '#([A-Z]+)([0-9]+)(?![0-9A-Z\(])#', $expression, $referenced_cells, PREG_SET_ORDER ) ) {
|
169 |
foreach ( $referenced_cells as $cell_reference ) {
|
170 |
if ( in_array( $cell_reference[0], $parents, true ) ) {
|
171 |
return '!ERROR! Circle Reference';
|
187 |
$ref_parents = $parents;
|
188 |
$ref_parents[] = $cell_reference[0];
|
189 |
|
190 |
+
$result = $this->table_data[ $ref_row ][ $ref_col ] = $this->_evaluate_cell( $this->table_data[ $ref_row ][ $ref_col ], $ref_row, $ref_col, $ref_parents );
|
191 |
// Bail if there was an error already.
|
192 |
if ( false !== strpos( $result, '!ERROR!' ) ) {
|
193 |
return $result;
|
207 |
}
|
208 |
}
|
209 |
|
210 |
+
$result = $this->_evaluate_math_expression( $expression, $row_idx, $col_idx );
|
211 |
// Support putting formulas in strings, like =Total: {A3+A4}.
|
212 |
if ( $formula_in_string ) {
|
213 |
$content = str_replace( $orig_expression, $result, $content );
|
227 |
* @param string $expression without leading = sign.
|
228 |
* @return string Result of the evaluation.
|
229 |
*/
|
230 |
+
protected function _evaluate_math_expression( $expression, $row_idx, $col_idx ) {
|
231 |
+
// Make current cell's name and row and column number available as variables in formulas.
|
232 |
+
$this->evalmath->variables['row'] = $row_idx + 1;
|
233 |
+
$this->evalmath->variables['column'] = $col_idx + 1;
|
234 |
+
$this->evalmath->variables['cell'] = TablePress::number_to_letter( $this->evalmath->variables['column'] ) . $this->evalmath->variables['row'];
|
235 |
// Straight up evaluation, without parsing of variable or function assignments (which is why we only need one instance of the object).
|
236 |
$result = $this->evalmath->evaluate( $expression );
|
237 |
if ( false === $result ) {
|
classes/class-render.php
CHANGED
@@ -145,7 +145,7 @@ class TablePress_Render {
|
|
145 |
$orig_table = $this->table;
|
146 |
|
147 |
$formula_evaluator = TablePress::load_class( 'TablePress_Evaluate', 'class-evaluate.php', 'classes' );
|
148 |
-
$this->table['data'] = $formula_evaluator->evaluate_table_data( $this->table['data'] );
|
149 |
/**
|
150 |
* Filter the table after evaluating formulas in the table.
|
151 |
*
|
145 |
$orig_table = $this->table;
|
146 |
|
147 |
$formula_evaluator = TablePress::load_class( 'TablePress_Evaluate', 'class-evaluate.php', 'classes' );
|
148 |
+
$this->table['data'] = $formula_evaluator->evaluate_table_data( $this->table['data'], $this->table['id'] );
|
149 |
/**
|
150 |
* Filter the table after evaluating formulas in the table.
|
151 |
*
|
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.
|
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.
|
@@ -147,7 +147,7 @@ abstract class TablePress {
|
|
147 |
|
148 |
if ( is_admin() ) {
|
149 |
$controller = 'admin';
|
150 |
-
if (
|
151 |
$controller .= '_ajax';
|
152 |
}
|
153 |
} else {
|
26 |
* @since 1.0.0
|
27 |
* @const string
|
28 |
*/
|
29 |
+
const version = '1.12';
|
30 |
|
31 |
/**
|
32 |
* TablePress internal plugin version ("options scheme" version).
|
36 |
* @since 1.0.0
|
37 |
* @const int
|
38 |
*/
|
39 |
+
const db_version = 41;
|
40 |
|
41 |
/**
|
42 |
* TablePress "table scheme" (data format structure) version.
|
147 |
|
148 |
if ( is_admin() ) {
|
149 |
$controller = 'admin';
|
150 |
+
if ( wp_doing_ajax() ) {
|
151 |
$controller .= '_ajax';
|
152 |
}
|
153 |
} else {
|
classes/class-view.php
CHANGED
@@ -153,7 +153,7 @@ abstract class TablePress_View {
|
|
153 |
if ( is_rtl() ) {
|
154 |
$this->admin_page->enqueue_style( 'common-rtl', array( 'tablepress-common' ) );
|
155 |
}
|
156 |
-
$this->admin_page->enqueue_script( 'common', array( 'jquery
|
157 |
'common' => array(
|
158 |
'ays_delete_single_table' => _n( 'Do you really want to delete this table?', 'Do you really want to delete these tables?', 1, 'tablepress' ),
|
159 |
'ays_delete_multiple_tables' => _n( 'Do you really want to delete this table?', 'Do you really want to delete these tables?', 2, 'tablepress' ),
|
153 |
if ( is_rtl() ) {
|
154 |
$this->admin_page->enqueue_style( 'common-rtl', array( 'tablepress-common' ) );
|
155 |
}
|
156 |
+
$this->admin_page->enqueue_script( 'common', array( 'jquery', 'postbox' ), array(
|
157 |
'common' => array(
|
158 |
'ays_delete_single_table' => _n( 'Do you really want to delete this table?', 'Do you really want to delete these tables?', 1, 'tablepress' ),
|
159 |
'ays_delete_multiple_tables' => _n( 'Do you really want to delete this table?', 'Do you really want to delete these tables?', 2, 'tablepress' ),
|
controllers/controller-admin_ajax.php
CHANGED
@@ -108,7 +108,7 @@ class TablePress_Admin_AJAX_Controller extends TablePress_Controller {
|
|
108 |
$edit_table['visibility'] = (array) json_decode( $edit_table['visibility'], true );
|
109 |
|
110 |
// Check consistency of new table, and then merge with existing table.
|
111 |
-
$table = TablePress::$model_table->prepare_table( $existing_table, $edit_table, true
|
112 |
if ( is_wp_error( $table ) ) {
|
113 |
// Add an error code to the existing WP_Error.
|
114 |
$table->add( 'ajax_save_table_prepare', '', $edit_table['id'] );
|
@@ -116,7 +116,7 @@ class TablePress_Admin_AJAX_Controller extends TablePress_Controller {
|
|
116 |
break;
|
117 |
}
|
118 |
|
119 |
-
// DataTables Custom Commands can only be
|
120 |
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
121 |
$table['options']['datatables_custom_commands'] = $existing_table['options']['datatables_custom_commands'];
|
122 |
}
|
@@ -225,12 +225,12 @@ class TablePress_Admin_AJAX_Controller extends TablePress_Controller {
|
|
225 |
$preview_table['visibility'] = (array) json_decode( $preview_table['visibility'], true );
|
226 |
|
227 |
// Check consistency of new table, and then merge with existing table.
|
228 |
-
$table = TablePress::$model_table->prepare_table( $existing_table, $preview_table, true
|
229 |
if ( is_wp_error( $table ) ) {
|
230 |
break;
|
231 |
}
|
232 |
|
233 |
-
// DataTables Custom Commands can only be
|
234 |
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
235 |
$table['options']['datatables_custom_commands'] = $existing_table['options']['datatables_custom_commands'];
|
236 |
}
|
108 |
$edit_table['visibility'] = (array) json_decode( $edit_table['visibility'], true );
|
109 |
|
110 |
// Check consistency of new table, and then merge with existing table.
|
111 |
+
$table = TablePress::$model_table->prepare_table( $existing_table, $edit_table, true );
|
112 |
if ( is_wp_error( $table ) ) {
|
113 |
// Add an error code to the existing WP_Error.
|
114 |
$table->add( 'ajax_save_table_prepare', '', $edit_table['id'] );
|
116 |
break;
|
117 |
}
|
118 |
|
119 |
+
// DataTables Custom Commands can only be edited by trusted users.
|
120 |
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
121 |
$table['options']['datatables_custom_commands'] = $existing_table['options']['datatables_custom_commands'];
|
122 |
}
|
225 |
$preview_table['visibility'] = (array) json_decode( $preview_table['visibility'], true );
|
226 |
|
227 |
// Check consistency of new table, and then merge with existing table.
|
228 |
+
$table = TablePress::$model_table->prepare_table( $existing_table, $preview_table, true );
|
229 |
if ( is_wp_error( $table ) ) {
|
230 |
break;
|
231 |
}
|
232 |
|
233 |
+
// DataTables Custom Commands can only be edited by trusted users.
|
234 |
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
235 |
$table['options']['datatables_custom_commands'] = $existing_table['options']['datatables_custom_commands'];
|
236 |
}
|
controllers/controller-frontend.php
CHANGED
@@ -214,7 +214,7 @@ class TablePress_Frontend_Controller extends TablePress_Controller {
|
|
214 |
* @param string $js_file Path and file name of the DataTables JS library file.
|
215 |
*/
|
216 |
$js_url = apply_filters( 'tablepress_datatables_js_url', $js_url, $js_file );
|
217 |
-
wp_enqueue_script( 'tablepress-datatables', $js_url, array( 'jquery
|
218 |
}
|
219 |
|
220 |
/**
|
214 |
* @param string $js_file Path and file name of the DataTables JS library file.
|
215 |
*/
|
216 |
$js_url = apply_filters( 'tablepress_datatables_js_url', $js_url, $js_file );
|
217 |
+
wp_enqueue_script( 'tablepress-datatables', $js_url, array( 'jquery' ), TablePress::version, true );
|
218 |
}
|
219 |
|
220 |
/**
|
i18n/datatables/lang-mn.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"emptyTable": "Хүснэгт хоосон байна",
|
3 |
+
"info": "Нийт _TOTAL_ бичлэгээс _START_ - _END_ харуулж байна",
|
4 |
+
"infoEmpty": "Тохирох үр дүн алга",
|
5 |
+
"infoFiltered": "(нийт _MAX_ бичлэгээс шүүв)",
|
6 |
+
"infoPostFix": "",
|
7 |
+
"thousands": ",",
|
8 |
+
"lengthMenu": "Дэлгэцэд _MENU_ бичлэг харуулна",
|
9 |
+
"loadingRecords": "Ачааллаж байна...",
|
10 |
+
"processing": "Боловсруулж байна...",
|
11 |
+
"search": "Хайлт:",
|
12 |
+
"zeroRecords": "Тохирох бичлэг олдсонгүй",
|
13 |
+
"paginate": {
|
14 |
+
"first": "Эхнийх",
|
15 |
+
"last": "Сүүлийнх",
|
16 |
+
"previous": "Өмнөх",
|
17 |
+
"next": "Дараах"
|
18 |
+
},
|
19 |
+
"aria": {
|
20 |
+
"sortAscending": ": цагаан толгойн дарааллаар эрэмбэлэх",
|
21 |
+
"sortDescending": ": цагаан толгойн эсрэг дарааллаар эрэмбэлэх"
|
22 |
+
}
|
23 |
+
}
|
js/jquery.datatables.min.js
CHANGED
@@ -1,170 +1,181 @@
|
|
1 |
/*!
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
*/
|
5 |
-
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(f,
|
6 |
-
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(f,
|
7 |
-
$jscomp.polyfill=function(f,
|
8 |
-
(function(f){"function"===typeof define&&define.amd?define(["jquery"],function(
|
9 |
-
d[c]=e,"o"===b[1]&&H(a[e]))});a._hungarianMap=d}function L(a,b,c){a._hungarianMap||H(a);var d;f.each(b,function(e,h){d=a._hungarianMap[e];d===
|
10 |
-
"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&
|
11 |
-
"");"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]&&L(q.models.oSearch,a[b])}function
|
12 |
overflow:"hidden"}).append(f("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(f("<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()}f.extend(a.oBrowser,q.__browser);a.oScroll.iBarWidth=q.__browser.barWidth}
|
13 |
-
function
|
14 |
-
var d=a.oClasses,e=f(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==
|
15 |
-
l=b.mRender?
|
16 |
-
d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function
|
17 |
-
typeof a[b]?a[b]:null}function
|
18 |
-
d.length;
|
19 |
-
|
20 |
-
f||(b=f(b));return b.map(function(b,e){c=
|
21 |
-
f&&"display"==d?"":f}function
|
22 |
-
-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(b,c){return b[a]};var c=function(a,b,h){if(""!==h){var d=
|
23 |
-
|
24 |
-
c.splice(0,l+1);g=c.join(".");if(f.isArray(d))for(k=0,
|
25 |
-
h;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===
|
26 |
-
|
27 |
-
q||"TH"==q)u(h),e.push(h);h=h.nextSibling}else for(e=b.anCells,h=0,q=e.length;h<q;h++)u(e[h]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&Q(a.rowId)(d,b);return{data:d,cells:e}}function
|
28 |
-
!(c&&!
|
29 |
-
|
30 |
-
a.sTableId),
|
31 |
-
b[l].nTr;for(e=k-1;0<=e;e--)a.aoColumns[e].bVisible||c||h[l].splice(e,1);g.push([])}l=0;for(d=h.length;l<d;l++){if(a=h[l].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=h[l].length;e<b;e++){var
|
32 |
-
"preDraw",[a]);if(-1!==f.inArray(!1,b))
|
33 |
-
null===
|
34 |
-
|
35 |
-
f("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),g,k,l,
|
36 |
-
|
37 |
-
null}function
|
38 |
-
function
|
39 |
-
h.data){var l=h.data;var
|
40 |
-
a.sAjaxSource,f.map(b,function(a,b){return{name:b,value:a}}),k,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=f.ajax(f.extend(
|
41 |
-
-1;var
|
42 |
-
(
|
43 |
-
"recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e){if(1*e<a.iDraw)return;a.iDraw=1*e}
|
44 |
-
a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,h=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',k=d.sSearch;k=k.match(/_INPUT_/)?k.replace("_INPUT_",g):k+g;b=f("<div/>",{id:h.f?null:c+"_filter","class":b.sFilter}).append(f("<label/>").append(k));
|
45 |
-
b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",
|
46 |
-
|
47 |
-
a.aiDisplay;d=
|
48 |
-
c,d){a=b?a:
|
49 |
-
"string"!==typeof
|
50 |
-
d=f("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:
|
51 |
-
a,d,e,h,g,k));f(b).html(k)}}function
|
52 |
-
|
53 |
-
[a,b])}function
|
54 |
-
e[0].outerHTML));f("select",l).val(a._iDisplayLength).on("change.DT",function(b){
|
55 |
-
f=a.fnRecordsDisplay(),
|
56 |
-
a._iDisplayStart!==d;a._iDisplayStart=d;b&&(A(a,null,"page",[a]),c&&S(a));return b}function
|
57 |
-
h=a.oClasses,g=b.children("caption"),k=g.length?g[0]._captionSide:null,l=f(b[0].cloneNode(!1)),
|
58 |
-
{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?B(d):null}).append(b));
|
59 |
-
f(h).
|
60 |
-
x=A.bScrollOversize,ac=
|
61 |
-
c||(
|
62 |
-
t);f(D).height(0);
|
63 |
-
h?(F=k.scrollHeight>k.offsetHeight||"scroll"==
|
64 |
-
(q[0].style.width=B(c),u[0].style.width=B(c),u[0].style[e]=d?b+"px":"0px");r.children("colgroup").insertBefore(r.children("thead"));
|
65 |
-
|
66 |
-
k.append(f(a.nTHead).clone()).append(f(a.nTFoot).clone());k.find("tfoot th, tfoot td").css("width","");
|
67 |
-
e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(k).appendTo(
|
68 |
-
a.sInstance,
|
69 |
-
function B(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function
|
70 |
-
b.push({src:k,col:l,dir:h[a][1],index:h[a]._idx,type:
|
71 |
-
if(0!==m)return"asc"===l.dir?m:-m}m=c[a];
|
72 |
-
h.bSortable&&(0<c.length&&c[0].col==d?(f.setAttribute("aria-sort","asc"==c[0].dir?"ascending":"descending"),h=g[c[0].index+1]||g[0]):h=g[0],k+="asc"===h?a.sSortAscending:a.sSortDescending);f.setAttribute("aria-label",k)}}function
|
73 |
-
b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=h[b],e[c]._idx=b)):(e.push([b,h[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=h[b],e[0]._idx=b):(e.length=0,e.push([b,h[0]]),e[0]._idx=0);
|
74 |
-
c=a.oClasses.sSortColumn,d=
|
75 |
-
[]),!c._aSortData[b]||d)h=d?e[
|
76 |
-
e,h=a.aoColumns;b=function(b){if(b&&b.time){var g=A(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===f.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g||b.columns&&h.length!==b.columns.length))){a.oLoadedState=f.extend(!0,{},b);b.start!==
|
77 |
-
|
78 |
-
d);if(b)
|
79 |
-
d&&f.isArray(e)?a[d]=e.slice():a[d]=e}return a}function
|
80 |
-
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
|
81 |
-
a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function
|
82 |
-
b)}}var q=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
|
83 |
-
(""!==d.sX||""!==d.sY)&&
|
84 |
-
e.search(a,c,d,f):e.column(b).search(a,c,d,f);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==
|
85 |
-
|
86 |
-
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===
|
87 |
-
this.nodeName.toLowerCase())O(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{
|
88 |
-
3);return}}if(t.sTableId==this.id){u.splice(k,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+q.ext._unique++;var r=f.extend(!0,{},q.models.oSettings,{sDestroyWidth:
|
89 |
-
|
90 |
-
|
91 |
-
"user");
|
92 |
-
|
93 |
-
(
|
94 |
-
|
95 |
-
|
96 |
-
"
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
b
|
107 |
-
d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var k=0;for(var l=e.length;k<l;k++)if(e[k].name===g){k=e[k];break a}k=null}k||(k={name:g,
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
a
|
118 |
-
|
119 |
-
"row().
|
120 |
-
|
121 |
-
|
122 |
-
"
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
b)
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
"
|
137 |
-
b
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
146 |
sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};q.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,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,
|
147 |
-
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_"+a.sInstance+"_"+location.pathname))}catch(b){}},
|
148 |
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"},oPaginate:{sFirst:"First",sLast:"Last",
|
149 |
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:f.extend({},q.models.oSearch),sAjaxDataProp:"data",
|
150 |
sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};H(q.defaults);q.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};H(q.defaults.column);q.models.oSettings=
|
151 |
{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:[],aoFooter:[],oPreviousSearch:{},
|
152 |
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",iStateDuration:0,
|
153 |
-
aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:
|
154 |
-
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==
|
155 |
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:q.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:q.version};f.extend(C,{afnFiltering:C.search,aTypes:C.type.detect,ofnSearch:C.type.search,oSort:C.type.order,afnSortData:C.order,aoFeatures:C.feature,oApi:C.internal,oStdClasses:C.classes,oPagination:C.pager});
|
156 |
f.extend(q.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",
|
157 |
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:"",
|
158 |
-
sJUIHeader:"",sJUIFooter:""});var
|
159 |
-
c,d,e,h){var g=a.oClasses,k=a.oLanguage.oPaginate,l=a.oLanguage.oAria.paginate||{},
|
160 |
-
" "+r);break;case "next":
|
161 |
-
|
162 |
-
typeof a&&-1!==a.indexOf("<")?"html":null}]);f.extend(q.ext.type.search,{html:function(a){return P(a)?a:"string"===typeof a?a.replace(
|
163 |
-
"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return P(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}});
|
164 |
c.sSortingClass))})},jqueryui:function(a,b,c,d){f("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(f("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==
|
165 |
-
k[e]?d.sSortJUIAsc:"desc"==k[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var
|
166 |
-
a)+f+(e||"")}}},text:function(){return{display:
|
167 |
-
b){return b._DT_RowIndex!==
|
168 |
-
_fnFilterColumn:
|
169 |
-
_fnSortFlatten:
|
170 |
f.each(q,function(a,b){f.fn.DataTable[a]=b});return f.fn.dataTable});
|
1 |
/*!
|
2 |
+
Copyright 2008-2020 SpryMedia Ltd.
|
3 |
+
|
4 |
+
This source file is free software, available under the following license:
|
5 |
+
MIT license - http://datatables.net/license
|
6 |
+
|
7 |
+
This source file is distributed in the hope that it will be useful, but
|
8 |
+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
9 |
+
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
10 |
+
|
11 |
+
For details please refer to: http://www.datatables.net
|
12 |
+
DataTables 1.10.21
|
13 |
+
©2008-2020 SpryMedia Ltd - datatables.net/license
|
14 |
*/
|
15 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(f,y,w){f instanceof String&&(f=String(f));for(var n=f.length,H=0;H<n;H++){var L=f[H];if(y.call(w,L,H,f))return{i:H,v:L}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
|
16 |
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(f,y,w){f!=Array.prototype&&f!=Object.prototype&&(f[y]=w.value)};$jscomp.getGlobal=function(f){f=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,f];for(var y=0;y<f.length;++y){var w=f[y];if(w&&w.Math==Math)return w}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
17 |
+
$jscomp.polyfill=function(f,y,w,n){if(y){w=$jscomp.global;f=f.split(".");for(n=0;n<f.length-1;n++){var H=f[n];H in w||(w[H]={});w=w[H]}f=f[f.length-1];n=w[f];y=y(n);y!=n&&null!=y&&$jscomp.defineProperty(w,f,{configurable:!0,writable:!0,value:y})}};$jscomp.polyfill("Array.prototype.find",function(f){return f?f:function(f,w){return $jscomp.findInternal(this,f,w).v}},"es6","es3");
|
18 |
+
(function(f){"function"===typeof define&&define.amd?define(["jquery"],function(y){return f(y,window,document)}):"object"===typeof exports?module.exports=function(y,w){y||(y=window);w||(w="undefined"!==typeof window?require("jquery"):require("jquery")(y));return f(w,y,y.document)}:f(jQuery,window,document)})(function(f,y,w,n){function H(a){var b,c,d={};f.each(a,function(e,h){(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()),
|
19 |
+
d[c]=e,"o"===b[1]&&H(a[e]))});a._hungarianMap=d}function L(a,b,c){a._hungarianMap||H(a);var d;f.each(b,function(e,h){d=a._hungarianMap[e];d===n||!c&&b[d]!==n||("o"===d.charAt(0)?(b[d]||(b[d]={}),f.extend(!0,b[d],b[e]),L(a[d],b[d],c)):b[d]=b[e])})}function Fa(a){var b=q.defaults.oLanguage,c=b.sDecimal;c&&Ga(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&d&&"No data available in table"===b.sEmptyTable&&M(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&d&&"Loading..."===b.sLoadingRecords&&M(a,a,
|
20 |
+
"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Ga(a)}}function ib(a){E(a,"ordering","bSort");E(a,"orderMulti","bSortMulti");E(a,"orderClasses","bSortClasses");E(a,"orderCellsTop","bSortCellsTop");E(a,"order","aaSorting");E(a,"orderFixed","aaSortingFixed");E(a,"paging","bPaginate");E(a,"pagingType","sPaginationType");E(a,"pageLength","iDisplayLength");E(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
|
21 |
+
"");"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]&&L(q.models.oSearch,a[b])}function jb(a){E(a,"orderable","bSortable");E(a,"orderData","aDataSort");E(a,"orderSequence","asSorting");E(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"!==typeof b||f.isArray(b)||(a.aDataSort=[b])}function kb(a){if(!q.__browser){var b={};q.__browser=b;var c=f("<div/>").css({position:"fixed",top:0,left:-1*f(y).scrollLeft(),height:1,width:1,
|
22 |
overflow:"hidden"}).append(f("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(f("<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()}f.extend(a.oBrowser,q.__browser);a.oScroll.iBarWidth=q.__browser.barWidth}
|
23 |
+
function lb(a,b,c,d,e,h){var g=!1;if(c!==n){var k=c;g=!0}for(;d!==e;)a.hasOwnProperty(d)&&(k=g?b(k,a[d],d,a):a[d],g=!0,d+=h);return k}function Ha(a,b){var c=q.defaults.column,d=a.aoColumns.length;c=f.extend({},q.models.oColumn,c,{nTh:b?b:w.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]=f.extend({},q.models.oSearch,c[d]);la(a,d,f(b).data())}function la(a,b,c){b=a.aoColumns[b];
|
24 |
+
var d=a.oClasses,e=f(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==n&&null!==c&&(jb(c),L(q.defaults.column,c,!0),c.mDataProp===n||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),f.extend(b,c),M(b,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(b.aDataSort=[c.iDataSort]),M(b,c,"aDataSort"));var g=b.mData,k=T(g),
|
25 |
+
l=b.mRender?T(b.mRender):null;c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=f.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=k(a,b,n,c);return l&&b?l(d,b,a,c):d};b.fnSetData=function(a,b,c){return Q(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==f.inArray("asc",b.asSorting);c=-1!==f.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c?(b.sSortingClass=
|
26 |
+
d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function Z(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ia(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||ma(a);A(a,null,"column-sizing",[a])}function aa(a,b){a=na(a,"bVisible");return"number"===
|
27 |
+
typeof a[b]?a[b]:null}function ba(a,b){a=na(a,"bVisible");b=f.inArray(b,a);return-1!==b?b:null}function V(a){var b=0;f.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==f(d.nTh).css("display")&&b++});return b}function na(a,b){var c=[];f.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ja(a){var b=a.aoColumns,c=a.aoData,d=q.ext.type.detect,e,h,g;var k=0;for(e=b.length;k<e;k++){var f=b[k];var m=[];if(!f.sType&&f._sManualType)f.sType=f._sManualType;else if(!f.sType){var p=0;for(h=
|
28 |
+
d.length;p<h;p++){var v=0;for(g=c.length;v<g;v++){m[v]===n&&(m[v]=F(a,v,k,"type"));var u=d[p](m[v],a);if(!u&&p!==d.length-1)break;if("html"===u)break}if(u){f.sType=u;break}}f.sType||(f.sType="string")}}}function mb(a,b,c,d){var e,h,g,k=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){var l=b[e];var m=l.targets!==n?l.targets:l.aTargets;f.isArray(m)||(m=[m]);var p=0;for(h=m.length;p<h;p++)if("number"===typeof m[p]&&0<=m[p]){for(;k.length<=m[p];)Ha(a);d(m[p],l)}else if("number"===typeof m[p]&&0>m[p])d(k.length+
|
29 |
+
m[p],l);else if("string"===typeof m[p]){var v=0;for(g=k.length;v<g;v++)("_all"==m[p]||f(k[v].nTh).hasClass(m[p]))&&d(v,l)}}if(c)for(e=0,a=c.length;e<a;e++)d(e,c[e])}function R(a,b,c,d){var e=a.aoData.length,h=f.extend(!0,{},q.models.oRow,{src:c?"dom":"data",idx:e});h._aData=b;a.aoData.push(h);for(var g=a.aoColumns,k=0,l=g.length;k<l;k++)g[k].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==n&&(a.aIds[b]=h);!c&&a.oFeatures.bDeferRender||Ka(a,e,c,d);return e}function oa(a,b){var c;b instanceof
|
30 |
+
f||(b=f(b));return b.map(function(b,e){c=La(a,e);return R(a,c.data,e,c.cells)})}function F(a,b,c,d){var e=a.iDraw,h=a.aoColumns[c],g=a.aoData[b]._aData,k=h.sDefaultContent,f=h.fnGetData(g,d,{settings:a,row:b,col:c});if(f===n)return a.iDrawError!=e&&null===k&&(O(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{function}":"'"+h.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),k;if((f===g||null===f)&&null!==k&&d!==n)f=k;else if("function"===typeof f)return f.call(g);return null===
|
31 |
+
f&&"display"==d?"":f}function nb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function Ma(a){return f.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function T(a){if(f.isPlainObject(a)){var b={};f.each(a,function(a,c){c&&(b[a]=T(c))});return function(a,c,h,g){var d=b[c]||b._;return d!==n?d(a,c,h,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,h,g){return a(b,c,h,g)};if("string"!==typeof a||
|
32 |
+
-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(b,c){return b[a]};var c=function(a,b,h){if(""!==h){var d=Ma(h);for(var e=0,l=d.length;e<l;e++){h=d[e].match(ca);var m=d[e].match(W);if(h){d[e]=d[e].replace(ca,"");""!==d[e]&&(a=a[d[e]]);m=[];d.splice(0,e+1);d=d.join(".");if(f.isArray(a))for(e=0,l=a.length;e<l;e++)m.push(c(a[e],b,d));a=h[0].substring(1,h[0].length-1);a=""===a?m:m.join(a);break}else if(m){d[e]=d[e].replace(W,"");a=a[d[e]]();continue}if(null===a||a[d[e]]===
|
33 |
+
n)return n;a=a[d[e]]}}return a};return function(b,e){return c(b,e,a)}}function Q(a){if(f.isPlainObject(a))return Q(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("("))return function(b,d){b[a]=d};var b=function(a,d,e){e=Ma(e);var c=e[e.length-1];for(var g,k,l=0,m=e.length-1;l<m;l++){g=e[l].match(ca);k=e[l].match(W);if(g){e[l]=e[l].replace(ca,"");a[e[l]]=[];c=e.slice();
|
34 |
+
c.splice(0,l+1);g=c.join(".");if(f.isArray(d))for(k=0,m=d.length;k<m;k++)c={},b(c,d[k],g),a[e[l]].push(c);else a[e[l]]=d;return}k&&(e[l]=e[l].replace(W,""),a=a[e[l]](d));if(null===a[e[l]]||a[e[l]]===n)a[e[l]]={};a=a[e[l]]}if(c.match(W))a[c.replace(W,"")](d);else a[c.replace(ca,"")]=d};return function(c,d){return b(c,d,a)}}function Na(a){return K(a.aoData,"_aData")}function pa(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function qa(a,b,c){for(var d=-1,e=0,h=a.length;e<
|
35 |
+
h;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===n&&a.splice(d,1)}function da(a,b,c,d){var e=a.aoData[b],h,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=F(a,b,d,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var k=e.anCells;if(k)if(d!==n)g(k[d],d);else for(c=0,h=k.length;c<h;c++)g(k[c],c)}else e._aData=La(a,e,d,d===n?n:e._aData).data;e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==n)g[d].sType=null;else{c=0;for(h=g.length;c<h;c++)g[c].sType=null;
|
36 |
+
Oa(a,e)}}function La(a,b,c,d){var e=[],h=b.firstChild,g,k=0,l,m=a.aoColumns,p=a._rowReadObject;d=d!==n?d:p?{}:[];var v=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),Q(a)(d,b.getAttribute(c)))}},u=function(a){if(c===n||c===k)g=m[k],l=f.trim(a.innerHTML),g&&g._bAttrSrc?(Q(g.mData._)(d,l),v(g.mData.sort,a),v(g.mData.type,a),v(g.mData.filter,a)):p?(g._setter||(g._setter=Q(g.mData)),g._setter(d,l)):d[k]=l;k++};if(h)for(;h;){var q=h.nodeName.toUpperCase();if("TD"==
|
37 |
+
q||"TH"==q)u(h),e.push(h);h=h.nextSibling}else for(e=b.anCells,h=0,q=e.length;h<q;h++)u(e[h]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&Q(a.rowId)(d,b);return{data:d,cells:e}}function Ka(a,b,c,d){var e=a.aoData[b],h=e._aData,g=[],k,l;if(null===e.nTr){var m=c||w.createElement("tr");e.nTr=m;e.anCells=g;m._DT_RowIndex=b;Oa(a,e);var p=0;for(k=a.aoColumns.length;p<k;p++){var v=a.aoColumns[p];var n=(l=c?!1:!0)?w.createElement(v.sCellType):d[p];n._DT_CellIndex={row:b,column:p};g.push(n);if(l||
|
38 |
+
!(c&&!v.mRender&&v.mData===p||f.isPlainObject(v.mData)&&v.mData._===p+".display"))n.innerHTML=F(a,b,p,"display");v.sClass&&(n.className+=" "+v.sClass);v.bVisible&&!c?m.appendChild(n):!v.bVisible&&c&&n.parentNode.removeChild(n);v.fnCreatedCell&&v.fnCreatedCell.call(a.oInstance,n,F(a,b,p),h,b,p)}A(a,"aoRowCreatedCallback",null,[m,h,b,g])}e.nTr.setAttribute("role","row")}function Oa(a,b){var c=b.nTr,d=b._aData;if(c){if(a=a.rowIdFn(d))c.id=a;d.DT_RowClass&&(a=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?
|
39 |
+
sa(b.__rowc.concat(a)):a,f(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&f(c).attr(d.DT_RowAttr);d.DT_RowData&&f(c).data(d.DT_RowData)}}function ob(a){var b,c,d=a.nTHead,e=a.nTFoot,h=0===f("th, td",d).length,g=a.oClasses,k=a.aoColumns;h&&(c=f("<tr/>").appendTo(d));var l=0;for(b=k.length;l<b;l++){var m=k[l];var p=f(m.nTh).addClass(m.sClass);h&&p.appendTo(c);a.oFeatures.bSort&&(p.addClass(m.sSortingClass),!1!==m.bSortable&&(p.attr("tabindex",a.iTabIndex).attr("aria-controls",
|
40 |
+
a.sTableId),Pa(a,m.nTh,l)));m.sTitle!=p[0].innerHTML&&p.html(m.sTitle);Qa(a,"header")(a,p,m,g)}h&&ea(a.aoHeader,d);f(d).find(">tr").attr("role","row");f(d).find(">tr>th, >tr>td").addClass(g.sHeaderTH);f(e).find(">tr>th, >tr>td").addClass(g.sFooterTH);if(null!==e)for(a=a.aoFooter[0],l=0,b=a.length;l<b;l++)m=k[l],m.nTf=a[l].cell,m.sClass&&f(m.nTf).addClass(m.sClass)}function fa(a,b,c){var d,e,h=[],g=[],k=a.aoColumns.length;if(b){c===n&&(c=!1);var l=0;for(d=b.length;l<d;l++){h[l]=b[l].slice();h[l].nTr=
|
41 |
+
b[l].nTr;for(e=k-1;0<=e;e--)a.aoColumns[e].bVisible||c||h[l].splice(e,1);g.push([])}l=0;for(d=h.length;l<d;l++){if(a=h[l].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=h[l].length;e<b;e++){var m=k=1;if(g[l][e]===n){a.appendChild(h[l][e].cell);for(g[l][e]=1;h[l+k]!==n&&h[l][e].cell==h[l+k][e].cell;)g[l+k][e]=1,k++;for(;h[l][e+m]!==n&&h[l][e].cell==h[l][e+m].cell;){for(c=0;c<k;c++)g[l+c][e+m]=1;m++}f(h[l][e].cell).attr("rowspan",k).attr("colspan",m)}}}}}function S(a){var b=A(a,"aoPreDrawCallback",
|
42 |
+
"preDraw",[a]);if(-1!==f.inArray(!1,b))J(a,!1);else{b=[];var c=0,d=a.asStripeClasses,e=d.length,h=a.oLanguage,g=a.iInitDisplayStart,k="ssp"==I(a),l=a.aiDisplay;a.bDrawing=!0;g!==n&&-1!==g&&(a._iDisplayStart=k?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);g=a._iDisplayStart;var m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,J(a,!1);else if(!k)a.iDraw++;else if(!a.bDestroying&&!pb(a))return;if(0!==l.length)for(h=k?a.aoData.length:m,k=k?0:g;k<h;k++){var p=l[k],v=a.aoData[p];
|
43 |
+
null===v.nTr&&Ka(a,p);var u=v.nTr;if(0!==e){var q=d[c%e];v._sRowStripe!=q&&(f(u).removeClass(v._sRowStripe).addClass(q),v._sRowStripe=q)}A(a,"aoRowCallback",null,[u,v._aData,c,k,p]);b.push(u);c++}else c=h.sZeroRecords,1==a.iDraw&&"ajax"==I(a)?c=h.sLoadingRecords:h.sEmptyTable&&0===a.fnRecordsTotal()&&(c=h.sEmptyTable),b[0]=f("<tr/>",{"class":e?d[0]:""}).append(f("<td />",{valign:"top",colSpan:V(a),"class":a.oClasses.sRowEmpty}).html(c))[0];A(a,"aoHeaderCallback","header",[f(a.nTHead).children("tr")[0],
|
44 |
+
Na(a),g,m,l]);A(a,"aoFooterCallback","footer",[f(a.nTFoot).children("tr")[0],Na(a),g,m,l]);d=f(a.nTBody);d.children().detach();d.append(f(b));A(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function U(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&qb(a);d?ha(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;S(a);a._drawHold=!1}function rb(a){var b=a.oClasses,c=f(a.nTable);c=f("<div/>").insertBefore(c);var d=a.oFeatures,e=
|
45 |
+
f("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),g,k,l,m,p,n,u=0;u<h.length;u++){g=null;k=h[u];if("<"==k){l=f("<div/>")[0];m=h[u+1];if("'"==m||'"'==m){p="";for(n=2;h[u+n]!=m;)p+=h[u+n],n++;"H"==p?p=b.sJUIHeader:"F"==p&&(p=b.sJUIFooter);-1!=p.indexOf(".")?(m=p.split("."),l.id=m[0].substr(1,m[0].length-1),l.className=m[1]):"#"==p.charAt(0)?l.id=p.substr(1,
|
46 |
+
p.length-1):l.className=p;u+=n}e.append(l);e=f(l)}else if(">"==k)e=e.parent();else if("l"==k&&d.bPaginate&&d.bLengthChange)g=sb(a);else if("f"==k&&d.bFilter)g=tb(a);else if("r"==k&&d.bProcessing)g=ub(a);else if("t"==k)g=vb(a);else if("i"==k&&d.bInfo)g=wb(a);else if("p"==k&&d.bPaginate)g=xb(a);else if(0!==q.ext.feature.length)for(l=q.ext.feature,n=0,m=l.length;n<m;n++)if(k==l[n].cFeature){g=l[n].fnInit(a);break}g&&(l=a.aanFeatures,l[k]||(l[k]=[]),l[k].push(g),e.append(g))}c.replaceWith(e);a.nHolding=
|
47 |
+
null}function ea(a,b){b=f(b).children("tr");var c,d,e;a.splice(0,a.length);var h=0;for(e=b.length;h<e;h++)a.push([]);h=0;for(e=b.length;h<e;h++){var g=b[h];for(c=g.firstChild;c;){if("TD"==c.nodeName.toUpperCase()||"TH"==c.nodeName.toUpperCase()){var k=1*c.getAttribute("colspan");var l=1*c.getAttribute("rowspan");k=k&&0!==k&&1!==k?k:1;l=l&&0!==l&&1!==l?l:1;var m=0;for(d=a[h];d[m];)m++;var p=m;var n=1===k?!0:!1;for(d=0;d<k;d++)for(m=0;m<l;m++)a[h+m][p+d]={cell:c,unique:n},a[h+m].nTr=g}c=c.nextSibling}}}
|
48 |
+
function ta(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],ea(c,b)));b=0;for(var e=c.length;b<e;b++)for(var h=0,g=c[b].length;h<g;h++)!c[b][h].unique||d[h]&&a.bSortCellsTop||(d[h]=c[b][h].cell);return d}function ua(a,b,c){A(a,"aoServerParams","serverParams",[b]);if(b&&f.isArray(b)){var d={},e=/(.*?)\[\]$/;f.each(b,function(a,b){(a=b.name.match(e))?(a=a[0],d[a]||(d[a]=[]),d[a].push(b.value)):d[b.name]=b.value});b=d}var h=a.ajax,g=a.oInstance,k=function(b){A(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(f.isPlainObject(h)&&
|
49 |
+
h.data){var l=h.data;var m="function"===typeof l?l(b,a):l;b="function"===typeof l&&m?m:f.extend(!0,b,m);delete h.data}m={data:b,success:function(b){var c=b.error||b.sError;c&&O(a,0,c);a.json=b;k(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c,d){d=A(a,null,"xhr",[a,null,a.jqXHR]);-1===f.inArray(!0,d)&&("parsererror"==c?O(a,0,"Invalid JSON response",1):4===b.readyState&&O(a,0,"Ajax error",7));J(a,!1)}};a.oAjaxData=b;A(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(g,
|
50 |
+
a.sAjaxSource,f.map(b,function(a,b){return{name:b,value:a}}),k,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=f.ajax(f.extend(m,{url:h||a.sAjaxSource})):"function"===typeof h?a.jqXHR=h.call(g,b,k,a):(a.jqXHR=f.ajax(f.extend(m,h)),h.data=l)}function pb(a){return a.bAjaxDataGet?(a.iDraw++,J(a,!0),ua(a,yb(a),function(b){zb(a,b)}),!1):!0}function yb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,h=a.aoPreSearchCols,g=[],k=X(a);var l=a._iDisplayStart;var m=!1!==d.bPaginate?a._iDisplayLength:
|
51 |
+
-1;var p=function(a,b){g.push({name:a,value:b})};p("sEcho",a.iDraw);p("iColumns",c);p("sColumns",K(b,"sName").join(","));p("iDisplayStart",l);p("iDisplayLength",m);var n={draw:a.iDraw,columns:[],order:[],start:l,length:m,search:{value:e.sSearch,regex:e.bRegex}};for(l=0;l<c;l++){var u=b[l];var ra=h[l];m="function"==typeof u.mData?"function":u.mData;n.columns.push({data:m,name:u.sName,searchable:u.bSearchable,orderable:u.bSortable,search:{value:ra.sSearch,regex:ra.bRegex}});p("mDataProp_"+l,m);d.bFilter&&
|
52 |
+
(p("sSearch_"+l,ra.sSearch),p("bRegex_"+l,ra.bRegex),p("bSearchable_"+l,u.bSearchable));d.bSort&&p("bSortable_"+l,u.bSortable)}d.bFilter&&(p("sSearch",e.sSearch),p("bRegex",e.bRegex));d.bSort&&(f.each(k,function(a,b){n.order.push({column:b.col,dir:b.dir});p("iSortCol_"+a,b.col);p("sSortDir_"+a,b.dir)}),p("iSortingCols",k.length));b=q.ext.legacy.ajax;return null===b?a.sAjaxSource?g:n:b?g:n}function zb(a,b){var c=function(a,c){return b[a]!==n?b[a]:b[c]},d=va(a,b),e=c("sEcho","draw"),h=c("iTotalRecords",
|
53 |
+
"recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==n){if(1*e<a.iDraw)return;a.iDraw=1*e}pa(a);a._iRecordsTotal=parseInt(h,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(h=d.length;e<h;e++)R(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;S(a);a._bInitComplete||wa(a,b);a.bAjaxDataGet=!0;J(a,!1)}function va(a,b){a=f.isPlainObject(a.ajax)&&a.ajax.dataSrc!==n?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===a?b.aaData||b[a]:""!==a?T(a)(b):b}function tb(a){var b=a.oClasses,
|
54 |
+
c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,h=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',k=d.sSearch;k=k.match(/_INPUT_/)?k.replace("_INPUT_",g):k+g;b=f("<div/>",{id:h.f?null:c+"_filter","class":b.sFilter}).append(f("<label/>").append(k));var l=function(){var b=this.value?this.value:"";b!=e.sSearch&&(ha(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,S(a))};h=null!==a.searchDelay?a.searchDelay:"ssp"===I(a)?400:0;var m=
|
55 |
+
f("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?Ra(l,h):l).on("mouseup",function(a){setTimeout(function(){l.call(m[0])},10)}).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);f(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{m[0]!==w.activeElement&&m.val(e.sSearch)}catch(u){}});return b[0]}function ha(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,h=function(a){d.sSearch=a.sSearch;d.bRegex=
|
56 |
+
a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive},g=function(a){return a.bEscapeRegex!==n?!a.bEscapeRegex:a.bRegex};Ja(a);if("ssp"!=I(a)){Ab(a,b.sSearch,c,g(b),b.bSmart,b.bCaseInsensitive);h(b);for(b=0;b<e.length;b++)Bb(a,e[b].sSearch,b,g(e[b]),e[b].bSmart,e[b].bCaseInsensitive);Cb(a)}else h(b);a.bFiltered=!0;A(a,null,"search",[a])}function Cb(a){for(var b=q.ext.search,c=a.aiDisplay,d,e,h=0,g=b.length;h<g;h++){for(var k=[],l=0,m=c.length;l<m;l++)e=c[l],d=a.aoData[e],b[h](a,d._aFilterData,
|
57 |
+
e,d._aData,l)&&k.push(e);c.length=0;f.merge(c,k)}}function Bb(a,b,c,d,e,h){if(""!==b){var g=[],k=a.aiDisplay;d=Sa(b,d,e,h);for(e=0;e<k.length;e++)b=a.aoData[k[e]]._aFilterData[c],d.test(b)&&g.push(k[e]);a.aiDisplay=g}}function Ab(a,b,c,d,e,h){e=Sa(b,d,e,h);var g=a.oPreviousSearch.sSearch,k=a.aiDisplayMaster;h=[];0!==q.ext.search.length&&(c=!0);var f=Db(a);if(0>=b.length)a.aiDisplay=k.slice();else{if(f||c||d||g.length>b.length||0!==b.indexOf(g)||a.bSorted)a.aiDisplay=k.slice();b=a.aiDisplay;for(c=
|
58 |
+
0;c<b.length;c++)e.test(a.aoData[b[c]]._sFilterRow)&&h.push(b[c]);a.aiDisplay=h}}function Sa(a,b,c,d){a=b?a:Ta(a);c&&(a="^(?=.*?"+f.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0)){var b=a.match(/^"(.*)"$/);a=b?b[1]:a}return a.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(a,d?"i":"")}function Db(a){var b=a.aoColumns,c,d,e=q.ext.type.search;var h=!1;var g=0;for(c=a.aoData.length;g<c;g++){var k=a.aoData[g];if(!k._aFilterData){var f=[];var m=0;for(d=b.length;m<d;m++){h=
|
59 |
+
b[m];if(h.bSearchable){var p=F(a,g,m,"filter");e[h.sType]&&(p=e[h.sType](p));null===p&&(p="");"string"!==typeof p&&p.toString&&(p=p.toString())}else p="";p.indexOf&&-1!==p.indexOf("&")&&(xa.innerHTML=p,p=$b?xa.textContent:xa.innerText);p.replace&&(p=p.replace(/[\r\n\u2028]/g,""));f.push(p)}k._aFilterData=f;k._sFilterRow=f.join(" ");h=!0}}return h}function Eb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Fb(a){return{sSearch:a.search,bSmart:a.smart,
|
60 |
+
bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function wb(a){var b=a.sTableId,c=a.aanFeatures.i,d=f("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:Gb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),f(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Gb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),h=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),k=g?c.sInfo:c.sInfoEmpty;
|
61 |
+
g!==h&&(k+=" "+c.sInfoFiltered);k+=c.sInfoPostFix;k=Hb(a,k);c=c.fnInfoCallback;null!==c&&(k=c.call(a.oInstance,a,d,e,h,g,k));f(b).html(k)}}function Hb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,h=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,h)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(h/
|
62 |
+
e)))}function ia(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){rb(a);ob(a);fa(a,a.aoHeader);fa(a,a.aoFooter);J(a,!0);d.bAutoWidth&&Ia(a);var h=0;for(d=c.length;h<d;h++){var g=c[h];g.sWidth&&(g.nTh.style.width=B(g.sWidth))}A(a,null,"preInit",[a]);U(a);c=I(a);if("ssp"!=c||e)"ajax"==c?ua(a,[],function(c){var d=va(a,c);for(h=0;h<d.length;h++)R(a,d[h]);a.iInitDisplayStart=b;U(a);J(a,!1);wa(a,c)},a):(J(a,!1),wa(a))}else setTimeout(function(){ia(a)},
|
63 |
+
200)}function wa(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&Z(a);A(a,null,"plugin-init",[a,b]);A(a,"aoInitComplete","init",[a,b])}function Ua(a,b){b=parseInt(b,10);a._iDisplayLength=b;Va(a);A(a,null,"length",[a,b])}function sb(a){var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=f.isArray(d[0]),h=e?d[0]:d;d=e?d[1]:d;e=f("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var g=0,k=h.length;g<k;g++)e[0][g]=new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],h[g]);
|
64 |
+
var l=f("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(l[0].id=c+"_length");l.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));f("select",l).val(a._iDisplayLength).on("change.DT",function(b){Ua(a,f(this).val());S(a)});f(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&f("select",l).val(d)});return l[0]}function xb(a){var b=a.sPaginationType,c=q.ext.pager[b],d="function"===typeof c,e=function(a){S(a)};b=f("<div/>").addClass(a.oClasses.sPaging+b)[0];var h=
|
65 |
+
a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,g=a._iDisplayLength,f=a.fnRecordsDisplay(),p=-1===g;b=p?0:Math.ceil(b/g);g=p?1:Math.ceil(f/g);f=c(b,g);var n;p=0;for(n=h.p.length;p<n;p++)Qa(a,"pageButton")(a,h.p[p],p,f,b,g)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Wa(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,h=a.fnRecordsDisplay();0===h||-1===e?d=0:"number"===typeof b?(d=b*e,d>h&&(d=0)):
|
66 |
+
"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<h&&(d+=e):"last"==b?d=Math.floor((h-1)/e)*e:O(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(A(a,null,"page",[a]),c&&S(a));return b}function ub(a){return f("<div/>",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function J(a,b){a.oFeatures.bProcessing&&f(a.aanFeatures.r).css("display",b?"block":"none");A(a,
|
67 |
+
null,"processing",[a,b])}function vb(a){var b=f(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,h=a.oClasses,g=b.children("caption"),k=g.length?g[0]._captionSide:null,l=f(b[0].cloneNode(!1)),m=f(b[0].cloneNode(!1)),p=b.children("tfoot");p.length||(p=null);l=f("<div/>",{"class":h.sScrollWrapper}).append(f("<div/>",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?B(d):null:"100%"}).append(f("<div/>",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",
|
68 |
+
width:c.sXInner||"100%"}).append(l.removeAttr("id").css("margin-left",0).append("top"===k?g:null).append(b.children("thead"))))).append(f("<div/>",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?B(d):null}).append(b));p&&l.append(f("<div/>",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?B(d):null:"100%"}).append(f("<div/>",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===k?g:null).append(b.children("tfoot")))));
|
69 |
+
b=l.children();var n=b[0];h=b[1];var u=p?b[2]:null;if(d)f(h).on("scroll.DT",function(a){a=this.scrollLeft;n.scrollLeft=a;p&&(u.scrollLeft=a)});f(h).css("max-height",e);c.bCollapse||f(h).css("height",e);a.nScrollHead=n;a.nScrollBody=h;a.nScrollFoot=u;a.aoDrawCallback.push({fn:ma,sName:"scrolling"});return l[0]}function ma(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=f(a.nScrollHead),g=h[0].style,k=h.children("div"),l=k[0].style,m=k.children("table");k=a.nScrollBody;var p=f(k),v=
|
70 |
+
k.style,u=f(a.nScrollFoot).children("div"),q=u.children("table"),t=f(a.nTHead),r=f(a.nTable),x=r[0],ya=x.style,w=a.nTFoot?f(a.nTFoot):null,y=a.oBrowser,A=y.bScrollOversize,ac=K(a.aoColumns,"nTh"),Xa=[],z=[],C=[],G=[],H,I=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};var D=k.scrollHeight>k.clientHeight;if(a.scrollBarVis!==D&&a.scrollBarVis!==n)a.scrollBarVis=D,Z(a);else{a.scrollBarVis=D;r.children("thead, tfoot").remove();if(w){var E=
|
71 |
+
w.clone().prependTo(r);var F=w.find("tr");E=E.find("tr")}var J=t.clone().prependTo(r);t=t.find("tr");D=J.find("tr");J.find("th, td").removeAttr("tabindex");c||(v.width="100%",h[0].style.width="100%");f.each(ta(a,J),function(b,c){H=aa(a,b);c.style.width=a.aoColumns[H].sWidth});w&&N(function(a){a.style.width=""},E);h=r.outerWidth();""===c?(ya.width="100%",A&&(r.find("tbody").height()>k.offsetHeight||"scroll"==p.css("overflow-y"))&&(ya.width=B(r.outerWidth()-b)),h=r.outerWidth()):""!==d&&(ya.width=B(d),
|
72 |
+
h=r.outerWidth());N(I,D);N(function(a){C.push(a.innerHTML);Xa.push(B(f(a).css("width")))},D);N(function(a,b){-1!==f.inArray(a,ac)&&(a.style.width=Xa[b])},t);f(D).height(0);w&&(N(I,E),N(function(a){G.push(a.innerHTML);z.push(B(f(a).css("width")))},E),N(function(a,b){a.style.width=z[b]},F),f(E).height(0));N(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+C[b]+"</div>";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=Xa[b]},D);w&&N(function(a,b){a.innerHTML=
|
73 |
+
'<div class="dataTables_sizing">'+G[b]+"</div>";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=z[b]},E);r.outerWidth()<h?(F=k.scrollHeight>k.offsetHeight||"scroll"==p.css("overflow-y")?h+b:h,A&&(k.scrollHeight>k.offsetHeight||"scroll"==p.css("overflow-y"))&&(ya.width=B(F-b)),""!==c&&""===d||O(a,1,"Possible column misalignment",6)):F="100%";v.width=B(F);g.width=B(F);w&&(a.nScrollFoot.style.width=B(F));!e&&A&&(v.height=B(x.offsetHeight+b));c=r.outerWidth();m[0].style.width=
|
74 |
+
B(c);l.width=B(c);d=r.height()>k.clientHeight||"scroll"==p.css("overflow-y");e="padding"+(y.bScrollbarLeft?"Left":"Right");l[e]=d?b+"px":"0px";w&&(q[0].style.width=B(c),u[0].style.width=B(c),u[0].style[e]=d?b+"px":"0px");r.children("colgroup").insertBefore(r.children("thead"));p.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(k.scrollTop=0)}}function N(a,b,c){for(var d=0,e=0,h=b.length,g,k;e<h;){g=b[e].firstChild;for(k=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,k,d):a(g,d),d++),g=
|
75 |
+
g.nextSibling,k=c?k.nextSibling:null;e++}}function Ia(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,h=d.sX,g=d.sXInner,k=c.length,l=na(a,"bVisible"),m=f("th",a.nTHead),p=b.getAttribute("width"),n=b.parentNode,u=!1,q,t=a.oBrowser;d=t.bScrollOversize;(q=b.style.width)&&-1!==q.indexOf("%")&&(p=q);for(q=0;q<l.length;q++){var r=c[l[q]];null!==r.sWidth&&(r.sWidth=Ib(r.sWidthOrig,n),u=!0)}if(d||!u&&!h&&!e&&k==V(a)&&k==m.length)for(q=0;q<k;q++)l=aa(a,q),null!==l&&(c[l].sWidth=B(m.eq(q).width()));else{k=
|
76 |
+
f(b).clone().css("visibility","hidden").removeAttr("id");k.find("tbody tr").remove();var w=f("<tr/>").appendTo(k.find("tbody"));k.find("thead, tfoot").remove();k.append(f(a.nTHead).clone()).append(f(a.nTFoot).clone());k.find("tfoot th, tfoot td").css("width","");m=ta(a,k.find("thead")[0]);for(q=0;q<l.length;q++)r=c[l[q]],m[q].style.width=null!==r.sWidthOrig&&""!==r.sWidthOrig?B(r.sWidthOrig):"",r.sWidthOrig&&h&&f(m[q]).append(f("<div/>").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));
|
77 |
+
if(a.aoData.length)for(q=0;q<l.length;q++)u=l[q],r=c[u],f(Jb(a,u)).clone(!1).append(r.sContentPadding).appendTo(w);f("[name]",k).removeAttr("name");r=f("<div/>").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(k).appendTo(n);h&&g?k.width(g):h?(k.css("width","auto"),k.removeAttr("width"),k.width()<n.clientWidth&&p&&k.width(n.clientWidth)):e?k.width(n.clientWidth):p&&k.width(p);for(q=e=0;q<l.length;q++)n=f(m[q]),g=n.outerWidth()-n.width(),n=t.bBounding?Math.ceil(m[q].getBoundingClientRect().width):
|
78 |
+
n.outerWidth(),e+=n,c[l[q]].sWidth=B(n-g);b.style.width=B(e);r.remove()}p&&(b.style.width=B(p));!p&&!h||a._reszEvt||(b=function(){f(y).on("resize.DT-"+a.sInstance,Ra(function(){Z(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0)}function Ib(a,b){if(!a)return 0;a=f("<div/>").css("width",B(a)).appendTo(b||w.body);b=a[0].offsetWidth;a.remove();return b}function Jb(a,b){var c=Kb(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:f("<td/>").html(F(a,c,b,"display"))[0]}function Kb(a,b){for(var c,
|
79 |
+
d=-1,e=-1,h=0,g=a.aoData.length;h<g;h++)c=F(a,h,b,"display")+"",c=c.replace(bc,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=h);return e}function B(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=a.aoColumns;var d=a.aaSortingFixed;var e=f.isPlainObject(d);var h=[];var g=function(a){a.length&&!f.isArray(a[0])?h.push(a):f.merge(h,a)};f.isArray(d)&&g(d);e&&d.pre&&g(d.pre);g(a.aaSorting);e&&d.post&&g(d.post);for(a=0;a<h.length;a++){var k=
|
80 |
+
h[a][0];g=c[k].aDataSort;d=0;for(e=g.length;d<e;d++){var l=g[d];var m=c[l].sType||"string";h[a]._idx===n&&(h[a]._idx=f.inArray(h[a][1],c[l].asSorting));b.push({src:k,col:l,dir:h[a][1],index:h[a]._idx,type:m,formatter:q.ext.type.order[m+"-pre"]})}}return b}function qb(a){var b,c=[],d=q.ext.type.order,e=a.aoData,h=0,g=a.aiDisplayMaster;Ja(a);var k=X(a);var f=0;for(b=k.length;f<b;f++){var m=k[f];m.formatter&&h++;Lb(a,m.col)}if("ssp"!=I(a)&&0!==k.length){f=0;for(b=g.length;f<b;f++)c[g[f]]=f;h===k.length?
|
81 |
+
g.sort(function(a,b){var d,h=k.length,g=e[a]._aSortData,f=e[b]._aSortData;for(d=0;d<h;d++){var l=k[d];var m=g[l.col];var p=f[l.col];m=m<p?-1:m>p?1:0;if(0!==m)return"asc"===l.dir?m:-m}m=c[a];p=c[b];return m<p?-1:m>p?1:0}):g.sort(function(a,b){var h,g=k.length,f=e[a]._aSortData,l=e[b]._aSortData;for(h=0;h<g;h++){var m=k[h];var p=f[m.col];var n=l[m.col];m=d[m.type+"-"+m.dir]||d["string-"+m.dir];p=m(p,n);if(0!==p)return p}p=c[a];n=c[b];return p<n?-1:p>n?1:0})}a.bSorted=!0}function Mb(a){var b=a.aoColumns,
|
82 |
+
c=X(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d<e;d++){var h=b[d];var g=h.asSorting;var k=h.sTitle.replace(/<.*?>/g,"");var f=h.nTh;f.removeAttribute("aria-sort");h.bSortable&&(0<c.length&&c[0].col==d?(f.setAttribute("aria-sort","asc"==c[0].dir?"ascending":"descending"),h=g[c[0].index+1]||g[0]):h=g[0],k+="asc"===h?a.sSortAscending:a.sSortDescending);f.setAttribute("aria-label",k)}}function Ya(a,b,c,d){var e=a.aaSorting,h=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===n&&(c=f.inArray(a[1],
|
83 |
+
h));return c+1<h.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=f.inArray(b,K(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]=h[b],e[c]._idx=b)):(e.push([b,h[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=h[b],e[0]._idx=b):(e.length=0,e.push([b,h[0]]),e[0]._idx=0);U(a);"function"==typeof d&&d(a)}function Pa(a,b,c,d){var e=a.aoColumns[c];Za(b,{},function(b){!1!==e.bSortable&&
|
84 |
+
(a.oFeatures.bProcessing?(J(a,!0),setTimeout(function(){Ya(a,c,b.shiftKey,d);"ssp"!==I(a)&&J(a,!1)},0)):Ya(a,c,b.shiftKey,d))})}function za(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=X(a),e=a.oFeatures,h;if(e.bSort&&e.bSortClasses){e=0;for(h=b.length;e<h;e++){var g=b[e].src;f(K(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3))}e=0;for(h=d.length;e<h;e++)g=d[e].src,f(K(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Lb(a,b){var c=a.aoColumns[b],d=q.ext.order[c.sSortDataType],
|
85 |
+
e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var h,g=q.ext.type.order[c.sType+"-pre"],f=0,l=a.aoData.length;f<l;f++)if(c=a.aoData[f],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)h=d?e[f]:F(a,f,b,"sort"),c._aSortData[b]=g?g(h):h}function Aa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:f.extend(!0,[],a.aaSorting),search:Eb(a.oPreviousSearch),columns:f.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Eb(a.aoPreSearchCols[d])}})};
|
86 |
+
A(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Nb(a,b,c){var d,e,h=a.aoColumns;b=function(b){if(b&&b.time){var g=A(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===f.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g||b.columns&&h.length!==b.columns.length))){a.oLoadedState=f.extend(!0,{},b);b.start!==n&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==n&&(a._iDisplayLength=b.length);b.order!==
|
87 |
+
n&&(a.aaSorting=[],f.each(b.order,function(b,c){a.aaSorting.push(c[0]>=h.length?[0,c[1]]:c)}));b.search!==n&&f.extend(a.oPreviousSearch,Fb(b.search));if(b.columns)for(d=0,e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==n&&(h[d].bVisible=g.visible),g.search!==n&&f.extend(a.aoPreSearchCols[d],Fb(g.search));A(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==n&&b(g)}else c()}function Ba(a){var b=q.settings;a=f.inArray(a,
|
88 |
+
K(b,"nTable"));return-1!==a?b[a]:null}function O(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)y.console&&console.log&&console.log(c);else if(b=q.ext,b=b.sErrMode||b.errMode,a&&A(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function M(a,b,c,d){f.isArray(c)?f.each(c,function(c,d){f.isArray(d)?M(a,b,d[0],d[1]):M(a,b,
|
89 |
+
d)}):(d===n&&(d=c),b[c]!==n&&(a[d]=b[c]))}function $a(a,b,c){var d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];f.isPlainObject(e)?(f.isPlainObject(a[d])||(a[d]={}),f.extend(!0,a[d],e)):c&&"data"!==d&&"aaData"!==d&&f.isArray(e)?a[d]=e.slice():a[d]=e}return a}function Za(a,b,c){f(a).on("click.DT",b,function(b){f(a).trigger("blur");c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function D(a,b,c,d){c&&a[b].push({fn:c,sName:d})}
|
90 |
+
function A(a,b,c,d){var e=[];b&&(e=f.map(a[b].slice().reverse(),function(b,c){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=f.Event(c+".dt"),f(a.nTable).trigger(b,d),e.push(b.result));return e}function Va(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 Qa(a,b){a=a.renderer;var c=q.ext.renderer[b];return f.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}function I(a){return a.oFeatures.bServerSide?
|
91 |
+
"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ja(a,b){var c=Ob.numbers_length,d=Math.floor(c/2);b<=c?a=Y(0,b):a<=d?(a=Y(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=Y(b-(c-2),b):(a=Y(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function Ga(a){f.each({num:function(b){return Ca(b,a)},"num-fmt":function(b){return Ca(b,a,ab)},"html-num":function(b){return Ca(b,a,Da)},"html-num-fmt":function(b){return Ca(b,a,Da,ab)}},function(b,
|
92 |
+
c){C.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(C.type.search[b+a]=C.type.search.html)})}function Pb(a){return function(){var b=[Ba(this[q.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return q.ext.internal[a].apply(this,b)}}var q=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 x(Ba(this[C.iApiIndex])):new x(this)};this.fnAddData=function(a,b){var c=this.api(!0);a=f.isArray(a)&&
|
93 |
+
(f.isArray(a[0])||f.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===n||b)&&c.draw();return a.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===n||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ma(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===n||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0);a=d.rows(a);var e=a.settings()[0],h=e.aoData[a[0][0]];
|
94 |
+
a.remove();b&&b.call(this,e,h);(c===n||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,f){e=this.api(!0);null===b||b===n?e.search(a,c,d,f):e.column(b).search(a,c,d,f);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==n){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==n||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=
|
95 |
+
function(a){var b=this.api(!0);return a!==n?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]};this.fnPageChange=function(a,b){a=this.api(!0).page(a);(b===n||
|
96 |
+
b)&&a.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===n||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return Ba(this[C.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===n||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===n||e)&&h.columns.adjust();(d===n||d)&&h.draw();return 0};this.fnVersionCheck=C.fnVersionCheck;
|
97 |
+
var b=this,c=a===n,d=this.length;c&&(a={});this.oApi=this.internal=C.internal;for(var e in q.ext.internal)e&&(this[e]=Pb(e));this.each(function(){var e={},g=1<d?$a(e,a,!0):a,k=0,l;e=this.getAttribute("id");var m=!1,p=q.defaults,v=f(this);if("table"!=this.nodeName.toLowerCase())O(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{ib(p);jb(p.column);L(p,p,!0);L(p.column,p.column,!0);L(p,f.extend(g,v.data()),!0);var u=q.settings;k=0;for(l=u.length;k<l;k++){var t=u[k];if(t.nTable==this||
|
98 |
+
t.nTHead&&t.nTHead.parentNode==this||t.nTFoot&&t.nTFoot.parentNode==this){var w=g.bRetrieve!==n?g.bRetrieve:p.bRetrieve;if(c||w)return t.oInstance;if(g.bDestroy!==n?g.bDestroy:p.bDestroy){t.oInstance.fnDestroy();break}else{O(t,0,"Cannot reinitialise DataTable",3);return}}if(t.sTableId==this.id){u.splice(k,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+q.ext._unique++;var r=f.extend(!0,{},q.models.oSettings,{sDestroyWidth:v[0].style.width,sInstance:e,sTableId:e});r.nTable=this;r.oApi=
|
99 |
+
b.internal;r.oInit=g;u.push(r);r.oInstance=1===b.length?b:v.dataTable();ib(g);Fa(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=f.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=$a(f.extend(!0,{},p),g);M(r.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));M(r,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu",
|
100 |
+
"sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);M(r.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);M(r.oLanguage,g,"fnInfoCallback");D(r,"aoDrawCallback",g.fnDrawCallback,
|
101 |
+
"user");D(r,"aoServerParams",g.fnServerParams,"user");D(r,"aoStateSaveParams",g.fnStateSaveParams,"user");D(r,"aoStateLoadParams",g.fnStateLoadParams,"user");D(r,"aoStateLoaded",g.fnStateLoaded,"user");D(r,"aoRowCallback",g.fnRowCallback,"user");D(r,"aoRowCreatedCallback",g.fnCreatedRow,"user");D(r,"aoHeaderCallback",g.fnHeaderCallback,"user");D(r,"aoFooterCallback",g.fnFooterCallback,"user");D(r,"aoInitComplete",g.fnInitComplete,"user");D(r,"aoPreDrawCallback",g.fnPreDrawCallback,"user");r.rowIdFn=
|
102 |
+
T(g.rowId);kb(r);var x=r.oClasses;f.extend(x,q.ext.classes,g.oClasses);v.addClass(x.sTable);r.iInitDisplayStart===n&&(r.iInitDisplayStart=g.iDisplayStart,r._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(r.bDeferLoading=!0,e=f.isArray(g.iDeferLoading),r._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,r._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var y=r.oLanguage;f.extend(!0,y,g.oLanguage);y.sUrl&&(f.ajax({dataType:"json",url:y.sUrl,success:function(a){Fa(a);L(p.oLanguage,
|
103 |
+
a);f.extend(!0,y,a);ia(r)},error:function(){ia(r)}}),m=!0);null===g.asStripeClasses&&(r.asStripeClasses=[x.sStripeOdd,x.sStripeEven]);e=r.asStripeClasses;var z=v.children("tbody").find("tr").eq(0);-1!==f.inArray(!0,f.map(e,function(a,b){return z.hasClass(a)}))&&(f("tbody tr",this).removeClass(e.join(" ")),r.asDestroyStripes=e.slice());e=[];u=this.getElementsByTagName("thead");0!==u.length&&(ea(r.aoHeader,u[0]),e=ta(r));if(null===g.aoColumns)for(u=[],k=0,l=e.length;k<l;k++)u.push(null);else u=g.aoColumns;
|
104 |
+
k=0;for(l=u.length;k<l;k++)Ha(r,e?e[k]:null);mb(r,g.aoColumnDefs,u,function(a,b){la(r,a,b)});if(z.length){var B=function(a,b){return null!==a.getAttribute("data-"+b)?b:null};f(z[0]).children("th, td").each(function(a,b){var c=r.aoColumns[a];if(c.mData===a){var d=B(b,"sort")||B(b,"order");b=B(b,"filter")||B(b,"search");if(null!==d||null!==b)c.mData={_:a+".display",sort:null!==d?a+".@data-"+d:n,type:null!==d?a+".@data-"+d:n,filter:null!==b?a+".@data-"+b:n},la(r,a)}})}var C=r.oFeatures;e=function(){if(g.aaSorting===
|
105 |
+
n){var a=r.aaSorting;k=0;for(l=a.length;k<l;k++)a[k][1]=r.aoColumns[k].asSorting[0]}za(r);C.bSort&&D(r,"aoDrawCallback",function(){if(r.bSorted){var a=X(r),b={};f.each(a,function(a,c){b[c.src]=c.dir});A(r,null,"order",[r,a,b]);Mb(r)}});D(r,"aoDrawCallback",function(){(r.bSorted||"ssp"===I(r)||C.bDeferRender)&&za(r)},"sc");a=v.children("caption").each(function(){this._captionSide=f(this).css("caption-side")});var b=v.children("thead");0===b.length&&(b=f("<thead/>").appendTo(v));r.nTHead=b[0];b=v.children("tbody");
|
106 |
+
0===b.length&&(b=f("<tbody/>").appendTo(v));r.nTBody=b[0];b=v.children("tfoot");0===b.length&&0<a.length&&(""!==r.oScroll.sX||""!==r.oScroll.sY)&&(b=f("<tfoot/>").appendTo(v));0===b.length||0===b.children().length?v.addClass(x.sNoFooter):0<b.length&&(r.nTFoot=b[0],ea(r.aoFooter,r.nTFoot));if(g.aaData)for(k=0;k<g.aaData.length;k++)R(r,g.aaData[k]);else(r.bDeferLoading||"dom"==I(r))&&oa(r,f(r.nTBody).children("tr"));r.aiDisplay=r.aiDisplayMaster.slice();r.bInitialised=!0;!1===m&&ia(r)};g.bStateSave?
|
107 |
+
(C.bStateSave=!0,D(r,"aoDrawCallback",Aa,"state_save"),Nb(r,g,e)):e()}});b=null;return this},C,t,z,bb={},Qb=/[\r\n\u2028]/g,Da=/<.*?>/g,cc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,dc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,ab=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,P=function(a){return a&&!0!==a&&"-"!==a?!1:!0},Rb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Sb=function(a,b){bb[b]||(bb[b]=new RegExp(Ta(b),"g"));
|
108 |
+
return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(bb[b],"."):a},cb=function(a,b,c){var d="string"===typeof a;if(P(a))return!0;b&&d&&(a=Sb(a,b));c&&d&&(a=a.replace(ab,""));return!isNaN(parseFloat(a))&&isFinite(a)},Tb=function(a,b,c){return P(a)?!0:P(a)||"string"===typeof a?cb(a.replace(Da,""),b,c)?!0:null:null},K=function(a,b,c){var d=[],e=0,h=a.length;if(c!==n)for(;e<h;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<h;e++)a[e]&&d.push(a[e][b]);return d},ka=function(a,b,c,d){var e=[],
|
109 |
+
h=0,g=b.length;if(d!==n)for(;h<g;h++)a[b[h]][c]&&e.push(a[b[h]][c][d]);else for(;h<g;h++)e.push(a[b[h]][c]);return e},Y=function(a,b){var c=[];if(b===n){b=0;var d=a}else d=b,b=a;for(a=b;a<d;a++)c.push(a);return c},Ub=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},sa=function(a){a:{if(!(2>a.length)){var 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();b=[];e=a.length;var h,g=0;d=0;a:for(;d<e;d++){c=
|
110 |
+
a[d];for(h=0;h<g;h++)if(b[h]===c)continue a;b.push(c);g++}return b};q.util={throttle:function(a,b){var c=b!==n?b:200,d,e;return function(){var b=this,g=+new Date,f=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=n;a.apply(b,f)},c)):(d=g,a.apply(b,f))}},escapeRegex:function(a){return a.replace(dc,"\\$1")}};var E=function(a,b,c){a[b]!==n&&(a[c]=a[b])},ca=/\[.*?\]$/,W=/\(\)$/,Ta=q.util.escapeRegex,xa=f("<div>")[0],$b=xa.textContent!==n,bc=/<.*?>/g,Ra=q.util.throttle,Vb=[],G=Array.prototype,
|
111 |
+
ec=function(a){var b,c=q.settings,d=f.map(c,function(a,b){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=f.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=f(a):a instanceof f&&(b=a)}else return[];if(b)return b.map(function(a){e=f.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var x=function(a,b){if(!(this instanceof x))return new x(a,b);var c=[],d=function(a){(a=
|
112 |
+
ec(a))&&c.push.apply(c,a)};if(f.isArray(a))for(var e=0,h=a.length;e<h;e++)d(a[e]);else d(a);this.context=sa(c);b&&f.merge(this,b);this.selector={rows:null,cols:null,opts:null};x.extend(this,this,Vb)};q.Api=x;f.extend(x.prototype,{any:function(){return 0!==this.count()},concat:G.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=this.context;return b.length>a?new x(b[a],this[a]):
|
113 |
+
null},filter:function(a){var b=[];if(G.filter)b=G.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 x(this.context,b)},flatten:function(){var a=[];return new x(this.context,a.concat.apply(a,this.toArray()))},join:G.join,indexOf:G.indexOf||function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1},iterator:function(a,b,c,d){var e=[],h,g,f=this.context,l,m=this.selector;"string"===typeof a&&(d=c,c=b,b=a,
|
114 |
+
a=!1);var p=0;for(h=f.length;p<h;p++){var q=new x(f[p]);if("table"===b){var u=c.call(q,f[p],p);u!==n&&e.push(u)}else if("columns"===b||"rows"===b)u=c.call(q,f[p],this[p],p),u!==n&&e.push(u);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){var t=this[p];"column-rows"===b&&(l=Ea(f[p],m.opts));var w=0;for(g=t.length;w<g;w++)u=t[w],u="cell"===b?c.call(q,f[p],u.row,u.column,p,w):c.call(q,f[p],u,p,w,l),u!==n&&e.push(u)}}return e.length||d?(a=new x(f,a?e.concat.apply([],e):e),b=a.selector,
|
115 |
+
b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,a):this},lastIndexOf:G.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(G.map)b=G.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 x(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:G.pop,push:G.push,reduce:G.reduce||function(a,b){return lb(this,a,b,0,this.length,1)},reduceRight:G.reduceRight||function(a,
|
116 |
+
b){return lb(this,a,b,this.length-1,-1,-1)},reverse:G.reverse,selector:null,shift:G.shift,slice:function(){return new x(this.context,this)},sort:G.sort,splice:G.splice,toArray:function(){return G.slice.call(this)},to$:function(){return f(this)},toJQuery:function(){return f(this)},unique:function(){return new x(this.context,sa(this))},unshift:G.unshift});x.extend=function(a,b,c){if(c.length&&b&&(b instanceof x||b.__dt_wrapper)){var d,e=function(a,b,c){return function(){var d=b.apply(a,arguments);x.extend(d,
|
117 |
+
d,c.methodExt);return d}};var h=0;for(d=c.length;h<d;h++){var f=c[h];b[f.name]="function"===f.type?e(a,f.val,f):"object"===f.type?{}:f.val;b[f.name].__dt_wrapper=!0;x.extend(a,b[f.name],f.propExt)}}};x.register=t=function(a,b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)x.register(a[c],b);else{d=a.split(".");var e=Vb,h;a=0;for(c=d.length;a<c;a++){var g=(h=-1!==d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var k=0;for(var l=e.length;k<l;k++)if(e[k].name===g){k=e[k];break a}k=null}k||(k={name:g,
|
118 |
+
val:{},methodExt:[],propExt:[],type:"object"},e.push(k));a===c-1?(k.val=b,k.type="function"===typeof b?"function":f.isPlainObject(b)?"object":"other"):e=h?k.methodExt:k.propExt}}};x.registerPlural=z=function(a,b,c){x.register(a,c);x.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof x?a.length?f.isArray(a[0])?new x(a.context,a[0]):a[0]:n:a})};var Wb=function(a,b){if(f.isArray(a))return f.map(a,function(a){return Wb(a,b)});if("number"===typeof a)return[b[a]];var c=
|
119 |
+
f.map(b,function(a,b){return a.nTable});return f(c).filter(a).map(function(a){a=f.inArray(this,c);return b[a]}).toArray()};t("tables()",function(a){return a!==n&&null!==a?new x(Wb(a,this.context)):this});t("table()",function(a){a=this.tables(a);var b=a.context;return b.length?new x(b[0]):a});z("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});z("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},
|
120 |
+
1)});z("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});z("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});z("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});t("draw()",function(a){return this.iterator("table",function(b){"page"===a?S(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),U(b,!1===
|
121 |
+
a))})});t("page()",function(a){return a===n?this.page.info().page:this.iterator("table",function(b){Wa(b,a)})});t("page.info()",function(a){if(0===this.context.length)return n;a=this.context[0];var 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"===I(a)}});t("page.len()",function(a){return a===
|
122 |
+
n?0!==this.context.length?this.context[0]._iDisplayLength:n:this.iterator("table",function(b){Ua(b,a)})});var Xb=function(a,b,c){if(c){var d=new x(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==I(a))U(a,b);else{J(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();ua(a,[],function(c){pa(a);c=va(a,c);for(var d=0,e=c.length;d<e;d++)R(a,c[d]);U(a,b);J(a,!1)})}};t("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});t("ajax.params()",function(){var a=this.context;if(0<
|
123 |
+
a.length)return a[0].oAjaxData});t("ajax.reload()",function(a,b){return this.iterator("table",function(c){Xb(c,!1===b,a)})});t("ajax.url()",function(a){var b=this.context;if(a===n){if(0===b.length)return n;b=b[0];return b.ajax?f.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){f.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});t("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Xb(c,!1===b,a)})});var db=function(a,b,c,d,e){var h=
|
124 |
+
[],g,k,l;var m=typeof b;b&&"string"!==m&&"function"!==m&&b.length!==n||(b=[b]);m=0;for(k=b.length;m<k;m++){var p=b[m]&&b[m].split&&!b[m].match(/[\[\(:]/)?b[m].split(","):[b[m]];var q=0;for(l=p.length;q<l;q++)(g=c("string"===typeof p[q]?f.trim(p[q]):p[q]))&&g.length&&(h=h.concat(g))}a=C.selector[a];if(a.length)for(m=0,k=a.length;m<k;m++)h=a[m](d,e,h);return sa(h)},eb=function(a){a||(a={});a.filter&&a.search===n&&(a.search=a.filter);return f.extend({search:"none",order:"current",page:"all"},a)},fb=
|
125 |
+
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},Ea=function(a,b){var c=[],d=a.aiDisplay;var e=a.aiDisplayMaster;var h=b.search;var g=b.order;b=b.page;if("ssp"==I(a))return"removed"===h?[]:Y(0,e.length);if("current"==b)for(g=a._iDisplayStart,a=a.fnDisplayEnd();g<a;g++)c.push(d[g]);else if("current"==g||"applied"==g)if("none"==h)c=e.slice();else if("applied"==h)c=d.slice();else{if("removed"==h){var k=
|
126 |
+
{};g=0;for(a=d.length;g<a;g++)k[d[g]]=null;c=f.map(e,function(a){return k.hasOwnProperty(a)?null:a})}}else if("index"==g||"original"==g)for(g=0,a=a.aoData.length;g<a;g++)"none"==h?c.push(g):(e=f.inArray(g,d),(-1===e&&"removed"==h||0<=e&&"applied"==h)&&c.push(g));return c},fc=function(a,b,c){var d;return db("row",b,function(b){var e=Rb(b),g=a.aoData;if(null!==e&&!c)return[e];d||(d=Ea(a,c));if(null!==e&&-1!==f.inArray(e,d))return[e];if(null===b||b===n||""===b)return d;if("function"===typeof b)return f.map(d,
|
127 |
+
function(a){var c=g[a];return b(a,c._aData,c.nTr)?a:null});if(b.nodeName){e=b._DT_RowIndex;var k=b._DT_CellIndex;if(e!==n)return g[e]&&g[e].nTr===b?[e]:[];if(k)return g[k.row]&&g[k.row].nTr===b.parentNode?[k.row]:[];e=f(b).closest("*[data-dt-row]");return e.length?[e.data("dt-row")]:[]}if("string"===typeof b&&"#"===b.charAt(0)&&(e=a.aIds[b.replace(/^#/,"")],e!==n))return[e.idx];e=Ub(ka(a.aoData,d,"nTr"));return f(e).filter(b).map(function(){return this._DT_RowIndex}).toArray()},a,c)};t("rows()",function(a,
|
128 |
+
b){a===n?a="":f.isPlainObject(a)&&(b=a,a="");b=eb(b);var c=this.iterator("table",function(c){return fc(c,a,b)},1);c.selector.rows=a;c.selector.opts=b;return c});t("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||n},1)});t("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ka(a.aoData,b,"_aData")},1)});z("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){b=b.aoData[c];return"search"===a?b._aFilterData:
|
129 |
+
b._aSortData},1)});z("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){da(b,c,a)})});z("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b},1)});z("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 k=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+k)}return new x(c,b)});z("rows().remove()","row().remove()",function(){var a=
|
130 |
+
this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,k;e.splice(c,1);var l=0;for(g=e.length;l<g;l++){var m=e[l];var p=m.anCells;null!==m.nTr&&(m.nTr._DT_RowIndex=l);if(null!==p)for(m=0,k=p.length;m<k;m++)p[m]._DT_CellIndex.row=l}qa(b.aiDisplayMaster,c);qa(b.aiDisplay,c);qa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Va(b);c=b.rowIdFn(f._aData);c!==n&&delete b.aIds[c]});this.iterator("table",function(a){for(var b=0,d=a.aoData.length;b<d;b++)a.aoData[b].idx=b});return this});t("rows.add()",
|
131 |
+
function(a){var b=this.iterator("table",function(b){var c,d=[];var f=0;for(c=a.length;f<c;f++){var k=a[f];k.nodeName&&"TR"===k.nodeName.toUpperCase()?d.push(oa(b,k)[0]):d.push(R(b,k))}return d},1),c=this.rows(-1);c.pop();f.merge(c,b);return c});t("row()",function(a,b){return fb(this.rows(a,b))});t("row().data()",function(a){var b=this.context;if(a===n)return b.length&&this.length?b[0].aoData[this[0]]._aData:n;var c=b[0].aoData[this[0]];c._aData=a;f.isArray(a)&&c.nTr&&c.nTr.id&&Q(b[0].rowId)(a,c.nTr.id);
|
132 |
+
da(b[0],this[0],"data");return this});t("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});t("row.add()",function(a){a instanceof f&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?oa(b,a)[0]:R(b,a)});return this.row(b[0])});var gc=function(a,b,c,d){var e=[],h=function(b,c){if(f.isArray(b)||b instanceof f)for(var d=0,g=b.length;d<g;d++)h(b[d],c);else b.nodeName&&"tr"===b.nodeName.toLowerCase()?
|
133 |
+
e.push(b):(d=f("<tr><td/></tr>").addClass(c),f("td",d).addClass(c).html(b)[0].colSpan=V(a),e.push(d[0]))};h(c,d);b._details&&b._details.detach();b._details=f(e);b._detailsShow&&b._details.insertAfter(b.nTr)},gb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==n?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=n,a._details=n)},Yb=function(a,b){var c=a.context;c.length&&a.length&&(a=c[0].aoData[a[0]],a._details&&((a._detailsShow=b)?a._details.insertAfter(a.nTr):a._details.detach(),
|
134 |
+
hc(c[0])))},hc=function(a){var b=new x(a),c=a.aoData;b.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<K(c,"_details").length&&(b.on("draw.dt.DT_details",function(d,e){a===e&&b.rows({page:"current"}).eq(0).each(function(a){a=c[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),b.on("column-visibility.dt.DT_details",function(b,e,f,g){if(a===e)for(e=V(e),f=0,g=c.length;f<g;f++)b=c[f],b._details&&b._details.children("td[colspan]").attr("colspan",e)}),b.on("destroy.dt.DT_details",
|
135 |
+
function(d,e){if(a===e)for(d=0,e=c.length;d<e;d++)c[d]._details&&gb(b,d)}))};t("row().child()",function(a,b){var c=this.context;if(a===n)return c.length&&this.length?c[0].aoData[this[0]]._details:n;!0===a?this.child.show():!1===a?gb(this):c.length&&this.length&&gc(c[0],c[0].aoData[this[0]],a,b);return this});t(["row().child.show()","row().child().show()"],function(a){Yb(this,!0);return this});t(["row().child.hide()","row().child().hide()"],function(){Yb(this,!1);return this});t(["row().child.remove()",
|
136 |
+
"row().child().remove()"],function(){gb(this);return this});t("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var ic=/^([^:]+):(name|visIdx|visible)$/,Zb=function(a,b,c,d,e){c=[];d=0;for(var f=e.length;d<f;d++)c.push(F(a,e[d],b));return c},jc=function(a,b,c){var d=a.aoColumns,e=K(d,"sName"),h=K(d,"nTh");return db("column",b,function(b){var g=Rb(b);if(""===b)return Y(d.length);if(null!==g)return[0<=g?g:d.length+g];if("function"===
|
137 |
+
typeof b){var l=Ea(a,c);return f.map(d,function(c,d){return b(d,Zb(a,d,0,0,l),h[d])?d:null})}var m="string"===typeof b?b.match(ic):"";if(m)switch(m[2]){case "visIdx":case "visible":g=parseInt(m[1],10);if(0>g){var p=f.map(d,function(a,b){return a.bVisible?b:null});return[p[p.length+g]]}return[aa(a,g)];case "name":return f.map(e,function(a,b){return a===m[1]?b:null});default:return[]}if(b.nodeName&&b._DT_CellIndex)return[b._DT_CellIndex.column];g=f(h).filter(b).map(function(){return f.inArray(this,
|
138 |
+
h)}).toArray();if(g.length||!b.nodeName)return g;g=f(b).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};t("columns()",function(a,b){a===n?a="":f.isPlainObject(a)&&(b=a,a="");b=eb(b);var c=this.iterator("table",function(c){return jc(c,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});z("columns().header()","column().header()",function(a,b){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});z("columns().footer()","column().footer()",function(a,
|
139 |
+
b){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});z("columns().data()","column().data()",function(){return this.iterator("column-rows",Zb,1)});z("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});z("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ka(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});z("columns().nodes()",
|
140 |
+
"column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ka(a.aoData,e,"anCells",b)},1)});z("columns().visible()","column().visible()",function(a,b){var c=this,d=this.iterator("column",function(b,c){if(a===n)return b.aoColumns[c].bVisible;var d=b.aoColumns,e=d[c],h=b.aoData,m;if(a!==n&&e.bVisible!==a){if(a){var p=f.inArray(!0,K(d,"bVisible"),c+1);d=0;for(m=h.length;d<m;d++){var q=h[d].nTr;b=h[d].anCells;q&&q.insertBefore(b[c],b[p]||null)}}else f(K(b.aoData,"anCells",
|
141 |
+
c)).detach();e.bVisible=a}});a!==n&&this.iterator("table",function(d){fa(d,d.aoHeader);fa(d,d.aoFooter);d.aiDisplay.length||f(d.nTBody).find("td[colspan]").attr("colspan",V(d));Aa(d);c.iterator("column",function(c,d){A(c,null,"column-visibility",[c,d,a,b])});(b===n||b)&&c.columns.adjust()});return d});z("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ba(b,c):c},1)});t("columns.adjust()",function(){return this.iterator("table",function(a){Z(a)},
|
142 |
+
1)});t("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)}});t("column()",function(a,b){return fb(this.columns(a,b))});var kc=function(a,b,c){var d=a.aoData,e=Ea(a,c),h=Ub(ka(d,e,"anCells")),g=f([].concat.apply([],h)),k,l=a.aoColumns.length,m,p,q,u,t,w;return db("cell",b,function(b){var c="function"===typeof b;if(null===b||b===n||c){m=[];p=0;for(q=e.length;p<q;p++)for(k=
|
143 |
+
e[p],u=0;u<l;u++)t={row:k,column:u},c?(w=d[k],b(t,F(a,k,u),w.anCells?w.anCells[u]:null)&&m.push(t)):m.push(t);return m}if(f.isPlainObject(b))return b.column!==n&&b.row!==n&&-1!==f.inArray(b.row,e)?[b]:[];c=g.filter(b).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!b.nodeName)return c;w=f(b).closest("*[data-dt-row]");return w.length?[{row:w.data("dt-row"),column:w.data("dt-column")}]:[]},a,c)};t("cells()",function(a,b,c){f.isPlainObject(a)&&
|
144 |
+
(a.row===n?(c=a,a=null):(c=b,b=null));f.isPlainObject(b)&&(c=b,b=null);if(null===b||b===n)return this.iterator("table",function(b){return kc(b,a,eb(c))});var d=c?{page:c.page,order:c.order,search:c.search}:{},e=this.columns(b,d),h=this.rows(a,d),g,k,l,m;d=this.iterator("table",function(a,b){a=[];g=0;for(k=h[b].length;g<k;g++)for(l=0,m=e[b].length;l<m;l++)a.push({row:h[b][g],column:e[b][l]});return a},1);d=c&&c.selected?this.cells(d,c):d;f.extend(d.selector,{cols:b,rows:a,opts:c});return d});z("cells().nodes()",
|
145 |
+
"cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:n},1)});t("cells().data()",function(){return this.iterator("cell",function(a,b,c){return F(a,b,c)},1)});z("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)});z("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return F(b,c,d,a)},
|
146 |
+
1)});z("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ba(a,c)}},1)});z("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){da(b,c,a,d)})});t("cell()",function(a,b,c){return fb(this.cells(a,b,c))});t("cell().data()",function(a){var b=this.context,c=this[0];if(a===n)return b.length&&c.length?F(b[0],c[0].row,c[0].column):n;nb(b[0],c[0].row,c[0].column,a);da(b[0],c[0].row,
|
147 |
+
"data",c[0].column);return this});t("order()",function(a,b){var c=this.context;if(a===n)return 0!==c.length?c[0].aaSorting:n;"number"===typeof a?a=[[a,b]]:a.length&&!f.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});t("order.listener()",function(a,b,c){return this.iterator("table",function(d){Pa(d,a,b,c)})});t("order.fixed()",function(a){if(!a){var b=this.context;b=b.length?b[0].aaSortingFixed:n;return f.isArray(b)?{pre:b}:
|
148 |
+
b}return this.iterator("table",function(b){b.aaSortingFixed=f.extend(!0,{},a)})});t(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];f.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});t("search()",function(a,b,c,d){var e=this.context;return a===n?0!==e.length?e[0].oPreviousSearch.sSearch:n:this.iterator("table",function(e){e.oFeatures.bFilter&&ha(e,f.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===
|
149 |
+
c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});z("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,h){var g=e.aoPreSearchCols;if(a===n)return g[h].sSearch;e.oFeatures.bFilter&&(f.extend(g[h],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ha(e,e.oPreviousSearch,1))})});t("state()",function(){return this.context.length?this.context[0].oSavedState:null});t("state.clear()",function(){return this.iterator("table",
|
150 |
+
function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});t("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});t("state.save()",function(){return this.iterator("table",function(a){Aa(a)})});q.versionCheck=q.fnVersionCheck=function(a){var b=q.version.split(".");a=a.split(".");for(var 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};q.isDataTable=q.fnIsDataTable=function(a){var b=f(a).get(0),c=!1;if(a instanceof
|
151 |
+
q.Api)return!0;f.each(q.settings,function(a,e){a=e.nScrollHead?f("table",e.nScrollHead)[0]:null;var d=e.nScrollFoot?f("table",e.nScrollFoot)[0]:null;if(e.nTable===b||a===b||d===b)c=!0});return c};q.tables=q.fnTables=function(a){var b=!1;f.isPlainObject(a)&&(b=a.api,a=a.visible);var c=f.map(q.settings,function(b){if(!a||a&&f(b.nTable).is(":visible"))return b.nTable});return b?new x(c):c};q.camelToHungarian=L;t("$()",function(a,b){b=this.rows(b).nodes();b=f(b);return f([].concat(b.filter(a).toArray(),
|
152 |
+
b.find(a).toArray()))});f.each(["on","one","off"],function(a,b){t(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=f.map(a[0].split(/\s/),function(a){return a.match(/\.dt\b/)?a:a+".dt"}).join(" ");var d=f(this.tables().nodes());d[b].apply(d,a);return this})});t("clear()",function(){return this.iterator("table",function(a){pa(a)})});t("settings()",function(){return new x(this.context,this.context)});t("init()",function(){var a=this.context;return a.length?a[0].oInit:null});t("data()",
|
153 |
+
function(){return this.iterator("table",function(a){return K(a.aoData,"_aData")}).flatten()});t("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,h=b.nTBody,g=b.nTHead,k=b.nTFoot,l=f(e);h=f(h);var m=f(b.nTableWrapper),p=f.map(b.aoData,function(a){return a.nTr}),n;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);a||(new x(b)).columns().visible(!0);m.off(".DT").find(":not(tbody *)").off(".DT");f(y).off(".DT-"+b.sInstance);
|
154 |
+
e!=g.parentNode&&(l.children("thead").detach(),l.append(g));k&&e!=k.parentNode&&(l.children("tfoot").detach(),l.append(k));b.aaSorting=[];b.aaSortingFixed=[];za(b);f(p).removeClass(b.asStripeClasses.join(" "));f("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);h.children().detach();h.append(p);g=a?"remove":"detach";l[g]();m[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),l.css("width",b.sDestroyWidth).removeClass(d.sTable),(n=b.asDestroyStripes.length)&&
|
155 |
+
h.children().each(function(a){f(this).addClass(b.asDestroyStripes[a%n])}));c=f.inArray(b,q.settings);-1!==c&&q.settings.splice(c,1)})});f.each(["column","row","cell"],function(a,b){t(b+"s().every()",function(a){var c=this.selector.opts,e=this;return this.iterator(b,function(d,f,k,l,m){a.call(e[b](f,"cell"===b?k:c,"cell"===b?c:n),f,k,l,m)})})});t("i18n()",function(a,b,c){var d=this.context[0];a=T(a)(d.oLanguage);a===n&&(a=b);c!==n&&f.isPlainObject(a)&&(a=a[c]!==n?a[c]:a._);return a.replace("%d",c)});
|
156 |
+
q.version="1.10.21";q.settings=[];q.models={};q.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};q.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};q.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,sClass:null,sContentPadding:null,
|
157 |
sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};q.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,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,
|
158 |
+
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_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},
|
159 |
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"},oPaginate:{sFirst:"First",sLast:"Last",
|
160 |
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:f.extend({},q.models.oSearch),sAjaxDataProp:"data",
|
161 |
sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};H(q.defaults);q.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};H(q.defaults.column);q.models.oSettings=
|
162 |
{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:[],aoFooter:[],oPreviousSearch:{},
|
163 |
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",iStateDuration:0,
|
164 |
+
aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:n,oAjaxData:n,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"==I(this)?1*this._iRecordsTotal:
|
165 |
+
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==I(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};q.ext=C={buttons:{},
|
166 |
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:q.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:q.version};f.extend(C,{afnFiltering:C.search,aTypes:C.type.detect,ofnSearch:C.type.search,oSort:C.type.order,afnSortData:C.order,aoFeatures:C.feature,oApi:C.internal,oStdClasses:C.classes,oPagination:C.pager});
|
167 |
f.extend(q.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",
|
168 |
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:"",
|
169 |
+
sJUIHeader:"",sJUIFooter:""});var Ob=q.ext.pager;f.extend(Ob,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[ja(a,b)]},simple_numbers:function(a,b){return["previous",ja(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ja(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ja(a,b),"last"]},_numbers:ja,numbers_length:7});f.extend(!0,q.ext.renderer,{pageButton:{_:function(a,b,
|
170 |
+
c,d,e,h){var g=a.oClasses,k=a.oLanguage.oPaginate,l=a.oLanguage.oAria.paginate||{},m,p,q=0,t=function(b,d){var n,r=g.sPageButtonDisabled,u=function(b){Wa(a,b.data.action,!0)};var w=0;for(n=d.length;w<n;w++){var v=d[w];if(f.isArray(v)){var x=f("<"+(v.DT_el||"div")+"/>").appendTo(b);t(x,v)}else{m=null;p=v;x=a.iTabIndex;switch(v){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;case "first":m=k.sFirst;0===e&&(x=-1,p+=" "+r);break;case "previous":m=k.sPrevious;0===e&&(x=-1,p+=
|
171 |
+
" "+r);break;case "next":m=k.sNext;if(0===h||e===h-1)x=-1,p+=" "+r;break;case "last":m=k.sLast;e===h-1&&(x=-1,p+=" "+r);break;default:m=v+1,p=e===v?g.sPageButtonActive:""}null!==m&&(x=f("<a>",{"class":g.sPageButton+" "+p,"aria-controls":a.sTableId,"aria-label":l[v],"data-dt-idx":q,tabindex:x,id:0===c&&"string"===typeof v?a.sTableId+"_"+v:null}).html(m).appendTo(b),Za(x,{action:v},u),q++)}}};try{var x=f(b).find(w.activeElement).data("dt-idx")}catch(lc){}t(f(b).empty(),d);x!==n&&f(b).find("[data-dt-idx="+
|
172 |
+
x+"]").trigger("focus")}}});f.extend(q.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return cb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!cc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||P(a)?"date":null},function(a,b){b=b.oLanguage.sDecimal;return cb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return Tb(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return Tb(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return P(a)||"string"===
|
173 |
+
typeof a&&-1!==a.indexOf("<")?"html":null}]);f.extend(q.ext.type.search,{html:function(a){return P(a)?a:"string"===typeof a?a.replace(Qb," ").replace(Da,""):""},string:function(a){return P(a)?a:"string"===typeof a?a.replace(Qb," "):a}});var Ca=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Sb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};f.extend(C.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return P(a)?
|
174 |
+
"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return P(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}});Ga("");f.extend(!0,q.ext.renderer,{header:{_:function(a,b,c,d){f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc:
|
175 |
c.sSortingClass))})},jqueryui:function(a,b,c,d){f("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(f("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);f(a.nTable).on("order.dt.DT",function(e,f,g,k){a===f&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==k[e]?d.sSortAsc:"desc"==k[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==
|
176 |
+
k[e]?d.sSortJUIAsc:"desc"==k[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var hb=function(a){return"string"===typeof a?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):a};q.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 hb(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,
|
177 |
+
a)+f+(e||"")}}},text:function(){return{display:hb,filter:hb}}};f.extend(q.ext.internal,{_fnExternApiFunc:Pb,_fnBuildAjax:ua,_fnAjaxUpdate:pb,_fnAjaxParameters:yb,_fnAjaxUpdateDraw:zb,_fnAjaxDataSrc:va,_fnAddColumn:Ha,_fnColumnOptions:la,_fnAdjustColumnSizing:Z,_fnVisibleToColumnIndex:aa,_fnColumnIndexToVisible:ba,_fnVisbleColumns:V,_fnGetColumns:na,_fnColumnTypes:Ja,_fnApplyColumnDefs:mb,_fnHungarianMap:H,_fnCamelToHungarian:L,_fnLanguageCompat:Fa,_fnBrowserDetect:kb,_fnAddData:R,_fnAddTr:oa,_fnNodeToDataIndex:function(a,
|
178 |
+
b){return b._DT_RowIndex!==n?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return f.inArray(c,a.aoData[b].anCells)},_fnGetCellData:F,_fnSetCellData:nb,_fnSplitObjNotation:Ma,_fnGetObjectDataFn:T,_fnSetObjectDataFn:Q,_fnGetDataMaster:Na,_fnClearTable:pa,_fnDeleteIndex:qa,_fnInvalidate:da,_fnGetRowElements:La,_fnCreateTr:Ka,_fnBuildHead:ob,_fnDrawHead:fa,_fnDraw:S,_fnReDraw:U,_fnAddOptionsHtml:rb,_fnDetectHeader:ea,_fnGetUniqueThs:ta,_fnFeatureHtmlFilter:tb,_fnFilterComplete:ha,_fnFilterCustom:Cb,
|
179 |
+
_fnFilterColumn:Bb,_fnFilter:Ab,_fnFilterCreateSearch:Sa,_fnEscapeRegex:Ta,_fnFilterData:Db,_fnFeatureHtmlInfo:wb,_fnUpdateInfo:Gb,_fnInfoMacros:Hb,_fnInitialise:ia,_fnInitComplete:wa,_fnLengthChange:Ua,_fnFeatureHtmlLength:sb,_fnFeatureHtmlPaginate:xb,_fnPageChange:Wa,_fnFeatureHtmlProcessing:ub,_fnProcessingDisplay:J,_fnFeatureHtmlTable:vb,_fnScrollDraw:ma,_fnApplyToChildren:N,_fnCalculateColumnWidths:Ia,_fnThrottle:Ra,_fnConvertToWidth:Ib,_fnGetWidestNode:Jb,_fnGetMaxLenString:Kb,_fnStringToCss:B,
|
180 |
+
_fnSortFlatten:X,_fnSort:qb,_fnSortAria:Mb,_fnSortListener:Ya,_fnSortAttachListener:Pa,_fnSortingClasses:za,_fnSortData:Lb,_fnSaveState:Aa,_fnLoadState:Nb,_fnSettingsFromNode:Ba,_fnLog:O,_fnMap:M,_fnBindAction:Za,_fnCallbackReg:D,_fnCallbackFire:A,_fnLengthOverflow:Va,_fnRenderer:Qa,_fnDataSource:I,_fnRowAttributes:Oa,_fnExtend:$a,_fnCalculateEnd:function(){}});f.fn.dataTable=q;q.$=f;f.fn.dataTableSettings=q.settings;f.fn.dataTableExt=q.ext;f.fn.DataTable=function(a){return f(this).dataTable(a).api()};
|
181 |
f.each(q,function(a,b){f.fn.DataTable[a]=b});return f.fn.dataTable});
|
libraries/evalmath.class.php
CHANGED
@@ -54,7 +54,7 @@ class EvalMath {
|
|
54 |
* @since 1.0.0
|
55 |
* @var array
|
56 |
*/
|
57 |
-
|
58 |
|
59 |
/**
|
60 |
* User-defined functions.
|
54 |
* @since 1.0.0
|
55 |
* @var array
|
56 |
*/
|
57 |
+
public $variables = array();
|
58 |
|
59 |
/**
|
60 |
* User-defined functions.
|
libraries/simplexlsx.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Excel 2007-2019/Office 365 Reader Class
|
4 |
*
|
5 |
-
* Based on SimpleXLSX v0.8.
|
6 |
* @link https://github.com/shuchkin/simplexlsx/
|
7 |
*
|
8 |
* @package TablePress
|
@@ -26,11 +26,7 @@ defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
|
|
26 |
* @since 1.1.0
|
27 |
*/
|
28 |
class SimpleXLSX {
|
29 |
-
|
30 |
-
const SCHEMA_REL_SHAREDSTRINGS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings';
|
31 |
-
const SCHEMA_REL_WORKSHEET = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet';
|
32 |
-
const SCHEMA_REL_STYLES = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles';
|
33 |
-
public static $CF = array( // Cell formats
|
34 |
0 => 'General',
|
35 |
1 => '0',
|
36 |
2 => '0.00',
|
@@ -77,22 +73,20 @@ class SimpleXLSX {
|
|
77 |
68 => 't0.00%',
|
78 |
69 => 't# ?/?',
|
79 |
70 => 't# ??/??',
|
80 |
-
|
81 |
-
public $cellFormats =
|
82 |
public $datetimeFormat = 'Y-m-d H:i:s';
|
83 |
public $debug;
|
84 |
|
85 |
-
/* @var SimpleXMLElement $workbook */
|
86 |
-
private $workbook;
|
87 |
/* @var SimpleXMLElement[] $sheets */
|
88 |
private $sheets;
|
89 |
-
private $sheetNames =
|
|
|
90 |
// scheme
|
91 |
private $styles;
|
92 |
private $hyperlinks;
|
93 |
/* @var array[] $package */
|
94 |
private $package;
|
95 |
-
private $datasec;
|
96 |
private $sharedstrings;
|
97 |
private $date1904 = 0;
|
98 |
|
@@ -143,27 +137,30 @@ class SimpleXLSX {
|
|
143 |
if ( $debug !== null ) {
|
144 |
$this->debug = $debug;
|
145 |
}
|
146 |
-
$this->package =
|
147 |
'filename' => '',
|
148 |
'mtime' => 0,
|
149 |
'size' => 0,
|
150 |
'comment' => '',
|
151 |
-
'entries' =>
|
152 |
-
|
153 |
-
if ( $filename && $this->_unzip( $filename, $is_data )) {
|
154 |
$this->_parse();
|
155 |
}
|
156 |
}
|
|
|
157 |
public static function parseFile( $filename, $debug = false ) {
|
158 |
return self::parse( $filename, false, $debug );
|
159 |
}
|
|
|
160 |
public static function parseData( $data, $debug = false ) {
|
161 |
return self::parse( $data, true, $debug );
|
162 |
}
|
|
|
163 |
public static function parse( $filename, $is_data = false, $debug = false ) {
|
164 |
-
$xlsx
|
165 |
$xlsx->debug = $debug;
|
166 |
-
if ( $xlsx->_unzip($filename, $is_data )) {
|
167 |
$xlsx->_parse();
|
168 |
}
|
169 |
if ( $xlsx->success() ) {
|
@@ -174,20 +171,21 @@ class SimpleXLSX {
|
|
174 |
|
175 |
return false;
|
176 |
}
|
|
|
177 |
public static function parseError( $set = false ) {
|
178 |
static $error = false;
|
|
|
179 |
return $set ? $error = $set : $error;
|
180 |
}
|
|
|
181 |
public static function parseErrno( $set = false ) {
|
182 |
static $errno = false;
|
|
|
183 |
return $set ? $errno = $set : $errno;
|
184 |
}
|
185 |
|
186 |
private function _unzip( $filename, $is_data = false ) {
|
187 |
|
188 |
-
// Clear current file
|
189 |
-
$this->datasec = array();
|
190 |
-
|
191 |
if ( $is_data ) {
|
192 |
|
193 |
$this->package['filename'] = 'default.xlsx';
|
@@ -219,33 +217,36 @@ class SimpleXLSX {
|
|
219 |
return false;
|
220 |
}
|
221 |
*/
|
222 |
-
|
|
|
|
|
|
|
|
|
|
|
223 |
$this->error( 2, 'Unknown archive format' );
|
224 |
|
225 |
return false;
|
226 |
}
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
)
|
231 |
-
|
232 |
-
// Normal way
|
233 |
-
$aP = unpack( 'x16/v1CL', $aE[1] );
|
234 |
-
$this->package['comment'] = $this->_substr( $aE[1], 18, $aP['CL'] );
|
235 |
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
$aE = explode( "\x50\x4b\x03\x04", $aE[0] );
|
243 |
-
// Shift out spanning signature or empty entry
|
244 |
-
array_shift( $aE );
|
245 |
|
246 |
// Loop through the entries
|
247 |
foreach ( $aE as $vZ ) {
|
248 |
-
$aI =
|
249 |
$aI['E'] = 0;
|
250 |
$aI['EM'] = '';
|
251 |
// Retrieving local file header information
|
@@ -274,6 +275,7 @@ class SimpleXLSX {
|
|
274 |
|
275 |
// Getting stored filename
|
276 |
$aI['N'] = $this->_substr( $vZ, 26, $nF );
|
|
|
277 |
|
278 |
if ( $this->_substr( $aI['N'], - 1 ) === '/' ) {
|
279 |
// is a directory entry - will be skipped
|
@@ -282,7 +284,7 @@ class SimpleXLSX {
|
|
282 |
|
283 |
// Truncate full filename in path and filename
|
284 |
$aI['P'] = dirname( $aI['N'] );
|
285 |
-
$aI['P'] = $aI['P'] === '.' ? '' : $aI['P'];
|
286 |
$aI['N'] = basename( $aI['N'] );
|
287 |
|
288 |
$vZ = $this->_substr( $vZ, 26 + $nF + $mF );
|
@@ -339,14 +341,14 @@ class SimpleXLSX {
|
|
339 |
( ( $aP['FD'] & 0xfe00 ) >> 9 ) + 1980 );
|
340 |
|
341 |
//$this->Entries[] = &new SimpleUnzipEntry($aI);
|
342 |
-
$this->package['entries'][] =
|
343 |
'data' => $aI['D'],
|
344 |
'error' => $aI['E'],
|
345 |
'error_msg' => $aI['EM'],
|
346 |
'name' => $aI['N'],
|
347 |
'path' => $aI['P'],
|
348 |
'time' => $aI['T']
|
349 |
-
|
350 |
|
351 |
} // end for each entries
|
352 |
|
@@ -366,14 +368,15 @@ class SimpleXLSX {
|
|
366 |
|
367 |
return $this->error;
|
368 |
}
|
|
|
369 |
public function errno() {
|
370 |
return $this->errno;
|
371 |
}
|
372 |
|
373 |
private function _parse() {
|
374 |
// Document data holders
|
375 |
-
$this->sharedstrings =
|
376 |
-
$this->sheets =
|
377 |
// $this->styles = array();
|
378 |
|
379 |
// Read relations and search for officeDocument
|
@@ -381,47 +384,45 @@ class SimpleXLSX {
|
|
381 |
|
382 |
foreach ( $relations->Relationship as $rel ) {
|
383 |
|
384 |
-
$rel_type
|
385 |
-
$rel_target =
|
386 |
|
387 |
-
if ( $rel_type ===
|
388 |
|
389 |
-
$index_rId =
|
390 |
|
391 |
$index = 0;
|
392 |
-
foreach ( $
|
393 |
-
/* @var SimpleXMLElement $s */
|
394 |
$this->sheetNames[ $index ] = (string) $s['name'];
|
395 |
-
$index_rId[ $index ]
|
396 |
-
$index++;
|
397 |
}
|
398 |
-
if ( (int) $
|
399 |
$this->date1904 = 1;
|
400 |
}
|
401 |
|
402 |
-
// print_r( $index_rId );
|
403 |
-
|
404 |
|
405 |
if ( $workbookRelations = $this->getEntryXML( dirname( $rel_target ) . '/_rels/workbook.xml.rels' ) ) {
|
406 |
|
407 |
// Loop relations for workbook and extract sheets...
|
408 |
foreach ( $workbookRelations->Relationship as $workbookRelation ) {
|
409 |
|
410 |
-
$wrel_type = trim( (string) $workbookRelation['Type'] );
|
411 |
-
$wrel_path =
|
412 |
if ( ! $this->entryExists( $wrel_path ) ) {
|
413 |
continue;
|
414 |
}
|
415 |
|
416 |
|
417 |
-
if ( $wrel_type ===
|
418 |
|
419 |
if ( $sheet = $this->getEntryXML( $wrel_path ) ) {
|
420 |
-
$index
|
421 |
$this->sheets[ $index ] = $sheet;
|
|
|
422 |
}
|
423 |
|
424 |
-
} else if ( $wrel_type ===
|
425 |
|
426 |
if ( $sharedStrings = $this->getEntryXML( $wrel_path ) ) {
|
427 |
foreach ( $sharedStrings->si as $val ) {
|
@@ -432,11 +433,11 @@ class SimpleXLSX {
|
|
432 |
}
|
433 |
}
|
434 |
}
|
435 |
-
} else if ( $wrel_type ===
|
436 |
|
437 |
$this->styles = $this->getEntryXML( $wrel_path );
|
438 |
|
439 |
-
$nf =
|
440 |
if ( $this->styles->numFmts->numFmt !== null ) {
|
441 |
foreach ( $this->styles->numFmts->numFmt as $v ) {
|
442 |
$nf[ (int) $v['numFmtId'] ] = (string) $v['formatCode'];
|
@@ -449,7 +450,7 @@ class SimpleXLSX {
|
|
449 |
$v['format'] = '';
|
450 |
|
451 |
if ( isset( $v['@attributes']['numFmtId'] ) ) {
|
452 |
-
$v
|
453 |
$fid = (int) $v['numFmtId'];
|
454 |
// formats priority
|
455 |
if ( isset( $nf[ $fid ] ) ) {
|
@@ -478,6 +479,7 @@ class SimpleXLSX {
|
|
478 |
|
479 |
return false;
|
480 |
}
|
|
|
481 |
/*
|
482 |
* @param string $name Filename in archive
|
483 |
* @return SimpleXMLElement|bool
|
@@ -486,18 +488,18 @@ class SimpleXLSX {
|
|
486 |
if ( $entry_xml = $this->getEntryData( $name ) ) {
|
487 |
$entry_xml = trim( $entry_xml );
|
488 |
// dirty remove namespace prefixes and empty rows
|
489 |
-
$entry_xml = preg_replace('/xmlns[^=]*="[^"]*"/i','', $entry_xml ); // remove namespaces
|
490 |
-
$entry_xml = preg_replace('/[a-zA-Z0-9]+:([a-zA-Z0-9]+="[^"]+")/','$1$2', $entry_xml ); // remove namespaced attrs
|
491 |
-
$entry_xml = preg_replace('/<[a-zA-Z0-9]+:([^>]+)>/', '<$1>', $entry_xml); // fix namespaced openned tags
|
492 |
-
$entry_xml = preg_replace('/<\/[a-zA-Z0-9]+:([^>]+)>/', '</$1>', $entry_xml); // fix namespaced closed tags
|
493 |
|
494 |
// if ( $this->skipEmptyRows && strpos($name, '/sheet') ) {
|
495 |
-
if ( strpos($name, '/sheet') ) { // dirty skip empty rows
|
496 |
-
$entry_xml = preg_replace( '/<row[^>]+>\s*(<c[^\/]+\/>\s*)+<\/row>/', '', $entry_xml
|
497 |
-
$entry_xml = preg_replace( '/<row[^\/>]*\/>/', '', $entry_xml, -1, $cnt2 );
|
498 |
-
$entry_xml = preg_replace( '/<row[^>]*><\/row>/', '', $entry_xml, -1, $cnt3 );
|
499 |
-
if ( $cnt || $cnt2 || $cnt3
|
500 |
-
$entry_xml = preg_replace('/<dimension[^\/]+\/>/', '', $entry_xml);
|
501 |
}
|
502 |
// file_put_contents( basename( $name ), $entry_xml ); // @to do comment!!!
|
503 |
}
|
@@ -505,20 +507,22 @@ class SimpleXLSX {
|
|
505 |
// XML External Entity (XXE) Prevention
|
506 |
$_old = libxml_disable_entity_loader();
|
507 |
$entry_xmlobj = simplexml_load_string( $entry_xml );
|
508 |
-
|
509 |
-
libxml_disable_entity_loader($_old);
|
510 |
if ( $entry_xmlobj ) {
|
511 |
return $entry_xmlobj;
|
512 |
}
|
513 |
$e = libxml_get_last_error();
|
514 |
-
$this->error( 3, 'XML-entry ' . $name.' parser error '
|
515 |
} else {
|
516 |
$this->error( 4, 'XML-entry not found ' . $name );
|
517 |
}
|
|
|
518 |
return false;
|
519 |
}
|
520 |
|
521 |
public function getEntryData( $name ) {
|
|
|
522 |
$dir = $this->_strtoupper( dirname( $name ) );
|
523 |
$name = $this->_strtoupper( basename( $name ) );
|
524 |
foreach ( $this->package['entries'] as $entry ) {
|
@@ -526,7 +530,7 @@ class SimpleXLSX {
|
|
526 |
return $entry['data'];
|
527 |
}
|
528 |
}
|
529 |
-
$this->error( 5, 'Entry not found '
|
530 |
|
531 |
return false;
|
532 |
}
|
@@ -544,11 +548,11 @@ class SimpleXLSX {
|
|
544 |
}
|
545 |
|
546 |
private function _parseRichText( $is = null ) {
|
547 |
-
$value =
|
548 |
|
549 |
if ( isset( $is->t ) ) {
|
550 |
$value[] = (string) $is->t;
|
551 |
-
} else if ( isset($is->r ) ) {
|
552 |
foreach ( $is->r as $run ) {
|
553 |
$value[] = (string) $run->t;
|
554 |
}
|
@@ -566,17 +570,17 @@ class SimpleXLSX {
|
|
566 |
if ( ( $ws = $this->worksheet( $worksheetIndex ) ) === false ) {
|
567 |
return false;
|
568 |
}
|
569 |
-
$dim
|
570 |
$numCols = $dim[0];
|
571 |
$numRows = $dim[1];
|
572 |
|
573 |
-
$emptyRow =
|
574 |
-
for( $i = 0; $i < $numCols; $i++) {
|
575 |
$emptyRow[] = '';
|
576 |
}
|
577 |
|
578 |
-
$rows =
|
579 |
-
for( $i = 0; $i < $numRows; $i++) {
|
580 |
$rows[] = $emptyRow;
|
581 |
}
|
582 |
|
@@ -587,16 +591,16 @@ class SimpleXLSX {
|
|
587 |
foreach ( $row->c as $c ) {
|
588 |
// detect skipped cols
|
589 |
$idx = $this->getIndex( (string) $c['r'] );
|
590 |
-
$x
|
591 |
-
$y
|
592 |
|
593 |
-
if ( $x > -1 ) {
|
594 |
$curC = $x;
|
595 |
$curR = $y;
|
596 |
}
|
597 |
|
598 |
$rows[ $curR ][ $curC ] = $this->value( $c );
|
599 |
-
$curC++;
|
600 |
}
|
601 |
|
602 |
$curR ++;
|
@@ -611,28 +615,28 @@ class SimpleXLSX {
|
|
611 |
return false;
|
612 |
}
|
613 |
|
614 |
-
$rows =
|
615 |
|
616 |
-
$dim
|
617 |
$numCols = $dim[0];
|
618 |
$numRows = $dim[1];
|
619 |
|
620 |
-
for ( $y = 0; $y < $numRows; $y++ ) {
|
621 |
-
for ( $x = 0; $x < $numCols; $x++ ) {
|
622 |
// 0.6.8
|
623 |
$c = '';
|
624 |
for ( $k = $x; $k >= 0; $k = (int) ( $k / 26 ) - 1 ) {
|
625 |
$c = chr( $k % 26 + 65 ) . $c;
|
626 |
}
|
627 |
-
$rows[ $y ][ $x ] =
|
628 |
'type' => '',
|
629 |
'name' => $c . ( $y + 1 ),
|
630 |
'value' => '',
|
631 |
'href' => '',
|
632 |
'f' => '',
|
633 |
'format' => '',
|
634 |
-
'r'
|
635 |
-
|
636 |
}
|
637 |
}
|
638 |
|
@@ -641,7 +645,7 @@ class SimpleXLSX {
|
|
641 |
foreach ( $ws->sheetData->row as $row ) {
|
642 |
|
643 |
$r_idx = (int) $row['r'];
|
644 |
-
$curC
|
645 |
|
646 |
foreach ( $row->c as $c ) {
|
647 |
$r = (string) $c['r'];
|
@@ -649,10 +653,10 @@ class SimpleXLSX {
|
|
649 |
$s = (int) $c['s'];
|
650 |
|
651 |
$idx = $this->getIndex( $r );
|
652 |
-
$x
|
653 |
-
$y
|
654 |
|
655 |
-
if ( $x > -1 ) {
|
656 |
$curC = $x;
|
657 |
$curR = $y;
|
658 |
}
|
@@ -663,16 +667,16 @@ class SimpleXLSX {
|
|
663 |
$format = '';
|
664 |
}
|
665 |
|
666 |
-
$rows[ $curR ][ $curC ] =
|
667 |
'type' => $t,
|
668 |
'name' => (string) $c['r'],
|
669 |
'value' => $this->value( $c ),
|
670 |
-
'href' => $this->href( $c ),
|
671 |
'f' => (string) $c->f,
|
672 |
'format' => $format,
|
673 |
-
'r'
|
674 |
-
|
675 |
-
$curC++;
|
676 |
}
|
677 |
$curR ++;
|
678 |
}
|
@@ -680,30 +684,52 @@ class SimpleXLSX {
|
|
680 |
return $rows;
|
681 |
|
682 |
}
|
|
|
683 |
public function toHTML( $worksheetIndex = 0 ) {
|
684 |
$s = '<table class=excel>';
|
685 |
-
foreach( $this->rows( $worksheetIndex ) as $r ) {
|
686 |
$s .= '<tr>';
|
687 |
foreach ( $r as $c ) {
|
688 |
-
$s .= '<td nowrap>'.( $c === '' ? ' ' : htmlspecialchars( $c, ENT_QUOTES )).'</td>';
|
689 |
}
|
690 |
$s .= "</tr>\r\n";
|
691 |
}
|
692 |
$s .= '</table>';
|
|
|
693 |
return $s;
|
694 |
}
|
695 |
|
696 |
public function worksheet( $worksheetIndex = 0 ) {
|
697 |
|
698 |
|
699 |
-
|
700 |
if ( isset( $this->sheets[ $worksheetIndex ] ) ) {
|
701 |
$ws = $this->sheets[ $worksheetIndex ];
|
702 |
|
703 |
-
if ( isset( $ws->hyperlinks ) ) {
|
704 |
-
$this->hyperlinks =
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
}
|
708 |
}
|
709 |
|
@@ -724,22 +750,22 @@ class SimpleXLSX {
|
|
724 |
public function dimension( $worksheetIndex = 0 ) {
|
725 |
|
726 |
if ( ( $ws = $this->worksheet( $worksheetIndex ) ) === false ) {
|
727 |
-
return
|
728 |
}
|
729 |
/* @var SimpleXMLElement $ws */
|
730 |
|
731 |
$ref = (string) $ws->dimension['ref'];
|
732 |
|
733 |
if ( $this->_strpos( $ref, ':' ) !== false ) {
|
734 |
-
$d
|
735 |
$idx = $this->getIndex( $d[1] );
|
736 |
|
737 |
-
return
|
738 |
}
|
739 |
if ( $ref !== '' ) { // 0.6.8
|
740 |
$index = $this->getIndex( $ref );
|
741 |
|
742 |
-
return
|
743 |
}
|
744 |
|
745 |
// slow method
|
@@ -747,8 +773,8 @@ class SimpleXLSX {
|
|
747 |
foreach ( $ws->sheetData->row as $row ) {
|
748 |
foreach ( $row->c as $c ) {
|
749 |
$idx = $this->getIndex( (string) $c['r'] );
|
750 |
-
$x
|
751 |
-
$y
|
752 |
if ( $x > 0 ) {
|
753 |
if ( $x > $maxC ) {
|
754 |
$maxC = $x;
|
@@ -760,7 +786,7 @@ class SimpleXLSX {
|
|
760 |
}
|
761 |
}
|
762 |
|
763 |
-
return
|
764 |
}
|
765 |
|
766 |
public function getIndex( $cell = 'A1' ) {
|
@@ -774,25 +800,26 @@ class SimpleXLSX {
|
|
774 |
|
775 |
for ( $i = $colLen - 1; $i >= 0; $i -- ) {
|
776 |
/** @noinspection PowerOperatorCanBeUsedInspection */
|
777 |
-
$index += ( ord( $col[$i] ) - 64 ) * pow( 26, $colLen - $i - 1 );
|
778 |
}
|
779 |
|
780 |
-
return
|
781 |
}
|
|
|
782 |
// $this->error( 'Invalid cell index ' . $cell );
|
783 |
|
784 |
-
return
|
785 |
}
|
786 |
|
787 |
public function value( $cell ) {
|
788 |
// Determine data type
|
789 |
$dataType = (string) $cell['t'];
|
790 |
|
791 |
-
if (
|
792 |
$s = (int) $cell['s'];
|
793 |
if ( $s > 0 && isset( $this->cellFormats[ $s ] ) ) {
|
794 |
$format = $this->cellFormats[ $s ]['format'];
|
795 |
-
if (
|
796 |
$dataType = 'd';
|
797 |
}
|
798 |
}
|
@@ -837,7 +864,7 @@ class SimpleXLSX {
|
|
837 |
break;
|
838 |
case 'd':
|
839 |
// Value is a date and non-empty
|
840 |
-
if ( ! empty($cell->v) ) {
|
841 |
$value = $this->datetimeFormat ? gmdate( $this->datetimeFormat, $this->unixstamp( (float) $cell->v ) ) : (float) $cell->v;
|
842 |
}
|
843 |
break;
|
@@ -886,11 +913,13 @@ class SimpleXLSX {
|
|
886 |
*/
|
887 |
public function getCell( $worksheetIndex = 0, $cell = 'A1' ) {
|
888 |
|
889 |
-
if (($ws = $this->worksheet( $worksheetIndex)) === false) {
|
|
|
|
|
890 |
|
891 |
$idx = is_array( $cell ) ? $cell : $this->getIndex( (string) $cell );
|
892 |
-
$C
|
893 |
-
$R
|
894 |
|
895 |
$curR = 0;
|
896 |
/* @var SimpleXMLElement $ws */
|
@@ -899,8 +928,8 @@ class SimpleXLSX {
|
|
899 |
foreach ( $row->c as $c ) {
|
900 |
// detect skipped cols
|
901 |
$idx = $this->getIndex( (string) $c['r'] );
|
902 |
-
$x
|
903 |
-
$y
|
904 |
if ( $x > 0 ) {
|
905 |
$curC = $x;
|
906 |
$curR = $y;
|
@@ -908,19 +937,21 @@ class SimpleXLSX {
|
|
908 |
if ( $curR === $R && $curC === $C ) {
|
909 |
return $this->value( $c );
|
910 |
}
|
911 |
-
if ( $curR > $R ){
|
912 |
return null;
|
913 |
}
|
914 |
-
$curC++;
|
915 |
}
|
916 |
|
917 |
$curR ++;
|
918 |
}
|
|
|
919 |
return null;
|
920 |
}
|
921 |
|
922 |
-
public function href( $cell ) {
|
923 |
-
|
|
|
924 |
}
|
925 |
|
926 |
public function sheets() {
|
@@ -932,7 +963,7 @@ class SimpleXLSX {
|
|
932 |
}
|
933 |
|
934 |
public function sheetName( $worksheetIndex ) {
|
935 |
-
if ( isset($this->sheetNames[ $worksheetIndex ])) {
|
936 |
return $this->sheetNames[ $worksheetIndex ];
|
937 |
}
|
938 |
|
@@ -953,23 +984,51 @@ class SimpleXLSX {
|
|
953 |
public function getPackage() {
|
954 |
return $this->package;
|
955 |
}
|
|
|
956 |
public function setDateTimeFormat( $value ) {
|
957 |
-
$this->datetimeFormat = is_string( $value) ? $value : false;
|
958 |
}
|
|
|
959 |
private function _strlen( $str ) {
|
960 |
-
return (ini_get('mbstring.func_overload') & 2) ? mb_strlen($str
|
961 |
}
|
|
|
962 |
private function _strpos( $haystack, $needle, $offset = 0 ) {
|
963 |
-
return (ini_get('mbstring.func_overload') & 2) ? mb_strpos( $haystack, $needle, $offset
|
964 |
-
}
|
965 |
-
private function _strrpos( $haystack, $needle, $offset = 0 ) {
|
966 |
-
return (ini_get('mbstring.func_overload') & 2) ? mb_strrpos( $haystack, $needle, $offset, '8bit') : strrpos($haystack, $needle, $offset);
|
967 |
}
|
|
|
|
|
|
|
|
|
|
|
968 |
private function _strtoupper( $str ) {
|
969 |
-
return (ini_get('mbstring.func_overload') & 2) ? mb_strtoupper($str
|
970 |
}
|
|
|
971 |
private function _substr( $str, $start, $length = null ) {
|
972 |
-
return (ini_get('mbstring.func_overload') & 2) ? mb_substr( $str, $start, ($length === null) ? mb_strlen($str,'8bit') : $length, '8bit') : substr($str, $start, ($length === null) ? strlen($str) : $length );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
973 |
}
|
974 |
|
975 |
} // class SimpleXLSX
|
2 |
/**
|
3 |
* Excel 2007-2019/Office 365 Reader Class
|
4 |
*
|
5 |
+
* Based on SimpleXLSX v0.8.18 by Sergey Shuchkin.
|
6 |
* @link https://github.com/shuchkin/simplexlsx/
|
7 |
*
|
8 |
* @package TablePress
|
26 |
* @since 1.1.0
|
27 |
*/
|
28 |
class SimpleXLSX {
|
29 |
+
public static $CF = [ // Cell formats
|
|
|
|
|
|
|
|
|
30 |
0 => 'General',
|
31 |
1 => '0',
|
32 |
2 => '0.00',
|
73 |
68 => 't0.00%',
|
74 |
69 => 't# ?/?',
|
75 |
70 => 't# ??/??',
|
76 |
+
];
|
77 |
+
public $cellFormats = [];
|
78 |
public $datetimeFormat = 'Y-m-d H:i:s';
|
79 |
public $debug;
|
80 |
|
|
|
|
|
81 |
/* @var SimpleXMLElement[] $sheets */
|
82 |
private $sheets;
|
83 |
+
private $sheetNames = [];
|
84 |
+
private $sheetFiles = [];
|
85 |
// scheme
|
86 |
private $styles;
|
87 |
private $hyperlinks;
|
88 |
/* @var array[] $package */
|
89 |
private $package;
|
|
|
90 |
private $sharedstrings;
|
91 |
private $date1904 = 0;
|
92 |
|
137 |
if ( $debug !== null ) {
|
138 |
$this->debug = $debug;
|
139 |
}
|
140 |
+
$this->package = [
|
141 |
'filename' => '',
|
142 |
'mtime' => 0,
|
143 |
'size' => 0,
|
144 |
'comment' => '',
|
145 |
+
'entries' => []
|
146 |
+
];
|
147 |
+
if ( $filename && $this->_unzip( $filename, $is_data ) ) {
|
148 |
$this->_parse();
|
149 |
}
|
150 |
}
|
151 |
+
|
152 |
public static function parseFile( $filename, $debug = false ) {
|
153 |
return self::parse( $filename, false, $debug );
|
154 |
}
|
155 |
+
|
156 |
public static function parseData( $data, $debug = false ) {
|
157 |
return self::parse( $data, true, $debug );
|
158 |
}
|
159 |
+
|
160 |
public static function parse( $filename, $is_data = false, $debug = false ) {
|
161 |
+
$xlsx = new self();
|
162 |
$xlsx->debug = $debug;
|
163 |
+
if ( $xlsx->_unzip( $filename, $is_data ) ) {
|
164 |
$xlsx->_parse();
|
165 |
}
|
166 |
if ( $xlsx->success() ) {
|
171 |
|
172 |
return false;
|
173 |
}
|
174 |
+
|
175 |
public static function parseError( $set = false ) {
|
176 |
static $error = false;
|
177 |
+
|
178 |
return $set ? $error = $set : $error;
|
179 |
}
|
180 |
+
|
181 |
public static function parseErrno( $set = false ) {
|
182 |
static $errno = false;
|
183 |
+
|
184 |
return $set ? $errno = $set : $errno;
|
185 |
}
|
186 |
|
187 |
private function _unzip( $filename, $is_data = false ) {
|
188 |
|
|
|
|
|
|
|
189 |
if ( $is_data ) {
|
190 |
|
191 |
$this->package['filename'] = 'default.xlsx';
|
217 |
return false;
|
218 |
}
|
219 |
*/
|
220 |
+
// Explode to each part
|
221 |
+
$aE = explode( "\x50\x4b\x03\x04", $vZ );
|
222 |
+
array_shift( $aE );
|
223 |
+
|
224 |
+
$aEL = count( $aE );
|
225 |
+
if ( $aEL === 0 ) {
|
226 |
$this->error( 2, 'Unknown archive format' );
|
227 |
|
228 |
return false;
|
229 |
}
|
230 |
+
// Search central directory end record
|
231 |
+
$last = $aE[ $aEL - 1 ];
|
232 |
+
$last = explode( "\x50\x4b\x05\x06", $last );
|
233 |
+
if ( count( $last ) !== 2 ) {
|
234 |
+
$this->error( 2, 'Unknown archive format' );
|
|
|
|
|
|
|
235 |
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
// Search central directory
|
239 |
+
$last = explode( "\x50\x4b\x01\x02", $last[0] );
|
240 |
+
if ( count( $last ) < 2 ) {
|
241 |
+
$this->error( 2, 'Unknown archive format' );
|
242 |
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
$aE[ $aEL - 1 ] = $last[0];
|
|
|
|
|
|
|
246 |
|
247 |
// Loop through the entries
|
248 |
foreach ( $aE as $vZ ) {
|
249 |
+
$aI = [];
|
250 |
$aI['E'] = 0;
|
251 |
$aI['EM'] = '';
|
252 |
// Retrieving local file header information
|
275 |
|
276 |
// Getting stored filename
|
277 |
$aI['N'] = $this->_substr( $vZ, 26, $nF );
|
278 |
+
$aI['N'] = str_replace( '\\', '/', $aI['N'] );
|
279 |
|
280 |
if ( $this->_substr( $aI['N'], - 1 ) === '/' ) {
|
281 |
// is a directory entry - will be skipped
|
284 |
|
285 |
// Truncate full filename in path and filename
|
286 |
$aI['P'] = dirname( $aI['N'] );
|
287 |
+
$aI['P'] = ( $aI['P'] === '.' ) ? '' : $aI['P'];
|
288 |
$aI['N'] = basename( $aI['N'] );
|
289 |
|
290 |
$vZ = $this->_substr( $vZ, 26 + $nF + $mF );
|
341 |
( ( $aP['FD'] & 0xfe00 ) >> 9 ) + 1980 );
|
342 |
|
343 |
//$this->Entries[] = &new SimpleUnzipEntry($aI);
|
344 |
+
$this->package['entries'][] = [
|
345 |
'data' => $aI['D'],
|
346 |
'error' => $aI['E'],
|
347 |
'error_msg' => $aI['EM'],
|
348 |
'name' => $aI['N'],
|
349 |
'path' => $aI['P'],
|
350 |
'time' => $aI['T']
|
351 |
+
];
|
352 |
|
353 |
} // end for each entries
|
354 |
|
368 |
|
369 |
return $this->error;
|
370 |
}
|
371 |
+
|
372 |
public function errno() {
|
373 |
return $this->errno;
|
374 |
}
|
375 |
|
376 |
private function _parse() {
|
377 |
// Document data holders
|
378 |
+
$this->sharedstrings = [];
|
379 |
+
$this->sheets = [];
|
380 |
// $this->styles = array();
|
381 |
|
382 |
// Read relations and search for officeDocument
|
384 |
|
385 |
foreach ( $relations->Relationship as $rel ) {
|
386 |
|
387 |
+
$rel_type = basename( trim( (string) $rel['Type'] ) ); // officeDocument
|
388 |
+
$rel_target = $this->_getTarget( '', (string) $rel['Target'] ); // /xl/workbook.xml or xl/workbook.xml
|
389 |
|
390 |
+
if ( $rel_type === 'officeDocument' && $workbook = $this->getEntryXML( $rel_target ) ) {
|
391 |
|
392 |
+
$index_rId = []; // [0 => rId1]
|
393 |
|
394 |
$index = 0;
|
395 |
+
foreach ( $workbook->sheets->sheet as $s ) {
|
|
|
396 |
$this->sheetNames[ $index ] = (string) $s['name'];
|
397 |
+
$index_rId[ $index ] = (string) $s['id'];
|
398 |
+
$index ++;
|
399 |
}
|
400 |
+
if ( (int) $workbook->workbookPr['date1904'] === 1 ) {
|
401 |
$this->date1904 = 1;
|
402 |
}
|
403 |
|
|
|
|
|
404 |
|
405 |
if ( $workbookRelations = $this->getEntryXML( dirname( $rel_target ) . '/_rels/workbook.xml.rels' ) ) {
|
406 |
|
407 |
// Loop relations for workbook and extract sheets...
|
408 |
foreach ( $workbookRelations->Relationship as $workbookRelation ) {
|
409 |
|
410 |
+
$wrel_type = basename( trim( (string) $workbookRelation['Type'] ) );
|
411 |
+
$wrel_path = $this->_getTarget( dirname( $rel_target ), (string) $workbookRelation['Target'] );
|
412 |
if ( ! $this->entryExists( $wrel_path ) ) {
|
413 |
continue;
|
414 |
}
|
415 |
|
416 |
|
417 |
+
if ( $wrel_type === 'worksheet' ) { // Sheets
|
418 |
|
419 |
if ( $sheet = $this->getEntryXML( $wrel_path ) ) {
|
420 |
+
$index = array_search( (string) $workbookRelation['Id'], $index_rId, false );
|
421 |
$this->sheets[ $index ] = $sheet;
|
422 |
+
$this->sheetFiles[ $index ] = $wrel_path;
|
423 |
}
|
424 |
|
425 |
+
} else if ( $wrel_type === 'sharedStrings' ) {
|
426 |
|
427 |
if ( $sharedStrings = $this->getEntryXML( $wrel_path ) ) {
|
428 |
foreach ( $sharedStrings->si as $val ) {
|
433 |
}
|
434 |
}
|
435 |
}
|
436 |
+
} else if ( $wrel_type === 'styles' ) {
|
437 |
|
438 |
$this->styles = $this->getEntryXML( $wrel_path );
|
439 |
|
440 |
+
$nf = [];
|
441 |
if ( $this->styles->numFmts->numFmt !== null ) {
|
442 |
foreach ( $this->styles->numFmts->numFmt as $v ) {
|
443 |
$nf[ (int) $v['numFmtId'] ] = (string) $v['formatCode'];
|
450 |
$v['format'] = '';
|
451 |
|
452 |
if ( isset( $v['@attributes']['numFmtId'] ) ) {
|
453 |
+
$v = $v['@attributes'];
|
454 |
$fid = (int) $v['numFmtId'];
|
455 |
// formats priority
|
456 |
if ( isset( $nf[ $fid ] ) ) {
|
479 |
|
480 |
return false;
|
481 |
}
|
482 |
+
|
483 |
/*
|
484 |
* @param string $name Filename in archive
|
485 |
* @return SimpleXMLElement|bool
|
488 |
if ( $entry_xml = $this->getEntryData( $name ) ) {
|
489 |
$entry_xml = trim( $entry_xml );
|
490 |
// dirty remove namespace prefixes and empty rows
|
491 |
+
$entry_xml = preg_replace( '/xmlns[^=]*="[^"]*"/i', '', $entry_xml ); // remove namespaces
|
492 |
+
$entry_xml = preg_replace( '/[a-zA-Z0-9]+:([a-zA-Z0-9]+="[^"]+")/', '$1$2', $entry_xml ); // remove namespaced attrs
|
493 |
+
$entry_xml = preg_replace( '/<[a-zA-Z0-9]+:([^>]+)>/', '<$1>', $entry_xml ); // fix namespaced openned tags
|
494 |
+
$entry_xml = preg_replace( '/<\/[a-zA-Z0-9]+:([^>]+)>/', '</$1>', $entry_xml ); // fix namespaced closed tags
|
495 |
|
496 |
// if ( $this->skipEmptyRows && strpos($name, '/sheet') ) {
|
497 |
+
if ( strpos( $name, '/sheet' ) ) { // dirty skip empty rows
|
498 |
+
$entry_xml = preg_replace( '/<row[^>]+>\s*(<c[^\/]+\/>\s*)+<\/row>/', '', $entry_xml, - 1, $cnt ); // remove empty rows
|
499 |
+
$entry_xml = preg_replace( '/<row[^\/>]*\/>/', '', $entry_xml, - 1, $cnt2 );
|
500 |
+
$entry_xml = preg_replace( '/<row[^>]*><\/row>/', '', $entry_xml, - 1, $cnt3 );
|
501 |
+
if ( $cnt || $cnt2 || $cnt3 ) {
|
502 |
+
$entry_xml = preg_replace( '/<dimension[^\/]+\/>/', '', $entry_xml );
|
503 |
}
|
504 |
// file_put_contents( basename( $name ), $entry_xml ); // @to do comment!!!
|
505 |
}
|
507 |
// XML External Entity (XXE) Prevention
|
508 |
$_old = libxml_disable_entity_loader();
|
509 |
$entry_xmlobj = simplexml_load_string( $entry_xml );
|
510 |
+
|
511 |
+
libxml_disable_entity_loader( $_old );
|
512 |
if ( $entry_xmlobj ) {
|
513 |
return $entry_xmlobj;
|
514 |
}
|
515 |
$e = libxml_get_last_error();
|
516 |
+
$this->error( 3, 'XML-entry ' . $name . ' parser error ' . $e->message . ' line ' . $e->line );
|
517 |
} else {
|
518 |
$this->error( 4, 'XML-entry not found ' . $name );
|
519 |
}
|
520 |
+
|
521 |
return false;
|
522 |
}
|
523 |
|
524 |
public function getEntryData( $name ) {
|
525 |
+
$name = ltrim( str_replace( '\\', '/', $name ), '/' );
|
526 |
$dir = $this->_strtoupper( dirname( $name ) );
|
527 |
$name = $this->_strtoupper( basename( $name ) );
|
528 |
foreach ( $this->package['entries'] as $entry ) {
|
530 |
return $entry['data'];
|
531 |
}
|
532 |
}
|
533 |
+
$this->error( 5, 'Entry not found ' . ( $dir ? $dir . '/' : '' ) . $name );
|
534 |
|
535 |
return false;
|
536 |
}
|
548 |
}
|
549 |
|
550 |
private function _parseRichText( $is = null ) {
|
551 |
+
$value = [];
|
552 |
|
553 |
if ( isset( $is->t ) ) {
|
554 |
$value[] = (string) $is->t;
|
555 |
+
} else if ( isset( $is->r ) ) {
|
556 |
foreach ( $is->r as $run ) {
|
557 |
$value[] = (string) $run->t;
|
558 |
}
|
570 |
if ( ( $ws = $this->worksheet( $worksheetIndex ) ) === false ) {
|
571 |
return false;
|
572 |
}
|
573 |
+
$dim = $this->dimension( $worksheetIndex );
|
574 |
$numCols = $dim[0];
|
575 |
$numRows = $dim[1];
|
576 |
|
577 |
+
$emptyRow = [];
|
578 |
+
for ( $i = 0; $i < $numCols; $i ++ ) {
|
579 |
$emptyRow[] = '';
|
580 |
}
|
581 |
|
582 |
+
$rows = [];
|
583 |
+
for ( $i = 0; $i < $numRows; $i ++ ) {
|
584 |
$rows[] = $emptyRow;
|
585 |
}
|
586 |
|
591 |
foreach ( $row->c as $c ) {
|
592 |
// detect skipped cols
|
593 |
$idx = $this->getIndex( (string) $c['r'] );
|
594 |
+
$x = $idx[0];
|
595 |
+
$y = $idx[1];
|
596 |
|
597 |
+
if ( $x > - 1 ) {
|
598 |
$curC = $x;
|
599 |
$curR = $y;
|
600 |
}
|
601 |
|
602 |
$rows[ $curR ][ $curC ] = $this->value( $c );
|
603 |
+
$curC ++;
|
604 |
}
|
605 |
|
606 |
$curR ++;
|
615 |
return false;
|
616 |
}
|
617 |
|
618 |
+
$rows = [];
|
619 |
|
620 |
+
$dim = $this->dimension( $worksheetIndex );
|
621 |
$numCols = $dim[0];
|
622 |
$numRows = $dim[1];
|
623 |
|
624 |
+
for ( $y = 0; $y < $numRows; $y ++ ) {
|
625 |
+
for ( $x = 0; $x < $numCols; $x ++ ) {
|
626 |
// 0.6.8
|
627 |
$c = '';
|
628 |
for ( $k = $x; $k >= 0; $k = (int) ( $k / 26 ) - 1 ) {
|
629 |
$c = chr( $k % 26 + 65 ) . $c;
|
630 |
}
|
631 |
+
$rows[ $y ][ $x ] = [
|
632 |
'type' => '',
|
633 |
'name' => $c . ( $y + 1 ),
|
634 |
'value' => '',
|
635 |
'href' => '',
|
636 |
'f' => '',
|
637 |
'format' => '',
|
638 |
+
'r' => $y
|
639 |
+
];
|
640 |
}
|
641 |
}
|
642 |
|
645 |
foreach ( $ws->sheetData->row as $row ) {
|
646 |
|
647 |
$r_idx = (int) $row['r'];
|
648 |
+
$curC = 0;
|
649 |
|
650 |
foreach ( $row->c as $c ) {
|
651 |
$r = (string) $c['r'];
|
653 |
$s = (int) $c['s'];
|
654 |
|
655 |
$idx = $this->getIndex( $r );
|
656 |
+
$x = $idx[0];
|
657 |
+
$y = $idx[1];
|
658 |
|
659 |
+
if ( $x > - 1 ) {
|
660 |
$curC = $x;
|
661 |
$curR = $y;
|
662 |
}
|
667 |
$format = '';
|
668 |
}
|
669 |
|
670 |
+
$rows[ $curR ][ $curC ] = [
|
671 |
'type' => $t,
|
672 |
'name' => (string) $c['r'],
|
673 |
'value' => $this->value( $c ),
|
674 |
+
'href' => $this->href( $worksheetIndex, $c ),
|
675 |
'f' => (string) $c->f,
|
676 |
'format' => $format,
|
677 |
+
'r' => $r_idx
|
678 |
+
];
|
679 |
+
$curC ++;
|
680 |
}
|
681 |
$curR ++;
|
682 |
}
|
684 |
return $rows;
|
685 |
|
686 |
}
|
687 |
+
|
688 |
public function toHTML( $worksheetIndex = 0 ) {
|
689 |
$s = '<table class=excel>';
|
690 |
+
foreach ( $this->rows( $worksheetIndex ) as $r ) {
|
691 |
$s .= '<tr>';
|
692 |
foreach ( $r as $c ) {
|
693 |
+
$s .= '<td nowrap>' . ( $c === '' ? ' ' : htmlspecialchars( $c, ENT_QUOTES ) ) . '</td>';
|
694 |
}
|
695 |
$s .= "</tr>\r\n";
|
696 |
}
|
697 |
$s .= '</table>';
|
698 |
+
|
699 |
return $s;
|
700 |
}
|
701 |
|
702 |
public function worksheet( $worksheetIndex = 0 ) {
|
703 |
|
704 |
|
|
|
705 |
if ( isset( $this->sheets[ $worksheetIndex ] ) ) {
|
706 |
$ws = $this->sheets[ $worksheetIndex ];
|
707 |
|
708 |
+
if ( !isset($this->hyperlinks[ $worksheetIndex ]) && isset( $ws->hyperlinks ) ) {
|
709 |
+
$this->hyperlinks[ $worksheetIndex ] = [];
|
710 |
+
$sheet_rels = str_replace('worksheets','worksheets/_rels', $this->sheetFiles[$worksheetIndex]).'.rels';
|
711 |
+
$link_ids = [];
|
712 |
+
|
713 |
+
if ( $rels = $this->getEntryXML( $sheet_rels ) ) {
|
714 |
+
// hyperlink
|
715 |
+
// $rel_base = dirname( $sheet_rels );
|
716 |
+
foreach ( $rels->Relationship as $rel ) {
|
717 |
+
$rel_type = basename( trim( (string) $rel['Type'] ) );
|
718 |
+
if ( $rel_type === 'hyperlink' ) {
|
719 |
+
$rel_id = (string) $rel['Id'];
|
720 |
+
$rel_target = (string) $rel['Target'];
|
721 |
+
$link_ids[ $rel_id ] = $rel_target;
|
722 |
+
}
|
723 |
+
}
|
724 |
+
foreach ( $ws->hyperlinks->hyperlink as $hyperlink ) {
|
725 |
+
$ref = (string) $hyperlink['ref'];
|
726 |
+
if ( $this->_strpos($ref,':') > 0 ) { // A1:A8 -> A1
|
727 |
+
$ref = explode(':', $ref);
|
728 |
+
$ref = $ref[0];
|
729 |
+
}
|
730 |
+
// $this->hyperlinks[ $worksheetIndex ][ $ref ] = (string) $hyperlink['display'];
|
731 |
+
$this->hyperlinks[ $worksheetIndex ][ $ref ] = $link_ids[ (string) $hyperlink['id'] ];
|
732 |
+
}
|
733 |
}
|
734 |
}
|
735 |
|
750 |
public function dimension( $worksheetIndex = 0 ) {
|
751 |
|
752 |
if ( ( $ws = $this->worksheet( $worksheetIndex ) ) === false ) {
|
753 |
+
return [ 0, 0 ];
|
754 |
}
|
755 |
/* @var SimpleXMLElement $ws */
|
756 |
|
757 |
$ref = (string) $ws->dimension['ref'];
|
758 |
|
759 |
if ( $this->_strpos( $ref, ':' ) !== false ) {
|
760 |
+
$d = explode( ':', $ref );
|
761 |
$idx = $this->getIndex( $d[1] );
|
762 |
|
763 |
+
return [ $idx[0] + 1, $idx[1] + 1 ];
|
764 |
}
|
765 |
if ( $ref !== '' ) { // 0.6.8
|
766 |
$index = $this->getIndex( $ref );
|
767 |
|
768 |
+
return [ $index[0] + 1, $index[1] + 1 ];
|
769 |
}
|
770 |
|
771 |
// slow method
|
773 |
foreach ( $ws->sheetData->row as $row ) {
|
774 |
foreach ( $row->c as $c ) {
|
775 |
$idx = $this->getIndex( (string) $c['r'] );
|
776 |
+
$x = $idx[0];
|
777 |
+
$y = $idx[1];
|
778 |
if ( $x > 0 ) {
|
779 |
if ( $x > $maxC ) {
|
780 |
$maxC = $x;
|
786 |
}
|
787 |
}
|
788 |
|
789 |
+
return [ $maxC + 1, $maxR + 1 ];
|
790 |
}
|
791 |
|
792 |
public function getIndex( $cell = 'A1' ) {
|
800 |
|
801 |
for ( $i = $colLen - 1; $i >= 0; $i -- ) {
|
802 |
/** @noinspection PowerOperatorCanBeUsedInspection */
|
803 |
+
$index += ( ord( $col[ $i ] ) - 64 ) * pow( 26, $colLen - $i - 1 );
|
804 |
}
|
805 |
|
806 |
+
return [ $index - 1, $row - 1 ];
|
807 |
}
|
808 |
+
|
809 |
// $this->error( 'Invalid cell index ' . $cell );
|
810 |
|
811 |
+
return [ - 1, - 1 ];
|
812 |
}
|
813 |
|
814 |
public function value( $cell ) {
|
815 |
// Determine data type
|
816 |
$dataType = (string) $cell['t'];
|
817 |
|
818 |
+
if ( $dataType === '' || $dataType === 'n' ) { // number
|
819 |
$s = (int) $cell['s'];
|
820 |
if ( $s > 0 && isset( $this->cellFormats[ $s ] ) ) {
|
821 |
$format = $this->cellFormats[ $s ]['format'];
|
822 |
+
if ( preg_match( '/[mM]/', $format ) ) { // [m]onth
|
823 |
$dataType = 'd';
|
824 |
}
|
825 |
}
|
864 |
break;
|
865 |
case 'd':
|
866 |
// Value is a date and non-empty
|
867 |
+
if ( ! empty( $cell->v ) ) {
|
868 |
$value = $this->datetimeFormat ? gmdate( $this->datetimeFormat, $this->unixstamp( (float) $cell->v ) ) : (float) $cell->v;
|
869 |
}
|
870 |
break;
|
913 |
*/
|
914 |
public function getCell( $worksheetIndex = 0, $cell = 'A1' ) {
|
915 |
|
916 |
+
if ( ( $ws = $this->worksheet( $worksheetIndex ) ) === false ) {
|
917 |
+
return false;
|
918 |
+
}
|
919 |
|
920 |
$idx = is_array( $cell ) ? $cell : $this->getIndex( (string) $cell );
|
921 |
+
$C = $idx[0];
|
922 |
+
$R = $idx[1];
|
923 |
|
924 |
$curR = 0;
|
925 |
/* @var SimpleXMLElement $ws */
|
928 |
foreach ( $row->c as $c ) {
|
929 |
// detect skipped cols
|
930 |
$idx = $this->getIndex( (string) $c['r'] );
|
931 |
+
$x = $idx[0];
|
932 |
+
$y = $idx[1];
|
933 |
if ( $x > 0 ) {
|
934 |
$curC = $x;
|
935 |
$curR = $y;
|
937 |
if ( $curR === $R && $curC === $C ) {
|
938 |
return $this->value( $c );
|
939 |
}
|
940 |
+
if ( $curR > $R ) {
|
941 |
return null;
|
942 |
}
|
943 |
+
$curC ++;
|
944 |
}
|
945 |
|
946 |
$curR ++;
|
947 |
}
|
948 |
+
|
949 |
return null;
|
950 |
}
|
951 |
|
952 |
+
public function href( $worksheetIndex, $cell ) {
|
953 |
+
$ref = (string) $cell['r'];
|
954 |
+
return isset( $this->hyperlinks[ $worksheetIndex ][ $ref ] ) ? $this->hyperlinks[ $worksheetIndex ][ $ref ] : '';
|
955 |
}
|
956 |
|
957 |
public function sheets() {
|
963 |
}
|
964 |
|
965 |
public function sheetName( $worksheetIndex ) {
|
966 |
+
if ( isset( $this->sheetNames[ $worksheetIndex ] ) ) {
|
967 |
return $this->sheetNames[ $worksheetIndex ];
|
968 |
}
|
969 |
|
984 |
public function getPackage() {
|
985 |
return $this->package;
|
986 |
}
|
987 |
+
|
988 |
public function setDateTimeFormat( $value ) {
|
989 |
+
$this->datetimeFormat = is_string( $value ) ? $value : false;
|
990 |
}
|
991 |
+
|
992 |
private function _strlen( $str ) {
|
993 |
+
return ( ini_get( 'mbstring.func_overload' ) & 2 ) ? mb_strlen( $str, '8bit' ) : strlen( $str );
|
994 |
}
|
995 |
+
|
996 |
private function _strpos( $haystack, $needle, $offset = 0 ) {
|
997 |
+
return ( ini_get( 'mbstring.func_overload' ) & 2 ) ? mb_strpos( $haystack, $needle, $offset, '8bit' ) : strpos( $haystack, $needle, $offset );
|
|
|
|
|
|
|
998 |
}
|
999 |
+
|
1000 |
+
/*
|
1001 |
+
private function _strrpos( $haystack, $needle, $offset = 0 ) {
|
1002 |
+
return (ini_get('mbstring.func_overload') & 2) ? mb_strrpos( $haystack, $needle, $offset, '8bit') : strrpos($haystack, $needle, $offset);
|
1003 |
+
}*/
|
1004 |
private function _strtoupper( $str ) {
|
1005 |
+
return ( ini_get( 'mbstring.func_overload' ) & 2 ) ? mb_strtoupper( $str, '8bit' ) : strtoupper( $str );
|
1006 |
}
|
1007 |
+
|
1008 |
private function _substr( $str, $start, $length = null ) {
|
1009 |
+
return ( ini_get( 'mbstring.func_overload' ) & 2 ) ? mb_substr( $str, $start, ( $length === null ) ? mb_strlen( $str, '8bit' ) : $length, '8bit' ) : substr( $str, $start, ( $length === null ) ? strlen( $str ) : $length );
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
private function _getTarget( $base, $target ) {
|
1013 |
+
$target = trim( $target );
|
1014 |
+
if ( strpos( $target, '/' ) === 0 ) {
|
1015 |
+
return $this->_substr( $target, 1 );
|
1016 |
+
}
|
1017 |
+
$target = ( $base ? $base . '/' : '' ) . $target;
|
1018 |
+
// a/b/../c -> a/c
|
1019 |
+
$parts = explode( '/', $target );
|
1020 |
+
$abs = [];
|
1021 |
+
foreach ( $parts as $p ) {
|
1022 |
+
if ( '.' === $p ) {
|
1023 |
+
continue;
|
1024 |
+
}
|
1025 |
+
if ( '..' === $p ) {
|
1026 |
+
array_pop( $abs );
|
1027 |
+
} else {
|
1028 |
+
$abs[] = $p;
|
1029 |
+
}
|
1030 |
+
}
|
1031 |
+
return implode( '/', $abs );
|
1032 |
}
|
1033 |
|
1034 |
} // class SimpleXLSX
|
models/model-table.php
CHANGED
@@ -921,10 +921,9 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
921 |
* @param array $table Table to merge into.
|
922 |
* @param array $new_table Table to merge.
|
923 |
* @param bool $table_size_check Optional. Whether to check the number of rows and columns (e.g. not necessary for added or copied tables).
|
924 |
-
* @param bool $extended_visibility_check Optional. Whether to check the counts of hidden rows and columns (only possible for Admin_AJAX controller as of now).
|
925 |
* @return array|WP_Error Merged table on success, WP_Error on error.
|
926 |
*/
|
927 |
-
public function prepare_table( array $table, array $new_table, $table_size_check = true
|
928 |
// Table ID must be the same (if there was an ID already).
|
929 |
if ( false !== $table['id'] ) {
|
930 |
if ( $table['id'] !== $new_table['id'] ) {
|
@@ -970,31 +969,6 @@ class TablePress_Table_Model extends TablePress_Model {
|
|
970 |
|| count( $new_table['visibility']['columns'] ) !== $new_table['number']['columns'] ) {
|
971 |
return new WP_Error( 'table_prepare_size_check_visibility_doesnt_match' );
|
972 |
}
|
973 |
-
|
974 |
-
if ( $extended_visibility_check ) { // only for Admin_AJAX controller
|
975 |
-
if ( ! isset( $new_table['number']['hidden_rows'] )
|
976 |
-
|| ! isset( $new_table['number']['hidden_columns'] ) ) {
|
977 |
-
return new WP_Error( 'table_prepare_extended_visibility_check_numbers_not_set' );
|
978 |
-
}
|
979 |
-
$new_table['number']['hidden_rows'] = intval( $new_table['number']['hidden_rows'] );
|
980 |
-
$new_table['number']['hidden_columns'] = intval( $new_table['number']['hidden_columns'] );
|
981 |
-
// Count hidden and visible rows.
|
982 |
-
$num_visible_rows = count( array_keys( $new_table['visibility']['rows'], 1 ) );
|
983 |
-
$num_hidden_rows = count( array_keys( $new_table['visibility']['rows'], 0 ) );
|
984 |
-
// Check number of hidden and visible rows.
|
985 |
-
if ( $new_table['number']['hidden_rows'] !== $num_hidden_rows
|
986 |
-
|| ( $new_table['number']['rows'] - $new_table['number']['hidden_rows'] ) !== $num_visible_rows ) {
|
987 |
-
return new WP_Error( 'table_prepare_extended_visibility_check_rows_dont_match' );
|
988 |
-
}
|
989 |
-
// Count hidden and visible columns.
|
990 |
-
$num_visible_columns = count( array_keys( $new_table['visibility']['columns'], 1 ) );
|
991 |
-
$num_hidden_columns = count( array_keys( $new_table['visibility']['columns'], 0 ) );
|
992 |
-
// Check number of hidden and visible columns.
|
993 |
-
if ( $new_table['number']['hidden_columns'] !== $num_hidden_columns
|
994 |
-
|| ( $new_table['number']['columns'] - $new_table['number']['hidden_columns'] ) !== $num_visible_columns ) {
|
995 |
-
return new WP_Error( 'table_prepare_extended_visibility_check_columns_dont_match' );
|
996 |
-
}
|
997 |
-
}
|
998 |
}
|
999 |
|
1000 |
// All checks were successful, replace original values with new ones.
|
921 |
* @param array $table Table to merge into.
|
922 |
* @param array $new_table Table to merge.
|
923 |
* @param bool $table_size_check Optional. Whether to check the number of rows and columns (e.g. not necessary for added or copied tables).
|
|
|
924 |
* @return array|WP_Error Merged table on success, WP_Error on error.
|
925 |
*/
|
926 |
+
public function prepare_table( array $table, array $new_table, $table_size_check = true ) {
|
927 |
// Table ID must be the same (if there was an ID already).
|
928 |
if ( false !== $table['id'] ) {
|
929 |
if ( $table['id'] !== $new_table['id'] ) {
|
969 |
|| count( $new_table['visibility']['columns'] ) !== $new_table['number']['columns'] ) {
|
970 |
return new WP_Error( 'table_prepare_size_check_visibility_doesnt_match' );
|
971 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
}
|
973 |
|
974 |
// All checks were successful, replace original values with new ones.
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link: https://tablepress.org/donate/
|
|
4 |
Tags: table,spreadsheet,data,csv,excel,html,tables
|
5 |
Requires at least: 5.3
|
6 |
Requires PHP: 5.6.20
|
7 |
-
Tested up to: 5.
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -54,7 +54,7 @@ Manual installation works just as for other WordPress plugins:
|
|
54 |
Many questions, regarding different features or styling, have been answered on the [FAQ page](https://tablepress.org/faq/) on the plugin website.
|
55 |
|
56 |
= Support? =
|
57 |
-
For support questions, bug reports, or feature requests, please use the [WordPress Support Forums](https://wordpress.org/support/plugin/tablepress). Please search through the forums first, and only [create a new topic](https://wordpress.org/support/plugin/tablepress#new-post) if you don't find an existing answer. Thank you!
|
58 |
|
59 |
= Requirements? =
|
60 |
In short: WordPress 5.3 or higher, while the latest version of WordPress is always recommended.
|
@@ -62,7 +62,7 @@ In short: WordPress 5.3 or higher, while the latest version of WordPress is alwa
|
|
62 |
= Languages and Localization? =
|
63 |
TablePress uses the ["Translate WordPress" platform](https://translate.wordpress.org/). Please see the sidebar on the TablePress page in the [WordPress Plugin Directory](https://wordpress.org/plugins/tablepress/) for available translations.
|
64 |
|
65 |
-
To make TablePress available in your language, go to the [TablePress translations page](https://translate.wordpress.org/projects/wp-plugins/tablepress
|
66 |
|
67 |
= Migration from WP-Table Reloaded =
|
68 |
Several years ago, TablePress has superseded the now discontinued WP-Table Reloaded plugin. If you are still using that, please see the [migration guide](https://tablepress.org/migration-from-wp-table-reloaded/) and switch to TablePress.
|
@@ -97,6 +97,14 @@ You may use it free of charge for any purpose.
|
|
97 |
|
98 |
Recent changes are shown below. For earlier changes, please see the [changelog history](https://tablepress.org/info/#changelog).
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= Version 1.11 =
|
101 |
* Full compatibility with WordPress 5.4.
|
102 |
* Enhancement: Update list of allowed CSS features in "Custom CSS".
|
@@ -107,24 +115,10 @@ Recent changes are shown below. For earlier changes, please see the [changelog h
|
|
107 |
* Updated external libraries (SimpleXLSX, CSSTidy, Build tools).
|
108 |
* Some internal changes for better stability, translations, and documentation.
|
109 |
|
110 |
-
= Version 1.10 =
|
111 |
-
* Full compatibility with WordPress 5.3.
|
112 |
-
* Enhancement: Allow importing with replacing/appending existing tables with ZIP archives of JSON files.
|
113 |
-
* Enhancement: Greatly enhance the code quality by removing old code and using modern features of PHP.
|
114 |
-
* Enhancement: Flush the caches of more caching plugins when the "Custom CSS" was modified.
|
115 |
-
* Enhancement: Update list of allowed CSS features in "Custom CSS".
|
116 |
-
* Enhancement: Add more math formulas to the formula parser.
|
117 |
-
* Bugfix: Restore correct behavior when moving columns on the "Edit" screen.
|
118 |
-
* Bugfix: Properly hide text that is intended for screen readers only.
|
119 |
-
* Updated external libraries (DataTables, SimpleXLSX, CSSTidy, Build tools).
|
120 |
-
* Some internal changes for better stability, security, translations, and documentation.
|
121 |
-
* Removed the migration/import code for the discontinued WP-Table Reloaded plugin.
|
122 |
-
* TablePress 1.10 requires WordPress 5.3!
|
123 |
-
|
124 |
== Upgrade Notice ==
|
125 |
|
126 |
-
= 1.
|
127 |
This update is a stability, maintenance, and compatibility release. Updating is recommended.
|
128 |
|
129 |
-
= 1.
|
130 |
This update is a stability, maintenance, and compatibility release. Updating is recommended.
|
4 |
Tags: table,spreadsheet,data,csv,excel,html,tables
|
5 |
Requires at least: 5.3
|
6 |
Requires PHP: 5.6.20
|
7 |
+
Tested up to: 5.6
|
8 |
+
Stable tag: 1.12
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
54 |
Many questions, regarding different features or styling, have been answered on the [FAQ page](https://tablepress.org/faq/) on the plugin website.
|
55 |
|
56 |
= Support? =
|
57 |
+
For support questions, bug reports, or feature requests, please use the [WordPress Support Forums](https://wordpress.org/support/plugin/tablepress/). Please search through the forums first, and only [create a new topic](https://wordpress.org/support/plugin/tablepress#new-post) if you don't find an existing answer. Thank you!
|
58 |
|
59 |
= Requirements? =
|
60 |
In short: WordPress 5.3 or higher, while the latest version of WordPress is always recommended.
|
62 |
= Languages and Localization? =
|
63 |
TablePress uses the ["Translate WordPress" platform](https://translate.wordpress.org/). Please see the sidebar on the TablePress page in the [WordPress Plugin Directory](https://wordpress.org/plugins/tablepress/) for available translations.
|
64 |
|
65 |
+
To make TablePress available in your language, go to the [TablePress translations page](https://translate.wordpress.org/projects/wp-plugins/tablepress), log in with a free wordpress.org account and start translating.
|
66 |
|
67 |
= Migration from WP-Table Reloaded =
|
68 |
Several years ago, TablePress has superseded the now discontinued WP-Table Reloaded plugin. If you are still using that, please see the [migration guide](https://tablepress.org/migration-from-wp-table-reloaded/) and switch to TablePress.
|
97 |
|
98 |
Recent changes are shown below. For earlier changes, please see the [changelog history](https://tablepress.org/info/#changelog).
|
99 |
|
100 |
+
= Version 1.12 =
|
101 |
+
* Full compatibility with WordPress 5.5.
|
102 |
+
* Enhancement: Add placeholder variables with table and cell information for use in formulas.
|
103 |
+
* Bugfix: Properly handle math formulas with numbers in their names in the math parser.
|
104 |
+
* Bugfix: Restore proper highlighting of input fields with invalid values in the admin area.
|
105 |
+
* Updated external libraries (DataTables, SimpleXLSX, Build tools).
|
106 |
+
* Some internal changes for better stability, translations, and documentation.
|
107 |
+
|
108 |
= Version 1.11 =
|
109 |
* Full compatibility with WordPress 5.4.
|
110 |
* Enhancement: Update list of allowed CSS features in "Custom CSS".
|
115 |
* Updated external libraries (SimpleXLSX, CSSTidy, Build tools).
|
116 |
* Some internal changes for better stability, translations, and documentation.
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
== Upgrade Notice ==
|
119 |
|
120 |
+
= 1.12 =
|
121 |
This update is a stability, maintenance, and compatibility release. Updating is recommended.
|
122 |
|
123 |
+
= 1.11 =
|
124 |
This update is a stability, maintenance, and compatibility release. Updating is recommended.
|
tablepress.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
*
|
5 |
* @package TablePress
|
6 |
* @author Tobias Bäthge
|
7 |
-
* @version 1.
|
8 |
*
|
9 |
*
|
10 |
* Plugin Name: TablePress
|
11 |
* Plugin URI: https://tablepress.org/
|
12 |
* Description: Embed beautiful and feature-rich tables into your posts and pages, without having to write code.
|
13 |
-
* Version: 1.
|
14 |
* Requires at least: 5.3
|
15 |
* Requires PHP: 5.6.20
|
16 |
* Author: Tobias Bäthge
|
4 |
*
|
5 |
* @package TablePress
|
6 |
* @author Tobias Bäthge
|
7 |
+
* @version 1.12
|
8 |
*
|
9 |
*
|
10 |
* Plugin Name: TablePress
|
11 |
* Plugin URI: https://tablepress.org/
|
12 |
* Description: Embed beautiful and feature-rich tables into your posts and pages, without having to write code.
|
13 |
+
* Version: 1.12
|
14 |
* Requires at least: 5.3
|
15 |
* Requires PHP: 5.6.20
|
16 |
* Author: Tobias Bäthge
|
views/view-about.php
CHANGED
@@ -213,8 +213,8 @@ class TablePress_About_View extends TablePress_View {
|
|
213 |
</p>
|
214 |
<hr />
|
215 |
<p>
|
216 |
-
<a href="https://
|
217 |
-
<?php printf( _x( 'This release of TablePress is supported by %s, the most comprehensive WordPress activity logs plugin.', 'WP
|
218 |
</p>
|
219 |
<?php
|
220 |
}
|
213 |
</p>
|
214 |
<hr />
|
215 |
<p>
|
216 |
+
<a href="https://wpactivitylog.com/?utm_source=tablepress&utm_medium=referral&utm_campaign=WSAL" target="_blank" rel="noopener noreferrer"><img src="<?php echo plugins_url( 'admin/img/wsal-logo.png', TABLEPRESS__FILE__ ); ?>" alt="<?php printf( esc_attr_x( 'This release of TablePress is supported by %s, the most comprehensive WordPress activity logs plugin.', 'WP Activity Log', 'tablepress' ), 'WP Activity Log' ); ?>" style="width:100%;height:auto;max-width:320px;display:block;margin:0 auto" /></a>
|
217 |
+
<?php printf( _x( 'This release of TablePress is supported by %s, the most comprehensive WordPress activity logs plugin.', 'WP Activity Log', 'tablepress' ), '<a href="https://wpactivitylog.com/?utm_source=tablepress&utm_medium=referral&utm_campaign=WSAL" target="_blank" rel="noopener noreferrer">WP Activity Log</a>' ); ?>
|
218 |
</p>
|
219 |
<?php
|
220 |
}
|
views/view-add.php
CHANGED
@@ -31,7 +31,7 @@ class TablePress_Add_View extends TablePress_View {
|
|
31 |
public function setup( $action, array $data ) {
|
32 |
parent::setup( $action, $data );
|
33 |
|
34 |
-
$this->admin_page->enqueue_script( 'add', array( 'jquery
|
35 |
|
36 |
$this->process_action_messages( array(
|
37 |
'error_add' => __( 'Error: The table could not be added.', 'tablepress' ),
|
31 |
public function setup( $action, array $data ) {
|
32 |
parent::setup( $action, $data );
|
33 |
|
34 |
+
$this->admin_page->enqueue_script( 'add', array( 'jquery' ) );
|
35 |
|
36 |
$this->process_action_messages( array(
|
37 |
'error_add' => __( 'Error: The table could not be added.', 'tablepress' ),
|
views/view-edit.php
CHANGED
@@ -40,7 +40,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
40 |
parent::setup( $action, $data );
|
41 |
|
42 |
if ( isset( $data['table']['is_corrupted'] ) && $data['table']['is_corrupted'] ) {
|
43 |
-
$this->add_text_box( 'table-corrupted', array( $this, 'textbox_corrupted_table' ), '
|
44 |
return;
|
45 |
};
|
46 |
|
@@ -73,7 +73,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
73 |
wp_enqueue_script( 'wplink' );
|
74 |
|
75 |
$this->admin_page->enqueue_style( 'edit' );
|
76 |
-
$this->admin_page->enqueue_script( 'edit', array( 'jquery
|
77 |
'options' => array(
|
78 |
/**
|
79 |
* Filter whether debug output shall be printed to the page.
|
@@ -260,7 +260,7 @@ class TablePress_Edit_View extends TablePress_View {
|
|
260 |
}
|
261 |
}
|
262 |
}
|
263 |
-
//
|
264 |
if ( $options['table_foot'] ) {
|
265 |
for ( $row_idx = $rows - 1; $row_idx > -1; $row_idx-- ) {
|
266 |
if ( 1 === $visibility['rows'][ $row_idx ] ) {
|
@@ -635,8 +635,10 @@ class TablePress_Edit_View extends TablePress_View {
|
|
635 |
*/
|
636 |
public function textbox_corrupted_table( array $data, array $box ) {
|
637 |
?>
|
638 |
-
<div class="error">
|
639 |
-
<
|
|
|
|
|
640 |
<p>
|
641 |
<?php
|
642 |
printf( __( 'The internal data of table “%1$s” (ID %2$s) is corrupted.', 'tablepress' ), esc_html( $data['table']['name'] ), esc_html( $data['table']['id'] ) );
|
40 |
parent::setup( $action, $data );
|
41 |
|
42 |
if ( isset( $data['table']['is_corrupted'] ) && $data['table']['is_corrupted'] ) {
|
43 |
+
$this->add_text_box( 'table-corrupted', array( $this, 'textbox_corrupted_table' ), 'header' );
|
44 |
return;
|
45 |
};
|
46 |
|
73 |
wp_enqueue_script( 'wplink' );
|
74 |
|
75 |
$this->admin_page->enqueue_style( 'edit' );
|
76 |
+
$this->admin_page->enqueue_script( 'edit', array( 'jquery', 'jquery-ui-sortable' ), array(
|
77 |
'options' => array(
|
78 |
/**
|
79 |
* Filter whether debug output shall be printed to the page.
|
260 |
}
|
261 |
}
|
262 |
}
|
263 |
+
// Determine row index of the table foot row, by excluding all hidden rows from the end.
|
264 |
if ( $options['table_foot'] ) {
|
265 |
for ( $row_idx = $rows - 1; $row_idx > -1; $row_idx-- ) {
|
266 |
if ( 1 === $visibility['rows'][ $row_idx ] ) {
|
635 |
*/
|
636 |
public function textbox_corrupted_table( array $data, array $box ) {
|
637 |
?>
|
638 |
+
<div class="notice notice-error notice-large">
|
639 |
+
<h3><em>
|
640 |
+
<?php _e( 'Attention: Unfortunately, an error occurred.', 'tablepress' ); ?>
|
641 |
+
</em></h3>
|
642 |
<p>
|
643 |
<?php
|
644 |
printf( __( 'The internal data of table “%1$s” (ID %2$s) is corrupted.', 'tablepress' ), esc_html( $data['table']['name'] ), esc_html( $data['table']['id'] ) );
|
views/view-editor_button_thickbox.php
CHANGED
@@ -63,7 +63,7 @@ class TablePress_Editor_Button_Thickbox_View extends TablePress_View {
|
|
63 |
_wp_admin_html_begin();
|
64 |
|
65 |
wp_print_styles( 'colors' );
|
66 |
-
wp_print_scripts( 'jquery
|
67 |
?>
|
68 |
<title><?php printf( __( '%1$s ‹ %2$s', 'tablepress' ), __( 'List of Tables', 'tablepress' ), 'TablePress' ); ?></title>
|
69 |
<style type="text/css">
|
63 |
_wp_admin_html_begin();
|
64 |
|
65 |
wp_print_styles( 'colors' );
|
66 |
+
wp_print_scripts( 'jquery' );
|
67 |
?>
|
68 |
<title><?php printf( __( '%1$s ‹ %2$s', 'tablepress' ), __( 'List of Tables', 'tablepress' ), 'TablePress' ); ?></title>
|
69 |
<style type="text/css">
|
views/view-export.php
CHANGED
@@ -42,7 +42,7 @@ class TablePress_Export_View extends TablePress_View {
|
|
42 |
if ( 0 === $data['tables_count'] ) {
|
43 |
$this->add_meta_box( 'no-tables', __( 'Export Tables', 'tablepress' ), array( $this, 'postbox_no_tables' ), 'normal' );
|
44 |
} else {
|
45 |
-
$this->admin_page->enqueue_script( 'export', array( 'jquery
|
46 |
$this->add_meta_box( 'export-form', __( 'Export Tables', 'tablepress' ), array( $this, 'postbox_export_form' ), 'normal' );
|
47 |
$this->data['submit_button_caption'] = _x( 'Download Export File', 'button', 'tablepress' );
|
48 |
$this->add_text_box( 'submit', array( $this, 'textbox_submit_button' ), 'submit' );
|
42 |
if ( 0 === $data['tables_count'] ) {
|
43 |
$this->add_meta_box( 'no-tables', __( 'Export Tables', 'tablepress' ), array( $this, 'postbox_no_tables' ), 'normal' );
|
44 |
} else {
|
45 |
+
$this->admin_page->enqueue_script( 'export', array( 'jquery' ) );
|
46 |
$this->add_meta_box( 'export-form', __( 'Export Tables', 'tablepress' ), array( $this, 'postbox_export_form' ), 'normal' );
|
47 |
$this->data['submit_button_caption'] = _x( 'Download Export File', 'button', 'tablepress' );
|
48 |
$this->add_text_box( 'submit', array( $this, 'textbox_submit_button' ), 'submit' );
|
views/view-import.php
CHANGED
@@ -31,7 +31,7 @@ class TablePress_Import_View extends TablePress_View {
|
|
31 |
public function setup( $action, array $data ) {
|
32 |
parent::setup( $action, $data );
|
33 |
|
34 |
-
$this->admin_page->enqueue_script( 'import', array( 'jquery
|
35 |
|
36 |
$this->process_action_messages( array(
|
37 |
'error_import' => __( 'Error: The import failed.', 'tablepress' ),
|
31 |
public function setup( $action, array $data ) {
|
32 |
parent::setup( $action, $data );
|
33 |
|
34 |
+
$this->admin_page->enqueue_script( 'import', array( 'jquery' ) );
|
35 |
|
36 |
$this->process_action_messages( array(
|
37 |
'error_import' => __( 'Error: The import failed.', 'tablepress' ),
|
views/view-list.php
CHANGED
@@ -40,7 +40,7 @@ class TablePress_List_View extends TablePress_View {
|
|
40 |
parent::setup( $action, $data );
|
41 |
|
42 |
add_thickbox();
|
43 |
-
$this->admin_page->enqueue_script( 'list', array( 'jquery
|
44 |
'list' => array(
|
45 |
'shortcode_popup' => __( 'To embed this table into a post or page, use this Shortcode:', 'tablepress' ),
|
46 |
'donation-message-already-donated' => __( 'Thank you very much! Your donation is highly appreciated. You just contributed to the further development of TablePress!', 'tablepress' ),
|
@@ -89,8 +89,8 @@ class TablePress_List_View extends TablePress_View {
|
|
89 |
sprintf( __( 'Please read the <a href="%s">release announcement</a> for more information.', 'tablepress' ), 'https://tablepress.org/news/' ) . ' '
|
90 |
. sprintf( __( 'If you like the new features and enhancements, <a href="%s">giving a donation</a> towards the further support and development of TablePress is recommended. Thank you!', 'tablepress' ), 'https://tablepress.org/donate/' )
|
91 |
. '</p>'
|
92 |
-
. '<div style="margin:20px 0;height:45px"><a href="https://
|
93 |
-
. '<div style="font-size:14px;font-weight:bold;max-width:530px;padding:5px 0;line-height:normal">' . sprintf( _x( 'This release of TablePress is supported by %s, the most comprehensive WordPress activity logs plugin.', 'WP
|
94 |
. '<p>'
|
95 |
. $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ),
|
96 |
'notice-info not-dismissible',
|
40 |
parent::setup( $action, $data );
|
41 |
|
42 |
add_thickbox();
|
43 |
+
$this->admin_page->enqueue_script( 'list', array( 'jquery' ), array(
|
44 |
'list' => array(
|
45 |
'shortcode_popup' => __( 'To embed this table into a post or page, use this Shortcode:', 'tablepress' ),
|
46 |
'donation-message-already-donated' => __( 'Thank you very much! Your donation is highly appreciated. You just contributed to the further development of TablePress!', 'tablepress' ),
|
89 |
sprintf( __( 'Please read the <a href="%s">release announcement</a> for more information.', 'tablepress' ), 'https://tablepress.org/news/' ) . ' '
|
90 |
. sprintf( __( 'If you like the new features and enhancements, <a href="%s">giving a donation</a> towards the further support and development of TablePress is recommended. Thank you!', 'tablepress' ), 'https://tablepress.org/donate/' )
|
91 |
. '</p>'
|
92 |
+
. '<div style="margin:20px 0;height:45px"><a href="https://wpactivitylog.com/?utm_source=tablepress&utm_medium=referral&utm_campaign=WSAL" target="_blank" rel="noopener noreferrer"><img src="' . plugins_url( 'admin/img/wsal-mark.png', TABLEPRESS__FILE__ ) . '" alt="' . sprintf( esc_attr_x( 'This release of TablePress is supported by %s, the most comprehensive WordPress activity logs plugin.', 'WP Activity Log', 'tablepress' ), 'WP Activity Log' ) . '" style="width:46px;height:45px;float:left;margin-right:10px" /></a>'
|
93 |
+
. '<div style="font-size:14px;font-weight:bold;max-width:530px;padding:5px 0;line-height:normal">' . sprintf( _x( 'This release of TablePress is supported by %s, the most comprehensive WordPress activity logs plugin.', 'WP Activity Log', 'tablepress' ), '<a href="https://wpactivitylog.com/?utm_source=tablepress&utm_medium=referral&utm_campaign=WSAL" target="_blank" rel="noopener noreferrer">WP Activity Log</a>' ) . '</div></div>'
|
94 |
. '<p>'
|
95 |
. $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ),
|
96 |
'notice-info not-dismissible',
|
views/view-options.php
CHANGED
@@ -36,12 +36,12 @@ class TablePress_Options_View extends TablePress_View {
|
|
36 |
if ( ! empty( $codemirror_settings ) ) {
|
37 |
// Load CSS adjustments for CodeMirror and the added vertical resizing.
|
38 |
$this->admin_page->enqueue_style( 'codemirror', array( 'code-editor' ) );
|
39 |
-
$this->admin_page->enqueue_script( 'codemirror', array( 'jquery
|
40 |
'codemirror_settings' => $codemirror_settings,
|
41 |
) );
|
42 |
}
|
43 |
|
44 |
-
$this->admin_page->enqueue_script( 'options', array( 'jquery
|
45 |
'strings' => array(
|
46 |
'uninstall_warning_1' => __( 'Do you really want to uninstall TablePress and delete ALL data?', 'tablepress' ),
|
47 |
'uninstall_warning_2' => __( 'Are you really sure?', 'tablepress' ),
|
36 |
if ( ! empty( $codemirror_settings ) ) {
|
37 |
// Load CSS adjustments for CodeMirror and the added vertical resizing.
|
38 |
$this->admin_page->enqueue_style( 'codemirror', array( 'code-editor' ) );
|
39 |
+
$this->admin_page->enqueue_script( 'codemirror', array( 'jquery', 'jquery-ui-resizable' ), array(
|
40 |
'codemirror_settings' => $codemirror_settings,
|
41 |
) );
|
42 |
}
|
43 |
|
44 |
+
$this->admin_page->enqueue_script( 'options', array( 'jquery' ), array(
|
45 |
'strings' => array(
|
46 |
'uninstall_warning_1' => __( 'Do you really want to uninstall TablePress and delete ALL data?', 'tablepress' ),
|
47 |
'uninstall_warning_2' => __( 'Are you really sure?', 'tablepress' ),
|