WP-Table Reloaded - Version 1.4.1

Version Description

Download this release

Release Info

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

Code changes from version 1.4 to 1.4.1

admin/admin-script.dev.js CHANGED
@@ -26,8 +26,8 @@ jQuery(document).ready( function( $ ) {
26
  cb_class = ( -1 != cb_id.search(/row/) ) ? 'row-hidden' : 'column-hidden';
27
  $( '#table_contents .' + cb_id ).TBtoggleClass( cb_class, $(this).attr('checked') );
28
  } );
29
- })
30
- .change();
31
 
32
  // functions to make focussed textareas bigger
33
  // commented code is for handling all textareas in same row or same column
26
  cb_class = ( -1 != cb_id.search(/row/) ) ? 'row-hidden' : 'column-hidden';
27
  $( '#table_contents .' + cb_id ).TBtoggleClass( cb_class, $(this).attr('checked') );
28
  } );
29
+ });
30
+ //.change();
31
 
32
  // functions to make focussed textareas bigger
33
  // commented code is for handling all textareas in same row or same column
admin/admin-script.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(f){jQuery.each({TBtoggleClass:function(j,i){if(typeof i!=="boolean"){i=!jQuery.className.has(this,j)}jQuery.className[i?"add":"remove"](this,j)}},function(i,j){jQuery.fn[i]=function(){return this.each(j,arguments)}});var e,a;f("#table_contents tbody :checkbox").change(function(){f("#table_contents tbody :checkbox").each(function(){e=f(this).attr("id");a=(-1!=e.search(/row/))?"row-hidden":"column-hidden";f("#table_contents ."+e).TBtoggleClass(a,f(this).attr("checked"))})}).change();f("#table_contents textarea").focus(function(){f("#table_contents .focus").removeClass("focus");f(this).parents("tr").find("textarea").addClass("focus")});f("#export_format").change(function(){if("csv"==f(this).val()){f(".tr-export-delimiter").css("display","table-row")}else{f(".tr-export-delimiter").css("display","none")}}).change();var h=f(".wp-table-reloaded-table-information #table_id").val();f(".wp-table-reloaded-table-information #table_id").change(function(){if(h!=f(this).val()){if(confirm(WP_Table_Reloaded_Admin.str_ChangeTableID)){h=f(this).val()}else{f(this).val(h)}}});f(".tr-import-addreplace input").click(function(){if("replace"==f(".tr-import-addreplace input:checked").val()){f(".tr-import-addreplace-table").css("display","table-row")}else{f(".tr-import-addreplace-table").css("display","none")}});f(".tr-import-addreplace input:checked").click();f(".tr-import-from input").click(function(){f(".tr-import-file-upload").css("display","none");f(".tr-import-url").css("display","none");f(".tr-import-form-field").css("display","none");f(".tr-import-server").css("display","none");f(".tr-import-"+f(".tr-import-from input:checked").val()).css("display","table-row")});f(".tr-import-from input:checked").click();f("#options_use_custom_css").change(function(){if(f(this).attr("checked")){f("#options_custom_css").removeAttr("disabled")}else{f("#options_custom_css").attr("disabled",true)}});f("#options_enable_tablesorter").change(function(){if(f(this).attr("checked")){f("#options_use_tablesorter_extended").removeAttr("disabled")}else{f("#options_use_tablesorter_extended").attr("disabled",true)}});f("#table_options_first_row_th").change(function(){if(f(this).attr("checked")&&f("#tablesorter_enabled").val()){f("#table_options_use_tablesorter").removeAttr("disabled")}else{f("#table_options_use_tablesorter").attr("disabled",true)}});f("#options_uninstall_upon_deactivation").click(function(){if(f(this).attr("checked")){return confirm(WP_Table_Reloaded_Admin.str_UninstallCheckboxActivation)}});var b="";function d(){var i=f(this).val();f(this).val(i+b);f("#table_contents textarea").unbind("click",d)}f("#a-insert-link").click(function(){var j=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertURL+":","http://");if(j){var i=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText+":",WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText);if(i){b='<a href="'+j+'">'+i+"</a>";if(confirm(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertExplain+"\n\n"+b)){f("#table_contents textarea").bind("click",d)}}}return false});function g(){edCanvas=this;f("#table_contents textarea").unbind("click",g);var i=f("#a-insert-image");tb_show(i.attr("title"),i.attr("href"),i.attr("rel"));f(this).blur()}function c(){f(this).unbind("click");f(this).bind("click",c);if(true==confirm(WP_Table_Reloaded_Admin.str_DataManipulationImageInsertThickbox)){f("#table_contents textarea").bind("click",g)}}f("#a-insert-image").unbind("click").bind("click",c);f("#insert_custom_field_name").keyup(function(){f(this).val(f(this).val().toLowerCase().replace(/[^a-z0-9_-]/g,""))});f(".focus-blur-change").focus(function(){if(f(this).attr("title")==f(this).val()){f(this).val("")}}).blur(function(){if(""==f(this).val()){f(this).val(f(this).attr("title"))}});f("#table_custom_fields textarea").focus(function(){f("#table_custom_fields .focus").removeClass("focus");f(this).addClass("focus")});f("input.bulk_copy_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkCopyTablesLink)});f("input.bulk_delete_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkDeleteTablesLink)});f("input.bulk_wp_table_import_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkImportwpTableTablesLink)});f("a.copy_table_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_CopyTableLink)});f(" a.delete_row_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_DeleteRowLink)});f("a.delete_column_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_DeleteColumnLink)});f("a.import_wptable_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_ImportwpTableLink)});f("a.uninstall_plugin_link").click(function(){if(confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_1)){return confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_2)}else{return false}});f("a.cf_shortcode_link").click(function(){var i=prompt(WP_Table_Reloaded_Admin.str_CFShortcodeMessage,f(this).attr("title"));return false});f("a.table_shortcode_link").click(function(){var i=prompt(WP_Table_Reloaded_Admin.str_TableShortcodeMessage,f(this).attr("title"));return false});f(".postbox h3, .postbox .handlediv").click(function(){f(f(this).parent().get(0)).toggleClass("closed")})});
1
+ jQuery(document).ready(function(f){jQuery.each({TBtoggleClass:function(j,i){if(typeof i!=="boolean"){i=!jQuery.className.has(this,j)}jQuery.className[i?"add":"remove"](this,j)}},function(i,j){jQuery.fn[i]=function(){return this.each(j,arguments)}});var e,a;f("#table_contents tbody :checkbox").change(function(){f("#table_contents tbody :checkbox").each(function(){e=f(this).attr("id");a=(-1!=e.search(/row/))?"row-hidden":"column-hidden";f("#table_contents ."+e).TBtoggleClass(a,f(this).attr("checked"))})});f("#table_contents textarea").focus(function(){f("#table_contents .focus").removeClass("focus");f(this).parents("tr").find("textarea").addClass("focus")});f("#export_format").change(function(){if("csv"==f(this).val()){f(".tr-export-delimiter").css("display","table-row")}else{f(".tr-export-delimiter").css("display","none")}}).change();var h=f(".wp-table-reloaded-table-information #table_id").val();f(".wp-table-reloaded-table-information #table_id").change(function(){if(h!=f(this).val()){if(confirm(WP_Table_Reloaded_Admin.str_ChangeTableID)){h=f(this).val()}else{f(this).val(h)}}});f(".tr-import-addreplace input").click(function(){if("replace"==f(".tr-import-addreplace input:checked").val()){f(".tr-import-addreplace-table").css("display","table-row")}else{f(".tr-import-addreplace-table").css("display","none")}});f(".tr-import-addreplace input:checked").click();f(".tr-import-from input").click(function(){f(".tr-import-file-upload").css("display","none");f(".tr-import-url").css("display","none");f(".tr-import-form-field").css("display","none");f(".tr-import-server").css("display","none");f(".tr-import-"+f(".tr-import-from input:checked").val()).css("display","table-row")});f(".tr-import-from input:checked").click();f("#options_use_custom_css").change(function(){if(f(this).attr("checked")){f("#options_custom_css").removeAttr("disabled")}else{f("#options_custom_css").attr("disabled",true)}});f("#options_enable_tablesorter").change(function(){if(f(this).attr("checked")){f("#options_use_tablesorter_extended").removeAttr("disabled")}else{f("#options_use_tablesorter_extended").attr("disabled",true)}});f("#table_options_first_row_th").change(function(){if(f(this).attr("checked")&&f("#tablesorter_enabled").val()){f("#table_options_use_tablesorter").removeAttr("disabled")}else{f("#table_options_use_tablesorter").attr("disabled",true)}});f("#options_uninstall_upon_deactivation").click(function(){if(f(this).attr("checked")){return confirm(WP_Table_Reloaded_Admin.str_UninstallCheckboxActivation)}});var b="";function d(){var i=f(this).val();f(this).val(i+b);f("#table_contents textarea").unbind("click",d)}f("#a-insert-link").click(function(){var j=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertURL+":","http://");if(j){var i=prompt(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText+":",WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertText);if(i){b='<a href="'+j+'">'+i+"</a>";if(confirm(WP_Table_Reloaded_Admin.str_DataManipulationLinkInsertExplain+"\n\n"+b)){f("#table_contents textarea").bind("click",d)}}}return false});function g(){edCanvas=this;f("#table_contents textarea").unbind("click",g);var i=f("#a-insert-image");tb_show(i.attr("title"),i.attr("href"),i.attr("rel"));f(this).blur()}function c(){f(this).unbind("click");f(this).bind("click",c);if(true==confirm(WP_Table_Reloaded_Admin.str_DataManipulationImageInsertThickbox)){f("#table_contents textarea").bind("click",g)}}f("#a-insert-image").unbind("click").bind("click",c);f("#insert_custom_field_name").keyup(function(){f(this).val(f(this).val().toLowerCase().replace(/[^a-z0-9_-]/g,""))});f(".focus-blur-change").focus(function(){if(f(this).attr("title")==f(this).val()){f(this).val("")}}).blur(function(){if(""==f(this).val()){f(this).val(f(this).attr("title"))}});f("#table_custom_fields textarea").focus(function(){f("#table_custom_fields .focus").removeClass("focus");f(this).addClass("focus")});f("input.bulk_copy_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkCopyTablesLink)});f("input.bulk_delete_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkDeleteTablesLink)});f("input.bulk_wp_table_import_tables").click(function(){return confirm(WP_Table_Reloaded_Admin.str_BulkImportwpTableTablesLink)});f("a.copy_table_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_CopyTableLink)});f(" a.delete_row_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_DeleteRowLink)});f("a.delete_column_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_DeleteColumnLink)});f("a.import_wptable_link").click(function(){return confirm(WP_Table_Reloaded_Admin.str_ImportwpTableLink)});f("a.uninstall_plugin_link").click(function(){if(confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_1)){return confirm(WP_Table_Reloaded_Admin.str_UninstallPluginLink_2)}else{return false}});f("a.cf_shortcode_link").click(function(){var i=prompt(WP_Table_Reloaded_Admin.str_CFShortcodeMessage,f(this).attr("title"));return false});f("a.table_shortcode_link").click(function(){var i=prompt(WP_Table_Reloaded_Admin.str_TableShortcodeMessage,f(this).attr("title"));return false});f(".postbox h3, .postbox .handlediv").click(function(){f(f(this).parent().get(0)).toggleClass("closed")})});
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: TobiasBg
3
  Donate link: http://tobias.baethge.com/donate/
4
  Tags: html,table,data,editor,csv,import,export,excel,widget,admin,sidebar
5
  Requires at least: 2.6
6
- Tested up to: 2.8.3
7
- Stable tag: 1.4
8
 
9
  WP-Table Reloaded enables you to create and manage tables in your WP's admin area. No HTML knowledge is needed. A comfortable backend allows to easily edit table data. You can include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
10
 
@@ -111,6 +111,9 @@ I'm also happy about [donations](http://tobias.baethge.com/donate/) or something
111
 
112
  == Changelog ==
113
 
 
 
 
114
  = Version 1.4 =
115
  * restyled "List of Tables" to suit WP 2.7/2.8 layout, list now sortable
116
  * added Table and shortcode Preview in the backend
3
  Donate link: http://tobias.baethge.com/donate/
4
  Tags: html,table,data,editor,csv,import,export,excel,widget,admin,sidebar
5
  Requires at least: 2.6
6
+ Tested up to: 2.8.4
7
+ Stable tag: 1.4.1
8
 
9
  WP-Table Reloaded enables you to create and manage tables in your WP's admin area. No HTML knowledge is needed. A comfortable backend allows to easily edit table data. You can include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
10
 
111
 
112
  == Changelog ==
113
 
114
+ = Version 1.4.1 =
115
+ * fixed small bug that led to occasional JavaScript timeout errors when editing large tables
116
+
117
  = Version 1.4 =
118
  * restyled "List of Tables" to suit WP 2.7/2.8 layout, list now sortable
119
  * added Table and shortcode Preview in the backend
wp-table-reloaded-admin.php CHANGED
@@ -3,7 +3,7 @@
3
  File Name: WP-Table Reloaded - Admin Class (see main file wp-table-reloaded.php)
4
  Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
5
  Description: Description: This plugin allows you to create and easily manage tables in the admin-area of WordPress. A comfortable backend allows an easy manipulation of table data. You can then include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
6
- Version: 1.4
7
  Author: Tobias B&auml;thge
8
  Author URI: http://tobias.baethge.com/
9
  Donate URI: http://tobias.baethge.com/donate/
@@ -14,7 +14,7 @@ define( 'WP_TABLE_RELOADED_TEXTDOMAIN', 'wp-table-reloaded' );
14
  class WP_Table_Reloaded_Admin {
15
 
16
  // ###################################################################################################################
17
- var $plugin_version = '1.4';
18
  // nonce for security of links/forms, try to prevent "CSRF"
19
  var $nonce_base = 'wp-table-reloaded-nonce';
20
  var $page_slug = 'wp_table_reloaded';
@@ -1196,7 +1196,9 @@ class WP_Table_Reloaded_Admin {
1196
  foreach ( $table_row as $col_idx => $cell_content ) {
1197
  $cell_content = $this->safe_output( $cell_content );
1198
  $cell_name = "table[data][{$row_idx}][{$col_idx}]";
1199
- echo "\t<td><textarea rows=\"1\" cols=\"20\" name=\"{$cell_name}\" class=\"edit_row_{$row_idx} edit_col_{$col_idx}\">{$cell_content}</textarea></td>\n";
 
 
1200
  }
1201
  $insert_row_url = $this->get_action_url( array( 'action' => 'insert', 'table_id' => $table['id'], 'item' => 'row', 'element_id' => $row_idx ), true );
1202
  $delete_row_url = $this->get_action_url( array( 'action' => 'delete', 'table_id' => $table['id'], 'item' => 'row', 'element_id' => $row_idx ), true );
@@ -1204,7 +1206,7 @@ class WP_Table_Reloaded_Admin {
1204
  if ( 1 < $rows ) // don't show delete link for last and only row
1205
  echo " | <a class=\"delete_row_link\" href=\"{$delete_row_url}\">".__( 'Delete Row', WP_TABLE_RELOADED_TEXTDOMAIN )."</a>";
1206
  echo "</td>\n";
1207
- $checked = ( isset( $table['visibility']['rows'][$col_idx] ) && true == $table['visibility']['rows'][$row_idx] ) ? 'checked="checked" ': '' ;
1208
  echo "\t<td class=\"check-column\"><input type=\"checkbox\" name=\"table[visibility][rows][{$row_idx}]\" id=\"edit_row_{$row_idx}\" value=\"true\" {$checked}/> <label for=\"edit_row_{$row_idx}\">" . __( 'Row hidden', WP_TABLE_RELOADED_TEXTDOMAIN ) ."</label></td>\n";
1209
  echo "\t<th scope=\"row\">{$output_idx}</th>\n";
1210
  echo "</tr>";
3
  File Name: WP-Table Reloaded - Admin Class (see main file wp-table-reloaded.php)
4
  Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
5
  Description: Description: This plugin allows you to create and easily manage tables in the admin-area of WordPress. A comfortable backend allows an easy manipulation of table data. You can then include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
6
+ Version: 1.4.1
7
  Author: Tobias B&auml;thge
8
  Author URI: http://tobias.baethge.com/
9
  Donate URI: http://tobias.baethge.com/donate/
14
  class WP_Table_Reloaded_Admin {
15
 
16
  // ###################################################################################################################
17
+ var $plugin_version = '1.4.1';
18
  // nonce for security of links/forms, try to prevent "CSRF"
19
  var $nonce_base = 'wp-table-reloaded-nonce';
20
  var $page_slug = 'wp_table_reloaded';
1196
  foreach ( $table_row as $col_idx => $cell_content ) {
1197
  $cell_content = $this->safe_output( $cell_content );
1198
  $cell_name = "table[data][{$row_idx}][{$col_idx}]";
1199
+ $hidden = ( isset( $table['visibility']['rows'][$col_idx] ) && true == $table['visibility']['rows'][$row_idx] ) ? ' row-hidden' : '';
1200
+ $hidden .= ( isset( $table['visibility']['columns'][$col_idx] ) && true == $table['visibility']['columns'][$col_idx] ) ? ' column-hidden' : '';
1201
+ echo "\t<td><textarea rows=\"1\" cols=\"20\" name=\"{$cell_name}\" class=\"edit_row_{$row_idx} edit_col_{$col_idx}{$hidden}\">{$cell_content}</textarea></td>\n";
1202
  }
1203
  $insert_row_url = $this->get_action_url( array( 'action' => 'insert', 'table_id' => $table['id'], 'item' => 'row', 'element_id' => $row_idx ), true );
1204
  $delete_row_url = $this->get_action_url( array( 'action' => 'delete', 'table_id' => $table['id'], 'item' => 'row', 'element_id' => $row_idx ), true );
1206
  if ( 1 < $rows ) // don't show delete link for last and only row
1207
  echo " | <a class=\"delete_row_link\" href=\"{$delete_row_url}\">".__( 'Delete Row', WP_TABLE_RELOADED_TEXTDOMAIN )."</a>";
1208
  echo "</td>\n";
1209
+ $checked = ( isset( $table['visibility']['rows'][$row_idx] ) && true == $table['visibility']['rows'][$row_idx] ) ? 'checked="checked" ': '' ;
1210
  echo "\t<td class=\"check-column\"><input type=\"checkbox\" name=\"table[visibility][rows][{$row_idx}]\" id=\"edit_row_{$row_idx}\" value=\"true\" {$checked}/> <label for=\"edit_row_{$row_idx}\">" . __( 'Row hidden', WP_TABLE_RELOADED_TEXTDOMAIN ) ."</label></td>\n";
1211
  echo "\t<th scope=\"row\">{$output_idx}</th>\n";
1212
  echo "</tr>";
wp-table-reloaded-frontend.php CHANGED
@@ -3,7 +3,7 @@
3
  File Name: WP-Table Reloaded - Frontend Class (see main file wp-table-reloaded.php)
4
  Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
5
  Description: Description: This plugin allows you to create and easily manage tables in the admin-area of WordPress. A comfortable backend allows an easy manipulation of table data. You can then include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
6
- Version: 1.4
7
  Author: Tobias B&auml;thge
8
  Author URI: http://tobias.baethge.com/
9
  Donate URI: http://tobias.baethge.com/donate/
3
  File Name: WP-Table Reloaded - Frontend Class (see main file wp-table-reloaded.php)
4
  Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
5
  Description: Description: This plugin allows you to create and easily manage tables in the admin-area of WordPress. A comfortable backend allows an easy manipulation of table data. You can then include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
6
+ Version: 1.4.1
7
  Author: Tobias B&auml;thge
8
  Author URI: http://tobias.baethge.com/
9
  Donate URI: http://tobias.baethge.com/donate/
wp-table-reloaded.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-Table Reloaded
4
  Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
5
  Description: This plugin allows you to create and easily manage tables in the admin-area of WordPress. A comfortable backend allows an easy manipulation of table data. You can then include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
6
- Version: 1.4
7
  Author: Tobias B&auml;thge
8
  Author URI: http://tobias.baethge.com/
9
  Author eMail: wordpress@tobias.baethge.com
3
  Plugin Name: WP-Table Reloaded
4
  Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
5
  Description: This plugin allows you to create and easily manage tables in the admin-area of WordPress. A comfortable backend allows an easy manipulation of table data. You can then include the tables into your posts, on your pages or in text widgets by using a shortcode or a template tag function. Tables can be imported and exported from/to CSV, XML and HTML.
6
+ Version: 1.4.1
7
  Author: Tobias B&auml;thge
8
  Author URI: http://tobias.baethge.com/
9
  Author eMail: wordpress@tobias.baethge.com