Changeset 1495
- Timestamp:
- 11/15/2006 05:54:00 PM (2 years ago)
- Location:
- trunk/framework/Web
- Files:
-
- 2 modified
-
TAssetManager.php (modified) (1 diff)
-
UI/WebControls/THtmlArea.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/framework/Web/TAssetManager.php
r1398 r1495 220 220 * @todo a generic solution to ignore certain directories and files 221 221 */ 222 p rotectedfunction copyDirectory($src,$dst)222 public function copyDirectory($src,$dst) 223 223 { 224 224 if(!is_dir($dst)) -
trunk/framework/Web/UI/WebControls/THtmlArea.php
r1398 r1495 125 125 public function __construct() 126 126 { 127 $this->setWidth('4 50px');127 $this->setWidth('470px'); 128 128 $this->setHeight('250px'); 129 129 } … … 210 210 { 211 211 $this->setViewState('Options', $value, ''); 212 } 213 214 /** 215 * @param string path to custom plugins to be copied. 216 */ 217 public function setCustomPluginPath($value) 218 { 219 $this->setViewState('CustomPluginPath', $value); 220 } 221 222 /** 223 * @return string path to custom plugins to be copied. 224 */ 225 public function getCustomPluginPath() 226 { 227 return $this->getViewState('CustomPluginPath'); 212 228 } 213 229 … … 259 275 if($tarfile===null || $md5sum===null) 260 276 throw new TConfigurationException('htmlarea_tarfile_invalid'); 261 return $this->getApplication()->getAssetManager()->publishTarFile($tarfile, $md5sum); 277 $url = $this->getApplication()->getAssetManager()->publishTarFile($tarfile, $md5sum); 278 $this->copyCustomPlugins($url); 279 return $url; 280 } 281 282 protected function copyCustomPlugins($url) 283 { 284 if($plugins = $this->getCustomPluginPath()) 285 { 286 $assets = $this->getApplication()->getAssetManager(); 287 $path = is_dir($plugins) ? $plugins : Prado::getPathOfNameSpace($plugins); 288 $dest = $assets->getBasePath().'/'.basename($url).'/tiny_mce/plugins/'; 289 if(!is_dir($dest) || $this->getApplication()->getMode()!==TApplicationMode::Performance) 290 $assets->copyDirectory($path, $dest); 291 } 262 292 } 263 293 … … 296 326 { 297 327 $options = array(); 298 $substrings = preg_split('/ \n|,\n/', trim($string));328 $substrings = preg_split('/,\s*\n|\n/', trim($string)); 299 329 foreach($substrings as $bits) 300 330 { 301 $option = explode(":",$bits); 331 $option = explode(":",$bits,2); 332 302 333 if(count($option) == 2) 303 334 $options[trim($option[0])] = trim(preg_replace('/\'|"/','', $option[1]));
