aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/fms.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/views/fms.js')
-rw-r--r--www/js/views/fms.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/www/js/views/fms.js b/www/js/views/fms.js
index 711968f..ae1174f 100644
--- a/www/js/views/fms.js
+++ b/www/js/views/fms.js
@@ -45,12 +45,13 @@
return this;
},
- fixPageHeight: function() {
+ fixPageHeight: function(extra) {
+ extra = extra || 0;
var header = this.$("div[data-role='header']:visible"),
content = this.$(this.contentSelector),
top = content.position().top,
viewHeight = $(window).height(),
- contentHeight = FMS.windowHeight - header.outerHeight() - this.bottomMargin;
+ contentHeight = FMS.windowHeight - header.outerHeight() - this.bottomMargin - extra;
if ($("body").hasClass("iphone-x")) {
var body = $("body").get(0);
@@ -115,6 +116,19 @@
$('.form-error').removeClass('form-error');
},
+ disableScrolling: function() {
+ if ( typeof cordova !== 'undefined' ) {
+ cordova.plugins.Keyboard.disableScroll(true);
+ $('body').scrollTop(0);
+ }
+ },
+
+ enableScrolling: function() {
+ if ( typeof cordova !== 'undefined' ) {
+ cordova.plugins.Keyboard.disableScroll(false);
+ }
+ },
+
destroy: function() { FMS.printDebug('destroy for ' + this.id); this._destroy(); this.remove(); },
_destroy: function() {}