mirror of https://github.com/twbs/bootstrap.git
				
				
				
			simplify drop down logic - fix color of search hover for ie
This commit is contained in:
		
							parent
							
								
									72899a4ee8
								
							
						
					
					
						commit
						1fc4491cd6
					
				| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
 * http://www.apache.org/licenses/LICENSE-2.0
 | 
					 * http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Designed and built with all the love in the world @twitter by @mdo and @fat.
 | 
					 * Designed and built with all the love in the world @twitter by @mdo and @fat.
 | 
				
			||||||
 * Date: Sat Aug 20 18:40:26 PDT 2011
 | 
					 * Date: Sun Aug 21 11:20:03 PDT 2011
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
/* Reset.less
 | 
					/* Reset.less
 | 
				
			||||||
 * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here	that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
 | 
					 * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here	that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
 | 
				
			||||||
| 
						 | 
					@ -1145,7 +1145,7 @@ div.topbar form {
 | 
				
			||||||
  opacity: 1;
 | 
					  opacity: 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
div.topbar form input {
 | 
					div.topbar form input {
 | 
				
			||||||
  background-color: #bfbfbf;
 | 
					  background-color: #444;
 | 
				
			||||||
  background-color: rgba(255, 255, 255, 0.3);
 | 
					  background-color: rgba(255, 255, 255, 0.3);
 | 
				
			||||||
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
 | 
					  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
 | 
				
			||||||
  font-size: normal;
 | 
					  font-size: normal;
 | 
				
			||||||
| 
						 | 
					@ -1173,7 +1173,7 @@ div.topbar form input::-webkit-input-placeholder {
 | 
				
			||||||
  color: #e6e6e6;
 | 
					  color: #e6e6e6;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
div.topbar form input:hover {
 | 
					div.topbar form input:hover {
 | 
				
			||||||
  background-color: #444;
 | 
					  background-color: #bfbfbf;
 | 
				
			||||||
  background-color: rgba(255, 255, 255, 0.5);
 | 
					  background-color: rgba(255, 255, 255, 0.5);
 | 
				
			||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -156,9 +156,9 @@ table.zebra-striped th.headerSortUp.purple,table.zebra-striped th.headerSortDown
 | 
				
			||||||
div.topbar{background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(#333333, #222222);background-image:-ms-linear-gradient(#333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(#333333, #222222);background-image:-o-linear-gradient(#333333, #222222);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);background-image:linear-gradient(#333333, #222222);height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}div.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
 | 
					div.topbar{background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(#333333, #222222);background-image:-ms-linear-gradient(#333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(#333333, #222222);background-image:-o-linear-gradient(#333333, #222222);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);background-image:linear-gradient(#333333, #222222);height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}div.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
 | 
				
			||||||
div.topbar a:hover,div.topbar ul li.active a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
 | 
					div.topbar a:hover,div.topbar ul li.active a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
 | 
				
			||||||
div.topbar h3 a{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
 | 
					div.topbar h3 a{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
 | 
				
			||||||
div.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}div.topbar form input{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;width:220px;padding:4px 9px;color:#fff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;transition:none;}div.topbar form input:-moz-placeholder{color:#e6e6e6;}
 | 
					div.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}div.topbar form input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;width:220px;padding:4px 9px;color:#fff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;transition:none;}div.topbar form input:-moz-placeholder{color:#e6e6e6;}
 | 
				
			||||||
div.topbar form input::-webkit-input-placeholder{color:#e6e6e6;}
 | 
					div.topbar form input::-webkit-input-placeholder{color:#e6e6e6;}
 | 
				
			||||||
div.topbar form input:hover{background-color:#444;background-color:rgba(255, 255, 255, 0.5);color:#fff;}
 | 
					div.topbar form input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#fff;}
 | 
				
			||||||
div.topbar form input:focus,div.topbar form input.focused{outline:none;background-color:#fff;color:#404040;text-shadow:0 1px 0 #fff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
 | 
					div.topbar form input:focus,div.topbar form input.focused{outline:none;background-color:#fff;color:#404040;text-shadow:0 1px 0 #fff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
 | 
				
			||||||
div.topbar ul{display:block;float:left;margin:0 10px 0 0;position:relative;}div.topbar ul.secondary-nav{float:right;margin-left:10px;margin-right:0;}
 | 
					div.topbar ul{display:block;float:left;margin:0 10px 0 0;position:relative;}div.topbar ul.secondary-nav{float:right;margin-left:10px;margin-right:0;}
 | 
				
			||||||
div.topbar ul li{display:block;float:left;font-size:13px;}div.topbar ul li a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}div.topbar ul li a:hover{color:#fff;text-decoration:none;}
 | 
					div.topbar ul li{display:block;float:left;font-size:13px;}div.topbar ul li a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}div.topbar ul li a:hover{color:#fff;text-decoration:none;}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,24 +43,11 @@ $(document).ready(function(){
 | 
				
			||||||
  // ===============================
 | 
					  // ===============================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $("body").bind("click", function (e) {
 | 
					  $("body").bind("click", function (e) {
 | 
				
			||||||
    $("ul.menu-dropdown").hide();
 | 
					    $('a.menu').parent("li").removeClass("open");
 | 
				
			||||||
    $('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide();
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $("a.menu").click(function (e) {
 | 
					  $("a.menu").click(function (e) {
 | 
				
			||||||
    var $target = $(this);
 | 
					    var $li = $(this).parent("li").toggleClass('open');
 | 
				
			||||||
    var $parent = $target.parent("li");
 | 
					 | 
				
			||||||
    var $siblings = $target.siblings("ul.menu-dropdown");
 | 
					 | 
				
			||||||
    var $parentSiblings = $parent.siblings("li");
 | 
					 | 
				
			||||||
    if ($parent.hasClass("open")) {
 | 
					 | 
				
			||||||
      $parent.removeClass("open");
 | 
					 | 
				
			||||||
      $siblings.hide();
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
      $parent.addClass("open");
 | 
					 | 
				
			||||||
      $siblings.show();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    $parentSiblings.children("ul.menu-dropdown").hide();
 | 
					 | 
				
			||||||
    $parentSiblings.removeClass("open");
 | 
					 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -53,7 +53,7 @@ div.topbar {
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
    .opacity(100);
 | 
					    .opacity(100);
 | 
				
			||||||
    input {
 | 
					    input {
 | 
				
			||||||
      background-color: @grayLight;
 | 
					      background-color: #444;
 | 
				
			||||||
      background-color: rgba(255,255,255,.3);
 | 
					      background-color: rgba(255,255,255,.3);
 | 
				
			||||||
      #font > .sans-serif(13px, normal, 1);
 | 
					      #font > .sans-serif(13px, normal, 1);
 | 
				
			||||||
      width: 220px;
 | 
					      width: 220px;
 | 
				
			||||||
| 
						 | 
					@ -74,7 +74,7 @@ div.topbar {
 | 
				
			||||||
        color: @grayLighter;
 | 
					        color: @grayLighter;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      &:hover {
 | 
					      &:hover {
 | 
				
			||||||
        background-color: #444;
 | 
					        background-color: @grayLight;
 | 
				
			||||||
        background-color: rgba(255,255,255,.5);
 | 
					        background-color: rgba(255,255,255,.5);
 | 
				
			||||||
        color: #fff;
 | 
					        color: #fff;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue