Styled refresh and pause/continue buttons. Fixed link behavior.
This commit is contained in:
parent
98b5208adb
commit
60e76118e3
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
VERSION =1.1
|
||||
VERSION =1.2
|
||||
BUILD_NUMBER_FILE = build-number.txt
|
||||
BUILD_NUMBER = $$(cat $(BUILD_NUMBER_FILE))
|
||||
|
||||
|
@ -250,3 +250,23 @@ body > section {
|
||||
margin: 0;
|
||||
padding: 0 } }
|
||||
}
|
||||
|
||||
#main-buttons {
|
||||
border-top: solid 2px $accent1;
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
border: $accent2 solid thin;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 0.1rem 0.3rem; } } }
|
||||
}
|
||||
|
@ -338,7 +338,7 @@
|
||||
el: $("body"),
|
||||
|
||||
events: {
|
||||
"click a.refresh" : "refresh"
|
||||
"click a.refresh" : "refresh",
|
||||
"click a.pause-continue" : "toggleSync" },
|
||||
|
||||
initialize: function() {
|
||||
@ -373,7 +373,7 @@
|
||||
PD.refreshIntervalId = setInterval(this.refresh, PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
refresh: function(evt) {
|
||||
// If the dialog is still open we skip this sync to give the user
|
||||
// a chance to finish configuration.
|
||||
if ($("#config-dialog").is(":visible")) { return; }
|
||||
@ -496,9 +496,11 @@
|
||||
collection.remove(model); }});
|
||||
}
|
||||
});
|
||||
|
||||
if (evt) evt.preventDefault();
|
||||
},
|
||||
|
||||
toggleSync: function() {
|
||||
toggleSync: function(evt) {
|
||||
if (PD.refreshIntervalId == null) {
|
||||
PD.refreshIntervalId = setInterval(this.refresh,
|
||||
PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
||||
@ -506,7 +508,11 @@
|
||||
else {
|
||||
clearInterval(PD.refreshIntervalId);
|
||||
PD.refreshIntervalId = null;
|
||||
$('.pause-continue').text('Resume Monitoring'); } }
|
||||
$('.pause-continue').text('Resume Monitoring'); }
|
||||
|
||||
|
||||
if (evt) evt.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
PD.main = new PD.Main();
|
||||
|
Loading…
x
Reference in New Issue
Block a user