Skip to content

Instantly share code, notes, and snippets.

@goofmint
Last active Aug 25, 2017
Embed
What would you like to do?
(function($) {
var comboboxController = {
__name: 'ComboboxController',
/** コンボボックスコントローラ */
_accountComboBoxController: h5.ui.components.combobox.ComboBoxController,
__meta: {
_accountComboBoxController: {
rootElement: 'input[name="accountcode"]'
}
},
__ready: function() {
var data = [];
for (var i = 0; i < 500; i++) {
data.push({
value: ("0000"+i).slice(-5)
})
}
this._accountComboBoxController.init({
data: data
});
},
'input[name="disable"] click': function() {
this._accountComboBoxController.disable();
},
'input[name="enable"] click': function() {
this._accountComboBoxController.enable();
},
};
h5.core.expose(comboboxController);
})(jQuery);
$(function() {
h5.core.controller('body', ComboboxController);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment