summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/css/files.css4
-rw-r--r--apps/files/index.php46
-rw-r--r--apps/files/js/fileactions.js14
-rw-r--r--apps/files/js/files.js2
4 files changed, 33 insertions, 33 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 36a1e5c954b..0c97b009b88 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -23,7 +23,7 @@
#new>ul>li>p { cursor:pointer; }
#new>ul>li>form>input { padding:0.3em; margin:-0.3em; }
-#upload {
+#upload {
height:27px; padding:0; margin-left:0.2em; overflow:hidden;
}
#upload a {
@@ -35,7 +35,7 @@
}
.file_upload_target { display:none; }
.file_upload_form { display:inline; float:left; margin:0; padding:0; cursor:pointer; overflow:visible; }
-#file_upload_start {
+#file_upload_start {
left:0; top:0; width:28px; height:27px; padding:0;
font-size:1em;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0;
diff --git a/apps/files/index.php b/apps/files/index.php
index b64bde44cc0..08193eaee7b 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -38,36 +38,36 @@ OCP\App::setActiveNavigationEntry('files_index');
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
// Redirect if directory does not exist
if (!OC_Filesystem::is_dir($dir . '/')) {
- header('Location: ' . $_SERVER['SCRIPT_NAME'] . '');
- exit();
+ header('Location: ' . $_SERVER['SCRIPT_NAME'] . '');
+ exit();
}
$files = array();
foreach (OC_Files::getdirectorycontent($dir) as $i) {
- $i['date'] = OCP\Util::formatDate($i['mtime']);
- if ($i['type'] == 'file') {
- $fileinfo = pathinfo($i['name']);
- $i['basename'] = $fileinfo['filename'];
- if (!empty($fileinfo['extension'])) {
- $i['extension'] = '.' . $fileinfo['extension'];
- } else {
- $i['extension'] = '';
- }
- }
- if ($i['directory'] == '/') {
- $i['directory'] = '';
- }
- $files[] = $i;
+ $i['date'] = OCP\Util::formatDate($i['mtime']);
+ if ($i['type'] == 'file') {
+ $fileinfo = pathinfo($i['name']);
+ $i['basename'] = $fileinfo['filename'];
+ if (!empty($fileinfo['extension'])) {
+ $i['extension'] = '.' . $fileinfo['extension'];
+ } else {
+ $i['extension'] = '';
+ }
+ }
+ if ($i['directory'] == '/') {
+ $i['directory'] = '';
+ }
+ $files[] = $i;
}
// Make breadcrumb
$breadcrumb = array();
$pathtohere = '';
foreach (explode('/', $dir) as $i) {
- if ($i != '') {
- $pathtohere .= '/' . $i;
- $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
- }
+ if ($i != '') {
+ $pathtohere .= '/' . $i;
+ $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
+ }
}
// make breadcrumb und filelist markup
@@ -89,13 +89,13 @@ $maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
$permissions = OCP\PERMISSION_READ;
if (OC_Filesystem::isUpdatable($dir . '/')) {
- $permissions |= OCP\PERMISSION_UPDATE;
+ $permissions |= OCP\PERMISSION_UPDATE;
}
if (OC_Filesystem::isDeletable($dir . '/')) {
- $permissions |= OCP\PERMISSION_DELETE;
+ $permissions |= OCP\PERMISSION_DELETE;
}
if (OC_Filesystem::isSharable($dir . '/')) {
- $permissions |= OCP\PERMISSION_SHARE;
+ $permissions |= OCP\PERMISSION_SHARE;
}
$tmpl = new OCP\Template('files', 'index', 'user');
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 80b9c01f838..f5ee363a4c8 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -70,23 +70,23 @@ var FileActions = {
}
parent.children('a.name').append('<span class="fileactions" />');
var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions());
-
+
var actionHandler = function (event) {
event.stopPropagation();
event.preventDefault();
FileActions.currentFile = event.data.elem;
var file = FileActions.getCurrentFile();
-
+
event.data.actionFunc(file);
};
-
+
$.each(actions, function (name, action) {
// NOTE: Temporary fix to prevent rename action in root of Shared directory
if (name === 'Rename' && $('#dir').val() === '/Shared') {
return true;
}
-
+
if ((name === 'Download' || action !== defaultAction) && name !== 'Delete') {
var img = FileActions.icons[name];
if (img.call) {
@@ -97,16 +97,16 @@ var FileActions = {
html += '<img class ="svg" src="' + img + '" /> ';
}
html += t('files', name) + '</a>';
-
+
var element = $(html);
element.data('action', name);
//alert(element);
element.on('click',{a:null, elem:parent, actionFunc:actions[name]},actionHandler);
parent.find('a.name>span.fileactions').append(element);
}
-
+
});
-
+
if (actions['Delete']) {
var img = FileActions.icons['Delete'];
if (img.call) {
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index a4260c43285..3a4af6416e9 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -52,7 +52,7 @@ Files={
}
};
$(document).ready(function() {
- Files.bindKeyboardShortcuts(document, jQuery);
+ Files.bindKeyboardShortcuts(document, jQuery);
$('#fileList tr').each(function(){
//little hack to set unescape filenames in attribute
$(this).attr('data-file',decodeURIComponent($(this).attr('data-file')));