Esempio n. 1
0
    def __init__(self, ze_id, requester, newtask=False):
        TreeNode.__init__(self, ze_id)
        # the id of this task in the project should be set
        # tid is a string ! (we have to choose a type and stick to it)
        assert(isinstance(ze_id, str) or isinstance(ze_id, unicode))
        self.tid = str(ze_id)
        self.set_uuid(uuid.uuid4())
        self.remote_ids = {}
        self.content = ""
        self.title = _("My new task")
        # available status are: Active - Done - Dismiss - Note
        self.status = self.STA_ACTIVE
        self.closed_date = Date.no_date()
        self.due_date = Date.no_date()
        self.start_date = Date.no_date()
        self.can_be_deleted = newtask
        # tags
        self.tags = []
        self.req = requester
        self.__main_treeview = requester.get_main_view()
        # If we don't have a newtask, we will have to load it.
        self.loaded = newtask
        # Should not be necessary with the new backends
#        if self.loaded:
#            self.req._task_loaded(self.tid)
        self.attributes = {}
        self._modified_update()
Esempio n. 2
0
    def __init__(self, ze_id, requester, newtask=False):
        TreeNode.__init__(self, ze_id)
        # the id of this task in the project should be set
        # tid is a string ! (we have to choose a type and stick to it)
        assert(isinstance(ze_id, str) or isinstance(ze_id, str))
        self.tid = str(ze_id)
        self.set_uuid(uuid.uuid4())
        self.remote_ids = {}
        self.content = ""
        self.title = _("My new task")
        # available status are: Active - Done - Dismiss - Note
        self.status = self.STA_ACTIVE
        self.closed_date = Date.no_date()
        self.due_date = Date.no_date()
        self.start_date = Date.no_date()
        self.can_be_deleted = newtask
        # tags
        self.tags = []
        self.req = requester
        self.__main_treeview = requester.get_main_view()
        # If we don't have a newtask, we will have to load it.
        self.loaded = newtask
        # Should not be necessary with the new backends
#        if self.loaded:
#            self.req._task_loaded(self.tid)
        self.attributes = {}
        self._modified_update()
Esempio n. 3
0
    def __init__(self, name, req, attributes={}):
        """Construct a tag.

        @param name: The name of the tag. Should be a string, generally
            a short one.
        @param attributes: Allow having initial set of attributes without
            calling _save callback
        """
        TreeNode.__init__(self, name)
        self._name = saxutils.unescape(str(name))
        self.req = req
        self._save = None
        self._attributes = {'name': self._name}
        for key, value in attributes.iteritems():
            self.set_attribute(key, value)

        self.viewcount = None
Esempio n. 4
0
    def __init__(self, name, req, attributes={}):
        """Construct a tag.

        @param name: The name of the tag. Should be a string, generally
            a short one.
        @param attributes: Allow having initial set of attributes without
            calling _save callback
        """
        TreeNode.__init__(self, name)
        self._name = saxutils.unescape(str(name))
        self.req = req
        self._save = None
        self._attributes = {'name': self._name}
        for key, value in attributes.iteritems():
            self.set_attribute(key, value)

        self.viewcount = None
Esempio n. 5
0
 def __init__(self, tid, label,viewtree):
     TreeNode.__init__(self, tid)
     self.label = label
     self.tid = tid
     self.vt = viewtree
Esempio n. 6
0
 def __init__(self, tid, label,viewtree):
     TreeNode.__init__(self, tid)
     self.label = label
     self.tid = tid
     self.vt = viewtree
Esempio n. 7
0
 def __init__(self, node_id):
     TreeNode.__init__(self, node_id)
     # A team cannot have parents. This is arbitrarly done for the purpose
     # of this example.
     self.set_parents_enabled(False)
Esempio n. 8
0
 def __init__(self, node_id):
     self.status = "online"
     self.nick = ""
     TreeNode.__init__(self, node_id)
     # A contact cannot have children node. We disable that
     self.set_children_enabled(False)
Esempio n. 9
0
 def __init__(self,node_id):
     TreeNode.__init__(self,node_id)
     #A team cannot have parents. This is arbitrarly done for the purpose
     #of this example.
     self.set_parents_enabled(False)
Esempio n. 10
0
 def __init__(self,node_id):
     self.status = "online"
     self.nick = ""
     TreeNode.__init__(self,node_id)
     #A contact cannot have children node. We disable that
     self.set_children_enabled(False)
Esempio n. 11
0
 def __init__(self,tid):
     TreeNode.__init__(self, tid)
     self.colors = []