Changeset 5372
- Timestamp:
- Jun 24, 2010, 2:28:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/userdoc/export_data.xml
r4889 r5372 117 117 <varlistentry> 118 118 <term> 119 <guilabel>Plugin </guilabel>119 <guilabel>Plugin + configuration</guilabel> 120 120 </term> 121 121 <listitem> 122 122 <para> 123 Select the plug-in to use. Only plug-ins that supports the current 124 context and that the logged in user has permission to use are 125 available in the list. 126 </para> 127 </listitem> 128 </varlistentry> 129 <varlistentry> 130 <term> 131 <guilabel>Configuration</guilabel> 132 </term> 133 <listitem> 134 <para> 135 Select the configuration that should be used together with the plug-in. 136 Not all plug-ins supports configuration and this option is only visible 137 if the selected plug-in has this support. 123 Select the plug-in and configuration to use. The list only 124 shows combinations that the logged in user has permission 125 to use. 138 126 </para> 139 127 </listitem> -
trunk/doc/src/docbook/userdoc/import_data.xml
r4889 r5372 158 158 <variablelist> 159 159 <varlistentry> 160 <term><guilabel>Plugin</guilabel></term> 161 <listitem> 162 <para> 163 A list of all plug-ins that are available in the 164 current context. The list only includes plug-ins that 160 <term><guilabel>Plugin + file format</guilabel></term> 161 <listitem> 162 <para> 163 This is a combined list of plug-ins and their 164 respective file format configurations. The list only 165 includes combinations that 165 166 the logged in user has permission to use. If you select 166 a plug-in a short description of about it is displayed 167 an entry a short description of about the plug-in and configuration 168 is displayed 167 169 below the lists. More information about the plug-ins can 168 be found under the menu choice 170 be found under the menu choices 169 171 <menuchoice> 170 172 <guimenu>Administrate</guimenu> … … 172 174 <guisubmenu>Definitions</guisubmenu> 173 175 </menuchoice> 174 </para> 175 </listitem> 176 </varlistentry> 177 178 <varlistentry> 179 <term><guilabel>File format</guilabel></term> 180 <listitem> 181 <para> 182 A list of different file formats configurations 183 supported by the selected plug-in. 176 and 184 177 <menuchoice> 185 178 <guimenu>Administrate</guimenu> … … 188 181 </menuchoice>. 189 182 </para> 190 191 183 <note> 192 184 <title>File format vs. Configuration</title> … … 199 191 </simpara> 200 192 </note> 201 202 193 </listitem> 203 194 </varlistentry> 204 205 195 </variablelist> 206 196 … … 225 215 The auto detect function lets you select a file and have 226 216 BASE try to find a suitable plug-in and file format. This option is 227 selected by default in both the plug-in and file format listswhen there is217 selected by default in the combined plug-in and file format list when there is 228 218 at least one plug-in that supports auto detection. 229 219 </para> … … 237 227 238 228 <para> 239 Select the auto detect option either for both plug-ins and240 file formats or only for file formats to use this feature.241 Continue to the next step by clicking on the &gbNext;242 button.229 Select the <guilabel>auto detect (all)</guilabel> option to search for a file format 230 in all plug-ins that supports the feature, or select the <guilabel>auto detect (plugin)</guilabel> 231 option to only search the file formats for a specific plug-in. 232 Continue to the next step by clicking on the &gbNext; button. 243 233 </para> 244 234 … … 268 258 <variablelist> 269 259 <varlistentry> 260 <term><guilabel>Plugin</guilabel></term> 261 <listitem> 262 <para> 263 Displayes the selected plug-in or <guilabel>all</guilabel> if the 264 auto-detection is used on all supporting plug-ins. 265 </para> 266 </listitem> 267 </varlistentry> 268 <varlistentry> 270 269 <term><guilabel>File</guilabel></term> 271 270 <listitem> … … 280 279 </listitem> 281 280 </varlistentry> 282 281 <varlistentry> 282 <term><guilabel>Character set</guilabel></term> 283 <listitem> 284 <para> 285 The character set used in text files. If the selected file has been configured 286 with a character set the correct option is automatically selected. In all 287 cases, you have the option to override the default selection. Most files, 288 typically use one of the UTF-8 or ISO-8859-1 character sets. 289 </para> 290 </listitem> 291 </varlistentry> 283 292 <varlistentry> 284 293 <term><guilabel>Recently used</guilabel></term> -
trunk/www/common/import/select_file.jsp
r5327 r5372 31 31 import="net.sf.basedb.core.ItemContext" 32 32 import="net.sf.basedb.core.File" 33 import="net.sf.basedb.core.PluginDefinition" 33 34 import="net.sf.basedb.core.PluginConfiguration" 34 35 import="net.sf.basedb.core.PluginType" … … 66 67 final String title = request.getParameter("title"); 67 68 final DbControl dc = sc.newDbControl(); 69 final int pluginId = Values.getInt(request.getParameter("plugindefinition_id")); 70 PluginDefinition plugin = null; 71 if (pluginId > 0) 72 { 73 plugin = PluginDefinition.getById(dc, pluginId); 74 } 68 75 69 76 try … … 176 183 <input type="hidden" name="file_id" value=""> 177 184 178 <h3 class="docked"><%=title%> <base:help helpid="import.autodetect.selectfile" /></h3>185 <h3 class="docked"><%=title%> (auto-detect file format) <base:help helpid="import.autodetect.selectfile" /></h3> 179 186 <div class="boxed"> 180 187 <div class="helpmessage"> … … 182 189 </div> 183 190 <table class="form" width="100%"> 191 <tr valign="top"> 192 <td class="prompt">Plugin</td> 193 <td><%=plugin != null ? HTML.encodeTags(plugin.getName()) : "<i>- all -</i>"%></td> 194 </tr> 184 195 <tr valign="top"> 185 196 <td class="prompt">File</td> -
trunk/www/common/import/select_plugin.jsp
r5060 r5372 95 95 96 96 var lastSelectedPlugin; 97 var lastSelectedConfig; 97 98 function pluginOnChange() 98 99 { 99 100 var frm = document.forms['import']; 100 var pluginList = frm.plugindefinition_id; 101 var configurationList = frm.pluginconfiguration_id; 101 var pluginList = frm.plugins; 102 102 var plugin = pluginList[pluginList.selectedIndex].plugin; 103 Plugins.updateConfigurationsList(plugin, configurationList); 104 if (configurationList.length == 0) 105 { 106 Main.hide('configurations'); 103 var config = pluginList[pluginList.selectedIndex].configuration; 104 var selectedValue = pluginList[pluginList.selectedIndex].value; 105 106 if (lastSelectedPlugin) 107 { 108 Main.hide('description.'+lastSelectedPlugin.id); 109 } 110 if (lastSelectedConfig) 111 { 112 Main.hide('description.config.'+lastSelectedConfig.id); 113 } 114 Main.showHide('descriptions', plugin); 115 if (plugin) 116 { 117 Main.show('description.'+plugin.id); 118 frm.plugindefinition_id.value = plugin.id; 119 frm.pluginconfiguration_id.value = selectedValue == -1 ? -1 : 0; 107 120 } 108 121 else 109 122 { 110 Main.show('configurations'); 111 } 112 if (lastSelectedPlugin) 113 { 114 Main.hide('description.'+lastSelectedPlugin.id); 115 } 116 else 117 { 118 Main.show('descriptions'); 119 } 120 if (lastSelectedConfig) 121 { 122 Main.hide('description.config.'+lastSelectedConfig.id); 123 } 124 if (plugin) 125 { 126 Main.show('description.'+plugin.id); 127 } 128 else 129 { 130 Main.hide('descriptions'); 131 } 132 lastSelectedConfig = null; 123 frm.plugindefinition_id.value = selectedValue; 124 } 125 if (config) 126 { 127 Main.show('description.config.'+config.id); 128 frm.pluginconfiguration_id.value = config.id; 129 } 130 lastSelectedConfig = config; 133 131 lastSelectedPlugin = plugin; 134 132 } 135 136 var lastSelectedConfig; 137 function configOnChange() 133 134 function init() 138 135 { 139 136 var frm = document.forms['import']; 140 var configurationList = frm.pluginconfiguration_id; 141 var config = configurationList[configurationList.selectedIndex].configuration; 142 if (lastSelectedConfig) 143 { 144 Main.hide('description.config.'+lastSelectedConfig.id); 145 } 146 else 147 { 148 Main.show('descriptions'); 149 } 150 if (config) 151 { 152 Main.show('description.config.'+config.id); 153 } 154 else 155 { 156 Main.hide('descriptions'); 157 } 158 lastSelectedConfig = config; 159 } 160 161 function init() 162 { 163 var frm = document.forms['import']; 164 var pluginList = frm.plugindefinition_id; 165 var configurationList = frm.pluginconfiguration_id; 137 var pluginList = frm.plugins; 138 166 139 <% 167 140 PluginDefinition lastPlugin = null; … … 198 171 } 199 172 %> 200 Plugins.populateLists(pluginList, configurationList); 201 if (configurationList.length == 0) 202 { 203 Main.hide('configurations'); 204 } 205 else 206 { 207 Main.show('configurations'); 208 } 173 Plugins.populateLists(pluginList); 209 174 pluginOnChange(); 210 175 } … … 220 185 <input type="hidden" name="title" value="<%=title%>"> 221 186 <input type="hidden" name="warnIfOpen" value="1"> 187 <input type="hidden" name="plugindefinition_id" value=""> 188 <input type="hidden" name="pluginconfiguration_id" value=""> 222 189 223 190 <h3 class="docked"><%=title%> <base:help helpid="import.selectplugin" /></h3> … … 242 209 <table class="form" width="100%"> 243 210 <tr valign="top"> 244 <td class="prompt">Plugin </td>211 <td class="prompt">Plugin + file format</td> 245 212 <td> 246 <select name="plugin definition_id" class="required" onchange="pluginOnChange()">213 <select name="plugins" class="required" onchange="pluginOnChange()"> 247 214 </select> 248 215 <% … … 254 221 } 255 222 %> 256 </td>257 </tr>258 <tr valign="top" id="configurations">259 <td class="prompt">File format</td>260 <td>261 <select name="pluginconfiguration_id" onchange="configOnChange()">262 </select>263 223 </td> 264 224 </tr> … … 288 248 <div align=right> <i><base:icon image="required.gif" /> = required information</i></div> 289 249 <div id="descriptions" class="helpmessage" 290 style="height: <%=(int)(scale*270)%>px; overflow: auto; display: none;">250 style="height: <%=(int)(scale*270)%>px; overflow: auto;"> 291 251 <%=descriptions.toString()%> 292 252 </div> -
trunk/www/common/plugin/select_plugin.jsp
r5060 r5372 91 91 92 92 var lastSelectedPlugin; 93 var lastSelectedConfig; 93 94 function pluginOnChange() 94 95 { 95 96 var frm = document.forms['plugin']; 96 var pluginList = frm.plugindefinition_id; 97 var configurationList = frm.pluginconfiguration_id; 97 var pluginList = frm.plugins; 98 98 var plugin = pluginList[pluginList.selectedIndex].plugin; 99 Plugins.updateConfigurationsList(plugin, configurationList); 100 if (configurationList.length == 0) 101 { 102 Main.hide('configurations'); 103 } 104 else 105 { 106 Main.show('configurations'); 107 } 99 var config = pluginList[pluginList.selectedIndex].configuration; 100 108 101 if (lastSelectedPlugin) 109 102 { 110 103 Main.hide('description.'+lastSelectedPlugin.id); 111 104 } 112 else113 {114 Main.show('descriptions');115 }116 105 if (lastSelectedConfig) 117 106 { 118 107 Main.hide('description.config.'+lastSelectedConfig.id); 119 108 } 120 Main.show('description.'+plugin.id); 109 if (plugin) 110 { 111 Main.show('description.'+plugin.id); 112 frm.plugindefinition_id.value = plugin.id; 113 frm.pluginconfiguration_id.value = 0; 114 } 115 if (config) 116 { 117 Main.show('description.config.'+config.id); 118 frm.pluginconfiguration_id.value = config.id; 119 } 120 lastSelectedConfig = config; 121 121 lastSelectedPlugin = plugin; 122 lastSelectedConfig = null;123 configOnChange();124 }125 126 var lastSelectedConfig;127 function configOnChange()128 {129 var frm = document.forms['plugin'];130 var configurationList = frm.pluginconfiguration_id;131 if (configurationList.selectedIndex < 0) return;132 var config = configurationList[configurationList.selectedIndex].configuration;133 if (lastSelectedConfig)134 {135 Main.hide('description.config.'+lastSelectedConfig.id);136 }137 else138 {139 Main.show('descriptions');140 }141 if (config)142 {143 Main.show('description.config.'+config.id);144 }145 else146 {147 Main.hide('descriptions');148 }149 lastSelectedConfig = config;150 122 } 151 123 … … 153 125 { 154 126 var frm = document.forms['plugin']; 155 var pluginList = frm.plugindefinition_id; 156 var configurationList = frm.pluginconfiguration_id; 127 var pluginList = frm.plugins; 157 128 <% 158 129 PluginDefinition lastPlugin = null; … … 188 159 } 189 160 %> 190 Plugins.populateLists(pluginList , configurationList);161 Plugins.populateLists(pluginList); 191 162 pluginOnChange(); 192 163 } … … 203 174 <input type="hidden" name="title" value="<%=title%>"> 204 175 <input type="hidden" name="warnIfOpen" value="1"> 176 <input type="hidden" name="plugindefinition_id" value=""> 177 <input type="hidden" name="pluginconfiguration_id" value=""> 205 178 206 179 <h3 class="docked"><%=title%> <base:help helpid="runplugin.selectplugin" /></h3> … … 225 198 <table class="form" width="100%"> 226 199 <tr valign="top"> 227 <td class="prompt">Plugin </td>200 <td class="prompt">Plugin + configuration</td> 228 201 <td> 229 <select name="plugindefinition_id" class="required" onchange="pluginOnChange()"> 230 </select> 231 </td> 232 </tr> 233 <tr valign="top" id="configurations"> 234 <td class="prompt">Configuration</td> 235 <td> 236 <select name="pluginconfiguration_id" onchange="configOnChange()"> 202 <select name="plugins" class="required" onchange="pluginOnChange()"> 237 203 </select> 238 204 </td> … … 263 229 <div align=right> <i><base:icon image="required.gif" /> = required information</i></div> 264 230 <div id="descriptions" class="helpmessage" 265 style="height: <%=(int)(scale*270)%>px; overflow: auto; display: none;">231 style="height: <%=(int)(scale*270)%>px; overflow: auto;"> 266 232 <%=descriptions.toString()%> 267 233 </div> -
trunk/www/include/scripts/plugin.js
r4889 r5372 33 33 this.allPlugins = new Array(); 34 34 35 this.populateLists = function(pluginList , configurationList)35 this.populateLists = function(pluginList) 36 36 { 37 pluginList[pluginList.length] = new Option('- auto detect -', '-1'); 37 var option = new Option('- auto detect (all) -', '-1'); 38 pluginList[pluginList.length] = option; 39 option.className = 'selectoptionautodetect'; 38 40 var numAutodetecting = 0; 39 41 for (var i = 0; i < this.allPlugins.length; i++) … … 48 50 pluginList[pluginList.length] = option; 49 51 pluginList[pluginList.length-1].plugin = plugin; 52 option.className = 'selectoptionheader'; 53 if (plugin.requiresConfiguration) 54 { 55 option.disabled = true; 56 } 57 58 if (plugin.supportsConfigurations && plugin.configurations.length > 0) 59 { 60 if (plugin.autodetection) 61 { 62 var option = new Option(' ├ auto detect (' + plugin.name + ') -', '-1'); 63 option.className = 'selectoptionautodetect'; 64 pluginList[pluginList.length] = option; 65 pluginList[pluginList.length-1].plugin = plugin; 66 } 67 for (var j = 0; j < plugin.configurations.length; j++) 68 { 69 var conf = plugin.configurations[j]; 70 var name = conf.name; 71 var prefix = j == plugin.configurations.length-1 ? ' └ ' : ' ├ ' 72 var option = new Option(prefix+name, conf.id); 73 pluginList[pluginList.length] = option; 74 pluginList[pluginList.length-1].plugin = plugin; 75 pluginList[pluginList.length-1].configuration = conf; 76 } 77 } 78 50 79 } 51 80 if (numAutodetecting == 0) … … 53 82 pluginList[0] = null; 54 83 } 55 this.updateConfigurationsList(pluginList[0].plugin, configurationList);56 84 } 57 85 86 /* 58 87 this.updateConfigurationsList = function(plugin, list) 59 88 { … … 85 114 } 86 115 } 116 */ 87 117 88 118 } -
trunk/www/include/styles/main.css
r5362 r5372 213 213 .selectoptionheader, .defaultheader { 214 214 font-weight: bold; 215 } 216 217 .selectoptionautodetect { 218 font-style: italic; 215 219 } 216 220
Note: See TracChangeset
for help on using the changeset viewer.