Changeset 4621


Ignore:
Timestamp:
Oct 31, 2008, 10:51:44 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1158: Improving plugin autodetection

Location:
trunk/www
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/common/import/select_plugin.jsp

    r4537 r4621  
    177177            boolean autoDetecting = !noAutodetect && pd.supports(autoDetectingType);
    178178            String supportsConfig = pd.supportsConfigurations() ? "true" : "false";
    179             String requiresConfig = pd.requiresConfiguration() ? "true" : "false";
     179            String requiresConfig = noAutodetect || pd.requiresConfiguration() ? "true" : "false";
    180180            descriptions.append("<div id=\"description." + pd.getId() +"\" style=\"display: none;\">");
    181181            descriptions.append(HTML.niceFormat("<b>" + pd.getName() + "</b>\n" + pd.getDescription()));
  • trunk/www/include/scripts/plugin.js

    r4510 r4621  
    6363      if (plugin.supportsConfigurations && plugin.configurations.length > 0)
    6464      {
     65        var selectFirstConfig = plugin.configurations.length == 1;
    6566        if (plugin.autodetection)
    6667        {
     
    7475        {
    7576          var conf = plugin.configurations[i];
    76           list[list.length] = new Option(conf.name, conf.id);
     77          list[list.length] = new Option(conf.name, conf.id, selectFirstConfig && i == 0);
    7778          list[list.length-1].configuration = conf;
    7879        }
Note: See TracChangeset for help on using the changeset viewer.