From c5983c0440913cd67f3744c7dda3c3bfc7eee0ed Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 1 May 2006 15:40:31 +0000 Subject: Merge from 3.0 branch till 1004. --- framework/Web/Javascripts/js/prado.js | 4 +-- framework/Web/Javascripts/prado/element.js | 4 +-- framework/Web/THttpRequest.php | 34 +++++++++++++++++----- framework/Web/UI/TTemplateManager.php | 2 +- framework/Web/UI/WebControls/TBaseValidator.php | 11 ++++--- .../Web/UI/WebControls/TValidationSummary.php | 6 ++-- 6 files changed, 40 insertions(+), 21 deletions(-) (limited to 'framework/Web') diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index d80f984d..498a6cf7 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -256,7 +256,7 @@ selection[method](isList?element:el,value);},click:function(element) {var el=$(element);if(!el)return;if(document.createEvent) {var evt=document.createEvent('HTMLEvents');evt.initEvent('click',true,true);el.dispatchEvent(evt);} else if(el.fireEvent) -{el.fireEvent('onclick');if(isFunction(el.onclick)) +{el.fireEvent('onclick');if(typeof(el.onclick)=="function") el.onclick();}},setAttribute:function(element,attribute,value) {var el=$(element);if(attribute=="disabled"&&value==false) el.removeAttribute(attribute);else @@ -265,7 +265,7 @@ el.setAttribute(attribute,value);},setOptions:function(element,options) {while(el.length>0) el.remove(0);for(var i=0;i_items=array_merge($getVariables,array_merge($_GET,$_POST)); } @@ -452,24 +455,41 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar if($encodeGetItems) { foreach($getItems as $name=>$value) - $url.=$amp.urlencode($name).'='.urlencode($value); + { + if(is_array($value)) + { + $name=urlencode($name.'[]'); + foreach($value as $v) + $url.=$amp.$name.'='.$v; + } + else + $url.=$amp.urlencode($name).'='.urlencode($value); + } } else { foreach($getItems as $name=>$value) - $url.=$amp.$name.'='.$value; + { + if(is_array($value)) + { + foreach($value as $v) + $url.=$amp.$name.'[]='.$v; + } + else + $url.=$amp.$name.'='.$value; + } } } if($this->getUrlFormat()==='Path') { $url=strtr($url,array($amp=>'/','?'=>'/','='=>'/')); - if(defined('SID') && SID != '') + if(defined('SID') && SID != '' && !((int)ini_get('session.use_cookies')===1 && ((int)ini_get('session.use_only_cookies')===1))) $url.='?'.SID; return $this->getApplicationUrl().'/'.$url; } else { - if(defined('SID') && SID != '') + if(defined('SID') && SID != '' && !((int)ini_get('session.use_cookies')===1 && ((int)ini_get('session.use_only_cookies')===1))) $url.=$amp.SID; return $this->getApplicationUrl().'?'.$url; } diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 5f75caf3..eac7c157 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -158,7 +158,7 @@ class TTemplate extends TApplicationComponent implements ITemplate * '<%@\s*((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?")*)\s*%>' - directives * '<%[%#~\\$=\\[](.*?)%>' - expressions */ - const REGEX_RULES='/||<\/?com:([\w\.]+)((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?"|\s*[\w\.]+=<%.*?%>)*)\s*\/?>|<\/?prop:([\w\.]+)\s*>|<%@\s*((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?")*)\s*%>|<%[%#~\\$=\\[](.*?)%>/msS'; + const REGEX_RULES='/||<\/?com:([\w\.]+)((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?"|\s*[\w\.]+=<%.*?%>)*)\s*\/?>|<\/?prop:([\w\.]+)\s*>|<%@\s*((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?")*)\s*%>|<%[%#~\\$=\\[](.*?)%>/msS'; /** * Different configurations of component property/event/attribute diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index a63941db..ea1a5836 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -42,7 +42,7 @@ * be displayed. Error display is controlled by {@link setDisplay Display} property. * * You can also customized the client-side behaviour by adding javascript - * code to the subproperties of the {@link getClientValidation ClientValidation} + * code to the subproperties of the {@link getClientSide ClientSide} * property. See quickstart documentation for further details. * * You can also place a {@link TValidationSummary} control on a page to display error messages @@ -176,7 +176,7 @@ abstract class TBaseValidator extends TLabel implements IValidator * * @return TValidatorClientScript javascript validator event options. */ - public function getClientValidation() + public function getClientSide() { if(is_null($this->_clientScript)) $this->_clientScript = $this->createClientScript(); @@ -494,10 +494,9 @@ abstract class TBaseValidator extends TLabel implements IValidator * TValidatorClientScript class. * * Client-side validator events can be modified through the {@link - * TBaseValidator::getClientValidation ClientValidation} property of a - * validator. The subproperties of ClientValidation are those of the - * TValidatorClientScript properties. The client-side validator supports the - * following events. + * TBaseValidator::getClientSide ClientSide} property of a validator. The + * subproperties of ClientSide are those of the TValidatorClientScript + * properties. The client-side validator supports the following events. * * The OnValidate event is raise before the validator validation * functions are called. diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index aa46142b..87821292 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -258,7 +258,7 @@ class TValidationSummary extends TWebControl * @return TValidationSummaryClientScript client-side validation summary * event options. */ - public function getClientValidation() + public function getClientSide() { if(is_null($this->_clientScript)) $this->_clientScript = $this->createClientScript(); @@ -376,8 +376,8 @@ class TValidationSummary extends TWebControl * * Client-side validation summary events such as {@link setOnHideSummary * OnHideSummary} and {@link setOnShowSummary OnShowSummary} can be modified - * through the {@link TBaseValidator:: getClientValidation ClientValidation} - * property of a validation summary. + * through the {@link TBaseValidator:: getClientSide ClientSide} property of a + * validation summary. * * The OnHideSummary event is raise when the validation summary * requests to hide the messages. -- cgit v1.2.3