server/apps/files_encryption/js/detect-migration.js

30 lines
866 B
JavaScript
Raw Normal View History

/**
* Copyright (c) 2013
* Bjoern Schiessle <schiessle@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
$(document).ready(function(){
2013-11-27 20:58:38 +00:00
$('form[name="login"]').on('submit', function() {
var user = $('#user').val();
var password = $('#password').val();
$.ajax({
2013-11-26 10:38:49 +00:00
type: 'POST',
url: OC.linkTo('files_encryption', 'ajax/getMigrationStatus.php'),
dataType: 'json',
data: {user: user, password: password},
async: false,
success: function(response) {
if (response.data.migrationCompleted === false) {
var message = t('files_encryption', 'Initial encryption started... This can take some time. Please wait.');
$('span[id="messageText"]').text(message);
2013-11-27 16:01:21 +00:00
$('p[id="message"]').removeClass('hidden').addClass('info');
}
}
});
});
});