diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/css/fms.css | 1 | ||||
-rw-r--r-- | www/js/views/details.js | 4 | ||||
-rw-r--r-- | www/js/views/fms.js | 13 | ||||
-rw-r--r-- | www/templates/en/home.html | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/www/css/fms.css b/www/css/fms.css index 499b4fe..f81dfdc 100644 --- a/www/css/fms.css +++ b/www/css/fms.css @@ -172,6 +172,7 @@ #details-page div[data-role='content'] { padding: 0px; + margin-bottom: 0px; } div[data-role='content'] h2 { diff --git a/www/js/views/details.js b/www/js/views/details.js index 996ece9..5eb6b85 100644 --- a/www/js/views/details.js +++ b/www/js/views/details.js @@ -5,6 +5,7 @@ id: 'details-page', prev: 'photo', next: 'submit-start', + bottomMargin: -20, events: { 'pagehide': 'destroy', @@ -28,11 +29,12 @@ }, beforeDisplay: function() { + this.fixPageHeight(); var header = this.$("div[data-role='header']:visible"), detail = this.$('#form_detail'), top = detail.position().top, viewHeight = $(window).height(), - contentHeight = viewHeight - header.outerHeight(); + contentHeight = viewHeight - header.outerHeight() + 15; detail.height( contentHeight - top ); }, diff --git a/www/js/views/fms.js b/www/js/views/fms.js index 640d5e6..918a57c 100644 --- a/www/js/views/fms.js +++ b/www/js/views/fms.js @@ -2,6 +2,7 @@ _.extend( FMS, { FMSView: Backbone.View.extend({ tag: 'div', + bottomMargin: 20, events: { 'pagehide': 'destroy', @@ -34,11 +35,13 @@ }, fixPageHeight: function() { - var screen = $(window).height(), - header = $('[data-role=header]').height(), - footer = $('[data-role=footer]').height(), - content = screen - header - footer - 5; - $('[data-role=content]').css({'height': content }); + var header = this.$("div[data-role='header']:visible"), + content = this.$('[data-role="content"]'), + top = content.position().top, + viewHeight = $(window).height(), + contentHeight = viewHeight - header.outerHeight() - this.bottomMargin; + + content.height( contentHeight - top ); }, afterRender: function() {}, diff --git a/www/templates/en/home.html b/www/templates/en/home.html index 312501c..2a19d6d 100644 --- a/www/templates/en/home.html +++ b/www/templates/en/home.html @@ -5,7 +5,7 @@ <h1>Find problem</h1> <a id="login-options" class="ui-btn-right">Account</a> </div> -<div class="table-cell"> +<div data-role="content" class="table-cell"> <div class="container"> <div class="content" role="main"> <div class="tablewrapper"> |