コード例 #1
0
ファイル: OrderEditor.php プロジェクト: krisldz/Gekosale2
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadProducts_' . $this->_id;
     $this->_attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadProducts'));
     $this->_attributes['load_category_children'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     $this->_attributes['datagrid_filter'] = $this->getDatagridFilterData();
 }
コード例 #2
0
ファイル: ClientSelect.php プロジェクト: krisldz/Gekosale2
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadClients_' . $this->_id;
     $this->_jsFunctionDetails = 'LoadClientData_' . $this->_id;
     $this->_attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     $this->_attributes['jsfunctiondetails'] = 'xajax_' . $this->_jsFunctionDetails;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadClients'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsFunctionDetails, $this, 'loadClientDetails'));
 }
コード例 #3
0
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadProducts_' . $this->_id;
     $this->_attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadProducts_' . $this->_id));
     $this->_attributes['load_category_children'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     if (isset($this->_attributes['exclude_from'])) {
         $this->_attributes['exclude_from_field'] = $this->_attributes['exclude_from']->GetName();
     }
     if (!isset($this->_attributes['exclude'])) {
         $this->_attributes['exclude'] = array(0);
     }
     $this->_attributes['datagrid_filter'] = $this->getDatagridFilterData();
 }
コード例 #4
0
ファイル: DatagridSelect.php プロジェクト: krisldz/Gekosale2
 public function __construct($attributes)
 {
     parent::__construct($attributes);
     if (!isset($this->_attributes['key'])) {
         throw new Exception("Datagrid key (attribute: key) not set for field '{$this->_attributes['name']}'.");
     }
     if (!isset($this->_attributes['columns'])) {
         throw new Exception("Datagrid columns (attribute: columns) not set for field '{$this->_attributes['name']}'.");
     }
     if (!isset($this->_attributes['datagrid_init_function']) || !is_callable($this->_attributes['datagrid_init_function'])) {
         throw new Exception("Datagrid initialization function not set (attribute: datagrid_init_function) for field '{$this->_attributes['name']}'. Hint: check whether the method you have specified is public.");
     }
     $this->_jsFunction = 'LoadRecords_' . $this->_id;
     $this->_attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadRecords_' . $this->_id));
 }