I'm trying to set up my controller to answer the Ext.XTemplate events And to avoid this, the hassle of writing a bunch of hacked javascript Unfortunately, I can not find a way to either 1) Log on one click event or 2) Use componentQuery to register XTemplate
[: {reportChooser: 'xtemplate [id = jobReportChooser]'}, control: {reportChooser: {tap: 'OnAnonymousTap '}}}, ] Is there a way to do this in the controller or at least listen to the audience?
I could not find a direct reference because there is no built-in event in XTemplate But here's a nice solution that's a bit cleaner. To start the method get started: function () {this.element.on ({tap: function (e, Dom). {Var El = Ext.get (e.target), elParent = Ext.get (e.pare NT), fireworld; Window.jobAction = this; Window.jobEl = el; If (el.hasCls ('Job- Start ')) L. Parent (). Hackles (' Job-Start ')) {fireEvent =' start '; } And if (L HASCLS ('Job-Hold')) Parent (). HCL ('Job-Hold')) {Fire Event = 'Hold'; } And if (LHASCLS ('Job-Report')) L. Prent (). Hackles ('job-report')) {extension.viewport.setmasked ({xtype: 'loadmask'}); Var TeamID = APPNAME.currentItem.data.teamId; Var jobId = APPNAME.currentItem.data.jobId; APPNAME.app.dispatch ({Administrator: 'Jobs', Action: 'Display Reports Explorers', Args: [Team ID, 'Job', Job ID]}} If (FireWire) {Ext.Viewport.setMasked ({xtype : 'Loadmask'}); This.fireEvent (fireEvent, Alloy.currentJob, L); }}, Delegate: '.job-info', scope: this}); } Use the application sending method . This will make life very easy and will help you organize tasks inside the controller.
Comments
Post a Comment