X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=blobdiff_plain;f=public%2Fedit_table.js;h=f57f833f1db30b8682790167bf72efac0ab0c5f4;hp=3fc390f670f9f8bfc12e4d4ba0cadf0ab5fce2af;hb=HEAD;hpb=c054774aaeaf735809d65a7558aae1405538d670
diff --git a/public/edit_table.js b/public/edit_table.js
index 3fc390f..f57f833 100644
--- a/public/edit_table.js
+++ b/public/edit_table.js
@@ -13,8 +13,13 @@ var cell_blur = function() {
*/
var _row_id = $(this).parent().parent().attr('title');
- var x = $(this).parent().attr('cellIndex');
- var y = $(this).parent().parent().attr('rowIndex');
+ var x = $(this).parent().index();
+ var y = $(this).parent().parent().index();
+
+ if ( x == null || y == null ) {
+ console.error('no x ', x, ' or y ', y, ' defined');
+ return;
+ }
var new_content = $(this).val();
// $(this).replaceWith( new_content );
@@ -32,8 +37,7 @@ var cell_blur = function() {
if ( ! data ) {
data = new_content; // fallback to submited data for 304
} else {
- if ( $('a.save_actions').length == 0 )
- $('a.actions').before('save')
+ $('span.save_actions').show();
}
var vals = data.split('¶');
data = vals.join('¶');