2015-08-27 22:02:00 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015
|
|
|
|
* Vincent Petry <pvince81@owncloud.com>
|
|
|
|
* Jan-Christoph Borchardt, http://jancborchardt.net
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @namespace
|
|
|
|
* @memberOf OC
|
|
|
|
*/
|
|
|
|
OC.Login = _.extend(OC.Login || {}, {
|
|
|
|
onLogin: function () {
|
2017-08-03 20:18:17 +03:00
|
|
|
$('#submit-icon')
|
2016-10-06 17:48:10 +03:00
|
|
|
.removeClass('icon-confirm-white')
|
2017-08-03 20:18:17 +03:00
|
|
|
.addClass('icon-loading-small');
|
|
|
|
$('#submit')
|
2016-10-06 17:48:10 +03:00
|
|
|
.attr('value', t('core', 'Logging in …'));
|
2015-08-27 22:02:00 +03:00
|
|
|
return true;
|
2016-03-03 21:52:04 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
rememberLogin: function(){
|
|
|
|
if($(this).is(":checked")){
|
2016-10-06 17:48:10 +03:00
|
|
|
if($("#user").val() && $("#password").val()) {
|
|
|
|
$('#submit').trigger('click');
|
|
|
|
}
|
|
|
|
}
|
2015-08-27 22:02:00 +03:00
|
|
|
}
|
|
|
|
});
|
2016-03-03 21:52:04 +03:00
|
|
|
|
2015-08-27 22:02:00 +03:00
|
|
|
$(document).ready(function() {
|
|
|
|
$('form[name=login]').submit(OC.Login.onLogin);
|
2016-03-03 21:52:04 +03:00
|
|
|
|
|
|
|
$('#remember_login').click(OC.Login.rememberLogin);
|
2015-08-27 22:02:00 +03:00
|
|
|
});
|