From a5b2ccaad0f2b8de0d0f9b136451b9ee2a9409fd Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Tue, 12 Jul 2011 01:50:36 +0000 Subject: [PATCH] updates for menu management - select list generator copy still referenced moniker and had to be updated --- .../VTwo/SelectListGeneratorVTwo.java | 29 +------------------ webapp/web/js/menupage/menumanagement_edit.js | 4 +-- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/SelectListGeneratorVTwo.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/SelectListGeneratorVTwo.java index fda8fa5b4..2c28f2c09 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/SelectListGeneratorVTwo.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/SelectListGeneratorVTwo.java @@ -281,34 +281,7 @@ public class SelectListGeneratorVTwo { } } } - break; - case MONIKERS_VIA_VCLASS: //so we have a vclass URI - vclassUri = field.getObjectClassUri(); - if (vclassUri==null || vclassUri.equals("")){ - log.error("no vclassUri found for field \""+fieldName+"\" in SelectListGenerator.getOptions() when OptionsType MONIKERS_VIA_VCLASS specified"); - } else { - // first test to see whether there's a default "leave blank" value specified with the literal options - String defaultOption=null; - if ((defaultOption=getDefaultOption(field))!=null) { - optionsMap.put(LEFT_BLANK, defaultOption); - } - // now populate the options - if( wDaoFact == null ) log.error("could not get WebappDaoFactory from request in SelectListGenerator.getOptions()."); - - VClass vclass = wDaoFact.getVClassDao().getVClassByURI( vclassUri ); - if( vclass == null ) { - log.error("Cannot find owl:Class " + vclassUri + " in the model" ); - optionsMap.put("", "Could not find class " + vclassUri); - }else{ - List individuals = wDaoFact.getIndividualDao().getIndividualsByVClassURI(vclass.getURI(),-1,-1); - if (individuals.size()==0){ - log.error("No individuals of type "+vclass.getName()+" to add to pick list in SelectListGenerator.getOptions(); check portal visibility"); - optionsMap.put("", "No " + vclass.getName() + " found"); - } - } - } - break; - + break; case CHILD_VCLASSES: //so we have a vclass URI vclassUri = field.getObjectClassUri(); if (vclassUri==null || vclassUri.equals("")){ diff --git a/webapp/web/js/menupage/menumanagement_edit.js b/webapp/web/js/menupage/menumanagement_edit.js index d7cee5337..0063c76e4 100644 --- a/webapp/web/js/menupage/menumanagement_edit.js +++ b/webapp/web/js/menupage/menumanagement_edit.js @@ -18,14 +18,12 @@ var menuManagementEdit = { bindEventListeners: function() { // Listeners for vClass switching this.changeContentType.click(function() { - alert("change content type"); menuManagementEdit.showClassGroups(); return false; }); this.selectClassGroupDropdown.change(function() { - alert("select class group dropdown"); + alert("class group change"); chooseClassGroup(); - return false; }); }, showClassGroups: function() {