I am currently using Sencha Touch 2 to create an image gallery. I have already been successful in loading the images from a JSON store in the main gallery, which features thumbnails of the images. I want to be able to have the user click/tap on each of the images in the main gallery and have the TAP EVENT push the image into a new view, which will display the image in its full-size.
Currently, this is my view:
Ext.define("tumblrPhotos.view.SampleView", {
extend: 'Ext.dataview.DataView',
xtype:'sampleviewtest',
requires: [
'tumblrPhotos.store.PhotoStore',
],
config: {
title: 'Photos',
layout: 'card',
id: 'gallerythumbnail',
store: 'PhotoStore',
styleHTMLContent: true,
fullscreen: true,
scrollable: 'vertical',
baseCls: 'gallery-image',
itemTpl: new Ext.XTemplate ([
'<div class="gallery-thumbnail">',
'<tpl for="photos[0].alt_sizes[0]">',
'<img src="{url}" class="test" />',
'</tpl>',
'</div>'
].join('')
),
},
});
And this is my controller so far. This part is not working:
Ext.define('tumblrPhotos.controller.GalleryController',{
extend: 'Ext.app.Controller',
config: {
refs: {
nav: 'galleryview', //the xtype
},
control: {
'#gallerythumbnail': { //the xtype
itemtap: 'viewFullScreen',
}
}
},
viewFullScreen : function(dv,index,target,record,e,eOpts){
Ext.ComponentManager.get('galleryview').push('tumblrPhotos.view.FullView');
console.log(record);
}
});
Thank you so much to all who can help me! I really appreciate it!