From 47a3cb88e7ed7f2a87bbf024dff3416fc6cd8002 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 31 Aug 2006 20:17:39 +0000 Subject: merge from 3.0 branch till 1374. --- framework/Util/TSimpleDateFormatter.php | 3 +- framework/Web/UI/TClientScriptManager.php | 13 +- framework/Web/UI/WebControls/TDataBoundControl.php | 1 + framework/Web/UI/WebControls/TDatePicker.php | 7 +- .../Web/UI/WebControls/TDropDownListColumn.php | 286 +++++++++++++++++++++ framework/Web/UI/WebControls/TStyleSheet.php | 2 +- 6 files changed, 302 insertions(+), 10 deletions(-) create mode 100644 framework/Web/UI/WebControls/TDropDownListColumn.php (limited to 'framework') diff --git a/framework/Util/TSimpleDateFormatter.php b/framework/Util/TSimpleDateFormatter.php index 9c2975d5..046a3442 100644 --- a/framework/Util/TSimpleDateFormatter.php +++ b/framework/Util/TSimpleDateFormatter.php @@ -118,7 +118,8 @@ class TSimpleDateFormatter $bits['dd'] = str_pad("{$date['mday']}", 2, '0', STR_PAD_LEFT); $bits['d'] = $date['mday']; - return str_replace(array_keys($bits), $bits, $this->pattern); + $pattern = preg_replace('/M{3,4}/', 'MM', $this->pattern); + return str_replace(array_keys($bits), $bits, $pattern); } public function getMonthPattern() diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 3d0ced60..18d6089e 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -133,7 +133,7 @@ class TClientScriptManager extends TApplicationComponent $this->_registeredPradoScripts[$name]=true; else throw new TInvalidOperationException('csmanager_pradoscript_invalid',$name); - $basePath=$this->getPradoBaseScriptPath(); + $basePath=$this->getPradoScriptBasePath(); foreach(self::$_pradoScripts[$name] as $script) { if(!isset($this->_publishedPradoFiles[$script])) @@ -145,7 +145,10 @@ class TClientScriptManager extends TApplicationComponent } } - protected function getPradoBaseScriptPath() + /** + * @return string the directory containing the PRADO js script files + */ + protected function getPradoScriptBasePath() { $basePath = Prado::getFrameworkPath().'/'.self::SCRIPT_PATH; if($this->getApplication()->getMode()===TApplication::STATE_DEBUG) @@ -155,15 +158,15 @@ class TClientScriptManager extends TApplicationComponent } /** - * Renders the