Fixed changing keyboard mode in preference pane

pull/85/head
Ruben Daniels 2015-04-28 01:06:36 +00:00
rodzic 35175d40ca
commit 81c1e30e70
1 zmienionych plików z 14 dodań i 5 usunięć

Wyświetl plik

@ -202,19 +202,24 @@ define(function(require, exports, module) {
}).join("");
if (data) model.load("<items>" + data + "</items>");
var dd;
childNodes = [
new ui.label({ width : width, maxwidth: maxwidth, caption: name + ":" }),
new ui.dropdown({
dd = new ui.dropdown({
model: model,
width: options.width || widths.dropdown,
skin: "black_dropdown",
margin: "-1 0 0 0",
zindex: 100,
onafterchange: options.onchange && function(e) {
options.onchange({ value: e.value || e.args[2] });
onafterchange: function(e) {
if (options.path)
settings.set(options.path, e.value);
if (options.onchange)
options.onchange({ value: e.value || e.args[2] });
},
value: options.path
? createBind(options.path) //{settings.model}::
value: options.path
? settings.get(options.path)
: (options.defaultValue || ""),
each: options.each || "[item]",
caption: options.caption || "[text()]",
@ -222,6 +227,10 @@ define(function(require, exports, module) {
"empty-message" : options["empty-message"]
})
];
settings.on(options.path, function(){
dd.setValue(settings.get(options.path));
}, plugin);
break;
case "spinner":
childNodes = [