Second style fixing in chrome events extension

This commit is contained in:
fermin831 2017-11-30 18:15:59 +01:00
parent 2b62700fb6
commit 14db564be7
8 changed files with 64 additions and 39 deletions

View File

@ -12,7 +12,7 @@ body {
h1 {
font-weight: bold;
font-size: 14px;
margin: 12px 0px 2px 0px;
margin: 2px 0px 2px 0px;
}
h2 {
color : black;
@ -42,7 +42,8 @@ span.res {
img.pm {
margin-right: 3px;
cursor: pointer;
margin-top: 0px;
margin-top: 2px;
float: right;
}
div.main {
background-color: white;
@ -64,16 +65,8 @@ div.b {
div.b p a {
font-size: 10pt;
}
div.b p {
margin: 0 0 0 12px;
padding-top: 2px;
display: none;
color: #333;
font-size: 8pt;
}
div.b div.items p {
margin: 2px 0px 8px 0px;
color: #333;
width: 355px;
float: left;
display: block;
@ -141,6 +134,7 @@ div.options_footer {
background: #f6f6f6;
padding: 10px;
margin: 10px;
margin-top: 35px;
}
.error_text {
@ -149,25 +143,56 @@ div.options_footer {
.result {
margin: 10px;
height: 520;
height: 500;
overflow-y: auto;
}
#events_title {
border: 1px solid #e5e5e5;
text-align: center;
padding: 5px 0;
margin: 0;
padding-bottom: 10px;
border-bottom: 1px solid #e5e5e5;
}
.event {
border: solid 1px #e5e5e5;
border-top: 0;
padding: 3px 0;
padding: 5px 6px;
color: white;
}
.sev-Warning { background: #FCED7E;}
.sev-Critical { background: #FA7A7A;}
.sev-Informational { background: #7FB9FA;}
.sev-Normal { background: #A8D96C;}
.sev-Maintenance { background: #BABDB6;}
.event a {
margin-left: 5px;
color: white;
font-size: 9pt;
}
.sev-Warning a {
margin-left: 5px;
color: #333;
}
.event p {
margin: 0 0 0 6px;
padding-top: 2px;
display: none;
font-size: 8pt;
}
.sev-Warning {
background: #FDDD30;
color: #333;
}
.sev-Critical {
background: #F84348;
}
.sev-Informational {
background: #4CA8E0;
}
.sev-Normal {
background: #84B839;
}
.sev-Maintenance {
background: #A8A8A8;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

View File

@ -10,7 +10,6 @@ $(document).ready(function(){
// Display the information
if (bg.fetchEvents().length == 0) {
showError("Error in fetching data!! Check your internet connection");
$('#events_title').hide();
} else {
showEvents();
}
@ -80,16 +79,15 @@ function showEvents(){
var i=0;
if(allEvents.length>0){
$('#events_title').show();
while(i<max_events && i<allEvents.length){
var eve_title=document.createElement('div');
eve_title.id = 'e_' + i + '_' + allEvents[i]['id'];
var img = document.createElement('img');
img.src = 'images/plus.gif';
img.width = '9';
img.height='9';
img.src = 'images/plus.png';
img.className ='pm';
img.id='i_' + i + '_' + allEvents[i]['id'];
eve_title.appendChild(img);
var div_empty = document.createElement('img');
var a = document.createElement('a');
var temp_style;
@ -100,7 +98,8 @@ function showEvents(){
+ "/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente="
+ allEvents[i]['agent_name'];
a.setAttribute("href",agent_url);
a.target="_blank";
a.target = "_blank";
a.className = 'a_2_mo';
a.innerText = allEvents[i]['title'];
@ -116,7 +115,6 @@ function showEvents(){
var time=allEvents[i]['date'].split(" ");
var time_text = time[0]+" "+time[1];
var p = document.createElement('p');
var id = (allEvents[i]['module']==0)
? "."
@ -155,17 +153,16 @@ function showHide() {
// Toggle information
if($('#' + pid).css('display') == 'none') {
$('#' + pid).slideDown();
$(this).attr({src: 'images/minus.gif'});
$(this).attr({src: 'images/minus.png'});
}
else {
$('#' + pid).slideUp();
$(this).attr({src: 'images/plus.gif'});
$(this).attr({src: 'images/plus.png'});
}
}
function mrefresh(){
localStorage["new_events"]=0;
if (bg.fetchEvents().length == 0) $('#events_title').hide();
bg.updateBadge();
clearError();
bg.resetInterval();

View File

@ -17,17 +17,20 @@
</a>
</div>
<div class="error">
<img src="images/error.png" title="error">
<div class="error_text">
<h1>ERROR</h1>
<a href="options.html" target="_blank" ></a>
<div style="margin-top: 35px">
<div class="error">
<div>
<img src="images/error.png" title="error">
</div>
<div class="error_text">
<h1>ERROR</h1>
<a href="options.html" target="_blank" ></a>
</div>
</div>
</div>
<div class="result" id="result">
<h1 id="events_title">Events</h1>
<div class="b" id="events">
<div class="e" id="e" />
<div class="result" id="result">
<div class="b" id="events">
<div class="e" id="e" />
</div>
</div>
</div>
</body>