123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- define("dojox/mobile/_ComboBoxMenu", [
- "dojo/_base/kernel",
- "dojo/_base/declare",
- "dojo/dom-class",
- "dojo/dom-construct",
- "dijit/form/_ComboBoxMenuMixin",
- "dijit/_WidgetBase",
- "dojox/mobile/_ListTouchMixin",
- "./scrollable"
- ],
- function(dojo, declare, domClass, domConstruct, ComboBoxMenuMixin, WidgetBase, ListTouchMixin, Scrollable){
-
- return declare("dojox.mobile._ComboBoxMenu", [WidgetBase, ListTouchMixin, ComboBoxMenuMixin], {
-
-
-
-
-
-
-
- baseClass: "mblComboBoxMenu",
- bgIframe: true,
- buildRendering: function(){
- this.domNode = this.focusNode = domConstruct.create("div", { "class":"mblReset" });
- this.containerNode = domConstruct.create("div", { style: { position:"absolute", top:0, left:0 } }, this.domNode);
- this.previousButton = domConstruct.create("div", { "class":"mblReset mblComboBoxMenuItem mblComboBoxMenuPreviousButton", role:"option" }, this.containerNode);
- this.nextButton = domConstruct.create("div", { "class":"mblReset mblComboBoxMenuItem mblComboBoxMenuNextButton", role:"option" }, this.containerNode);
- this.inherited(arguments);
- },
- _createMenuItem: function(){
- return domConstruct.create("div", {
- "class": "mblReset mblComboBoxMenuItem" +(this.isLeftToRight() ? "" : " mblComboBoxMenuItemRtl"),
- role: "option"
- });
- },
- onSelect: function(/*DomNode*/ node){
-
-
- domClass.add(node, "mblComboBoxMenuItemSelected");
- },
- onDeselect: function(/*DomNode*/ node){
-
-
- domClass.remove(node, "mblComboBoxMenuItemSelected");
- },
- onOpen: function(){
- this.scrollable.init({
- domNode: this.domNode,
- containerNode: this.containerNode
- });
- this.scrollable.scrollTo({x:0, y:0});
- },
- onClose: function(){
- this.scrollable.cleanup();
- },
- destroyRendering: function(){
- this.bgIframe = false;
- this.inherited(arguments);
- },
- postCreate: function(){
- this.inherited(arguments);
- this.scrollable = new Scrollable(dojo, dojox);
- this.scrollable.resize = function(){};
- this.scrollable.androidWorkaroud = false;
- }
- });
- });
|