def _on_items_list_activated(self, evt): task_uuid, task_type = self._task_list_ctrl.items[evt.GetData()] if task_type in (enums.TYPE_PROJECT, enums.TYPE_CHECKLIST): # nie powinno być return if task_uuid: TaskController.open_task(self.wnd, task_uuid)
def _on_items_list_activated(self, evt): task_uuid, task_type = self._items_list_ctrl.items[evt.GetData()] if task_type in (enums.TYPE_PROJECT, enums.TYPE_CHECKLIST): task = OBJ.Task.get(self._session, uuid=task_uuid) self._items_path.append(task) self._refresh_list() return if task_uuid: TaskController.open_task(self.wnd, task_uuid)
def _new_task(self): parent_uuid = None task_type = None if self._items_path: parent_uuid = self._items_path[-1].uuid if self._items_path[-1].type == enums.TYPE_CHECKLIST: task_type = enums.TYPE_CHECKLIST_ITEM if not task_type: group_id = self['rb_show_selection'].GetSelection() task_type = enums.TYPE_TASK if group_id == 5 and not self._items_path: task_type = enums.TYPE_PROJECT elif group_id == 6 and not self._items_path: task_type = enums.TYPE_CHECKLIST TaskController.new_task(self.wnd, task_type or enums.TYPE_TASK, parent_uuid)
def _on_items_list_activated(self, evt): task_uuid, _task_type = self._items_list_ctrl.items[evt.GetData()] if task_uuid: TaskController.open_task(self.wnd, task_uuid)
def _edit_selected_task(self): task_uuid = self._items_list_ctrl.get_item_uuid(None) if task_uuid: TaskController.open_task(self.wnd, task_uuid)
def _on_btn_edit_parent(self, _evt): if self._items_path: task_uuid = self._items_path[-1].uuid if task_uuid: TaskController.open_task(self.wnd, task_uuid)
def _on_menu_new_task(self, _evt): TaskController.new_task(self._frame, None)