You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/07/29 01:55:21 UTC

svn commit: r1152047 - /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js

Author: hlship
Date: Thu Jul 28 23:55:21 2011
New Revision: 1152047

URL: http://svn.apache.org/viewvc?rev=1152047&view=rev
Log:
TAP5-1421: Only send an Ajax request to dismiss a single alert when the alert is persistent (has an id)

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js?rev=1152047&r1=1152046&r2=1152047&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js Thu Jul 28 23:55:21 2011
@@ -87,10 +87,13 @@ T5.extendInitializers(function() {
                     // TODO: Switch this to T5.ajax.sendRequest when implemented/available
 
                     // Send a request, we don't care about the response.
-                    Tapestry.ajaxRequest(spec.dismissURL,
-                        { parameters: {
-                            id : alertSpec.id
-                        }});
+
+                    if (alertSpec.id) {
+                        Tapestry.ajaxRequest(spec.dismissURL,
+                            { parameters: {
+                                id : alertSpec.id
+                            }});
+                    }
                 });
 
             });