Ejemplo n.º 1
0
 /**
  * initialize widget
  *
  */
 public function init()
 {
     //check needed values
     /*if(!isset($this->dataUrl))
       {
           throw new CException("You have to define a dataUrl!",500);
       }*/
     //get widget id
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $this->getId();
     }
     //set additional default options that only make sense after initialization
     $this->defaultOptions = CMap::mergeArray($this->defaultOptions, array('parent' => $this->id));
     //merge options with default options
     $this->options = CMap::mergeArray($this->defaultOptions, $this->options);
     //set correct image path according to skin if not set already
     if (!isset($this->options['icon_path'])) {
         $this->options['icon_path'] = $this->getAssetPath() . '/codebase/imgs/' . $this->skinToImgFolderMappings[$this->options['skin']] . '/';
     }
     //set correct image path according to skin if not set already
     if (!isset($this->options['image_path'])) {
         $this->options['image_path'] = $this->getAssetPath() . '/codebase/imgs/' . $this->skinToImgFolderMappings[$this->options['skin']] . '/';
     }
     $this->options['items'] = array(array('id' => 'file', 'text' => 'File', 'items' => array(array('id' => 'fileopen', 'text' => 'Open File'))));
     //publish assets
     parent::init();
 }
Ejemplo n.º 2
0
 /**
  * initialize widget
  *
  */
 public function init()
 {
     //lets put this into the document head
     $this->customScriptPosition = CClientScript::POS_END;
     //dont add image path option!
     $this->setImagePath = false;
     //check needed values
     if (!isset($this->dataUrl)) {
         throw new CException("You have to define a dataUrl!", 500);
     }
     //get widget id
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $this->getId();
     }
     //set additional default options that only make sense after initialization
     $this->defaultOptions = CMap::mergeArray($this->defaultOptions, array('container' => $this->id));
     //merge options with default options
     $this->options = CMap::mergeArray($this->defaultOptions, $this->options);
     //publish assets
     parent::init();
 }
Ejemplo n.º 3
0
 /**
  * initialize widget
  *
  */
 public function init()
 {
     //check needed values
     if (!isset($this->dataUrl)) {
         throw new CException("You have to define a dataUrl!", 500);
     }
     //get widget id
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $this->getId();
     }
     //set additional default options that only make sense after initialization
     $this->defaultOptions = CMap::mergeArray($this->defaultOptions, array('parent' => $this->id, 'image_path' => $this->getAssetPath() . '/codebase/imgs/', 'keymap' => $this->enableKeyboardSupport, 'drag' => $this->enableDragAndDrop));
     //init columns
     $this->options = CMap::mergeArray($this->options, array('columns' => $this->columns));
     //merge options with default options
     $this->options = CMap::mergeArray($this->defaultOptions, $this->options);
     //merge skin css to base css
     $this->css = CMap::mergeArray($this->css, array('codebase/skins/dhtmlxgrid_' . $this->options['skin'] . '.css'));
     //publish assets
     parent::init();
 }
Ejemplo n.º 4
0
 /**
  * initialize widget
  *
  */
 public function init()
 {
     //check needed values
     if (!isset($this->dataUrl)) {
         throw new CException("You have to define a dataUrl!", 500);
     }
     //set additional default options that only make sense after initialization
     $this->defaultOptions = CMap::mergeArray($this->defaultOptions, array('parent' => $this->id));
     //merge options with default options
     $this->options = CMap::mergeArray($this->defaultOptions, $this->options);
     //set correct image path according to skin if not set already
     if (!isset($this->options['image_path'])) {
         $this->options['image_path'] = $this->getAssetPath() . '/codebase/imgs/' . $this->skinToImgFolderMappings[$this->options['skin']] . '/';
     }
     parent::init();
 }