[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Mon Jul 11 10:25:04 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/1fcb6f048156/
changeset:   1fcb6f048156
branch:      release-v1.4.2
user:        kindly
date:        2011-07-10 23:52:16
summary:     [js] ticket 1215 fix it so cant remove last row from resources
affected #:  1 file (90 bytes)

--- a/ckan/public/scripts/flexitable.js	Fri Jul 08 15:36:20 2011 +0100
+++ b/ckan/public/scripts/flexitable.js	Sun Jul 10 22:52:16 2011 +0100
@@ -62,7 +62,11 @@
     if (confirm('Are you sure you wish to remove this row?')) {
       var row = $(this).parents('tr'),
           following = row.nextAll();
-      
+
+      if (following.length == 0) {
+          row.find('input').val('')
+          return
+      }
       row.remove();
       following.each(function () {
         setRowNumber(this, getRowNumber(this) - 1);


http://bitbucket.org/okfn/ckan/changeset/0b1bf548e745/
changeset:   0b1bf548e745
branch:      release-v1.4.2
user:        kindly
date:        2011-07-10 23:57:07
summary:     [js] ticket 1215 fix so can now remove last row also
affected #:  1 file (47 bytes)

--- a/ckan/public/scripts/flexitable.js	Sun Jul 10 22:52:16 2011 +0100
+++ b/ckan/public/scripts/flexitable.js	Sun Jul 10 22:57:07 2011 +0100
@@ -62,8 +62,9 @@
     if (confirm('Are you sure you wish to remove this row?')) {
       var row = $(this).parents('tr'),
           following = row.nextAll();
+          prev = row.prevAll();
 
-      if (following.length == 0) {
+      if (following.length + prev.length  == 0) {
           row.find('input').val('')
           return
       }

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list