function init() { parent::init(); // $this->addClass('consumption-item-view'); // $this->js('reload')->reload(); // $this->add('View_Info')->set($this->sale_order_id); }
function init() { parent::init(); $this->js('reload')->reload(); $this->running_task_id = $this->add('xepan\\projects\\Model_Employee')->load($this->app->employee->id)->get('running_task_id'); /*************************************************************************** Virtual page for TASK DETAIL ***************************************************************************/ $self = $this; $self_url = $this->app->url(null, ['cut_object' => $this->name]); $this->js('click')->_selector("#" . $this->getJSID() . ' .task-item')->univ()->frameURL('TASK/REQUEST DETAIL', [$this->app->url('xepan_projects_taskdetail'), 'task_id' => $this->js()->_selectorThis()->data('id')]); $this->view_reload_url = $this->app->url(null, ['cut_object' => $this->name]); $this->js(true)->_load('timer.jquery'); /*************************************************************************** Timesheet PLAY/STOP ***************************************************************************/ $grid_id = $this->getJSID(); $this->on('click', '.current_task_btn', function ($js, $data) { $this->endAnyTaskIfRunning(); $stop_js = $this->stopAll($js); $run_current_js = []; if ($data['action'] == 'start') { // needs to start now $run_current_js = $this->runTask($data, $js); } $run_current_js[] = $this->js()->closest('.xepan-tasklist-grid')->trigger('reload'); return array_merge($stop_js, $run_current_js); }); }
function init() { parent::init(); $this->view_reload_url = $this->app->url(null, ['cut_object' => $this->name]); }