Changeset 7175 for extensions/GrumPluginClasses/classes
- Timestamp:
- Oct 13, 2010, 5:22:04 PM (14 years ago)
- Location:
- extensions/GrumPluginClasses/classes
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r6948 r7175 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCCore 5 class version : 1. 2.06 plugin version : 3. 2.05 class version : 1.3.0 6 plugin version : 3.3.0 7 7 date : 2010-07-28 8 8 ------------------------------------------------------------------------------ … … 20 20 | 1.2.0 | 2010/07/28 | * add the loadConfigFromFile function 21 21 | | | 22 | | |22 | 1.3.0 | 2010/10/13 | * add the addHeaderCSS, addHeaderJS functions 23 23 | | | 24 24 | | | … … 35 35 - static function unregister 36 36 - static function BBtoHTML 37 - static function addHeaderCSS 38 - static function addHeaderJS 37 39 ---------------------------------------------------------------------- */ 38 40 … … 42 44 { 43 45 static public $pluginName = "GPCCore"; 46 static protected $headerItems = array( 47 'css' => array(), 48 'js' => array() 49 ); 44 50 45 51 /* --------------------------------------------------------------------------- … … 305 311 } 306 312 313 /** 314 * used to add a css file in the header 315 * 316 * @param String $id : a unique id for the file 317 * @param String $file : the css file 318 */ 319 static public function addHeaderCSS($id, $file) 320 { 321 if(!array_key_exists($file, self::$headerItems['css'])) 322 { 323 self::$headerItems['css'][$id]=$file; 324 } 325 } 326 static public function addHeaderJS($id, $file) 327 { 328 global $template; 329 330 if(!array_key_exists($id, $template->known_scripts) and !array_key_exists($file, self::$headerItems['js'])) 331 { 332 $template->known_scripts[$id]=$url; 333 self::$headerItems['js'][$id]=$file; 334 } 335 } 336 337 /** 338 * declared as public to be accessible by the event manager, but this funcion 339 * is not aimed to be used directly 340 */ 341 static public function applyHeaderItems() 342 { 343 global $template; 344 345 foreach(self::$headerItems['css'] as $file) 346 { 347 $template->block_html_head(null, '<link rel="stylesheet" type="text/css" href="'.$file.'"/>', $template->smarty, $false); 348 } 349 350 foreach(self::$headerItems['js'] as $file) 351 { 352 $template->block_html_head(null, '<script type="text/javascript" src="'.$file.'"></script>', $template->smarty, $false); 353 } 354 } 355 307 356 } //class 308 357 358 add_event_handler('loc_end_page_header', array('GPCCore', 'applyHeaderItems')); 359 360 309 361 ?> -
extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
r6975 r7175 466 466 $template->append('head_elements', '<script type="text/javascript" src="plugins/'.$baseName.'external/interface/interface.js"></script>'); 467 467 $template->append('head_elements', '<script type="text/javascript" src="plugins/'.$baseName.'external/inestedsortable.pack.js"></script>'); 468 $template->append('head_elements', '<script type="text/javascript" src="plugins/'.$baseName.'criteriaBuilder. js"></script>');468 $template->append('head_elements', '<script type="text/javascript" src="plugins/'.$baseName.'criteriaBuilder.packed.js"></script>'); 469 469 $template->append('head_elements', 470 470 "<script type=\"text/javascript\">
Note: See TracChangeset
for help on using the changeset viewer.