server/apps/files_encryption/js/settings-personal.js

21 lines
687 B
JavaScript
Raw Normal View History

2012-08-02 08:39:30 +00:00
/**
* Copyright (c) 2012, 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(){
$('input[name=encryption_mode]').change(function(){
var client=$('input[value="client"]:checked').val()
,server=$('input[value="server"]:checked').val()
,user=$('input[value="user"]:checked').val()
,none=$('input[value="none"]:checked').val()
if (client)
2012-08-03 10:21:49 +00:00
var encmode= 'client';
2012-08-02 08:39:30 +00:00
else if (server)
2012-08-03 10:21:49 +00:00
var encmode = 'server';
2012-08-02 08:39:30 +00:00
else
2012-08-03 10:21:49 +00:00
var encmode = 'none';
$.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: encmode });
2012-08-02 08:39:30 +00:00
})
})