Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know how to implement <strong>onItemDisclousre()</strong> on two icons but probably this will help you. <br> In the following example i have put an image on every <strong>itemlist</strong> and functionality is provided on <strong>itemtap event</strong>. This will serve the purpose of doing multiple tasks with single <strong>itemlist.</strong></p> <pre><code>//demo.js Ext.define("Stackoverflow.view.demo", { extend: "Ext.Container", requires:"Ext.dataview.List", alias: "widget.demo", config: { layout: { type: 'fit' }, items: [ { xtype: "list", store: "store", itemId:"samplelist", loadingText: "Loading Notes...", emptyText: "&lt;div class=\"notes-list-empty-text\"&gt;No notes found.&lt;/div&gt;", onItemDisclosure: true, itemTpl:"&lt;div class='x-button related-btn' btnType='related' style='border: none; background: url(\"a.png\") no-repeat;'&gt;&lt;/div&gt;"+ "&lt;div class=\"list-item-title\"&gt;{title}&lt;/div&gt;" grouped: true } ], listeners: [ { delegate: "#samplelist", event: "disclose", fn: "onDiscloseTap" } ] }, onDiscloseTap: function (list, record, target, index, evt, options) { this.fireEvent('ondisclosuretap', this, record); } }); </code></pre> <p>// Democontrol.js</p> <pre><code> Ext.define("Stackoverflow.controller.Democontrol", { extend: "Ext.app.Controller", config: { refs: { // We're going to lookup our views by xtype. Demo: "demo", Demo1: "demo list", }, control: { Demo: { ondisclosuretap: "Disclosure", }, Demo1: { itemtap:"imagetap" } } }, Disclosure: function (list, record,target,index,e,obj) { Ext.Msg.alert('','Disclosure Tap'); }, imagetap: function (dataview,index,list,record, tar, obj) { tappedItem = tar.getTarget('div.x-button'); btntype = tappedItem.getAttribute('btnType'); if(btntype == 'related') { Ext.Msg.alert('','Image/Icon Tap'); } }, // Base Class functions. launch: function () { this.callParent(arguments); }, init: function () { this.callParent(arguments); } }); </code></pre> <p>//app.css</p> <pre><code> .related-btn { width: 100px; height: 100px; position: absolute; bottom: 0.85em; right: 2.50em; -webkit-box-shadow: none; } </code></pre> <p>Hope this will help you.<br> bye.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload