|
@@ -96,11 +96,11 @@ function populateSourceTable(par){
|
|
|
|
|
|
if (!("source" in par)) return;
|
|
|
if (debug){
|
|
|
- print("populateSourceTable ["+par.source.queryName+"]");
|
|
|
+ print(par.config,"populateSourceTable ["+par.source.queryName+"]");
|
|
|
}
|
|
|
|
|
|
config.success=function(data){populateSourceTableData(data,par)};
|
|
|
- config.failure=function(errorTxt){print("populateSourceData:fail")};
|
|
|
+ config.failure=function(errorTxt){print(par.config,"populateSourceData:fail")};
|
|
|
LABKEY.Query.selectRows(config);
|
|
|
}
|
|
|
|
|
@@ -132,30 +132,30 @@ function populateSourceTableData(data,par){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function populateSelectNotLookup(data,parameters,rowId, entry){
|
|
|
+function populateSelectNotLookup(config,data,parameters,rowId, entry){
|
|
|
//selectId
|
|
|
//masterSelectVarName
|
|
|
|
|
|
let debug=true;
|
|
|
|
|
|
if (debug)
|
|
|
- print("populateSelectNonLookup on "+data.queryName);
|
|
|
+ print(config,"populateSelectNonLookup on "+data.queryName);
|
|
|
|
|
|
let row=parameters.vars[rowId];
|
|
|
let varName=row.masterSelectVarName;
|
|
|
- if (debug) print("var "+varName+" rows "+data.rows.length);
|
|
|
+ if (debug) print(config,"var "+varName+" rows "+data.rows.length);
|
|
|
|
|
|
- if (debug) print("Getting element "+row.selectId);
|
|
|
+ if (debug) print(config,"Getting element "+row.selectId);
|
|
|
|
|
|
let el=document.getElementById(row.selectId);
|
|
|
|
|
|
if (!el) {
|
|
|
- print("Element not found");
|
|
|
+ print(config,"Element not found");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (debug) print("Element "+el);
|
|
|
- if (debug) print("Clearing entries");
|
|
|
+ if (debug) print(config,"Element "+el);
|
|
|
+ if (debug) print(config,"Clearing entries");
|
|
|
|
|
|
//remove previous options
|
|
|
for(i = el.options.length; i >= 0; i--) {
|
|
@@ -163,11 +163,11 @@ function populateSelectNotLookup(data,parameters,rowId, entry){
|
|
|
}
|
|
|
|
|
|
if (debug)
|
|
|
- print("Adding entries");
|
|
|
+ print(config,"Adding entries");
|
|
|
|
|
|
if ("addSelect" in row){
|
|
|
if (debug)
|
|
|
- print("adding <Select>");
|
|
|
+ print(config,"adding <Select>");
|
|
|
|
|
|
let opt = document.createElement("option");
|
|
|
opt.text = "<Select>";
|
|
@@ -176,7 +176,7 @@ function populateSelectNotLookup(data,parameters,rowId, entry){
|
|
|
}
|
|
|
|
|
|
if ("addNewFlag" in row){
|
|
|
- if (debug) print("adding Add new");
|
|
|
+ if (debug) print(config,"adding Add new");
|
|
|
let opt = document.createElement("option");
|
|
|
opt.text = "Add New";
|
|
|
opt.value = row.addNewFlag;
|
|
@@ -186,7 +186,7 @@ function populateSelectNotLookup(data,parameters,rowId, entry){
|
|
|
for (let i=0;i< data.rows.length;i++){
|
|
|
let valEntry=data.rows[i];
|
|
|
if (debug)
|
|
|
- print("adding "+valEntry[varName]);
|
|
|
+ print(config,"adding "+valEntry[varName]);
|
|
|
let opt = document.createElement("option");
|
|
|
opt.text = valEntry[varName];
|
|
|
opt.value = valEntry[varName];
|