Esempio n. 1
0
 /**
  * получаем список точек для combobox
  */
 public function action_list_pos_group()
 {
     $res = Model_Dot::getGroups(['search' => $this->_search, 'ids' => $this->_ids]);
     if (empty($res)) {
         $this->jsonResult(false);
     }
     $return = [];
     foreach ($res as $item) {
         $return[] = ['name' => $item['GROUP_NAME'], 'value' => $item['GROUP_ID']];
     }
     $this->jsonResult(true, $return);
 }
Esempio n. 2
0
 /**
  * добавляем точки к конкретной группе
  */
 public function action_add_dots_to_group()
 {
     $posIds = $this->request->post('pos_ids');
     $groupId = $this->request->post('group_id');
     $result = Model_Dot::addDotsToGroup($groupId, $posIds);
     if (!empty($result)) {
         $this->jsonResult(false);
     }
     $this->jsonResult(true);
 }