refs #4974 Minor changes
This commit is contained in:
parent
e59bd6365d
commit
c863737092
27
src/main.js
27
src/main.js
|
@ -127,18 +127,21 @@ var App = {
|
||||||
this.refreshLogout();
|
this.refreshLogout();
|
||||||
|
|
||||||
// Branch options
|
// Branch options
|
||||||
this.request('GET', 'mdbBranches', null, function(err, res) {
|
try {
|
||||||
if (err)
|
this.request('GET', 'mdbBranches', null, function(err, res) {
|
||||||
throw new Error ('Version could not be retrieved: '+ err.message +': ');
|
var selectBranch = document.querySelector('#branch');
|
||||||
var selectBranch = document.querySelector('#branch');
|
var option = [];
|
||||||
var option = [];
|
for (var x in res) {
|
||||||
for (var x in res) {
|
option[x] = document.createElement('option');
|
||||||
option[x] = document.createElement('option');
|
option[x].text = res[x].name
|
||||||
option[x].text = res[x].name
|
option[x].value = res[x].name
|
||||||
option[x].value = res[x].name
|
selectBranch.options.add(option[x])
|
||||||
selectBranch.options.add(option[x])
|
}
|
||||||
}
|
});
|
||||||
});
|
} catch (err) {
|
||||||
|
this.catchError(err);
|
||||||
|
}
|
||||||
|
|
||||||
var branch = this.mdbGetValue(
|
var branch = this.mdbGetValue(
|
||||||
'SELECT branch FROM tblVariables',
|
'SELECT branch FROM tblVariables',
|
||||||
'branch', String
|
'branch', String
|
||||||
|
|
Loading…
Reference in New Issue