summaryrefslogtreecommitdiff
path: root/www/js/LoginCtrl.js
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-07-04 16:56:53 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-07-04 16:56:53 -0400
commitc2ac88f9a4a1c945988acd89c45e394bde08529a (patch)
treeee50facac3d6e3bf744e1c61844c82bd7ce3c0ae /www/js/LoginCtrl.js
parent223fb28e4001689b6bbd049d75f807a250a2c392 (diff)
improved input experience - urls copy from base url
Diffstat (limited to 'www/js/LoginCtrl.js')
-rw-r--r--www/js/LoginCtrl.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index c4192927..86da2e06 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -23,6 +23,25 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
ZMDataModel.setAwake(false);
});
+
+ //-------------------------------------------------------------------------------
+ // Makes input easier
+ //-------------------------------------------------------------------------------
+
+ $scope.portalKeypress = function(evt)
+ {
+
+ // if ($scope.loginData.streamingurl.indexOf($scope.loginData.url) !=0)
+ $scope.loginData.streamingurl = $scope.loginData.url;
+
+ if ($scope.loginData.streamingurl.slice(-3).toLowerCase() == '/zm') {
+ $scope.loginData.streamingurl = $scope.loginData.streamingurl.slice(0, -3);
+ }
+
+
+ // if ($scope.loginData.apiurl.indexOf($scope.loginData.url) !=0)
+ $scope.loginData.apiurl = $scope.loginData.url+"/api";
+ };
//-------------------------------------------------------------------------------
// Adds http to url if not present
// http://stackoverflow.com/questions/11300906/check-if-a-string-starts-with-http-using-javascript