Browse Source

provide visual indicator when pausing ajax updates

pull/1/head
Mike Macgirvin 11 years ago
parent
commit
177a6d7f79
  1. BIN
      images/pause.gif
  2. BIN
      images/play.gif
  3. 9
      include/main.js
  4. 2
      index.php
  5. 8
      view/theme/default/style.css

BIN
images/pause.gif

After

Width: 16  |  Height: 16  |  Size: 866 B

BIN
images/play.gif

After

Width: 16  |  Height: 16  |  Size: 912 B

9
include/main.js

@ -46,10 +46,17 @@
$(document).keypress(function(event) {
if(event.keyCode == '19') {
event.preventDefault();
if(stopped == false)
if(stopped == false) {
stopped = true;
$('#pause img').attr('src','images/pause.gif');
$('#pause img').css({'border': '1px solid black'});
}
else {
stopped = false;
$('#pause img').attr('src','');
$('#pause img').css({'border': 'none'});
}
}
});

2
index.php

@ -86,7 +86,7 @@ if(x($_SESSION,'sysmsg')) {
// Feel free to comment out this line on production sites.
$a->page['content'] .= $debug_text;
$a->page['content'] .= '<div id="pause"><img src="" alt="" /></div>';
// build page
// Navigation (menu) template

8
view/theme/default/style.css

@ -1579,4 +1579,10 @@ input#dfrn-url {
#dfrn-request-networks {
margin-bottom: 30px;
}
}
#pause {
position: fixed;
bottom: 5px;
right: 5px;
}
Loading…
Cancel
Save