Bladeren bron

better looking dropdown

Nicolas Petton 10 jaren geleden
bovenliggende
commit
97b2244a83
4 gewijzigde bestanden met toevoegingen van 14 en 5 verwijderingen
  1. 5 1
      css/helios.css
  2. 6 1
      css/helios.less
  3. 2 2
      src/Helios-Core.js
  4. 1 1
      src/Helios-Core.st

+ 5 - 1
css/helios.css

@@ -168,9 +168,13 @@ body[id="helios"] .navbar .nav > li {
   line-height: 16px;
   text-align: center;
 }
-body[id="helios"] .navbar .nav > li.dropdown {
+body[id="helios"] .navbar .nav > li.new_tab {
   width: 85px;
 }
+body[id="helios"] .dropdown-menu {
+  min-width: 0;
+  text-align: left;
+}
 body[id="helios"] .navbar .nav > li > a {
   line-height: 22px;
   padding: 0px 8px;

+ 6 - 1
css/helios.less

@@ -199,11 +199,16 @@ body[id="helios"] {
 		line-height: 16px;
 		text-align: center;
 		
-		&.dropdown {
+		&.new_tab {
 			width: 85px;
 		}
 	}
 
+	.dropdown-menu {
+		min-width: 0;
+		text-align: left;
+	}
+
 	.navbar .nav > li > a {
 		line-height: 22px;
 		padding: 0px 8px;

+ 2 - 2
src/Helios-Core.js

@@ -4183,7 +4183,7 @@ $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._a();
 $ctx2.sendIdx["a"]=1;
-_st($3)._class_("dropdown-toggle");
+_st($3)._class_("new_tab dropdown-toggle");
 $ctx2.sendIdx["class:"]=2;
 _st($3)._at_put_("data-toggle","dropdown");
 $4=_st($3)._with_((function(){
@@ -4228,7 +4228,7 @@ return $6;
 $ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},globals.HLManager)})},
 args: ["html"],
-source: "renderAddOn: html\x0a    html li \x0a    \x09class: 'dropdown';\x0a        with: [ \x0a\x09\x09\x09html a \x0a        \x09\x09class: 'dropdown-toggle';\x0a           \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a            \x09with: [ \x0a            \x09\x09html with: 'Open...'.\x0a  \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a           html ul \x0a           \x09\x09class: 'dropdown-menu';\x0a                with: [\x0a                  \x09((HLWidget withAllSubclasses\x0a                    \x09select: [ :each | each canBeOpenAsTab ])\x0a                        sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a                        do: [ :each |\x0a  \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a                      \x09\x09\x09html a \x0a                                \x09with: each tabLabel;\x0a      \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
+source: "renderAddOn: html\x0a    html li \x0a    \x09class: 'dropdown';\x0a        with: [ \x0a\x09\x09\x09html a \x0a        \x09\x09class: 'new_tab dropdown-toggle';\x0a           \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a            \x09with: [ \x0a            \x09\x09html with: 'Open...'.\x0a  \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a           html ul \x0a           \x09\x09class: 'dropdown-menu';\x0a                with: [\x0a                  \x09((HLWidget withAllSubclasses\x0a                    \x09select: [ :each | each canBeOpenAsTab ])\x0a                        sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a                        do: [ :each |\x0a  \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a                      \x09\x09\x09html a \x0a                                \x09with: each tabLabel;\x0a      \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
 messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "tabLabel", "onClick:", "openAsTab"],
 referencedClasses: ["HLWidget"]
 }),

+ 1 - 1
src/Helios-Core.st

@@ -1444,7 +1444,7 @@ renderAddOn: html
     	class: 'dropdown';
         with: [ 
 			html a 
-        		class: 'dropdown-toggle';
+        		class: 'new_tab dropdown-toggle';
            	 	at: 'data-toggle' put: 'dropdown';
             	with: [ 
             		html with: 'Open...'.