aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-06-27 13:51:34 +0100
committerStruan Donald <struan@exo.org.uk>2013-06-28 09:44:02 +0100
commit104fcd95e347e55336b62d02f299cd1c332cb642 (patch)
tree7c6fb0d5553d962bf9af508a3c3d7aecac355d8b /www/js
parentd3136e3c96535c06c4dbc79f55c0e29cde27bebc (diff)
allow views to set the selector for the content element used in height
fixing, and set this for the drafts page
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/fms.js3
-rw-r--r--www/js/views/reports.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/www/js/views/fms.js b/www/js/views/fms.js
index 918a57c..ea21783 100644
--- a/www/js/views/fms.js
+++ b/www/js/views/fms.js
@@ -3,6 +3,7 @@
FMSView: Backbone.View.extend({
tag: 'div',
bottomMargin: 20,
+ contentSelector: '[data-role="content"]',
events: {
'pagehide': 'destroy',
@@ -36,7 +37,7 @@
fixPageHeight: function() {
var header = this.$("div[data-role='header']:visible"),
- content = this.$('[data-role="content"]'),
+ content = this.$(this.contentSelector),
top = content.position().top,
viewHeight = $(window).height(),
contentHeight = viewHeight - header.outerHeight() - this.bottomMargin;
diff --git a/www/js/views/reports.js b/www/js/views/reports.js
index f5c1cbb..de2b3c3 100644
--- a/www/js/views/reports.js
+++ b/www/js/views/reports.js
@@ -4,6 +4,7 @@
template: 'reports',
id: 'reports',
next: 'home',
+ contentSelector: '#drafts',
events: {
'pagehide': 'destroy',