From ac2de873175b9d0a4f25091aa96af29dff148039 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:30:49 +0100 Subject: [PATCH 01/11] Update mindmup-editabletable.js added preventColumns --- mindmup-editabletable.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mindmup-editabletable.js b/mindmup-editabletable.js index 36be540..65b6c23 100644 --- a/mindmup-editabletable.js +++ b/mindmup-editabletable.js @@ -15,6 +15,12 @@ $.fn.editableTableWidget = function (options) { showEditor = function (select) { active = element.find('td:focus'); if (active.length) { + + if ($.inArray(active.index() + 1, activeOptions.preventColumns) != -1) { + active.blur(); + return; + } + editor.val(active.text()) .removeClass('error') .show() From 00c0ce7ebdeef21bf67161edac848b889082c456 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:35:09 +0100 Subject: [PATCH 02/11] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0ceb596..d44a0be 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ CSS) Basic Usage ----------- +Added features: +* Added the possibility to prevent edit of certain columns. For example if second and third column chould not be editable you simply initializes the table as: $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); +* + See http://mindmup.github.com/editable-table/ Dependencies From d2eda209d86d8b5221e7f7c1d1cc10a9f3076529 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:38:36 +0100 Subject: [PATCH 03/11] Update README.md --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d44a0be..6cdc4d8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + editable-table ================= @@ -15,12 +17,15 @@ CSS) * Works well with Bootstrap * Depends only on jQuery -Basic Usage +Extended Features ----------- -Added features: * Added the possibility to prevent edit of certain columns. For example if second and third column chould not be editable you simply initializes the table as: $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); -* + +Thanks Gojko Adzic for a nice and light weighted library! + +Basic Usage +----------- See http://mindmup.github.com/editable-table/ From f1b8aab656e27fcaa2ab51ce20fc1f5baa28c154 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:39:23 +0100 Subject: [PATCH 04/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cdc4d8..cb8ebe5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CSS) Extended Features ----------- -* Added the possibility to prevent edit of certain columns. For example if second and third column chould not be editable you simply initializes the table as: $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); +* Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); Thanks Gojko Adzic for a nice and light weighted library! From 0417f2f85b67557731b44f95e12ebbe74b311655 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:41:03 +0100 Subject: [PATCH 05/11] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb8ebe5..d3d11fe 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ CSS) Extended Features ----------- -* Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); +* Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: + $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); Thanks Gojko Adzic for a nice and light weighted library! From 1600ff3a617a638be3664eb49b02b5acf0e6738a Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:41:29 +0100 Subject: [PATCH 06/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d3d11fe..5a388f7 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Extended Features ----------- * Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: + $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); Thanks Gojko Adzic for a nice and light weighted library! From ab5d32c9b744dc38363654356d0c25bf675adf77 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:43:20 +0100 Subject: [PATCH 07/11] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a388f7..c4933f3 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ Extended Features ----------- * Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: - +```example $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); - +``` Thanks Gojko Adzic for a nice and light weighted library! Basic Usage From 6b03294491f314bdb908e7dad1ddccaedf8d47a6 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:43:38 +0100 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4933f3..da49165 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CSS) Extended Features ----------- -* Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: +1. Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: ```example $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); ``` From 4bbdb4428f052cefc89d9f807c8b4097a79981a9 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:46:40 +0100 Subject: [PATCH 09/11] Update mindmup-editabletable.js --- mindmup-editabletable.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mindmup-editabletable.js b/mindmup-editabletable.js index 65b6c23..d9abcfe 100644 --- a/mindmup-editabletable.js +++ b/mindmup-editabletable.js @@ -16,6 +16,7 @@ $.fn.editableTableWidget = function (options) { active = element.find('td:focus'); if (active.length) { + // Prevent edit of the columns specified if ($.inArray(active.index() + 1, activeOptions.preventColumns) != -1) { active.blur(); return; From 8a067fca50a53554e383fde8940c867bd159680d Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:48:26 +0100 Subject: [PATCH 10/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da49165..5e74c46 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ CSS) Extended Features ----------- -1. Added the possibility to prevent edit of certain columns. For example if second and third column not should be editable, you simply initializes the table as: +1. Added the possibility to prevent edit of certain columns. Maybe you have a remove link or something that should be handled differently. For example if second and third column not should be editable, you simply initializes the table as: ```example $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); ``` From a3a6bcd7c3ea73013424d3eb4565e16928c5c1e9 Mon Sep 17 00:00:00 2001 From: icytin Date: Wed, 4 Mar 2015 18:48:59 +0100 Subject: [PATCH 11/11] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5e74c46..0d542f8 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ CSS) * Works well with Bootstrap * Depends only on jQuery +Basic Usage +----------- + +See http://mindmup.github.com/editable-table/ + Extended Features ----------- @@ -24,12 +29,8 @@ Extended Features ```example $('#table').editableTableWidget({ editor: $(''), preventColumns: [ 2, 3 ] }); ``` -Thanks Gojko Adzic for a nice and light weighted library! -Basic Usage ------------ - -See http://mindmup.github.com/editable-table/ +Thanks Gojko Adzic for a nice and light weighted library! Dependencies ------------