From 469fe68e8a08330cb0ed8b56f758bee8d7c9445e Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 13 Jun 2006 02:13:21 +0000 Subject: Merge from 3.0 branch till 1156. --- HISTORY | 2 ++ UPGRADE | 4 +++- demos/quickstart/protected/application.xml | 3 +++ demos/quickstart/protected/comments/CommentList.tpl | 7 +++++-- framework/Web/Javascripts/js/prado.js | 3 +-- framework/Web/Javascripts/prado/form.js | 6 +++++- tests/FunctionalTests/tickets/tests/Ticket191TestCase.php | 4 ++-- 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/HISTORY b/HISTORY index b2133b9d..9701e432 100644 --- a/HISTORY +++ b/HISTORY @@ -12,8 +12,10 @@ NEW: SQLMap (Wei) Version 3.0.2 July 2, 2006 ========================== BUG: Ticket#182 - List and validator controls cause problem in child classes (Qiang) +BUG: Ticket#191 - Duplicated postbacks occur when using TButton with validators (Qiang) BUG: Ticket#213 - PRADO Requirements Checker charset error (Qiang) CHG: ensureChildControls() is now invoked in TControl::initRecursive (Qiang) +CHG: Postback enabled control will always disable default client-side browser action. (Qiang) Version 3.0.1 June 4, 2006 ========================== diff --git a/UPGRADE b/UPGRADE index 79282500..4640c9ca 100644 --- a/UPGRADE +++ b/UPGRADE @@ -16,7 +16,9 @@ for both A and B. Upgrading from v3.0.1 --------------------- - +- Postback enabled control will always disable default client-side browser action. + This is due to google toolbar's interference of event stopping scheme. + This modification should only affect user-derived postback javascripts. Upgrading from v3.0.0 --------------------- diff --git a/demos/quickstart/protected/application.xml b/demos/quickstart/protected/application.xml index 7ed4a749..1765230b 100644 --- a/demos/quickstart/protected/application.xml +++ b/demos/quickstart/protected/application.xml @@ -24,4 +24,7 @@ + + + \ No newline at end of file diff --git a/demos/quickstart/protected/comments/CommentList.tpl b/demos/quickstart/protected/comments/CommentList.tpl index ef74316a..06cddd1e 100644 --- a/demos/quickstart/protected/comments/CommentList.tpl +++ b/demos/quickstart/protected/comments/CommentList.tpl @@ -3,7 +3,10 @@

Comments - ( Add your comments )

+ > + ( Add your comments ) + +
@@ -25,7 +28,7 @@ - + >

Post a comment

diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index 5f52fece..65ffd1b8 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -247,8 +247,7 @@ form.action=options['PostBackUrl'];if(options['TrackFocus']) {var active=document.activeElement;if(active) lastFocus.value=active.id;else lastFocus.value=options['EventTarget'];}} -$('PRADO_POSTBACK_TARGET').value=options['EventTarget'];$('PRADO_POSTBACK_PARAMETER').value=options['EventParameter'];if(options['StopEvent']) -Event.stop(event);Event.fireEvent(form,"submit");} +$('PRADO_POSTBACK_TARGET').value=options['EventTarget'];$('PRADO_POSTBACK_PARAMETER').value=options['EventParameter'];Event.stop(event);Event.fireEvent(form,"submit");} Prado.Element={setValue:function(element,value) {var el=$(element);if(el&&typeof(el.value)!="undefined") el.value=value;},select:function(element,method,value) diff --git a/framework/Web/Javascripts/prado/form.js b/framework/Web/Javascripts/prado/form.js index aec9395d..beea9248 100644 --- a/framework/Web/Javascripts/prado/form.js +++ b/framework/Web/Javascripts/prado/form.js @@ -129,7 +129,11 @@ Prado.PostBack = function(event,options) $('PRADO_POSTBACK_TARGET').value = options['EventTarget']; $('PRADO_POSTBACK_PARAMETER').value = options['EventParameter']; - if(options['StopEvent']) + /** + * Since google toolbar prevents browser default action, + * we will always disable default client-side browser action + */ + /*if(options['StopEvent']) */ Event.stop(event); Event.fireEvent(form,"submit"); } diff --git a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php index cc4c1571..d899aab5 100644 --- a/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php +++ b/tests/FunctionalTests/tickets/tests/Ticket191TestCase.php @@ -6,9 +6,9 @@ class Ticket191TestCase extends SeleniumTestCase { $this->open('tickets/index.php?page=Ticket191'); $this->type("ctl0\$Content\$TextBox2", "test"); - $this->clickAndWait("//input[@type='submit' and @name='ctl0\$Content\$ctl0']", ""); + $this->clickAndWait("name=ctl0\$Content\$ctl0"); $this->type("ctl0\$Content\$TextBox", "test"); - $this->clickAndWait("//input[@type='submit' and @name='ctl0\$Content\$ctl1']", ""); + $this->clickAndWait("name=ctl0\$Content\$ctl1"); $this->verifyNotVisible('ctl0_Content_ctl2'); } } -- cgit v1.2.3