From 07dc0f74569f5ad990f34c01944fe5a93181a26d Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 20 Apr 2016 16:43:14 +0200 Subject: * upgrade to Prado 3.3.1 --- lib/prado/COPYRIGHT | 2 +- lib/prado/HISTORY | 3 +- lib/prado/UPGRADE | 7 +++ lib/prado/framework/PradoBase.php | 4 +- .../Web/Javascripts/source/prado/prado.js | 2 +- lib/prado/framework/Web/UI/WebControls/TStyle.php | 1 + lib/prado/framework/pradolite.php | 60 ++++++++++++++++++++-- 7 files changed, 69 insertions(+), 10 deletions(-) diff --git a/lib/prado/COPYRIGHT b/lib/prado/COPYRIGHT index 42d357a..480b30f 100644 --- a/lib/prado/COPYRIGHT +++ b/lib/prado/COPYRIGHT @@ -1,7 +1,7 @@ The PRADO framework and the included demos are free software. They are released under the terms of the following BSD License. -Copyright 2004-2015, The PRADO Group (https://github.com/pradosoft) +Copyright 2004-2016, The PRADO Group (https://github.com/pradosoft) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/lib/prado/HISTORY b/lib/prado/HISTORY index 3679f27..89cea5c 100644 --- a/lib/prado/HISTORY +++ b/lib/prado/HISTORY @@ -1,4 +1,4 @@ -Version 3.3.1 XXX XX, 2016 +Version 3.3.1 April 19, 2016 BUG: Issue #540 - Fix TActiveFileUpload on IE11 (ctrlaltca) BUG: Issue #574 - Fix TActiveCustomValidator validation after error (ctrlaltca) @@ -15,6 +15,7 @@ BUG: TJuiDialog: avoid "cannot call methods on dialog prior to initialization" e BUG: Fix callback update of TActiveCheckBoxList when initially empty (LCSKJ) ENH: Issue #562 - Added TClientStyleSheet::PradoStyles (ctrlaltca) ENH: Issue #569 - Improved TJavascriptLogger / browser console logging of errors (ctrlaltca) +ENH: Issue #587 - Misc fixes for PHP7 compatibility (emkael) ENH: Applied some misc optimizations to class serialization (ctrlaltca) ENH: Intercept fatal errors using register_shutdown_function (ctrlaltca) ENH: Activecontrols: avoid updating client side if the value didn't change (ctrlaltca) diff --git a/lib/prado/UPGRADE b/lib/prado/UPGRADE index e445c32..1230a15 100644 --- a/lib/prado/UPGRADE +++ b/lib/prado/UPGRADE @@ -9,6 +9,13 @@ if you want to upgrade from version A to version C and there is version B between A and C, you need to following the instructions for both A and B. +Upgrading from v3.3.0 +--------------------- +- The long-time deprecated 'MySQL' translation source has been removed. + The 'Database' source can be used instead, specifying a valid ConnectionID + in the source parameter: + + Upgrading from v3.2.x --------------------- - Since PRADO 3.3.0, jQuery is the javascript framework of choice. All the existing PRADO controls have diff --git a/lib/prado/framework/PradoBase.php b/lib/prado/framework/PradoBase.php index 7cd2618..34f8bf0 100644 --- a/lib/prado/framework/PradoBase.php +++ b/lib/prado/framework/PradoBase.php @@ -69,7 +69,7 @@ class PradoBase */ public static function getVersion() { - return '3.3.0'; + return '3.3.1'; } /** @@ -104,7 +104,7 @@ class PradoBase */ public static function autoload($className) { - include_once($className.self::CLASS_FILE_EXT); + @include_once($className.self::CLASS_FILE_EXT); } /** diff --git a/lib/prado/framework/Web/Javascripts/source/prado/prado.js b/lib/prado/framework/Web/Javascripts/source/prado/prado.js index 0a1c485..3778903 100644 --- a/lib/prado/framework/Web/Javascripts/source/prado/prado.js +++ b/lib/prado/framework/Web/Javascripts/source/prado/prado.js @@ -271,7 +271,7 @@ var Prado = * Version of Prado clientscripts * @var Version */ - Version: '3.3.0', + Version: '3.3.1', /** * Registry for Prado components diff --git a/lib/prado/framework/Web/UI/WebControls/TStyle.php b/lib/prado/framework/Web/UI/WebControls/TStyle.php index f6d91e9..799af51 100644 --- a/lib/prado/framework/Web/UI/WebControls/TStyle.php +++ b/lib/prado/framework/Web/UI/WebControls/TStyle.php @@ -73,6 +73,7 @@ class TStyle extends TComponent */ public function __construct($style=null) { + parent::__construct(); if($style!==null) $this->copyFrom($style); } diff --git a/lib/prado/framework/pradolite.php b/lib/prado/framework/pradolite.php index 4a6de98..6cbcb39 100644 --- a/lib/prado/framework/pradolite.php +++ b/lib/prado/framework/pradolite.php @@ -1,7 +1,7 @@ _page=$owner; @@ -7186,6 +7190,52 @@ class TClientScriptManager extends TApplicationComponent $params=func_get_args(); $this->_page->registerCachingAction('Page.ClientScript','registerFocusControl',$params); } + public function registerPradoStyle($name) + { + $this->registerPradoStyleInternal($name); + $params=func_get_args(); + $this->_page->registerCachingAction('Page.ClientScript','registerPradoStyle',$params); + } + protected function registerPradoStyleInternal($name) + { + if(!isset($this->_registeredPradoStyles[$name])) + { + $base = $this->getPradoScriptAssetUrl(); + if(self::$_pradoStyles === null) + { + $packageFile = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::CSS_PACKAGES_FILE; + list($packages,$deps)= include($packageFile); + self::$_pradoStyles = $deps; + self::$_pradoStylePackages = $packages; + } + if (isset(self::$_pradoStyles[$name])) + $this->_registeredPradoStyles[$name]=true; + else + throw new TInvalidOperationException('csmanager_pradostyle_invalid',$name); + if(($packages=array_keys($this->_registeredPradoStyles))!==array()) + { + $base = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH; + list($path,$baseUrl)=$this->getPackagePathUrl($base); + $packagesUrl=array(); + $isDebug=$this->getApplication()->getMode()===TApplicationMode::Debug; + foreach ($packages as $p) + { + foreach (self::$_pradoStyles[$p] as $dep) + { + foreach (self::$_pradoStylePackages[$dep] as $style) + if (!isset($this->_expandedPradoStyles[$style])) + { + $this->_expandedPradoStyles[$style] = true; + if (!in_array($url=$baseUrl.'/'.$style,$packagesUrl)) + $packagesUrl[]=$url; + } + } + } + foreach($packagesUrl as $url) + $this->registerStyleSheetFile($url,$url); + } + } + } public function registerStyleSheetFile($key,$url,$media='') { if($media==='') -- cgit v1.2.3