Skip to content

Commit

Permalink
Fix that takes care of the data grid "Delete Row" button showing 0 an…
Browse files Browse the repository at this point in the history
…d -1 which don't make sense... Issues #262 and #266
  • Loading branch information
JohnSmith-LT committed May 20, 2015
1 parent 6839ffb commit 34e0683
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions editor/js/toolbox.js
Expand Up @@ -1170,14 +1170,22 @@ var EDITOR = (function ($, parent) {
}
},
onCellSelect: function(iRow, iCol, content, event) {
console.log("Select cell: " + iRow + ", " + iCol);
jqGridsColSel[key] = iCol;
console.log("Select cell: " + iRow + ", " + iCol); // iRow is strangely always the data in cell 1??
var delbutton = $('#' + id + '_delcol');
delbutton.html("");
delbutton.append($('<img>').attr('src', 'editor/img/delete.gif').height(14))
.append(language.btnDelColumn.$label + ' ' + iCol);
delbutton.switchClass('disabled', 'enabled');
delbutton.prop('disabled', false);
if (iCol > 0) {
jqGridsColSel[key] = iCol;
delbutton.append($('<img>').attr('src', 'editor/img/delete.gif').height(14))
.append(language.btnDelColumn.$label + ' ' + iCol);
delbutton.switchClass('disabled', 'enabled');
delbutton.prop('disabled', false);
}
else {
delbutton.append($('<img>').attr('src', 'editor/img/delete.gif').height(14))
.append(language.btnDelColumn.$label);
delbutton.switchClass('enabled', 'disabled');
delbutton.prop('disabled', true);
}
}

});
Expand Down

0 comments on commit 34e0683

Please sign in to comment.