Chart.bundle.min.js
5 years ago
bootstrap-switch.min.js
5 years ago
bootstrap.min.js
5 years ago
deactivationSurvey.js
5 years ago
jquery-ui.js
5 years ago
jquery.fileupload.js
5 years ago
jquery.iframe-transport.js
5 years ago
jquery.rateyo.js
5 years ago
jstree.checkbox.js
5 years ago
jstree.min.js
5 years ago
jstree.types.js
5 years ago
jstree.wholerow.js
5 years ago
less.min.js
5 years ago
main.js
5 years ago
popup.js
5 years ago
sgNoticeDismiss.js
5 years ago
sgbackup.js
5 years ago
sgcloud.js
5 years ago
sgdiscount.js
5 years ago
sglicense.js
5 years ago
sglogin.js
5 years ago
sgrequesthandler.js
5 years ago
sgrequesthandler.wordpress.js
5 years ago
sgschedule.js
5 years ago
sgsettings.js
5 years ago
sglogin.js
35 lines
| 1 | jQuery(document).ready(function() { |
| 2 | jQuery('#bg-login-btn').click(function(event) { |
| 3 | event.preventDefault(); |
| 4 | sgBackup.login(); |
| 5 | }); |
| 6 | }); |
| 7 | |
| 8 | jQuery(document).keypress(function( event ) { |
| 9 | if ( event.which == 13 ) { |
| 10 | sgBackup.login(); |
| 11 | } |
| 12 | }); |
| 13 | |
| 14 | sgBackup.login = function() |
| 15 | { |
| 16 | sgBackup.showAjaxSpinner('#bg-wrapper'); |
| 17 | |
| 18 | jQuery('#bg-login-error').hide(); |
| 19 | |
| 20 | var email = jQuery('#email').val(); |
| 21 | var password = jQuery('#password').val(); |
| 22 | |
| 23 | var ajaxHandler = new sgRequestHandler('login', {email: email, password: password, token: BG_BACKUP_STRINGS.nonce}); |
| 24 | ajaxHandler.callback = function(response) { |
| 25 | sgBackup.hideAjaxSpinner(); |
| 26 | if (response.status == 0) { |
| 27 | location.reload(); |
| 28 | } |
| 29 | else { |
| 30 | jQuery('#bg-login-error').show(); |
| 31 | } |
| 32 | }; |
| 33 | ajaxHandler.run(); |
| 34 | } |
| 35 |