示例#1
0
 /**
  * 
  * @param string $id
  * @param ajax_buffer $ajax_buf
  */
 public function __construct($id, &$ajax_buf)
 {
     parent::__construct($id);
     $this->action = new ajax_entities_manager_action();
     $this->_ajax_buf = $ajax_buf;
     $this->actionvar = new ajax_var($this->UID('actionvar'), ajax_entities_manager_action::NOACT);
     $this->itemvar = new ajax_var($this->UID('itemvar'), '');
     $this->confirmvar = new ajax_var($this->UID('confirmvar'), false);
     $this->_ajax_buf->register_var($this->actionvar);
     $this->_ajax_buf->register_var($this->itemvar);
     $this->_ajax_buf->register_var($this->confirmvar);
     $this->_ajax_buf->addClientInitString($this->renderInits());
 }
示例#2
0
 /**
  * name: __construct
  * params: $page,$count
  */
 public function __construct($id, $total, $pagesize = 10, $template = null)
 {
     parent::__construct($id);
     $this->pager = new pager($total, $pagesize);
     $page = isset($_REQUEST[$this->UID('page')]) ? $_REQUEST[$this->UID('page')] : 1;
     $this->pager->set_curpage($page);
     $this->pager->recalc();
     if (is_null($template)) {
         $this->template = $this->_default_template;
     } else {
         $this->template = $template;
     }
 }
示例#3
0
 /**
  * Creates new ajax_var object
  *
  * @param string $id
  * @param string $value
  */
 public function __construct($id, $value)
 {
     parent::__construct($id);
     $this->value = $value;
 }
示例#4
0
 public function __construct($id, $datasource = null, $header_template = null)
 {
     parent::__construct($id);
     $this->datasource = $datasource;
     $this->cache = new cacher();
     if ($header_template != null) {
         $this->header_template = $header_template;
     } else {
         $this->header_template = $this->_default_header_template;
     }
     if (isset($_REQUEST[$this->get_sortby_param()])) {
         $this->_sorting = $_REQUEST[$this->get_sortby_param()];
     } else {
         $this->_sorting = sorting::DEFAULT_SORT;
     }
     if (isset($_REQUEST[$this->get_sort_direction_param()])) {
         $this->_sort_dir = $_REQUEST[$this->get_sort_direction_param()];
     } else {
         $this->_sort_dir = sorting::SORT_DIR_DEFAULT;
     }
 }
示例#5
0
 /**
  * Creates new ajax buffer
  *
  * @param string $id
  * @param bool $show_progress
  */
 public function __construct($id, $show_progress = false)
 {
     parent::__construct($id);
     $rid = $this->client_id();
     $this->is_post_back = isset($_REQUEST[$rid]);
     $this->show_progress = $show_progress;
     $this->postback_url = $_SERVER['REQUEST_URI'];
     $this->content = '';
     ob_start();
 }