code cleanup and TODOs added

This commit is contained in:
Bjoern Schiessle 2012-08-03 12:21:49 +02:00
parent bed05f0302
commit a0b2474019
3 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,8 @@
* See the COPYING-README file.
*/
//TODO: Handle switch between client and server side encryption
OCP\JSON::checkAppEnabled('files_encryption');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();

View File

@ -11,10 +11,11 @@ $(document).ready(function(){
,user=$('input[value="user"]:checked').val()
,none=$('input[value="none"]:checked').val()
if (client)
$.post(OC.filePath('files_encryption', 'ajax', 'changemode.php'), { mode: 'client' });
var encmode= 'client';
else if (server)
$.post(OC.filePath('files_encryption', 'ajax', 'changemode.php'), { mode: 'server' });
var encmode = 'server';
else
$.post(OC.filePath('files_encryption', 'ajax', 'changemode.php'), { mode: 'none' });
var encmode = 'none';
$.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: encmode });
})
})

View File

@ -17,6 +17,7 @@ $(document).ready(function(){
OC.AppConfig.setValue('files_encryption','type_blacklist',blackList);
}
//TODO: Handle switch between client and server side encryption
$('input[name=encryption_mode]').change(function(){
var client=$('input[value="client"]:checked').val()
,server=$('input[value="server"]:checked').val()