Commit c0b89443 authored by Jake Mylet's avatar Jake Mylet
Browse files

Forgot to include code block for the get selected documentation in SetupJS

parent ee8bc28b
......@@ -29,6 +29,24 @@ return str;
### [GetSelectedCollections.js](/WAMI/WAMI/GetSelectedCollections.js)
Operates in the same way that GetAvailableCollections does, except that it pulls options from the select object containing the collections that have already been selected to inventory.
var el = document.getElementById("CollectionList2");
var opts = el.options;
var str = '{ "options" : [';
for (var i = 0; i < opts.length; i++) {
str += '{"value":"' + opts[i].value + '", ' + '"text":"' + opts[i].innerHTML.trim() + '"}'
if (i + 1 != opts.length)
str += ",";
str += "]}";
return str;
### [AddCollection.js](/WAMI/WAMI/AddCollection.js)
Will add a collection from the available list to the list of collections. To do this it will first get the available collection list and then set one of the options within to be the designated "selected element" by setting the selected index and the value. To choose which option is to be selected the application will inject a JavaScript variable, `selectedAdd`, holding the desired index before calling AddCollection. Once an option is selected the file will call a function internal to the web page, `doTransfer1`, that will move the option to the list of collections selected to inventory.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment