mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
remove inline JavaScript
This commit is contained in:
parent
039bc91597
commit
f919230f63
2 changed files with 20 additions and 12 deletions
19
apps/files_trashbin/js/part.list.php
Normal file
19
apps/files_trashbin/js/part.list.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Set the content type to Javascript
|
||||
header("Content-type: text/javascript");
|
||||
|
||||
// Disallow caching
|
||||
header("Cache-Control: no-cache, must-revalidate");
|
||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
|
||||
|
||||
echo "
|
||||
var disableDownloadActions = true;
|
||||
var disableSharing = true;
|
||||
";
|
||||
|
|
@ -1,15 +1,4 @@
|
|||
<script type="text/javascript">
|
||||
<?php if ( array_key_exists('disableSharing', $_) && $_['disableSharing'] == true ) :?>
|
||||
var disableSharing = true;
|
||||
<?php else: ?>
|
||||
var disableSharing = false;
|
||||
<?php endif; ?>
|
||||
<?php if ( array_key_exists('disableDownloadActions', $_) && $_['disableDownloadActions'] == true ) :?>
|
||||
var disableDownloadActions = true;
|
||||
<?php else: ?>
|
||||
var disableDownloadActions = false;
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
<script type="text/javascript" src="<?php echo OC_Helper::linkTo('files_trashbin/js', 'part.list.php');?>"></script>
|
||||
|
||||
<?php foreach($_['files'] as $file):
|
||||
$simple_file_size = OCP\simple_file_size($file['size']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue