Sencha Touch 2.3 をインストールしたところ、「Ext.plugin.SortableList」という新しいプラグインがあることに気付きました。
http://docs.sencha.com/touch/2.3.0/#!/api/Ext.plugin.SortableList
Sencha Touch 2.2.1 に基づいて独自のソート可能なリストを作成している最中にこれを見て、Sencha Touch をアップグレードして代わりにプラグインを使用する時が来たと考えました。
誰でもこれを使用する方法の小さな例を提供できますか? ドラッグ用のハンドルセレクターを指定してすぐに使用できるようになることを望んでいましたが、うまくいかないようです。コードは以下です。どんな助けでも感謝します。
Ext.define('kcm.view.favslist', {
extend: 'Ext.List',
requires: [
'Ext.dataview.List',
'kcm.store.favstore',
'Ext.plugin.SortableList'
],
xtype: 'favslist',
config: {
height: '100%',
width: '100%',
emptyText: 'No favorites. Tap the Add button to add the current topic.',
store: 'favstore_id',
itemTpl: '<table id="each_fav" width="100%" valign="center" border="0"> '+
'<tr valign="center">'+
'<td valign="center" width="30"><div>' +
'<input type="image" name="Delete" id="delfav" src="resources/images/deletebuttonnew.png" ' +
'</div></td>'+
'<td><div class="fav_title">{fav_name}</div>' +
'<div class="fav_breadcrumb">{breadcrumb}</div></td><td valign="center" width="30"><div>' +
'<input type="image" name="dragfav" id="dragfav" zindex="99999" src="resources/images/dragitem.png" ' +
'</div>'+
'</td>'+
'</tr>'+
'</table>',
plugins: [
{
xclass: 'Ext.plugin.SortableList',
handleSelector: 'dragfav'
}
]
}
});
ありがとう、
アンディ。