authpicker.js 524 B

12345678910111213141516
  1. jQuery(document).ready(function() {
  2. $('#app-token-login').click(function (e) {
  3. e.preventDefault();
  4. $(this).addClass('hidden');
  5. $('#redirect-link').addClass('hidden');
  6. $('#app-token-login-field').removeClass('hidden');
  7. });
  8. $('#submit-app-token-login').click(function(e) {
  9. e.preventDefault();
  10. window.location.href = 'nc://login/server:'
  11. + encodeURIComponent($('#serverHost').val())
  12. + "&user:" + encodeURIComponent($('#user').val())
  13. + "&password:" + encodeURIComponent($('#password').val());
  14. });
  15. });