changeset 73:447dc8ac181b

Adrien's uniBox design integration + lastPopup style
author Goffi <goffi@goffi.org>
date Sat, 18 Jun 2011 01:21:45 +0200
parents dae64124ff24
children 3df602cf700a
files browser_side/panels.py
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/panels.py	Sat Jun 18 01:21:18 2011 +0200
+++ b/browser_side/panels.py	Sat Jun 18 01:21:45 2011 +0200
@@ -30,7 +30,7 @@
 from pyjamas.ui.HTMLPanel import HTMLPanel
 from pyjamas.ui.Grid import Grid
 from pyjamas.ui.DialogBox import DialogBox
-from pyjamas.ui.AutoComplete import AutoCompleteTextBox
+from pyjamas.ui.TextArea import TextArea
 from pyjamas.ui.MenuBar import MenuBar
 from pyjamas.ui.MenuBarPopupPanel import MenuBarPopupPanel
 from pyjamas.ui.MenuItem import MenuItem
@@ -82,6 +82,7 @@
                self.popup.getOffsetWidth() - 22,
                self.getAbsoluteTop() +
                self.getOffsetHeight() - 1)
+            self.popup.addStyleName('menuLastPopup')
 
 
 class Menu(SimplePanel):
@@ -372,17 +373,20 @@
         self.unibox.setWidth('100%')
         self.add(self.unibox)
 
-class UniBox(AutoCompleteTextBox):
+class UniBox(TextArea): #AutoCompleteTextBox):
     """This text box is used as a main typing point, for message, microblog, etc"""
 
     def __init__(self, host):
-        AutoCompleteTextBox.__init__(self)
+        TextArea.__init__(self)
+        #AutoCompleteTextBox.__init__(self)
         self._popup = None
         self._timer = Timer(notify=self._timeCb)
         self.host = host
+        self.setStyleName('uniBox')
 
     def addKey(self, key):
-        self.getCompletionItems().completions.append(key)
+        return
+        #self.getCompletionItems().completions.append(key)
 
     def removeKey(self, key):
         try:
@@ -480,10 +484,11 @@
             self.setText('')
             self._timeCb(None) #we remove the popup
 
-    def complete(self):
+    """def complete(self):
+        
         #self.visible=False #XXX: self.visible is not unset in pyjamas when ENTER is pressed and a completion is done
         #XXX: fixed directly on pyjamas, if the patch is accepted, no need to walk around this
-        return AutoCompleteTextBox.complete(self)
+        return AutoCompleteTextBox.complete(self)"""
 
 class MicroblogEntry(SimplePanel):