Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item1268: this looks promising
git-svn-id: http://svn.foswiki.org/branches/Release01x00@3076 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
ArthurClemens authored and ArthurClemens committed Mar 14, 2009
1 parent c1e85f7 commit 9f72b1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion EditTablePlugin/data/System/EditTablePlugin.txt
Expand Up @@ -155,7 +155,7 @@ a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, =
* Set SHORTDESCRIPTION = Edit tables using edit fields, date pickers and drop down boxes

* Set DEBUG to 1 to get debug messages in =data/debug.txt=. Default: =0=
* Set DEBUG = 0
* Set DEBUG = 1

* Set JAVASCRIPTINTERFACE to 1 to be able to directly move and delete row without page refresh. Can be overridden with parameter =javascriptinterface=.
* Set JAVASCRIPTINTERFACE = 1
Expand Down
3 changes: 1 addition & 2 deletions EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin/Core.pm
Expand Up @@ -1213,9 +1213,8 @@ sub inputElement {
unless ( $theValue eq '' );

#$theValue = "\*$theValue\*" if ( $isHeader and $digestedCellValue );
$text = "*$text" if $isHeader;
$text = "\*$text\*" if ($isHeader);
$text .= ' ' . hiddenField( $preSp, $theName, $theValue );
$text .= '*' if $isHeader;
}
elsif ( $type eq 'textarea' ) {
my ( $rows, $cols ) = split( /x/, $size );
Expand Down
9 changes: 6 additions & 3 deletions EditTablePlugin/pub/System/EditTablePlugin/edittable.js
Expand Up @@ -17,7 +17,7 @@ var sEditTable;
// array of edittables
var sRowSelection;
var sAlternatingColors = [];
var DEBUG = 0; // not used
var DEBUG = 0;

/**
Expand Down Expand Up @@ -110,16 +110,19 @@ function submitHandler(evt) {

var ilen = sEditTable.numrows;

var DEBUG_TXT = "";
for (var rowpos = 0; rowpos < ilen; rowpos++) {
var inpname = 'etrow_id' + (rowpos + 1);
var row_id = sEditTable.revidx[rowpos] + 1;
var row_id = sEditTable.revidx[rowpos + 1];
if (!row_id) continue;
DEBUG_TXT += rowpos + ",row_id=" + row_id + ";";
var inp = document.createElement('INPUT');
inp.setAttribute('type', 'hidden');
inp.setAttribute('name', inpname);
inp.setAttribute('value', '' + row_id);
sEditTable.tableform.appendChild(inp);
}

if (DEBUG) alert(DEBUG_TXT);
return true;
}

Expand Down

0 comments on commit 9f72b1f

Please sign in to comment.