From 8f6162218e48546b0826f2f6e64a7caf88b29abb Mon Sep 17 00:00:00 2001 From: rjy7 Date: Fri, 20 Aug 2010 14:51:10 +0000 Subject: [PATCH] Comments --- .../edit/forms/css/addAuthorsToInformationResource.css | 3 ++- .../edit/forms/js/addAuthorsToInformationResource.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/productMods/edit/forms/css/addAuthorsToInformationResource.css b/productMods/edit/forms/css/addAuthorsToInformationResource.css index cc6e39ed..e9c526d5 100644 --- a/productMods/edit/forms/css/addAuthorsToInformationResource.css +++ b/productMods/edit/forms/css/addAuthorsToInformationResource.css @@ -10,7 +10,8 @@ } /* Use class dd rather than jQuery UI's class ui-sortable, so that we can remove - * the class if there's fewer than one author. + * the class if there's fewer than one author. We don't want to remove the ui-sortable + * class, in case we want to re-enable DD without a page reload. */ #authorships.dd li { padding-left: 1em; diff --git a/productMods/edit/forms/js/addAuthorsToInformationResource.js b/productMods/edit/forms/js/addAuthorsToInformationResource.js index f7c97a85..fe88b424 100644 --- a/productMods/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/edit/forms/js/addAuthorsToInformationResource.js @@ -655,10 +655,14 @@ var addAuthorForm = { // Disable DD and associated cues if only one author remains disableAuthorDD: function() { var authorships = $('#authorships'), - authorship = $('.authorship'), authorNameWrapper = $('.authorNameWrapper'); authorships.sortable({ disable: true } ); + + // Use class dd rather than jQuery UI's class ui-sortable, so that we can remove + // the class if there's fewer than one author. We don't want to remove the ui-sortable + // class, in case we want to re-enable DD without a page reload (e.g., if implementing + // adding an author via Ajax request). authorships.removeClass('dd'); authorNameWrapper.removeAttr('title');