From 700131cfee89ed234ab5839ac010603226ae6b6f Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 18 Jun 2014 16:34:23 -0400 Subject: [PATCH 1/2] fixed autocomplete issue with adding organizations to authorships --- .../edit/forms/js/addAuthorsToInformationResource.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js b/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js index 83f2c5be..55151aba 100644 --- a/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js @@ -581,6 +581,10 @@ var addAuthorForm = { this.labelField.val(name); } + // If user selected org via autocomplete, clear the org name field + if ( this.orgUriField.val() != '' ) { + this.orgName.val(""); + } }, @@ -765,6 +769,7 @@ var addAuthorForm = { if ( authType == "org" ) { this.personSection.hide(); this.orgSection.show(); + this.orgNameWrapper.show(); // person fields this.personRadio.attr('checked', false); // needed for reset when cancel button is clicked this.acSelector.removeClass("acSelector"); From a28bb52e5ca756afed98c5af11201490f9245299 Mon Sep 17 00:00:00 2001 From: j2blake Date: Wed, 18 Jun 2014 17:16:38 -0400 Subject: [PATCH 2/2] VIVO-801 Improved the prompts on the RDB migrator --- .../utilities/rdbmigration/RdbMigrator.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/utilities/rdbmigration/src/edu/cornell/mannlib/vivo/utilities/rdbmigration/RdbMigrator.java b/utilities/rdbmigration/src/edu/cornell/mannlib/vivo/utilities/rdbmigration/RdbMigrator.java index 0ab7b1c2..cf7ac861 100644 --- a/utilities/rdbmigration/src/edu/cornell/mannlib/vivo/utilities/rdbmigration/RdbMigrator.java +++ b/utilities/rdbmigration/src/edu/cornell/mannlib/vivo/utilities/rdbmigration/RdbMigrator.java @@ -209,12 +209,20 @@ public class RdbMigrator { return true; } - private void askMigrateAllModels() throws IOException { - try { - ask("Migrate all models? (y/n)"); - } catch (UserDeclinedException e) { - modelsToCopy = EXPECTED_MODELS; + private void askMigrateAllModels() throws IOException, UserDeclinedException { + System.out.println("Migrate all models, or only the required models?\n" + + " Enter 'all' or 'only', or anything else to quit."); + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + String s = br.readLine(); + if (s != null) { + if (s.trim().toLowerCase().equals("all")) { + return; + } else if (s.trim().toLowerCase().equals("only")) { + modelsToCopy = EXPECTED_MODELS; + return; + } } + throw new UserDeclinedException("Enter 'all' or 'only'."); } private void askApprovalForMigrationPlan() throws SQLException, @@ -334,6 +342,7 @@ public class RdbMigrator { // Main routine // ---------------------------------------------------------------------- + @SuppressWarnings("unused") public static void main(String[] args) { if (args.length != 4) { System.out.println("Usage: RdbMigrator vivoHomeDir, jdbcUrl, "