Last active
August 25, 2017 00:32
-
-
Save goofmint/7474ed21a94fa45617fcc552a2f8ae31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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