[ckan-changes] commit/ckan: zephod: [ux, package/edit][s]: (refs #1296) Reenable reset button.
Bitbucket
commits-noreply at bitbucket.org
Thu Sep 8 16:41:59 UTC 2011
1 new changeset in ckan:
http://bitbucket.org/okfn/ckan/changeset/15fa14b7ce2b/
changeset: 15fa14b7ce2b
branch: feature-1294-ux-improvements-dataset
user: zephod
date: 2011-09-08 17:01:49
summary: [ux,package/edit][s]: (refs #1296) Reenable reset button.
affected #: 1 file (270 bytes)
--- a/ckan/public/scripts/application.js Thu Sep 08 15:54:02 2011 +0100
+++ b/ckan/public/scripts/application.js Thu Sep 08 16:01:49 2011 +0100
@@ -413,19 +413,26 @@
events: {
'click .action-resource-tab': 'clickAdd',
- 'click #reset': 'reset'
+ 'click input[name=reset]': 'reset'
},
reset: function(e) {
e.preventDefault();
+ this.el.find('.tabs a').removeClass('selected');
+ this.deleteSubpane();
+ },
+ deleteSubpane: function() {
+ this.el.find('.resource-add-subpane').remove();
},
clickAdd: function(e) {
e.preventDefault();
var action = $(e.target).attr('action');
+ this.el.find('.tabs a').removeClass('selected');
+ this.el.find('.tabs a[action='+action+']').addClass('selected');
- $(this.el).find('.resource-add-subpane').remove();
+ this.deleteSubpane();
var $subPane = $('<div />').addClass('resource-add-subpane');
this.el.append($subPane);
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