projects
/
MojoFacets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hard-coded primary key on first column
[MojoFacets.git]
/
public
/
edit_table.js
diff --git
a/public/edit_table.js
b/public/edit_table.js
index
11c3f2f
..
73404fe
100644
(file)
--- a/
public/edit_table.js
+++ b/
public/edit_table.js
@@
-2,10
+2,14
@@
$(document).ready( function() {
var cell_blur = function() {
console.debug( 'cell_blur'
var cell_blur = function() {
console.debug( 'cell_blur'
-
, this
-
, $(this).val()
+
//
, this
+
//
, $(this).val()
);
);
+ // FIXME primary key is fixed to 1st column
+ var pk = $('table tr th:nth(0) > a').text();
+ var id = $(this).parent().siblings(':nth(0)').text()
+
var x = $(this).parent().attr('cellIndex');
var y = $(this).parent().parent().attr('rowIndex');
var x = $(this).parent().attr('cellIndex');
var y = $(this).parent().parent().attr('rowIndex');
@@
-19,7
+23,7
@@
var cell_blur = function() {
$(this).replaceWith( content );
var name = $('table tr th:nth('+x+') > a').text();
$(this).replaceWith( content );
var name = $('table tr th:nth('+x+') > a').text();
- console.info( x, y, name, content );
+ console.info( x, y,
pk, id,
name, content );
}
var cell_click = function(event) {
}
var cell_click = function(event) {