Changeset 3848


Ignore:
Timestamp:
Oct 17, 2007, 8:17:00 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #721: Can now edit raw bioassays, array designs and projects where the
platform/variant has been marked for removal

Location:
trunk/www
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/lims/arraydesigns/edit_design.jsp

    r3820 r3848  
    9595
    9696  ItemQuery<Platform> platformQuery = Platform.getQuery();
     97  platformQuery.include(Include.REMOVED, Include.NOT_REMOVED);
    9798  platformQuery.order(Orders.asc(Hql.property("name")));
    9899  platformQuery.setCacheResult(true);
     
    100101
    101102  ItemQuery<PlatformVariant> variantQuery = PlatformVariant.getQuery();
     103  variantQuery.include(Include.REMOVED, Include.NOT_REMOVED);
    102104  variantQuery.order(Orders.asc(Hql.property("name")));
    103105  variantQuery.setCacheResult(true);
     
    209211      for (Platform p : platforms)
    210212      {
    211         RawDataType rdt = p.isFileOnly() ? null : p.getRawDataType();
    212         %>
    213         var p<%=p.getId()%> = new Platform(<%=p.getId()%>, '<%=HTML.javaScriptEncode(p.getExternalId())%>', '<%=HTML.javaScriptEncode(p.getName())%>', <%=p.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
    214         <%
     213        if (!p.isRemoved() || p.equals(currentPlatform))
     214        {
     215          RawDataType rdt = p.isFileOnly() ? null : p.getRawDataType();
     216          %>
     217          var p<%=p.getId()%> = new Platform(<%=p.getId()%>, '<%=HTML.javaScriptEncode(p.getExternalId())%>', '<%=HTML.javaScriptEncode(p.getName())%>', <%=p.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
     218          <%
     219        }
    215220      }
    216221      for (PlatformVariant v : variants)
    217222      {
    218         RawDataType rdt = v.isFileOnly() ? null : v.getRawDataType();
    219223        Platform p = v.getPlatform();
    220         %>
    221         var v<%=v.getId()%> = new Variant(p<%=p.getId()%>, <%=v.getId()%>, '<%=HTML.javaScriptEncode(v.getExternalId())%>', '<%=HTML.javaScriptEncode(v.getName())%>', <%=v.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
    222         <%
     224        if ((!v.isRemoved() || v.equals(currentVariant)) && (!p.isRemoved() || p.equals(currentPlatform)))
     225        {
     226          RawDataType rdt = v.isFileOnly() ? null : v.getRawDataType();
     227          %>
     228          var v<%=v.getId()%> = new Variant(p<%=p.getId()%>, <%=v.getId()%>, '<%=HTML.javaScriptEncode(v.getExternalId())%>', '<%=HTML.javaScriptEncode(v.getName())%>', <%=v.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
     229          <%
     230        }
    223231      }
    224232      %>
  • trunk/www/lims/arraydesigns/list_designs.jsp

    r3820 r3848  
    9999  // Get all platforms
    100100  final ItemQuery<Platform> platformQuery = Platform.getQuery();
     101  platformQuery.include(cc.getInclude());
    101102  platformQuery.order(Orders.asc(Hql.property("name")));
    102103  platformQuery.setCacheResult(true);
  • trunk/www/my_base/projects/edit_project.jsp

    r3847 r3848  
    145145 
    146146  ItemQuery<Platform> platformQuery = Platform.getQuery();
     147  platformQuery.include(Include.REMOVED, Include.NOT_REMOVED);
    147148  platformQuery.order(Orders.asc(Hql.property("name")));
    148149  platformQuery.setCacheResult(true);
     
    150151
    151152  ItemQuery<PlatformVariant> variantQuery = PlatformVariant.getQuery();
     153  variantQuery.include(Include.REMOVED, Include.NOT_REMOVED);
    152154  variantQuery.order(Orders.asc(Hql.property("name")));
    153155  variantQuery.setCacheResult(true);
     
    163165  %>
    164166
    165   <base:page type="popup" title="<%=title%>">
     167  <%@page import="net.sf.basedb.core.Include"%>
     168<base:page type="popup" title="<%=title%>">
    166169  <base:head scripts="tabcontrol.js,linkitems.js,parameters.js,platforms.js" styles="tabcontrol.css,parameters.css">
    167170    <script language="JavaScript">
     
    217220      for (Platform p : platforms)
    218221      {
    219         RawDataType rdt = p.isFileOnly() ? null : p.getRawDataType();
    220         %>
    221         var p<%=p.getId()%> = new Platform(<%=p.getId()%>, '<%=HTML.javaScriptEncode(p.getExternalId())%>', '<%=HTML.javaScriptEncode(p.getName())%>', <%=p.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
    222         <%
     222        if (!p.isRemoved() || p.equals(currentPlatform))
     223        {
     224          RawDataType rdt = p.isFileOnly() ? null : p.getRawDataType();
     225          %>
     226          var p<%=p.getId()%> = new Platform(<%=p.getId()%>, '<%=HTML.javaScriptEncode(p.getExternalId())%>', '<%=HTML.javaScriptEncode(p.getName())%>', <%=p.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
     227          <%
     228        }
    223229      }
    224230      for (PlatformVariant v : variants)
    225231      {
    226         RawDataType rdt = v.isFileOnly() ? null : v.getRawDataType();
    227232        Platform p = v.getPlatform();
    228         %>
    229         var v<%=v.getId()%> = new Variant(p<%=p.getId()%>, <%=v.getId()%>, '<%=HTML.javaScriptEncode(v.getExternalId())%>', '<%=HTML.javaScriptEncode(v.getName())%>', <%=v.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
    230         <%
     233        if ((!v.isRemoved() || v.equals(currentVariant)) && (!p.isRemoved() || p.equals(currentPlatform)))
     234        {
     235          RawDataType rdt = v.isFileOnly() ? null : v.getRawDataType();
     236          %>
     237          var v<%=v.getId()%> = new Variant(p<%=p.getId()%>, <%=v.getId()%>, '<%=HTML.javaScriptEncode(v.getExternalId())%>', '<%=HTML.javaScriptEncode(v.getName())%>', <%=v.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
     238          <%
     239        }
    231240      }
    232241      %>
  • trunk/www/views/rawbioassays/edit_rawbioassay.jsp

    r3820 r3848  
    249249 
    250250  ItemQuery<Platform> platformQuery = Platform.getQuery();
     251  platformQuery.include(Include.REMOVED, Include.NOT_REMOVED);
    251252  platformQuery.order(Orders.asc(Hql.property("name")));
    252253  platformQuery.setCacheResult(true);
     
    254255
    255256  ItemQuery<PlatformVariant> variantQuery = PlatformVariant.getQuery();
     257  variantQuery.include(Include.REMOVED, Include.NOT_REMOVED);
    256258  variantQuery.order(Orders.asc(Hql.property("name")));
    257259  variantQuery.setCacheResult(true);
     
    531533      for (Platform p : platforms)
    532534      {
    533         RawDataType rdt = p.isFileOnly() ? null : p.getRawDataType();
    534         %>
    535         var p<%=p.getId()%> = new Platform(<%=p.getId()%>, '<%=HTML.javaScriptEncode(p.getExternalId())%>', '<%=HTML.javaScriptEncode(p.getName())%>', <%=p.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
    536         <%
     535        if (!p.isRemoved() || p.equals(currentPlatform))
     536        {
     537          RawDataType rdt = p.isFileOnly() ? null : p.getRawDataType();
     538          %>
     539          var p<%=p.getId()%> = new Platform(<%=p.getId()%>, '<%=HTML.javaScriptEncode(p.getExternalId())%>', '<%=HTML.javaScriptEncode(p.getName())%>', <%=p.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
     540          <%
     541        }
    537542      }
    538543      for (PlatformVariant v : variants)
    539544      {
    540         RawDataType rdt = v.isFileOnly() ? null : v.getRawDataType();
    541545        Platform p = v.getPlatform();
    542         %>
    543         var v<%=v.getId()%> = new Variant(p<%=p.getId()%>, <%=v.getId()%>, '<%=HTML.javaScriptEncode(v.getExternalId())%>', '<%=HTML.javaScriptEncode(v.getName())%>', <%=v.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
    544         <%
     546        if ((!v.isRemoved() || v.equals(currentVariant)) && (!p.isRemoved() || p.equals(currentPlatform)))
     547        {
     548          RawDataType rdt = v.isFileOnly() ? null : v.getRawDataType();
     549          %>
     550          var v<%=v.getId()%> = new Variant(p<%=p.getId()%>, <%=v.getId()%>, '<%=HTML.javaScriptEncode(v.getExternalId())%>', '<%=HTML.javaScriptEncode(v.getName())%>', <%=v.isFileOnly()%>, '<%=rdt == null ? "" : rdt.getId()%>');
     551          <%
     552        }
    545553      }
    546554      %>
  • trunk/www/views/rawbioassays/list_rawbioassays.jsp

    r3820 r3848  
    100100  // Get all platforms
    101101  final ItemQuery<Platform> platformQuery = Platform.getQuery();
     102  platformQuery.include(cc.getInclude());
    102103  platformQuery.order(Orders.asc(Hql.property("name")));
    103104  platformQuery.setCacheResult(true);
Note: See TracChangeset for help on using the changeset viewer.