Created
August 13, 2014 18:41
-
-
Save jforaker/b0021822f191fcc6ea6a to your computer and use it in GitHub Desktop.
Multiple tap events Sencha Touch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap: { | |
element: 'element', | |
delegate: '.app-box, .doc-box, .bubble-holder', | |
fn: function(e){ | |
var url = e.target.name, | |
name = e.delegatedTarget.textContent, | |
divClassName = e.delegatedTarget.className, | |
appbox = "app-box", | |
docbox = "doc-box", | |
bubble = "bubble-holder", | |
feedAppController = CHLK._app.getController('feed.FeedItemViewController'); | |
console.log(divClassName); | |
switch(divClassName){ | |
case docbox : | |
var me = this, | |
config = { | |
title: "Attachment downloaded", | |
message: name, | |
buttons: [{ | |
id: 'MsgConfirm', | |
disabled: false | |
}], | |
scope: me | |
}; | |
Ext.ux.plugin.AutoHideMessageBox.alert(config); | |
break; | |
case appbox : | |
feedAppController.loadTheApp(url, name); | |
break; | |
case bubble : | |
feedAppController.showCommentPop(this); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment