-
21 Mar 2012 1:10 AM #1
Dataview and itemdblclick event
Dataview and itemdblclick event
Hi i'm trying to get list of phones in dataview. When i double click a particular item, the selected item should be maximised. im stuck here. guys pls help me out. pls see the code below
var dataview = Ext.create('Ext.view.View', {
store: store,
tpl : Ext.create('Ext.XTemplate',
'<tpl for=".">',
'<div class="phone">',
(!Ext.isIE6? '<img src="phones/{[values.name.replace(/ /g, "-")]}.png" />' ),
'</tpl>',
plugins : [
Ext.create('Ext.ux.DataView.Animated', {
duration : 550,
idProperty: 'id'
})
],
id: 'phones'
itemSelector: 'div.phone',
overItemCls : 'phone-hover',
singleSelect: true,
autoScroll : true,
listeners: {
itemdblclick: function(dataview, record, item, index, e)
{
alert('itemdblclick');
// to-do 'maximised view of the selected item'
}
}
});
-
21 Mar 2012 7:54 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
Does the itemdblclick event fire for you? You just need to "maximize" it?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Mar 2012 10:08 PM #3
Yes, the itemdblclick event should fire and the selected image should be maximised , while the remaining images at the background should be faded out. (kind of similar to popup)
Thanks in Advance
-
27 Mar 2012 4:16 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
You can open a window or floating panel with modal set to true.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote