Beispiel #1
0
 public function log($message = null, $tablename = null, $record_id = null)
 {
     if ($record_id === null) {
         $record_id = $this->grid->getDataSource()->getIdForRecord($this->grid->getRecord());
     }
     parent::log($message, $tablename, $record_id);
 }
Beispiel #2
0
 public function setGrid(Am_Grid_Editable $grid)
 {
     parent::setGrid($grid);
     if ($this->hasPermissions()) {
         $grid->addCallback(Am_Grid_ReadOnly::CB_RENDER_TABLE, array($this, 'renderLink'));
     }
 }
Beispiel #3
0
 public function setGrid(Am_Grid_Editable $grid)
 {
     $grid->addCallback(Am_Grid_ReadOnly::CB_RENDER_TABLE, array($this, 'renderOut'));
     /* @var $ds Am_Query */
     $this->ds = clone $grid->getDataSource();
     parent::setGrid($grid);
 }
Beispiel #4
0
 public function setGrid(Am_Grid_Editable $grid)
 {
     parent::setGrid($grid);
     $this->decorator = new Am_Grid_Field_Decorator_LiveEdit($this);
     $grid->getField($this->fieldName)->addDecorator($this->decorator);
     $grid->addCallback(Am_Grid_ReadOnly::CB_RENDER_STATIC, array($this, 'renderStatic'));
 }
Beispiel #5
0
 public function __construct($id, $title, $url)
 {
     $this->id = $id;
     $this->title = $title;
     $this->url = $url;
     parent::__construct();
 }
Beispiel #6
0
 public function setGrid(Am_Grid_Editable $grid)
 {
     parent::setGrid($grid);
     if ($this->hasPermissions()) {
         $grid->getField($this->fieldName)->addDecorator($this->decorator);
         $grid->addCallback(Am_Grid_ReadOnly::CB_RENDER_STATIC, array($this, 'renderStatic'));
     }
 }
Beispiel #7
0
 public function __construct($id, $title, $callback, $type = self::SINGLE)
 {
     $this->id = $id;
     $this->title = $title;
     $this->callback = $callback;
     $this->type = $type;
     parent::__construct();
 }
Beispiel #8
0
 public function setGrid(Am_Grid_Editable $grid)
 {
     parent::setGrid($grid);
     if ($this->hasPermissions()) {
         $grid->addCallback(Am_Grid_ReadOnly::CB_TR_ATTRIBS, array($this, 'getTrAttribs'));
         $grid->addCallback(Am_Grid_Editable::CB_RENDER_CONTENT, array($this, 'renderContent'));
         $grid->prependField(new Am_Grid_Field_Sort('_sort'));
     }
 }
Beispiel #9
0
 public function setGrid(Am_Grid_Editable $grid)
 {
     parent::setGrid($grid);
     $this->decorator = new Am_Grid_Field_Decorator_LiveCheckbox($this);
     if ($this->hasPermissions()) {
         $grid->getField($this->fieldName)->addDecorator($this->decorator);
         if (!self::$jsIsAlreadyAdded) {
             $grid->addCallback(Am_Grid_ReadOnly::CB_RENDER_STATIC, array($this, 'renderStatic'));
             self::$jsIsAlreadyAdded = true;
         }
     }
 }
 public function __construct($id = null, $archive = true)
 {
     $this->archive = (bool) $archive;
     $this->title = $archive ? ___("Delete %s") : ___("Restore %s");
     $this->attributes['data-confirm'] = $archive ? ___("Do you really want to delete product?") : ___("Do you really want to restore product?");
     parent::__construct($id);
 }
 public function __construct($id = null, $title = null)
 {
     $this->title = ___('Resend Email');
     parent::__construct($id, $title);
     $this->setTarget('_top');
 }
 function __construct($id, $title)
 {
     parent::__construct($id, $title, null);
     $this->attributes['target'] = '_top';
 }
 public function __construct()
 {
     parent::__construct();
     $this->setTarget('_top');
 }
 public function __construct($id, $title)
 {
     $this->id = $id;
     $this->title = $title;
     parent::__construct();
     $this->setTarget('_top');
 }
 public function __construct($id = null, $title = null)
 {
     $this->title = ___("Upload");
     parent::__construct($id, $title);
 }
 public function __construct($id = null, $title = null)
 {
     $this->title = ___("Repeat Action Handling");
     parent::__construct($id, $title);
     $this->setTarget('_top');
 }
Beispiel #17
0
 public function __construct($id = null, $title = null)
 {
     $this->title = ___("Delete %s");
     $this->attributes['data-confirm'] = ___("Do you really want to delete record?");
     parent::__construct($id, $title);
 }
Beispiel #18
0
 public function __construct($id = null, $title = null)
 {
     $this->title = ___('Submit New Ticket');
     parent::__construct($id, $title);
 }
Beispiel #19
0
 public function log($message = null, $tablename = null, $record_id = null)
 {
     if ($record_id === null) {
         $ids = $this->getIds();
         if (empty($ids)) {
             return;
         }
         if ($ids[0] == self::ALL) {
             $record_id = 'several records';
         } else {
             $record_id = implode(',', $ids);
         }
     }
     parent::log($message, $tablename, $record_id);
 }
Beispiel #20
0
 public function __construct($id = null, $title = null)
 {
     $this->title = ___("Void");
     $this->attributes['data-confirm'] = ___("Do you really want to void commission?");
     parent::__construct($id, $title);
 }
Beispiel #21
0
 function __construct($id = null, $title = null, User $reseller)
 {
     parent::__construct($id, $title);
     $this->reseller = $reseller;
 }
Beispiel #22
0
 public function __construct($id = null, $title = null)
 {
     parent::__construct($id, ___('Subscribe all available users'));
 }
Beispiel #23
0
 /**
  * Add action to be executed on the grid
  */
 public function actionAdd(Am_Grid_Action_Abstract $action)
 {
     $this->actions[$action->getId()] = $action;
     $action->setGrid($this);
     return $action;
 }