WP-Table Reloaded - Version 1.5

Version Description

Download this release

Release Info

Developer TobiasBg
Plugin Icon wp plugin WP-Table Reloaded
Version 1.5
Comparing to
See all releases

Code changes from version 1.4.2a to 1.5

Files changed (104) hide show
  1. admin/admin-editor-buttons-script.dev.js +5 -0
  2. admin/admin-editor-buttons-script.js +4 -0
  3. admin/admin-script.dev.js +190 -75
  4. admin/admin-script.js +1 -1
  5. admin/admin-style.css +5 -1
  6. admin/admin-style.dev.css +117 -20
  7. css/datatables.css +115 -0
  8. css/index.php +3 -0
  9. css/plugin.css +30 -0
  10. css/tablesorter.css +17 -0
  11. css/warning.txt +10 -0
  12. img/back_disabled.jpg +0 -0
  13. img/back_enabled.jpg +0 -0
  14. img/forward_disabled.jpg +0 -0
  15. img/forward_enabled.jpg +0 -0
  16. js/jquery.datatables.min.js +542 -0
  17. js/jquery.tablesorter.extended.js +1 -1
  18. js/jquery.tablesorter.min.js +0 -1
  19. js/tabletools/images/copy.png +0 -0
  20. js/tabletools/images/copy_hover.png +0 -0
  21. js/tabletools/images/csv.png +0 -0
  22. js/tabletools/images/csv_hover.png +0 -0
  23. js/tabletools/images/index.php +3 -0
  24. js/tabletools/images/print.png +0 -0
  25. js/tabletools/images/print_hover.png +0 -0
  26. js/tabletools/images/xls.png +0 -0
  27. js/tabletools/images/xls_hover.png +0 -0
  28. js/tabletools/index.php +3 -0
  29. js/tabletools/tabletools.css +105 -0
  30. js/tabletools/tabletools.js +588 -0
  31. js/tabletools/zeroclipboard.js +313 -0
  32. js/tabletools/zeroclipboard.swf +0 -0
  33. languages/datatables/index.php +3 -0
  34. languages/datatables/lang-ar.txt +17 -0
  35. languages/datatables/lang-bg_BG.txt +17 -0
  36. languages/datatables/lang-cs_CZ.txt +17 -0
  37. languages/datatables/lang-da_DK.txt +17 -0
  38. languages/datatables/lang-de_DE.txt +17 -0
  39. languages/datatables/lang-default.txt +17 -0
  40. languages/datatables/lang-el.txt +17 -0
  41. languages/datatables/lang-en_US.txt +17 -0
  42. languages/datatables/lang-es_ES.txt +17 -0
  43. languages/datatables/lang-et.txt +16 -0
  44. languages/datatables/lang-fi_FI.txt +17 -0
  45. languages/datatables/lang-fr_FR.txt +17 -0
  46. languages/datatables/lang-hu_HU.txt +17 -0
  47. languages/datatables/lang-it_IT.txt +17 -0
  48. languages/datatables/lang-ja.txt +17 -0
  49. languages/datatables/lang-lt_LT.txt +17 -0
  50. languages/datatables/lang-nb_NO.txt +17 -0
  51. languages/datatables/lang-nl_NL.txt +17 -0
  52. languages/datatables/lang-nn_NO.txt +17 -0
  53. languages/datatables/lang-pl_PL.txt +17 -0
  54. languages/datatables/lang-pt_BR.txt +17 -0
  55. languages/datatables/lang-ru_RU.txt +17 -0
  56. languages/datatables/lang-sk_SK.txt +17 -0
  57. languages/datatables/lang-sr_RS.txt +17 -0
  58. languages/datatables/lang-sv_SE.txt +17 -0
  59. languages/datatables/lang-tr_TR.txt +17 -0
  60. languages/datatables/lang-zh_CN.txt +17 -0
  61. languages/datatables/warning.txt +25 -0
  62. languages/wp-table-reloaded-by_BY.mo +0 -0
  63. languages/wp-table-reloaded-by_BY.po +0 -873
  64. languages/wp-table-reloaded-cs_CZ.mo +0 -0
  65. languages/wp-table-reloaded-cs_CZ.po +1496 -630
  66. languages/wp-table-reloaded-de_DE.mo +0 -0
  67. languages/wp-table-reloaded-de_DE.po +1524 -773
  68. languages/wp-table-reloaded-es_ES.mo +0 -0
  69. languages/wp-table-reloaded-es_ES.po +0 -1600
  70. languages/wp-table-reloaded-fr_FR.mo +0 -0
  71. languages/wp-table-reloaded-fr_FR.po +0 -639
  72. languages/wp-table-reloaded-it_IT.mo +0 -0
  73. languages/wp-table-reloaded-it_IT.po +0 -1306
  74. languages/wp-table-reloaded-ja.mo +0 -0
  75. languages/wp-table-reloaded-ja.po +1272 -639
  76. languages/wp-table-reloaded-pl_PL.mo +0 -0
  77. languages/wp-table-reloaded-pl_PL.po +0 -875
  78. languages/wp-table-reloaded-pt_BR.mo +0 -0
  79. languages/wp-table-reloaded-pt_BR.po +1525 -773
  80. languages/wp-table-reloaded-ru_RU.mo +0 -0
  81. languages/wp-table-reloaded-ru_RU.po +0 -1316
  82. languages/wp-table-reloaded-sk_SK.mo +0 -0
  83. languages/wp-table-reloaded-sk_SK.po +2363 -0
  84. languages/wp-table-reloaded-sq_AL.mo +0 -0
  85. languages/wp-table-reloaded-sq_AL.po +0 -964
  86. languages/wp-table-reloaded-sv_SE.mo +0 -0
  87. languages/wp-table-reloaded-sv_SE.po +1270 -591
  88. languages/wp-table-reloaded-tr_TR.mo +0 -0
  89. languages/wp-table-reloaded-tr_TR.po +0 -628
  90. languages/wp-table-reloaded.pot +1181 -532
  91. php/arraysort.class.php +1 -1
  92. php/wp-table-reloaded-export.class.php +2 -2
  93. php/wp-table-reloaded-helper.class.php +186 -0
  94. php/wp-table-reloaded-import.class.php +2 -2
  95. readme.txt +21 -14
  96. screenshot-1.png +0 -0
  97. screenshot-2.png +0 -0
  98. screenshot-3.png +0 -0
  99. screenshot-4.png +0 -0
  100. screenshot-5.png +0 -0
  101. screenshot-6.png +0 -0
  102. wp-table-reloaded-admin.php +1154 -589
  103. wp-table-reloaded-frontend.php +378 -108
  104. wp-table-reloaded.php +1 -3
admin/admin-editor-buttons-script.dev.js CHANGED
@@ -1,3 +1,8 @@
1
jQuery(document).ready(function($){
2
3
var editor_toolbar = $("#ed_toolbar");
1
+ /***************************************************************
2
+ * This JS file belongs to the Admin part of WP-Table Reloaded! *
3
+ * PLEASE DO NOT make any changes here! Thank you! *
4
+ ***************************************************************/
5
+
6
jQuery(document).ready(function($){
7
8
var editor_toolbar = $("#ed_toolbar");
admin/admin-editor-buttons-script.js CHANGED
@@ -1 +1,5 @@
1
jQuery(document).ready(function(c){var d=c("#ed_toolbar");if(d){var b=document.createElement("input");b.type="button";b.value=WP_Table_Reloaded_Admin.str_EditorButtonCaption;b.className="ed_button";b.title=WP_Table_Reloaded_Admin.str_EditorButtonCaption;b.id="ed_button_wp_table_reloaded";d.append(b);c("#ed_button_wp_table_reloaded").click(a)}function a(){var f="WP-Table Reloaded";var e=WP_Table_Reloaded_Admin.str_EditorButtonAjaxURL;tb_show(f,e,false);c("#TB_ajaxContent").width("auto").height("94.5%").click(function(h){var g=c(h.target);if(g.is("a.send_table_to_editor")){var i=g.attr("title");send_to_editor("[table id="+i+" /]")}return false});return false}});
1
+ /***************************************************************
2
+ * This JS file belongs to the Admin part of WP-Table Reloaded! *
3
+ * PLEASE DO NOT make any changes here! Thank you! *
4
+ ***************************************************************/
5
jQuery(document).ready(function(c){var d=c("#ed_toolbar");if(d){var b=document.createElement("input");b.type="button";b.value=WP_Table_Reloaded_Admin.str_EditorButtonCaption;b.className="ed_button";b.title=WP_Table_Reloaded_Admin.str_EditorButtonCaption;b.id="ed_button_wp_table_reloaded";d.append(b);c("#ed_button_wp_table_reloaded").click(a)}function a(){var f="WP-Table Reloaded";var e=WP_Table_Reloaded_Admin.str_EditorButtonAjaxURL;tb_show(f,e,false);c("#TB_ajaxContent").width("auto").height("94.5%").click(function(h){var g=c(h.target);if(g.is("a.send_table_to_editor")){var i=g.attr("title");send_to_editor("[table id="+i+" /]")}return false});return false}});
admin/admin-script.dev.js CHANGED
@@ -1,63 +1,97 @@
1
- jQuery(document).ready( function( $ ) {
2
3
- // WP_Table_Reloaded_Admin object will contain all localized strings
4
5
- // jQuery's original toggleClass needs jQuery 1.3, which is only available since 1.3
6
- // which is only available since WP 2.8, that's why we copy the function here to maintain
7
- // backward compatibility
8
- jQuery.each({
9
- TBtoggleClass: function( classNames, state ) {
10
- if( typeof state !== "boolean" )
11
- state = !jQuery.className.has( this, classNames );
12
- jQuery.className[ state ? "add" : "remove" ]( this, classNames );
13
- }
14
- }, function(name, fn){
15
- jQuery.fn[ name ] = function() {
16
- return this.each( fn, arguments );
17
- };
18
- });
19
20
// function to toggle textarea background color according to state of checkboxes
21
- // uses TBtoggleClass instead of toggleClass, see above
22
- var cb_id, cb_class;
23
- $( '#table_contents tbody :checkbox' ).change( function() {
24
- $( '#table_contents tbody :checkbox' ).each( function() {
25
- cb_id = $(this).attr('id');
26
- cb_class = ( -1 != cb_id.search(/row/) ) ? 'row-hidden' : 'column-hidden';
27
- $( '#table_contents .' + cb_id ).TBtoggleClass( cb_class, $(this).attr('checked') );
28
- } );
29
});
30
- //.change();
31
-
32
- // functions to make focussed textareas bigger
33
- // commented code is for handling all textareas in same row or same column
34
- // var ta_idx, tas;
35
- $( '#table_contents textarea' ).focus( function() {
36
- $( '#table_contents .focus' ).removeClass('focus');
37
- $(this).parents('tr').find('textarea').addClass('focus');
38
- //tas = $(this).parents('tr').find('textarea');
39
- //ta_idx = $( tas ).index( this ) + 2; // 2 is from: 1: <th> infront, 1: 1-based-index
40
- //$( '#table_contents tr :nth-child(' + ta_idx + ') textarea' ).add( tas ).addClass('focus');
41
- } );
42
- //.blur( function() {
43
- // $(this).parents('tr').find('textarea').removeClass('focus');
44
- //tas = $(this).parents('tr').find('textarea');
45
- //ta_idx = $( tas ).index( this ) + 2; // 2 is from: 1: <th> infront, 1: 1-based-index
46
- //$( '#table_contents tr :nth-child(' + ta_idx + ') textarea' ).add( tas ).removeClass('focus');
47
- //} );
48
-
49
- // old code that makes textareas grow depending on content
50
- /*
51
- $("#table_contents textarea").keypress(function () {
52
- var currentTextsize = $(this).val().split('\n').length;
53
54
- if ( 0 < currentTextsize ) {
55
- $(this).attr('rows', currentTextsize);
56
}
57
- }).keypress();
58
- */
59
60
- // show export delimiter selectbox only if export format is csv
61
$( '#export_format' ).change( function () {
62
if ( 'csv' == $(this).val() )
63
$('.tr-export-delimiter').show();
@@ -70,10 +104,12 @@ jQuery(document).ready( function( $ ) {
70
var table_id = $( '.wp-table-reloaded-table-information #table_id' ).val();
71
$( '.wp-table-reloaded-table-information #table_id' ).change( function () {
72
if ( table_id != $(this).val() ) {
73
- if ( confirm( WP_Table_Reloaded_Admin.str_ChangeTableID ) )
74
table_id = $(this).val();
75
- else
76
$(this).val( table_id );
77
}
78
} );
79
@@ -88,11 +124,7 @@ jQuery(document).ready( function( $ ) {
88
89
// show only checked import fields depending on radio button
90
$( '.tr-import-from input' ).click( function () {
91
- $('.tr-import-file-upload').hide();
92
- $('.tr-import-url').hide();
93
- $('.tr-import-form-field').hide();
94
- $('.tr-import-server').hide();
95
-
96
$( '.tr-import-' + $( '.tr-import-from input:checked' ).val() ).show();
97
} );
98
$('.tr-import-from input:checked').click();
@@ -100,25 +132,47 @@ jQuery(document).ready( function( $ ) {
100
// enable/disable custom css textarea according to state of checkbox
101
$( '#options_use_custom_css' ).change( function () {
102
if( $(this).attr('checked') )
103
- $( '#options_custom_css' ).removeAttr("disabled");
104
else
105
- $( '#options_custom_css' ).attr("disabled", true);
106
} );
107
108
- // enable/disable Extended Tablesorter checkbox according to state of checkbox
109
$( '#options_enable_tablesorter' ).change( function () {
110
if( $(this).attr('checked') )
111
- $( '#options_use_tablesorter_extended' ).removeAttr("disabled");
112
else
113
- $( '#options_use_tablesorter_extended' ).attr("disabled", true);
114
} );
115
116
// enable/disable "use tableheadline" according to state of checkbox
117
$( '#table_options_first_row_th' ).change( function () {
118
- if( $(this).attr('checked') && $( '#tablesorter_enabled' ).val() ) {
119
- $( '#table_options_use_tablesorter' ).removeAttr("disabled");
120
} else {
121
- $( '#table_options_use_tablesorter' ).attr("disabled", true);
122
}
123
} );
124
@@ -135,15 +189,20 @@ jQuery(document).ready( function( $ ) {
135
var current_content = $(this).val();
136
$(this).val( current_content + insert_html );
137
$( '#table_contents textarea' ).unbind( 'click', add_html );
138
}
139
140
$( '#a-insert-link' ).click( function () {
141
var link_url = prompt( WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertURL + ':', 'http://' );
142
if ( link_url ) {
143
var link_text = prompt( WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText + ':', WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText );
144
if ( link_text ) {
145
- insert_html = '<a href="' + link_url + '">' + link_text + '</a>';
146
- if ( confirm( WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertExplain + '\n\n' + insert_html ) ) {
147
$("#table_contents textarea").bind('click', add_html);
148
}
149
}
@@ -158,6 +217,7 @@ jQuery(document).ready( function( $ ) {
158
var link = $( '#a-insert-image' );
159
tb_show( link.attr('title'), link.attr('href'), link.attr('rel') );
160
$(this).blur();
161
}
162
163
function add_image() {
@@ -165,6 +225,7 @@ jQuery(document).ready( function( $ ) {
165
$(this).bind('click', add_image);
166
if ( true == confirm( WP_Table_Reloaded_Admin.str_DataManipulationImageInsertThickbox ) )
167
$("#table_contents textarea").bind( 'click', call_media_library_thickbox );
168
}
169
$( '#a-insert-image' ).unbind( 'click' ).bind('click', add_image); // this unbind is for WP < 2.8, where our script is added after thickbox.js
170
@@ -212,19 +273,49 @@ jQuery(document).ready( function( $ ) {
212
} );
213
*/
214
215
- $(' a.delete_row_link' ).click( function () {
216
- return confirm( WP_Table_Reloaded_Admin.str_DeleteRowLink );
217
- } );
218
219
- $( 'a.delete_column_link' ).click( function () {
220
- return confirm( WP_Table_Reloaded_Admin.str_DeleteColumnLink );
221
} );
222
223
$( 'a.import_wptable_link' ).click( function () {
224
return confirm( WP_Table_Reloaded_Admin.str_ImportwpTableLink );
225
} );
226
227
- $( 'a.uninstall_plugin_link' ).click( function () {
228
if ( confirm( WP_Table_Reloaded_Admin.str_UninstallPluginLink_1 ) )
229
return confirm( WP_Table_Reloaded_Admin.str_UninstallPluginLink_2 );
230
else
@@ -246,4 +337,28 @@ jQuery(document).ready( function( $ ) {
246
$( $(this).parent().get(0) ).toggleClass('closed');
247
} );
248
249
} );
1
+ /***************************************************************
2
+ * This JS file belongs to the Admin part of WP-Table Reloaded! *
3
+ * PLEASE DO NOT make any changes here! Thank you! *
4
+ ***************************************************************/
5
6
+ jQuery(document).ready( function( $ ) {
7
8
+ // WP_Table_Reloaded_Admin object will contain all localized strings and options that influence JavaScript
9
10
// function to toggle textarea background color according to state of checkboxes
11
+ $( '#a-hide-rows' ).click( function() {
12
+ var rows_selected = $( '#table_contents tr:not(".table-foot") :checked' ).length;
13
+ if ( rows_selected == 0 ) {
14
+ alert( WP_Table_Reloaded_Admin.str_UnHideRowsNoSelection );
15
+ } else {
16
+ $( '#table_contents tr:not(".table-foot") :checked' ).removeAttr( 'checked' ).next().val( true ).parents('tr').addClass('row-hidden');
17
+ set_table_data_changed();
18
+ }
19
+ return false;
20
+ });
21
+ $( '#a-unhide-rows' ).click( function() {
22
+ var rows_selected = $( '#table_contents tr:not(".table-foot") :checked' ).length;
23
+ if ( rows_selected == 0 ) {
24
+ alert( WP_Table_Reloaded_Admin.str_UnHideRowsNoSelection );
25
+ } else {
26
+ $( '#table_contents tr:not(".table-foot") :checked' ).removeAttr( 'checked' ).next().val( false ).parents('tr').removeClass('row-hidden');
27
+ set_table_data_changed();
28
+ }
29
+ return false;
30
+ });
31
+
32
+ $( '#a-hide-columns' ).click( function() {
33
+ var cols_selected = $( '#table_contents .table-foot :checked' ).length;
34
+ if ( cols_selected == 0 ) {
35
+ alert( WP_Table_Reloaded_Admin.str_UnHideColsNoSelection );
36
+ } else {
37
+ $( '#table_contents .table-foot :checked' ).removeAttr( 'checked' ).next().val( true ).each( function() {
38
+ $( '#table_contents .' + $(this).attr('id') ).addClass( 'column-hidden' );
39
+ } );
40
+ set_table_data_changed();
41
+ }
42
+ return false;
43
+ });
44
+ $( '#a-unhide-columns' ).click( function() {
45
+ var cols_selected = $( '#table_contents .table-foot :checked' ).length;
46
+ if ( cols_selected == 0 ) {
47
+ alert( WP_Table_Reloaded_Admin.str_UnHideColsNoSelection );
48
+ } else {
49
+ $( '#table_contents .table-foot :checked' ).removeAttr( 'checked' ).next().val( false ).each( function() {
50
+ $( '#table_contents .' + $(this).attr('id') ).removeClass( 'column-hidden' );
51
+ } );
52
+ set_table_data_changed();
53
+ }
54
+ return false;
55
+ });
56
+
57
+ $( '#button-insert-rows' ).click( function() {
58
+ var rows_selected = $( '#table_contents tr:not(".table-foot") :checked' ).length;
59
+ if ( rows_selected == 0 ) {
60
+ alert( WP_Table_Reloaded_Admin.str_InsertRowsNoSelection );
61
+ return false;
62
+ } else {
63
+ return true;
64
+ }
65
});
66
67
+ $( '#button-insert-columns' ).click( function() {
68
+ var cols_selected = $( '#table_contents .table-foot :checked' ).length;
69
+ if ( cols_selected == 0 ) {
70
+ alert( WP_Table_Reloaded_Admin.str_InsertColsNoSelection );
71
+ return false;
72
+ } else {
73
+ return true;
74
}
75
+ });
76
+
77
+ // functions to make focussed textareas bigger (if backend option is enabled)
78
+ var focussed = null;
79
+ if ( WP_Table_Reloaded_Admin.option_growing_textareas ) {
80
+ $( '#table_contents textarea' ).focus( function() {
81
+ $(focussed).removeClass('focus');
82
+ focussed = $(this).parents('tr').find('textarea');
83
+ $(focussed).addClass('focus');
84
+ } );
85
+ }
86
87
+ // custom css textarea grows on focus
88
+ function css_textarea_focus() {
89
+ $( '#options_custom_css' ).addClass('focus')
90
+ .unbind( 'focus', css_textarea_focus );
91
+ }
92
+ $( '#options_custom_css' ).bind( 'focus', css_textarea_focus );
93
+
94
+ // show export delimiter dropdown box only if export format is csv
95
$( '#export_format' ).change( function () {
96
if ( 'csv' == $(this).val() )
97
$('.tr-export-delimiter').show();
104
var table_id = $( '.wp-table-reloaded-table-information #table_id' ).val();
105
$( '.wp-table-reloaded-table-information #table_id' ).change( function () {
106
if ( table_id != $(this).val() ) {
107
+ if ( confirm( WP_Table_Reloaded_Admin.str_ChangeTableID ) ) {
108
table_id = $(this).val();
109
+ set_table_data_changed();
110
+ } else {
111
$(this).val( table_id );
112
+ }
113
}
114
} );
115
124
125
// show only checked import fields depending on radio button
126
$( '.tr-import-from input' ).click( function () {
127
+ $('.tr-import-file-upload, .tr-import-url, .tr-import-form-field, .tr-import-server').hide();
128
$( '.tr-import-' + $( '.tr-import-from input:checked' ).val() ).show();
129
} );
130
$('.tr-import-from input:checked').click();
132
// enable/disable custom css textarea according to state of checkbox
133
$( '#options_use_custom_css' ).change( function () {
134
if( $(this).attr('checked') )
135
+ $( '#options_custom_css' ).removeAttr( 'disabled' );
136
else
137
+ $( '#options_custom_css' ).attr( 'disabled', 'disabled' );
138
} );
139
140
+ // tablesorter selection dropdown according to state of checkbox
141
$( '#options_enable_tablesorter' ).change( function () {
142
if( $(this).attr('checked') )
143
+ $( '#options_tablesorter_script' ).removeAttr( 'disabled' );
144
else
145
+ $( '#options_tablesorter_script' ).attr( 'disabled' , 'disabled' );
146
} );
147
148
// enable/disable "use tableheadline" according to state of checkbox
149
$( '#table_options_first_row_th' ).change( function () {
150
+ if( WP_Table_Reloaded_Admin.option_datatables_active ) {
151
+ if( $(this).attr('checked') && $( '#table_options_use_tablesorter' ).attr('checked') ) {
152
+ $( '#table_options_datatables_sort' ).removeAttr( 'disabled' );
153
+ } else {
154
+ $( '#table_options_datatables_sort' ).attr( 'disabled', 'disabled' );
155
+ }
156
+ } else if( WP_Table_Reloaded_Admin.option_tablesorter_enabled ) {
157
+ if( $(this).attr('checked') ) {
158
+ $( '#table_options_use_tablesorter' ).removeAttr( 'disabled' );
159
+ } else {
160
+ $( '#table_options_use_tablesorter' ).attr( 'disabled', 'disabled' );
161
+ }
162
+ }
163
+ } );
164
+
165
+ // enable/disable DataTables options according to checkbox state
166
+ $( '#table_options_use_tablesorter' ).change( function () {
167
+ if( WP_Table_Reloaded_Admin.option_datatables_active && $(this).attr('checked') ) {
168
+ $( '.wp-table-reloaded-datatables-options input' ).removeAttr( 'disabled' );
169
+ if ( !$( '#table_options_first_row_th' ).attr('checked') )
170
+ $( '#table_options_datatables_sort' ).attr( 'disabled', 'disabled' );
171
+ if ( !WP_Table_Reloaded_Admin.option_tabletools_active )
172
+ $( '#table_options_datatables_tabletools' ).attr( 'disabled', 'disabled' );
173
+
174
} else {
175
+ $( '.wp-table-reloaded-datatables-options input' ).attr( 'disabled', 'disabled' );
176
}
177
} );
178
189
var current_content = $(this).val();
190
$(this).val( current_content + insert_html );
191
$( '#table_contents textarea' ).unbind( 'click', add_html );
192
+ set_table_data_changed();
193
}
194
195
$( '#a-insert-link' ).click( function () {
196
+ var target = '';
197
+ if ( WP_Table_Reloaded_Admin.option_add_target_blank_to_links )
198
+ target = ' target="_blank"';
199
var link_url = prompt( WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertURL + ':', 'http://' );
200
if ( link_url ) {
201
var link_text = prompt( WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText + ':', WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText );
202
if ( link_text ) {
203
+ insert_html = '<a href="' + link_url + '"' + target + '>' + link_text + '</a>';
204
+ insert_html = prompt( WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertExplain, insert_html )
205
+ if ( insert_html ) {
206
$("#table_contents textarea").bind('click', add_html);
207
}
208
}
217
var link = $( '#a-insert-image' );
218
tb_show( link.attr('title'), link.attr('href'), link.attr('rel') );
219
$(this).blur();
220
+ set_table_data_changed();
221
}
222
223
function add_image() {
225
$(this).bind('click', add_image);
226
if ( true == confirm( WP_Table_Reloaded_Admin.str_DataManipulationImageInsertThickbox ) )
227
$("#table_contents textarea").bind( 'click', call_media_library_thickbox );
228
+ return false;
229
}
230
$( '#a-insert-image' ).unbind( 'click' ).bind('click', add_image); // this unbind is for WP < 2.8, where our script is added after thickbox.js
231
273
} );
274
*/
275
276
+ $( '#button-delete-rows' ).click( function () {
277
+ var rows_cb = $( '#table_contents tr:not(".table-foot") :checkbox' ).length - 1; // -1 because of invisible checkbox in .table-head
278
+ var rows_selected = $( '#table_contents tr:not(".table-foot") :checked' ).length;
279
280
+ if ( rows_selected == 0 ) {
281
+ alert( WP_Table_Reloaded_Admin.str_DeleteRowsFailedNoSelection );
282
+ return false;
283
+ } else {
284
+ if ( rows_cb == rows_selected ) {
285
+ alert( WP_Table_Reloaded_Admin.str_DeleteRowsFailedNotAll );
286
+ return false;
287
+ } else {
288
+ return confirm( WP_Table_Reloaded_Admin.str_DeleteRowsConfirm );
289
+ }
290
+ }
291
} );
292
+
293
+ $( '#button-delete-columns' ).click( function () {
294
+ var cols_cb = $( '#table_contents .table-foot :checkbox' ).length;
295
+ var cols_selected = $( '#table_contents .table-foot :checked' ).length;
296
297
+ if ( cols_selected == 0 ) {
298
+ alert( WP_Table_Reloaded_Admin.str_DeleteColsFailedNoSelection );
299
+ return false;
300
+ } else {
301
+ if ( cols_cb == cols_selected ) {
302
+ alert( WP_Table_Reloaded_Admin.str_DeleteColsFailedNotAll );
303
+ return false;
304
+ } else {
305
+ return confirm( WP_Table_Reloaded_Admin.str_DeleteColsConfirm );
306
+ }
307
+ }
308
+ } );
309
+
310
$( 'a.import_wptable_link' ).click( function () {
311
return confirm( WP_Table_Reloaded_Admin.str_ImportwpTableLink );
312
} );
313
314
+ $( '#import_wp_table_reloaded_dump_file' ).click( function () {
315
+ return confirm( WP_Table_Reloaded_Admin.str_ImportDumpFile );
316
+ } );
317
+
318
+ $( '#uninstall_plugin_link' ).click( function () {
319
if ( confirm( WP_Table_Reloaded_Admin.str_UninstallPluginLink_1 ) )
320
return confirm( WP_Table_Reloaded_Admin.str_UninstallPluginLink_2 );
321
else
337
$( $(this).parent().get(0) ).toggleClass('closed');
338
} );
339
340
+ // exit message, if table content was changed but not yet saved
341
+ var table_data_changed = false;
342
+
343
+ function set_table_data_changed() {
344
+ table_data_changed = true;
345
+ $( '#wp_table_reloaded_edit_table' ).find( '#table_id, #table_name, textarea' ).unbind( 'click', set_table_data_changed );
346
+ }
347
+
348
+ if ( WP_Table_Reloaded_Admin.option_show_exit_warning ) {
349
+ window.onbeforeunload = function(){
350
+ if ( table_data_changed )
351
+ return WP_Table_Reloaded_Admin.str_saveAlert;
352
+ };
353
+
354
+ $("#wp_table_reloaded_edit_table input[name='submit[update]'], #wp_table_reloaded_edit_table input[name='submit[save_back]']").click(function(){
355
+ $( '#wp_table_reloaded_edit_table .wp-table-reloaded-options input' ).removeAttr( 'disabled' );
356
+ window.onbeforeunload = null;
357
+ } );
358
+
359
+ $( '#wp_table_reloaded_edit_table' ).find( '#table_name, textarea' ).bind( 'change', set_table_data_changed ); // see also ID change function above
360
+
361
+ $( '#wp_table_reloaded_edit_table .wp-table-reloaded-options :checkbox' ).bind( 'change', set_table_data_changed );
362
+ }
363
+
364
} );
admin/admin-script.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(f){jQuery.each({TBtoggleClass:function(j,i){if(typeof i!=="boolean"){i=!jQuery.className.has(this,j)}jQuery.className[i?"add":"remove"](this,j)}},function(i,j){jQuery.fn[i]=function(){return this.each(j,arguments)}});var e,a;f("#table_contents tbody :checkbox").change(function(){f("#table_contents tbody :checkbox").each(function(){e=f(this).attr("id");a=(-1!=e.search(/row/))?"row-hidden":"column-hidden";f("#table_contents ."+e).TBtoggleClass(a,f(this).attr("checked"))})});f("#table_contents textarea").focus(function(){f("#table_contents .focus").removeClass("focus");f(this).parents("tr").find("textarea").addClass("focus")});f("#export_format").change(function(){if("csv"==f(this).val()){f(".tr-export-delimiter").show()}else{f(".tr-export-delimiter").hide()}}).change();var h=f(".wp-table-reloaded-table-information #table_id").val();f(".wp-table-reloaded-table-information #table_id").change(function(){if(h!=f(this).val()){if(confirm(WP_Table_Reloaded_Admin.str_ChangeTableID)){h=f(this).val()}else{f(this).val(h)}}});f(".tr-import-addreplace input").click(function(){if("replace"==f(".tr-import-addreplace input:checked").val()){f(".tr-import-addreplace-table").show()}else{f(".tr-import-addreplace-table").hide()}});f(".tr-import-addreplace input:checked").click();f(".tr-import-from input").click(function(){f(".tr-import-file-upload").hide();f(".tr-import-url").hide();f(".tr-import-form-field").hide();f(".tr-import-server").hide();f(".tr-import-"+f(".tr-import-from input:checked").val()).show()});f(".tr-import-from input:checked").click();f("#options_use_custom_css").change(function(){if(f(this).attr("checked")){f("#options_custom_css").removeAttr("disabled")}else{f("#options_custom_css").attr("disabled",true)}});f("#options_enable_tablesorter").change(function(){if(f(this).attr("checked")){f("#options_use_tablesorter_extended").removeAttr("disabled")}else{f("#options_use_tablesorter_extended").attr("disabled",true)}});f("#table_options_first_row_th").change(function(){if(f(this).attr("checked")&&f("#tablesorter_enabled").val()){f("#table_options_use_tablesorter").removeAttr("disabled")}else{f("#table_options_use_tablesorter").attr("disabled",true)}});f("#options_uninstall_upon_deactivation").click(function(){if(f(this).attr("checked")){return confirm(WP_Table_Reloaded_Admin.str_UninstallCheckboxActivation)}});var b="";function d(){var i=f(this).val();f(this).val(i+b);f("#table_contents textarea").unbind("click",d)}f("#a-insert-link").click(function(){var j=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertURL+":","http://");if(j){var i=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText+":",WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText);if(i){b='<a href="'+j+'">'+i+"</a>";if(confirm(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertExplain+"\n\n"+b)){f("#table_contents textarea").bind("click",d)}}}return false});function g(){edCanvas=this;f("#table_contents textarea").unbind("click",g);var i=f("#a-insert-image");tb_show(i.attr("title"),i.attr("href"),i.attr("rel"));f(this).blur()}function c(){f(this).unbind("click");f(this).bind("click",c);if(true==confirm(WP_Table_Reloaded_Admin.str_DataManipulationImageInsertThickbox)){f("#table_contents textarea").bind("click",g)}}f("#a-insert-image").unbind("click").bind("click",c);f("#insert_custom_field_name").keyup(function(){f(this).val(f(this).val().toLowerCase().replace(/[^a-z0-9_-]/g,""))});f(".focus-blur-change").focus(function(){if(f(this).attr("title")==f(this).val()){f(this).val("")}}).blur(function(){if(""==f(this).val()){f(this).val(f(this).attr("title"))}});f("#table_custom_fields textarea").focus(function(){f("#table_custom_fields .focus").removeClass("focus");f(this).addClass("focus")});f("input.bulk_copy_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkCopyTablesLink)});f("input.bulk_delete_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkDeleteTablesLink)});f("input.bulk_wp_table_import_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkImportwpTableTablesLink)});f("a.copy_table_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_CopyTableLink)});f(" a.delete_row_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_DeleteRowLink)});f("a.delete_column_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_DeleteColumnLink)});f("a.import_wptable_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_ImportwpTableLink)});f("a.uninstall_plugin_link").click(function(){if(confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_1)){return confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_2)}else{return false}});f("a.cf_shortcode_link").click(function(){var i=prompt(WP_Table_Reloaded_Admin.str_CFShortcodeMessage,f(this).attr("title"));return false});f("a.table_shortcode_link").click(function(){var i=prompt(WP_Table_Reloaded_Admin.str_TableShortcodeMessage,f(this).attr("title"));return false});f(".postbox h3, .postbox .handlediv").click(function(){f(f(this).parent().get(0)).toggleClass("closed")})});
1
+ jQuery(document).ready(function(b){b("#a-hide-rows").click(function(){var k=b('#table_contents tr:not(".table-foot") :checked').length;if(k==0){alert(WP_Table_Reloaded_Admin.str_UnHideRowsNoSelection)}else{b('#table_contents tr:not(".table-foot") :checked').removeAttr("checked").next().val(true).parents("tr").addClass("row-hidden");c()}return false});b("#a-unhide-rows").click(function(){var k=b('#table_contents tr:not(".table-foot") :checked').length;if(k==0){alert(WP_Table_Reloaded_Admin.str_UnHideRowsNoSelection)}else{b('#table_contents tr:not(".table-foot") :checked').removeAttr("checked").next().val(false).parents("tr").removeClass("row-hidden");c()}return false});b("#a-hide-columns").click(function(){var k=b("#table_contents .table-foot :checked").length;if(k==0){alert(WP_Table_Reloaded_Admin.str_UnHideColsNoSelection)}else{b("#table_contents .table-foot :checked").removeAttr("checked").next().val(true).each(function(){b("#table_contents ."+b(this).attr("id")).addClass("column-hidden")});c()}return false});b("#a-unhide-columns").click(function(){var k=b("#table_contents .table-foot :checked").length;if(k==0){alert(WP_Table_Reloaded_Admin.str_UnHideColsNoSelection)}else{b("#table_contents .table-foot :checked").removeAttr("checked").next().val(false).each(function(){b("#table_contents ."+b(this).attr("id")).removeClass("column-hidden")});c()}return false});b("#button-insert-rows").click(function(){var k=b('#table_contents tr:not(".table-foot") :checked').length;if(k==0){alert(WP_Table_Reloaded_Admin.str_InsertRowsNoSelection);return false}else{return true}});b("#button-insert-columns").click(function(){var k=b("#table_contents .table-foot :checked").length;if(k==0){alert(WP_Table_Reloaded_Admin.str_InsertColsNoSelection);return false}else{return true}});var e=null;if(WP_Table_Reloaded_Admin.option_growing_textareas){b("#table_contents textarea").focus(function(){b(e).removeClass("focus");e=b(this).parents("tr").find("textarea");b(e).addClass("focus")})}function g(){b("#options_custom_css").addClass("focus").unbind("focus",g)}b("#options_custom_css").bind("focus",g);b("#export_format").change(function(){if("csv"==b(this).val()){b(".tr-export-delimiter").show()}else{b(".tr-export-delimiter").hide()}}).change();var h=b(".wp-table-reloaded-table-information #table_id").val();b(".wp-table-reloaded-table-information #table_id").change(function(){if(h!=b(this).val()){if(confirm(WP_Table_Reloaded_Admin.str_ChangeTableID)){h=b(this).val();c()}else{b(this).val(h)}}});b(".tr-import-addreplace input").click(function(){if("replace"==b(".tr-import-addreplace input:checked").val()){b(".tr-import-addreplace-table").show()}else{b(".tr-import-addreplace-table").hide()}});b(".tr-import-addreplace input:checked").click();b(".tr-import-from input").click(function(){b(".tr-import-file-upload, .tr-import-url, .tr-import-form-field, .tr-import-server").hide();b(".tr-import-"+b(".tr-import-from input:checked").val()).show()});b(".tr-import-from input:checked").click();b("#options_use_custom_css").change(function(){if(b(this).attr("checked")){b("#options_custom_css").removeAttr("disabled")}else{b("#options_custom_css").attr("disabled","disabled")}});b("#options_enable_tablesorter").change(function(){if(b(this).attr("checked")){b("#options_tablesorter_script").removeAttr("disabled")}else{b("#options_tablesorter_script").attr("disabled","disabled")}});b("#table_options_first_row_th").change(function(){if(WP_Table_Reloaded_Admin.option_datatables_active){if(b(this).attr("checked")&&b("#table_options_use_tablesorter").attr("checked")){b("#table_options_datatables_sort").removeAttr("disabled")}else{b("#table_options_datatables_sort").attr("disabled","disabled")}}else{if(WP_Table_Reloaded_Admin.option_tablesorter_enabled){if(b(this).attr("checked")){b("#table_options_use_tablesorter").removeAttr("disabled")}else{b("#table_options_use_tablesorter").attr("disabled","disabled")}}}});b("#table_options_use_tablesorter").change(function(){if(WP_Table_Reloaded_Admin.option_datatables_active&&b(this).attr("checked")){b(".wp-table-reloaded-datatables-options input").removeAttr("disabled");if(!b("#table_options_first_row_th").attr("checked")){b("#table_options_datatables_sort").attr("disabled","disabled")}if(!WP_Table_Reloaded_Admin.option_tabletools_active){b("#table_options_datatables_tabletools").attr("disabled","disabled")}}else{b(".wp-table-reloaded-datatables-options input").attr("disabled","disabled")}});b("#options_uninstall_upon_deactivation").click(function(){if(b(this).attr("checked")){return confirm(WP_Table_Reloaded_Admin.str_UninstallCheckboxActivation)}});var i="";function d(){var k=b(this).val();b(this).val(k+i);b("#table_contents textarea").unbind("click",d);c()}b("#a-insert-link").click(function(){var m="";if(WP_Table_Reloaded_Admin.option_add_target_blank_to_links){m=' target="_blank"'}var l=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertURL+":","http://");if(l){var k=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText+":",WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText);if(k){i='<a href="'+l+'"'+m+">"+k+"</a>";i=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertExplain,i);if(i){b("#table_contents textarea").bind("click",d)}}}return false});function a(){edCanvas=this;b("#table_contents textarea").unbind("click",a);var k=b("#a-insert-image");tb_show(k.attr("title"),k.attr("href"),k.attr("rel"));b(this).blur();c()}function f(){b(this).unbind("click");b(this).bind("click",f);if(true==confirm(WP_Table_Reloaded_Admin.str_DataManipulationImageInsertThickbox)){b("#table_contents textarea").bind("click",a)}return false}b("#a-insert-image").unbind("click").bind("click",f);b("#insert_custom_field_name").keyup(function(){b(this).val(b(this).val().toLowerCase().replace(/[^a-z0-9_-]/g,""))});b(".focus-blur-change").focus(function(){if(b(this).attr("title")==b(this).val()){b(this).val("")}}).blur(function(){if(""==b(this).val()){b(this).val(b(this).attr("title"))}});b("#table_custom_fields textarea").focus(function(){b("#table_custom_fields .focus").removeClass("focus");b(this).addClass("focus")});b("input.bulk_copy_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkCopyTablesLink)});b("input.bulk_delete_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkDeleteTablesLink)});b("input.bulk_wp_table_import_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkImportwpTableTablesLink)});b("a.copy_table_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_CopyTableLink)});b("#button-delete-rows").click(function(){var l=b('#table_contents tr:not(".table-foot") :checkbox').length-1;var k=b('#table_contents tr:not(".table-foot") :checked').length;if(k==0){alert(WP_Table_Reloaded_Admin.str_DeleteRowsFailedNoSelection);return false}else{if(l==k){alert(WP_Table_Reloaded_Admin.str_DeleteRowsFailedNotAll);return false}else{return confirm(WP_Table_Reloaded_Admin.str_DeleteRowsConfirm)}}});b("#button-delete-columns").click(function(){var k=b("#table_contents .table-foot :checkbox").length;var l=b("#table_contents .table-foot :checked").length;if(l==0){alert(WP_Table_Reloaded_Admin.str_DeleteColsFailedNoSelection);return false}else{if(k==l){alert(WP_Table_Reloaded_Admin.str_DeleteColsFailedNotAll);return false}else{return confirm(WP_Table_Reloaded_Admin.str_DeleteColsConfirm)}}});b("a.import_wptable_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_ImportwpTableLink)});b("#import_wp_table_reloaded_dump_file").click(function(){return confirm(WP_Table_Reloaded_Admin.str_ImportDumpFile)});b("#uninstall_plugin_link").click(function(){if(confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_1)){return confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_2)}else{return false}});b("a.cf_shortcode_link").click(function(){var k=prompt(WP_Table_Reloaded_Admin.str_CFShortcodeMessage,b(this).attr("title"));return false});b("a.table_shortcode_link").click(function(){var k=prompt(WP_Table_Reloaded_Admin.str_TableShortcodeMessage,b(this).attr("title"));return false});b(".postbox h3, .postbox .handlediv").click(function(){b(b(this).parent().get(0)).toggleClass("closed")});var j=false;function c(){j=true;b("#wp_table_reloaded_edit_table").find("#table_id, #table_name, textarea").unbind("click",c)}if(WP_Table_Reloaded_Admin.option_show_exit_warning){window.onbeforeunload=function(){if(j){return WP_Table_Reloaded_Admin.str_saveAlert}};b("#wp_table_reloaded_edit_table input[name='submit[update]'], #wp_table_reloaded_edit_table input[name='submit[save_back]']").click(function(){b("#wp_table_reloaded_edit_table .wp-table-reloaded-options input").removeAttr("disabled");window.onbeforeunload=null});b("#wp_table_reloaded_edit_table").find("#table_name, textarea").bind("change",c);b("#wp_table_reloaded_edit_table .wp-table-reloaded-options :checkbox").bind("change",c)}});
admin/admin-style.css CHANGED
@@ -1 +1,5 @@
1
- #wp-table-reloaded-list .table-id{font-size:12px;}#wp-table-reloaded-list .header{cursor:pointer;white-space:nowrap;}#wp-table-reloaded-list .header span{background-repeat:no-repeat;background-position:center;background-image:url('../img/bg.gif');margin-right:-5px;}#wp-table-reloaded-list .headerSortUp span{background-image:url('../img/asc.gif');}#wp-table-reloaded-list .headerSortDown span{background-image:url('../img/desc.gif');}#wp-table-reloaded-list .check-column{padding-right:7px!important;}#wp-table-reloaded-list .even{background-color:#F9F9F9;}textarea.row-hidden,textarea.column-hidden{background-color:#FFE0E0;}textarea.focus{height:84px;}.wp-table-reloaded-table-information td{padding:5px 0 5px 0;width:90%;}.wp-table-reloaded-newtable td{padding:5px 0 5px 0;width:85%;}.wp-table-reloaded-table-information th{font-weight:normal;text-align:left;padding:5px 10px 5px 0;vertical-align:middle;width:10%;min-width:130px;}.wp-table-reloaded-newtable,.wp-table-reloaded-table-information,.wp-table-reloaded-table-information input,.wp-table-reloaded-table-information textarea{width:100%;}.wp-table-reloaded-options td{padding:5px 0 5px 0;}.wp-table-reloaded-options th{font-weight:normal;text-align:left;padding:5px 10px 5px 0;vertical-align:middle;}.wp-table-reloaded-data-manipulation{width:100%;}.wp-table-reloaded-data-manipulation td{padding-top:7px!important;padding-bottom:7px!important;}.widefat td{vertical-align:baseline!important;}#table_custom_fields td{vertical-align:middle!important;}#table_contents td{white-space:nowrap;vertical-align:middle!important;}#table_contents th{white-space:nowrap;vertical-align:middle!important;text-align:center;}#table_contents textarea{min-width:180px;width:100%;}#table_contents .hide-columns .check-column{padding-left:7px;width:auto;}.no-wrap{white-space:nowrap;}.hide_link,.expand_link{position:absolute;right:10px;font-weight:normal;cursor:pointer;padding:0!important;}.postbox h3.hndle{cursor:pointer!important;}div.postbox .expand_link{display:none;}div.closed .expand_link{display:inline!important;}div.closed .hide_link{display:none;}div.wrap{max-width:100%!important;}#TB_ajaxContent{width:auto!important;height:94.5%!important;}#TB_ajaxContent .wrap{margin:0 7px 0 5px;}#TB_ajaxContent .wp-table-reloaded{background-color:#CDCDCD;width:100%;}#TB_ajaxContent .wp-table-reloaded th{border:1px solid #FFF;padding:4px;}#TB_ajaxContent .wp-table-reloaded td{padding:4px;background-color:#FFF;vertical-align:top;}#TB_ajaxContent .wp-table-reloaded .even td{background-color:#FFF;}#TB_ajaxContent .wp-table-reloaded .odd td{background-color:#F0F0F6;}
1
+ /****************************************************************
2
+ * This CSS file belongs to the Admin part of WP-Table Reloaded! *
3
+ * PLEASE DO NOT make any changes here! Thank you! *
4
+ ****************************************************************/
5
+ #wp-table-reloaded-list .table-id{font-size:12px;font-weight:bold;text-shadow:rgba(255,255,255,0.8) 0 1px 0;}#wp-table-reloaded-list .sorting,#wp-table-reloaded-list .sorting_asc,#wp-table-reloaded-list .sorting_desc{cursor:pointer;white-space:nowrap;}#wp-table-reloaded-list .sorting span{background-repeat:no-repeat;background-position:center;background-image:url('../img/bg.gif');margin-right:-5px;}#wp-table-reloaded-list .sorting_asc span{background-repeat:no-repeat;background-position:center;background-image:url('../img/asc.gif');}#wp-table-reloaded-list .sorting_desc span{background-repeat:no-repeat;background-position:center;background-image:url('../img/desc.gif');}#wp-table-reloaded-list .check-column{width:24px!important;padding:7px 7px 8px 0!important;text-align:right;}#wp-table-reloaded-list .even{background-color:#F9F9F9;}#wp-table-reloaded-list{margin-top:10px;margin-bottom:10px;}#table_contents .row-hidden td,#table_contents .row-hidden th,#table_contents .row-hidden textarea,#table_contents .column-hidden,#table_contents .column-hidden textarea{background-color:#FFE0E0;}#table_contents .focus{height:84px;}#options_custom_css{width:600px;height:100px;}#options_custom_css.focus{height:300px;}.wp-table-reloaded-table-information td{padding:5px 0 5px 0;width:90%;}.wp-table-reloaded-newtable td{padding:5px 0 5px 0;width:85%;}.wp-table-reloaded-table-information th{font-weight:normal;text-align:left;padding:5px 10px 5px 0;vertical-align:middle;width:10%;min-width:130px;}.wp-table-reloaded-newtable,.wp-table-reloaded-table-information,.wp-table-reloaded-table-information input,.wp-table-reloaded-table-information textarea{width:100%;}.wp-table-reloaded-options td{padding:5px 0 5px 0;}.wp-table-reloaded-options th{font-weight:normal;text-align:left;padding:5px 10px 5px 0;vertical-align:middle;}.wp-table-reloaded-data-manipulation{width:100%;}.wp-table-reloaded-data-manipulation td{padding-top:7px!important;padding-bottom:7px!important;}.widefat td{vertical-align:baseline!important;}#table_custom_fields td{vertical-align:middle!important;}#table_contents td{white-space:nowrap;vertical-align:middle!important;}#table_contents th{white-space:nowrap;vertical-align:middle!important;text-align:center;}#table_contents textarea{min-width:180px;width:100%;}#table_contents .table-head td,#table_contents .table-foot td{padding:7px 7px 8px;line-height:1.3em;text-align:center;text-shadow:rgba(255,255,255,0.8) 0 1px 0;font-weight:bold;}#table_contents .check-column{font-weight:bold;padding-left:5px;padding-right:5px;}.no-wrap{white-space:nowrap;}.hide_link,.expand_link{position:absolute;right:10px;font-weight:normal;cursor:pointer;padding:0!important;}#uninstall_plugin_link{color:#BC0B0B;}.postbox h3.hndle{cursor:pointer!important;}div.postbox .expand_link{display:none;}div.closed .expand_link{display:inline!important;}div.closed .hide_link{display:none;}#TB_ajaxContent{width:auto!important;height:94.5%!important;}#TB_ajaxContent .wrap{margin:0 7px 0 5px;}#TB_ajaxContent .wp-table-reloaded{background-color:#CDCDCD;width:100%;}#TB_ajaxContent .wp-table-reloaded th{border:1px solid #FFF;padding:4px;}#TB_ajaxContent .wp-table-reloaded td{padding:4px;background-color:#FFF;vertical-align:top;}#TB_ajaxContent .wp-table-reloaded .even td{background-color:#FFF;}#TB_ajaxContent .wp-table-reloaded .odd td{background-color:#F0F0F6;}.dataTables_wrapper{clear:both;}.dataTables_processing{position:absolute;top:0;left:50%;width:250px;margin-left:-125px;border:1px solid #ddd;text-align:center;color:#999;font-size:11px;padding:2px 0;}.dataTables_length{width:50%;float:left;}.dataTables_filter{width:45%;float:right;text-align:right;}.dataTables_info{width:60%;float:left;}.dataTables_paginate{width:44px;* width:50px;float:right;text-align:right;}.paging_full_numbers{width:400px;height:22px;line-height:22px;}.paging_full_numbers span.paginate_button,.paging_full_numbers span.paginate_active{border:1px solid #aaa;-webkit-border-radius:5px;-moz-border-radius:5px;padding:2px 5px;margin:0 3px;cursor:pointer;*cursor:hand;}.paging_full_numbers span.paginate_button{background-color:#ddd;}.paging_full_numbers span.paginate_button:hover{background-color:#ccc;}.paging_full_numbers span.paginate_active{background-color:#99B3FF;}
admin/admin-style.dev.css CHANGED
@@ -1,48 +1,69 @@
1
- /******************************************
2
- * This CSS file belongs to the Admin part *
3
- * of WP-Table Reloaded 1.4! PLEASE DO NOT *
4
- * make any changes here! Thank you! *
5
- ******************************************/
6
7
#wp-table-reloaded-list .table-id {
8
font-size:12px;
9
}
10
11
- #wp-table-reloaded-list .header {
12
cursor:pointer;
13
white-space:nowrap;
14
}
15
16
- #wp-table-reloaded-list .header span {
17
background-repeat:no-repeat;
18
background-position:center;
19
background-image:url( '../img/bg.gif' );
20
margin-right:-5px;
21
}
22
23
- #wp-table-reloaded-list .headerSortUp span {
24
background-image:url( '../img/asc.gif' );
25
}
26
- #wp-table-reloaded-list .headerSortDown span {
27
background-image:url( '../img/desc.gif' );
28
}
29
30
#wp-table-reloaded-list .check-column {
31
- padding-right:7px!important;
32
}
33
34
#wp-table-reloaded-list .even { /* = alternate*/
35
background-color:#F9F9F9;
36
}
37
38
- textarea.row-hidden, textarea.column-hidden {
39
background-color:#FFE0E0;
40
}
41
42
- textarea.focus {
43
height:84px;
44
}
45
46
.wp-table-reloaded-table-information td {
47
padding:5px 0px 5px 0px;
48
width:90%;
@@ -109,9 +130,18 @@ textarea.focus {
109
width:100%;
110
}
111
112
- #table_contents .hide-columns .check-column {
113
- padding-left:7px;
114
- width:auto;
115
}
116
117
.no-wrap {
@@ -126,6 +156,10 @@ textarea.focus {
126
padding:0px!important;
127
}
128
129
.postbox h3.hndle {
130
cursor:pointer!important;
131
}
@@ -134,11 +168,6 @@ div.postbox .expand_link { display: none; }
134
div.closed .expand_link { display: inline!important; }
135
div.closed .hide_link { display: none; }
136
137
- /* OVERRIDE EXISTING WordPress STYLES */
138
-
139
- /* overwrite 980px max-width in WP < 2.7 */
140
- div.wrap { max-width:100%!important; }
141
-
142
/* table styles for the table preview */
143
144
/* Inner content div of thickbox needs to grow with outer div */
@@ -174,4 +203,72 @@ div.wrap { max-width:100%!important; }
174
}
175
#TB_ajaxContent .wp-table-reloaded .odd td {
176
background-color:#F0F0F6;
177
}
1
+ /****************************************************************
2
+ * This CSS file belongs to the Admin part of WP-Table Reloaded! *
3
+ * PLEASE DO NOT make any changes here! Thank you! *
4
+ ****************************************************************/
5
6
#wp-table-reloaded-list .table-id {
7
font-size:12px;
8
+ font-weight: bold;
9
+ text-shadow: rgba(255,255,255,0.8) 0 1px 0;
10
}
11
12
+ #wp-table-reloaded-list .sorting, #wp-table-reloaded-list .sorting_asc, #wp-table-reloaded-list .sorting_desc {
13
cursor:pointer;
14
white-space:nowrap;
15
}
16
17
+ #wp-table-reloaded-list .sorting span {
18
background-repeat:no-repeat;
19
background-position:center;
20
background-image:url( '../img/bg.gif' );
21
margin-right:-5px;
22
}
23
24
+ #wp-table-reloaded-list .sorting_asc span {
25
+ background-repeat:no-repeat;
26
+ background-position:center;
27
background-image:url( '../img/asc.gif' );
28
}
29
+ #wp-table-reloaded-list .sorting_desc span {
30
+ background-repeat:no-repeat;
31
+ background-position:center;
32
background-image:url( '../img/desc.gif' );
33
}
34
35
#wp-table-reloaded-list .check-column {
36
+ width: 24px!important;
37
+ padding: 7px 7px 8px 0px!important;
38
+ text-align: right;
39
}
40
41
#wp-table-reloaded-list .even { /* = alternate*/
42
background-color:#F9F9F9;
43
}
44
45
+ #wp-table-reloaded-list {
46
+ margin-top: 10px;
47
+ margin-bottom: 10px;
48
+ }
49
+
50
+ #table_contents .row-hidden td, #table_contents .row-hidden th, #table_contents .row-hidden textarea, #table_contents .column-hidden, #table_contents .column-hidden textarea {
51
background-color:#FFE0E0;
52
}
53
54
+ #table_contents .focus {
55
height:84px;
56
}
57
58
+ #options_custom_css {
59
+ width:600px;
60
+ height:100px;
61
+ }
62
+
63
+ #options_custom_css.focus {
64
+ height:300px;
65
+ }
66
+
67
.wp-table-reloaded-table-information td {
68
padding:5px 0px 5px 0px;
69
width:90%;
130
width:100%;
131
}
132
133
+ #table_contents .table-head td, #table_contents .table-foot td {
134
+ padding: 7px 7px 8px;
135
+ line-height: 1.3em;
136
+ text-align:center;
137
+ text-shadow: rgba(255,255,255,0.8) 0 1px 0;
138
+ font-weight: bold;
139
+ }
140
+
141
+ #table_contents .check-column {
142
+ font-weight: bold;
143
+ padding-left:5px;
144
+ padding-right:5px;
145
}
146
147
.no-wrap {
156
padding:0px!important;
157
}
158
159
+ #uninstall_plugin_link {
160
+ color: #BC0B0B;
161
+ }
162
+
163
.postbox h3.hndle {
164
cursor:pointer!important;
165
}
168
div.closed .expand_link { display: inline!important; }
169
div.closed .hide_link { display: none; }
170
171
/* table styles for the table preview */
172
173
/* Inner content div of thickbox needs to grow with outer div */
203
}
204
#TB_ajaxContent .wp-table-reloaded .odd td {
205
background-color:#F0F0F6;
206
+ }
207
+
208
+ .dataTables_wrapper {
209
+ clear: both;
210
+ }
211
+
212
+ .dataTables_processing {
213
+ position: absolute;
214
+ top: 0px;
215
+ left: 50%;
216
+ width: 250px;
217
+ margin-left: -125px;
218
+ border: 1px solid #ddd;
219
+ text-align: center;
220
+ color: #999;
221
+ font-size: 11px;
222
+ padding: 2px 0;
223
+ }
224
+
225
+ .dataTables_length {
226
+ width: 50%;
227
+ float: left;
228
+ }
229
+
230
+ .dataTables_filter {
231
+ width: 45%;
232
+ float: right;
233
+ text-align: right;
234
+ }
235
+
236
+ .dataTables_info {
237
+ width: 60%;
238
+ float: left;
239
+ }
240
+
241
+ .dataTables_paginate {
242
+ width: 44px;
243
+ * width: 50px;
244
+ float: right;
245
+ text-align: right;
246
+ }
247
+
248
+ .paging_full_numbers {
249
+ width: 400px;
250
+ height: 22px;
251
+ line-height: 22px;
252
+ }
253
+
254
+ .paging_full_numbers span.paginate_button, .paging_full_numbers span.paginate_active {
255
+ border: 1px solid #aaa;
256
+ -webkit-border-radius: 5px;
257
+ -moz-border-radius: 5px;
258
+ padding: 2px 5px;
259
+ margin: 0 3px;
260
+ cursor: pointer;
261
+ *cursor: hand;
262
+ }
263
+
264
+ .paging_full_numbers span.paginate_button {
265
+ background-color: #ddd;
266
+ }
267
+
268
+ .paging_full_numbers span.paginate_button:hover {
269
+ background-color: #ccc;
270
+ }
271
+
272
+ .paging_full_numbers span.paginate_active {
273
+ background-color: #99B3FF;
274
}
css/datatables.css ADDED
@@ -0,0 +1,115 @@
1
+ /*************************************************
2
+ * This CSS file belongs to WP-Table Reloaded! *
3
+ * DO NOT make any changes here, but in the *
4
+ * "Custom CSS" textarea in the "Plugin Options"! *
5
+ *************************************************/
6
+
7
+ .wp-table-reloaded .sorting {
8
+ background: #E6EEEE url(../img/bg.gif) no-repeat center right;
9
+ cursor: pointer;
10
+ }
11
+ .wp-table-reloaded .sorting_asc {
12
+ background: #8DBDD8 url(../img/asc.gif) no-repeat center right;
13
+ }
14
+
15
+ .wp-table-reloaded .sorting_desc {
16
+ background: #8DBDD8 url(../img/desc.gif) no-repeat center right;
17
+ }
18
+
19
+ .dataTables_wrapper {
20
+ position: relative;
21
+ min-height: 302px;
22
+ _height: 302px;
23
+ clear: both;
24
+ }
25
+
26
+ .dataTables_wrapper .wp-table-reloaded {
27
+ clear: both;
28
+ }
29
+
30
+ .dataTables_processing {
31
+ position: absolute;
32
+ top: 0px;
33
+ left: 50%;
34
+ width: 250px;
35
+ margin-left: -125px;
36
+ border: 1px solid #ddd;
37
+ text-align: center;
38
+ color: #999;
39
+ font-size: 11px;
40
+ padding: 2px 0;
41
+ }
42
+
43
+ .dataTables_length {
44
+ width: 50%;
45
+ float: left;
46
+ }
47
+
48
+ .dataTables_filter {
49
+ width: 45%;
50
+ float: right;
51
+ text-align: right;
52
+ }
53
+
54
+ .dataTables_info {
55
+ width: 60%;
56
+ float: left;
57
+ }
58
+
59
+ .dataTables_paginate {
60
+ width: 44px;
61
+ * width: 50px;
62
+ float: right;
63
+ text-align: right;
64
+ }
65
+
66
+ .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
67
+ height: 19px;
68
+ width: 19px;
69
+ margin-left: 3px;
70
+ float: left;
71
+ }
72
+
73
+ .paginate_disabled_previous {
74
+ background-image: url(../img/back_disabled.jpg);
75
+ }
76
+
77
+ .paginate_enabled_previous {
78
+ background-image: url(../img/back_enabled.jpg);
79
+ }
80
+
81
+ .paginate_disabled_next {
82
+ background-image: url(../img/forward_disabled.jpg);
83
+ }
84
+
85
+ .paginate_enabled_next {
86
+ background-image: url(../img/forward_enabled.jpg);
87
+ }
88
+
89
+ .paging_full_numbers {
90
+ width: 400px;
91
+ height: 22px;
92
+ line-height: 22px;
93
+ }
94
+
95
+ .paging_full_numbers span.paginate_button, .paging_full_numbers span.paginate_active {
96
+ border: 1px solid #aaa;
97
+ -webkit-border-radius: 5px;
98
+ -moz-border-radius: 5px;
99
+ padding: 2px 5px;
100
+ margin: 0 3px;
101
+ cursor: pointer;
102
+ *cursor: hand;
103
+ }
104
+
105
+ .paging_full_numbers span.paginate_button {
106
+ background-color: #ddd;
107
+ }
108
+
109
+ .paging_full_numbers span.paginate_button:hover {
110
+ background-color: #ccc;
111
+ }
112
+
113
+ .paging_full_numbers span.paginate_active {
114
+ background-color: #99B3FF;
115
+ }
css/index.php ADDED
@@ -0,0 +1,3 @@
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
css/plugin.css ADDED
@@ -0,0 +1,30 @@
1
+ /*************************************************
2
+ * This CSS file belongs to WP-Table Reloaded! *
3
+ * DO NOT make any changes here, but in the *
4
+ * "Custom CSS" textarea in the "Plugin Options"! *
5
+ *************************************************/
6
+
7
+ .wp-table-reloaded {
8
+ background-color: #CDCDCD;
9
+ margin: 10px 0px 15px 0px;
10
+ font-size: 8pt;
11
+ width: 100%;
12
+ text-align: left;
13
+ }
14
+ .wp-table-reloaded th {
15
+ background-color: #E6EEEE;
16
+ border: 1px solid #FFFFFF;
17
+ padding: 4px;
18
+ }
19
+ .wp-table-reloaded td {
20
+ color: #3D3D3D;
21
+ padding: 4px;
22
+ background-color: #FFFFFF;
23
+ vertical-align: top;
24
+ }
25
+ .wp-table-reloaded .even td {
26
+ background-color: #FFFFFF;
27
+ }
28
+ .wp-table-reloaded .odd td {
29
+ background-color: #F0F0F6;
30
+ }
css/tablesorter.css ADDED
@@ -0,0 +1,17 @@
1
+ /*************************************************
2
+ * This CSS file belongs to WP-Table Reloaded! *
3
+ * DO NOT make any changes here, but in the *
4
+ * "Custom CSS" textarea in the "Plugin Options"! *
5
+ *************************************************/
6
+
7
+ .wp-table-reloaded .header {
8
+ background: #E6EEEE url(../img/bg.gif) no-repeat center right;
9
+ cursor: pointer;
10
+ }
11
+ .wp-table-reloaded .headerSortUp {
12
+ background: #8DBDD8 url(../img/asc.gif) no-repeat center right;
13
+ }
14
+
15
+ .wp-table-reloaded .headerSortDown {
16
+ background: #8DBDD8 url(../img/desc.gif) no-repeat center right;
17
+ }
css/warning.txt ADDED
@@ -0,0 +1,10 @@
1
+ ATTENTION:
2
+
3
+ Do not edit or modify the files in this directory, as they might be changed in future plugin versions.
4
+ This would lead to a loss of your changes!
5
+
6
+ If you want to apply custom changes to the CSS code of the plugin,
7
+ please add those to the "Add custom CSS" textarea on the "Plugin Options"
8
+ screen of WP-Table Reloaded.
9
+
10
+ Thank you!
img/back_disabled.jpg ADDED
Binary file
img/back_enabled.jpg ADDED
Binary file
img/forward_disabled.jpg ADDED
Binary file
img/forward_enabled.jpg ADDED
Binary file
js/jquery.datatables.min.js ADDED
@@ -0,0 +1,542 @@
1
+ /*
2
+ * File: jquery.dataTables.min.js
3
+ * Version: 1.5.6
4
+ * Author: Allan Jardine (www.sprymedia.co.uk)
5
+ * Info: www.datatables.net
6
+ *
7
+ * Copyright 2008-2009 Allan Jardine, all rights reserved.
8
+ *
9
+ * This source file is free software, under either the GPL v2 license or a
10
+ * BSD style license, as supplied with this software.
11
+ *
12
+ * This source file is distributed in the hope that it will be useful, but
13
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
15
+ */
16
+ (function($){$.fn.dataTableSettings=[];$.fn.dataTableExt={};var _oExt=$.fn.dataTableExt;
17
+ _oExt.sVersion="1.5.6";_oExt.iApiIndex=0;_oExt.oApi={};_oExt.afnFiltering=[];_oExt.aoFeatures=[];
18
+ _oExt.ofnSearch={};_oExt.afnSortData=[];_oExt.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"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",sSortableDesc:"sorting_desc_disabled",sSortableNone:"",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:""};
19
+ _oExt.oJUIClasses={sPagePrevEnabled:"fg-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-state-default",sPageButtonActive:"fg-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset fg-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s"};
20
+ _oExt.oPagination={two_button:{fnInit:function(oSettings,fnCallbackDraw){var nPaging=oSettings.anFeatures.p;
21
+ if(!oSettings.bJUI){oSettings.nPrevious=document.createElement("div");oSettings.nNext=document.createElement("div")
22
+ }else{oSettings.nPrevious=document.createElement("a");oSettings.nNext=document.createElement("a");
23
+ var nNextInner=document.createElement("span");nNextInner.className=oSettings.oClasses.sPageJUINext;
24
+ oSettings.nNext.appendChild(nNextInner);var nPreviousInner=document.createElement("span");
25
+ nPreviousInner.className=oSettings.oClasses.sPageJUIPrev;oSettings.nPrevious.appendChild(nPreviousInner)
26
+ }if(oSettings.sTableId!==""){nPaging.setAttribute("id",oSettings.sTableId+"_paginate");
27
+ oSettings.nPrevious.setAttribute("id",oSettings.sTableId+"_previous");oSettings.nNext.setAttribute("id",oSettings.sTableId+"_next")
28
+ }oSettings.nPrevious.className=oSettings.oClasses.sPagePrevDisabled;oSettings.nNext.className=oSettings.oClasses.sPageNextDisabled;
29
+ oSettings.nPrevious.title=oSettings.oLanguage.oPaginate.sPrevious;oSettings.nNext.title=oSettings.oLanguage.oPaginate.sNext;
30
+ nPaging.appendChild(oSettings.nPrevious);nPaging.appendChild(oSettings.nNext);$(nPaging).insertAfter(oSettings.nTable);
31
+ $(oSettings.nPrevious).click(function(){oSettings._iDisplayStart=oSettings._iDisplayLength>=0?oSettings._iDisplayStart-oSettings._iDisplayLength:0;
32
+ if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}fnCallbackDraw(oSettings)
33
+ });$(oSettings.nNext).click(function(){if(oSettings._iDisplayLength>=0){if(oSettings._iDisplayStart+oSettings._iDisplayLength<oSettings.fnRecordsDisplay()){oSettings._iDisplayStart+=oSettings._iDisplayLength
34
+ }}else{oSettings._iDisplayStart=0}fnCallbackDraw(oSettings)});$(oSettings.nPrevious).bind("selectstart",function(){return false
35
+ });$(oSettings.nNext).bind("selectstart",function(){return false})},fnUpdate:function(oSettings,fnCallbackDraw){if(!oSettings.anFeatures.p){return
36
+ }oSettings.nPrevious.className=(oSettings._iDisplayStart===0)?oSettings.oClasses.sPagePrevDisabled:oSettings.oClasses.sPagePrevEnabled;
37
+ oSettings.nNext.className=(oSettings.fnDisplayEnd()==oSettings.fnRecordsDisplay())?oSettings.oClasses.sPageNextDisabled:oSettings.oClasses.sPageNextEnabled
38
+ }},iFullNumbersShowPages:5,full_numbers:{fnInit:function(oSettings,fnCallbackDraw){var nPaging=oSettings.anFeatures.p;
39
+ var nFirst=document.createElement("span");var nPrevious=document.createElement("span");
40
+ var nList=document.createElement("span");var nNext=document.createElement("span");
41
+ var nLast=document.createElement("span");nFirst.innerHTML=oSettings.oLanguage.oPaginate.sFirst;
42
+ nPrevious.innerHTML=oSettings.oLanguage.oPaginate.sPrevious;nNext.innerHTML=oSettings.oLanguage.oPaginate.sNext;
43
+ nLast.innerHTML=oSettings.oLanguage.oPaginate.sLast;var oClasses=oSettings.oClasses;
44
+ nFirst.className=oClasses.sPageButton+" "+oClasses.sPageFirst;nPrevious.className=oClasses.sPageButton+" "+oClasses.sPagePrevious;
45
+ nNext.className=oClasses.sPageButton+" "+oClasses.sPageNext;nLast.className=oClasses.sPageButton+" "+oClasses.sPageLast;
46
+ if(oSettings.sTableId!==""){nPaging.setAttribute("id",oSettings.sTableId+"_paginate");
47
+ nFirst.setAttribute("id",oSettings.sTableId+"_first");nPrevious.setAttribute("id",oSettings.sTableId+"_previous");
48
+ nNext.setAttribute("id",oSettings.sTableId+"_next");nLast.setAttribute("id",oSettings.sTableId+"_last")
49
+ }nPaging.appendChild(nFirst);nPaging.appendChild(nPrevious);nPaging.appendChild(nList);
50
+ nPaging.appendChild(nNext);nPaging.appendChild(nLast);$(nFirst).click(function(){oSettings._iDisplayStart=0;
51
+ fnCallbackDraw(oSettings)});$(nPrevious).click(function(){oSettings._iDisplayStart=oSettings._iDisplayLength>=0?oSettings._iDisplayStart-oSettings._iDisplayLength:0;
52
+ if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}fnCallbackDraw(oSettings)
53
+ });$(nNext).click(function(){if(oSettings._iDisplayLength>=0){if(oSettings._iDisplayStart+oSettings._iDisplayLength<oSettings.fnRecordsDisplay()){oSettings._iDisplayStart+=oSettings._iDisplayLength
54
+ }}else{oSettings._iDisplayStart=0}fnCallbackDraw(oSettings)});$(nLast).click(function(){if(oSettings._iDisplayLength>=0){var iPages=parseInt((oSettings.fnRecordsDisplay()-1)/oSettings._iDisplayLength,10)+1;
55
+ oSettings._iDisplayStart=(iPages-1)*oSettings._iDisplayLength}else{oSettings._iDisplayStart=0
56
+ }fnCallbackDraw(oSettings)});$("span",nPaging).bind("mousedown",function(){return false
57
+ });$("span",nPaging).bind("selectstart",function(){return false});oSettings.nPaginateList=nList
58
+ },fnUpdate:function(oSettings,fnCallbackDraw){if(!oSettings.anFeatures.p){return}var iPageCount=jQuery.fn.dataTableExt.oPagination.iFullNumbersShowPages;
59
+ var iPageCountHalf=Math.floor(iPageCount/2);var iPages=Math.ceil((oSettings.fnRecordsDisplay())/oSettings._iDisplayLength);
60
+ var iCurrentPage=Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength)+1;
61
+ var sList="";var iStartButton;var iEndButton;var oClasses=oSettings.oClasses;if(iPages<iPageCount){iStartButton=1;
62
+ iEndButton=iPages}else{if(iCurrentPage<=iPageCountHalf){iStartButton=1;iEndButton=iPageCount
63
+ }else{if(iCurrentPage>=(iPages-iPageCountHalf)){iStartButton=iPages-iPageCount+1;
64
+ iEndButton=iPages}else{iStartButton=iCurrentPage-Math.ceil(iPageCount/2)+1;iEndButton=iStartButton+iPageCount-1
65
+ }}}for(var i=iStartButton;i<=iEndButton;i++){if(iCurrentPage!=i){sList+='<span class="'+oClasses.sPageButton+'">'+i+"</span>"
66
+ }else{sList+='<span class="'+oClasses.sPageButtonActive+'">'+i+"</span>"}}oSettings.nPaginateList.innerHTML=sList;
67
+ $("span",oSettings.nPaginateList).bind("mousedown",function(){return false});$("span",oSettings.nPaginateList).bind("selectstart",function(){return false
68
+ });$("span",oSettings.nPaginateList).click(function(){var iTarget=(this.innerHTML*1)-1;
69
+ oSettings._iDisplayStart=iTarget*oSettings._iDisplayLength;fnCallbackDraw(oSettings);
70
+ return false});var nButtons=$("span",oSettings.anFeatures.p);var nStatic=[nButtons[0],nButtons[1],nButtons[nButtons.length-2],nButtons[nButtons.length-1]];
71
+ $(nStatic).removeClass(oClasses.sPageButton+" "+oClasses.sPageButtonActive);if(iCurrentPage==1){nStatic[0].className+=" "+oClasses.sPageButtonStaticDisabled;
72
+ nStatic[1].className+=" "+oClasses.sPageButtonStaticDisabled}else{nStatic[0].className+=" "+oClasses.sPageButton;
73
+ nStatic[1].className+=" "+oClasses.sPageButton}if(iCurrentPage==iPages||oSettings._iDisplayLength==-1){nStatic[2].className+=" "+oClasses.sPageButtonStaticDisabled;
74
+ nStatic[3].className+=" "+oClasses.sPageButtonStaticDisabled}else{nStatic[2].className+=" "+oClasses.sPageButton;
75
+ nStatic[3].className+=" "+oClasses.sPageButton}}}};_oExt.oSort={"string-asc":function(a,b){var x=a.toLowerCase();
76
+ var y=b.toLowerCase();return((x<y)?-1:((x>y)?1:0))},"string-desc":function(a,b){var x=a.toLowerCase();
77
+ var y=b.toLowerCase();return((x<y)?1:((x>y)?-1:0))},"html-asc":function(a,b){var x=a.replace(/<.*?>/g,"").toLowerCase();
78
+ var y=b.replace(/<.*?>/g,"").toLowerCase();return((x<y)?-1:((x>y)?1:0))},"html-desc":function(a,b){var x=a.replace(/<.*?>/g,"").toLowerCase();
79
+ var y=b.replace(/<.*?>/g,"").toLowerCase();return((x<y)?1:((x>y)?-1:0))},"date-asc":function(a,b){var x=Date.parse(a);
80
+ var y=Date.parse(b);if(isNaN(x)){x=Date.parse("01/01/1970 00:00:00")}if(isNaN(y)){y=Date.parse("01/01/1970 00:00:00")
81
+ }return x-y},"date-desc":function(a,b){var x=Date.parse(a);var y=Date.parse(b);if(isNaN(x)){x=Date.parse("01/01/1970 00:00:00")
82
+ }if(isNaN(y)){y=Date.parse("01/01/1970 00:00:00")}return y-x},"numeric-asc":function(a,b){var x=a=="-"?0:a;
83
+ var y=b=="-"?0:b;return x-y},"numeric-desc":function(a,b){var x=a=="-"?0:a;var y=b=="-"?0:b;
84
+ return y-x}};_oExt.aTypes=[function(sData){if(typeof sData=="number"){return"numeric"
85
+ }else{if(typeof sData.charAt!="function"){return null}}var sValidFirstChars="0123456789-";
86
+ var sValidChars="0123456789.";var Char;var bDecimal=false;Char=sData.charAt(0);if(sValidFirstChars.indexOf(Char)==-1){return null
87
+ }for(var i=1;i<sData.length;i++){Char=sData.charAt(i);if(sValidChars.indexOf(Char)==-1){return null
88
+ }if(Char=="."){if(bDecimal){return null}bDecimal=true}}return"numeric"},function(sData){var iParse=Date.parse(sData);
89
+ if(iParse!==null&&!isNaN(iParse)){return"date"}return null}];_oExt._oExternConfig={iNextUnique:0};
90
+ $.fn.dataTable=function(oInit){var _aoSettings=$.fn.dataTableSettings;function classSettings(){this.fnRecordsTotal=function(){if(this.oFeatures.bServerSide){return this._iRecordsTotal
91
+ }else{return this.aiDisplayMaster.length}};this.fnRecordsDisplay=function(){if(this.oFeatures.bServerSide){return this._iRecordsDisplay
92
+ }else{return this.aiDisplay.length}};this.fnDisplayEnd=function(){if(this.oFeatures.bServerSide){return this._iDisplayStart+this.aiDisplay.length
93
+ }else{return this._iDisplayEnd}};this.sInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false};
94
+ this.anFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"}};
95
+ this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.iNextId=0;
96
+ this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bEscapeRegex:true};this.aoPreSearchCols=[];
97
+ this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.fnRowCallback=null;
98
+ this.fnHeaderCallback=null;this.fnFooterCallback=null;this.fnDrawCallback=null;this.fnInitComplete=null;
99
+ this.sTableId="";this.nTable=null;this.iDefaultSortIndex=0;this.bInitialised=false;
100
+ this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=60*60*2;
101
+ this.sAjaxSource=null;this.bAjaxDataGet=true;this.fnServerData=$.getJSON;this.iServerDraw=0;
102
+ this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsTotal=0;
103
+ this._iRecordsDisplay=0;this.bJUI=false;this.oClasses=_oExt.oStdClasses;this.bFiltered=false;
104
+ this.bSorted=false}this.oApi={};this.fnDraw=function(bComplete){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
105
+ if(typeof bComplete!="undefined"&&bComplete===false){_fnCalculateEnd(oSettings);_fnDraw(oSettings)
106
+ }else{_fnReDraw(oSettings)}};this.fnFilter=function(sInput,iColumn,bEscapeRegex){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
107
+ if(typeof bEscapeRegex=="undefined"){bEscapeRegex=true}if(typeof iColumn=="undefined"||iColumn===null){_fnFilterComplete(oSettings,{sSearch:sInput,bEscapeRegex:bEscapeRegex},1)
108
+ }else{oSettings.aoPreSearchCols[iColumn].sSearch=sInput;oSettings.aoPreSearchCols[iColumn].bEscapeRegex=bEscapeRegex;
109
+ _fnFilterComplete(oSettings,oSettings.oPreviousSearch,1)}};this.fnSettings=function(nNode){return _fnSettingsFromNode(this[_oExt.iApiIndex])
110
+ };this.fnSort=function(aaSort){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
111
+ oSettings.aaSorting=aaSort;_fnSort(oSettings)};this.fnAddData=function(mData,bRedraw){var aiReturn=[];
112
+ var iTest;if(typeof bRedraw=="undefined"){bRedraw=true}var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
113
+ if(typeof mData[0]=="object"){for(var i=0;i<mData.length;i++){iTest=_fnAddData(oSettings,mData[i]);
114
+ if(iTest==-1){return aiReturn}aiReturn.push(iTest)}}else{iTest=_fnAddData(oSettings,mData);
115
+ if(iTest==-1){return aiReturn}aiReturn.push(iTest)}oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();
116
+ _fnBuildSearchArray(oSettings,1);if(bRedraw){_fnReDraw(oSettings)}return aiReturn
117
+ };this.fnDeleteRow=function(iAODataIndex,fnCallBack,bNullRow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
118
+ var i;for(i=0;i<oSettings.aiDisplayMaster.length;i++){if(oSettings.aiDisplayMaster[i]==iAODataIndex){oSettings.aiDisplayMaster.splice(i,1);
119
+ break}}for(i=0;i<oSettings.aiDisplay.length;i++){if(oSettings.aiDisplay[i]==iAODataIndex){oSettings.aiDisplay.splice(i,1);
120
+ break}}_fnBuildSearchArray(oSettings,1);if(typeof fnCallBack=="function"){fnCallBack.call(this)
121
+ }if(oSettings._iDisplayStart>=oSettings.aiDisplay.length){oSettings._iDisplayStart-=oSettings._iDisplayLength;
122
+ if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}}_fnCalculateEnd(oSettings);
123
+ _fnDraw(oSettings);var aData=oSettings.aoData[iAODataIndex]._aData.slice();if(typeof bNullRow!="undefined"&&bNullRow===true){oSettings.aoData[iAODataIndex]=null
124
+ }return aData};this.fnClearTable=function(bRedraw){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
125
+ _fnClearTable(oSettings);if(typeof bRedraw=="undefined"||bRedraw){_fnDraw(oSettings)
126
+ }};this.fnOpen=function(nTr,sHtml,sClass){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
127
+ this.fnClose(nTr);var nNewRow=document.createElement("tr");var nNewCell=document.createElement("td");
128
+ nNewRow.appendChild(nNewCell);nNewCell.className=sClass;nNewCell.colSpan=_fnVisbleColumns(oSettings);
129
+ nNewCell.innerHTML=sHtml;var nTrs=$("tbody tr",oSettings.nTable);if($.inArray(nTr,nTrs)!=-1){$(nNewRow).insertAfter(nTr)
130
+ }if(!oSettings.oFeatures.bServerSide){oSettings.aoOpenRows.push({nTr:nNewRow,nParent:nTr})
131
+ }};this.fnClose=function(nTr){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
132
+ for(var i=0;i<oSettings.aoOpenRows.length;i++){if(oSettings.aoOpenRows[i].nParent==nTr){var nTrParent=oSettings.aoOpenRows[i].nTr.parentNode;
133
+ if(nTrParent){nTrParent.removeChild(oSettings.aoOpenRows[i].nTr)}oSettings.aoOpenRows.splice(i,1);
134
+ return 0}}return 1};this.fnGetData=function(iRow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
135
+ if(typeof iRow!="undefined"){return oSettings.aoData[iRow]._aData}return _fnGetDataMaster(oSettings)
136
+ };this.fnGetNodes=function(iRow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
137
+ if(typeof iRow!="undefined"){return oSettings.aoData[iRow].nTr}return _fnGetTrNodes(oSettings)
138
+ };this.fnGetPosition=function(nNode){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
139
+ var i;if(nNode.nodeName=="TR"){for(i=0;i<oSettings.aoData.length;i++){if(oSettings.aoData[i]!==null&&oSettings.aoData[i].nTr==nNode){return i
140
+ }}}else{if(nNode.nodeName=="TD"){for(i=0;i<oSettings.aoData.length;i++){var iCorrector=0;
141
+ for(var j=0;j<oSettings.aoColumns.length;j++){if(oSettings.aoColumns[j].bVisible){if(oSettings.aoData[i]!==null&&oSettings.aoData[i].nTr.getElementsByTagName("td")[j-iCorrector]==nNode){return[i,j-iCorrector,j]
142
+ }}else{iCorrector++}}}}}return null};this.fnUpdate=function(mData,iRow,iColumn,bRedraw){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
143
+ var iVisibleColumn;var sDisplay;if(typeof bRedraw=="undefined"){bRedraw=true}if(typeof mData!="object"){sDisplay=mData;
144
+ oSettings.aoData[iRow]._aData[iColumn]=sDisplay;if(oSettings.aoColumns[iColumn].fnRender!==null){sDisplay=oSettings.aoColumns[iColumn].fnRender({iDataRow:iRow,iDataColumn:iColumn,aData:oSettings.aoData[iRow]._aData,oSettings:oSettings});
145
+ if(oSettings.aoColumns[iColumn].bUseRendered){oSettings.aoData[iRow]._aData[iColumn]=sDisplay
146
+ }}iVisibleColumn=_fnColumnIndexToVisible(oSettings,iColumn);if(iVisibleColumn!==null){oSettings.aoData[iRow].nTr.getElementsByTagName("td")[iVisibleColumn].innerHTML=sDisplay
147
+ }}else{if(mData.length!=oSettings.aoColumns.length){alert("Warning: An array passed to fnUpdate must have the same number of columns as the table in question - in this case "+oSettings.aoColumns.length);
148
+ return 1}for(var i=0;i<mData.length;i++){sDisplay=mData[i];oSettings.aoData[iRow]._aData[i]=sDisplay;
149
+ if(oSettings.aoColumns[i].fnRender!==null){sDisplay=oSettings.aoColumns[i].fnRender({iDataRow:iRow,iDataColumn:i,aData:oSettings.aoData[iRow]._aData,oSettings:oSettings});
150
+ if(oSettings.aoColumns[i].bUseRendered){oSettings.aoData[iRow]._aData[i]=sDisplay
151
+ }}iVisibleColumn=_fnColumnIndexToVisible(oSettings,i);if(iVisibleColumn!==null){oSettings.aoData[iRow].nTr.getElementsByTagName("td")[iVisibleColumn].innerHTML=sDisplay
152
+ }}}_fnBuildSearchArray(oSettings,1);if(bRedraw){_fnReDraw(oSettings)}return 0};this.fnSetColumnVis=function(iCol,bShow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
153
+ var i,iLen;var iColumns=oSettings.aoColumns.length;var nTd;if(oSettings.aoColumns[iCol].bVisible==bShow){return
154
+ }var nTrHead=$("thead:eq(0)>tr",oSettings.nTable)[0];var nTrFoot=$("tfoot:eq(0)>tr",oSettings.nTable)[0];
155
+ var anTheadTh=[];var anTfootTh=[];for(i=0;i<iColumns;i++){anTheadTh.push(oSettings.aoColumns[i].nTh);
156
+ anTfootTh.push(oSettings.aoColumns[i].nTf)}if(bShow){var iInsert=0;for(i=0;i<iCol;
157
+ i++){if(oSettings.aoColumns[i].bVisible){iInsert++}}if(iInsert>=_fnVisbleColumns(oSettings)){nTrHead.appendChild(anTheadTh[iCol]);
158
+ if(nTrFoot){nTrFoot.appendChild(anTfootTh[iCol])}for(i=0,iLen=oSettings.aoData.length;
159
+ i<iLen;i++){nTd=oSettings.aoData[i]._anHidden[iCol];oSettings.aoData[i].nTr.appendChild(nTd)
160
+ }}else{var iBefore;for(i=iCol;i<iColumns;i++){iBefore=_fnColumnIndexToVisible(oSettings,i);
161
+ if(iBefore!==null){break}}nTrHead.insertBefore(anTheadTh[iCol],nTrHead.getElementsByTagName("th")[iBefore]);
162
+ if(nTrFoot){nTrFoot.insertBefore(anTfootTh[iCol],nTrFoot.getElementsByTagName("th")[iBefore])
163
+ }for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){nTd=oSettings.aoData[i]._anHidden[iCol];
164
+ oSettings.aoData[i].nTr.insertBefore(nTd,oSettings.aoData[i].nTr.getElementsByTagName("td")[iBefore])
165
+ }}oSettings.aoColumns[iCol].bVisible=true}else{nTrHead.removeChild(anTheadTh[iCol]);
166
+ if(nTrFoot){nTrFoot.removeChild(anTfootTh[iCol])}var iVisCol=_fnColumnIndexToVisible(oSettings,iCol);
167
+ for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){nTd=oSettings.aoData[i].nTr.getElementsByTagName("td")[iVisCol];
168
+ oSettings.aoData[i]._anHidden[iCol]=nTd;nTd.parentNode.removeChild(nTd)}oSettings.aoColumns[iCol].bVisible=false
169
+ }for(i=0,iLen=oSettings.aoOpenRows.length;i<iLen;i++){oSettings.aoOpenRows[i].nTr.colSpan=_fnVisbleColumns(oSettings)
170
+ }_fnSaveState(oSettings)};function _fnExternApiFunc(sFunc){return function(){var aArgs=[_fnSettingsFromNode(this[_oExt.iApiIndex])].concat(Array.prototype.slice.call(arguments));
171
+ return _oExt.oApi[sFunc].apply(this,aArgs)}}for(var sFunc in _oExt.oApi){if(sFunc){this[sFunc]=_fnExternApiFunc(sFunc)
172
+ }}function _fnInitalise(oSettings){if(oSettings.bInitialised===false){setTimeout(function(){_fnInitalise(oSettings)
173
+ },200);return}_fnAddOptionsHtml(oSettings);_fnDrawHead(oSettings);_fnSortingClasses(oSettings);
174
+ if(oSettings.oFeatures.bSort){_fnSort(oSettings,false);_fnSortingClasses(oSettings)
175
+ }else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();_fnCalculateEnd(oSettings);
176
+ _fnDraw(oSettings)}if(oSettings.sAjaxSource!==null&&!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,true);
177
+ $.getJSON(oSettings.sAjaxSource,null,function(json){for(var i=0;i<json.aaData.length;
178
+ i++){_fnAddData(oSettings,json.aaData[i])}oSettings.iInitDisplayStart=oSettings._iDisplayStart;
179
+ if(oSettings.oFeatures.bSort){_fnSort(oSettings)}else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();
180
+ _fnCalculateEnd(oSettings);_fnDraw(oSettings)}_fnProcessingDisplay(oSettings,false);
181
+ if(typeof oSettings.fnInitComplete=="function"){oSettings.fnInitComplete(oSettings,json)
182
+ }});return}if(typeof oSettings.fnInitComplete=="function"){oSettings.fnInitComplete(oSettings)
183
+ }if(!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false)}}function _fnLanguageProcess(oSettings,oLanguage,bInit){_fnMap(oSettings.oLanguage,oLanguage,"sProcessing");
184
+ _fnMap(oSettings.oLanguage,oLanguage,"sLengthMenu");_fnMap(oSettings.oLanguage,oLanguage,"sZeroRecords");
185
+ _fnMap(oSettings.oLanguage,oLanguage,"sInfo");_fnMap(oSettings.oLanguage,oLanguage,"sInfoEmpty");
186
+ _fnMap(oSettings.oLanguage,oLanguage,"sInfoFiltered");_fnMap(oSettings.oLanguage,oLanguage,"sInfoPostFix");
187
+ _fnMap(oSettings.oLanguage,oLanguage,"sSearch");if(typeof oLanguage.oPaginate!="undefined"){_fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sFirst");
188
+ _fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sPrevious");_fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sNext");
189
+ _fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sLast")}if(bInit){_fnInitalise(oSettings)
190
+ }}function _fnAddColumn(oSettings,oOptions,nTh){oSettings.aoColumns[oSettings.aoColumns.length++]={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],sSortingClass:oSettings.oClasses.sSortable,sSortingClassJUI:oSettings.oClasses.sSortJUI,sTitle:nTh?nTh.innerHTML:"",sName:"",sWidth:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:oSettings.aoColumns.length-1,sSortDataType:"std",nTh:nTh?nTh:document.createElement("th"),nTf:null};
191
+ var iLength=oSettings.aoColumns.length-1;var oCol=oSettings.aoColumns[iLength];if(typeof oOptions!="undefined"&&oOptions!==null){if(typeof oOptions.sType!="undefined"){oCol.sType=oOptions.sType;
192
+ oCol._bAutoType=false}_fnMap(oCol,oOptions,"bVisible");_fnMap(oCol,oOptions,"bSearchable");
193
+ _fnMap(oCol,oOptions,"bSortable");_fnMap(oCol,oOptions,"sTitle");_fnMap(oCol,oOptions,"sName");
194
+ _fnMap(oCol,oOptions,"sWidth");_fnMap(oCol,oOptions,"sClass");_fnMap(oCol,oOptions,"fnRender");
195
+ _fnMap(oCol,oOptions,"bUseRendered");_fnMap(oCol,oOptions,"iDataSort");_fnMap(oCol,oOptions,"asSorting");
196
+ _fnMap(oCol,oOptions,"sSortDataType")}if(!oSettings.oFeatures.bSort){oCol.bSortable=false
197
+ }if(!oCol.bSortable||($.inArray("asc",oCol.asSorting)==-1&&$.inArray("desc",oCol.asSorting)==-1)){oCol.sSortingClass=oSettings.oClasses.sSortableNone;
198
+ oCol.sSortingClassJUI=""}else{if($.inArray("asc",oCol.asSorting)!=-1&&$.inArray("desc",oCol.asSorting)==-1){oCol.sSortingClass=oSettings.oClasses.sSortableAsc;
199
+ oCol.sSortingClassJUI=oSettings.oClasses.sSortJUIAscAllowed}else{if($.inArray("asc",oCol.asSorting)==-1&&$.inArray("desc",oCol.asSorting)!=-1){oCol.sSortingClass=oSettings.oClasses.sSortableDesc;
200
+ oCol.sSortingClassJUI=oSettings.oClasses.sSortJUIDescAllowed}}}if(typeof oSettings.aoPreSearchCols[iLength]=="undefined"||oSettings.aoPreSearchCols[iLength]===null){oSettings.aoPreSearchCols[iLength]={sSearch:"",bEscapeRegex:true}
201
+ }else{if(typeof oSettings.aoPreSearchCols[iLength].bEscapeRegex=="undefined"){oSettings.aoPreSearchCols[iLength].bEscapeRegex=true
202
+ }}}function _fnAddData(oSettings,aData){if(aData.length!=oSettings.aoColumns.length){alert("Warning - added data does not match known number of columns");
203
+ return -1}var iThisIndex=oSettings.aoData.length;oSettings.aoData.push({_iId:oSettings.iNextId++,_aData:aData.slice(),nTr:document.createElement("tr"),_anHidden:[]});
204
+ var nTd;for(var i=0;i<aData.length;i++){nTd=document.createElement("td");if(typeof oSettings.aoColumns[i].fnRender=="function"){var sRendered=oSettings.aoColumns[i].fnRender({iDataRow:iThisIndex,iDataColumn:i,aData:aData,oSettings:oSettings});
205
+ nTd.innerHTML=sRendered;if(oSettings.aoColumns[i].bUseRendered){oSettings.aoData[iThisIndex]._aData[i]=sRendered
206
+ }}else{nTd.innerHTML=aData[i]}if(oSettings.aoColumns[i].sClass!==null){nTd.className=oSettings.aoColumns[i].sClass
207
+ }if(oSettings.aoColumns[i]._bAutoType&&oSettings.aoColumns[i].sType!="string"){if(oSettings.aoColumns[i].sType===null){oSettings.aoColumns[i].sType=_fnDetectType(aData[i])
208
+ }else{if(oSettings.aoColumns[i].sType=="date"||oSettings.aoColumns[i].sType=="numeric"){oSettings.aoColumns[i].sType=_fnDetectType(aData[i])
209
+ }}}if(oSettings.aoColumns[i].bVisible){oSettings.aoData[iThisIndex].nTr.appendChild(nTd)
210
+ }else{oSettings.aoData[iThisIndex]._anHidden[i]=nTd}}oSettings.aiDisplayMaster.push(iThisIndex);
211
+ return iThisIndex}function _fnGatherData(oSettings){var iLoop;var i,j;if(oSettings.sAjaxSource===null){$("tbody:eq(0)>tr",oSettings.nTable).each(function(){var iThisIndex=oSettings.aoData.length;
212
+ oSettings.aoData.push({_iId:oSettings.iNextId++,_aData:[],nTr:this,_anHidden:[]});
213
+ oSettings.aiDisplayMaster.push(iThisIndex);var aLocalData=oSettings.aoData[iThisIndex]._aData;
214
+ $("td",this).each(function(i){aLocalData[i]=this.innerHTML})})}var iCorrector=0;for(i=0;
215
+ i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].sTitle===null){oSettings.aoColumns[i].sTitle=oSettings.aoColumns[i].nTh.innerHTML
216
+ }var bAutoType=oSettings.aoColumns[i]._bAutoType;var bRender=typeof oSettings.aoColumns[i].fnRender=="function";
217
+ var bClass=oSettings.aoColumns[i].sClass!==null;var bVisible=oSettings.aoColumns[i].bVisible;
218
+ if(bAutoType||bRender||bClass||!bVisible){iLoop=oSettings.aoData.length;for(j=0;j<iLoop;
219
+ j++){var nCellNode=oSettings.aoData[j].nTr.getElementsByTagName("td")[i-iCorrector];
220
+ if(bAutoType){if(oSettings.aoColumns[i].sType===null){oSettings.aoColumns[i].sType=_fnDetectType(oSettings.aoData[j]._aData[i])
221
+ }else{if(oSettings.aoColumns[i].sType=="date"||oSettings.aoColumns[i].sType=="numeric"){oSettings.aoColumns[i].sType=_fnDetectType(oSettings.aoData[j]._aData[i])
222
+ }}}if(bRender){var sRendered=oSettings.aoColumns[i].fnRender({iDataRow:j,iDataColumn:i,aData:oSettings.aoData[j]._aData,oSettings:oSettings});
223
+ nCellNode.innerHTML=sRendered;if(oSettings.aoColumns[i].bUseRendered){oSettings.aoData[j]._aData[i]=sRendered
224
+ }}if(bClass){nCellNode.className+=" "+oSettings.aoColumns[i].sClass}if(!bVisible){oSettings.aoData[j]._anHidden[i]=nCellNode;
225
+ nCellNode.parentNode.removeChild(nCellNode)}}if(!bVisible){iCorrector++}}}}function _fnDrawHead(oSettings){var i,nTh,iLen;
226
+ var iThs=oSettings.nTable.getElementsByTagName("thead")[0].getElementsByTagName("th").length;
227
+ var iCorrector=0;if(iThs!==0){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;
228
+ if(oSettings.aoColumns[i].bVisible){if(oSettings.aoColumns[i].sWidth!==null){nTh.style.width=oSettings.aoColumns[i].sWidth
229
+ }if(oSettings.aoColumns[i].sTitle!=nTh.innerHTML){nTh.innerHTML=oSettings.aoColumns[i].sTitle
230
+ }}else{nTh.parentNode.removeChild(nTh);iCorrector++}}}else{var nTr=document.createElement("tr");
231
+ for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;
232
+ nTh.innerHTML=oSettings.aoColumns[i].sTitle;if(oSettings.aoColumns[i].bVisible){if(oSettings.aoColumns[i].sClass!==null){nTh.className=oSettings.aoColumns[i].sClass
233
+ }if(oSettings.aoColumns[i].sWidth!==null){nTh.style.width=oSettings.aoColumns[i].sWidth
234
+ }nTr.appendChild(nTh)}}$("thead:eq(0)",oSettings.nTable).html("")[0].appendChild(nTr)
235
+ }if(oSettings.bJUI){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){oSettings.aoColumns[i].nTh.insertBefore(document.createElement("span"),oSettings.aoColumns[i].nTh.firstChild)
236
+ }}if(oSettings.oFeatures.bSort){for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bSortable===false){$(oSettings.aoColumns[i].nTh).addClass(oSettings.oClasses.sSortableNone);
237
+ continue}$(oSettings.aoColumns[i].nTh).click(function(e){var iDataIndex;for(var i=0;
238
+ i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].nTh==this){iDataIndex=i;
239
+ break}}if(oSettings.aoColumns[iDataIndex].bSortable===false){return}var fnInnerSorting=function(){var iColumn,iNextSort;
240
+ if(e.shiftKey){var bFound=false;for(var i=0;i<oSettings.aaSorting.length;i++){if(oSettings.aaSorting[i][0]==iDataIndex){bFound=true;
241
+ iColumn=oSettings.aaSorting[i][0];iNextSort=oSettings.aaSorting[i][2]+1;if(typeof oSettings.aoColumns[iColumn].asSorting[iNextSort]=="undefined"){oSettings.aaSorting.splice(i,1)
242
+ }else{oSettings.aaSorting[i][1]=oSettings.aoColumns[iColumn].asSorting[iNextSort];
243
+ oSettings.aaSorting[i][2]=iNextSort}break}}if(bFound===false){oSettings.aaSorting.push([iDataIndex,oSettings.aoColumns[iDataIndex].asSorting[0],0])
244
+ }}else{if(oSettings.aaSorting.length==1&&oSettings.aaSorting[0][0]==iDataIndex){iColumn=oSettings.aaSorting[0][0];
245
+ iNextSort=oSettings.aaSorting[0][2]+1;if(typeof oSettings.aoColumns[iColumn].asSorting[iNextSort]=="undefined"){iNextSort=0
246
+ }oSettings.aaSorting[0][1]=oSettings.aoColumns[iColumn].asSorting[iNextSort];oSettings.aaSorting[0][2]=iNextSort
247
+ }else{oSettings.aaSorting.splice(0,oSettings.aaSorting.length);oSettings.aaSorting.push([iDataIndex,oSettings.aoColumns[iDataIndex].asSorting[0],0])
248
+ }}_fnSort(oSettings)};if(!oSettings.oFeatures.bProcessing){fnInnerSorting()}else{_fnProcessingDisplay(oSettings,true);
249
+ setTimeout(function(){fnInnerSorting();if(!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false)
250
+ }},0)}})}$("thead:eq(0) th",oSettings.nTable).mousedown(function(e){if(e.shiftKey){this.onselectstart=function(){return false
251
+ };return false}})}if(oSettings.oFeatures.bAutoWidth&&oSettings.nTable.offsetWidth!==0){oSettings.nTable.style.width=oSettings.nTable.offsetWidth+"px"
252
+ }var nTfoot=oSettings.nTable.getElementsByTagName("tfoot");if(nTfoot.length!==0){iCorrector=0;
253
+ var nTfs=nTfoot[0].getElementsByTagName("th");for(i=0,iLen=nTfs.length;i<iLen;i++){oSettings.aoColumns[i].nTf=nTfs[i-iCorrector];
254
+ if(!oSettings.aoColumns[i].bVisible){nTfs[i-iCorrector].parentNode.removeChild(nTfs[i-iCorrector]);
255
+ iCorrector++}}}}function _fnDraw(oSettings){var i;var anRows=[];var iRowCount=0;var bRowError=false;
256
+ var iStrips=oSettings.asStripClasses.length;var iOpenRows=oSettings.aoOpenRows.length;
257
+ if(oSettings.oFeatures.bServerSide&&!_fnAjaxUpdate(oSettings)){return}if(typeof oSettings.iInitDisplayStart!="undefined"&&oSettings.iInitDisplayStart!=-1){oSettings._iDisplayStart=oSettings.iInitDisplayStart;
258
+ oSettings.iInitDisplayStart=-1;_fnCalculateEnd(oSettings)}if(oSettings.aiDisplay.length!==0){var iStart=oSettings._iDisplayStart;
259
+ var iEnd=oSettings._iDisplayEnd;if(oSettings.oFeatures.bServerSide){iStart=0;iEnd=oSettings.aoData.length
260
+ }for(var j=iStart;j<iEnd;j++){var nRow=oSettings.aoData[oSettings.aiDisplay[j]].nTr;
261
+ if(iStrips!==0){$(nRow).removeClass(oSettings.asStripClasses.join(" "));$(nRow).addClass(oSettings.asStripClasses[iRowCount%iStrips])
262
+ }if(typeof oSettings.fnRowCallback=="function"){nRow=oSettings.fnRowCallback(nRow,oSettings.aoData[oSettings.aiDisplay[j]]._aData,iRowCount,j);
263
+ if(!nRow&&!bRowError){alert("Error: A node was not returned by fnRowCallback");bRowError=true
264
+ }}anRows.push(nRow);iRowCount++;if(iOpenRows!==0){for(var k=0;k<iOpenRows;k++){if(nRow==oSettings.aoOpenRows[k].nParent){anRows.push(oSettings.aoOpenRows[k].nTr)
265
+ }}}}}else{anRows[0]=document.createElement("tr");if(typeof oSettings.asStripClasses[0]!="undefined"){anRows[0].className=oSettings.asStripClasses[0]
266
+ }var nTd=document.createElement("td");nTd.setAttribute("valign","top");nTd.colSpan=oSettings.aoColumns.length;
267
+ nTd.className=oSettings.oClasses.sRowEmpty;nTd.innerHTML=oSettings.oLanguage.sZeroRecords;
268
+ anRows[iRowCount].appendChild(nTd)}if(typeof oSettings.fnHeaderCallback=="function"){oSettings.fnHeaderCallback($("thead:eq(0)>tr",oSettings.nTable)[0],_fnGetDataMaster(oSettings),oSettings._iDisplayStart,oSettings.fnDisplayEnd(),oSettings.aiDisplay)
269
+ }if(typeof oSettings.fnFooterCallback=="function"){oSettings.fnFooterCallback($("tfoot:eq(0)>tr",oSettings.nTable)[0],_fnGetDataMaster(oSettings),oSettings._iDisplayStart,oSettings.fnDisplayEnd(),oSettings.aiDisplay)
270
+ }var nTrs=$("tbody:eq(0)>tr",oSettings.nTable);for(i=0;i<nTrs.length;i++){nTrs[i].parentNode.removeChild(nTrs[i])
271
+ }var nBody=$("tbody:eq(0)",oSettings.nTable);if(nBody[0]){for(i=0;i<anRows.length;
272
+ i++){nBody[0].appendChild(anRows[i])}}if(oSettings.oFeatures.bPaginate){_oExt.oPagination[oSettings.sPaginationType].fnUpdate(oSettings,function(oSettings){_fnCalculateEnd(oSettings);
273
+ _fnDraw(oSettings)})}if(oSettings.oFeatures.bInfo&&oSettings.anFeatures.i){if(oSettings.fnRecordsDisplay()===0&&oSettings.fnRecordsDisplay()==oSettings.fnRecordsTotal()){oSettings.anFeatures.i.innerHTML=oSettings.oLanguage.sInfoEmpty+oSettings.oLanguage.sInfoPostFix
274
+ }else{if(oSettings.fnRecordsDisplay()===0){oSettings.anFeatures.i.innerHTML=oSettings.oLanguage.sInfoEmpty+" "+oSettings.oLanguage.sInfoFiltered.replace("_MAX_",oSettings.fnRecordsTotal())+oSettings.oLanguage.sInfoPostFix
275
+ }else{if(oSettings.fnRecordsDisplay()==oSettings.fnRecordsTotal()){oSettings.anFeatures.i.innerHTML=oSettings.oLanguage.sInfo.replace("_START_",oSettings._iDisplayStart+1).replace("_END_",oSettings.fnDisplayEnd()).replace("_TOTAL_",oSettings.fnRecordsDisplay())+oSettings.oLanguage.sInfoPostFix
276
+ }else{oSettings.anFeatures.i.innerHTML=oSettings.oLanguage.sInfo.replace("_START_",oSettings._iDisplayStart+1).replace("_END_",oSettings.fnDisplayEnd()).replace("_TOTAL_",oSettings.fnRecordsDisplay())+" "+oSettings.oLanguage.sInfoFiltered.replace("_MAX_",oSettings.fnRecordsTotal())+oSettings.oLanguage.sInfoPostFix
277
+ }}}}if(oSettings.oFeatures.bServerSide&&oSettings.oFeatures.bSort){_fnSortingClasses(oSettings)
278
+ }_fnSaveState(oSettings);if(typeof oSettings.fnDrawCallback=="function"){oSettings.fnDrawCallback(oSettings)
279
+ }oSettings.bSorted=false;oSettings.bFiltered=false}function _fnReDraw(oSettings){if(oSettings.oFeatures.bSort){_fnSort(oSettings,oSettings.oPreviousSearch)
280
+ }else{if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch)
281
+ }else{_fnCalculateEnd(oSettings);_fnDraw(oSettings)}}}function _fnAjaxUpdate(oSettings){if(oSettings.bAjaxDataGet){_fnProcessingDisplay(oSettings,true);
282
+ var iColumns=oSettings.aoColumns.length;var aoData=[];var i;oSettings.iServerDraw++;
283
+ aoData.push({name:"sEcho",value:oSettings.iServerDraw});aoData.push({name:"iColumns",value:iColumns});
284
+ aoData.push({name:"sColumns",value:_fnColumnOrdering(oSettings)});aoData.push({name:"iDisplayStart",value:oSettings._iDisplayStart});
285
+ aoData.push({name:"iDisplayLength",value:oSettings.oFeatures.bPaginate!==false?oSettings._iDisplayLength:-1});
286
+ if(oSettings.oFeatures.bFilter!==false){aoData.push({name:"sSearch",value:oSettings.oPreviousSearch.sSearch});
287
+ aoData.push({name:"bEscapeRegex",value:oSettings.oPreviousSearch.bEscapeRegex});for(i=0;
288
+ i<iColumns;i++){aoData.push({name:"sSearch_"+i,value:oSettings.aoPreSearchCols[i].sSearch});
289
+ aoData.push({name:"bEscapeRegex_"+i,value:oSettings.aoPreSearchCols[i].bEscapeRegex});
290
+ aoData.push({name:"bSearchable_"+i,value:oSettings.aoColumns[i].bSearchable})}}if(oSettings.oFeatures.bSort!==false){var iFixed=oSettings.aaSortingFixed!==null?oSettings.aaSortingFixed.length:0;
291
+ var iUser=oSettings.aaSorting.length;aoData.push({name:"iSortingCols",value:iFixed+iUser});
292
+ for(i=0;i<iFixed;i++){aoData.push({name:"iSortCol_"+i,value:oSettings.aaSortingFixed[i][0]});
293
+ aoData.push({name:"iSortDir_"+i,value:oSettings.aaSortingFixed[i][1]})}for(i=0;i<iUser;
294
+ i++){aoData.push({name:"iSortCol_"+(i+iFixed),value:oSettings.aaSorting[i][0]});aoData.push({name:"iSortDir_"+(i+iFixed),value:oSettings.aaSorting[i][1]})
295
+ }for(i=0;i<iColumns;i++){aoData.push({name:"bSortable_"+i,value:oSettings.aoColumns[i].bSortable})
296
+ }}oSettings.fnServerData(oSettings.sAjaxSource,aoData,function(json){_fnAjaxUpdateDraw(oSettings,json)
297
+ });return false}else{return true}}function _fnAjaxUpdateDraw(oSettings,json){if(typeof json.sEcho!="undefined"){if(json.sEcho*1<oSettings.iServerDraw){return
298
+ }else{oSettings.iServerDraw=json.sEcho*1}}_fnClearTable(oSettings);oSettings._iRecordsTotal=json.iTotalRecords;
299
+ oSettings._iRecordsDisplay=json.iTotalDisplayRecords;var sOrdering=_fnColumnOrdering(oSettings);
300
+ var bReOrder=(typeof json.sColumns!="undefined"&&sOrdering!==""&&json.sColumns!=sOrdering);
301
+ if(bReOrder){var aiIndex=_fnReOrderIndex(oSettings,json.sColumns)}for(var i=0,iLen=json.aaData.length;
302
+ i<iLen;i++){if(bReOrder){var aData=[];for(var j=0,jLen=oSettings.aoColumns.length;
303
+ j<jLen;j++){aData.push(json.aaData[i][aiIndex[j]])}_fnAddData(oSettings,aData)}else{_fnAddData(oSettings,json.aaData[i])
304
+ }}oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings.bAjaxDataGet=false;
305
+ _fnDraw(oSettings);oSettings.bAjaxDataGet=true;_fnProcessingDisplay(oSettings,false)
306
+ }function _fnAddOptionsHtml(oSettings){var nHolding=document.createElement("div");
307
+ oSettings.nTable.parentNode.insertBefore(nHolding,oSettings.nTable);var nWrapper=document.createElement("div");
308
+ nWrapper.className=oSettings.oClasses.sWrapper;if(oSettings.sTableId!==""){nWrapper.setAttribute("id",oSettings.sTableId+"_wrapper")
309
+ }var nInsertNode=nWrapper;var sDom=oSettings.sDom.replace("H","fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix");
310
+ sDom=sDom.replace("F","fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix");
311
+ var aDom=sDom.split("");var nTmp;for(var i=0;i<aDom.length;i++){var cOption=aDom[i];
312
+ if(cOption=="<"){var nNewNode=document.createElement("div");var cNext=aDom[i+1];if(cNext=="'"||cNext=='"'){var sClass="";
313
+ var j=2;while(aDom[i+j]!=cNext){sClass+=aDom[i+j];j++}nNewNode.className=sClass;i+=j
314
+ }nInsertNode.appendChild(nNewNode);nInsertNode=nNewNode}else{if(cOption==">"){nInsertNode=nInsertNode.parentNode
315
+ }else{if(cOption=="l"&&oSettings.oFeatures.bPaginate&&oSettings.oFeatures.bLengthChange){nTmp=_fnFeatureHtmlLength(oSettings);
316
+ oSettings.anFeatures[cOption]=nTmp;nInsertNode.appendChild(nTmp)}else{if(cOption=="f"&&oSettings.oFeatures.bFilter){nTmp=_fnFeatureHtmlFilter(oSettings);
317
+ oSettings.anFeatures[cOption]=nTmp;nInsertNode.appendChild(nTmp)}else{if(cOption=="r"&&oSettings.oFeatures.bProcessing){nTmp=_fnFeatureHtmlProcessing(oSettings);
318
+ oSettings.anFeatures[cOption]=nTmp;nInsertNode.appendChild(nTmp)}else{if(cOption=="t"){oSettings.anFeatures[cOption]=oSettings.nTable;
319
+ nInsertNode.appendChild(oSettings.nTable)}else{if(cOption=="i"&&oSettings.oFeatures.bInfo){nTmp=_fnFeatureHtmlInfo(oSettings);
320
+ oSettings.anFeatures[cOption]=nTmp;nInsertNode.appendChild(nTmp)}else{if(cOption=="p"&&oSettings.oFeatures.bPaginate){nTmp=_fnFeatureHtmlPaginate(oSettings);
321
+ oSettings.anFeatures[cOption]=nTmp;nInsertNode.appendChild(nTmp)}else{if(_oExt.aoFeatures.length!==0){var aoFeatures=_oExt.aoFeatures;
322
+ for(var k=0,kLen=aoFeatures.length;k<kLen;k++){if(cOption==aoFeatures[k].cFeature){nTmp=aoFeatures[k].fnInit(oSettings);
323
+ oSettings.anFeatures[cOption]=nTmp;nInsertNode.appendChild(nTmp);break}}}}}}}}}}}}nHolding.parentNode.replaceChild(nWrapper,nHolding)
324
+ }function _fnFeatureHtmlFilter(oSettings){var nFilter=document.createElement("div");
325
+ if(oSettings.sTableId!==""){nFilter.setAttribute("id",oSettings.sTableId+"_filter")
326
+ }nFilter.className=oSettings.oClasses.sFilter;var sSpace=oSettings.oLanguage.sSearch===""?"":" ";
327
+ nFilter.innerHTML=oSettings.oLanguage.sSearch+sSpace+'<input type="text" />';var jqFilter=$("input",nFilter);
328
+ jqFilter.val(oSettings.oPreviousSearch.sSearch.replace('"',"&quot;"));jqFilter.keyup(function(e){_fnFilterComplete(oSettings,{sSearch:this.value,bEscapeRegex:oSettings.oPreviousSearch.bEscapeRegex})
329
+ });jqFilter.keypress(function(e){if(e.keyCode==13){return false}});return nFilter
330
+ }function _fnFeatureHtmlInfo(oSettings){var nInfo=document.createElement("div");if(oSettings.sTableId!==""){nInfo.setAttribute("id",oSettings.sTableId+"_info")
331
+ }nInfo.className=oSettings.oClasses.sInfo;return nInfo}function _fnFeatureHtmlPaginate(oSettings){var nPaginate=document.createElement("div");
332
+ nPaginate.className=oSettings.oClasses.sPaging+oSettings.sPaginationType;oSettings.anFeatures.p=nPaginate;
333
+ _oExt.oPagination[oSettings.sPaginationType].fnInit(oSettings,function(oSettings){_fnCalculateEnd(oSettings);
334
+ _fnDraw(oSettings)});return nPaginate}function _fnFeatureHtmlLength(oSettings){var sName=(oSettings.sTableId==="")?"":'name="'+oSettings.sTableId+'_length"';
335
+ var sStdMenu='<select size="1" '+sName+'><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select>';
336
+ var nLength=document.createElement("div");if(oSettings.sTableId!==""){nLength.setAttribute("id",oSettings.sTableId+"_length")
337
+ }nLength.className=oSettings.oClasses.sLength;nLength.innerHTML=oSettings.oLanguage.sLengthMenu.replace("_MENU_",sStdMenu);
338
+ $('select option[value="'+oSettings._iDisplayLength+'"]',nLength).attr("selected",true);
339
+ $("select",nLength).change(function(e){oSettings._iDisplayLength=parseInt($(this).val(),10);
340
+ _fnCalculateEnd(oSettings);if(oSettings._iDisplayEnd==oSettings.aiDisplay.length){oSettings._iDisplayStart=oSettings._iDisplayEnd-oSettings._iDisplayLength;
341
+ if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}}if(oSettings._iDisplayLength==-1){oSettings._iDisplayStart=0
342
+ }_fnDraw(oSettings)});return nLength}function _fnFeatureHtmlProcessing(oSettings){var nProcessing=document.createElement("div");
343
+ if(oSettings.sTableId!==""){nProcessing.setAttribute("id",oSettings.sTableId+"_processing")
344
+ }nProcessing.innerHTML=oSettings.oLanguage.sProcessing;nProcessing.className=oSettings.oClasses.sProcessing;
345
+ oSettings.nTable.parentNode.insertBefore(nProcessing,oSettings.nTable);return nProcessing
346
+ }function _fnProcessingDisplay(oSettings,bShow){if(oSettings.oFeatures.bProcessing){oSettings.anFeatures.r.style.visibility=bShow?"visible":"hidden"
347
+ }}function _fnFilterComplete(oSettings,oInput,iForce){_fnFilter(oSettings,oInput.sSearch,iForce,oInput.bEscapeRegex);
348
+ for(var i=0;i<oSettings.aoPreSearchCols.length;i++){_fnFilterColumn(oSettings,oSettings.aoPreSearchCols[i].sSearch,i,oSettings.aoPreSearchCols[i].bEscapeRegex)
349
+ }if(_oExt.afnFiltering.length!==0){_fnFilterCustom(oSettings)}oSettings.bFiltered=true;
350
+ oSettings._iDisplayStart=0;_fnCalculateEnd(oSettings);_fnDraw(oSettings);_fnBuildSearchArray(oSettings,0)
351
+ }function _fnFilterCustom(oSettings){var afnFilters=_oExt.afnFiltering;for(var i=0,iLen=afnFilters.length;
352
+ i<iLen;i++){var iCorrector=0;for(var j=0,jLen=oSettings.aiDisplay.length;j<jLen;j++){var iDisIndex=oSettings.aiDisplay[j-iCorrector];
353
+ if(!afnFilters[i](oSettings,oSettings.aoData[iDisIndex]._aData,iDisIndex)){oSettings.aiDisplay.splice(j-iCorrector,1);
354
+ iCorrector++}}}}function _fnFilterColumn(oSettings,sInput,iColumn,bEscapeRegex){if(sInput===""){return
355
+ }var iIndexCorrector=0;var sRegexMatch=bEscapeRegex?_fnEscapeRegex(sInput):sInput;
356
+ var rpSearch=new RegExp(sRegexMatch,"i");for(var i=oSettings.aiDisplay.length-1;i>=0;
357
+ i--){var sData=_fnDataToSearch(oSettings.aoData[oSettings.aiDisplay[i]]._aData[iColumn],oSettings.aoColumns[iColumn].sType);
358
+ if(!rpSearch.test(sData)){oSettings.aiDisplay.splice(i,1);iIndexCorrector++}}}function _fnFilter(oSettings,sInput,iForce,bEscapeRegex){var i;
359
+ if(typeof iForce=="undefined"||iForce===null){iForce=0}if(_oExt.afnFiltering.length!==0){iForce=1
360
+ }var asSearch=bEscapeRegex?_fnEscapeRegex(sInput).split(" "):sInput.split(" ");var sRegExpString="^(?=.*?"+asSearch.join(")(?=.*?")+").*quot;;
361
+ var rpSearch=new RegExp(sRegExpString,"i");if(sInput.length<=0){oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);
362
+ oSettings.aiDisplay=oSettings.aiDisplayMaster.slice()}else{if(oSettings.aiDisplay.length==oSettings.aiDisplayMaster.length||oSettings.oPreviousSearch.sSearch.length>sInput.length||iForce==1||sInput.indexOf(oSettings.oPreviousSearch.sSearch)!==0){oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);
363
+ _fnBuildSearchArray(oSettings,1);for(i=0;i<oSettings.aiDisplayMaster.length;i++){if(rpSearch.test(oSettings.asDataSearch[i])){oSettings.aiDisplay.push(oSettings.aiDisplayMaster[i])
364
+ }}}else{var iIndexCorrector=0;for(i=0;i<oSettings.asDataSearch.length;i++){if(!rpSearch.test(oSettings.asDataSearch[i])){oSettings.aiDisplay.splice(i-iIndexCorrector,1);
365
+ iIndexCorrector++}}}}oSettings.oPreviousSearch.sSearch=sInput;oSettings.oPreviousSearch.bEscapeRegex=bEscapeRegex
366
+ }function _fnSort(oSettings,bApplyClasses){var aaSort=[];var oSort=_oExt.oSort;var aoData=oSettings.aoData;
367
+ var iDataSort;var iDataType;var i,j,jLen;if(oSettings.aaSorting.length!==0||oSettings.aaSortingFixed!==null){if(oSettings.aaSortingFixed!==null){aaSort=oSettings.aaSortingFixed.concat(oSettings.aaSorting)
368
+ }else{aaSort=oSettings.aaSorting.slice()}for(i=0;i<aaSort.length;i++){var iColumn=aaSort[i][0];
369
+ var sDataType=oSettings.aoColumns[iColumn].sSortDataType;if(typeof _oExt.afnSortData[sDataType]!="undefined"){var iCorrector=0;
370
+ var aData=_oExt.afnSortData[sDataType](oSettings,iColumn);for(j=0,jLen=aoData.length;
371
+ j<jLen;j++){if(aoData[j]!==null){aoData[j]._aData[iColumn]=aData[iCorrector];iCorrector++
372
+ }}}}if(!window.runtime){var fnLocalSorting;var sDynamicSort="fnLocalSorting = function(a,b){var iTest;";
373
+ for(i=0;i<aaSort.length-1;i++){iDataSort=oSettings.aoColumns[aaSort[i][0]].iDataSort;
374
+ iDataType=oSettings.aoColumns[iDataSort].sType;sDynamicSort+="iTest = oSort['"+iDataType+"-"+aaSort[i][1]+"']( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] ); if ( iTest === 0 )"
375
+ }iDataSort=oSettings.aoColumns[aaSort[aaSort.length-1][0]].iDataSort;iDataType=oSettings.aoColumns[iDataSort].sType;
376
+ sDynamicSort+="iTest = oSort['"+iDataType+"-"+aaSort[aaSort.length-1][1]+"']( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] ); return iTest;}";
377
+ eval(sDynamicSort);oSettings.aiDisplayMaster.sort(fnLocalSorting)}else{var aAirSort=[];
378
+ var iLen=aaSort.length;for(i=0;i<iLen;i++){iDataSort=oSettings.aoColumns[aaSort[i][0]].iDataSort;
379
+ aAirSort.push([iDataSort,oSettings.aoColumns[iDataSort].sType+"-"+aaSort[i][1]])}oSettings.aiDisplayMaster.sort(function(a,b){var iTest;
380
+ for(var i=0;i<iLen;i++){iTest=oSort[aAirSort[i][1]](aoData[a]._aData[aAirSort[i][0]],aoData[b]._aData[aAirSort[i][0]]);
381
+ if(iTest!==0){return iTest}}return 0})}}if(typeof bApplyClasses=="undefined"||bApplyClasses){_fnSortingClasses(oSettings)
382
+ }oSettings.bSorted=true;if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch,1)
383
+ }else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings._iDisplayStart=0;
384
+ _fnCalculateEnd(oSettings);_fnDraw(oSettings)}}function _fnSortingClasses(oSettings){var i,j,iFound;
385
+ var aaSort,sClass;var iColumns=oSettings.aoColumns.length;var oClasses=oSettings.oClasses;
386
+ for(i=0;i<iColumns;i++){if(oSettings.aoColumns[i].bSortable){$(oSettings.aoColumns[i].nTh).removeClass(oClasses.sSortAsc+" "+oClasses.sSortDesc+" "+oSettings.aoColumns[i].sSortingClass)
387
+ }}if(oSettings.aaSortingFixed!==null){aaSort=oSettings.aaSortingFixed.concat(oSettings.aaSorting)
388
+ }else{aaSort=oSettings.aaSorting.slice()}for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bSortable){sClass=oSettings.aoColumns[i].sSortingClass;
389
+ iFound=-1;for(j=0;j<aaSort.length;j++){if(aaSort[j][0]==i){sClass=(aaSort[j][1]=="asc")?oClasses.sSortAsc:oClasses.sSortDesc;
390
+ iFound=j;break}}$(oSettings.aoColumns[i].nTh).addClass(sClass);if(oSettings.bJUI){var jqSpan=$("span",oSettings.aoColumns[i].nTh);
391
+ jqSpan.removeClass(oClasses.sSortJUIAsc+" "+oClasses.sSortJUIDesc+" "+oClasses.sSortJUI+" "+oClasses.sSortJUIAscAllowed+" "+oClasses.sSortJUIDescAllowed);
392
+ var sSpanClass;if(iFound==-1){sSpanClass=oSettings.aoColumns[i].sSortingClassJUI}else{if(aaSort[iFound][1]=="asc"){sSpanClass=oClasses.sSortJUIAsc
393
+ }else{sSpanClass=oClasses.sSortJUIDesc}}jqSpan.addClass(sSpanClass)}}else{$(oSettings.aoColumns[i].nTh).addClass(oSettings.aoColumns[i].sSortingClass)
394
+ }}if(oSettings.oFeatures.bSort&&oSettings.oFeatures.bSortClasses){var nTrs=_fnGetTrNodes(oSettings);
395
+ sClass=oClasses.sSortColumn;$("td",nTrs).removeClass(sClass+"1 "+sClass+"2 "+sClass+"3");
396
+ var iClass=1;for(i=0;i<aaSort.length;i++){var iVis=_fnColumnIndexToVisible(oSettings,aaSort[i][0]);
397
+ if(iVis!==null){if(iClass<=2){$("td:eq("+iVis+")",nTrs).addClass(sClass+iClass)}else{$("td:eq("+iVis+")",nTrs).addClass(sClass+"3")
398
+ }iClass++}}}}function _fnVisibleToColumnIndex(oSettings,iMatch){var iColumn=-1;for(var i=0;
399
+ i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bVisible===true){iColumn++
400
+ }if(iColumn==iMatch){return i}}return null}function _fnColumnIndexToVisible(oSettings,iMatch){var iVisible=-1;
401
+ for(var i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bVisible===true){iVisible++
402
+ }if(i==iMatch){return oSettings.aoColumns[i].bVisible===true?iVisible:null}}return null
403
+ }function _fnVisbleColumns(oS){var iVis=0;for(var i=0;i<oS.aoColumns.length;i++){if(oS.aoColumns[i].bVisible===true){iVis++
404
+ }}return iVis}function _fnBuildSearchArray(oSettings,iMaster){oSettings.asDataSearch.splice(0,oSettings.asDataSearch.length);
405
+ var aArray=(typeof iMaster!="undefined"&&iMaster==1)?oSettings.aiDisplayMaster:oSettings.aiDisplay;
406
+ for(var i=0,iLen=aArray.length;i<iLen;i++){oSettings.asDataSearch[i]="";for(var j=0,jLen=oSettings.aoColumns.length;
407
+ j<jLen;j++){if(oSettings.aoColumns[j].bSearchable){var sData=oSettings.aoData[aArray[i]]._aData[j];
408
+ oSettings.asDataSearch[i]+=_fnDataToSearch(sData,oSettings.aoColumns[j].sType)+" "
409
+ }}}}function _fnDataToSearch(sData,sType){if(typeof _oExt.ofnSearch[sType]=="function"){return _oExt.ofnSearch[sType](sData)
410
+ }else{if(sType=="html"){return sData.replace(/\n/g," ").replace(/<.*?>/g,"")}else{if(typeof sData=="string"){return sData.replace(/\n/g," ")
411
+ }}}return sData}function _fnCalculateEnd(oSettings){if(oSettings.oFeatures.bPaginate===false){oSettings._iDisplayEnd=oSettings.aiDisplay.length
412
+ }else{if(oSettings._iDisplayStart+oSettings._iDisplayLength>oSettings.aiDisplay.length||oSettings._iDisplayLength==-1){oSettings._iDisplayEnd=oSettings.aiDisplay.length
413
+ }else{oSettings._iDisplayEnd=oSettings._iDisplayStart+oSettings._iDisplayLength}}}function _fnConvertToWidth(sWidth,nParent){if(!sWidth||sWidth===null||sWidth===""){return 0
414
+ }if(typeof nParent=="undefined"){nParent=document.getElementsByTagName("body")[0]
415
+ }var iWidth;var nTmp=document.createElement("div");nTmp.style.width=sWidth;nParent.appendChild(nTmp);
416
+ iWidth=nTmp.offsetWidth;nParent.removeChild(nTmp);return(iWidth)}function _fnCalculateColumnWidths(oSettings){var iTableWidth=oSettings.nTable.offsetWidth;
417
+ var iTotalUserIpSize=0;var iTmpWidth;var iVisibleColumns=0;var iColums=oSettings.aoColumns.length;
418
+ var i;var oHeaders=$("thead:eq(0)>th",oSettings.nTable);for(i=0;i<iColums;i++){if(oSettings.aoColumns[i].bVisible){iVisibleColumns++;
419
+ if(oSettings.aoColumns[i].sWidth!==null){iTmpWidth=_fnConvertToWidth(oSettings.aoColumns[i].sWidth,oSettings.nTable.parentNode);
420
+ iTotalUserIpSize+=iTmpWidth;oSettings.aoColumns[i].sWidth=iTmpWidth+"px"}}}if(iColums==oHeaders.length&&iTotalUserIpSize===0&&iVisibleColumns==iColums){for(i=0;
421
+ i<oSettings.aoColumns.length;i++){oSettings.aoColumns[i].sWidth=oHeaders[i].offsetWidth+"px"
422
+ }}else{var nCalcTmp=oSettings.nTable.cloneNode(false);nCalcTmp.setAttribute("id","");
423
+ var sTableTmp='<table class="'+nCalcTmp.className+'">';var sCalcHead="<tr>";var sCalcHtml="<tr>";
424
+ for(i=0;i<iColums;i++){if(oSettings.aoColumns[i].bVisible){sCalcHead+="<th>"+oSettings.aoColumns[i].sTitle+"</th>";
425
+ if(oSettings.aoColumns[i].sWidth!==null){var sWidth="";if(oSettings.aoColumns[i].sWidth!==null){sWidth=' style="width:'+oSettings.aoColumns[i].sWidth+';"'
426
+ }sCalcHtml+="<td"+sWidth+' tag_index="'+i+'">'+fnGetMaxLenString(oSettings,i)+"</td>"
427
+ }else{sCalcHtml+='<td tag_index="'+i+'">'+fnGetMaxLenString(oSettings,i)+"</td>"}}}sCalcHead+="</tr>";
428
+ sCalcHtml+="</tr>";nCalcTmp=$(sTableTmp+sCalcHead+sCalcHtml+"</table>")[0];nCalcTmp.style.width=iTableWidth+"px";
429
+ nCalcTmp.style.visibility="hidden";nCalcTmp.style.position="absolute";oSettings.nTable.parentNode.appendChild(nCalcTmp);
430
+ var oNodes=$("tr:eq(1)>td",nCalcTmp);var iIndex;for(i=0;i<oNodes.length;i++){iIndex=oNodes[i].getAttribute("tag_index");
431
+ oSettings.aoColumns[iIndex].sWidth=$("td",nCalcTmp)[i].offsetWidth+"px"}oSettings.nTable.parentNode.removeChild(nCalcTmp)
432
+ }}function fnGetMaxLenString(oSettings,iCol){var iMax=0;var iMaxIndex=-1;for(var i=0;
433
+ i<oSettings.aoData.length;i++){if(oSettings.aoData[i]._aData[iCol].length>iMax){iMax=oSettings.aoData[i]._aData[iCol].length;
434
+ iMaxIndex=i}}if(iMaxIndex>=0){return oSettings.aoData[iMaxIndex]._aData[iCol]}return""
435
+ }function _fnArrayCmp(aArray1,aArray2){if(aArray1.length!=aArray2.length){return 1
436
+ }for(var i=0;i<aArray1.length;i++){if(aArray1[i]!=aArray2[i]){return 2}}return 0}function _fnDetectType(sData){var aTypes=_oExt.aTypes;
437
+ var iLen=aTypes.length;for(var i=0;i<iLen;i++){var sType=aTypes[i](sData);if(sType!==null){return sType
438
+ }}return"string"}function _fnSettingsFromNode(nTable){for(var i=0;i<_aoSettings.length;
439
+ i++){if(_aoSettings[i].nTable==nTable){return _aoSettings[i]}}return null}function _fnGetDataMaster(oSettings){var aData=[];
440
+ var iLen=oSettings.aoData.length;for(var i=0;i<iLen;i++){if(oSettings.aoData[i]===null){aData.push(null)
441
+ }else{aData.push(oSettings.aoData[i]._aData)}}return aData}function _fnGetTrNodes(oSettings){var aNodes=[];
442
+ var iLen=oSettings.aoData.length;for(var i=0;i<iLen;i++){if(oSettings.aoData[i]===null){aNodes.push(null)
443
+ }else{aNodes.push(oSettings.aoData[i].nTr)}}return aNodes}function _fnEscapeRegex(sVal){var acEscape=["/",".","*","+","?","|","(",")","[","]","{","}","\\","quot;,"^"];
444
+ var reReplace=new RegExp("(\\"+acEscape.join("|\\")+")","g");return sVal.replace(reReplace,"\\$1")
445
+ }function _fnReOrderIndex(oSettings,sColumns){var aColumns=sColumns.split(",");var aiReturn=[];
446
+ for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){for(var j=0;j<iLen;j++){if(oSettings.aoColumns[i].sName==aColumns[j]){aiReturn.push(j);
447
+ break}}}return aiReturn}function _fnColumnOrdering(oSettings){var sNames="";for(var i=0,iLen=oSettings.aoColumns.length;
448
+ i<iLen;i++){sNames+=oSettings.aoColumns[i].sName+","}if(sNames.length==iLen){return""
449
+ }return sNames.slice(0,-1)}function _fnClearTable(oSettings){oSettings.aoData.length=0;
450
+ oSettings.aiDisplayMaster.length=0;oSettings.aiDisplay.length=0;_fnCalculateEnd(oSettings)
451
+ }function _fnSaveState(oSettings){if(!oSettings.oFeatures.bStateSave){return}var i;
452
+ var sValue="{";sValue+='"iStart": '+oSettings._iDisplayStart+",";sValue+='"iEnd": '+oSettings._iDisplayEnd+",";
453
+ sValue+='"iLength": '+oSettings._iDisplayLength+",";sValue+='"sFilter": "'+oSettings.oPreviousSearch.sSearch.replace('"','\\"')+'",';
454
+ sValue+='"sFilterEsc": '+oSettings.oPreviousSearch.bEscapeRegex+",";sValue+='"aaSorting": [ ';
455
+ for(i=0;i<oSettings.aaSorting.length;i++){sValue+="["+oSettings.aaSorting[i][0]+",'"+oSettings.aaSorting[i][1]+"'],"
456
+ }sValue=sValue.substring(0,sValue.length-1);sValue+="],";sValue+='"aaSearchCols": [ ';
457
+ for(i=0;i<oSettings.aoPreSearchCols.length;i++){sValue+="['"+oSettings.aoPreSearchCols[i].sSearch.replace("'","'")+"',"+oSettings.aoPreSearchCols[i].bEscapeRegex+"],"
458
+ }sValue=sValue.substring(0,sValue.length-1);sValue+="],";sValue+='"abVisCols": [ ';
459
+ for(i=0;i<oSettings.aoColumns.length;i++){sValue+=oSettings.aoColumns[i].bVisible+","
460
+ }sValue=sValue.substring(0,sValue.length-1);sValue+="]";sValue+="}";_fnCreateCookie("SpryMedia_DataTables_"+oSettings.sInstance,sValue,oSettings.iCookieDuration)
461
+ }function _fnLoadState(oSettings,oInit){if(!oSettings.oFeatures.bStateSave){return
462
+ }var oData;var sData=_fnReadCookie("SpryMedia_DataTables_"+oSettings.sInstance);if(sData!==null&&sData!==""){try{if(typeof JSON=="object"&&typeof JSON.parse=="function"){oData=JSON.parse(sData.replace(/'/g,'"'))
463
+ }else{oData=eval("("+sData+")")}}catch(e){return}oSettings._iDisplayStart=oData.iStart;
464
+ oSettings.iInitDisplayStart=oData.iStart;oSettings._iDisplayEnd=oData.iEnd;oSettings._iDisplayLength=oData.iLength;
465
+ oSettings.oPreviousSearch.sSearch=oData.sFilter;oSettings.aaSorting=oData.aaSorting.slice();
466
+ if(typeof oData.sFilterEsc!="undefined"){oSettings.oPreviousSearch.bEscapeRegex=oData.sFilterEsc
467
+ }if(typeof oData.aaSearchCols!="undefined"){for(var i=0;i<oData.aaSearchCols.length;
468
+ i++){oSettings.aoPreSearchCols[i]={sSearch:oData.aaSearchCols[i][0],bEscapeRegex:oData.aaSearchCols[i][1]}
469
+ }}if(typeof oData.abVisCols!="undefined"){oInit.saved_aoColumns=[];for(i=0;i<oData.abVisCols.length;
470
+ i++){oInit.saved_aoColumns[i]={};oInit.saved_aoColumns[i].bVisible=oData.abVisCols[i]
471
+ }}}}function _fnCreateCookie(sName,sValue,iSecs){var date=new Date();date.setTime(date.getTime()+(iSecs*1000));
472
+ sName+="_"+window.location.pathname.replace(/[\/:]/g,"").toLowerCase();document.cookie=sName+"="+sValue+"; expires="+date.toGMTString()+"; path=/"
473
+ }function _fnReadCookie(sName){var sNameEQ=sName+"_"+window.location.pathname.replace(/[\/:]/g,"").toLowerCase()+"=";
474
+ var sCookieContents=document.cookie.split(";");for(var i=0;i<sCookieContents.length;
475
+ i++){var c=sCookieContents[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(sNameEQ)===0){return c.substring(sNameEQ.length,c.length)
476
+ }}return null}function _fnGetUniqueThs(nThead){var nTrs=nThead.getElementsByTagName("tr");
477
+ if(nTrs.length==1){return nTrs[0].getElementsByTagName("th")}var aLayout=[],aReturn=[];
478
+ var ROWSPAN=2,COLSPAN=3,TDELEM=4;var i,j,k,iLen,jLen,iColumnShifted;var fnShiftCol=function(a,i,j){while(typeof a[i][j]!="undefined"){j++
479
+ }return j};var fnAddRow=function(i){if(typeof aLayout[i]=="undefined"){aLayout[i]=[]
480
+ }};for(i=0,iLen=nTrs.length;i<iLen;i++){fnAddRow(i);var iColumn=0;var nTds=[];for(j=0,jLen=nTrs[i].childNodes.length;
481
+ j<jLen;j++){if(nTrs[i].childNodes[j].nodeName=="TD"||nTrs[i].childNodes[j].nodeName=="TH"){nTds.push(nTrs[i].childNodes[j])
482
+ }}for(j=0,jLen=nTds.length;j<jLen;j++){var iColspan=nTds[j].getAttribute("colspan")*1;
483
+ var iRowspan=nTds[j].getAttribute("rowspan")*1;if(!iColspan||iColspan===0||iColspan===1){iColumnShifted=fnShiftCol(aLayout,i,iColumn);
484
+ aLayout[i][iColumnShifted]=(nTds[j].nodeName=="TD")?TDELEM:nTds[j];if(iRowspan||iRowspan===0||iRowspan===1){for(k=1;
485
+ k<iRowspan;k++){fnAddRow(i+k);aLayout[i+k][iColumnShifted]=ROWSPAN}}iColumn++}else{iColumnShifted=fnShiftCol(aLayout,i,iColumn);
486
+ for(k=0;k<iColspan;k++){aLayout[i][iColumnShifted+k]=COLSPAN}iColumn+=iColspan}}}for(i=0,iLen=aLayout[0].length;
487
+ i<iLen;i++){for(j=0,jLen=aLayout.length;j<jLen;j++){if(typeof aLayout[j][i]=="object"){aReturn.push(aLayout[j][i])
488
+ }}}return aReturn}function _fnMap(oRet,oSrc,sName,sMappedName){if(typeof sMappedName=="undefined"){sMappedName=sName
489
+ }if(typeof oSrc[sName]!="undefined"){oRet[sMappedName]=oSrc[sName]}}this.oApi._fnInitalise=_fnInitalise;
490
+ this.oApi._fnLanguageProcess=_fnLanguageProcess;this.oApi._fnAddColumn=_fnAddColumn;
491
+ this.oApi._fnAddData=_fnAddData;this.oApi._fnGatherData=_fnGatherData;this.oApi._fnDrawHead=_fnDrawHead;
492
+ this.oApi._fnDraw=_fnDraw;this.oApi._fnAjaxUpdate=_fnAjaxUpdate;this.oApi._fnAddOptionsHtml=_fnAddOptionsHtml;
493
+ this.oApi._fnFeatureHtmlFilter=_fnFeatureHtmlFilter;this.oApi._fnFeatureHtmlInfo=_fnFeatureHtmlInfo;
494
+ this.oApi._fnFeatureHtmlPaginate=_fnFeatureHtmlPaginate;this.oApi._fnFeatureHtmlLength=_fnFeatureHtmlLength;
495
+ this.oApi._fnFeatureHtmlProcessing=_fnFeatureHtmlProcessing;this.oApi._fnProcessingDisplay=_fnProcessingDisplay;
496
+ this.oApi._fnFilterComplete=_fnFilterComplete;this.oApi._fnFilterColumn=_fnFilterColumn;
497
+ this.oApi._fnFilter=_fnFilter;this.oApi._fnSortingClasses=_fnSortingClasses;this.oApi._fnVisibleToColumnIndex=_fnVisibleToColumnIndex;
498
+ this.oApi._fnColumnIndexToVisible=_fnColumnIndexToVisible;this.oApi._fnVisbleColumns=_fnVisbleColumns;
499
+ this.oApi._fnBuildSearchArray=_fnBuildSearchArray;this.oApi._fnDataToSearch=_fnDataToSearch;
500
+ this.oApi._fnCalculateEnd=_fnCalculateEnd;this.oApi._fnConvertToWidth=_fnConvertToWidth;
501
+ this.oApi._fnCalculateColumnWidths=_fnCalculateColumnWidths;this.oApi._fnArrayCmp=_fnArrayCmp;
502
+ this.oApi._fnDetectType=_fnDetectType;this.oApi._fnGetDataMaster=_fnGetDataMaster;
503
+ this.oApi._fnGetTrNodes=_fnGetTrNodes;this.oApi._fnEscapeRegex=_fnEscapeRegex;this.oApi._fnReOrderIndex=_fnReOrderIndex;
504
+ this.oApi._fnColumnOrdering=_fnColumnOrdering;this.oApi._fnClearTable=_fnClearTable;
505
+ this.oApi._fnSaveState=_fnSaveState;this.oApi._fnLoadState=_fnLoadState;this.oApi._fnCreateCookie=_fnCreateCookie;
506
+ this.oApi._fnReadCookie=_fnReadCookie;this.oApi._fnGetUniqueThs=_fnGetUniqueThs;this.oApi._fnReDraw=_fnReDraw;
507
+ var _that=this;return this.each(function(){var oSettings=new classSettings();_aoSettings.push(oSettings);
508
+ var i=0,iLen;var bInitHandedOff=false;var bUsePassedData=false;var sId=this.getAttribute("id");
509
+ if(sId!==null){oSettings.sTableId=sId;oSettings.sInstance=sId}else{oSettings.sInstance=_oExt._oExternConfig.iNextUnique++
510
+ }oSettings.nTable=this;oSettings.oApi=_that.oApi;if(typeof oInit!="undefined"&&oInit!==null){_fnMap(oSettings.oFeatures,oInit,"bPaginate");
511
+ _fnMap(oSettings.oFeatures,oInit,"bLengthChange");_fnMap(oSettings.oFeatures,oInit,"bFilter");
512
+ _fnMap(oSettings.oFeatures,oInit,"bSort");_fnMap(oSettings.oFeatures,oInit,"bInfo");
513
+ _fnMap(oSettings.oFeatures,oInit,"bProcessing");_fnMap(oSettings.oFeatures,oInit,"bAutoWidth");
514
+ _fnMap(oSettings.oFeatures,oInit,"bSortClasses");_fnMap(oSettings.oFeatures,oInit,"bServerSide");
515
+ _fnMap(oSettings,oInit,"asStripClasses");_fnMap(oSettings,oInit,"fnRowCallback");
516
+ _fnMap(oSettings,oInit,"fnHeaderCallback");_fnMap(oSettings,oInit,"fnFooterCallback");
517
+ _fnMap(oSettings,oInit,"fnDrawCallback");_fnMap(oSettings,oInit,"fnInitComplete");
518
+ _fnMap(oSettings,oInit,"fnServerData");_fnMap(oSettings,oInit,"aaSorting");_fnMap(oSettings,oInit,"aaSortingFixed");
519
+ _fnMap(oSettings,oInit,"sPaginationType");_fnMap(oSettings,oInit,"sAjaxSource");_fnMap(oSettings,oInit,"iCookieDuration");
520
+ _fnMap(oSettings,oInit,"sDom");_fnMap(oSettings,oInit,"oSearch","oPreviousSearch");
521
+ _fnMap(oSettings,oInit,"aoSearchCols","aoPreSearchCols");_fnMap(oSettings,oInit,"iDisplayLength","_iDisplayLength");
522
+ _fnMap(oSettings,oInit,"bJQueryUI","bJUI");if(typeof oInit.bJQueryUI!="undefined"&&oInit.bJQueryUI){oSettings.oClasses=_oExt.oJUIClasses;
523
+ if(typeof oInit.sDom=="undefined"){oSettings.sDom='<"H"lfr>t<"F"ip>'}}if(typeof oInit.iDisplayStart!="undefined"&&typeof oSettings.iInitDisplayStart=="undefined"){oSettings.iInitDisplayStart=oInit.iDisplayStart;
524
+ oSettings._iDisplayStart=oInit.iDisplayStart}if(typeof oInit.bStateSave!="undefined"){oSettings.oFeatures.bStateSave=oInit.bStateSave;
525
+ _fnLoadState(oSettings,oInit)}if(typeof oInit.aaData!="undefined"){bUsePassedData=true
526
+ }if(typeof oInit!="undefined"&&typeof oInit.aoData!="undefined"){oInit.aoColumns=oInit.aoData
527
+ }if(typeof oInit.oLanguage!="undefined"){if(typeof oInit.oLanguage.sUrl!="undefined"&&oInit.oLanguage.sUrl!==""){oSettings.oLanguage.sUrl=oInit.oLanguage.sUrl;
528
+ $.getJSON(oSettings.oLanguage.sUrl,null,function(json){_fnLanguageProcess(oSettings,json,true)
529
+ });bInitHandedOff=true}else{_fnLanguageProcess(oSettings,oInit.oLanguage,false)}}}else{oInit={}
530
+ }if(typeof oInit.asStripClasses=="undefined"){oSettings.asStripClasses.push(oSettings.oClasses.sStripOdd);
531
+ oSettings.asStripClasses.push(oSettings.oClasses.sStripEven)}var nThead=this.getElementsByTagName("thead");
532
+ var nThs=nThead.length===0?null:_fnGetUniqueThs(nThead[0]);var bUseCols=typeof oInit.aoColumns!="undefined";
533
+ for(i=0,iLen=bUseCols?oInit.aoColumns.length:nThs.length;i<iLen;i++){var oCol=bUseCols?oInit.aoColumns[i]:null;
534
+ var nTh=nThs?nThs[i]:null;if(typeof oInit.saved_aoColumns!="undefined"&&oInit.saved_aoColumns.length==iLen){if(oCol===null){oCol={}
535
+ }oCol.bVisible=oInit.saved_aoColumns[i].bVisible}_fnAddColumn(oSettings,oCol,nTh)
536
+ }for(i=0;i<oSettings.aaSorting.length;i++){if(typeof oSettings.aaSorting[i][2]=="undefined"){oSettings.aaSorting[i][2]=0
537
+ }}if(this.getElementsByTagName("thead").length===0){this.appendChild(document.createElement("thead"))
538
+ }if(this.getElementsByTagName("tbody").length===0){this.appendChild(document.createElement("tbody"))
539
+ }if(bUsePassedData){for(i=0;i<oInit.aaData.length;i++){_fnAddData(oSettings,oInit.aaData[i])
540
+ }}else{_fnGatherData(oSettings)}oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();
541
+ if(oSettings.oFeatures.bAutoWidth){_fnCalculateColumnWidths(oSettings)}oSettings.bInitialised=true;
542
+ if(bInitHandedOff===false){_fnInitalise(oSettings)}})}})(jQuery);
js/jquery.tablesorter.extended.js CHANGED
@@ -109,7 +109,7 @@
109
textExtraction: "simple",
110
parsers: {},
111
widgets: [],
112
- widgetZebra: {css: ["even","odd"]},
113
headers: {},
114
widthFixed: false,
115
cancelSelection: true,
109
textExtraction: "simple",
110
parsers: {},
111
widgets: [],
112
+ widgetZebra: {css: ["odd","even"]},
113
headers: {},
114
widthFixed: false,
115
cancelSelection: true,
js/jquery.tablesorter.min.js CHANGED
@@ -1,2 +1 @@
1
-
2
(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}#x2F;.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/#x2F;.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}#x2F;.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%#x2F;.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))#x2F;));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))#x2F;.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
1
(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}#x2F;.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/#x2F;.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}#x2F;.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%#x2F;.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))#x2F;));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))#x2F;.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
js/tabletools/images/copy.png ADDED
Binary file
js/tabletools/images/copy_hover.png ADDED
Binary file
js/tabletools/images/csv.png ADDED
Binary file
js/tabletools/images/csv_hover.png ADDED
Binary file
js/tabletools/images/index.php ADDED
@@ -0,0 +1,3 @@
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
js/tabletools/images/print.png ADDED
Binary file
js/tabletools/images/print_hover.png ADDED
Binary file
js/tabletools/images/xls.png ADDED
Binary file
js/tabletools/images/xls_hover.png ADDED
Binary file
js/tabletools/index.php ADDED
@@ -0,0 +1,3 @@
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
js/tabletools/tabletools.css ADDED
@@ -0,0 +1,105 @@
1
+ /*************************************************
2
+ * This CSS file belongs to WP-Table Reloaded! *
3
+ * DO NOT make any changes here, but in the *
4
+ * "Custom CSS" textarea in the "Plugin Options"! *
5
+ *************************************************/
6
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
7
+ * TableTools styles
8
+ */
9
+ .dataTables_wrapper .clear {
10
+ clear: both!important;
11
+ }
12
+
13
+ .TableTools {
14
+ padding: 3px 0 3px 3px;
15
+ border: 1px solid #d0d0d0;
16
+ background-color: #f0f0f0;
17
+ float: right;
18
+ margin-bottom: 1em;
19
+ }
20
+
21
+ .TableTools_button {
22
+ position: relative;
23
+ float: left;
24
+ margin-right: 3px;
25
+ }
26
+
27
+ .TableTools_csv {
28
+ background: url(images/csv.png) no-repeat center center;
29
+ border: 1px solid #f0f0f0;
30
+ }
31
+
32
+ .TableTools_csv_hover {
33
+ background: url(images/csv_hover.png) no-repeat center center;
34
+ border: 1px solid #d0d0d0;
35
+ background-color: #fdfdfd;
36
+ }
37
+
38
+ .TableTools_xls {
39
+ background: url(images/xls.png) no-repeat center center;
40
+ border: 1px solid #f0f0f0;
41
+ }
42
+
43
+ .TableTools_xls_hover {
44
+ background: url(images/xls_hover.png) no-repeat center center;
45
+ border: 1px solid #d0d0d0;
46
+ background-color: #fdfdfd;
47
+ }
48
+
49
+ .TableTools_clipboard {
50
+ background: url(images/copy.png) no-repeat center center;
51
+ border: 1px solid #f0f0f0;
52
+ }
53
+
54
+ .TableTools_clipboard_hover {
55
+ background: url(images/copy_hover.png) no-repeat center center;
56
+ border: 1px solid #d0d0d0;
57
+ background-color: #fdfdfd;
58
+ }
59
+
60
+ .TableTools_print {
61
+ background: url(images/print.png) no-repeat center center;
62
+ border: 1px solid #f0f0f0;
63
+ }
64
+
65
+ .TableTools_print_hover {
66
+ background: url(images/print_hover.png) no-repeat center center;
67
+ border: 1px solid #d0d0d0;
68
+ background-color: #fdfdfd;
69
+ }
70
+
71
+ .TableTools_PrintInfo {
72
+ position: absolute;
73
+ top: 50%;
74
+ left: 50%;
75
+ width: 400px;
76
+ height: 150px;
77
+ margin-left: -200px;
78
+ margin-top: -75px;
79
+ text-align: center;
80
+ background-color: #3f3f3f;
81
+ color: white;
82
+ padding: 10px 30px;
83
+
84
+ opacity: 0.9;
85
+
86
+ border-radius: 5px;
87
+ -moz-border-radius: 5px;
88
+ -webkit-border-radius: 5px;
89
+
90
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
91
+ -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
92
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
93
+ }
94
+
95
+ .TableTools_PrintInfo h6 {
96
+ font-weight: normal;
97
+ font-size: 28px;
98
+ line-height: 28px;
99
+ margin: 1em;
100
+ }
101
+
102
+ .TableTools_PrintInfo p {
103
+ font-size: 14px;
104
+ line-height: 20px;
105
+ }
js/tabletools/tabletools.js ADDED
@@ -0,0 +1,588 @@
<