| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojo/touch", |
| 4 |
"./sniff", |
| 5 |
"dijit/form/_ListBase" |
| 6 |
], function(declare, touch, has, ListBase){ |
| 7 |
|
| 8 |
return declare( "dojox.mobile._ListTouchMixin", ListBase, { |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
postCreate: function(){ |
| 18 |
this.inherited(arguments); |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
if(!( (has("ie") === 10 || (!has("ie") && has("trident") > 6)) && typeof(MSGesture) !== "undefined")){ |
| 23 |
this._listConnect("click", "_onClick"); |
| 24 |
}else{ |
| 25 |
this._listConnect(touch.press, "_onPress"); |
| 26 |
|
| 27 |
var self = this, |
| 28 |
tapGesture = new MSGesture(), |
| 29 |
target; |
| 30 |
|
| 31 |
this._onPress = function(e){ |
| 32 |
tapGesture.target = self.domNode; |
| 33 |
tapGesture.addPointer(e.pointerId); |
| 34 |
target = e.target; |
| 35 |
}; |
| 36 |
|
| 37 |
this.on("MSGestureTap", function(e){ |
| 38 |
self._onClick(e, target); |
| 39 |
}); |
| 40 |
} |
| 41 |
}, |
| 42 |
|
| 43 |
_onClick: function( evt, target){ |
| 44 |
this._setSelectedAttr(target); |
| 45 |
this.onClick(target); |
| 46 |
} |
| 47 |
}); |
| 48 |
}); |