예제 #1
0
    def show(self, ev):
        for item in self.parent.children:
            if item.state == "show":
                if item == self:
                    return
                document.remove(item.div)
                item.state = "hide"
        if self.state == "hide":
            left = ev.target.left
            top = ev.target.top + ev.target.height

            self.div = html.DIV(Class="ui-widget ui-menu-sublist",
                                style=dict(position='absolute',
                                           left=left,
                                           top=top,
                                           zIndex=99))
            for item in self.items:
                line = html.DIV(item[0], Class="ui-menu-subitem")
                if item[1] is not None:
                    line.bind('click', item[1])
                self.div <= line
            self.state = "show"
            self.div.style.borderWidth = "1px"
            document <= self.div
        else:
            document.remove(self.div)
            self.state = "hide"
예제 #2
0
    def show(self, ev):
        for item in self.parent.children:
            if item.state == "show":
                if item == self:
                    return
                document.remove(item.div)
                item.state = "hide"
        if self.state == "hide":
            left = ev.target.left
            top = ev.target.top+ev.target.height

            self.div = html.DIV(Class="ui-widget ui-menu-sublist",
                style=dict(position='absolute', left=left, top=top, zIndex=99))
            for item in self.items:
                line = html.DIV(item[0], Class="ui-menu-subitem")
                if item[1] is not None:
                    line.bind('click', item[1])
                self.div <= line
            self.state = "show"
            self.div.style.borderWidth = "1px"
            document <= self.div
        else:
            document.remove(self.div)
            self.state = "hide"
예제 #3
0
 def yes(self, ev):
     document.remove(self._div_shell)
     self.action_if_yes(self)
예제 #4
0
 def cancel(self, ev):
     document.remove(self._div_shell)
예제 #5
0
 def ok(self, ev):
     ix = self._div_shell.get(selector='SELECT')[0].selectedIndex
     document.remove(self._div_shell)
     self.action(self.options[ix])
예제 #6
0
 def cancel(self, ev):
     document.remove(self._div_shell)
예제 #7
0
 def ok(self, ev):
     self.result = self._div_shell.get(selector='INPUT')[0].value
     self.action(self.result)
     document.remove(self._div_shell)
예제 #8
0
 def no(self, ev):
     document.remove(self._div_shell)
     if self.action_if_no is not None:
         self.action_if_no(self)
예제 #9
0
 def close(self):
     self.item.style.borderColor = '#FFF'
     document.remove(self.menu)
예제 #10
0
 def ok(self, ev):
     ix = self._div_shell.get(selector='SELECT')[0].selectedIndex
     document.remove(self._div_shell)
     self.action(self.options[ix])
예제 #11
0
 def leave(self, ev):
     for child in self.children:
         if child.state == 'show':
             document.remove(child.div)
             child.state = 'hide'
     self.active = False
예제 #12
0
 def leave(self, ev):
     for child in self.children:
         if child.state == 'show':
             document.remove(child.div)
             child.state = 'hide'
     self.active = False
예제 #13
0
 def close(self):
     self.item.style.borderColor = '#FFF'
     document.remove(self.menu)
예제 #14
0
파일: dialog.py 프로젝트: Ds110/mee-python
 def dialog_close(e):
     #del document[self._div_shell.id]
     document.remove(self)
예제 #15
0
 def no(self, ev):
     document.remove(self._div_shell)
     if self.action_if_no is not None:
         self.action_if_no(self)
예제 #16
0
 def yes(self, ev):
     document.remove(self._div_shell)
     self.action_if_yes(self)
예제 #17
0
 def ok(self, ev):
     self.result = self._div_shell.get(selector='INPUT')[0].value
     self.action(self.result)
     document.remove(self._div_shell)
예제 #18
0
 def dialog_close(e):
     #del document[self._div_shell.id]
     document.remove(self)