Changeset 7804


Ignore:
Timestamp:
May 4, 2020, 1:45:21 PM (21 months ago)
Author:
Nicklas Nordborg
Message:

References #2209: Add items to existing item list from list page

Fixed on the list pages for extracts, physical, derived and raw bioassays.

Location:
branches/3.16-stable/www
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/3.16-stable/www/biomaterials/extracts/extracts.js

    r7604 r7804  
    125125      Buttons.addClickHandler('btnRunPlugin', Buttons.runListPlugin, tableAttributes);
    126126      Buttons.addClickHandler('btnNewItemList', extracts.newItemListOnClick);
     127      Buttons.addClickHandler('btnAddToItemList', extracts.addToItemListOnClick);
    127128      Buttons.addClickHandler('btnPlaceOnPlate', extracts.placeOnPlateOnClick);
    128129      Buttons.addClickHandler('btnNewPooledItem', extracts.newPooledItemOnClick);
     
    193194    var controller = Items.getController('ITEMLIST');
    194195    Table.submitToPopup('extracts', 'CreateItemList', controller.width, controller.height);
     196  }
     197 
     198  // Add selected extracts to an existing item list
     199  extracts.addToItemListOnClick = function()
     200  {
     201    Table.submitToPopup('extracts', 'AddItemsToList', 450, 300);
    195202  }
    196203 
  • branches/3.16-stable/www/biomaterials/extracts/index.jsp

    r7703 r7804  
    531531    redirect = "../../views/itemlists/index.jsp?ID="+ID+"&cmd=NewItem&addItems=1&memberType=EXTRACT&formId=extracts";
    532532  }
     533  else if ("AddItemsToList".equals(cmd))
     534  {
     535    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
     536    final ItemQuery<Extract> query = Extract.getQuery();
     537    dc = sc.newDbControl();
     538    cc.configureQuery(dc, query, true);
     539    dc.close();
     540    cc.setQuery(query);
     541    redirect = "../../views/itemlists/add_items.jsp?ID="+ID+"&memberType=EXTRACT&formId=extracts";
     542  }
    533543  else if ("PlaceOnPlate".equals(cmd))
    534544  {
  • branches/3.16-stable/www/biomaterials/extracts/list_extracts.jsp

    r7799 r7804  
    626626          tooltip="Create a new item list from matching extracts"
    627627          visible="<%=sc.hasPermission(Permission.CREATE, Item.ITEMLIST)%>"
     628        />
     629        <tbl:button
     630          id="btnAddToItemList"
     631          image="add.png"
     632          title="Add to item list&hellip;"
     633          tooltip="Add extracts to an existing item list"
    628634        />
    629635        <tbl:button
  • branches/3.16-stable/www/biomaterials/samples/list_samples.jsp

    r7802 r7804  
    542542            image="add.png"
    543543            title="Add to item list&hellip;"
    544             tooltip="Add items to an existing item list"
     544            tooltip="Add samples to an existing item list"
    545545          />
    546546          <tbl:button
  • branches/3.16-stable/www/views/derivedbioassays/bioassays.js

    r7604 r7804  
    122122      Buttons.addClickHandler('btnNewMergedDerivedBioAssay', bioassays.newMergedDerivedBioAssay);
    123123      Buttons.addClickHandler('btnNewItemList', bioassays.newItemListOnClick);
     124      Buttons.addClickHandler('btnAddToItemList', bioassays.addToItemListOnClick);
    124125
    125126      Buttons.addClickHandler('close', App.closeWindow);
     
    166167    var controller = Items.getController('ITEMLIST');
    167168    Table.submitToPopup('bioassays', 'CreateItemList', controller.width, controller.height);
     169  }
     170  // Add selected bioassays to an existing item list
     171  bioassays.addToItemListOnClick = function()
     172  {
     173    Table.submitToPopup('bioassays', 'AddItemsToList', 450, 300);
    168174  }
    169175
  • branches/3.16-stable/www/views/derivedbioassays/index.jsp

    r7703 r7804  
    499499    redirect = "../../views/itemlists/index.jsp?ID="+ID+"&cmd=NewItem&addItems=1&memberType=DERIVEDBIOASSAY&formId=bioassays";
    500500  }
     501  else if ("AddItemsToList".equals(cmd))
     502  {
     503    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
     504    final ItemQuery<DerivedBioAssay> query = DerivedBioAssay.getQuery();
     505    dc = sc.newDbControl();
     506    cc.configureQuery(dc, query, true);
     507    dc.close();
     508    cc.setQuery(query);
     509    redirect = "../../views/itemlists/add_items.jsp?ID="+ID+"&memberType=DERIVEDBIOASSAY&formId=bioassays";
     510  }
    501511  else if ("NewMergedDerivedBioAssay".equals(cmd))
    502512  {
  • branches/3.16-stable/www/views/derivedbioassays/list_bioassays.jsp

    r7799 r7804  
    486486            tooltip="Create a new item list from matching bioassays"
    487487            visible="<%=sc.hasPermission(Permission.CREATE, Item.ITEMLIST)%>"
     488          />
     489          <tbl:button
     490            id="btnAddToItemList"
     491            image="add.png"
     492            title="Add to item list&hellip;"
     493            tooltip="Add bioassays to an existing item list"
    488494          />
    489495          <tbl:button
  • branches/3.16-stable/www/views/physicalbioassays/bioassays.js

    r7604 r7804  
    115115      Buttons.addClickHandler('btnNewMergedDerivedBioAssay', bioassays.newMergedDerivedBioAssay);
    116116      Buttons.addClickHandler('btnNewItemList', bioassays.newItemListOnClick);
     117      Buttons.addClickHandler('btnAddToItemList', bioassays.addToItemListOnClick);
    117118
    118119      Buttons.addClickHandler('close', App.closeWindow);
     
    142143    var parentId = Data.int(event.currentTarget, 'item-id');
    143144    Items.newItem('DERIVEDBIOASSAY', '&physicalbioassay_id='+parentId);
     145  }
     146  // Add selected bioassays to an existing item list
     147  bioassays.addToItemListOnClick = function()
     148  {
     149    Table.submitToPopup('bioassays', 'AddItemsToList', 450, 300);
    144150  }
    145151 
  • branches/3.16-stable/www/views/physicalbioassays/index.jsp

    r7703 r7804  
    454454    redirect = "../../views/itemlists/index.jsp?ID="+ID+"&cmd=NewItem&addItems=1&memberType=PHYSICALBIOASSAY&formId=bioassays";
    455455  }
     456  else if ("AddItemsToList".equals(cmd))
     457  {
     458    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
     459    final ItemQuery<PhysicalBioAssay> query = PhysicalBioAssay.getQuery();
     460    dc = sc.newDbControl();
     461    cc.configureQuery(dc, query, true);
     462    dc.close();
     463    cc.setQuery(query);
     464    redirect = "../../views/itemlists/add_items.jsp?ID="+ID+"&memberType=PHYSICALBIOASSAY&formId=bioassays";
     465  }
    456466  else if ("NewMergedDerivedBioAssay".equals(cmd))
    457467  {
  • branches/3.16-stable/www/views/physicalbioassays/list_bioassays.jsp

    r7799 r7804  
    431431            tooltip="Create a new item list from matching bioassays"
    432432            visible="<%=sc.hasPermission(Permission.CREATE, Item.ITEMLIST)%>"
     433          />
     434          <tbl:button
     435            id="btnAddToItemList"
     436            image="add.png"
     437            title="Add to item list&hellip;"
     438            tooltip="Add bioassays to an existing item list"
    433439          />
    434440          <tbl:button
  • branches/3.16-stable/www/views/rawbioassays/bioassays.js

    r7635 r7804  
    107107      Buttons.addClickHandler('btnRunPlugin', Buttons.runListPlugin, tableAttributes);
    108108      Buttons.addClickHandler('btnNewItemList', bioassays.newItemListOnClick);
     109      Buttons.addClickHandler('btnAddToItemList', bioassays.addToItemListOnClick);
    109110      Buttons.addClickHandler('btnNewExperiment', bioassays.newExperiment);
    110111
     
    128129    var controller = Items.getController('ITEMLIST');
    129130    Table.submitToPopup('rawbioassays', 'CreateItemList', controller.width, controller.height);
     131  }
     132  // Add selected raw bioassays to an existing item list
     133  bioassays.addToItemListOnClick = function()
     134  {
     135    Table.submitToPopup('rawbioassays', 'AddItemsToList', 450, 300);
    130136  }
    131137
  • branches/3.16-stable/www/views/rawbioassays/index.jsp

    r7703 r7804  
    579579    redirect = "../../views/itemlists/index.jsp?ID="+ID+"&cmd=NewItem&addItems=1&memberType=RAWBIOASSAY&formId=rawbioassays";
    580580  }
     581  else if ("AddItemsToList".equals(cmd))
     582  {
     583    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
     584    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
     585    dc = sc.newDbControl();
     586    cc.configureQuery(dc, query, true);
     587    dc.close();
     588    cc.setQuery(query);
     589    redirect = "../../views/itemlists/add_items.jsp?ID="+ID+"&memberType=RAWBIOASSAY&formId=rawbioassays";
     590  }
    581591  else
    582592  {
  • branches/3.16-stable/www/views/rawbioassays/list_rawbioassays.jsp

    r7799 r7804  
    545545          />
    546546          <tbl:button
     547            id="btnAddToItemList"
     548            image="add.png"
     549            title="Add to item list&hellip;"
     550            tooltip="Add raw bioassays to an existing item list"
     551          />
     552          <tbl:button
    547553            id="btnNewExperiment"
    548554            image="add.png"
Note: See TracChangeset for help on using the changeset viewer.