profile upload (requires server update)
This commit is contained in:
parent
136a182539
commit
973d8bab75
8 changed files with 129 additions and 27 deletions
|
|
@ -19,14 +19,39 @@ BR.RoutingOptions = BR.Control.extend({
|
|||
},
|
||||
|
||||
setOptions: function(options) {
|
||||
if (options.profile) {
|
||||
L.DomUtil.get('profile').value = options.profile;
|
||||
var select,
|
||||
profile = options.profile;
|
||||
|
||||
if (profile) {
|
||||
select = L.DomUtil.get('profile');
|
||||
select.value = profile;
|
||||
|
||||
// profile got not selected = not in option values -> custom profile passed with permalink
|
||||
if (select.value != profile) {
|
||||
this.setCustomProfile(profile, true);
|
||||
}
|
||||
|
||||
}
|
||||
if (options.alternative) {
|
||||
L.DomUtil.get('alternative').value = options.alternative;
|
||||
}
|
||||
},
|
||||
|
||||
setCustomProfile: function(profile, noUpdate) {
|
||||
var select,
|
||||
option;
|
||||
|
||||
select = L.DomUtil.get('profile');
|
||||
option = select.options[0]
|
||||
option.value = profile;
|
||||
select.value = profile;
|
||||
option.disabled = false;
|
||||
|
||||
if (!noUpdate) {
|
||||
this.fire('update', {options: this.getOptions()});
|
||||
}
|
||||
},
|
||||
|
||||
_getChangeHandler: function() {
|
||||
return L.bind(function(evt) {
|
||||
this.fire('update', {options: this.getOptions()});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue