зеркало из https://github.com/mozilla/MozDef.git
rework the ipaddress dropdown menu to have 100% less bootstrap errors by removing bootstrap
This commit is contained in:
Родитель
def4b598ea
Коммит
dc012f6e03
|
@ -10,6 +10,25 @@ Anthony Verez averez@mozilla.com
|
|||
-->
|
||||
|
||||
<template name="alertssummary">
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$("ul.dropdown li").hover(function(){
|
||||
|
||||
$(this).addClass("hover");
|
||||
$('ul:first',this).css('visibility', 'visible');
|
||||
|
||||
}, function(){
|
||||
|
||||
$(this).removeClass("hover");
|
||||
$('ul:first',this).css('visibility', 'hidden');
|
||||
|
||||
});
|
||||
|
||||
$("ul.dropdown li ul li:has(ul)").find("a:first").append(" » ");
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="container">
|
||||
<div id="charts" class="row-fluid span12">
|
||||
<div id="ringChart-category" class="span3 text-center"><h5 class="upperwhite" id="Categories">Categories: <span class="filter"></span></h5></div>
|
||||
|
|
|
@ -93,7 +93,7 @@ if (Meteor.isClient) {
|
|||
});
|
||||
};
|
||||
|
||||
addIPDropDowns=function(){
|
||||
addBootstrapIPDropDowns=function(){
|
||||
//fix up anything with an ipaddress class
|
||||
//by making them into a pull down bootstrap menu
|
||||
$( '.ipaddress').each(function( index ) {
|
||||
|
@ -117,6 +117,28 @@ if (Meteor.isClient) {
|
|||
$(this).wrap( "<a class='dropdown-toggle' data-toggle='dropdown' href='#' id='dLabel" + index +"'></a>" );
|
||||
});
|
||||
};
|
||||
|
||||
addIPDropDowns=function(){
|
||||
//fix up anything with an ipaddress class
|
||||
//by making them into a pull down menu driven by jquery
|
||||
$( '.ipaddress').each(function( index ) {
|
||||
iptext=$(this).text();
|
||||
//add a caret so it looks drop downy
|
||||
$(this).append('<b class="caret"></b>');
|
||||
|
||||
//wrap the whole thing in a ul dropdown class
|
||||
$(this).wrap( "<ul class='dropdown'><li><a href='#'></a><li></ul>" );
|
||||
|
||||
//add the drop down menu
|
||||
ipmenu=$("<ul class='sub_menu'>");
|
||||
whoisitem=$("<li><a class='ipmenu-whois' data-ipaddress='" + iptext + "'href='#'>whois</a></li>");
|
||||
blockIPitem=$("<li><a class='ipmenu-blockip' data-ipaddress='" + iptext + "'href='#'>block</a></li>");
|
||||
|
||||
ipmenu.append(whoisitem,blockIPitem);
|
||||
|
||||
$(this).parent().parent().append(ipmenu);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
refreshAlertsData=function(){
|
||||
|
|
|
@ -12,6 +12,7 @@ Anthony Verez averez@mozilla.com
|
|||
<head>
|
||||
<meta name="viewport" content="width=1024">
|
||||
<link href="/css/mozdef.css" rel="stylesheet" media="screen,projection,tv">
|
||||
<link href="/css/dropdowns.css" rel="stylesheet" media="screen,projection,tv">
|
||||
<!--persona login-->
|
||||
<script>
|
||||
(function() {
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* adapted from http://css-tricks.com/simple-jquery-dropdowns/
|
||||
LEVEL ONE
|
||||
*/
|
||||
|
||||
ul.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: max-content;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 3px;
|
||||
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
|
||||
margin:0em 0em -.5em 0em;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.dropdown li {
|
||||
font-weight: bold; float: left; zoom: 1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
ul.dropdown a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
ul.dropdown li a {
|
||||
display: block; padding: 1px 2px; border-right: 1px solid #333;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
ul.dropdown li:last-child a {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
ul.dropdown li.hover,
|
||||
ul.dropdown li:hover {
|
||||
background: #08C;
|
||||
color: black;
|
||||
position: relative; }
|
||||
ul.dropdown li.hover a { color: black; }
|
||||
|
||||
/*
|
||||
LEVEL TWO
|
||||
*/
|
||||
ul.dropdown ul {
|
||||
min-width: 5em;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
margin: 0px 0px 0px 0px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.dropdown ul li {
|
||||
font-weight: normal;
|
||||
background: #f6f6f6;
|
||||
color: #000;
|
||||
border-bottom: 1px solid #ccc;
|
||||
float: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* IE 6 & 7 Needs Inline Block */
|
||||
ul.dropdown ul li a {
|
||||
border-right: none;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/*
|
||||
LEVEL THREE
|
||||
*/
|
||||
ul.dropdown ul ul {
|
||||
left: 100%; top: 0;
|
||||
}
|
||||
ul.dropdown li:hover > ul {
|
||||
visibility: visible;
|
||||
}
|
|
@ -49,10 +49,9 @@ body{
|
|||
}
|
||||
|
||||
.ipaddress {
|
||||
font-family: monospace ;
|
||||
font-size: 120%;
|
||||
color: #FFF;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#header a.mozilla {
|
||||
|
|
Загрузка…
Ссылка в новой задаче