Easy Table - Version 0.3

Version Description

  • Improved: Option form now filled out with default value if there are no options saved in database and you don't need to save option to get the plugin to works.
  • Added: Option to select where script and style should be loaded, eg. if only in single page.
  • Added: tf parameter for tfoot, now you can set up tfoot for your table, tfoot picked up from 2nd row of the data, usage example [table tf="1"]data[/table]
  • Added: Credit link to Twitter Bootstrap and tablesorter jQuery plugin.
Download this release

Release Info

Developer takien
Plugin Icon wp plugin Easy Table
Version 0.3
Comparing to
See all releases

Code changes from version 0.2 to 0.3

easy-table-style.css CHANGED
@@ -7,10 +7,6 @@
7
  *
8
  * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
  */
10
- .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
11
- .clearfix:after{clear:both;}
12
- .hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
13
- .input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
14
  table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
15
  .table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
16
  .table th{font-weight:bold;}
7
  *
8
  * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
  */
 
 
 
 
10
  table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
11
  .table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
12
  .table th{font-weight:bold;}
easy-table.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Table
4
  Plugin URI: http://takien.com/
5
  Description: Create table in post, page, or widget in easy way.
6
  Author: Takien
7
- Version: 0.2
8
  Author URI: http://takien.com/
9
  */
10
 
@@ -37,11 +37,13 @@ class EasyTable {
37
  var $settings = Array(
38
  'shortcodetag' => 'table',
39
  'tablewidget' => false,
 
40
  'class' => 'table-striped',
41
  'caption' => false,
42
  'width' => '100%',
43
  'align' => 'left',
44
  'th' => true,
 
45
  'border' => 0,
46
  'id' => false,
47
  'tablesorter' => false,
@@ -80,11 +82,12 @@ function __construct(){
80
  private function easy_table_base($return){
81
  $easy_table_base = Array(
82
  'name' => 'Easy Table',
83
- 'version' => '0.2',
84
  'plugin-domain' => 'easy-table'
85
  );
86
  return $easy_table_base[$return];
87
  }
 
88
  function easy_table_short_code($atts, $content="") {
89
  $shortcode_atts = shortcode_atts(array(
90
  'class' => $this->get_easy_table_option('class'),
@@ -92,6 +95,7 @@ function easy_table_short_code($atts, $content="") {
92
  'width' => $this->get_easy_table_option('width'),
93
  'align' => $this->get_easy_table_option('align'),
94
  'th' => $this->get_easy_table_option('th'),
 
95
  'border' => $this->get_easy_table_option('border'),
96
  'id' => $this->get_easy_table_option('id'),
97
  'tablesorter' => $this->get_easy_table_option('tablesorter'),
@@ -132,22 +136,21 @@ private function csv_to_table($data,$args){
132
  $i=0;
133
  $output = '<table '.($id ? 'id="'.$id.'"':'').' width="'.$width.'" align="'.$align.'" class="table '.($tablesorter ? 'tablesorter ':'').$class.'" '.(($border !=='0') ? 'border="'.$border.'"' : '').'>';
134
  $output .= ($caption !=='') ? '<caption>'.$caption.'</caption>' : '';
135
- $output .= $th ? '<thead>' : '<tbody>';
136
  foreach($data as $k=>$v){ $i++;
137
  $v = array_pad($v,$max_cols,'');
 
138
  $output .= "\r\n".'<tr>';
139
- if($i==1){
140
- $thtd = $th ? 'th' : 'td';
141
- $output .= "<$thtd>".implode("</$thtd><$thtd>",array_values($v))."</$thtd>";
142
- }
143
- else{
144
- $output .= '<td>'.implode("</td><td>",array_values($v)).'</td>';
145
- }
146
  $output .= '</tr>';
147
- $output .= (($i==1) AND $th) ? '</thead><tbody>' : '';
 
 
148
  }
149
- $output .= $th ? '</tbody>' : '';
150
- $output .= '</table>';
151
  return $output;
152
  }
153
 
@@ -170,14 +173,17 @@ return $r;
170
  /**
171
  * Retrieve options from database if any, or use default options instead.
172
  */
173
- function get_easy_table_option($return=''){
174
- $option = get_option('easy_table_plugin_option');
175
- if($return){
176
- return ($option[$return] !== '') ? $option[$return] : $this->settings[$return];
 
177
  }
178
  else{
179
- return $option;
180
  }
 
 
181
  }
182
 
183
  /**
@@ -204,6 +210,14 @@ function render_form($fields){
204
  $output .= '<td><input type="checkbox" id="'.$field['name'].'" name="'.$field['name'].'" value="'.$field['value'].'" '.$field['attr'].' />';
205
  $output .= ' <span class="description">'.$field['description'].'</span></td></tr>';
206
  }
 
 
 
 
 
 
 
 
207
  }
208
  $output .= '</table>';
209
  return $output;
@@ -213,26 +227,35 @@ function render_form($fields){
213
  * Register javascript
214
  */
215
  function easy_table_script() {
 
 
 
 
 
216
  if($this->get_easy_table_option('tablesorter')) {
217
  wp_enqueue_script('jquery');
218
  wp_register_script('easy_table_script',plugins_url( 'jquery.tablesorter.min.js' , __FILE__ ),'jquery');
219
  wp_enqueue_script('easy_table_script');
220
  }
 
221
  }
222
 
223
  /**
224
  * Register stylesheet
225
  */
226
  function easy_table_style() {
 
 
 
 
 
227
  if($this->get_easy_table_option('loadcss')) {
228
  wp_register_style('easy_table_style', plugins_url('easy-table-style.css', __FILE__),false,$this->easy_table_base('version'));
229
  wp_enqueue_style( 'easy_table_style');
230
  }
 
231
  }
232
 
233
-
234
-
235
-
236
  function easy_table_admin_script(){
237
  $page = isset($_GET['page']) ? $_GET['page'] : '';
238
  if($page == $this->easy_table_base('plugin-domain')) {
@@ -331,6 +354,37 @@ settings_fields('easy_table_option_field');
331
  'description' => __('Check this if you want the table could be rendered in widget.','easy-table'),
332
  'value' => 1,
333
  'attr' => $this->get_easy_table_option('tablewidget') ? 'checked="checked"' : '')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  );
335
  echo $this->render_form($fields);
336
 
@@ -451,6 +505,7 @@ if(isset($_POST['test-easy-table-reset'])){
451
  <li><strong>width</strong>, <?php _e('default value','easy-table');?> <em>'100%'</em></li>
452
  <li><strong>align</strong>, <?php _e('default value','easy-table');?> <em>'left'</em></li>
453
  <li><strong>th</strong>, <?php _e('default value','easy-table');?> <em>'true'</em></li>
 
454
  <li><strong>border</strong>, <?php _e('default value','easy-table');?> <em>'0'</em></li>
455
  <li><strong>id</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
456
  <li><strong>tablesorter</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
@@ -462,7 +517,7 @@ if(isset($_POST['test-easy-table-reset'])){
462
  </textarea>
463
  <input type="hidden" name="test-easy-table" value="1" />
464
  <p><input class="button" type="submit" name="test-easy-table-reset" value="<?php _e('Reset','easy-table');?>" />
465
- <input class="button-primary" type="submit" value="<?php _e('Update preview','easy-table');?>' &raquo;" /></p></form>
466
  <div>
467
  <h3><?php _e('Preview','easy-table');?></h3>
468
  <?php echo do_shortcode(stripslashes($tableexample));?>
@@ -470,7 +525,12 @@ if(isset($_POST['test-easy-table-reset'])){
470
 
471
  </div>
472
  <div class="clear"></div>
473
- <p><a href="http://takien.com/plugins/easy-table"><?php _e('Any question or suggestion? Click here!','easy-table');?></a></p>
 
 
 
 
 
474
  </div><!--wrap-->
475
  <?php
476
  }
4
  Plugin URI: http://takien.com/
5
  Description: Create table in post, page, or widget in easy way.
6
  Author: Takien
7
+ Version: 0.3
8
  Author URI: http://takien.com/
9
  */
10
 
37
  var $settings = Array(
38
  'shortcodetag' => 'table',
39
  'tablewidget' => false,
40
+ 'scriptloadin' => Array('is_single','is_page'),
41
  'class' => 'table-striped',
42
  'caption' => false,
43
  'width' => '100%',
44
  'align' => 'left',
45
  'th' => true,
46
+ 'tf' => false,
47
  'border' => 0,
48
  'id' => false,
49
  'tablesorter' => false,
82
  private function easy_table_base($return){
83
  $easy_table_base = Array(
84
  'name' => 'Easy Table',
85
+ 'version' => '0.3',
86
  'plugin-domain' => 'easy-table'
87
  );
88
  return $easy_table_base[$return];
89
  }
90
+
91
  function easy_table_short_code($atts, $content="") {
92
  $shortcode_atts = shortcode_atts(array(
93
  'class' => $this->get_easy_table_option('class'),
95
  'width' => $this->get_easy_table_option('width'),
96
  'align' => $this->get_easy_table_option('align'),
97
  'th' => $this->get_easy_table_option('th'),
98
+ 'tf' => $this->get_easy_table_option('tf'),
99
  'border' => $this->get_easy_table_option('border'),
100
  'id' => $this->get_easy_table_option('id'),
101
  'tablesorter' => $this->get_easy_table_option('tablesorter'),
136
  $i=0;
137
  $output = '<table '.($id ? 'id="'.$id.'"':'').' width="'.$width.'" align="'.$align.'" class="table '.($tablesorter ? 'tablesorter ':'').$class.'" '.(($border !=='0') ? 'border="'.$border.'"' : '').'>';
138
  $output .= ($caption !=='') ? '<caption>'.$caption.'</caption>' : '';
139
+ $output .= $th ? '<thead>' : ($tf ? '' : '<tbody>');
140
  foreach($data as $k=>$v){ $i++;
141
  $v = array_pad($v,$max_cols,'');
142
+ $output .= (($i==2) AND $tf) ? '<tfoot>': '';
143
  $output .= "\r\n".'<tr>';
144
+
145
+ $thtd = ((($i==1) AND $th) OR (($i==2) AND $tf)) ? 'th' : 'td';
146
+ $output .= "<$thtd>".implode("</$thtd><$thtd>",array_values($v))."</$thtd>";
147
+
 
 
 
148
  $output .= '</tr>';
149
+ $output .= (($i==1) AND $th) ? '</thead>' : '';
150
+ $output .= (($i==2) AND $tf) ? '</tfoot>': '';
151
+
152
  }
153
+ $output .= '</tbody></table>';
 
154
  return $output;
155
  }
156
 
173
  /**
174
  * Retrieve options from database if any, or use default options instead.
175
  */
176
+ function get_easy_table_option($key=''){
177
+ $option = get_option('easy_table_plugin_option') ? get_option('easy_table_plugin_option') : Array();
178
+ $option = array_merge($this->settings,$option);
179
+ if($key){
180
+ $return = $option[$key];
181
  }
182
  else{
183
+ $return = $option;
184
  }
185
+ return $return;
186
+
187
  }
188
 
189
  /**
210
  $output .= '<td><input type="checkbox" id="'.$field['name'].'" name="'.$field['name'].'" value="'.$field['value'].'" '.$field['attr'].' />';
211
  $output .= ' <span class="description">'.$field['description'].'</span></td></tr>';
212
  }
213
+ if($field['type']=='checkboxgroup'){
214
+ $output .= '<tr><th><label>'.$field['grouplabel'].'</label></th>';
215
+ $output .= '<td>';
216
+ foreach($field['groupitem'] as $key=>$item){
217
+ $output .= '<input type="checkbox" id="'.$item['name'].'" name="'.$item['name'].'" value="'.$item['value'].'" '.$item['attr'].' /> <label for="'.$item['name'].'">'.$item['label'].'</label><br />';
218
+ }
219
+ $output .= ' <span class="description">'.$field['description'].'</span></td></tr>';
220
+ }
221
  }
222
  $output .= '</table>';
223
  return $output;
227
  * Register javascript
228
  */
229
  function easy_table_script() {
230
+ if( is_single() AND in_array('is_single',$this->get_easy_table_option('scriptloadin')) OR
231
+ is_page() AND in_array('is_page',$this->get_easy_table_option('scriptloadin')) OR
232
+ is_home() AND in_array('is_home',$this->get_easy_table_option('scriptloadin')) OR
233
+ is_archive() AND in_array('is_archive',$this->get_easy_table_option('scriptloadin')))
234
+ {
235
  if($this->get_easy_table_option('tablesorter')) {
236
  wp_enqueue_script('jquery');
237
  wp_register_script('easy_table_script',plugins_url( 'jquery.tablesorter.min.js' , __FILE__ ),'jquery');
238
  wp_enqueue_script('easy_table_script');
239
  }
240
+ }
241
  }
242
 
243
  /**
244
  * Register stylesheet
245
  */
246
  function easy_table_style() {
247
+ if( is_single() AND in_array('is_single',$this->get_easy_table_option('scriptloadin')) OR
248
+ is_page() AND in_array('is_page',$this->get_easy_table_option('scriptloadin')) OR
249
+ is_home() AND in_array('is_home',$this->get_easy_table_option('scriptloadin')) OR
250
+ is_archive() AND in_array('is_archive',$this->get_easy_table_option('scriptloadin')))
251
+ {
252
  if($this->get_easy_table_option('loadcss')) {
253
  wp_register_style('easy_table_style', plugins_url('easy-table-style.css', __FILE__),false,$this->easy_table_base('version'));
254
  wp_enqueue_style( 'easy_table_style');
255
  }
256
+ }
257
  }
258
 
 
 
 
259
  function easy_table_admin_script(){
260
  $page = isset($_GET['page']) ? $_GET['page'] : '';
261
  if($page == $this->easy_table_base('plugin-domain')) {
354
  'description' => __('Check this if you want the table could be rendered in widget.','easy-table'),
355
  'value' => 1,
356
  'attr' => $this->get_easy_table_option('tablewidget') ? 'checked="checked"' : '')
357
+ ,Array(
358
+ 'type' => 'checkboxgroup',
359
+ 'grouplabel' => __('Only load JS/CSS when in this condition','easy-table'),
360
+ 'description' => __('Please check in where JavaScript and CSS should be loaded','easy-table'),
361
+ 'groupitem' => Array(
362
+ Array(
363
+ 'name' => 'easy_table_plugin_option[scriptloadin][]',
364
+ 'label' => __('Single','easy-table'),
365
+ 'value' => 'is_single',
366
+ 'attr' => in_array('is_single',$this->get_easy_table_option('scriptloadin')) ? 'checked="checked"' : ''
367
+ ),
368
+ Array(
369
+ 'name' => 'easy_table_plugin_option[scriptloadin][]',
370
+ 'label' => __('Page','easy-table'),
371
+ 'value' => 'is_page',
372
+ 'attr' => in_array('is_page',$this->get_easy_table_option('scriptloadin')) ? 'checked="checked"' : ''
373
+ ),
374
+ Array(
375
+ 'name' => 'easy_table_plugin_option[scriptloadin][]',
376
+ 'label' => __('Front page','easy-table'),
377
+ 'value' => 'is_home',
378
+ 'attr' => in_array('is_home',$this->get_easy_table_option('scriptloadin')) ? 'checked="checked"' : ''
379
+ ),
380
+ Array(
381
+ 'name' => 'easy_table_plugin_option[scriptloadin][]',
382
+ 'label' => __('Archive page','easy-table'),
383
+ 'value' => 'is_archive',
384
+ 'attr' => in_array('is_archive',$this->get_easy_table_option('scriptloadin')) ? 'checked="checked"' : ''
385
+ )
386
+ )
387
+ )
388
  );
389
  echo $this->render_form($fields);
390
 
505
  <li><strong>width</strong>, <?php _e('default value','easy-table');?> <em>'100%'</em></li>
506
  <li><strong>align</strong>, <?php _e('default value','easy-table');?> <em>'left'</em></li>
507
  <li><strong>th</strong>, <?php _e('default value','easy-table');?> <em>'true'</em></li>
508
+ <li><strong>tf</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
509
  <li><strong>border</strong>, <?php _e('default value','easy-table');?> <em>'0'</em></li>
510
  <li><strong>id</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
511
  <li><strong>tablesorter</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
517
  </textarea>
518
  <input type="hidden" name="test-easy-table" value="1" />
519
  <p><input class="button" type="submit" name="test-easy-table-reset" value="<?php _e('Reset','easy-table');?>" />
520
+ <input class="button-primary" type="submit" value="<?php _e('Update preview','easy-table');?> &raquo;" /></p></form>
521
  <div>
522
  <h3><?php _e('Preview','easy-table');?></h3>
523
  <?php echo do_shortcode(stripslashes($tableexample));?>
525
 
526
  </div>
527
  <div class="clear"></div>
528
+ <p><a target="_blank" href="http://takien.com/plugins/easy-table"><?php _e('Any question or suggestion? Click here!','easy-table');?></a></p>
529
+ <h3><?php _e('Credit','easy-table');?>:</h3>
530
+ <ul>
531
+ <li><?php _e('Tablesorter by','easy-table');?> <a target="_blank" href="http://tablesorter.com">tablesorter</a></li>
532
+ <li><?php _e('CSS by','easy-table');?> <a target="_blank" href="http://twitter.github.com/bootstrap">Twitter Bootstrap</a></li>
533
+ </ul>
534
  </div><!--wrap-->
535
  <?php
536
  }
jquery.tablesorter.min.js CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  (function($){$.extend({tablesorter:new
2
  function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',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="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(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,rows,-1,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,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}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=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}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++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][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;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
3
  var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}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 checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;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"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}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=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;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+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);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);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;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(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).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){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};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.toLocaleLowerCase());},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(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.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):\/\/$/.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}$/.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/\%$/.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)))$/));},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)))$/.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();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
1
+ /*
2
+ *
3
+ * TableSorter 2.0 - Client-side table sorting with ease!
4
+ * Version 2.0.5b
5
+ * @requires jQuery v1.2.3
6
+ *
7
+ * Copyright (c) 2007 Christian Bach
8
+ * Examples and docs at: http://tablesorter.com
9
+ * Dual licensed under the MIT and GPL licenses:
10
+ * http://www.opensource.org/licenses/mit-license.php
11
+ * http://www.gnu.org/licenses/gpl.html
12
+ *
13
+ */
14
  (function($){$.extend({tablesorter:new
15
  function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',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="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(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,rows,-1,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,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}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=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}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++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][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;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
16
  var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}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 checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;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"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}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=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;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+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);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);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;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(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).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){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};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.toLocaleLowerCase());},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(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.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):\/\/$/.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}$/.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/\%$/.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)))$/));},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)))$/.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();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
languages/easy-table-id_ID.mo CHANGED
Binary file
languages/easy-table-id_ID.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: easy-table 0.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-21 02:59+0700\n"
6
- "PO-Revision-Date: 2012-05-21 02:59+0700\n"
7
  "Last-Translator: takien <contact@takien.com>\n"
8
  "Language-Team: takien.com <contact@takien.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -16,202 +16,239 @@ msgstr ""
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
- #: easy-table.php:275
20
  msgid "Settings"
21
  msgstr "Pengaturan"
22
 
23
- #: easy-table.php:287
24
  msgid "Instruction"
25
  msgstr "Petunjuk"
26
 
27
- #: easy-table.php:288
28
  msgid "Once plugin installed, go to plugin options page to configure some options"
29
  msgstr ""
30
 
31
- #: easy-table.php:289
32
  msgid "You are ready to write a table in post or page."
33
  msgstr ""
34
 
35
- #: easy-table.php:290
36
  msgid "To be able write table in widget you have to check <em>Enable render table in widget</em> option in the option page."
37
  msgstr ""
38
 
39
- #: easy-table.php:308
40
  #, php-format
41
  msgid "%s Option"
42
  msgstr "Pengaturan %s"
43
 
44
- #: easy-table.php:316
45
  msgid "Show/hide description"
46
  msgstr ""
47
 
48
- #: easy-table.php:317
49
  msgid "General options"
50
  msgstr "Pengaturan umum"
51
 
52
- #: easy-table.php:322
53
  msgid "Short code tag"
54
  msgstr ""
55
 
56
- #: easy-table.php:324
57
  msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
58
  msgstr ""
59
 
60
- #: easy-table.php:329
61
  msgid "Also render table in widget?"
62
  msgstr ""
63
 
64
- #: easy-table.php:331
65
  msgid "Check this if you want the table could be rendered in widget."
66
  msgstr ""
67
 
68
- #: easy-table.php:340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  msgid "Use tablesorter?"
70
  msgstr "Gunakan tablesorter?"
71
 
72
- #: easy-table.php:343
73
  msgid "Check this to use tablesorter jQuery plugin"
74
  msgstr "Ceklist ini jika ingin menggunakan jQuery plugin tablesorter"
75
 
76
- #: easy-table.php:347
77
  msgid "Use TH for the first row?"
78
  msgstr "Gunakan TH untuk baris pertama?"
79
 
80
- #: easy-table.php:350
81
  msgid "Check this if you want to use first row as table head (required by tablesorter)"
82
  msgstr ""
83
 
84
- #: easy-table.php:354
85
  msgid "Load CSS?"
86
- msgstr ""
87
 
88
- #: easy-table.php:357
89
  msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
90
- msgstr ""
91
 
92
- #: easy-table.php:361
93
  msgid "Table class"
94
- msgstr ""
95
 
96
- #: easy-table.php:363
97
  msgid "Table class attribute, if you use bootstrap CSS, you should add at least \"table\" class."
98
- msgstr ""
99
 
100
- #: easy-table.php:367
101
  msgid "Table width"
102
  msgstr "Lebar tabel"
103
 
104
- #: easy-table.php:369
105
  msgid "Table width, in pixel or percent (may be overriden by CSS)"
106
- msgstr ""
107
 
108
- #: easy-table.php:373
109
  msgid "Table align"
110
  msgstr "Perataan tabel"
111
 
112
- #: easy-table.php:375
113
  msgid "Table align, left/right/center (may be overriden by CSS)"
114
- msgstr ""
115
 
116
- #: easy-table.php:379
117
  msgid "Table border"
118
  msgstr "Garis tabel"
119
 
120
- #: easy-table.php:381
121
  msgid "Table border (may be overriden by CSS)"
122
- msgstr ""
123
 
124
- #: easy-table.php:386
125
  msgid "Table options"
126
  msgstr "Pengaturan tabel"
127
 
128
- #: easy-table.php:391
129
  msgid "Parser Option"
130
  msgstr "Pengaturan parser"
131
 
132
- #: easy-table.php:392
133
  msgid "Do not change this unless you know what you're doing"
134
- msgstr ""
135
 
136
- #: easy-table.php:398
137
  msgid "Delimiter"
138
  msgstr "Pemisah"
139
 
140
- #: easy-table.php:401
141
  msgid "CSV delimiter (default is comma)"
142
  msgstr ""
143
 
144
- #: easy-table.php:404
145
  msgid "Enclosure"
146
  msgstr ""
147
 
148
- #: easy-table.php:407
149
  msgid "CSV enclosure (default is double quote)"
150
  msgstr ""
151
 
152
- #: easy-table.php:410
153
  msgid "Escape"
154
  msgstr ""
155
 
156
- #: easy-table.php:413
157
  msgid "CSV escape (default is backslash)"
158
  msgstr ""
159
 
160
- #: easy-table.php:416
161
  msgid "Allow read CSV from file?"
162
- msgstr ""
163
 
164
- #: easy-table.php:419
165
  msgid "Check this if you also want to convert CSV file to table"
166
- msgstr ""
167
 
168
- #: easy-table.php:427
169
  msgid "Save"
170
  msgstr "Simpan"
171
 
172
- #: easy-table.php:446
173
  msgid "Possible parameter"
174
- msgstr ""
175
 
176
- #: easy-table.php:447
177
  msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
178
- msgstr ""
179
-
180
- #: easy-table.php:449
181
- #: easy-table.php:450
182
- #: easy-table.php:451
183
- #: easy-table.php:452
184
- #: easy-table.php:453
185
- #: easy-table.php:454
186
- #: easy-table.php:455
187
- #: easy-table.php:456
188
- #: easy-table.php:457
 
189
  msgid "default value"
190
- msgstr ""
191
 
192
- #: easy-table.php:449
193
  msgid "another value"
194
- msgstr ""
195
 
196
- #: easy-table.php:459
197
  msgid "Test area:"
198
- msgstr ""
199
 
200
- #: easy-table.php:464
201
  msgid "Reset"
202
- msgstr ""
203
 
204
- #: easy-table.php:465
205
  msgid "Update preview"
206
- msgstr ""
207
 
208
- #: easy-table.php:467
209
  msgid "Preview"
210
- msgstr ""
211
 
212
- #: easy-table.php:473
213
  msgid "Any question or suggestion? Click here!"
214
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
  #~ msgid "Use CSS bootstrap?"
217
  #~ msgstr "Gunakan CSS bootstrap?"
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: easy-table 0.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-05-25 01:08+0700\n"
6
+ "PO-Revision-Date: 2012-05-25 01:14+0700\n"
7
  "Last-Translator: takien <contact@takien.com>\n"
8
  "Language-Team: takien.com <contact@takien.com>\n"
9
  "MIME-Version: 1.0\n"
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: easy-table.php:298
20
  msgid "Settings"
21
  msgstr "Pengaturan"
22
 
23
+ #: easy-table.php:310
24
  msgid "Instruction"
25
  msgstr "Petunjuk"
26
 
27
+ #: easy-table.php:311
28
  msgid "Once plugin installed, go to plugin options page to configure some options"
29
  msgstr ""
30
 
31
+ #: easy-table.php:312
32
  msgid "You are ready to write a table in post or page."
33
  msgstr ""
34
 
35
+ #: easy-table.php:313
36
  msgid "To be able write table in widget you have to check <em>Enable render table in widget</em> option in the option page."
37
  msgstr ""
38
 
39
+ #: easy-table.php:331
40
  #, php-format
41
  msgid "%s Option"
42
  msgstr "Pengaturan %s"
43
 
44
+ #: easy-table.php:339
45
  msgid "Show/hide description"
46
  msgstr ""
47
 
48
+ #: easy-table.php:340
49
  msgid "General options"
50
  msgstr "Pengaturan umum"
51
 
52
+ #: easy-table.php:345
53
  msgid "Short code tag"
54
  msgstr ""
55
 
56
+ #: easy-table.php:347
57
  msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
58
  msgstr ""
59
 
60
+ #: easy-table.php:352
61
  msgid "Also render table in widget?"
62
  msgstr ""
63
 
64
+ #: easy-table.php:354
65
  msgid "Check this if you want the table could be rendered in widget."
66
  msgstr ""
67
 
68
+ #: easy-table.php:359
69
+ msgid "Only load JS/CSS when in this condition"
70
+ msgstr ""
71
+
72
+ #: easy-table.php:360
73
+ msgid "Please check in where JavaScript and CSS should be loaded"
74
+ msgstr ""
75
+
76
+ #: easy-table.php:364
77
+ msgid "Single"
78
+ msgstr ""
79
+
80
+ #: easy-table.php:370
81
+ msgid "Page"
82
+ msgstr ""
83
+
84
+ #: easy-table.php:376
85
+ msgid "Front page"
86
+ msgstr ""
87
+
88
+ #: easy-table.php:382
89
+ msgid "Archive page"
90
+ msgstr ""
91
+
92
+ #: easy-table.php:394
93
  msgid "Use tablesorter?"
94
  msgstr "Gunakan tablesorter?"
95
 
96
+ #: easy-table.php:397
97
  msgid "Check this to use tablesorter jQuery plugin"
98
  msgstr "Ceklist ini jika ingin menggunakan jQuery plugin tablesorter"
99
 
100
+ #: easy-table.php:401
101
  msgid "Use TH for the first row?"
102
  msgstr "Gunakan TH untuk baris pertama?"
103
 
104
+ #: easy-table.php:404
105
  msgid "Check this if you want to use first row as table head (required by tablesorter)"
106
  msgstr ""
107
 
108
+ #: easy-table.php:408
109
  msgid "Load CSS?"
110
+ msgstr "Muat CSS?"
111
 
112
+ #: easy-table.php:411
113
  msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
114
+ msgstr "Ceklist ini untuk menyertakan CSS untuk penataan tampilan tabel."
115
 
116
+ #: easy-table.php:415
117
  msgid "Table class"
118
+ msgstr "Class tabel"
119
 
120
+ #: easy-table.php:417
121
  msgid "Table class attribute, if you use bootstrap CSS, you should add at least \"table\" class."
122
+ msgstr "Atribut class pada tabel, jika Anda menggunakan CSS bootstrap, setidaknya harus menambahkan class \"table\""
123
 
124
+ #: easy-table.php:421
125
  msgid "Table width"
126
  msgstr "Lebar tabel"
127
 
128
+ #: easy-table.php:423
129
  msgid "Table width, in pixel or percent (may be overriden by CSS)"
130
+ msgstr "Lebar tabel, dalam pixel atau persen (kemungkinan ditimpa oleh CSS)"
131
 
132
+ #: easy-table.php:427
133
  msgid "Table align"
134
  msgstr "Perataan tabel"
135
 
136
+ #: easy-table.php:429
137
  msgid "Table align, left/right/center (may be overriden by CSS)"
138
+ msgstr "Perataan tabel, left/right/center (kemungkinan ditimpa oleh CSS)"
139
 
140
+ #: easy-table.php:433
141
  msgid "Table border"
142
  msgstr "Garis tabel"
143
 
144
+ #: easy-table.php:435
145
  msgid "Table border (may be overriden by CSS)"
146
+ msgstr "Garis tabel (kemungkinan ditimpa oleh CSS)"
147
 
148
+ #: easy-table.php:440
149
  msgid "Table options"
150
  msgstr "Pengaturan tabel"
151
 
152
+ #: easy-table.php:445
153
  msgid "Parser Option"
154
  msgstr "Pengaturan parser"
155
 
156
+ #: easy-table.php:446
157
  msgid "Do not change this unless you know what you're doing"
158
+ msgstr "Jangan ganti bagian ini kecuali Anda mengetahuinya"
159
 
160
+ #: easy-table.php:452
161
  msgid "Delimiter"
162
  msgstr "Pemisah"
163
 
164
+ #: easy-table.php:455
165
  msgid "CSV delimiter (default is comma)"
166
  msgstr ""
167
 
168
+ #: easy-table.php:458
169
  msgid "Enclosure"
170
  msgstr ""
171
 
172
+ #: easy-table.php:461
173
  msgid "CSV enclosure (default is double quote)"
174
  msgstr ""
175
 
176
+ #: easy-table.php:464
177
  msgid "Escape"
178
  msgstr ""
179
 
180
+ #: easy-table.php:467
181
  msgid "CSV escape (default is backslash)"
182
  msgstr ""
183
 
184
+ #: easy-table.php:470
185
  msgid "Allow read CSV from file?"
186
+ msgstr "Bolehkan membaca CSV dari file?"
187
 
188
+ #: easy-table.php:473
189
  msgid "Check this if you also want to convert CSV file to table"
190
+ msgstr "Ceklist ini jika Anda juga ingin merubah file CSV ke tabel"
191
 
192
+ #: easy-table.php:481
193
  msgid "Save"
194
  msgstr "Simpan"
195
 
196
+ #: easy-table.php:500
197
  msgid "Possible parameter"
198
+ msgstr "Parameter yang dimungkinkan"
199
 
200
+ #: easy-table.php:501
201
  msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
202
+ msgstr "Parameter berikut ini secara umum dapat menggantikan setingan global yang ada di sebelah kiri halaman ini. Contoh penggunaan:"
203
+
204
+ #: easy-table.php:503
205
+ #: easy-table.php:504
206
+ #: easy-table.php:505
207
+ #: easy-table.php:506
208
+ #: easy-table.php:507
209
+ #: easy-table.php:508
210
+ #: easy-table.php:509
211
+ #: easy-table.php:510
212
+ #: easy-table.php:511
213
+ #: easy-table.php:512
214
  msgid "default value"
215
+ msgstr "nilai bawaan"
216
 
217
+ #: easy-table.php:503
218
  msgid "another value"
219
+ msgstr "nilai lainnya"
220
 
221
+ #: easy-table.php:514
222
  msgid "Test area:"
223
+ msgstr "Area test:"
224
 
225
+ #: easy-table.php:519
226
  msgid "Reset"
227
+ msgstr "Reset"
228
 
229
+ #: easy-table.php:520
230
  msgid "Update preview"
231
+ msgstr "Perbaharui pratinjau"
232
 
233
+ #: easy-table.php:522
234
  msgid "Preview"
235
+ msgstr "Pratinjau"
236
 
237
+ #: easy-table.php:528
238
  msgid "Any question or suggestion? Click here!"
239
+ msgstr "Ada pertanyaan atau saran? Klik disini!"
240
+
241
+ #: easy-table.php:529
242
+ msgid "Credit"
243
+ msgstr "Kredit"
244
+
245
+ #: easy-table.php:531
246
+ msgid "Tablesorter by"
247
+ msgstr "Tablesorter oleh"
248
+
249
+ #: easy-table.php:532
250
+ msgid "CSS by"
251
+ msgstr "CSS oleh"
252
 
253
  #~ msgid "Use CSS bootstrap?"
254
  #~ msgstr "Gunakan CSS bootstrap?"
languages/english.mo CHANGED
Binary file
languages/english.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: easy-table 0.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-21 02:59+0700\n"
6
- "PO-Revision-Date: 2012-05-21 02:59+0700\n"
7
  "Last-Translator: takien <contact@takien.com>\n"
8
  "Language-Team: takien.com <contact@takien.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -16,200 +16,237 @@ msgstr ""
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
- #: easy-table.php:275
20
  msgid "Settings"
21
  msgstr ""
22
 
23
- #: easy-table.php:287
24
  msgid "Instruction"
25
  msgstr ""
26
 
27
- #: easy-table.php:288
28
  msgid "Once plugin installed, go to plugin options page to configure some options"
29
  msgstr ""
30
 
31
- #: easy-table.php:289
32
  msgid "You are ready to write a table in post or page."
33
  msgstr ""
34
 
35
- #: easy-table.php:290
36
  msgid "To be able write table in widget you have to check <em>Enable render table in widget</em> option in the option page."
37
  msgstr ""
38
 
39
- #: easy-table.php:308
40
  #, php-format
41
  msgid "%s Option"
42
  msgstr ""
43
 
44
- #: easy-table.php:316
45
  msgid "Show/hide description"
46
  msgstr ""
47
 
48
- #: easy-table.php:317
49
  msgid "General options"
50
  msgstr ""
51
 
52
- #: easy-table.php:322
53
  msgid "Short code tag"
54
  msgstr ""
55
 
56
- #: easy-table.php:324
57
  msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
58
  msgstr ""
59
 
60
- #: easy-table.php:329
61
  msgid "Also render table in widget?"
62
  msgstr ""
63
 
64
- #: easy-table.php:331
65
  msgid "Check this if you want the table could be rendered in widget."
66
  msgstr ""
67
 
68
- #: easy-table.php:340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  msgid "Use tablesorter?"
70
  msgstr ""
71
 
72
- #: easy-table.php:343
73
  msgid "Check this to use tablesorter jQuery plugin"
74
  msgstr ""
75
 
76
- #: easy-table.php:347
77
  msgid "Use TH for the first row?"
78
  msgstr ""
79
 
80
- #: easy-table.php:350
81
  msgid "Check this if you want to use first row as table head (required by tablesorter)"
82
  msgstr ""
83
 
84
- #: easy-table.php:354
85
  msgid "Load CSS?"
86
  msgstr ""
87
 
88
- #: easy-table.php:357
89
  msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
90
  msgstr ""
91
 
92
- #: easy-table.php:361
93
  msgid "Table class"
94
  msgstr ""
95
 
96
- #: easy-table.php:363
97
  msgid "Table class attribute, if you use bootstrap CSS, you should add at least \"table\" class."
98
  msgstr ""
99
 
100
- #: easy-table.php:367
101
  msgid "Table width"
102
  msgstr ""
103
 
104
- #: easy-table.php:369
105
  msgid "Table width, in pixel or percent (may be overriden by CSS)"
106
  msgstr ""
107
 
108
- #: easy-table.php:373
109
  msgid "Table align"
110
  msgstr ""
111
 
112
- #: easy-table.php:375
113
  msgid "Table align, left/right/center (may be overriden by CSS)"
114
  msgstr ""
115
 
116
- #: easy-table.php:379
117
  msgid "Table border"
118
  msgstr ""
119
 
120
- #: easy-table.php:381
121
  msgid "Table border (may be overriden by CSS)"
122
  msgstr ""
123
 
124
- #: easy-table.php:386
125
  msgid "Table options"
126
  msgstr ""
127
 
128
- #: easy-table.php:391
129
  msgid "Parser Option"
130
  msgstr ""
131
 
132
- #: easy-table.php:392
133
  msgid "Do not change this unless you know what you're doing"
134
  msgstr ""
135
 
136
- #: easy-table.php:398
137
  msgid "Delimiter"
138
  msgstr ""
139
 
140
- #: easy-table.php:401
141
  msgid "CSV delimiter (default is comma)"
142
  msgstr ""
143
 
144
- #: easy-table.php:404
145
  msgid "Enclosure"
146
  msgstr ""
147
 
148
- #: easy-table.php:407
149
  msgid "CSV enclosure (default is double quote)"
150
  msgstr ""
151
 
152
- #: easy-table.php:410
153
  msgid "Escape"
154
  msgstr ""
155
 
156
- #: easy-table.php:413
157
  msgid "CSV escape (default is backslash)"
158
  msgstr ""
159
 
160
- #: easy-table.php:416
161
  msgid "Allow read CSV from file?"
162
  msgstr ""
163
 
164
- #: easy-table.php:419
165
  msgid "Check this if you also want to convert CSV file to table"
166
  msgstr ""
167
 
168
- #: easy-table.php:427
169
  msgid "Save"
170
  msgstr ""
171
 
172
- #: easy-table.php:446
173
  msgid "Possible parameter"
174
  msgstr ""
175
 
176
- #: easy-table.php:447
177
  msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
178
  msgstr ""
179
 
180
- #: easy-table.php:449
181
- #: easy-table.php:450
182
- #: easy-table.php:451
183
- #: easy-table.php:452
184
- #: easy-table.php:453
185
- #: easy-table.php:454
186
- #: easy-table.php:455
187
- #: easy-table.php:456
188
- #: easy-table.php:457
 
189
  msgid "default value"
190
  msgstr ""
191
 
192
- #: easy-table.php:449
193
  msgid "another value"
194
  msgstr ""
195
 
196
- #: easy-table.php:459
197
  msgid "Test area:"
198
  msgstr ""
199
 
200
- #: easy-table.php:464
201
  msgid "Reset"
202
  msgstr ""
203
 
204
- #: easy-table.php:465
205
  msgid "Update preview"
206
  msgstr ""
207
 
208
- #: easy-table.php:467
209
  msgid "Preview"
210
  msgstr ""
211
 
212
- #: easy-table.php:473
213
  msgid "Any question or suggestion? Click here!"
214
  msgstr ""
215
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: easy-table 0.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-05-25 01:07+0700\n"
6
+ "PO-Revision-Date: 2012-05-25 01:07+0700\n"
7
  "Last-Translator: takien <contact@takien.com>\n"
8
  "Language-Team: takien.com <contact@takien.com>\n"
9
  "MIME-Version: 1.0\n"
16
  "X-Poedit-SourceCharset: utf-8\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
+ #: easy-table.php:298
20
  msgid "Settings"
21
  msgstr ""
22
 
23
+ #: easy-table.php:310
24
  msgid "Instruction"
25
  msgstr ""
26
 
27
+ #: easy-table.php:311
28
  msgid "Once plugin installed, go to plugin options page to configure some options"
29
  msgstr ""
30
 
31
+ #: easy-table.php:312
32
  msgid "You are ready to write a table in post or page."
33
  msgstr ""
34
 
35
+ #: easy-table.php:313
36
  msgid "To be able write table in widget you have to check <em>Enable render table in widget</em> option in the option page."
37
  msgstr ""
38
 
39
+ #: easy-table.php:331
40
  #, php-format
41
  msgid "%s Option"
42
  msgstr ""
43
 
44
+ #: easy-table.php:339
45
  msgid "Show/hide description"
46
  msgstr ""
47
 
48
+ #: easy-table.php:340
49
  msgid "General options"
50
  msgstr ""
51
 
52
+ #: easy-table.php:345
53
  msgid "Short code tag"
54
  msgstr ""
55
 
56
+ #: easy-table.php:347
57
  msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
58
  msgstr ""
59
 
60
+ #: easy-table.php:352
61
  msgid "Also render table in widget?"
62
  msgstr ""
63
 
64
+ #: easy-table.php:354
65
  msgid "Check this if you want the table could be rendered in widget."
66
  msgstr ""
67
 
68
+ #: easy-table.php:359
69
+ msgid "Only load JS/CSS when in this condition"
70
+ msgstr ""
71
+
72
+ #: easy-table.php:360
73
+ msgid "Please check in where JavaScript and CSS should be loaded"
74
+ msgstr ""
75
+
76
+ #: easy-table.php:364
77
+ msgid "Single"
78
+ msgstr ""
79
+
80
+ #: easy-table.php:370
81
+ msgid "Page"
82
+ msgstr ""
83
+
84
+ #: easy-table.php:376
85
+ msgid "Front page"
86
+ msgstr ""
87
+
88
+ #: easy-table.php:382
89
+ msgid "Archive page"
90
+ msgstr ""
91
+
92
+ #: easy-table.php:394
93
  msgid "Use tablesorter?"
94
  msgstr ""
95
 
96
+ #: easy-table.php:397
97
  msgid "Check this to use tablesorter jQuery plugin"
98
  msgstr ""
99
 
100
+ #: easy-table.php:401
101
  msgid "Use TH for the first row?"
102
  msgstr ""
103
 
104
+ #: easy-table.php:404
105
  msgid "Check this if you want to use first row as table head (required by tablesorter)"
106
  msgstr ""
107
 
108
+ #: easy-table.php:408
109
  msgid "Load CSS?"
110
  msgstr ""
111
 
112
+ #: easy-table.php:411
113
  msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
114
  msgstr ""
115
 
116
+ #: easy-table.php:415
117
  msgid "Table class"
118
  msgstr ""
119
 
120
+ #: easy-table.php:417
121
  msgid "Table class attribute, if you use bootstrap CSS, you should add at least \"table\" class."
122
  msgstr ""
123
 
124
+ #: easy-table.php:421
125
  msgid "Table width"
126
  msgstr ""
127
 
128
+ #: easy-table.php:423
129
  msgid "Table width, in pixel or percent (may be overriden by CSS)"
130
  msgstr ""
131
 
132
+ #: easy-table.php:427
133
  msgid "Table align"
134
  msgstr ""
135
 
136
+ #: easy-table.php:429
137
  msgid "Table align, left/right/center (may be overriden by CSS)"
138
  msgstr ""
139
 
140
+ #: easy-table.php:433
141
  msgid "Table border"
142
  msgstr ""
143
 
144
+ #: easy-table.php:435
145
  msgid "Table border (may be overriden by CSS)"
146
  msgstr ""
147
 
148
+ #: easy-table.php:440
149
  msgid "Table options"
150
  msgstr ""
151
 
152
+ #: easy-table.php:445
153
  msgid "Parser Option"
154
  msgstr ""
155
 
156
+ #: easy-table.php:446
157
  msgid "Do not change this unless you know what you're doing"
158
  msgstr ""
159
 
160
+ #: easy-table.php:452
161
  msgid "Delimiter"
162
  msgstr ""
163
 
164
+ #: easy-table.php:455
165
  msgid "CSV delimiter (default is comma)"
166
  msgstr ""
167
 
168
+ #: easy-table.php:458
169
  msgid "Enclosure"
170
  msgstr ""
171
 
172
+ #: easy-table.php:461
173
  msgid "CSV enclosure (default is double quote)"
174
  msgstr ""
175
 
176
+ #: easy-table.php:464
177
  msgid "Escape"
178
  msgstr ""
179
 
180
+ #: easy-table.php:467
181
  msgid "CSV escape (default is backslash)"
182
  msgstr ""
183
 
184
+ #: easy-table.php:470
185
  msgid "Allow read CSV from file?"
186
  msgstr ""
187
 
188
+ #: easy-table.php:473
189
  msgid "Check this if you also want to convert CSV file to table"
190
  msgstr ""
191
 
192
+ #: easy-table.php:481
193
  msgid "Save"
194
  msgstr ""
195
 
196
+ #: easy-table.php:500
197
  msgid "Possible parameter"
198
  msgstr ""
199
 
200
+ #: easy-table.php:501
201
  msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
202
  msgstr ""
203
 
204
+ #: easy-table.php:503
205
+ #: easy-table.php:504
206
+ #: easy-table.php:505
207
+ #: easy-table.php:506
208
+ #: easy-table.php:507
209
+ #: easy-table.php:508
210
+ #: easy-table.php:509
211
+ #: easy-table.php:510
212
+ #: easy-table.php:511
213
+ #: easy-table.php:512
214
  msgid "default value"
215
  msgstr ""
216
 
217
+ #: easy-table.php:503
218
  msgid "another value"
219
  msgstr ""
220
 
221
+ #: easy-table.php:514
222
  msgid "Test area:"
223
  msgstr ""
224
 
225
+ #: easy-table.php:519
226
  msgid "Reset"
227
  msgstr ""
228
 
229
+ #: easy-table.php:520
230
  msgid "Update preview"
231
  msgstr ""
232
 
233
+ #: easy-table.php:522
234
  msgid "Preview"
235
  msgstr ""
236
 
237
+ #: easy-table.php:528
238
  msgid "Any question or suggestion? Click here!"
239
  msgstr ""
240
 
241
+ #: easy-table.php:529
242
+ msgid "Credit"
243
+ msgstr ""
244
+
245
+ #: easy-table.php:531
246
+ msgid "Tablesorter by"
247
+ msgstr ""
248
+
249
+ #: easy-table.php:532
250
+ msgid "CSS by"
251
+ msgstr ""
252
+
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Easy Table ===
2
  Contributors: takien
3
  Donate link: http://takien.com/donate
4
- Tags: table,csv,csv-to-table,post,excel,csv file,widget
5
  Requires at least: 3.0
6
  Tested up to: 3.3.2
7
- Stable tag: 0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,7 +24,7 @@ Easy Table using standard CSV format to generate table data, it's easiest way to
24
  * Fancy table design (using Twitter CSS bootstrap)
25
  * WYSIWYG safe, I mean you can switch HTML/View tab in WordPress editor without breaking the table data.
26
 
27
- Example usage:
28
 
29
  * Basic table
30
  `[table]
@@ -43,6 +43,10 @@ Year,Make,Model,Length
43
  * Table from CSV file
44
  `[table file="example.com/blog/wp-content/uploads/pricelist.csv"][/table]`
45
 
 
 
 
 
46
  == Installation ==
47
 
48
  There are many ways to install this plugin, e.g:
@@ -70,6 +74,12 @@ No
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
 
73
  = 0.2 =
74
  * Fixed: Backward compatibility of str_getcsv that just not work in the version 0.1, now plugin should runs on PHP 5.2
75
  * Fixed: Table now has 'table' class even when 'tablesorter' is not enabled.
1
  === Easy Table ===
2
  Contributors: takien
3
  Donate link: http://takien.com/donate
4
+ Tags: table,csv,csv-to-table,post,excel,csv file,widget,tablesorter
5
  Requires at least: 3.0
6
  Tested up to: 3.3.2
7
+ Stable tag: 0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
24
  * Fancy table design (using Twitter CSS bootstrap)
25
  * WYSIWYG safe, I mean you can switch HTML/View tab in WordPress editor without breaking the table data.
26
 
27
+ = Example usage =
28
 
29
  * Basic table
30
  `[table]
43
  * Table from CSV file
44
  `[table file="example.com/blog/wp-content/uploads/pricelist.csv"][/table]`
45
 
46
+ = Other notes =
47
+ * Data in each cell must not have line break, otherwise it will be detected as new row.
48
+ * No option for colspan and rowspan
49
+
50
  == Installation ==
51
 
52
  There are many ways to install this plugin, e.g:
74
 
75
  == Changelog ==
76
 
77
+ = 0.3 =
78
+ * Improved: Option form now filled out with default value if there are no options saved in database and you don't need to save option to get the plugin to works.
79
+ * Added: Option to select where script and style should be loaded, eg. if only in single page.
80
+ * Added: tf parameter for tfoot, now you can set up tfoot for your table, tfoot picked up from 2nd row of the data, usage example [table tf="1"]data[/table]
81
+ * Added: Credit link to Twitter Bootstrap and tablesorter jQuery plugin.
82
+
83
  = 0.2 =
84
  * Fixed: Backward compatibility of str_getcsv that just not work in the version 0.1, now plugin should runs on PHP 5.2
85
  * Fixed: Table now has 'table' class even when 'tablesorter' is not enabled.