| TOTAL | | | |
@@ -97,6 +97,11 @@ Usage
return false; // reject change
}
});
+
+
+Disable editing on some cells by adding a class to them
+
+$('#table').editableTableWidget({disableClass: "edit-disabled"});
diff --git a/mindmup-editabletable.js b/mindmup-editabletable.js
index 36be540..3a679ff 100644
--- a/mindmup-editabletable.js
+++ b/mindmup-editabletable.js
@@ -14,7 +14,7 @@ $.fn.editableTableWidget = function (options) {
active,
showEditor = function (select) {
active = element.find('td:focus');
- if (active.length) {
+ if (active.length && !active.hasClass(activeOptions.disableClass)) {
editor.val(active.text())
.removeClass('error')
.show()
@@ -126,6 +126,7 @@ $.fn.editableTableWidget.defaultOptions = {
cloneProperties: ['padding', 'padding-top', 'padding-bottom', 'padding-left', 'padding-right',
'text-align', 'font', 'font-size', 'font-family', 'font-weight',
'border', 'border-top', 'border-bottom', 'border-left', 'border-right'],
+ disableClass: 'edit-disabled',
editor: $('')
};