Commit 7d068599 authored by Boris Kocherov's avatar Boris Kocherov

gadget_html5_select: update upstream

parent ac7df36b
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
required: false required: false
}) })
.declareMethod('render', function (options) { .declareMethod('render', function render(options) {
var state_dict = { var state_dict = {
value: getFirstNonEmpty(options.value, ""), value: getFirstNonEmpty(options.value, ""),
item_list: JSON.stringify(options.item_list), item_list: JSON.stringify(options.item_list),
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
return this.changeState(state_dict); return this.changeState(state_dict);
}) })
.onStateChange(function (modification_dict) { .onStateChange(function onStateChange(modification_dict) {
var i, var i,
found = false, found = false,
template, template,
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
} }
}) })
.declareMethod('getContent', function () { .declareMethod('getContent', function getContent() {
var result = {}, var result = {},
select = this.element.querySelector('select'); select = this.element.querySelector('select');
if (this.state.editable) { if (this.state.editable) {
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
}) })
.declareAcquiredMethod("notifyValid", "notifyValid") .declareAcquiredMethod("notifyValid", "notifyValid")
.declareMethod('checkValidity', function () { .declareMethod('checkValidity', function checkValidity() {
var result = this.element.querySelector('select').checkValidity(); var result = this.element.querySelector('select').checkValidity();
if (result) { if (result) {
return this.notifyValid() return this.notifyValid()
...@@ -136,13 +136,13 @@ ...@@ -136,13 +136,13 @@
}) })
.declareAcquiredMethod("notifyChange", "notifyChange") .declareAcquiredMethod("notifyChange", "notifyChange")
.onEvent('change', function (e) { .onEvent('change', function change(e) {
return RSVP.all([ return RSVP.all([
this.checkValidity(), this.checkValidity(),
this.notifyChange(e) this.notifyChange(e)
]); ]);
}, false, false) }, false, false)
.onEvent('input', function (e) { .onEvent('input', function input(e) {
return RSVP.all([ return RSVP.all([
this.checkValidity(), this.checkValidity(),
this.notifyChange(e) this.notifyChange(e)
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
}, false, false) }, false, false)
.declareAcquiredMethod("notifyInvalid", "notifyInvalid") .declareAcquiredMethod("notifyInvalid", "notifyInvalid")
.onEvent('invalid', function (evt) { .onEvent('invalid', function invalid(evt) {
// invalid event does not bubble // invalid event does not bubble
return this.notifyInvalid(evt.target.validationMessage); return this.notifyInvalid(evt.target.validationMessage);
}, true, false); }, true, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment