Changeset 117
- Timestamp:
- 05/14/08 15:05:33 (3 months ago)
- Files:
-
- trunk/rapyd/components/component.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/rapyd/components/component.php
r113 r117 19 19 public function __construct($config = array()) 20 20 { 21 if (is_string($config)) 22 { 23 $ext = end(explode('.', $config)); 24 switch($ext) 25 { 26 case "php": 27 include($config); 28 break; 29 30 case "yaml": 31 rpd::load_library('vendors/spyc'); 32 $config = Spyc::YAMLLoad($config); 33 break; 34 default: 35 $config = array(); 36 } 37 } 21 38 if (count($config) > 0) 22 39 { … … 275 292 else 276 293 { 277 $action = "javascript:window.location='".$config['url']."'"; 294 $action = "javascript:window.location='".$config['url']."'"; 278 295 } 279 296 $position = (isset($config['position'])) ? $config['position'] : "TR"; … … 281 298 $this->button("btn_act", $caption, $action, $position, $class); 282 299 } 283 300 284 301 285 302 // --------------------------------------------------------------------