Commits

Anonymous committed 5368ef1

Tweak appearance of AutoComplete

Comments (0)

Files changed (3)

examples/autocomplete.py

         return {'result': ['a','b','c']}
 
 class Index(twf.FormPage):
-    title = "YUI AutoComplete"
-    attrs = {"class": "yui-skin-sam"}
+    title = 'YUI AutoComplete'
+    css_class = 'yui-skin-sam'
     class child(twf.TableForm):
         paj = twy.AutoComplete(datasrc=MyDataSource())
         fred = twy.LogReader()

examples/example.py

 
 class Index(twf.FormPage):
     title = 'YUI Example'
-    attrs = {'class': 'yui-skin-sam'}
+    css_class = 'yui-skin-sam'
     class child(twf.TableLayout):
 #        auto_complete = twy.AutoComplete()
         color_picker = twy.ColorPicker()

tw2/yui/widgets.py

 
 class AutoComplete(twf.TextField, YuiWidget):
     resources = YuiWidget.resources + [
+        twc.CSSLink(modname=__name__, filename="static/yui.css"),
         twc.CSSLink(modname=__name__, filename="static/2.7.0/autocomplete/assets/skins/sam/autocomplete.css"),
         twc.JSLink(modname=__name__, filename="static/2.7.0/connection/connection-min.js"),
         twc.JSLink(modname=__name__, filename="static/2.7.0/json/json-min.js"),