summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js1
-rw-r--r--core/js/login/authpicker.js13
-rw-r--r--core/js/login/redirect.js3
3 files changed, 16 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 03d831567d3..d601f79033e 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1515,7 +1515,6 @@ function initCore() {
var appList = $('#appmenu li');
var availableWidth = $('#header-left').width() - $('#nextcloud').width() - 44;
var appCount = Math.floor((availableWidth)/44);
- console.log(appCount);
// show a maximum of 8 apps
if(appCount >= maxApps) {
appCount = maxApps;
diff --git a/core/js/login/authpicker.js b/core/js/login/authpicker.js
new file mode 100644
index 00000000000..6d8a6bb4160
--- /dev/null
+++ b/core/js/login/authpicker.js
@@ -0,0 +1,13 @@
+jQuery(document).ready(function() {
+ $('#app-token-login').click(function (e) {
+ e.preventDefault();
+ $(this).addClass('hidden');
+ $('#redirect-link').addClass('hidden');
+ $('#app-token-login-field').removeClass('hidden');
+ });
+
+ $('#submit-app-token-login').click(function(e) {
+ e.preventDefault();
+ window.location.href = 'nc://' + encodeURIComponent($('#user').val()) + ':' + encodeURIComponent($('#password').val()) + '@' + encodeURIComponent($('#serverHost').val());
+ });
+});
diff --git a/core/js/login/redirect.js b/core/js/login/redirect.js
new file mode 100644
index 00000000000..ea214feab2d
--- /dev/null
+++ b/core/js/login/redirect.js
@@ -0,0 +1,3 @@
+jQuery(document).ready(function() {
+ $('#submit-redirect-form').trigger('click');
+});