我想让我的表格行在 sencha touch 中可点击,这可能吗?我现在正在使用 onclick,但似乎不起作用......我想让 tr 带有可点击的位置,以防你没有看到。
Ext.define('android.view.EventDetail', {
extend: 'Ext.Panel',
xtype: 'eventdetail',
requires: [
'android.store.Eventstore',
'android.store.Placesstore',
],
config: {
fullscreen: 'true',
title: 'Details',
styleHtmlContent: true,
scrollable: 'vertical',
style: 'background-color: #FFF',
tpl: [
'<div class="detail"><table width="100%" class="bottomBorder"><tr><td><div class="imglist"><img src="http://admin.hishanghai.info/{picture}" width="120" height="120"></div><div class="title">{name}</div><div class="description">{description}</div></td></tr><tr><td><b>When:</b> {[this.timestart(values.time_start)]}</td></tr><tr onclick="goPlaces(values.id_place);"><td><b>Where:</b> {[this.showPlace(values.id_place)]}</td></tr><tr><td><b>Share</b></td></tr><tr><td><b>Link:</b> <a href="http://{website}">{website}</a></td></tr><tr><td><b>Phone:</b> {phone}</td></tr></table></div><div class="promote">Promote your own Event on HiShanghai</div>',
{
compiled: true,
showPlace: function(id_place){
var placesstore = Ext.getStore('Placesstore');
var i =0;
var placeid = 0;
var aRecord;
while(placeid != id_place){
aRecord = placesstore.getAt(i);
placeid = aRecord.data.id;
i+=1;
}
var naam = aRecord.data.name;
return naam;
},
}
],
//record: null
},
});