Changeset 5631


Ignore:
Timestamp:
May 16, 2011, 2:56:23 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

References #1597: Subtypes of items

Added support for subtypes with related subtypes.

Location:
trunk
Files:
3 added
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r5612 r5631  
    552552      verbose="${xdoclet.verbose}">
    553553      <fileset dir="${core.src}">
    554         <include name="**/*.java"/>
     554        <include name="net/sf/basedb/core/data/**/*.java"/>
    555555      </fileset>
    556556      <hibernate version="2.0"/>
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/edit/EditUtil.java

    r5630 r5631  
    7272      Item.QUOTATYPE, Item.MIMETYPE,
    7373      Item.ANNOTATIONTYPECATEGORY, Item.ANNOTATIONTYPE,
    74       Item.QUANTITY, Item.UNIT, Item.EXTRAVALUETYPE, Item.REPORTERTYPE
     74      Item.QUANTITY, Item.UNIT, Item.EXTRAVALUETYPE, Item.REPORTERTYPE, Item.ITEMSUBTYPE
    7575    };
    7676
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java

    r5630 r5631  
    7878      Item.ANNOTATIONTYPE, Item.ANNOTATIONTYPECATEGORY, Item.QUANTITY, Item.UNIT,
    7979      Item.SESSION, Item.JOB, Item.MESSAGE, Item.PROJECT, Item.FILE, Item.FILESERVER,
    80       Item.CHANGEHISTORY, Item.PERMISSIONTEMPLATE
     80      Item.CHANGEHISTORY, Item.PERMISSIONTEMPLATE, Item.ITEMSUBTYPE
    8181    };
    8282
  • trunk/src/clients/web/net/sf/basedb/clients/web/resources/menu.properties

    r5630 r5631  
    228228extravaluetypes.tooltip.1 Administrate extra value types
    229229extravaluetypes.tooltip.0 You do not have permission to administrate extra value types
    230 itemsubtypes.tooltip.1  Administrate item subtypes
    231 itemsubtypes.tooltip.0  You do not have permission to administrate item subtypes
     230itemsubtypes.tooltip.1  Administrate subtypes for protocols, hardware/software, etc.
     231itemsubtypes.tooltip.0  You do not have permission to administrate subtypes
    232232
    233233## Extensions menu ##
  • trunk/src/core/net/sf/basedb/core/Extract.java

    r5523 r5631  
    161161  }
    162162  // -------------------------------------------
    163 
    164163  /*
    165164    From the BasicItem class
  • trunk/src/core/net/sf/basedb/core/Install.java

    r5630 r5631  
    161161    throws BaseException
    162162  {
    163     final int totalProgressSteps = 27;
     163    final int totalProgressSteps = 24;
    164164    final float progress_factor = 100 / totalProgressSteps;
    165165    int progressStep = 0;
     
    421421      installUnits("/units.xml", update);
    422422     
     423      // Item subtypes
     424      progressStep++;
     425      if (progress != null) progress.display((int)(progressStep*progress_factor), "--Creating item subtypes...");
     426
     427      // File subtypes
     428      ItemSubtypeData protocolFileType = createItemSubtype(Item.FILE, File.PROTOCOL, "Protocol", "Protocol files");
     429      ItemSubtypeData rawDataType = createItemSubtype(Item.FILE, File.RAW_DATA, "Raw data", "Raw data files");
     430      createItemSubtype(Item.FILE, File.PLATE, "Plate", "Plate files");
     431      createItemSubtype(Item.FILE, File.PLATE_MAPPING, "Plate mapping", "Plate mapping files");
     432      ItemSubtypeData printMapType = createItemSubtype(Item.FILE, File.PRINT_MAP, "Print map", "Print map files");
     433      ItemSubtypeData reporterMapType = createItemSubtype(Item.FILE, File.REPORTER_MAP, "Reporter map", "Reporter map files");
     434      createItemSubtype(Item.FILE, File.REPORTER, "Reporter", "Reporter files");
     435      ItemSubtypeData imageType = createItemSubtype(Item.FILE, File.IMAGE, "Image", "Image files");
     436      createItemSubtype(Item.FILE, File.SPOT_IMAGES, "Spot images", "A zip file containing generated spot images in png format.");
     437      ItemSubtypeData spotDataType = createItemSubtype(Item.FILE, File.SPOT_DATA, "Spot data", "Analysed bioassay set data");
     438      ItemSubtypeData extraValueType = createItemSubtype(Item.FILE, File.EXTRAVALUE_DATA, "Extra value data", "Analysed extra values");
     439
    423440      // Protocol subtypes
    424       progressStep++;
    425       if (progress != null) progress.display((int)(progressStep*progress_factor), "--Creating protocol subtypes...");
    426       createItemSubtype(Item.PROTOCOL, Protocol.SAMPLING, "Sampling", "Protocols used for creating samples.");
    427       createItemSubtype(Item.PROTOCOL, Protocol.EXTRACTION, "Extraction", "Protocols used for creating extracts.");
    428       createItemSubtype(Item.PROTOCOL, Protocol.LABELING, "Labeling", "Protocols used for creating labeled extracts.");
    429       createItemSubtype(Item.PROTOCOL, Protocol.POOLING, "Pooling", "Protocols used for creating pooled biomaterails.");
    430       createItemSubtype(Item.PROTOCOL, Protocol.HYBRIDIZATION, "Hybridization", "Protocols used for creating hybridizations.");
    431       createItemSubtype(Item.PROTOCOL, Protocol.PRINTING, "Printing", "Protocols used for printing a bathc of array slides.");
    432       createItemSubtype(Item.PROTOCOL, Protocol.SCANNING, "Scanning", "Protocols used for scanning microarray images.");
    433       createItemSubtype(Item.PROTOCOL, Protocol.FEATURE_EXTRACTION, "Feature extraction", "Protocols used for extracting features from microarray images.");
     441      createItemSubtype(Item.PROTOCOL, Protocol.SAMPLING, "Sampling", "Protocols used for creating samples.", protocolFileType);
     442      createItemSubtype(Item.PROTOCOL, Protocol.EXTRACTION, "Extraction", "Protocols used for creating extracts.", protocolFileType);
     443      createItemSubtype(Item.PROTOCOL, Protocol.LABELING, "Labeling", "Protocols used for creating labeled extracts.", protocolFileType);
     444      createItemSubtype(Item.PROTOCOL, Protocol.POOLING, "Pooling", "Protocols used for creating pooled biomaterails.", protocolFileType);
     445      createItemSubtype(Item.PROTOCOL, Protocol.HYBRIDIZATION, "Hybridization", "Protocols used for creating hybridizations.", protocolFileType);
     446      createItemSubtype(Item.PROTOCOL, Protocol.PRINTING, "Printing", "Protocols used for printing a batch of array slides.", protocolFileType);
     447      createItemSubtype(Item.PROTOCOL, Protocol.SCANNING, "Scanning", "Protocols used for scanning microarray images.", protocolFileType);
     448      createItemSubtype(Item.PROTOCOL, Protocol.FEATURE_EXTRACTION, "Feature extraction", "Protocols used for extracting features from microarray images.", protocolFileType);
    434449 
    435450      // Hardware subtypes
    436       progressStep++;
    437       if (progress != null) progress.display((int)(progressStep*progress_factor), "--Creating hardware subtypes...");
    438451      ItemSubtypeData scanner = createItemSubtype(Item.HARDWARE, Hardware.SCANNER, "Scanner", "Scans the microarray images.");
    439452      ItemSubtypeData robot = createItemSubtype(Item.HARDWARE, Hardware.PRINT_ROBOT, "Print robot", "Spot the probe on the array.");
     
    442455      ItemSubtypeData otherHardware = createItemSubtype(Item.HARDWARE, Hardware.OTHER, "Other", "Other kinds of hardware that is used for some process.");
    443456 
     457      // Software subtypes
     458      ItemSubtypeData feature = createItemSubtype(Item.SOFTWARE, Software.FEATURE_EXTRACTION, "Feature extraction", "Extracts features from microarray images.");
     459     
    444460      // Hardware
    445461      progressStep++;
     
    455471      createHardware("OmniGrid", "100", "", robot, rootUser, keyEveryoneUse);
    456472      createHardware("Qarray", "Max", "", robot, rootUser, keyEveryoneUse);
    457  
    458       // SoftwareTypes
    459       progressStep++;
    460       if (progress != null) progress.display((int)(progressStep*progress_factor), "--Creating software subtypes...");
    461       ItemSubtypeData feature = createItemSubtype(Item.SOFTWARE, Software.FEATURE_EXTRACTION, "Feature extraction", "Extracts features from microarray images.");
    462473 
    463474      // Software
     
    490501      createDirectory(rootUser, templateDirectory, null, "raw data", "Place your raw data files here", null, true);
    491502      createDirectory(rootUser, templateDirectory, null, "projects", "Create a subdirectory for project-related files in this directory.", null, false);
    492  
    493       // FileTypes
    494       progressStep++;
    495       if (progress != null) progress.display((int)(progressStep*progress_factor), "--Creating file types...");
    496       createItemSubtype(Item.FILE, File.PROTOCOL, "Protocol", "Protocol files");
    497       ItemSubtypeData rawDataType = createItemSubtype(Item.FILE, File.RAW_DATA, "Raw data", "Raw data files");
    498       createItemSubtype(Item.FILE, File.PLATE, "Plate", "Plate files");
    499       createItemSubtype(Item.FILE, File.PLATE_MAPPING, "Plate mapping", "Plate mapping files");
    500       ItemSubtypeData printMapType = createItemSubtype(Item.FILE, File.PRINT_MAP, "Print map", "Print map files");
    501       ItemSubtypeData reporterMapType = createItemSubtype(Item.FILE, File.REPORTER_MAP, "Reporter map", "Reporter map files");
    502       createItemSubtype(Item.FILE, File.REPORTER, "Reporter", "Reporter files");
    503       ItemSubtypeData imageType = createItemSubtype(Item.FILE, File.IMAGE, "Image", "Image files");
    504       createItemSubtype(Item.FILE, File.SPOT_IMAGES, "Spot images", "A zip file containing generated spot images in png format.");
    505       ItemSubtypeData spotDataType = createItemSubtype(Item.FILE, File.SPOT_DATA, "Spot data", "Analysed bioassay set data");
    506       ItemSubtypeData extraValueType = createItemSubtype(Item.FILE, File.EXTRAVALUE_DATA, "Extra value data", "Analysed extra values");
    507503 
    508504      // MimeTypes
     
    15421538    Create an {@link ItemSubtype}.
    15431539  */
    1544   private static ItemSubtypeData createItemSubtype(Item itemType, String systemId, String name, String description)
     1540  private static ItemSubtypeData createItemSubtype(Item itemType, String systemId, String name,
     1541    String description, ItemSubtypeData... related)
    15451542  {
    15461543    int id = SystemItems.getId(systemId);
     
    15741571        subtype.setName(name);
    15751572        subtype.setDescription(description);
     1573       
     1574        if (related != null)
     1575        {
     1576          Map<Integer, ItemSubtypeData> allRelated = subtype.getReleatedSubtypes();
     1577          for (ItemSubtypeData rel : related)
     1578          {
     1579            allRelated.put(rel.getItemType(), rel);
     1580          }
     1581        }
     1582       
    15761583        HibernateUtil.saveData(session, subtype);
    15771584        HibernateUtil.commit(tx);
  • trunk/src/core/net/sf/basedb/core/ItemSubtype.java

    r5630 r5631  
    2222package net.sf.basedb.core;
    2323
     24import java.lang.reflect.Method;
     25import java.util.Arrays;
     26import java.util.Collections;
    2427import java.util.Date;
     28import java.util.HashMap;
     29import java.util.List;
     30import java.util.Map;
    2531import java.util.Set;
    2632
     
    3036import net.sf.basedb.core.query.Hql;
    3137import net.sf.basedb.core.query.Restrictions;
     38import net.sf.basedb.util.ClassUtil;
    3239
    3340/**
     
    5360  public static final Item TYPE = Item.ITEMSUBTYPE;
    5461
     62 
     63  private static Map<Item, List<Item>> relatedItems = new HashMap<Item, List<Item>>();
     64  /**
     65    Get a list with (subtypable) items that are related to the given
     66    item (which should also be subtypable). Typically, if the main item
     67    has a many-to-one relatation to another subtypable item, this item type
     68    will appear in the list. For example a {@link Protocol} has a link to
     69    {@link File} via {@link Protocol#getFile()}. Given the subtype of the protocol
     70    we can find the desired subtype of the file and check agains the actual subtype:
     71   
     72    <pre class="code">
     73Protocol p = ...
     74ItemSubtype protocolSubtype = p.getItemSubtype();
     75ItemSubtype desiredFileSubtype = protocolSubtype.getRelatedSubtype(Item.FILE);
     76File f = p.getFile();
     77ItemSubtype actualFileSubtype = f.getItemSubtype();
     78</pre>
     79   
     80    @param mainItem
     81    @return A list with the related items
     82    @see #getRelatedSubtype(Item)
     83  */
     84  public static List<Item> getRelatedItems(Item mainItem)
     85  {
     86    if (!Subtypable.class.isAssignableFrom(mainItem.getItemClass())) return Collections.emptyList();
     87
     88    List<Item> related = relatedItems.get(mainItem);
     89    if (related == null)
     90    {
     91      synchronized (relatedItems)
     92      {
     93       
     94        Method getItemSubtype = ClassUtil.findMethod(mainItem.getItemClass(), "getItemSubtype");
     95        SubtypableRelatedItems items = getItemSubtype == null ? null : getItemSubtype.getAnnotation(SubtypableRelatedItems.class);
     96        if (items == null)
     97        {
     98          related = Collections.emptyList();
     99        }
     100        else
     101        {
     102          related = Collections.unmodifiableList(Arrays.asList(items.value()));
     103        }
     104        relatedItems.put(mainItem, related);
     105      }
     106    }
     107   
     108    return related;
     109   
     110  }
    55111 
    56112  /**
     
    314370
    315371  /**
     372    Get a related subtype of another item type. For a given main type of
     373    items use {@link #getRelatedItems(Item)} to find out which other
     374    subtypable items that can be related to this subtype.
     375   
     376    @param itemType The other item type (which should also be subtypable)
     377    @return A subtype or null if no subtype has been configured.
     378  */
     379  public ItemSubtype getRelatedSubtype(Item itemType)
     380  {
     381    return getDbControl().getItem(ItemSubtype.class, getData().getReleatedSubtypes().get(itemType.getValue()));
     382  }
     383 
     384  /**
     385    Set a subtype that is related to this subtype. Only one related subtype
     386    per item type is allowed.
     387    @param subtype The subtype (null is not allowed)
     388    @see #getRelatedSubtype(Item)
     389  */
     390  public void setRelatedSubtype(ItemSubtype subtype)
     391  {
     392    checkPermission(Permission.WRITE);
     393    if (subtype == null) throw new InvalidUseOfNullException("subtype");
     394    getData().getReleatedSubtypes().put(subtype.getMainItemType().getValue(), subtype.getData());
     395  }
     396 
     397  /**
     398    Remove the related subtype for the given item type.
     399    @param itemType The item type of the related subtype to
     400      be removed
     401  */
     402  public void removeRelatedSubtype(Item itemType)
     403  {
     404    checkPermission(Permission.WRITE);
     405    getData().getReleatedSubtypes().remove(itemType.getValue());
     406  }
     407 
     408  /**
    316409    Helper method for implementing the {@link Subtypable#setItemSubtype(ItemSubtype)}
    317410    method.
  • trunk/src/core/net/sf/basedb/core/MeasuredBioMaterial.java

    r5630 r5631  
    174174  /*
    175175    From the Subtypable interface
     176    -----------------------------
    176177  */
    177178  @Override
     179  @SubtypableRelatedItems({Item.PROTOCOL, Item.HARDWARE})
    178180  public ItemSubtype getItemSubtype()
    179181  {
  • trunk/src/core/net/sf/basedb/core/Protocol.java

    r5630 r5631  
    234234  */
    235235  @Override
     236  @SubtypableRelatedItems({Item.FILE})
    236237  public ItemSubtype getItemSubtype()
    237238  {
  • trunk/src/core/net/sf/basedb/core/Subtypable.java

    r5630 r5631  
    3737    Get the subtype of the item.
    3838    @return A subtype of null if not set
     39    @see SubtypableRelatedItems
    3940  */
    4041  public ItemSubtype getItemSubtype();
  • trunk/src/core/net/sf/basedb/core/data/ItemSubtypeData.java

    r5630 r5631  
    2323
    2424import java.util.Date;
     25import java.util.HashMap;
     26import java.util.Map;
    2527
    2628/**
     
    132134  }
    133135
     136  private Map<Integer, ItemSubtypeData> relatedSubtypes;
     137  /**
     138    @hibernate.map table="`RelatedSubtypes`" lazy="true"
     139    @hibernate.collection-key column="`itemsubtype_id`"
     140    @hibernate.collection-index column="`item_type`" type="int" not-null="true"
     141    @hibernate.collection-many-to-many column="`related_subtype_id`" class="net.sf.basedb.core.data.ItemSubtypeData"
     142  */
     143  public Map<Integer, ItemSubtypeData> getReleatedSubtypes()
     144  {
     145    if (relatedSubtypes == null)
     146    {
     147      relatedSubtypes = new HashMap<Integer, ItemSubtypeData>();
     148    }
     149    return relatedSubtypes;
     150  }
     151  void setReleatedSubtypes(Map<Integer, ItemSubtypeData> relatedSubtypes)
     152  {
     153    this.relatedSubtypes = relatedSubtypes;
     154  }
     155 
     156 
    134157}
  • trunk/www/admin/itemsubtypes/edit_subtype.jsp

    r5630 r5631  
    7171  }
    7272 
     73  Set<Item> subtypableItems = Metadata.getSubtypableItems();
    7374  final String clazz = "class=\"text\"";
    7475  final String requiredClazz = "class=\"text required\"";
     
    116117      }
    117118      %>
     119      mainItemOnChange();
     120    }
     121   
     122    var related = new Array();
     123    var nameToValue = new Array();
     124    <%
     125    for (Item item : subtypableItems)
     126    {
     127      String tmp = "";
     128      for (Item related : ItemSubtype.getRelatedItems(item))
     129      {
     130        tmp += related.name() + ":";
     131      }
     132      %>
     133      related['<%=item.name()%>'] = '<%=tmp%>';
     134      nameToValue['<%=item.name()%>'] = <%=item.getValue()%>;
     135      <%
     136    }
     137    %>
     138   
     139    function mainItemOnChange()
     140    {
     141      var frm = document.forms['subtype'];
     142      <%
     143      if (subtype != null)
     144      {
     145        %>
     146        var mainType = '<%=subtype.getMainItemType().name()%>';
     147        <%
     148      }
     149      else
     150      {
     151        %>
     152        var mainType = frm.itemType[frm.itemType.selectedIndex].value;
     153        <%
     154      }
     155      for (Item item : subtypableItems)
     156      {
     157        %>
     158        Main.showHide('section.<%=item.name()%>', related[mainType].indexOf('<%=item.name()%>') >= 0)
     159        <%
     160      }
     161      %>
     162    }
     163   
     164    var lastList;
     165    function relatedItemOnSelect(itemType)
     166    {
     167      var frm = document.forms['subtype'];
     168      lastList = frm['related.'+itemType];
     169      var url = 'index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectone&title=Select+related+subtype&callback=setRelatedCallback';
     170      url += '&resetTemporary=1&tmpfilter:INT:itemType=' + nameToValue[itemType];
     171      if (lastList.length > 1)
     172      {
     173        var id = Math.abs(parseInt(lastList[1].value));       
     174        url += '&item_id='+id;
     175      }
     176      Main.openPopup(url, 'SelectReleatedSubtype', 1000, 700);
     177    }
     178    function setRelatedCallback(id, name)
     179    {
     180      var frm = document.forms['subtype'];
     181      var list = lastList;
     182      if (list.length < 2 || list[1].value == '0') // >
     183      {
     184        Forms.addListOption(list, 1, new Option());
     185      }
     186      list[1].value = id;
     187      list[1].text = name;
     188      list.selectedIndex = 1;
    118189    }
    119190    </script>
     
    143214          {
    144215            %>
    145             <select name="itemType" class="required unchangeable">
     216            <select name="itemType" class="required unchangeable" onchange="mainItemOnChange()">
    146217            <%
    147             Set<Item> items = Metadata.getSubtypableItems();
    148218            int itemCode = Values.getInt(cc.getPropertyValue("itemType"), -1);
    149             for (Item item : items)
     219            for (Item item : subtypableItems)
    150220            {
    151221              String selected = itemCode == item.getValue() ? "selected" : "";
     
    176246        </td>
    177247      </tr>
     248      <tr>
     249        <td class="prompt">Related subtypes</td>
     250        <td></td>
     251      </tr>
     252      <%
     253      for (Item item : subtypableItems)
     254      {
     255        %>
     256        <tr id="section.<%=item.name()%>" style="display: none;">
     257          <td class="subprompt"><%=item%></td>
     258          <td>
     259            <base:select
     260              id="<%="related."+item.name()%>"
     261              current="<%=subtype == null ? null : subtype.getRelatedSubtype(item) %>"
     262              onselect="<%="relatedItemOnSelect('" + item.name() + "')"%>"
     263              newitem="<%=subtype == null%>"
     264            />
     265          </td>
     266        </tr>
     267        <%
     268      }
     269      %>
    178270      </table>
    179271      <div align=right>&nbsp;<i><base:icon image="required.gif" /> = required information</i></div>
  • trunk/www/admin/itemsubtypes/index.jsp

    r5630 r5631  
    155155      subtype.setName(Values.getStringOrNull(request.getParameter("name")));
    156156      subtype.setDescription(Values.getStringOrNull(request.getParameter("description")));
    157          
     157     
     158      for (Item related : ItemSubtype.getRelatedItems(subtype.getMainItemType()))
     159      {
     160        int relatedId = Values.getInt(request.getParameter("related." + related.name()), -1);
     161        if (relatedId >= 0) // < 0 = denied or unchanged
     162        {
     163          if (relatedId == 0)
     164          {
     165            subtype.removeRelatedSubtype(related);
     166          }
     167          else
     168          {
     169            subtype.setRelatedSubtype(ItemSubtype.getById(dc, relatedId));
     170          }
     171        }
     172      }
     173     
     174      cc.removeAllTemporaryFilters();
     175     
    158176      // OnSave extensions
    159177      invoker.render(OnSaveRenderer.ON_SAVE);
  • trunk/www/admin/itemsubtypes/view_subtype.jsp

    r5630 r5631  
    221221        <td><%=HTML.niceFormat(subtype.getDescription())%></td>
    222222      </tr>
     223      <tr>
     224        <td class="prompt">Related subtypes</td>
     225        <td></td>
     226      </tr>
     227      <%
     228      for (Item relatedItem : ItemSubtype.getRelatedItems(subtype.getMainItemType()))
     229      {
     230        ItemSubtype related = null;
     231        boolean deniedRelated = false;
     232        try
     233        {
     234          related = subtype.getRelatedSubtype(relatedItem);
     235        }
     236        catch (PermissionDeniedException ex)
     237        {
     238          deniedRelated = true;
     239        }
     240        %>
     241        <tr>
     242          <td class="subprompt"><%=relatedItem%></td>
     243          <td><%=Base.getLinkedName(ID, related, deniedRelated, true)%></td>
     244        </tr>
     245        <%
     246      }
     247      %>
    223248      </table>
    224249
  • trunk/www/admin/protocols/edit_protocol.jsp

    r5630 r5631  
    128128
    129129  <base:page type="popup" title="<%=title%>">
    130   <base:head scripts="tabcontrol.js,annotations.js,linkitems.js" styles="tabcontrol.css">
     130  <base:head scripts="tabcontrol.js,annotations.js,linkitems.js,ajax.js,json2.js,subtypes.js" styles="tabcontrol.css">
    131131    <ext:scripts context="<%=jspContext%>" />
    132132    <ext:stylesheets context="<%=jspContext%>" />
     
    182182    {
    183183      var frm = document.forms['protocol'];
     184      var protocolType = Math.abs(frm.protocoltype_id[frm.protocoltype_id.selectedIndex].value);
     185      var relatedFileSubtype = ItemSubtype.getRelatedSubtype(protocolType, 'FILE', <%=SystemItems.getId(File.PROTOCOL)%>);
    184186      var url = '../../filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&title=Select+protocol&callback=setFileCallback';
    185       url += '&resetTemporary=1&tmpfilter:INT:itemSubtype=<%=SystemItems.getId(File.PROTOCOL)%>';
     187      url += '&resetTemporary=1&tmpfilter:INT:itemSubtype=' + relatedFileSubtype.id;
    186188      if (frm.file_id.length > 1)
    187189      {
  • trunk/www/include/menu.jsp

    r5630 r5631  
    824824          enabled="<%=hasItemSubtypes%>"
    825825        />
     826        <m:menuseparator />
    826827        <m:menuitem
    827828          title="<%=common.getString("item.annotationtype+")%>"
Note: See TracChangeset for help on using the changeset viewer.