Changeset 7802


Ignore:
Timestamp:
Apr 30, 2020, 2:49:01 PM (21 months ago)
Author:
Nicklas Nordborg
Message:

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

Fixed on the sample list page.

Location:
branches/3.16-stable/www/biomaterials
Files:
4 edited

Legend:

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

    r7801 r7802  
    113113  biosources.addToItemListOnClick = function()
    114114  {
    115     Table.submitToPopup('biosources', 'AddItemsToList', 400, 300);
     115    Table.submitToPopup('biosources', 'AddItemsToList', 450, 300);
    116116  }
    117117 
  • branches/3.16-stable/www/biomaterials/samples/index.jsp

    r7703 r7802  
    497497    redirect = "../../views/itemlists/index.jsp?ID="+ID+"&cmd=NewItem&addItems=1&memberType=SAMPLE&formId=samples";
    498498  }
     499  else if ("AddItemsToList".equals(cmd))
     500  {
     501    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
     502    final ItemQuery<Sample> query = Sample.getQuery();
     503    dc = sc.newDbControl();
     504    cc.configureQuery(dc, query, true);
     505    dc.close();
     506    cc.setQuery(query);
     507    redirect = "../../views/itemlists/add_items.jsp?ID="+ID+"&memberType=SAMPLE&formId=samples";
     508  }
    499509  else if ("PlaceOnPlate".equals(cmd))
    500510  {
  • branches/3.16-stable/www/biomaterials/samples/list_samples.jsp

    r7799 r7802  
    537537            tooltip="Create a new item list from matching samples"
    538538            visible="<%=sc.hasPermission(Permission.CREATE, Item.ITEMLIST)%>"
     539          />
     540          <tbl:button
     541            id="btnAddToItemList"
     542            image="add.png"
     543            title="Add to item list&hellip;"
     544            tooltip="Add items to an existing item list"
    539545          />
    540546          <tbl:button
  • branches/3.16-stable/www/biomaterials/samples/samples.js

    r7604 r7802  
    118118      Buttons.addClickHandler('btnRunPlugin', Buttons.runListPlugin, tableAttributes);
    119119      Buttons.addClickHandler('btnNewItemList', samples.newItemListOnClick);
     120      Buttons.addClickHandler('btnAddToItemList', samples.addToItemListOnClick);
    120121      Buttons.addClickHandler('btnPlaceOnPlate', samples.placeOnPlateOnClick);
    121122      Buttons.addClickHandler('btnNewPooledItem', samples.newPooledItemOnClick);
     
    162163    var controller = Items.getController('ITEMLIST');
    163164    Table.submitToPopup('samples', 'CreateItemList', controller.width, controller.height);
     165  }
     166 
     167  // Add selected samples to an existing item list
     168  samples.addToItemListOnClick = function()
     169  {
     170    Table.submitToPopup('samples', 'AddItemsToList', 450, 300);
    164171  }
    165172 
Note: See TracChangeset for help on using the changeset viewer.