diff options
author | Steven Day <steve@mysociety.org> | 2016-04-28 12:17:12 +0100 |
---|---|---|
committer | Steven Day <steve@mysociety.org> | 2016-04-28 12:21:44 +0100 |
commit | d6e095752f732d859b664dc1027dcaae86f2c2f9 (patch) | |
tree | d178322b4c0bbbabd9a56adae984194bb0165412 | |
parent | ab0e30e3924a1ba1eb7be0896ba27cd8b5afe197 (diff) |
Swap the SoftKeyboard plugin for ionic's
We already had this plugin to help solve issues with the view
scrolling on iOS, and since it offers the same functionality
for closing the keyboard as the SoftKeyboard plugin, it makes
sense to only use one.
-rw-r--r-- | www/index.html | 1 | ||||
-rw-r--r-- | www/js/softkeyboard.js | 34 | ||||
-rw-r--r-- | www/js/views/fms.js | 3 |
3 files changed, 1 insertions, 37 deletions
diff --git a/www/index.html b/www/index.html index 5cd55ae..4f73897 100644 --- a/www/index.html +++ b/www/index.html @@ -36,7 +36,6 @@ <script type="text/javascript" src="jslib/jquery.mobile-1.3.1.min.js"></script> <script type="text/javascript" src="jslib/moment-2.0.0.min.js"></script> <script type="text/javascript" src="cordova.js"></script> - <script type="text/javascript" src="js/softkeyboard.js"></script> <script type="text/javascript" src="jslib/lodash.min.js"></script> <script type="text/javascript" src="jslib/backbone-min.js"></script> diff --git a/www/js/softkeyboard.js b/www/js/softkeyboard.js deleted file mode 100644 index 9b71d46..0000000 --- a/www/js/softkeyboard.js +++ /dev/null @@ -1,34 +0,0 @@ -(function( cordova ) { - - function SoftKeyBoard() {} - - SoftKeyBoard.prototype.show = function(win, fail) { - return cordova.exec( - function (args) { if(win !== undefined) { win(args); } }, - function (args) { if(fail !== undefined) { fail(args); } }, - "SoftKeyBoard", "show", []); - }; - - SoftKeyBoard.prototype.hide = function(win, fail) { - return cordova.exec( - function (args) { if(win !== undefined) { win(args); } }, - function (args) { if(fail !== undefined) { fail(args); } }, - "SoftKeyBoard", "hide", []); - }; - - SoftKeyBoard.prototype.isShowing = function(win, fail) { - return cordova.exec( - function (args) { if(win !== undefined) { win(args); } }, - function (args) { if(fail !== undefined) { fail(args); } }, - "SoftKeyBoard", "isShowing", []); - }; - - if(!window.plugins) { - window.plugins = {}; - } - - if (!window.plugins.SoftKeyBoard) { - window.plugins.SoftKeyBoard = new SoftKeyBoard(); - } - -})( window.cordova ); diff --git a/www/js/views/fms.js b/www/js/views/fms.js index 1b51a27..6ff569b 100644 --- a/www/js/views/fms.js +++ b/www/js/views/fms.js @@ -69,8 +69,7 @@ navigate: function( route, reverse ) { if ( FMS.isAndroid ) { - var softkeyboard = window.plugins.SoftKeyBoard; - softkeyboard.hide(); + cordova.plugins.Keyboard.close(); } if ( reverse ) { FMS.router.reverseTransition(); |