aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/views/offline.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-07 18:14:18 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-07 18:14:18 +0100
commitdbfb9e497b3720169856a24332ecc35144499dfc (patch)
tree77b6ee3f89b9821009856c68fe28693a250add6c /src/js/views/offline.js
parenta2e08984fd8e7e2631e8041b0233a80e2df75f30 (diff)
Fix glitchy drafts to offline transition
Make sure offline page is scrolled to top before it's displayed and also hide drafts page to make avoid popup effects Fixes #85
Diffstat (limited to 'src/js/views/offline.js')
-rw-r--r--src/js/views/offline.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/js/views/offline.js b/src/js/views/offline.js
index fcf8ee1..f4453a1 100644
--- a/src/js/views/offline.js
+++ b/src/js/views/offline.js
@@ -33,7 +33,13 @@
return hasContent;
},
+ afterDisplay: function() {
+ $('body')[0].scrollTop = 0;
+ $('div[data-role="content"]').show();
+ },
+
toggleNextButton: function() {
+ $('div[data-role="content"]').hide();
if ( this.draftHasContent() ) {
$('#offline-next-btn .ui-btn-text').text('Save');
} else {