allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [10/21] git commit: [#4299] ticket:281 Styles for combobox
Date Fri, 22 Mar 2013 22:54:37 GMT
[#4299] ticket:281 Styles for combobox


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/967e105e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/967e105e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/967e105e

Branch: refs/heads/master
Commit: 967e105e3326bc37b9bd24b3f578548ab5e543a4
Parents: 590ce54
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Mar 4 15:49:14 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Fri Mar 22 21:55:16 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/widgets/form_fields.py           |    2 +
 .../allura/lib/widgets/resources/css/combobox.css  |   17 +++++++++++++++
 Allura/allura/lib/widgets/resources/js/combobox.js |   15 +++---------
 3 files changed, 23 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/967e105e/Allura/allura/lib/widgets/form_fields.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/form_fields.py b/Allura/allura/lib/widgets/form_fields.py
index 25c2e32..67ea947 100644
--- a/Allura/allura/lib/widgets/form_fields.py
+++ b/Allura/allura/lib/widgets/form_fields.py
@@ -109,6 +109,8 @@ class ProjectUserCombo(ew.SingleSelectField):
     def resources(self):
         for r in super(ProjectUserCombo, self).resources():
             yield r
+        yield ew.CSSLink('css/autocomplete.css')
+        yield ew.CSSLink('css/combobox.css')
         yield ew.JSLink('js/combobox.js')
         yield onready('''
           $('select.project-user-combobox').combobox({

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/967e105e/Allura/allura/lib/widgets/resources/css/combobox.css
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/css/combobox.css b/Allura/allura/lib/widgets/resources/css/combobox.css
new file mode 100644
index 0000000..9e3471d
--- /dev/null
+++ b/Allura/allura/lib/widgets/resources/css/combobox.css
@@ -0,0 +1,17 @@
+.ui-combobox {
+  position: relative;
+  display: inline-block;
+}
+
+.ui-combobox-toggle {
+  color: black;
+  background-color: transparent;
+  cursor: default;
+  display: inline-block;
+  font-size: .7em;
+  padding: 5px;
+  position: absolute;
+  top: 0;
+  margin-top: 2px;
+  margin-left: -21px;
+}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/967e105e/Allura/allura/lib/widgets/resources/js/combobox.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/combobox.js b/Allura/allura/lib/widgets/resources/js/combobox.js
index 1a59e35..462c2c3 100644
--- a/Allura/allura/lib/widgets/resources/js/combobox.js
+++ b/Allura/allura/lib/widgets/resources/js/combobox.js
@@ -61,7 +61,7 @@
               .appendTo(wrapper)
               .val(value)
               .attr('title', '')
-              .addClass('ui-state-default ui-combobox-input')
+              .addClass('ui-combobox-input')
               .autocomplete({
                 delay: 0,
                 minLength: 0,
@@ -100,7 +100,7 @@
                     removeIfInvalid(this);
                   }
                 }
-              }).addClass('ui-widget ui-widget-content ui-corner-left');
+              });
 
       input.data('autocomplete')._renderItem = function(ul, item) {
         return $('<li>')
@@ -109,18 +109,11 @@
           .appendTo(ul);
       };
 
-      $('<a>')
+      $('<span>▼</span>')
         .attr('tabIndex', -1)
         .attr('title', 'Show all options')
         .appendTo(wrapper)
-        .button({
-          icons: {
-            primary: 'ui-icon-triangle-1-s'
-          },
-          text: false
-        })
-        .removeClass('ui-corner-all')
-        .addClass('ui-corner-right ui-combobox-toggle')
+        .addClass('ui-combobox-toggle')
         .mousedown(function() {
           wasOpen = input.autocomplete('widget').is(':visible');
         })


Mime
View raw message