click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r966616 - in /click/trunk/click/examples/webapp/ajax: form/advanced-form-ajax.js form/simple-form-ajax.js table/table-ajax.js
Date Thu, 22 Jul 2010 12:29:18 GMT
Author: sabob
Date: Thu Jul 22 12:29:17 2010
New Revision: 966616

URL: http://svn.apache.org/viewvc?rev=966616&view=rev
Log:
use currentTarget instead of target to cater for event bubbling

Modified:
    click/trunk/click/examples/webapp/ajax/form/advanced-form-ajax.js
    click/trunk/click/examples/webapp/ajax/form/simple-form-ajax.js
    click/trunk/click/examples/webapp/ajax/table/table-ajax.js

Modified: click/trunk/click/examples/webapp/ajax/form/advanced-form-ajax.js
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/ajax/form/advanced-form-ajax.js?rev=966616&r1=966615&r2=966616&view=diff
==============================================================================
--- click/trunk/click/examples/webapp/ajax/form/advanced-form-ajax.js (original)
+++ click/trunk/click/examples/webapp/ajax/form/advanced-form-ajax.js Thu Jul 22 12:29:17
2010
@@ -42,7 +42,7 @@ jQuery(document).ready(function() {
 function postForm(event) {
     // Retrieve the Form and submit button elements
     var form = jQuery("#form");
-    var submit = jQuery(event.target);
+    var submit = jQuery(event.currentTarget);
 
     // The server URL can be retrieved from the Form 'action' event
     var url = form.attr('action');

Modified: click/trunk/click/examples/webapp/ajax/form/simple-form-ajax.js
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/ajax/form/simple-form-ajax.js?rev=966616&r1=966615&r2=966616&view=diff
==============================================================================
--- click/trunk/click/examples/webapp/ajax/form/simple-form-ajax.js (original)
+++ click/trunk/click/examples/webapp/ajax/form/simple-form-ajax.js Thu Jul 22 12:29:17 2010
@@ -33,7 +33,7 @@ jQuery(document).ready(function() {
 function postForm(event) {
     // Retrieve the Form and submit button elements
     var form = jQuery("#form");
-    var submit = jQuery(event.target);
+    var submit = jQuery(event.currentTarget);
 
     // The server URL can be retrieved from the Form 'action' event
     var url = form.attr('action');

Modified: click/trunk/click/examples/webapp/ajax/table/table-ajax.js
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/ajax/table/table-ajax.js?rev=966616&r1=966615&r2=966616&view=diff
==============================================================================
--- click/trunk/click/examples/webapp/ajax/table/table-ajax.js (original)
+++ click/trunk/click/examples/webapp/ajax/table/table-ajax.js Thu Jul 22 12:29:17 2010
@@ -25,7 +25,7 @@ jQuery(document).ready(function() {
     // http://api.jquery.com/live/
     jQuery("#table td a").live('click', function(event){
         var callServer = true;
-        if (jQuery(event.target).text()=="Delete") {
+        if (jQuery(event.currentTarget).text()=="Delete") {
             callServer = window.confirm('Please confirm delete');
         }
 
@@ -52,7 +52,7 @@ jQuery(document).ready(function() {
 })
 
 function editOrDeleteCustomer(event) {
-    var link = jQuery(event.target);
+    var link = jQuery(event.currentTarget);
     var url = link.attr('href');
     jQuery.get(url, function(data) {
         // Update the result div with the server response
@@ -61,7 +61,7 @@ function editOrDeleteCustomer(event) {
 }
 
 function sortTable(event) {
-    var link = jQuery(event.target);
+    var link = jQuery(event.currentTarget);
     var url = link.attr('href');
     jQuery.get(url, function(data) {
         // Update the table container with the new table



Mime
View raw message