tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkemn...@apache.org
Subject git commit: TAP5-2380: use the correct element in the data-async-trigger link click handler
Date Tue, 02 Sep 2014 13:01:49 GMT
Repository: tapestry-5
Updated Branches:
  refs/heads/master c158e75c2 -> 38b3aa905


TAP5-2380: use the correct element in the data-async-trigger link click handler


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/38b3aa90
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/38b3aa90
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/38b3aa90

Branch: refs/heads/master
Commit: 38b3aa905bd649e1187d4f60885b0febe6477159
Parents: c158e75
Author: Jochen Kemnade <jochen.kemnade@eddyson.de>
Authored: Tue Sep 2 15:00:38 2014 +0200
Committer: Jochen Kemnade <jochen.kemnade@eddyson.de>
Committed: Tue Sep 2 15:01:25 2014 +0200

----------------------------------------------------------------------
 .../main/coffeescript/META-INF/modules/t5/core/zone.coffee  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/38b3aa90/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee
index 7837541..54e1a2f 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/zone.coffee
@@ -118,15 +118,16 @@ define ["./dom", "./events", "./ajax", "./console", "./forms",  "underscore"],
 
       ajax event.memo.url,
         data: _.extend { "t:zoneid": zone.element.id }, parameters, event.memo.parameters
-        success: (response) =>
+        success: (response) ->
           zone.trigger events.zone.update, content: response.json?.content
 
     dom.onDocument "click", "a[data-async-trigger]", ->
+      link = @closest 'a[data-async-trigger]'
 
-      @addClass "ajax-update"
+      link.addClass "ajax-update"
 
-      ajax (@attr "href"),
-        complete: => @removeClass "ajax-update"
+      ajax (link.attr "href"),
+        complete: -> link.removeClass "ajax-update"
 
       return false # cancel click event
 


Mime
View raw message