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();
|
||||
|
||||
// Branch options
|
||||
this.request('GET', 'mdbBranches', null, function(err, res) {
|
||||
if (err)
|
||||
throw new Error ('Version could not be retrieved: '+ err.message +': ');
|
||||
var selectBranch = document.querySelector('#branch');
|
||||
var option = [];
|
||||
for (var x in res) {
|
||||
option[x] = document.createElement('option');
|
||||
option[x].text = res[x].name
|
||||
option[x].value = res[x].name
|
||||
selectBranch.options.add(option[x])
|
||||
}
|
||||
});
|
||||
try {
|
||||
this.request('GET', 'mdbBranches', null, function(err, res) {
|
||||
var selectBranch = document.querySelector('#branch');
|
||||
var option = [];
|
||||
for (var x in res) {
|
||||
option[x] = document.createElement('option');
|
||||
option[x].text = res[x].name
|
||||
option[x].value = res[x].name
|
||||
selectBranch.options.add(option[x])
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
this.catchError(err);
|
||||
}
|
||||
|
||||
var branch = this.mdbGetValue(
|
||||
'SELECT branch FROM tblVariables',
|
||||
'branch', String
|
||||
|
|
Loading…
Reference in New Issue