assets/js/romo/select.js in romo-0.19.4 vs assets/js/romo/select.js in romo-0.19.5
- old
+ new
@@ -64,10 +64,16 @@
this.romoSelectDropdown.elem.trigger('selectDropdown:triggerPopupOpen', []);
}, this));
this.elem.on('select:triggerPopupClose', $.proxy(function(e) {
this.romoSelectDropdown.elem.trigger('selectDropdown:triggerPopupClose', []);
}, this));
+
+
+ var presetVal = this.elem[0].value;
+ if (presetVal !== '') {
+ this.doSetValue(presetVal);
+ }
}
RomoSelect.prototype._bindSelectDropdown = function() {
this.romoSelectDropdown = this._buildSelectDropdownElem().romoSelectDropdown(this.elem)[0];
@@ -114,9 +120,18 @@
if (this.elem.data('romo-select-filter-indicator-width-px') !== undefined) {
romoSelectDropdownElem.attr('data-romo-select-dropdown-filter-indicator-width-px', this.elem.data('romo-select-filter-indicator-width-px'));
}
if (this.elem.data('romo-select-no-filter') !== undefined) {
romoSelectDropdownElem.attr('data-romo-select-dropdown-no-filter', this.elem.data('romo-select-no-filter'));
+ }
+ if (this.elem.data('romo-select-custom-option') !== undefined) {
+ romoSelectDropdownElem.attr('data-romo-select-dropdown-custom-option', this.elem.data('romo-select-custom-option'));
+ }
+ if (this.elem.data('romo-select-custom-option-prompt') !== undefined) {
+ romoSelectDropdownElem.attr('data-romo-select-dropdown-custom-option-prompt', this.elem.data('romo-select-custom-option-prompt'));
+ }
+ if (this.elem.data('romo-select-open-on-focus') !== undefined) {
+ romoSelectDropdownElem.attr('data-romo-select-dropdown-open-on-focus', this.elem.data('romo-select-open-on-focus'));
}
var classList = this.elem.attr('class') !== undefined ? this.elem.attr('class').split(/\s+/) : [];
$.each(classList, function(idx, classItem) {
romoSelectDropdownElem.addClass(classItem);