Version Description
- Fixed: Csvfile option
- Fixed: Broken caption in Responsive theme
- Removed: Clearfix class from the table
- Changed: Now use wp_remote_get() instead of file_get_contents();
- Changed: Method name from get_easy_table_option() to option(), not affected to the usability
- Changed: .header class for thead changed to .easy-table-header to minimize conflict possibility with other CSS.
- Changed: path to jquery.tablesorter to /js and combined with jquery metadata
- Added: jquery.metadata.js to set additional sorting option
- Added: themes selector
- Added: css/easy-table.css for general basic styling
- Added: New sort parameter on table eg. [table sort="desc,asc"]
- Added: New sort attr on cell for default sorting, attr sort="desc", attr sort="desc", attr sort="false"
- Added: htaccess file to prevent directory listing on plugin path.
- Added: Compatibility with WordPress 3.4.1
- Improved: CSS for arrow up/down, arrow now only visible on mouseover or if column is sorted.
Download this release
Release Info
Developer | takien |
Plugin | Easy Table |
Version | 0.8 |
Comparing to | |
See all releases |
Code changes from version 0.7 to 0.8
- .htaccess +1 -0
- css/admin-style.css +51 -0
- css/easy-table.css +16 -0
- css/index.html +0 -0
- easy-table.php +284 -138
- jquery.tablesorter.min.js → js/easy-table-script.js +17 -1
- js/index.html +0 -0
- languages/easy-table-id_ID.mo +0 -0
- languages/easy-table-id_ID.po +178 -114
- languages/english.mo +0 -0
- languages/english.po +148 -100
- readme.txt +66 -2
- themes/cuscosky/style.css +63 -0
- easy-table-style.css → themes/default/style.css +21 -23
- themes/index.html +0 -0
.htaccess
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
Options -Indexes
|
css/admin-style.css
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* always include base css to get basic styling for header etc.
|
3 |
+
*/
|
4 |
+
@import url(easy-table.css);
|
5 |
+
|
6 |
+
.left,
|
7 |
+
.right{
|
8 |
+
float:left;
|
9 |
+
width:49%
|
10 |
+
}
|
11 |
+
.toggledesc{
|
12 |
+
float:right;
|
13 |
+
margin-right:20px;
|
14 |
+
}
|
15 |
+
.action-button{
|
16 |
+
margin-bottom:20px
|
17 |
+
}
|
18 |
+
.action-button a{
|
19 |
+
padding:10px;
|
20 |
+
border:1px solid #cccccc;
|
21 |
+
-webkit-border-radius: 5px;
|
22 |
+
-moz-border-radius: 5px;
|
23 |
+
border-radius: 5px;
|
24 |
+
color:#fff;
|
25 |
+
font-weight:bold;
|
26 |
+
font-size:1.3em;
|
27 |
+
display: inline-block;
|
28 |
+
text-shadow: 0 -1px 1px rgba(19,65,88,.8);
|
29 |
+
text-decoration:none;
|
30 |
+
}
|
31 |
+
.action-button a.green{
|
32 |
+
background:#48b826;
|
33 |
+
border-color:#1d7003;
|
34 |
+
background: #b4e391;
|
35 |
+
background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%);
|
36 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391));
|
37 |
+
background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
38 |
+
background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
39 |
+
background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
40 |
+
background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
41 |
+
}
|
42 |
+
.action-button a.red{
|
43 |
+
background: #f85032;
|
44 |
+
background: -moz-linear-gradient(top, #f85032 0%, #f16f5c 35%, #f02f17 71%, #e73827 100%);
|
45 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f85032), color-stop(35%,#f16f5c), color-stop(71%,#f02f17), color-stop(100%,#e73827));
|
46 |
+
background: -webkit-linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
47 |
+
background: -o-linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
48 |
+
background: -ms-linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
49 |
+
background: linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
50 |
+
border-color:#cf3100;
|
51 |
+
}
|
css/easy-table.css
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
table.tablesorter thead tr .easy-table-header {
|
2 |
+
cursor: pointer;
|
3 |
+
background-repeat: no-repeat;
|
4 |
+
background-position: center right;
|
5 |
+
}
|
6 |
+
table.tablesorter thead tr .easy-table-header:hover{
|
7 |
+
background-image: url(../images/bg.gif);
|
8 |
+
}
|
9 |
+
table.tablesorter thead tr .headerSortUp,
|
10 |
+
table.tablesorter thead tr .headerSortDown:hover{
|
11 |
+
background-image: url(../images/asc.gif);
|
12 |
+
}
|
13 |
+
table.tablesorter thead tr .headerSortDown,
|
14 |
+
table.tablesorter thead tr .headerSortUp:hover {
|
15 |
+
background-image: url(../images/desc.gif);
|
16 |
+
}
|
css/index.html
ADDED
File without changes
|
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.
|
8 |
Author URI: http://takien.com/
|
9 |
*/
|
10 |
|
@@ -39,7 +39,7 @@ var $settings = Array(
|
|
39 |
'attrtag' => 'attr',
|
40 |
'tablewidget' => false,
|
41 |
'scriptloadin' => Array('is_single','is_page'),
|
42 |
-
'class' => '
|
43 |
'caption' => false,
|
44 |
'width' => '100%',
|
45 |
'align' => 'left',
|
@@ -74,9 +74,9 @@ function __construct(){
|
|
74 |
add_action('wp_enqueue_scripts', array(&$this,'easy_table_style'));
|
75 |
add_action('admin_menu', array(&$this,'easy_table_add_page'));
|
76 |
add_action('contextual_help', array(&$this,'easy_table_help'));
|
77 |
-
add_shortcode($this->
|
78 |
-
add_shortcode($this->
|
79 |
-
if($this->
|
80 |
add_filter('widget_text', 'do_shortcode');
|
81 |
}
|
82 |
}
|
@@ -84,7 +84,7 @@ function __construct(){
|
|
84 |
private function easy_table_base($return){
|
85 |
$easy_table_base = Array(
|
86 |
'name' => 'Easy Table',
|
87 |
-
'version' => '0.
|
88 |
'plugin-domain' => 'easy-table'
|
89 |
);
|
90 |
return $easy_table_base[$return];
|
@@ -92,20 +92,21 @@ private function easy_table_base($return){
|
|
92 |
|
93 |
function easy_table_short_code($atts, $content="") {
|
94 |
$shortcode_atts = shortcode_atts(array(
|
95 |
-
'class' => $this->
|
96 |
-
'caption' => $this->
|
97 |
-
'width' => $this->
|
98 |
-
'align' => $this->
|
99 |
-
'th' => $this->
|
100 |
-
'tf' => $this->
|
101 |
-
'border' => $this->
|
102 |
-
'id' => $this->
|
103 |
-
'theme' => $this->
|
104 |
-
'tablesorter' => $this->
|
105 |
-
'delimiter' => $this->
|
106 |
-
'enclosure' => $this->
|
107 |
-
'escape' => $this->
|
108 |
-
'file' => $this->
|
|
|
109 |
), $atts);
|
110 |
/**
|
111 |
* because clean_pre is deprecated since WordPress 3.4, then replace it manually
|
@@ -139,20 +140,37 @@ function easy_table_short_code_attr($atts){
|
|
139 |
*/
|
140 |
private function csv_to_table($data,$args){
|
141 |
extract($args);
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
}
|
146 |
-
/**
|
147 |
-
* @todo check if $file url has special character that need to be urlencoded.
|
148 |
-
*/
|
149 |
|
150 |
if(empty($data)) return false;
|
151 |
if(!is_array($data)){
|
152 |
$data = $this->csv_to_array(trim($data), $delimiter, $enclosure, $escape);
|
153 |
}
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
/**
|
157 |
* tfoot position
|
158 |
* @since 0.4
|
@@ -165,39 +183,91 @@ private function csv_to_table($data,$args){
|
|
165 |
} else {
|
166 |
$width = (int)$width.'px';
|
167 |
}
|
168 |
-
$output = '<table '.($id ? 'id="'.$id.'"':'').' style="width:'.$width.';'.(($align=='center') ? 'margin-left:auto;margin-right:auto' : '').'" width="'
|
|
|
169 |
$output .= $caption ? '<caption>'.$caption.'</caption>'."\n" : '';
|
170 |
$output .= $th ? '<thead>' : (($tf !== 'last') ? '' : '<tbody>');
|
171 |
$output .= (!$th AND !$tf) ? '<tbody>':'';
|
172 |
|
173 |
-
foreach($data as $k=>$cols){ $
|
174 |
//$cols = array_pad($cols,$max_cols,'');
|
175 |
|
176 |
-
$output .= (($
|
177 |
$output .= "\r\n".'<tr>';
|
178 |
|
179 |
-
$thtd = ((($
|
180 |
-
foreach($cols as $col){
|
181 |
/**
|
182 |
* Add attribute for each cell
|
183 |
* @since 0.5
|
184 |
*/
|
185 |
-
|
186 |
$attr = isset($matchattr[1]) ? $matchattr[1] : '';
|
187 |
/**
|
188 |
-
*
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
$output .= "<$thtd $attr>".do_shortcode($col)."</$thtd>\n";
|
193 |
}
|
194 |
|
195 |
$output .= '</tr>'."\n";
|
196 |
-
$output .= (($
|
197 |
-
$output .= (($
|
198 |
|
199 |
}
|
200 |
$output .= (($tf!=='last')?'</tbody>':'').'</table>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
return $output;
|
202 |
}
|
203 |
|
@@ -218,7 +288,7 @@ return $r;
|
|
218 |
/**
|
219 |
* Retrieve options from database if any, or use default options instead.
|
220 |
*/
|
221 |
-
function
|
222 |
$option = get_option('easy_table_plugin_option') ? get_option('easy_table_plugin_option') : Array();
|
223 |
$option = array_merge($this->settings,$option);
|
224 |
if($key){
|
@@ -231,6 +301,36 @@ function get_easy_table_option($key=''){
|
|
231 |
|
232 |
}
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
/**
|
235 |
* Register plugin setting
|
236 |
*/
|
@@ -263,6 +363,16 @@ function render_form($fields){
|
|
263 |
}
|
264 |
$output .= ' <span class="description">'.$field['description'].'</span></td></tr>';
|
265 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
$output .= '</table>';
|
268 |
return $output;
|
@@ -272,14 +382,14 @@ function render_form($fields){
|
|
272 |
* Register javascript
|
273 |
*/
|
274 |
function easy_table_script() {
|
275 |
-
if( is_single() AND in_array('is_single',$this->
|
276 |
-
is_page() AND in_array('is_page',$this->
|
277 |
-
is_home() AND in_array('is_home',$this->
|
278 |
-
is_archive() AND in_array('is_archive',$this->
|
279 |
{
|
280 |
-
if($this->
|
281 |
wp_enqueue_script('jquery');
|
282 |
-
wp_register_script('easy_table_script',plugins_url( '
|
283 |
wp_enqueue_script('easy_table_script');
|
284 |
}
|
285 |
}
|
@@ -289,13 +399,14 @@ function easy_table_script() {
|
|
289 |
* Register stylesheet
|
290 |
*/
|
291 |
function easy_table_style() {
|
292 |
-
if( is_single() AND in_array('is_single',$this->
|
293 |
-
is_page() AND in_array('is_page',$this->
|
294 |
-
is_home() AND in_array('is_home',$this->
|
295 |
-
is_archive() AND in_array('is_archive',$this->
|
296 |
{
|
297 |
-
if($this->
|
298 |
-
wp_register_style('easy_table_style', plugins_url('
|
|
|
299 |
wp_enqueue_style( 'easy_table_style');
|
300 |
}
|
301 |
}
|
@@ -304,60 +415,13 @@ function easy_table_style() {
|
|
304 |
function easy_table_admin_script(){
|
305 |
$page = isset($_GET['page']) ? $_GET['page'] : '';
|
306 |
if($page == $this->easy_table_base('plugin-domain')) {
|
307 |
-
if($this->
|
308 |
-
<script src="<?php echo plugins_url( '
|
309 |
<?php }
|
310 |
-
if($this->
|
311 |
-
<link rel="stylesheet" href="<?php echo plugins_url('
|
312 |
<?php } ?>
|
313 |
-
<
|
314 |
-
.left,
|
315 |
-
.right{
|
316 |
-
float:left;
|
317 |
-
width:49%
|
318 |
-
}
|
319 |
-
.toggledesc{
|
320 |
-
float:right;
|
321 |
-
margin-right:20px;
|
322 |
-
}
|
323 |
-
.action-button{
|
324 |
-
margin-bottom:20px
|
325 |
-
}
|
326 |
-
.action-button a{
|
327 |
-
padding:10px;
|
328 |
-
border:1px solid #cccccc;
|
329 |
-
-webkit-border-radius: 5px;
|
330 |
-
-moz-border-radius: 5px;
|
331 |
-
border-radius: 5px;
|
332 |
-
color:#fff;
|
333 |
-
font-weight:bold;
|
334 |
-
font-size:1.3em;
|
335 |
-
display: inline-block;
|
336 |
-
text-shadow: 0 -1px 1px rgba(19,65,88,.8);
|
337 |
-
text-decoration:none;
|
338 |
-
}
|
339 |
-
.action-button a.green{
|
340 |
-
background:#48b826;
|
341 |
-
border-color:#1d7003;
|
342 |
-
background: #b4e391;
|
343 |
-
background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%);
|
344 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391));
|
345 |
-
background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
346 |
-
background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
347 |
-
background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
348 |
-
background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
|
349 |
-
}
|
350 |
-
.action-button a.red{
|
351 |
-
background: #f85032;
|
352 |
-
background: -moz-linear-gradient(top, #f85032 0%, #f16f5c 35%, #f02f17 71%, #e73827 100%);
|
353 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f85032), color-stop(35%,#f16f5c), color-stop(71%,#f02f17), color-stop(100%,#e73827));
|
354 |
-
background: -webkit-linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
355 |
-
background: -o-linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
356 |
-
background: -ms-linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
357 |
-
background: linear-gradient(top, #f85032 0%,#f16f5c 35%,#f02f17 71%,#e73827 100%);
|
358 |
-
border-color:#cf3100;
|
359 |
-
}
|
360 |
-
</style>
|
361 |
<script type="text/javascript">
|
362 |
//<![CDATA[
|
363 |
jQuery(document).ready(function($){
|
@@ -394,7 +458,6 @@ function easy_table_help($help) {
|
|
394 |
<ol><li>'.__('Once plugin installed, go to plugin options page to configure some options','easy-table').'</li>';
|
395 |
$help .= '<li>'.__('You are ready to write a table in post or page.','easy-table').'</li>';
|
396 |
$help .= '<li>'.__('To be able write table in widget you have to check <em>Enable render table in widget</em> option in the option page.','easy-table').'</li></ol>';
|
397 |
-
|
398 |
return $help;
|
399 |
}
|
400 |
}
|
@@ -434,7 +497,7 @@ settings_fields('easy_table_option_field');
|
|
434 |
'label' => __('Short code tag','easy-table'),
|
435 |
'type' => 'text',
|
436 |
'description' => __('Shortcode tag, type "table" if you want to use [table] short tag.','easy-table'),
|
437 |
-
'value' => $this->
|
438 |
)
|
439 |
,
|
440 |
Array(
|
@@ -442,7 +505,7 @@ settings_fields('easy_table_option_field');
|
|
442 |
'label' => __('Cell attribute tag','easy-table'),
|
443 |
'type' => 'text',
|
444 |
'description' => __('Cell attribute tag, default is attr.','easy-table'),
|
445 |
-
'value' => $this->
|
446 |
)
|
447 |
,Array(
|
448 |
'name' => 'easy_table_plugin_option[tablewidget]',
|
@@ -450,7 +513,7 @@ settings_fields('easy_table_option_field');
|
|
450 |
'type' => 'checkbox',
|
451 |
'description' => __('Check this if you want the table could be rendered in widget.','easy-table'),
|
452 |
'value' => 1,
|
453 |
-
'attr' => $this->
|
454 |
,Array(
|
455 |
'type' => 'checkboxgroup',
|
456 |
'grouplabel' => __('Only load JS/CSS when in this condition','easy-table'),
|
@@ -460,25 +523,25 @@ settings_fields('easy_table_option_field');
|
|
460 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
461 |
'label' => __('Single','easy-table'),
|
462 |
'value' => 'is_single',
|
463 |
-
'attr' => in_array('is_single',$this->
|
464 |
),
|
465 |
Array(
|
466 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
467 |
'label' => __('Page','easy-table'),
|
468 |
'value' => 'is_page',
|
469 |
-
'attr' => in_array('is_page',$this->
|
470 |
),
|
471 |
Array(
|
472 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
473 |
'label' => __('Front page','easy-table'),
|
474 |
'value' => 'is_home',
|
475 |
-
'attr' => in_array('is_home',$this->
|
476 |
),
|
477 |
Array(
|
478 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
479 |
'label' => __('Archive page','easy-table'),
|
480 |
'value' => 'is_archive',
|
481 |
-
'attr' => in_array('is_archive',$this->
|
482 |
)
|
483 |
)
|
484 |
)
|
@@ -492,45 +555,45 @@ settings_fields('easy_table_option_field');
|
|
492 |
'type' => 'checkbox',
|
493 |
'value' => 1,
|
494 |
'description' => __('Check this to use tablesorter jQuery plugin','easy-table'),
|
495 |
-
'attr' => $this->
|
496 |
,Array(
|
497 |
'name' => 'easy_table_plugin_option[th]',
|
498 |
'label' => __('Use TH for the first row?','easy-table'),
|
499 |
'type' => 'checkbox',
|
500 |
'value' => 1,
|
501 |
'description' => __('Check this if you want to use first row as table head (required by tablesorter)','easy-table'),
|
502 |
-
'attr' => $this->
|
503 |
,Array(
|
504 |
'name' => 'easy_table_plugin_option[loadcss]',
|
505 |
'label' => __('Load CSS?','easy-table'),
|
506 |
'type' => 'checkbox',
|
507 |
'value' => 1,
|
508 |
'description' => __('Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style.','easy-table'),
|
509 |
-
'attr' => $this->
|
510 |
,Array(
|
511 |
'name' => 'easy_table_plugin_option[class]',
|
512 |
'label' => __('Table class','easy-table'),
|
513 |
'type' => 'text',
|
514 |
-
'description' => __('
|
515 |
-
'value' => $this->
|
516 |
,Array(
|
517 |
'name' => 'easy_table_plugin_option[width]',
|
518 |
'label' => __('Table width','easy-table'),
|
519 |
'type' => 'text',
|
520 |
'description' => __('Table width, in pixel or percent (may be overriden by CSS)','easy-table'),
|
521 |
-
'value' => $this->
|
522 |
,Array(
|
523 |
'name' => 'easy_table_plugin_option[align]',
|
524 |
'label' => __('Table align','easy-table'),
|
525 |
'type' => 'text',
|
526 |
'description' => __('Table align, left/right/center (may be overriden by CSS)','easy-table'),
|
527 |
-
'value' => $this->
|
528 |
,Array(
|
529 |
'name' =>'easy_table_plugin_option[border]',
|
530 |
'label' => __('Table border','easy-table'),
|
531 |
'type' => 'text',
|
532 |
'description' => __('Table border (may be overriden by CSS)','easy-table'),
|
533 |
-
'value' => $this->
|
534 |
);
|
535 |
?>
|
536 |
|
@@ -538,7 +601,21 @@ settings_fields('easy_table_option_field');
|
|
538 |
<?php
|
539 |
echo $this->render_form($fields);
|
540 |
?>
|
541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
<h3><?php _e('Parser Option','easy-table');?></h3>
|
543 |
<p><em><?php _e('Do not change this unless you know what you\'re doing','easy-table');?></em>
|
544 |
</p>
|
@@ -548,19 +625,19 @@ settings_fields('easy_table_option_field');
|
|
548 |
'name' => 'easy_table_plugin_option[delimiter]',
|
549 |
'label' => __('Delimiter','easy-table'),
|
550 |
'type' => 'text',
|
551 |
-
'value' => $this->
|
552 |
'description' => __('CSV delimiter (default is comma)','easy-table'))
|
553 |
,Array(
|
554 |
'name' => 'easy_table_plugin_option[enclosure]',
|
555 |
'label' => __('Enclosure','easy-table'),
|
556 |
'type' => 'text',
|
557 |
-
'value' => htmlentities($this->
|
558 |
'description' => __('CSV enclosure (default is double quote)','easy-table'))
|
559 |
,Array(
|
560 |
'name' => 'easy_table_plugin_option[escape]',
|
561 |
'label' => __('Escape','easy-table'),
|
562 |
'type' => 'text',
|
563 |
-
'value' => $this->
|
564 |
'description' =>__('CSV escape (default is backslash)','easy-table'))
|
565 |
,Array(
|
566 |
'name' => 'easy_table_plugin_option[csvfile]',
|
@@ -568,7 +645,7 @@ settings_fields('easy_table_option_field');
|
|
568 |
'type' => 'checkbox',
|
569 |
'value' => 1,
|
570 |
'description' => __('Check this if you also want to convert CSV file to table','easy-table'),
|
571 |
-
'attr' => $this->
|
572 |
);
|
573 |
echo $this->render_form($fields);
|
574 |
?>
|
@@ -582,7 +659,7 @@ settings_fields('easy_table_option_field');
|
|
582 |
<?php
|
583 |
$defaulttableexample = '
|
584 |
[table caption="Just test table"]
|
585 |
-
no[attr
|
586 |
1,row1col1,row1col2,row1col3
|
587 |
2,row2col1,row2col2,row2col3
|
588 |
3,row3col1[attr colspan="2"],row3col3
|
@@ -611,18 +688,52 @@ if(isset($_POST['test-easy-table-reset'])){
|
|
611 |
<li><strong>id</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
|
612 |
<li><strong>tablesorter</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
|
613 |
<li><strong>file</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
</ol>
|
615 |
<h3><?php _e('Cell attribute tag','easy-table');?></h3>
|
616 |
<ol>
|
617 |
-
|
618 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
|
620 |
<pre><code>[table]
|
621 |
-
col1,col2[attr
|
622 |
col4,col5,col6
|
623 |
[/table]
|
624 |
-
</code>
|
625 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
</li>
|
627 |
</ol>
|
628 |
|
@@ -642,8 +753,10 @@ col4,col5,col6
|
|
642 |
<div class="clear"></div>
|
643 |
|
644 |
<?php elseif($_GET['gettab'] == 'support') : ?>
|
645 |
-
<p
|
646 |
-
<p><?php _e('
|
|
|
|
|
647 |
<div id="disqus_thread"></div>
|
648 |
<script type="text/javascript">
|
649 |
/* <![CDATA[ */
|
@@ -739,7 +852,7 @@ $api = plugins_api('plugin_information', array('slug' => 'easy-table' ));
|
|
739 |
<?php endif; ?>
|
740 |
</ul>
|
741 |
<?php if ( ! empty($api->rating) ) : ?>
|
742 |
-
<
|
743 |
<div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">
|
744 |
<?php if ( version_compare( $GLOBALS['wp_version'], 3.4, '<') ) { ?>
|
745 |
<div class="star star-rating" style="width: <?php echo esc_attr($api->rating) ?>px"></div>
|
@@ -755,9 +868,32 @@ $api = plugins_api('plugin_information', array('slug' => 'easy-table' ));
|
|
755 |
<?php } ?>
|
756 |
</div>
|
757 |
<small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
|
758 |
-
|
759 |
-
|
760 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
<?php endif; ?>
|
762 |
</div>
|
763 |
<?php endif; ?>
|
@@ -802,4 +938,14 @@ if (!function_exists('str_getcsv')) {
|
|
802 |
return $return;
|
803 |
}
|
804 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
}
|
4 |
Plugin URI: http://takien.com/
|
5 |
Description: Create table in post, page, or widget in easy way.
|
6 |
Author: Takien
|
7 |
+
Version: 0.8
|
8 |
Author URI: http://takien.com/
|
9 |
*/
|
10 |
|
39 |
'attrtag' => 'attr',
|
40 |
'tablewidget' => false,
|
41 |
'scriptloadin' => Array('is_single','is_page'),
|
42 |
+
'class' => '',
|
43 |
'caption' => false,
|
44 |
'width' => '100%',
|
45 |
'align' => 'left',
|
74 |
add_action('wp_enqueue_scripts', array(&$this,'easy_table_style'));
|
75 |
add_action('admin_menu', array(&$this,'easy_table_add_page'));
|
76 |
add_action('contextual_help', array(&$this,'easy_table_help'));
|
77 |
+
add_shortcode($this->option('shortcodetag'), array(&$this,'easy_table_short_code'));
|
78 |
+
add_shortcode($this->option('attrtag'), array(&$this,'easy_table_short_code_attr'));
|
79 |
+
if($this->option('tablewidget')){
|
80 |
add_filter('widget_text', 'do_shortcode');
|
81 |
}
|
82 |
}
|
84 |
private function easy_table_base($return){
|
85 |
$easy_table_base = Array(
|
86 |
'name' => 'Easy Table',
|
87 |
+
'version' => '0.8',
|
88 |
'plugin-domain' => 'easy-table'
|
89 |
);
|
90 |
return $easy_table_base[$return];
|
92 |
|
93 |
function easy_table_short_code($atts, $content="") {
|
94 |
$shortcode_atts = shortcode_atts(array(
|
95 |
+
'class' => $this->option('class'),
|
96 |
+
'caption' => $this->option('caption'),
|
97 |
+
'width' => $this->option('width'),
|
98 |
+
'align' => $this->option('align'),
|
99 |
+
'th' => $this->option('th'),
|
100 |
+
'tf' => $this->option('tf'),
|
101 |
+
'border' => $this->option('border'),
|
102 |
+
'id' => $this->option('id'),
|
103 |
+
'theme' => $this->option('theme'),
|
104 |
+
'tablesorter' => $this->option('tablesorter'),
|
105 |
+
'delimiter' => $this->option('delimiter'),
|
106 |
+
'enclosure' => $this->option('enclosure'),
|
107 |
+
'escape' => $this->option('escape'),
|
108 |
+
'file' => $this->option('file'),
|
109 |
+
'sort' => ''
|
110 |
), $atts);
|
111 |
/**
|
112 |
* because clean_pre is deprecated since WordPress 3.4, then replace it manually
|
140 |
*/
|
141 |
private function csv_to_table($data,$args){
|
142 |
extract($args);
|
143 |
+
if( $this->option('csvfile') AND $file ){
|
144 |
+
/*$data = @file_get_contents($file);*/
|
145 |
+
/** use wp_remote_get
|
146 |
+
* @since 0.8
|
147 |
+
*/
|
148 |
+
$data = '';
|
149 |
+
$response = wp_remote_get($file);
|
150 |
+
if( $response['response']['code'] == 200 ) {
|
151 |
+
$data = $response['body'];
|
152 |
+
}
|
153 |
}
|
|
|
|
|
|
|
154 |
|
155 |
if(empty($data)) return false;
|
156 |
if(!is_array($data)){
|
157 |
$data = $this->csv_to_array(trim($data), $delimiter, $enclosure, $escape);
|
158 |
}
|
159 |
+
$max_cols = count(max($data));
|
160 |
+
|
161 |
+
$r=0;
|
162 |
+
|
163 |
+
/**
|
164 |
+
* initialize inline sort,
|
165 |
+
* extract header sort if any, and equalize with max column number
|
166 |
+
* @since 0.8
|
167 |
+
*/
|
168 |
+
if( $tablesorter ) {
|
169 |
+
$inline_sort = Array();
|
170 |
+
$header_sort = explode(',',$sort);
|
171 |
+
$header_sort = array_pad($header_sort,$max_cols,NULL);
|
172 |
+
}
|
173 |
+
|
174 |
/**
|
175 |
* tfoot position
|
176 |
* @since 0.4
|
183 |
} else {
|
184 |
$width = (int)$width.'px';
|
185 |
}
|
186 |
+
$output = '<table '.($id ? 'id="'.$id.'"':'').' style="width:'.$width.';'.(($align=='center') ? 'margin-left:auto;margin-right:auto' : '').'" width="'.$width.'" align="'.$align.'" class="easy-table easy-table-'.$theme.' '.($tablesorter ? 'tablesorter __sortlist__ ':'').$class.'" '.(($border !=='0') ? 'border="'.$border.'"' : '').'>'."\n";
|
187 |
+
|
188 |
$output .= $caption ? '<caption>'.$caption.'</caption>'."\n" : '';
|
189 |
$output .= $th ? '<thead>' : (($tf !== 'last') ? '' : '<tbody>');
|
190 |
$output .= (!$th AND !$tf) ? '<tbody>':'';
|
191 |
|
192 |
+
foreach($data as $k=>$cols){ $r++;
|
193 |
//$cols = array_pad($cols,$max_cols,'');
|
194 |
|
195 |
+
$output .= (($r==$tfpos) AND $tf) ? (($tf=='last')?'</tbody>':'').'<tfoot>': '';
|
196 |
$output .= "\r\n".'<tr>';
|
197 |
|
198 |
+
$thtd = ((($r==1) AND $th) OR (($r==$tfpos) AND $tf)) ? 'th' : 'td';
|
199 |
+
foreach($cols as $c=>$col){
|
200 |
/**
|
201 |
* Add attribute for each cell
|
202 |
* @since 0.5
|
203 |
*/
|
204 |
+
preg_match('/\['.$this->option('attrtag').' ([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)/',$col,$matchattr);
|
205 |
$attr = isset($matchattr[1]) ? $matchattr[1] : '';
|
206 |
/**
|
207 |
+
* extract $attr value
|
208 |
+
* @since 0.8
|
209 |
+
* this is for inline sorting option,
|
210 |
+
* eg [attr sort="desc"],[attr sort="asc"] or [attr sort="none"]
|
211 |
+
* only affect if it's TH and $tablesorter enabled
|
212 |
+
* extract sort value and insert appropriate class value.
|
213 |
+
*/
|
214 |
+
|
215 |
+
if( ('th' == $thtd) AND $tablesorter ) {
|
216 |
+
$attrs = $attr ? shortcode_parse_atts($attr) : Array();
|
217 |
+
$attrs['sort'] = isset($attrs['sort']) ? $attrs['sort'] : $header_sort[$c];
|
218 |
+
$attrs['class'] = isset($attrs['class']) ? $attrs['class'] : '';
|
219 |
+
|
220 |
+
$inline_sort[$c] = $attrs['sort'];
|
221 |
+
|
222 |
+
$attr = '';
|
223 |
+
$sorter = in_array(strtolower($attrs['sort']),array('desc','asc')) ? '' : (!empty($attrs['sort']) ? 'false' : '');
|
224 |
+
foreach($attrs as $katr => $vatr){
|
225 |
+
if($katr == 'sort') {
|
226 |
+
}
|
227 |
+
else if(($katr == 'class')){
|
228 |
+
$attr .= "$katr='$vatr ";
|
229 |
+
$attr .= $sorter ? "{sorter: $sorter}":'';
|
230 |
+
$attr .= "' ";
|
231 |
+
}
|
232 |
+
else {
|
233 |
+
$attr .= "$katr='$vatr' ";
|
234 |
+
}
|
235 |
+
}
|
236 |
+
}
|
237 |
$output .= "<$thtd $attr>".do_shortcode($col)."</$thtd>\n";
|
238 |
}
|
239 |
|
240 |
$output .= '</tr>'."\n";
|
241 |
+
$output .= (($r==1) AND $th) ? '</thead>'."\n".'<tbody>' : '';
|
242 |
+
$output .= (($r==$tfpos) AND $tf) ? '</tfoot>'.((($tf==1) AND !$th) ? '<tbody>':''): '';
|
243 |
|
244 |
}
|
245 |
$output .= (($tf!=='last')?'</tbody>':'').'</table>';
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Build sortlist metadata and append it to the table class
|
249 |
+
* @since 0.8
|
250 |
+
* This intended to $tablesorter,
|
251 |
+
* so don't bother if $tablesorter is false/disabled
|
252 |
+
*/
|
253 |
+
|
254 |
+
|
255 |
+
if( $tablesorter ) {
|
256 |
+
$sortlist = '';
|
257 |
+
$all_sort = array_replace($header_sort,$inline_sort);
|
258 |
+
|
259 |
+
if(implode('',$all_sort)) {
|
260 |
+
$sortlist = '{sortlist: [';
|
261 |
+
foreach($all_sort as $k=>$v){
|
262 |
+
$v = (($v == 'desc') ? 1 : (($v == 'asc') ? 0 : '' ));
|
263 |
+
if($v !=='') {
|
264 |
+
$sortlist .= '['.$k.','.$v.'], ';
|
265 |
+
}
|
266 |
+
}
|
267 |
+
$sortlist .= ']}';
|
268 |
+
}
|
269 |
+
$output = str_replace('__sortlist__',$sortlist,$output);
|
270 |
+
}
|
271 |
return $output;
|
272 |
}
|
273 |
|
288 |
/**
|
289 |
* Retrieve options from database if any, or use default options instead.
|
290 |
*/
|
291 |
+
function option($key=''){
|
292 |
$option = get_option('easy_table_plugin_option') ? get_option('easy_table_plugin_option') : Array();
|
293 |
$option = array_merge($this->settings,$option);
|
294 |
if($key){
|
301 |
|
302 |
}
|
303 |
|
304 |
+
/**
|
305 |
+
* Retrieve themes directory
|
306 |
+
* @since: 0.8
|
307 |
+
*/
|
308 |
+
|
309 |
+
function themes(){
|
310 |
+
/**
|
311 |
+
* delete theme cache on setting updated.
|
312 |
+
*/
|
313 |
+
if( ( 'easy-table' == $_GET['page']) AND isset($_GET['settings-updated']) ) {
|
314 |
+
delete_transient('easy_table_themes');
|
315 |
+
}
|
316 |
+
|
317 |
+
if(!function_exists('scandir')){
|
318 |
+
return Array('default');
|
319 |
+
}
|
320 |
+
if ( false === ( $themes = get_transient( 'easy_table_themes' ) )) {
|
321 |
+
|
322 |
+
$dir = plugin_dir_path(__FILE__).'themes/';
|
323 |
+
$dirs = scandir($dir);
|
324 |
+
foreach($dirs as $d){
|
325 |
+
if( (substr($d,0,1) !=='.') AND (is_dir($dir.$d)) ) {
|
326 |
+
$themes[] = $d;
|
327 |
+
}
|
328 |
+
}
|
329 |
+
set_transient( 'easy_table_themes', $themes , 86400 );
|
330 |
+
}
|
331 |
+
return $themes;
|
332 |
+
}
|
333 |
+
|
334 |
/**
|
335 |
* Register plugin setting
|
336 |
*/
|
363 |
}
|
364 |
$output .= ' <span class="description">'.$field['description'].'</span></td></tr>';
|
365 |
}
|
366 |
+
if($field['type'] == 'select'){
|
367 |
+
$output .= '<tr><th><label>'.$field['label'].'</label></th>';
|
368 |
+
$output .= '<td>';
|
369 |
+
$output .= '<select name="'.$field['name'].'">';
|
370 |
+
foreach( (array)$field['values'] as $val=>$name ) {
|
371 |
+
$output .= '<option '.(($val==$field['value']) ? 'selected="selected"' : '' ).' value="'.$val.'">'.$name.'</option>';
|
372 |
+
}
|
373 |
+
$output .= '</select>';
|
374 |
+
$output .= ' <span class="description">'.$field['description'].'</span></td></tr>';
|
375 |
+
}
|
376 |
}
|
377 |
$output .= '</table>';
|
378 |
return $output;
|
382 |
* Register javascript
|
383 |
*/
|
384 |
function easy_table_script() {
|
385 |
+
if( is_single() AND in_array('is_single',$this->option('scriptloadin')) OR
|
386 |
+
is_page() AND in_array('is_page',$this->option('scriptloadin')) OR
|
387 |
+
is_home() AND in_array('is_home',$this->option('scriptloadin')) OR
|
388 |
+
is_archive() AND in_array('is_archive',$this->option('scriptloadin')))
|
389 |
{
|
390 |
+
if($this->option('tablesorter')) {
|
391 |
wp_enqueue_script('jquery');
|
392 |
+
wp_register_script('easy_table_script',plugins_url( 'js/easy-table-script.js' , __FILE__ ),'jquery');
|
393 |
wp_enqueue_script('easy_table_script');
|
394 |
}
|
395 |
}
|
399 |
* Register stylesheet
|
400 |
*/
|
401 |
function easy_table_style() {
|
402 |
+
if( is_single() AND in_array('is_single',$this->option('scriptloadin')) OR
|
403 |
+
is_page() AND in_array('is_page',$this->option('scriptloadin')) OR
|
404 |
+
is_home() AND in_array('is_home',$this->option('scriptloadin')) OR
|
405 |
+
is_archive() AND in_array('is_archive',$this->option('scriptloadin')))
|
406 |
{
|
407 |
+
if($this->option('loadcss')) {
|
408 |
+
//wp_register_style('easy_table_style', plugins_url('themes/aucity/style.css', __FILE__),false,$this->easy_table_base('version'));
|
409 |
+
wp_register_style('easy_table_style', plugins_url('themes/'.$this->option('theme').'/style.css', __FILE__),false,$this->easy_table_base('version'));
|
410 |
wp_enqueue_style( 'easy_table_style');
|
411 |
}
|
412 |
}
|
415 |
function easy_table_admin_script(){
|
416 |
$page = isset($_GET['page']) ? $_GET['page'] : '';
|
417 |
if($page == $this->easy_table_base('plugin-domain')) {
|
418 |
+
if($this->option('tablesorter')) { ?>
|
419 |
+
<script src="<?php echo plugins_url( 'js/easy-table-script.js' , __FILE__);?>"></script>
|
420 |
<?php }
|
421 |
+
if($this->option('loadcss')) { ?>
|
422 |
+
<link rel="stylesheet" href="<?php echo plugins_url('themes/'.$this->option('theme').'/style.css?ver='.$this->easy_table_base('version'), __FILE__);?>" />
|
423 |
<?php } ?>
|
424 |
+
<link rel="stylesheet" href="<?php echo plugins_url( 'css/admin-style.css?ver='.$this->easy_table_base('version') , __FILE__);?>" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
<script type="text/javascript">
|
426 |
//<![CDATA[
|
427 |
jQuery(document).ready(function($){
|
458 |
<ol><li>'.__('Once plugin installed, go to plugin options page to configure some options','easy-table').'</li>';
|
459 |
$help .= '<li>'.__('You are ready to write a table in post or page.','easy-table').'</li>';
|
460 |
$help .= '<li>'.__('To be able write table in widget you have to check <em>Enable render table in widget</em> option in the option page.','easy-table').'</li></ol>';
|
|
|
461 |
return $help;
|
462 |
}
|
463 |
}
|
497 |
'label' => __('Short code tag','easy-table'),
|
498 |
'type' => 'text',
|
499 |
'description' => __('Shortcode tag, type "table" if you want to use [table] short tag.','easy-table'),
|
500 |
+
'value' => $this->option('shortcodetag')
|
501 |
)
|
502 |
,
|
503 |
Array(
|
505 |
'label' => __('Cell attribute tag','easy-table'),
|
506 |
'type' => 'text',
|
507 |
'description' => __('Cell attribute tag, default is attr.','easy-table'),
|
508 |
+
'value' => $this->option('attrtag')
|
509 |
)
|
510 |
,Array(
|
511 |
'name' => 'easy_table_plugin_option[tablewidget]',
|
513 |
'type' => 'checkbox',
|
514 |
'description' => __('Check this if you want the table could be rendered in widget.','easy-table'),
|
515 |
'value' => 1,
|
516 |
+
'attr' => $this->option('tablewidget') ? 'checked="checked"' : '')
|
517 |
,Array(
|
518 |
'type' => 'checkboxgroup',
|
519 |
'grouplabel' => __('Only load JS/CSS when in this condition','easy-table'),
|
523 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
524 |
'label' => __('Single','easy-table'),
|
525 |
'value' => 'is_single',
|
526 |
+
'attr' => in_array('is_single',$this->option('scriptloadin')) ? 'checked="checked"' : ''
|
527 |
),
|
528 |
Array(
|
529 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
530 |
'label' => __('Page','easy-table'),
|
531 |
'value' => 'is_page',
|
532 |
+
'attr' => in_array('is_page',$this->option('scriptloadin')) ? 'checked="checked"' : ''
|
533 |
),
|
534 |
Array(
|
535 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
536 |
'label' => __('Front page','easy-table'),
|
537 |
'value' => 'is_home',
|
538 |
+
'attr' => in_array('is_home',$this->option('scriptloadin')) ? 'checked="checked"' : ''
|
539 |
),
|
540 |
Array(
|
541 |
'name' => 'easy_table_plugin_option[scriptloadin][]',
|
542 |
'label' => __('Archive page','easy-table'),
|
543 |
'value' => 'is_archive',
|
544 |
+
'attr' => in_array('is_archive',$this->option('scriptloadin')) ? 'checked="checked"' : ''
|
545 |
)
|
546 |
)
|
547 |
)
|
555 |
'type' => 'checkbox',
|
556 |
'value' => 1,
|
557 |
'description' => __('Check this to use tablesorter jQuery plugin','easy-table'),
|
558 |
+
'attr' => $this->option('tablesorter') ? 'checked="checked"':'')
|
559 |
,Array(
|
560 |
'name' => 'easy_table_plugin_option[th]',
|
561 |
'label' => __('Use TH for the first row?','easy-table'),
|
562 |
'type' => 'checkbox',
|
563 |
'value' => 1,
|
564 |
'description' => __('Check this if you want to use first row as table head (required by tablesorter)','easy-table'),
|
565 |
+
'attr' => $this->option('th') ? 'checked="checked"' : '')
|
566 |
,Array(
|
567 |
'name' => 'easy_table_plugin_option[loadcss]',
|
568 |
'label' => __('Load CSS?','easy-table'),
|
569 |
'type' => 'checkbox',
|
570 |
'value' => 1,
|
571 |
'description' => __('Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style.','easy-table'),
|
572 |
+
'attr' => $this->option('loadcss') ? 'checked="checked"':'')
|
573 |
,Array(
|
574 |
'name' => 'easy_table_plugin_option[class]',
|
575 |
'label' => __('Table class','easy-table'),
|
576 |
'type' => 'text',
|
577 |
+
'description' => __('Additional table class attribute.','easy-table'),
|
578 |
+
'value' => $this->option('class'))
|
579 |
,Array(
|
580 |
'name' => 'easy_table_plugin_option[width]',
|
581 |
'label' => __('Table width','easy-table'),
|
582 |
'type' => 'text',
|
583 |
'description' => __('Table width, in pixel or percent (may be overriden by CSS)','easy-table'),
|
584 |
+
'value' => $this->option('width'))
|
585 |
,Array(
|
586 |
'name' => 'easy_table_plugin_option[align]',
|
587 |
'label' => __('Table align','easy-table'),
|
588 |
'type' => 'text',
|
589 |
'description' => __('Table align, left/right/center (may be overriden by CSS)','easy-table'),
|
590 |
+
'value' => $this->option('align'))
|
591 |
,Array(
|
592 |
'name' =>'easy_table_plugin_option[border]',
|
593 |
'label' => __('Table border','easy-table'),
|
594 |
'type' => 'text',
|
595 |
'description' => __('Table border (may be overriden by CSS)','easy-table'),
|
596 |
+
'value' => $this->option('border'))
|
597 |
);
|
598 |
?>
|
599 |
|
601 |
<?php
|
602 |
echo $this->render_form($fields);
|
603 |
?>
|
604 |
+
<h3><?php _e('Theme selector','easy-table');?></h3>
|
605 |
+
<?php
|
606 |
+
$fields = Array(
|
607 |
+
Array(
|
608 |
+
'name' => 'easy_table_plugin_option[theme]',
|
609 |
+
'label' => __('Default theme','easy-table'),
|
610 |
+
'type' => 'select',
|
611 |
+
'value' => $this->option('theme'),
|
612 |
+
'values' => array_combine($this->themes(),$this->themes()),
|
613 |
+
'description' => __('Select default theme of the table','easy-table'),
|
614 |
+
'attr' => $this->option('tablesorter') ? 'checked="checked"':'')
|
615 |
+
);
|
616 |
+
echo $this->render_form($fields);
|
617 |
+
?>
|
618 |
+
|
619 |
<h3><?php _e('Parser Option','easy-table');?></h3>
|
620 |
<p><em><?php _e('Do not change this unless you know what you\'re doing','easy-table');?></em>
|
621 |
</p>
|
625 |
'name' => 'easy_table_plugin_option[delimiter]',
|
626 |
'label' => __('Delimiter','easy-table'),
|
627 |
'type' => 'text',
|
628 |
+
'value' => $this->option('delimiter'),
|
629 |
'description' => __('CSV delimiter (default is comma)','easy-table'))
|
630 |
,Array(
|
631 |
'name' => 'easy_table_plugin_option[enclosure]',
|
632 |
'label' => __('Enclosure','easy-table'),
|
633 |
'type' => 'text',
|
634 |
+
'value' => htmlentities($this->option('enclosure')),
|
635 |
'description' => __('CSV enclosure (default is double quote)','easy-table'))
|
636 |
,Array(
|
637 |
'name' => 'easy_table_plugin_option[escape]',
|
638 |
'label' => __('Escape','easy-table'),
|
639 |
'type' => 'text',
|
640 |
+
'value' => $this->option('escape'),
|
641 |
'description' =>__('CSV escape (default is backslash)','easy-table'))
|
642 |
,Array(
|
643 |
'name' => 'easy_table_plugin_option[csvfile]',
|
645 |
'type' => 'checkbox',
|
646 |
'value' => 1,
|
647 |
'description' => __('Check this if you also want to convert CSV file to table','easy-table'),
|
648 |
+
'attr' => $this->option('csvfile') ? 'checked="checked"' : '')
|
649 |
);
|
650 |
echo $this->render_form($fields);
|
651 |
?>
|
659 |
<?php
|
660 |
$defaulttableexample = '
|
661 |
[table caption="Just test table"]
|
662 |
+
no[attr style="width:20px"],head1,head2,head3
|
663 |
1,row1col1,row1col2,row1col3
|
664 |
2,row2col1,row2col2,row2col3
|
665 |
3,row3col1[attr colspan="2"],row3col3
|
688 |
<li><strong>id</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
|
689 |
<li><strong>tablesorter</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
|
690 |
<li><strong>file</strong>, <?php _e('default value','easy-table');?> <em>'false'</em></li>
|
691 |
+
<li><strong>sort</strong>, <?php _e('default value','easy-table');?> <em>''</em></li>
|
692 |
+
</ol>
|
693 |
+
<h3><?php printf('Example usage of %s parameter','sort','easy-table');?></h3>
|
694 |
+
<p><em>sort</em> <?php _e('parameter is for initial sorting order. Value for each column separated by comma. See example below:','easy-table');?></p>
|
695 |
+
<ol>
|
696 |
+
<li><?php _e('Set initial order of first column descending and second column ascending:','easy-table');?>
|
697 |
+
<pre><code>[table sort="desc,asc"]
|
698 |
+
col1,col2,col3
|
699 |
+
col4,col5,col6
|
700 |
+
[/table]</code></pre>
|
701 |
+
</li>
|
702 |
+
<li><?php _e('Set initial order of second column descending:','easy-table');?>
|
703 |
+
<pre><code>[table sort=",desc,asc"]
|
704 |
+
col1,col2,col3
|
705 |
+
col4,col5,col6
|
706 |
+
[/table]</code></pre>
|
707 |
+
</li>
|
708 |
+
<li><?php _e('Additionaly, sort option also can be set via sort attr in a cell. See example below','easy-table');?></li>
|
709 |
</ol>
|
710 |
<h3><?php _e('Cell attribute tag','easy-table');?></h3>
|
711 |
<ol>
|
712 |
+
<li><p><strong>attr</strong>, <?php _e('To set attribute for cell eg. class, colspan, rowspan, etc','easy-table');?></p>
|
713 |
+
<p><?php _e('Example','easy-table');?>: </p>
|
714 |
+
|
715 |
+
<pre><code>[table]
|
716 |
+
col1,col2[attr style="width:200px" class="someclass"],col3
|
717 |
+
col4,col5,col6
|
718 |
+
[/table]
|
719 |
+
</code></pre>
|
720 |
+
</li>
|
721 |
+
|
722 |
+
<li><p><strong>attr sort</strong>, <?php _e('To set initial sort order, this is intended to TH (first row) only.','easy-table');?></p>
|
723 |
+
<p><?php _e('Example: sort second column descending ','easy-table');?> </p>
|
724 |
|
725 |
<pre><code>[table]
|
726 |
+
col1,col2[attr sort="desc"],col3
|
727 |
col4,col5,col6
|
728 |
[/table]
|
729 |
+
</code></pre>
|
730 |
+
<p><?php printf('To disable sort, use "%s". In the example below first column is not sortable','false','easy-table');?> </p>
|
731 |
+
|
732 |
+
<pre><code>[table]
|
733 |
+
col1[attr sort="false"],col2,col3
|
734 |
+
col4,col5,col6
|
735 |
+
[/table]
|
736 |
+
</code></pre>
|
737 |
</li>
|
738 |
</ol>
|
739 |
|
753 |
<div class="clear"></div>
|
754 |
|
755 |
<?php elseif($_GET['gettab'] == 'support') : ?>
|
756 |
+
<p><?php _e('I have tried to make this plugin can be used as easy as possible and documentation as complete as possible. However it is also possible that you are still confused. Therefore feel free to ask. I would be happy to answer.','easy-table');?></p>
|
757 |
+
<p><?php _e('You can use this discussion to get support, request feature or reporting bug.','easy-table');?></p>
|
758 |
+
<p><a target="_blank" href="http://takien.com/plugins/easy-table"><?php _e('Before you ask something, make sure you have read documentation here!','easy-table');?></a></p>
|
759 |
+
|
760 |
<div id="disqus_thread"></div>
|
761 |
<script type="text/javascript">
|
762 |
/* <![CDATA[ */
|
852 |
<?php endif; ?>
|
853 |
</ul>
|
854 |
<?php if ( ! empty($api->rating) ) : ?>
|
855 |
+
<h3><?php _e('Average Rating') ?></h3>
|
856 |
<div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">
|
857 |
<?php if ( version_compare( $GLOBALS['wp_version'], 3.4, '<') ) { ?>
|
858 |
<div class="star star-rating" style="width: <?php echo esc_attr($api->rating) ?>px"></div>
|
868 |
<?php } ?>
|
869 |
</div>
|
870 |
<small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
|
871 |
+
|
872 |
+
|
873 |
+
<h3><?php _e('Support my work with donation','easy-table');?>:</h3>
|
874 |
+
|
875 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
876 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
877 |
+
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHdwYJKoZIhvcNAQcEoIIHaDCCB2QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBiuJYBc1lBF7rbfQavcpZgzT8RvZGjID2Js94j7ju/SRNVtn+UPciq7Bi5fEWsM9WwVx52bndEV+WvBdQe3t2bV3EAXY8I3J2bAWczePAlZEcLy0umSnQGnRPIAZ9mk/JUKRAJmvd43rBkNqjzlhNXTSprXT0n2Vyqmq76WG6hJjELMAkGBSsOAwIaBQAwgfQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIC8jF6f82My+AgdAjf0SuFu46mt7lttlZYr5Z5U2CJIFyi51ihjPnZsxpoL0ekeLCAP8tFmo2cQM5ne/qx9oE9lE5Jfnxl+uoK1F2HOlxKl+x+jv7dsuMHUCJpULyq8/UsrJ3FXr8bZNAfKhJwtyswKpEiSyhBndkVj9vbeoH0V1+EoRmsyCcKs2qZKnVQQ/saz86aftIMYJ2r4yMBt10U8SUHC4Eq1JMWvAPNAPLoR6JQSYcF5z1HjhOHtnoFgfSOfP32CojuP9sRBOPUfvS20k9GWMxKEiD0u9RoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTIwNzAxMDM0ODUwWjAjBgkqhkiG9w0BCQQxFgQU7GSbNXKovs7xPIkMognrn2q5DgwwDQYJKoZIhvcNAQEBBQAEgYB+x+XRIPErAHovudsWOwNV/9LJWlBTkRTfR1zNnO1I4pYrzAJ6MR4I0vsmvZSmvwIfcyNPLxc3ouRK2esTFVfKv/ICHYrTCXSGusyROWOlQRiQJvoQ65IUiW6HvBz81/JjRp5TNgAAbgEY9GlddvdVsjsVbqfroqI2GIvdTNY+6w==-----END PKCS7-----
|
878 |
+
">
|
879 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
880 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
881 |
+
</form>
|
882 |
+
<p><?php _e('Don\'t have money? No problem, you can rate my plugin instead.','easy-table');?>
|
883 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/easy-table/"><?php _e('Click here to rate','easy-table');?></a></p>
|
884 |
+
|
885 |
+
<h3><?php _e('Thanks to','easy-table');?>:</h3>
|
886 |
+
|
887 |
+
<ul>
|
888 |
+
<li><a target="_blank" href="<?php echo site_url();?>">You</a></li>
|
889 |
+
<li><a target="_blank" href="http://php.net">PHP</a></li>
|
890 |
+
<li><a target="_blank" href="http://wordpress.org">WordPress</a></li>
|
891 |
+
<li>Tablesorter <?php _e('by','easy-table');?> <a target="_blank" href="http://tablesorter.com">Christian Bach</a></li>
|
892 |
+
<li>CSS <?php _e('by','easy-table');?> <a target="_blank" href="http://twitter.github.com/bootstrap">Twitter Bootstrap</a></li>
|
893 |
+
<li>jQuery metadata <?php _e('by','easy-table');?> <a target="_blank" href="https://github.com/jquery/jquery-metadata/">John Resig</a></li>
|
894 |
+
<li>CuscoSky table styles <?php _e('by','easy-table');?> <a target="_blank" href="http://www.buayacorp.com">Braulio Soncco</a></li>
|
895 |
+
|
896 |
+
</ul>
|
897 |
<?php endif; ?>
|
898 |
</div>
|
899 |
<?php endif; ?>
|
938 |
return $return;
|
939 |
}
|
940 |
}
|
941 |
+
}
|
942 |
+
if(!function_exists('array_replace')) {
|
943 |
+
function array_replace(){
|
944 |
+
$array=array();
|
945 |
+
$n=func_num_args();
|
946 |
+
while ($n-- >0) {
|
947 |
+
$array+=func_get_arg($n);
|
948 |
+
}
|
949 |
+
return $array;
|
950 |
+
}
|
951 |
}
|
jquery.tablesorter.min.js → js/easy-table-script.js
RENAMED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*
|
2 |
*
|
3 |
* TableSorter 2.0 - Client-side table sorting with ease!
|
@@ -14,6 +27,9 @@
|
|
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);
|
|
|
17 |
jQuery(document).ready(function($) {
|
18 |
-
$("table.tablesorter").tablesorter(
|
|
|
|
|
19 |
});
|
1 |
+
/*
|
2 |
+
* Metadata - jQuery plugin for parsing metadata from elements
|
3 |
+
*
|
4 |
+
* Copyright (c) 2006 John Resig, Yehuda Katz, J?örn Zaefferer, Paul McLanahan
|
5 |
+
*
|
6 |
+
* Dual licensed under the MIT and GPL licenses:
|
7 |
+
* http://www.opensource.org/licenses/mit-license.php
|
8 |
+
* http://www.gnu.org/licenses/gpl.html
|
9 |
+
*
|
10 |
+
* Version: 2.1
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
(function($,window,undefined){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(a,b){this.defaults.type=a;this.defaults.name=b},get:function(elem,opts){function getData(data){if("string"!==typeof data){return data}if(data.indexOf("{")<0){data=eval("("+data+")")}}function getObject(data){if("string"===typeof data){data=eval("("+data+")")}return data}var settings=$.extend({},this.defaults,opts),object={},data,match,attr;if(!settings.single.length){settings.single="metadata"}data=$.data(elem,settings.single);if(data){return data}data="{}";if(settings.type=="html5"){$(elem.attributes).each(function(){var a=this.nodeName;if(a.match(/^data-/)){a=a.replace(/^data-/,"");object[a]=getObject(this.nodeValue)}})}else{if(settings.type=="class"){match=settings.cre.exec(elem.className);if(match){data=match[1]}}else if(settings.type=="elem"){if(!elem.getElementsByTagName){return}match=elem.getElementsByTagName(settings.name);if(match.length){data=$.trim(match[0].innerHTML)}}else if(undefined!==elem.getAttribute){attr=elem.getAttribute(settings.name);if(attr){data=attr}}object=getObject(data.indexOf("{")<0?"{"+data+"}":data)}if(data!=="{}"){$.data(elem,settings.single,object)}return object}}});$.fn.metadata=function(a){return $.metadata.get(this[0],a)}})(jQuery,this);
|
14 |
/*
|
15 |
*
|
16 |
* TableSorter 2.0 - Client-side table sorting with ease!
|
27 |
(function($){$.extend({tablesorter:new
|
28 |
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
|
29 |
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);
|
30 |
+
/*easy table*/
|
31 |
jQuery(document).ready(function($) {
|
32 |
+
$("table.tablesorter").tablesorter({
|
33 |
+
cssHeader:'easy-table-header'
|
34 |
+
})
|
35 |
});
|
js/index.html
ADDED
File without changes
|
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.
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
"Last-Translator: takien <contact@takien.com>\n"
|
8 |
"Language-Team: takien.com <contact@takien.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -16,335 +16,399 @@ msgstr ""
|
|
16 |
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
-
#: easy-table.php:
|
20 |
msgid "Settings"
|
21 |
msgstr "Pengaturan"
|
22 |
|
23 |
-
#: easy-table.php:
|
24 |
msgid "Instruction"
|
25 |
msgstr "Petunjuk"
|
26 |
|
27 |
-
#: easy-table.php:
|
28 |
msgid "Once plugin installed, go to plugin options page to configure some options"
|
29 |
-
msgstr ""
|
30 |
|
31 |
-
#: easy-table.php:
|
32 |
msgid "You are ready to write a table in post or page."
|
33 |
-
msgstr ""
|
34 |
|
35 |
-
#: easy-table.php:
|
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:
|
40 |
#, php-format
|
41 |
msgid "%s Option"
|
42 |
msgstr "Pengaturan %s"
|
43 |
|
44 |
-
#: easy-table.php:
|
45 |
msgid "Support"
|
46 |
-
msgstr ""
|
47 |
|
48 |
-
#: easy-table.php:
|
49 |
msgid "About"
|
50 |
-
msgstr ""
|
51 |
|
52 |
-
#: easy-table.php:
|
53 |
msgid "Show/hide description"
|
54 |
-
msgstr ""
|
55 |
|
56 |
-
#: easy-table.php:
|
57 |
msgid "General options"
|
58 |
msgstr "Pengaturan umum"
|
59 |
|
60 |
-
#: easy-table.php:
|
61 |
msgid "Short code tag"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: easy-table.php:
|
65 |
msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: easy-table.php:
|
69 |
-
#: easy-table.php:
|
70 |
msgid "Cell attribute tag"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: easy-table.php:
|
74 |
msgid "Cell attribute tag, default is attr."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: easy-table.php:
|
78 |
msgid "Also render table in widget?"
|
79 |
-
msgstr ""
|
80 |
|
81 |
-
#: easy-table.php:
|
82 |
msgid "Check this if you want the table could be rendered in widget."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: easy-table.php:
|
86 |
msgid "Only load JS/CSS when in this condition"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: easy-table.php:
|
90 |
msgid "Please check in where JavaScript and CSS should be loaded"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: easy-table.php:
|
94 |
msgid "Single"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: easy-table.php:
|
98 |
msgid "Page"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: easy-table.php:
|
102 |
msgid "Front page"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: easy-table.php:
|
106 |
msgid "Archive page"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: easy-table.php:
|
110 |
msgid "Use tablesorter?"
|
111 |
msgstr "Gunakan tablesorter?"
|
112 |
|
113 |
-
#: easy-table.php:
|
114 |
msgid "Check this to use tablesorter jQuery plugin"
|
115 |
msgstr "Ceklist ini jika ingin menggunakan jQuery plugin tablesorter"
|
116 |
|
117 |
-
#: easy-table.php:
|
118 |
msgid "Use TH for the first row?"
|
119 |
msgstr "Gunakan TH untuk baris pertama?"
|
120 |
|
121 |
-
#: easy-table.php:
|
122 |
msgid "Check this if you want to use first row as table head (required by tablesorter)"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: easy-table.php:
|
126 |
msgid "Load CSS?"
|
127 |
msgstr "Muat CSS?"
|
128 |
|
129 |
-
#: easy-table.php:
|
130 |
msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
|
131 |
msgstr "Ceklist ini untuk menyertakan CSS untuk penataan tampilan tabel."
|
132 |
|
133 |
-
#: easy-table.php:
|
134 |
msgid "Table class"
|
135 |
msgstr "Class tabel"
|
136 |
|
137 |
-
#: easy-table.php:
|
138 |
-
msgid "
|
139 |
-
msgstr "
|
140 |
|
141 |
-
#: easy-table.php:
|
142 |
msgid "Table width"
|
143 |
msgstr "Lebar tabel"
|
144 |
|
145 |
-
#: easy-table.php:
|
146 |
msgid "Table width, in pixel or percent (may be overriden by CSS)"
|
147 |
msgstr "Lebar tabel, dalam pixel atau persen (kemungkinan ditimpa oleh CSS)"
|
148 |
|
149 |
-
#: easy-table.php:
|
150 |
msgid "Table align"
|
151 |
msgstr "Perataan tabel"
|
152 |
|
153 |
-
#: easy-table.php:
|
154 |
msgid "Table align, left/right/center (may be overriden by CSS)"
|
155 |
msgstr "Perataan tabel, left/right/center (kemungkinan ditimpa oleh CSS)"
|
156 |
|
157 |
-
#: easy-table.php:
|
158 |
msgid "Table border"
|
159 |
msgstr "Garis tabel"
|
160 |
|
161 |
-
#: easy-table.php:
|
162 |
msgid "Table border (may be overriden by CSS)"
|
163 |
msgstr "Garis tabel (kemungkinan ditimpa oleh CSS)"
|
164 |
|
165 |
-
#: easy-table.php:
|
166 |
msgid "Table options"
|
167 |
msgstr "Pengaturan tabel"
|
168 |
|
169 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
msgid "Parser Option"
|
171 |
msgstr "Pengaturan parser"
|
172 |
|
173 |
-
#: easy-table.php:
|
174 |
msgid "Do not change this unless you know what you're doing"
|
175 |
msgstr "Jangan ganti bagian ini kecuali Anda mengetahuinya"
|
176 |
|
177 |
-
#: easy-table.php:
|
178 |
msgid "Delimiter"
|
179 |
msgstr "Pemisah"
|
180 |
|
181 |
-
#: easy-table.php:
|
182 |
msgid "CSV delimiter (default is comma)"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: easy-table.php:
|
186 |
msgid "Enclosure"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: easy-table.php:
|
190 |
msgid "CSV enclosure (default is double quote)"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: easy-table.php:
|
194 |
msgid "Escape"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: easy-table.php:
|
198 |
msgid "CSV escape (default is backslash)"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: easy-table.php:
|
202 |
msgid "Allow read CSV from file?"
|
203 |
msgstr "Bolehkan membaca CSV dari file?"
|
204 |
|
205 |
-
#: easy-table.php:
|
206 |
msgid "Check this if you also want to convert CSV file to table"
|
207 |
msgstr "Ceklist ini jika Anda juga ingin merubah file CSV ke tabel"
|
208 |
|
209 |
-
#: easy-table.php:
|
210 |
msgid "Save"
|
211 |
msgstr "Simpan"
|
212 |
|
213 |
-
#: easy-table.php:
|
214 |
msgid "Possible parameter"
|
215 |
msgstr "Parameter yang dimungkinkan"
|
216 |
|
217 |
-
#: easy-table.php:
|
218 |
msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
|
219 |
msgstr "Parameter berikut ini secara umum dapat menggantikan setingan global yang ada di sebelah kiri halaman ini. Contoh penggunaan:"
|
220 |
|
221 |
-
#: easy-table.php:
|
222 |
-
#: easy-table.php:
|
223 |
-
#: easy-table.php:
|
224 |
-
#: easy-table.php:
|
225 |
-
#: easy-table.php:
|
226 |
-
#: easy-table.php:
|
227 |
-
#: easy-table.php:
|
228 |
-
#: easy-table.php:
|
229 |
-
#: easy-table.php:
|
230 |
-
#: easy-table.php:
|
|
|
231 |
msgid "default value"
|
232 |
msgstr "nilai bawaan"
|
233 |
|
234 |
-
#: easy-table.php:
|
235 |
msgid "another value"
|
236 |
msgstr "nilai lainnya"
|
237 |
|
238 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
msgid "To set attribute for cell eg. class, colspan, rowspan, etc"
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: easy-table.php:
|
243 |
-
msgid "
|
|
|
|
|
|
|
|
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
247 |
msgid "Test area:"
|
248 |
msgstr "Area test:"
|
249 |
|
250 |
-
#: easy-table.php:
|
251 |
msgid "Reset"
|
252 |
msgstr "Reset"
|
253 |
|
254 |
-
#: easy-table.php:
|
255 |
msgid "Update preview"
|
256 |
msgstr "Perbaharui pratinjau"
|
257 |
|
258 |
-
#: easy-table.php:
|
259 |
msgid "Preview"
|
260 |
msgstr "Pratinjau"
|
261 |
|
262 |
-
#: easy-table.php:
|
263 |
-
msgid "
|
264 |
-
msgstr ""
|
265 |
|
266 |
-
#: easy-table.php:
|
267 |
-
msgid "
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
271 |
msgid "Install Now"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: easy-table.php:
|
275 |
msgid "Install Update Now"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: easy-table.php:
|
279 |
#, php-format
|
280 |
msgid "Newer Version (%s) Installed"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: easy-table.php:
|
284 |
msgid "Latest Version Installed"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: easy-table.php:
|
288 |
msgid "Latest Version:"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: easy-table.php:
|
292 |
msgid "Author:"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: easy-table.php:
|
296 |
msgid "Last Updated:"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: easy-table.php:
|
300 |
#, php-format
|
301 |
msgid "%s ago"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: easy-table.php:
|
305 |
msgid "Requires WordPress Version:"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: easy-table.php:
|
309 |
#, php-format
|
310 |
msgid "%s or higher"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: easy-table.php:
|
314 |
msgid "Compatible up to:"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: easy-table.php:
|
318 |
msgid "Downloaded:"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: easy-table.php:
|
322 |
msgid "WordPress.org Plugin Page »"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: easy-table.php:
|
326 |
msgid "Plugin Homepage »"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: easy-table.php:
|
330 |
msgid "Average Rating"
|
331 |
-
msgstr ""
|
332 |
-
|
333 |
-
#: easy-table.php:758
|
334 |
-
msgid "Click here to rate"
|
335 |
-
msgstr ""
|
336 |
|
337 |
-
#: easy-table.php:
|
338 |
-
msgid "
|
339 |
-
msgstr "
|
340 |
|
341 |
-
#: easy-table.php:
|
342 |
-
msgid "
|
343 |
-
msgstr "
|
344 |
|
345 |
-
#: easy-table.php:
|
346 |
-
msgid "
|
347 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
|
349 |
#~ msgid "Any question or suggestion? Click here!"
|
350 |
#~ msgstr "Ada pertanyaan atau saran? Klik disini!"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: easy-table 0.8\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-07-01 11:29+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-07-01 11:35+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:445
|
20 |
msgid "Settings"
|
21 |
msgstr "Pengaturan"
|
22 |
|
23 |
+
#: easy-table.php:457
|
24 |
msgid "Instruction"
|
25 |
msgstr "Petunjuk"
|
26 |
|
27 |
+
#: easy-table.php:458
|
28 |
msgid "Once plugin installed, go to plugin options page to configure some options"
|
29 |
+
msgstr "Setelah plugin terpasang, kemudian buka halaman penyetelan plugin"
|
30 |
|
31 |
+
#: easy-table.php:459
|
32 |
msgid "You are ready to write a table in post or page."
|
33 |
+
msgstr "Anda telah siap untuk membuat tabel di post atau halaman."
|
34 |
|
35 |
+
#: easy-table.php:460
|
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:479
|
40 |
#, php-format
|
41 |
msgid "%s Option"
|
42 |
msgstr "Pengaturan %s"
|
43 |
|
44 |
+
#: easy-table.php:480
|
45 |
msgid "Support"
|
46 |
+
msgstr "Dukungan"
|
47 |
|
48 |
+
#: easy-table.php:481
|
49 |
msgid "About"
|
50 |
+
msgstr "Tentang"
|
51 |
|
52 |
+
#: easy-table.php:491
|
53 |
msgid "Show/hide description"
|
54 |
+
msgstr "Tampilkan/Sembunyikan keterangan"
|
55 |
|
56 |
+
#: easy-table.php:492
|
57 |
msgid "General options"
|
58 |
msgstr "Pengaturan umum"
|
59 |
|
60 |
+
#: easy-table.php:497
|
61 |
msgid "Short code tag"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: easy-table.php:499
|
65 |
msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: easy-table.php:505
|
69 |
+
#: easy-table.php:710
|
70 |
msgid "Cell attribute tag"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: easy-table.php:507
|
74 |
msgid "Cell attribute tag, default is attr."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: easy-table.php:512
|
78 |
msgid "Also render table in widget?"
|
79 |
+
msgstr "Tampilkan tabel di widget?"
|
80 |
|
81 |
+
#: easy-table.php:514
|
82 |
msgid "Check this if you want the table could be rendered in widget."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: easy-table.php:519
|
86 |
msgid "Only load JS/CSS when in this condition"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: easy-table.php:520
|
90 |
msgid "Please check in where JavaScript and CSS should be loaded"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: easy-table.php:524
|
94 |
msgid "Single"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: easy-table.php:530
|
98 |
msgid "Page"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: easy-table.php:536
|
102 |
msgid "Front page"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: easy-table.php:542
|
106 |
msgid "Archive page"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: easy-table.php:554
|
110 |
msgid "Use tablesorter?"
|
111 |
msgstr "Gunakan tablesorter?"
|
112 |
|
113 |
+
#: easy-table.php:557
|
114 |
msgid "Check this to use tablesorter jQuery plugin"
|
115 |
msgstr "Ceklist ini jika ingin menggunakan jQuery plugin tablesorter"
|
116 |
|
117 |
+
#: easy-table.php:561
|
118 |
msgid "Use TH for the first row?"
|
119 |
msgstr "Gunakan TH untuk baris pertama?"
|
120 |
|
121 |
+
#: easy-table.php:564
|
122 |
msgid "Check this if you want to use first row as table head (required by tablesorter)"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: easy-table.php:568
|
126 |
msgid "Load CSS?"
|
127 |
msgstr "Muat CSS?"
|
128 |
|
129 |
+
#: easy-table.php:571
|
130 |
msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
|
131 |
msgstr "Ceklist ini untuk menyertakan CSS untuk penataan tampilan tabel."
|
132 |
|
133 |
+
#: easy-table.php:575
|
134 |
msgid "Table class"
|
135 |
msgstr "Class tabel"
|
136 |
|
137 |
+
#: easy-table.php:577
|
138 |
+
msgid "Additional table class attribute."
|
139 |
+
msgstr ""
|
140 |
|
141 |
+
#: easy-table.php:581
|
142 |
msgid "Table width"
|
143 |
msgstr "Lebar tabel"
|
144 |
|
145 |
+
#: easy-table.php:583
|
146 |
msgid "Table width, in pixel or percent (may be overriden by CSS)"
|
147 |
msgstr "Lebar tabel, dalam pixel atau persen (kemungkinan ditimpa oleh CSS)"
|
148 |
|
149 |
+
#: easy-table.php:587
|
150 |
msgid "Table align"
|
151 |
msgstr "Perataan tabel"
|
152 |
|
153 |
+
#: easy-table.php:589
|
154 |
msgid "Table align, left/right/center (may be overriden by CSS)"
|
155 |
msgstr "Perataan tabel, left/right/center (kemungkinan ditimpa oleh CSS)"
|
156 |
|
157 |
+
#: easy-table.php:593
|
158 |
msgid "Table border"
|
159 |
msgstr "Garis tabel"
|
160 |
|
161 |
+
#: easy-table.php:595
|
162 |
msgid "Table border (may be overriden by CSS)"
|
163 |
msgstr "Garis tabel (kemungkinan ditimpa oleh CSS)"
|
164 |
|
165 |
+
#: easy-table.php:600
|
166 |
msgid "Table options"
|
167 |
msgstr "Pengaturan tabel"
|
168 |
|
169 |
+
#: easy-table.php:604
|
170 |
+
msgid "Theme selector"
|
171 |
+
msgstr "Pemilihan tema"
|
172 |
+
|
173 |
+
#: easy-table.php:609
|
174 |
+
msgid "Default theme"
|
175 |
+
msgstr "Tema bawaan"
|
176 |
+
|
177 |
+
#: easy-table.php:613
|
178 |
+
msgid "Select default theme of the table"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: easy-table.php:619
|
182 |
msgid "Parser Option"
|
183 |
msgstr "Pengaturan parser"
|
184 |
|
185 |
+
#: easy-table.php:620
|
186 |
msgid "Do not change this unless you know what you're doing"
|
187 |
msgstr "Jangan ganti bagian ini kecuali Anda mengetahuinya"
|
188 |
|
189 |
+
#: easy-table.php:626
|
190 |
msgid "Delimiter"
|
191 |
msgstr "Pemisah"
|
192 |
|
193 |
+
#: easy-table.php:629
|
194 |
msgid "CSV delimiter (default is comma)"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: easy-table.php:632
|
198 |
msgid "Enclosure"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: easy-table.php:635
|
202 |
msgid "CSV enclosure (default is double quote)"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: easy-table.php:638
|
206 |
msgid "Escape"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: easy-table.php:641
|
210 |
msgid "CSV escape (default is backslash)"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: easy-table.php:644
|
214 |
msgid "Allow read CSV from file?"
|
215 |
msgstr "Bolehkan membaca CSV dari file?"
|
216 |
|
217 |
+
#: easy-table.php:647
|
218 |
msgid "Check this if you also want to convert CSV file to table"
|
219 |
msgstr "Ceklist ini jika Anda juga ingin merubah file CSV ke tabel"
|
220 |
|
221 |
+
#: easy-table.php:655
|
222 |
msgid "Save"
|
223 |
msgstr "Simpan"
|
224 |
|
225 |
+
#: easy-table.php:677
|
226 |
msgid "Possible parameter"
|
227 |
msgstr "Parameter yang dimungkinkan"
|
228 |
|
229 |
+
#: easy-table.php:678
|
230 |
msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
|
231 |
msgstr "Parameter berikut ini secara umum dapat menggantikan setingan global yang ada di sebelah kiri halaman ini. Contoh penggunaan:"
|
232 |
|
233 |
+
#: easy-table.php:681
|
234 |
+
#: easy-table.php:682
|
235 |
+
#: easy-table.php:683
|
236 |
+
#: easy-table.php:684
|
237 |
+
#: easy-table.php:685
|
238 |
+
#: easy-table.php:686
|
239 |
+
#: easy-table.php:687
|
240 |
+
#: easy-table.php:688
|
241 |
+
#: easy-table.php:689
|
242 |
+
#: easy-table.php:690
|
243 |
+
#: easy-table.php:691
|
244 |
msgid "default value"
|
245 |
msgstr "nilai bawaan"
|
246 |
|
247 |
+
#: easy-table.php:681
|
248 |
msgid "another value"
|
249 |
msgstr "nilai lainnya"
|
250 |
|
251 |
+
#: easy-table.php:694
|
252 |
+
msgid "parameter is for initial sorting order. Value for each column separated by comma. See example below:"
|
253 |
+
msgstr "parameter untuk penyortiran bawaan. Nilai dari masing masih kolom dipisahkan dengan koma. Lihat contoh berikut:"
|
254 |
+
|
255 |
+
#: easy-table.php:696
|
256 |
+
msgid "Set initial order of first column descending and second column ascending:"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: easy-table.php:702
|
260 |
+
msgid "Set initial order of second column descending:"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: easy-table.php:708
|
264 |
+
msgid "Additionaly, sort option also can be set via sort attr in a cell. See example below"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: easy-table.php:712
|
268 |
msgid "To set attribute for cell eg. class, colspan, rowspan, etc"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: easy-table.php:713
|
272 |
+
msgid "Example"
|
273 |
+
msgstr "Contoh"
|
274 |
+
|
275 |
+
#: easy-table.php:722
|
276 |
+
msgid "To set initial sort order, this is intended to TH (first row) only."
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: easy-table.php:723
|
280 |
+
msgid "Example: sort second column descending "
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: easy-table.php:740
|
284 |
msgid "Test area:"
|
285 |
msgstr "Area test:"
|
286 |
|
287 |
+
#: easy-table.php:745
|
288 |
msgid "Reset"
|
289 |
msgstr "Reset"
|
290 |
|
291 |
+
#: easy-table.php:746
|
292 |
msgid "Update preview"
|
293 |
msgstr "Perbaharui pratinjau"
|
294 |
|
295 |
+
#: easy-table.php:748
|
296 |
msgid "Preview"
|
297 |
msgstr "Pratinjau"
|
298 |
|
299 |
+
#: easy-table.php:756
|
300 |
+
msgid "I have tried to make this plugin can be used as easy as possible and documentation as complete as possible. However it is also possible that you are still confused. Therefore feel free to ask. I would be happy to answer."
|
301 |
+
msgstr "Saya telah membuat plugin ini semudah mungkin digunakan dan juga dokumentasi yang selengkap mungkin. Meskipun begitu mungkin Anda masih bingung. Untuk itu jangan sungkan-sungkan untuk bertanya. Saya akan senang menjawabnya."
|
302 |
|
303 |
+
#: easy-table.php:757
|
304 |
+
msgid "You can use this discussion to get support, request feature or reporting bug."
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: easy-table.php:758
|
308 |
+
msgid "Before you ask something, make sure you have read documentation here!"
|
309 |
+
msgstr "Sebelum bertanya sesuatu, pastikan Anda telah membaca dokumentasi di sini!"
|
310 |
+
|
311 |
+
#: easy-table.php:817
|
312 |
msgid "Install Now"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: easy-table.php:821
|
316 |
msgid "Install Update Now"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: easy-table.php:824
|
320 |
#, php-format
|
321 |
msgid "Newer Version (%s) Installed"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: easy-table.php:827
|
325 |
msgid "Latest Version Installed"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: easy-table.php:836
|
329 |
msgid "Latest Version:"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: easy-table.php:838
|
333 |
msgid "Author:"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: easy-table.php:840
|
337 |
msgid "Last Updated:"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: easy-table.php:841
|
341 |
#, php-format
|
342 |
msgid "%s ago"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: easy-table.php:843
|
346 |
msgid "Requires WordPress Version:"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: easy-table.php:843
|
350 |
#, php-format
|
351 |
msgid "%s or higher"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: easy-table.php:845
|
355 |
msgid "Compatible up to:"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: easy-table.php:847
|
359 |
msgid "Downloaded:"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: easy-table.php:849
|
363 |
msgid "WordPress.org Plugin Page »"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: easy-table.php:851
|
367 |
msgid "Plugin Homepage »"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: easy-table.php:855
|
371 |
msgid "Average Rating"
|
372 |
+
msgstr "Penilaian rata-rata"
|
|
|
|
|
|
|
|
|
373 |
|
374 |
+
#: easy-table.php:873
|
375 |
+
msgid "Support my work with donation"
|
376 |
+
msgstr "Dukung karya saya dengan sumbangan"
|
377 |
|
378 |
+
#: easy-table.php:882
|
379 |
+
msgid "Don't have money? No problem, you can rate my plugin instead."
|
380 |
+
msgstr "Tidak punya uang? Tidak masalah, Anda cukup memberi rating plugin ini."
|
381 |
|
382 |
+
#: easy-table.php:883
|
383 |
+
msgid "Click here to rate"
|
384 |
+
msgstr "Klik di sini untuk memberi nilai"
|
385 |
+
|
386 |
+
#: easy-table.php:885
|
387 |
+
msgid "Thanks to"
|
388 |
+
msgstr "Terimakasih kepada"
|
389 |
+
|
390 |
+
#: easy-table.php:891
|
391 |
+
#: easy-table.php:892
|
392 |
+
#: easy-table.php:893
|
393 |
+
#: easy-table.php:894
|
394 |
+
msgid "by"
|
395 |
+
msgstr "oleh"
|
396 |
+
|
397 |
+
#~ msgid ""
|
398 |
+
#~ "Table class attribute, if you use bootstrap CSS, you should add at least "
|
399 |
+
#~ "\"table\" class."
|
400 |
+
#~ msgstr ""
|
401 |
+
#~ "Atribut class pada tabel, jika Anda menggunakan CSS bootstrap, setidaknya "
|
402 |
+
#~ "harus menambahkan class \"table\""
|
403 |
+
|
404 |
+
#~ msgid "Credit"
|
405 |
+
#~ msgstr "Kredit"
|
406 |
+
|
407 |
+
#~ msgid "Tablesorter by"
|
408 |
+
#~ msgstr "Tablesorter oleh"
|
409 |
+
|
410 |
+
#~ msgid "CSS by"
|
411 |
+
#~ msgstr "CSS oleh"
|
412 |
|
413 |
#~ msgid "Any question or suggestion? Click here!"
|
414 |
#~ msgstr "Ada pertanyaan atau saran? Klik disini!"
|
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.
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
"Last-Translator: takien <contact@takien.com>\n"
|
8 |
"Language-Team: takien.com <contact@takien.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -16,333 +16,381 @@ msgstr ""
|
|
16 |
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
-
#: easy-table.php:
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: easy-table.php:
|
24 |
msgid "Instruction"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: easy-table.php:
|
28 |
msgid "Once plugin installed, go to plugin options page to configure some options"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: easy-table.php:
|
32 |
msgid "You are ready to write a table in post or page."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: easy-table.php:
|
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:
|
40 |
#, php-format
|
41 |
msgid "%s Option"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: easy-table.php:
|
45 |
msgid "Support"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: easy-table.php:
|
49 |
msgid "About"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: easy-table.php:
|
53 |
msgid "Show/hide description"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: easy-table.php:
|
57 |
msgid "General options"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: easy-table.php:
|
61 |
msgid "Short code tag"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: easy-table.php:
|
65 |
msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: easy-table.php:
|
69 |
-
#: easy-table.php:
|
70 |
msgid "Cell attribute tag"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: easy-table.php:
|
74 |
msgid "Cell attribute tag, default is attr."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: easy-table.php:
|
78 |
msgid "Also render table in widget?"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: easy-table.php:
|
82 |
msgid "Check this if you want the table could be rendered in widget."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: easy-table.php:
|
86 |
msgid "Only load JS/CSS when in this condition"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: easy-table.php:
|
90 |
msgid "Please check in where JavaScript and CSS should be loaded"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: easy-table.php:
|
94 |
msgid "Single"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: easy-table.php:
|
98 |
msgid "Page"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: easy-table.php:
|
102 |
msgid "Front page"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: easy-table.php:
|
106 |
msgid "Archive page"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: easy-table.php:
|
110 |
msgid "Use tablesorter?"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: easy-table.php:
|
114 |
msgid "Check this to use tablesorter jQuery plugin"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: easy-table.php:
|
118 |
msgid "Use TH for the first row?"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: easy-table.php:
|
122 |
msgid "Check this if you want to use first row as table head (required by tablesorter)"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: easy-table.php:
|
126 |
msgid "Load CSS?"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: easy-table.php:
|
130 |
msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: easy-table.php:
|
134 |
msgid "Table class"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: easy-table.php:
|
138 |
-
msgid "
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: easy-table.php:
|
142 |
msgid "Table width"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: easy-table.php:
|
146 |
msgid "Table width, in pixel or percent (may be overriden by CSS)"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: easy-table.php:
|
150 |
msgid "Table align"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: easy-table.php:
|
154 |
msgid "Table align, left/right/center (may be overriden by CSS)"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: easy-table.php:
|
158 |
msgid "Table border"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: easy-table.php:
|
162 |
msgid "Table border (may be overriden by CSS)"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: easy-table.php:
|
166 |
msgid "Table options"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
msgid "Parser Option"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: easy-table.php:
|
174 |
msgid "Do not change this unless you know what you're doing"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: easy-table.php:
|
178 |
msgid "Delimiter"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: easy-table.php:
|
182 |
msgid "CSV delimiter (default is comma)"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: easy-table.php:
|
186 |
msgid "Enclosure"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: easy-table.php:
|
190 |
msgid "CSV enclosure (default is double quote)"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: easy-table.php:
|
194 |
msgid "Escape"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: easy-table.php:
|
198 |
msgid "CSV escape (default is backslash)"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: easy-table.php:
|
202 |
msgid "Allow read CSV from file?"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: easy-table.php:
|
206 |
msgid "Check this if you also want to convert CSV file to table"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: easy-table.php:
|
210 |
msgid "Save"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: easy-table.php:
|
214 |
msgid "Possible parameter"
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: easy-table.php:
|
218 |
msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: easy-table.php:
|
222 |
-
#: easy-table.php:
|
223 |
-
#: easy-table.php:
|
224 |
-
#: easy-table.php:
|
225 |
-
#: easy-table.php:
|
226 |
-
#: easy-table.php:
|
227 |
-
#: easy-table.php:
|
228 |
-
#: easy-table.php:
|
229 |
-
#: easy-table.php:
|
230 |
-
#: easy-table.php:
|
|
|
231 |
msgid "default value"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: easy-table.php:
|
235 |
msgid "another value"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
msgid "To set attribute for cell eg. class, colspan, rowspan, etc"
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: easy-table.php:
|
243 |
-
msgid "
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: easy-table.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
msgid "Test area:"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: easy-table.php:
|
251 |
msgid "Reset"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: easy-table.php:
|
255 |
msgid "Update preview"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: easy-table.php:
|
259 |
msgid "Preview"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: easy-table.php:
|
263 |
-
msgid "
|
|
|
|
|
|
|
|
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: easy-table.php:
|
267 |
-
msgid "
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: easy-table.php:
|
271 |
msgid "Install Now"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: easy-table.php:
|
275 |
msgid "Install Update Now"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: easy-table.php:
|
279 |
#, php-format
|
280 |
msgid "Newer Version (%s) Installed"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: easy-table.php:
|
284 |
msgid "Latest Version Installed"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: easy-table.php:
|
288 |
msgid "Latest Version:"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: easy-table.php:
|
292 |
msgid "Author:"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: easy-table.php:
|
296 |
msgid "Last Updated:"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: easy-table.php:
|
300 |
#, php-format
|
301 |
msgid "%s ago"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: easy-table.php:
|
305 |
msgid "Requires WordPress Version:"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: easy-table.php:
|
309 |
#, php-format
|
310 |
msgid "%s or higher"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: easy-table.php:
|
314 |
msgid "Compatible up to:"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: easy-table.php:
|
318 |
msgid "Downloaded:"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: easy-table.php:
|
322 |
msgid "WordPress.org Plugin Page »"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: easy-table.php:
|
326 |
msgid "Plugin Homepage »"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: easy-table.php:
|
330 |
msgid "Average Rating"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: easy-table.php:
|
334 |
-
msgid "
|
|
|
|
|
|
|
|
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: easy-table.php:
|
338 |
-
msgid "
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: easy-table.php:
|
342 |
-
msgid "
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: easy-table.php:
|
346 |
-
|
|
|
|
|
|
|
347 |
msgstr ""
|
348 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: easy-table 0.8\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-07-01 11:29+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-07-01 11:29+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:445
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: easy-table.php:457
|
24 |
msgid "Instruction"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: easy-table.php:458
|
28 |
msgid "Once plugin installed, go to plugin options page to configure some options"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: easy-table.php:459
|
32 |
msgid "You are ready to write a table in post or page."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: easy-table.php:460
|
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:479
|
40 |
#, php-format
|
41 |
msgid "%s Option"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: easy-table.php:480
|
45 |
msgid "Support"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: easy-table.php:481
|
49 |
msgid "About"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: easy-table.php:491
|
53 |
msgid "Show/hide description"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: easy-table.php:492
|
57 |
msgid "General options"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: easy-table.php:497
|
61 |
msgid "Short code tag"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: easy-table.php:499
|
65 |
msgid "Shortcode tag, type \"table\" if you want to use [table] short tag."
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: easy-table.php:505
|
69 |
+
#: easy-table.php:710
|
70 |
msgid "Cell attribute tag"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: easy-table.php:507
|
74 |
msgid "Cell attribute tag, default is attr."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: easy-table.php:512
|
78 |
msgid "Also render table in widget?"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: easy-table.php:514
|
82 |
msgid "Check this if you want the table could be rendered in widget."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: easy-table.php:519
|
86 |
msgid "Only load JS/CSS when in this condition"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: easy-table.php:520
|
90 |
msgid "Please check in where JavaScript and CSS should be loaded"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: easy-table.php:524
|
94 |
msgid "Single"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: easy-table.php:530
|
98 |
msgid "Page"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: easy-table.php:536
|
102 |
msgid "Front page"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: easy-table.php:542
|
106 |
msgid "Archive page"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: easy-table.php:554
|
110 |
msgid "Use tablesorter?"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: easy-table.php:557
|
114 |
msgid "Check this to use tablesorter jQuery plugin"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: easy-table.php:561
|
118 |
msgid "Use TH for the first row?"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: easy-table.php:564
|
122 |
msgid "Check this if you want to use first row as table head (required by tablesorter)"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: easy-table.php:568
|
126 |
msgid "Load CSS?"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: easy-table.php:571
|
130 |
msgid "Check this to use CSS included in this plugin to styling table, you may unceck if you want to write your own style."
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: easy-table.php:575
|
134 |
msgid "Table class"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: easy-table.php:577
|
138 |
+
msgid "Additional table class attribute."
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: easy-table.php:581
|
142 |
msgid "Table width"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: easy-table.php:583
|
146 |
msgid "Table width, in pixel or percent (may be overriden by CSS)"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: easy-table.php:587
|
150 |
msgid "Table align"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: easy-table.php:589
|
154 |
msgid "Table align, left/right/center (may be overriden by CSS)"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: easy-table.php:593
|
158 |
msgid "Table border"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: easy-table.php:595
|
162 |
msgid "Table border (may be overriden by CSS)"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: easy-table.php:600
|
166 |
msgid "Table options"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: easy-table.php:604
|
170 |
+
msgid "Theme selector"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: easy-table.php:609
|
174 |
+
msgid "Default theme"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: easy-table.php:613
|
178 |
+
msgid "Select default theme of the table"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: easy-table.php:619
|
182 |
msgid "Parser Option"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: easy-table.php:620
|
186 |
msgid "Do not change this unless you know what you're doing"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: easy-table.php:626
|
190 |
msgid "Delimiter"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: easy-table.php:629
|
194 |
msgid "CSV delimiter (default is comma)"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: easy-table.php:632
|
198 |
msgid "Enclosure"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: easy-table.php:635
|
202 |
msgid "CSV enclosure (default is double quote)"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: easy-table.php:638
|
206 |
msgid "Escape"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: easy-table.php:641
|
210 |
msgid "CSV escape (default is backslash)"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: easy-table.php:644
|
214 |
msgid "Allow read CSV from file?"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: easy-table.php:647
|
218 |
msgid "Check this if you also want to convert CSV file to table"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: easy-table.php:655
|
222 |
msgid "Save"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: easy-table.php:677
|
226 |
msgid "Possible parameter"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: easy-table.php:678
|
230 |
msgid "These parameters commonly can override global options in the left side of this page. Example usage:"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: easy-table.php:681
|
234 |
+
#: easy-table.php:682
|
235 |
+
#: easy-table.php:683
|
236 |
+
#: easy-table.php:684
|
237 |
+
#: easy-table.php:685
|
238 |
+
#: easy-table.php:686
|
239 |
+
#: easy-table.php:687
|
240 |
+
#: easy-table.php:688
|
241 |
+
#: easy-table.php:689
|
242 |
+
#: easy-table.php:690
|
243 |
+
#: easy-table.php:691
|
244 |
msgid "default value"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: easy-table.php:681
|
248 |
msgid "another value"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: easy-table.php:694
|
252 |
+
msgid "parameter is for initial sorting order. Value for each column separated by comma. See example below:"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: easy-table.php:696
|
256 |
+
msgid "Set initial order of first column descending and second column ascending:"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: easy-table.php:702
|
260 |
+
msgid "Set initial order of second column descending:"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: easy-table.php:708
|
264 |
+
msgid "Additionaly, sort option also can be set via sort attr in a cell. See example below"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: easy-table.php:712
|
268 |
msgid "To set attribute for cell eg. class, colspan, rowspan, etc"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: easy-table.php:713
|
272 |
+
msgid "Example"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: easy-table.php:722
|
276 |
+
msgid "To set initial sort order, this is intended to TH (first row) only."
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: easy-table.php:723
|
280 |
+
msgid "Example: sort second column descending "
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: easy-table.php:740
|
284 |
msgid "Test area:"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: easy-table.php:745
|
288 |
msgid "Reset"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: easy-table.php:746
|
292 |
msgid "Update preview"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: easy-table.php:748
|
296 |
msgid "Preview"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: easy-table.php:756
|
300 |
+
msgid "I have tried to make this plugin can be used as easy as possible and documentation as complete as possible. However it is also possible that you are still confused. Therefore feel free to ask. I would be happy to answer."
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: easy-table.php:757
|
304 |
+
msgid "You can use this discussion to get support, request feature or reporting bug."
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: easy-table.php:758
|
308 |
+
msgid "Before you ask something, make sure you have read documentation here!"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: easy-table.php:817
|
312 |
msgid "Install Now"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: easy-table.php:821
|
316 |
msgid "Install Update Now"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: easy-table.php:824
|
320 |
#, php-format
|
321 |
msgid "Newer Version (%s) Installed"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: easy-table.php:827
|
325 |
msgid "Latest Version Installed"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: easy-table.php:836
|
329 |
msgid "Latest Version:"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: easy-table.php:838
|
333 |
msgid "Author:"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: easy-table.php:840
|
337 |
msgid "Last Updated:"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: easy-table.php:841
|
341 |
#, php-format
|
342 |
msgid "%s ago"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: easy-table.php:843
|
346 |
msgid "Requires WordPress Version:"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: easy-table.php:843
|
350 |
#, php-format
|
351 |
msgid "%s or higher"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: easy-table.php:845
|
355 |
msgid "Compatible up to:"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: easy-table.php:847
|
359 |
msgid "Downloaded:"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: easy-table.php:849
|
363 |
msgid "WordPress.org Plugin Page »"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: easy-table.php:851
|
367 |
msgid "Plugin Homepage »"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: easy-table.php:855
|
371 |
msgid "Average Rating"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: easy-table.php:873
|
375 |
+
msgid "Support my work with donation"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: easy-table.php:882
|
379 |
+
msgid "Don't have money? No problem, you can rate my plugin instead."
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: easy-table.php:883
|
383 |
+
msgid "Click here to rate"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: easy-table.php:885
|
387 |
+
msgid "Thanks to"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: easy-table.php:891
|
391 |
+
#: easy-table.php:892
|
392 |
+
#: easy-table.php:893
|
393 |
+
#: easy-table.php:894
|
394 |
+
msgid "by"
|
395 |
msgstr ""
|
396 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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.4
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -49,6 +49,51 @@ no[attr width="20"],head1,head2,head3
|
|
49 |
4,row4col1,row4col2,row4col3
|
50 |
[/table]`
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
* Table with no heading
|
53 |
`[table th="0"]some data here[/table]`
|
54 |
|
@@ -64,6 +109,8 @@ no[attr width="20"],head1,head2,head3
|
|
64 |
* Table from CSV file
|
65 |
`[table file="example.com/blog/wp-content/uploads/pricelist.csv"][/table]`
|
66 |
|
|
|
|
|
67 |
= Other notes =
|
68 |
* Data in each cell must not have line break, otherwise it will be detected as new row.
|
69 |
* If read from file, the file URL must not contain space.
|
@@ -93,6 +140,23 @@ No
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
= 0.7 =
|
97 |
* Fixed: Enclosure in the first column does not work.
|
98 |
* Added: Compatibility with WordPress 3.4
|
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.4.1
|
7 |
+
Stable tag: 0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
49 |
4,row4col1,row4col2,row4col3
|
50 |
[/table]`
|
51 |
|
52 |
+
* Table with initial sort order using table parameter, sort by first column descending
|
53 |
+
`[table sort="desc"]
|
54 |
+
no,head1,head2,head3
|
55 |
+
1,row1col1,row1col2,row1col3]
|
56 |
+
2,row2col1,row2col2,row2col3
|
57 |
+
3,row3col1,row3col2,row3col3
|
58 |
+
4,row4col1,row4col2,row4col3
|
59 |
+
[/table]`
|
60 |
+
|
61 |
+
* Table with initial sort order using table parameter, sort by first column descending, and second column ascending
|
62 |
+
`[table sort="desc,asc"]
|
63 |
+
no,head1,head2,head3
|
64 |
+
1,row1col1,row1col2,row1col3]
|
65 |
+
2,row2col1,row2col2,row2col3
|
66 |
+
3,row3col1,row3col2,row3col3
|
67 |
+
4,row4col1,row4col2,row4col3
|
68 |
+
[/table]`
|
69 |
+
|
70 |
+
* Table with initial sort order using cell attr, sort by second column descending
|
71 |
+
`[table]
|
72 |
+
no,head1[attr sort="desc"],head2,head3
|
73 |
+
1,row1col1,row1col2,row1col3]
|
74 |
+
2,row2col1,row2col2,row2col3
|
75 |
+
3,row3col1,row3col2,row3col3
|
76 |
+
4,row4col1,row4col2,row4col3
|
77 |
+
[/table]`
|
78 |
+
|
79 |
+
* Disable sort for third column using cell attr
|
80 |
+
`[table]
|
81 |
+
no,head1,head2[attr sort="false"],head3
|
82 |
+
1,row1col1,row1col2,row1col3]
|
83 |
+
2,row2col1,row2col2,row2col3
|
84 |
+
3,row3col1,row3col2,row3col3
|
85 |
+
4,row4col1,row4col2,row4col3
|
86 |
+
[/table]`
|
87 |
+
|
88 |
+
* Disable sort for third column using table parameter
|
89 |
+
`[table sort=",,false"]
|
90 |
+
no,head1,head2,head3
|
91 |
+
1,row1col1,row1col2,row1col3]
|
92 |
+
2,row2col1,row2col2,row2col3
|
93 |
+
3,row3col1,row3col2,row3col3
|
94 |
+
4,row4col1,row4col2,row4col3
|
95 |
+
[/table]`
|
96 |
+
|
97 |
* Table with no heading
|
98 |
`[table th="0"]some data here[/table]`
|
99 |
|
109 |
* Table from CSV file
|
110 |
`[table file="example.com/blog/wp-content/uploads/pricelist.csv"][/table]`
|
111 |
|
112 |
+
[Look confusing? Please click here](http://takien.com/plugins/easy-table).
|
113 |
+
|
114 |
= Other notes =
|
115 |
* Data in each cell must not have line break, otherwise it will be detected as new row.
|
116 |
* If read from file, the file URL must not contain space.
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= 0.8 =
|
144 |
+
* Fixed: Csvfile option
|
145 |
+
* Fixed: Broken caption in Responsive theme
|
146 |
+
* Removed: Clearfix class from the table
|
147 |
+
* Changed: Now use wp_remote_get() instead of file_get_contents();
|
148 |
+
* Changed: Method name from get_easy_table_option() to option(), not affected to the usability
|
149 |
+
* Changed: .header class for thead changed to .easy-table-header to minimize conflict possibility with other CSS.
|
150 |
+
* Changed: path to jquery.tablesorter to /js and combined with jquery metadata
|
151 |
+
* Added: jquery.metadata.js to set additional sorting option
|
152 |
+
* Added: themes selector
|
153 |
+
* Added: css/easy-table.css for general basic styling
|
154 |
+
* Added: New sort parameter on table eg. [table sort="desc,asc"]
|
155 |
+
* Added: New sort attr on cell for default sorting, attr sort="desc", attr sort="desc", attr sort="false"
|
156 |
+
* Added: htaccess file to prevent directory listing on plugin path.
|
157 |
+
* Added: Compatibility with WordPress 3.4.1
|
158 |
+
* Improved: CSS for arrow up/down, arrow now only visible on mouseover or if column is sorted.
|
159 |
+
|
160 |
= 0.7 =
|
161 |
* Fixed: Enclosure in the first column does not work.
|
162 |
* Added: Compatibility with WordPress 3.4
|
themes/cuscosky/style.css
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* always include base css to get basic styling for header etc.
|
3 |
+
*/
|
4 |
+
@import url(../../css/easy-table.css);
|
5 |
+
/*
|
6 |
+
Cusco Sky table styles
|
7 |
+
written by Braulio Soncco http://www.buayacorp.com
|
8 |
+
*/
|
9 |
+
|
10 |
+
table.easy-table-cuscosky, .easy-table-cuscosky th, .easy-table-cuscosky td {
|
11 |
+
border: 1px solid #D4E0EE;
|
12 |
+
border-collapse: collapse;
|
13 |
+
font-family: "Trebuchet MS", Arial, sans-serif;
|
14 |
+
color: #555;
|
15 |
+
}
|
16 |
+
|
17 |
+
.easy-table-cuscosky caption {
|
18 |
+
font-size: 150%;
|
19 |
+
font-weight: bold;
|
20 |
+
margin: 5px;
|
21 |
+
padding-bottom:5px;
|
22 |
+
}
|
23 |
+
|
24 |
+
.easy-table-cuscosky td, .easy-table-cuscosky th {
|
25 |
+
padding: 4px;
|
26 |
+
}
|
27 |
+
|
28 |
+
.easy-table-cuscosky thead th {
|
29 |
+
text-align: center;
|
30 |
+
background: #E6EDF5;
|
31 |
+
color: #4F76A3;
|
32 |
+
font-size: 100% !important;
|
33 |
+
}
|
34 |
+
|
35 |
+
.easy-table-cuscosky tbody th {
|
36 |
+
font-weight: bold;
|
37 |
+
}
|
38 |
+
|
39 |
+
.easy-table-cuscosky tbody tr { background: #FCFDFE; }
|
40 |
+
|
41 |
+
.easy-table-cuscosky tbody tr:nth-child(2n+1) td,
|
42 |
+
.easy-table-cuscosky tbody tr:nth-child(2n+1) th {
|
43 |
+
background: #F7F9FC;
|
44 |
+
}
|
45 |
+
|
46 |
+
.easy-table-cuscosky table a:link {
|
47 |
+
color: #718ABE;
|
48 |
+
text-decoration: none;
|
49 |
+
}
|
50 |
+
|
51 |
+
.easy-table-cuscosky table a:visited {
|
52 |
+
color: #718ABE;
|
53 |
+
text-decoration: none;
|
54 |
+
}
|
55 |
+
|
56 |
+
.easy-table-cuscosky table a:hover {
|
57 |
+
color: #718ABE;
|
58 |
+
text-decoration: underline !important;
|
59 |
+
}
|
60 |
+
|
61 |
+
.easy-table-cuscosky tfoot th, .easy-table-cuscosky tfoot td {
|
62 |
+
font-size: 85%;
|
63 |
+
}
|
easy-table-style.css → themes/default/style.css
RENAMED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
* Bootstrap v2.0.3
|
3 |
*
|
@@ -7,12 +16,13 @@
|
|
7 |
*
|
8 |
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
9 |
*/
|
10 |
-
|
11 |
-
.table{width:100%;
|
12 |
-
.table th{
|
13 |
-
.table
|
14 |
-
.
|
15 |
-
.table
|
|
|
16 |
.table-condensed th,.table-condensed td{padding:4px 5px;}
|
17 |
.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
|
18 |
.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
|
@@ -20,21 +30,9 @@ table{max-width:100%;background-color:transparent;border-collapse:collapse;borde
|
|
20 |
.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
|
21 |
.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
|
22 |
.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
|
23 |
-
.table-striped tbody tr:nth-child(odd) td
|
24 |
-
.table tbody tr:
|
25 |
-
table
|
|
|
26 |
font-weight:bold;
|
27 |
-
|
28 |
-
}
|
29 |
-
table.tablesorter thead tr .header {
|
30 |
-
background-image: url(images/bg.gif);
|
31 |
-
background-repeat: no-repeat;
|
32 |
-
background-position: center right;
|
33 |
-
cursor: pointer;
|
34 |
-
}
|
35 |
-
table.tablesorter thead tr .headerSortUp {
|
36 |
-
background-image: url(images/asc.gif);
|
37 |
-
}
|
38 |
-
table.tablesorter thead tr .headerSortDown {
|
39 |
-
background-image: url(images/desc.gif);
|
40 |
-
}
|
1 |
+
/*
|
2 |
+
* always include base css to get basic styling for header etc.
|
3 |
+
*/
|
4 |
+
@import url(../../css/easy-table.css);
|
5 |
+
|
6 |
+
|
7 |
+
/*
|
8 |
+
use bootstrap css for default theme.
|
9 |
+
*/
|
10 |
/*!
|
11 |
* Bootstrap v2.0.3
|
12 |
*
|
16 |
*
|
17 |
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
18 |
*/
|
19 |
+
|
20 |
+
table.easy-table {max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
|
21 |
+
.easy-table{width:100%;margin-bottom:18px;}.easy-table th,.easy-table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
|
22 |
+
.easy-table th{font-weight:bold;}
|
23 |
+
.easy-table thead th{vertical-align:bottom;}
|
24 |
+
.easy-table caption+thead tr:first-child th,.easy-table caption+thead tr:first-child td,.easy-table colgroup+thead tr:first-child th,.easy-table colgroup+thead tr:first-child td,.easy-table thead:first-child tr:first-child th,.easy-table thead:first-child tr:first-child td{border-top:0;}
|
25 |
+
.easy-table tbody+tbody{border-top:2px solid #dddddd;}
|
26 |
.table-condensed th,.table-condensed td{padding:4px 5px;}
|
27 |
.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
|
28 |
.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
|
30 |
.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;}
|
31 |
.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;}
|
32 |
.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;}
|
33 |
+
.table-striped tbody tr:nth-child(odd) td,
|
34 |
+
.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
|
35 |
+
.easy-table tbody tr:hover td,.easy-table tbody tr:hover th{background-color:#f5f5f5;}
|
36 |
+
table.easy-table caption{
|
37 |
font-weight:bold;
|
38 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes/index.html
ADDED
File without changes
|