Changeset 2167
- Timestamp:
- Apr 19, 2006, 4:05:58 PM (17 years ago)
- Location:
- trunk/www
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/common/import/index.jsp
r1945 r2167 153 153 int pluginConfigurationId = Values.getInt(request.getParameter("pluginconfiguration_id")); 154 154 155 if (pluginDefinitionId == 0 || pluginConfigurationId == 0)155 if (pluginDefinitionId == -1 || pluginConfigurationId == -1) 156 156 { 157 157 // Auto-detect was selected … … 181 181 int pluginDefinitionId = Values.getInt(request.getParameter("plugindefinition_id")); 182 182 PluginDefinition plugin = null; 183 if (pluginDefinitionId != 0)183 if (pluginDefinitionId != -1) 184 184 { 185 185 plugin = PluginDefinition.getById(dc, pluginDefinitionId); … … 202 202 plugin = plugins.entrySet().iterator().next().getKey(); 203 203 List<PluginConfiguration> configList = plugins.get(plugin); 204 if (configList.size() == 1) 205 { 206 // TODO - case when configList == 0 204 if (configList != null && configList.size() > 1) 205 { 206 // Multiple configurations matches 207 matches = configList.size(); 208 } 209 else 210 { 211 // 0 or 1 configuration matched 212 PluginConfiguration pc = null; 213 if (configList != null && configList.size() == 1) 214 { 215 pc = configList.get(0); 216 } 207 217 redirect = "../plugin/index.jsp?ID="+ID+ 208 "&cmd=NewJob&pluginconfiguration_id="+configList.get(0).getId()+ 218 "&cmd=NewJob" + 219 (pc == null ? "" : "&pluginconfiguration_id="+ pc.getId()) + 209 220 "&plugindefinition_id="+plugin.getId()+ 210 221 "&title="+request.getParameter("title")+ … … 215 226 "&context_type="+context.getType().name(); 216 227 } 217 else218 {219 matches = configList.size();220 }221 228 } 222 229 if (matches > 1) -
trunk/www/include/scripts/plugin.js
r1985 r2167 3 3 BioArray Software Environment (BASE) - http://base.thep.lu.se/ 4 4 Copyright (C) 2002-2004 Lao Saal, Carl Troein, 5 Johan Vallon-Christersson, Jari H äkkinen, Nicklas Nordborg5 Johan Vallon-Christersson, Jari H?kkinen, Nicklas Nordborg 6 6 7 7 This file is part of BASE. … … 36 36 this.populateLists = function(pluginList, configurationList) 37 37 { 38 pluginList[pluginList.length] = new Option('- auto detect -', 0);38 pluginList[pluginList.length] = new Option('- auto detect -', '-1'); 39 39 var numAutodetecting = 0; 40 40 for (var i = 0; i < this.allPlugins.length; i++) … … 44 44 if (plugin.autodetection) 45 45 { 46 option.text += ' '+String.fromCharCode(215); // 215 = ×(multiplication sign)46 option.text += ' '+String.fromCharCode(215); // 215 = x (multiplication sign) 47 47 numAutodetecting++; 48 48 } … … 64 64 if (plugin.autodetection) 65 65 { 66 list[list.length] = new Option('- auto detect -', 0);66 list[list.length] = new Option('- auto detect -', '-1'); 67 67 } 68 68 for (var i = 0; i < plugin.configurations.length; i++) … … 74 74 else 75 75 { 76 list[list.length] = new Option('- auto detect -', 0);76 list[list.length] = new Option('- auto detect -', '-1'); 77 77 } 78 78 }
Note: See TracChangeset
for help on using the changeset viewer.