Skip to content

Instantly share code, notes, and snippets.

@goofmint
Last active August 25, 2017 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/7474ed21a94fa45617fcc552a2f8ae31 to your computer and use it in GitHub Desktop.
Save goofmint/7474ed21a94fa45617fcc552a2f8ae31 to your computer and use it in GitHub Desktop.
(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