summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/ajax/upload.php2
-rw-r--r--apps/files/js/filelist.js4
-rw-r--r--apps/files/js/files.js7
-rw-r--r--apps/files/l10n/nl.php1
-rw-r--r--apps/files/l10n/pl.php2
-rw-r--r--apps/files_external/lib/amazons3.php5
-rw-r--r--apps/files_external/lib/sftp.php4
-rw-r--r--apps/files_external/lib/streamwrapper.php4
-rw-r--r--apps/files_external/lib/swift.php4
-rw-r--r--apps/files_external/lib/webdav.php2
-rw-r--r--apps/files_trashbin/ajax/delete.php51
-rw-r--r--apps/files_trashbin/ajax/undelete.php6
-rw-r--r--apps/files_trashbin/index.php3
-rw-r--r--apps/files_trashbin/js/trash.js48
-rw-r--r--apps/files_trashbin/l10n/uk.php9
-rw-r--r--apps/files_trashbin/templates/index.php7
-rw-r--r--apps/files_trashbin/templates/part.list.php6
-rw-r--r--apps/files_versions/appinfo/app.php2
-rw-r--r--apps/files_versions/js/versions.js10
-rw-r--r--apps/files_versions/l10n/uk.php8
-rw-r--r--apps/files_versions/lib/hooks.php25
-rw-r--r--apps/files_versions/lib/versions.php63
22 files changed, 156 insertions, 117 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 07977f5ddf1..9031c729eff 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -48,7 +48,7 @@ $totalSize = 0;
foreach ($files['size'] as $size) {
$totalSize += $size;
}
-if ($totalSize > \OC\Files\Filesystem::free_space($dir)) {
+if ($totalSize > $maxUploadFilesize) {
OCP\JSON::error(array('data' => array('message' => $l->t('Not enough storage available'),
'uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize)));
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index cc107656da8..0bf1f79ab77 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -315,8 +315,8 @@ var FileList={
do_delete:function(files){
if(files.substr){
files=[files];
- }
- for (var i in files) {
+ }
+ for (var i=0; i<files.length; i++) {
var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete");
var oldHTML = deleteAction[0].outerHTML;
var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'perform delete operation')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 918182162d4..8327460cca6 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -162,9 +162,10 @@ $(document).ready(function() {
var tr=$('tr').filterAttr('data-file',filename);
var renaming=tr.data('renaming');
if(!renaming && !FileList.isLoading(filename)){
- var mime=$(this).parent().parent().data('mime');
- var type=$(this).parent().parent().data('type');
- var permissions = $(this).parent().parent().data('permissions');
+ FileActions.currentFile = $(this).parent();
+ var mime=FileActions.getCurrentMimeType();
+ var type=FileActions.getCurrentType();
+ var permissions = FileActions.getCurrentPermissions();
var action=FileActions.getDefault(mime,type, permissions);
if(action){
event.preventDefault();
diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php
index 381325d113c..a92ec933b22 100644
--- a/apps/files/l10n/nl.php
+++ b/apps/files/l10n/nl.php
@@ -60,6 +60,7 @@
"Text file" => "Tekstbestand",
"Folder" => "Map",
"From link" => "Vanaf link",
+"Deleted files" => "Verwijderde bestanden",
"Cancel upload" => "Upload afbreken",
"Nothing in here. Upload something!" => "Er bevindt zich hier niets. Upload een bestand!",
"Download" => "Download",
diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php
index 83091bad18c..d68a871a7d7 100644
--- a/apps/files/l10n/pl.php
+++ b/apps/files/l10n/pl.php
@@ -10,6 +10,7 @@
"No file was uploaded" => "Nie przesłano żadnego pliku",
"Missing a temporary folder" => "Brak katalogu tymczasowego",
"Failed to write to disk" => "Błąd zapisu na dysk",
+"Not enough storage available" => "Za mało miejsca",
"Invalid directory." => "Zła ścieżka.",
"Files" => "Pliki",
"Delete" => "Usuwa element",
@@ -54,6 +55,7 @@
"Text file" => "Plik tekstowy",
"Folder" => "Katalog",
"From link" => "Z linku",
+"Deleted files" => "Pliki usnięte",
"Cancel upload" => "Przestań wysyłać",
"Nothing in here. Upload something!" => "Brak zawartości. Proszę wysłać pliki!",
"Download" => "Pobiera element",
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 494885a1dd3..37e53a3a670 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -229,11 +229,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false;
}
- public function free_space($path) {
- // Infinite?
- return false;
- }
-
public function touch($path, $mtime = null) {
if (is_null($mtime)) {
$mtime = time();
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 3527f50ec98..785eb7dfc42 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -242,10 +242,6 @@ class SFTP extends \OC\Files\Storage\Common {
}
}
- public function free_space($path) {
- return -1;
- }
-
public function touch($path, $mtime=null) {
try {
if (!is_null($mtime)) return false;
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index a631e7ce06a..4685877f26b 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -76,10 +76,6 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
return fopen($this->constructUrl($path), $mode);
}
- public function free_space($path) {
- return 0;
- }
-
public function touch($path, $mtime=null) {
$this->init();
if(is_null($mtime)) {
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index 0fd6fa143b8..a00316c1f84 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -478,10 +478,6 @@ class SWIFT extends \OC\Files\Storage\Common{
}
}
- public function free_space($path) {
- return 1024*1024*1024*8;
- }
-
public function touch($path, $mtime=null) {
$this->init();
$obj=$this->getObject($path);
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 039a07b1ef2..91cc22779e6 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -222,7 +222,7 @@ class DAV extends \OC\Files\Storage\Common{
return 0;
}
} catch(\Exception $e) {
- return 0;
+ return \OC\Files\FREE_SPACE_UNKNOWN;
}
}
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index f41482bef55..34f35c39ccb 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -3,24 +3,43 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
-$file = $_REQUEST['file'];
+$files = $_POST['files'];
+$dirlisting = $_POST['dirlisting'];
+$list = json_decode($files);
-$path_parts = pathinfo($file);
-if ($path_parts['dirname'] == '.') {
- $delimiter = strrpos($file, '.d');
- $filename = substr($file, 0, $delimiter);
- $timestamp = substr($file, $delimiter+2);
-} else {
- $filename = $file;
- $timestamp = null;
-}
+$error = array();
+$success = array();
-OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp);
+$i = 0;
+foreach ($list as $file) {
+ if ( $dirlisting=='0') {
+ $delimiter = strrpos($file, '.d');
+ $filename = substr($file, 0, $delimiter);
+ $timestamp = substr($file, $delimiter+2);
+ } else {
+ $filename = $file;
+ $timestamp = null;
+ }
+
+ OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp);
+ if (!OCA\Files_Trashbin\Trashbin::file_exists($filename, $timestamp)) {
+ $success[$i]['filename'] = $file;
+ $success[$i]['timestamp'] = $timestamp;
+ $i++;
+ } else {
+ $error[] = $filename;
+ }
+}
-if (!OCA\Files_Trashbin\Trashbin::file_exists($filename)) {
- OCP\JSON::success(array("data" => array("filename" => $file)));
-} else {
+if ( $error ) {
+ $filelist = '';
+ foreach ( $error as $e ) {
+ $filelist .= $e.', ';
+ }
$l = OC_L10N::get('files_trashbin');
- OCP\JSON::error(array("data" => array("message" => $l->t("Couldn't delete %s permanently", array($file)))));
+ $message = $l->t("Couldn't delete %s permanently", array(rtrim($filelist, ', ')));
+ OCP\JSON::error(array("data" => array("message" => $message,
+ "success" => $success, "error" => $error)));
+} else {
+ OCP\JSON::success(array("data" => array("success" => $success)));
}
-
diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php
index 6320c1d0827..93f2aaf1fa2 100644
--- a/apps/files_trashbin/ajax/undelete.php
+++ b/apps/files_trashbin/ajax/undelete.php
@@ -3,9 +3,9 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
-$files = $_REQUEST['files'];
-$dirlisting = $_REQUEST['dirlisting'];
-$list = explode(';', $files);
+$files = $_POST['files'];
+$dirlisting = $_POST['dirlisting'];
+$list = json_decode($files);
$error = array();
$success = array();
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index d575c75f1a3..2276fee2f81 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -16,6 +16,7 @@ OCP\Util::addScript('files', 'filelist');
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
+$result = array();
if ($dir) {
$dirlisting = true;
$fullpath = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath($dir);
@@ -36,7 +37,7 @@ if ($dir) {
);
}
}
- closedir($fullpath);
+ closedir($dirContent);
} else {
$dirlisting = false;
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 6c810e4c2bd..208cc88f0fd 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -6,9 +6,10 @@ $(document).ready(function() {
var tr=$('tr').filterAttr('data-file', filename);
var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'perform restore operation')+'" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>';
var undeleteAction = $('tr').filterAttr('data-file',filename).children("td.date");
+ var files = tr.attr('data-file');
undeleteAction[0].innerHTML = undeleteAction[0].innerHTML+spinner;
$.post(OC.filePath('files_trashbin','ajax','undelete.php'),
- {files:tr.attr('data-file'), dirlisting:tr.attr('data-dirlisting') },
+ {files:JSON.stringify([files]), dirlisting:tr.attr('data-dirlisting') },
function(result){
for (var i = 0; i < result.data.success.length; i++) {
var row = document.getElementById(result.data.success[i].filename);
@@ -31,16 +32,17 @@ $(document).ready(function() {
var deleteAction = $('tr').filterAttr('data-file',filename).children("td.date").children(".action.delete");
var oldHTML = deleteAction[0].outerHTML;
var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'delete file permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
+ var files = tr.attr('data-file');
deleteAction[0].outerHTML = newHTML;
$.post(OC.filePath('files_trashbin','ajax','delete.php'),
- {file:tr.attr('data-file') },
+ {files:JSON.stringify([files]), dirlisting:tr.attr('data-dirlisting') },
function(result){
- if ( result.status == 'success' ) {
- var row = document.getElementById(result.data.filename);
+ for (var i = 0; i < result.data.success.length; i++) {
+ var row = document.getElementById(result.data.success[i].filename);
row.parentNode.removeChild(row);
- } else {
- deleteAction[0].outerHTML = oldHTML;
+ }
+ if (result.status != 'success') {
OC.dialogs.alert(result.data.message, 'Error');
}
});
@@ -88,15 +90,15 @@ $(document).ready(function() {
}
}
processSelection();
- });
+ });
$('.undelete').click('click',function(event) {
var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'perform restore operation')+'" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>';
var files=getSelectedFiles('file');
- var fileslist=files.join(';');
+ var fileslist = JSON.stringify(files);
var dirlisting=getSelectedFiles('dirlisting')[0];
- for (var i in files) {
+ for (var i=0; i<files.length; i++) {
var undeleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date");
undeleteAction[0].innerHTML = undeleteAction[0].innerHTML+spinner;
}
@@ -111,9 +113,33 @@ $(document).ready(function() {
if (result.status != 'success') {
OC.dialogs.alert(result.data.message, 'Error');
}
- });
+ });
+ });
+
+ $('.delete').click('click',function(event) {
+ console.log("delete selected");
+ var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'Delete permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
+ var files=getSelectedFiles('file');
+ var fileslist = JSON.stringify(files);
+ var dirlisting=getSelectedFiles('dirlisting')[0];
+
+ for (var i=0; i<files.length; i++) {
+ var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date");
+ deleteAction[0].innerHTML = deleteAction[0].innerHTML+spinner;
+ }
+
+ $.post(OC.filePath('files_trashbin','ajax','delete.php'),
+ {files:fileslist, dirlisting:dirlisting},
+ function(result){
+ for (var i = 0; i < result.data.success.length; i++) {
+ var row = document.getElementById(result.data.success[i].filename);
+ row.parentNode.removeChild(row);
+ }
+ if (result.status != 'success') {
+ OC.dialogs.alert(result.data.message, 'Error');
+ }
+ });
});
-
});
diff --git a/apps/files_trashbin/l10n/uk.php b/apps/files_trashbin/l10n/uk.php
index 14c6931255a..06474d9b2cd 100644
--- a/apps/files_trashbin/l10n/uk.php
+++ b/apps/files_trashbin/l10n/uk.php
@@ -1,7 +1,14 @@
<?php $TRANSLATIONS = array(
+"Couldn't delete %s permanently" => "Неможливо видалити %s назавжди",
+"Couldn't restore %s" => "Неможливо відновити %s",
+"perform restore operation" => "виконати операцію відновлення",
+"delete file permanently" => "видалити файл назавжди",
"Name" => "Ім'я",
+"Deleted" => "Видалено",
"1 folder" => "1 папка",
"{count} folders" => "{count} папок",
"1 file" => "1 файл",
-"{count} files" => "{count} файлів"
+"{count} files" => "{count} файлів",
+"Nothing in here. Your trash bin is empty!" => "Нічого немає. Ваший кошик для сміття пустий!",
+"Restore" => "Відновити"
);
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index b62ca0af00c..aaeeb5c6f6e 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -25,6 +25,13 @@
</th>
<th id="headerDate">
<span id="modified"><?php echo $l->t( 'Deleted' ); ?></span>
+ <span class="selectedActions">
+ <a href="" class="delete">
+ <?php echo $l->t('Delete')?>
+ <img class="svg" alt="<?php echo $l->t('Delete')?>"
+ src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
+ </a>
+ </span>
</th>
</tr>
</thead>
diff --git a/apps/files_trashbin/templates/part.list.php b/apps/files_trashbin/templates/part.list.php
index fe8a71f44e6..2de0d7ee91a 100644
--- a/apps/files_trashbin/templates/part.list.php
+++ b/apps/files_trashbin/templates/part.list.php
@@ -1,12 +1,8 @@
<input type="hidden" id="disableSharing" data-status="<?php echo $_['disableSharing']; ?>">
<?php foreach($_['files'] as $file):
- $simple_file_size = OCP\simple_file_size($file['size']);
- // the bigger the file, the darker the shade of grey; megabytes*2
- $simple_size_color = intval(200-$file['size']/(1024*1024)*2);
- if($simple_size_color<0) $simple_size_color = 0;
$relative_deleted_date = OCP\relative_modified_date($file['timestamp']);
// the older the file, the brighter the shade of grey; days*14
- $relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
+ $relative_date_color = round((time()-$file['date'])/60/60/24*14);
if($relative_date_color>200) $relative_date_color = 200;
$name = str_replace('+', '%20', urlencode($file['name']));
$name = str_replace('%2F', '/', $name);
diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php
index 9e3e81c580a..8e0356ada20 100644
--- a/apps/files_versions/appinfo/app.php
+++ b/apps/files_versions/appinfo/app.php
@@ -11,5 +11,5 @@ OCP\Util::addscript('files_versions', 'versions');
// Listen to write signals
OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "write_hook");
// Listen to delete and rename signals
-OCP\Util::connectHook('OC_Filesystem', 'post-delete', "OCA\Files_Versions\Hooks", "remove_hook");
+OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\Files_Versions\Hooks", "remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook");
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index b9c54689813..dec222eefce 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -41,6 +41,10 @@ $(document).ready(function(){
}
});
+function goToVersionPage(url){
+ window.location(url);
+}
+
function createVersionsDropdown(filename, files) {
var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename );
@@ -51,7 +55,7 @@ function createVersionsDropdown(filename, files) {
html += '<option value=""></option>';
html += '</select>';
html += '</div>';
- html += '<input type="button" value="All versions..." onclick="window.location=\''+historyUrl+'\'" name="makelink" id="makelink" />';
+ html += '<input type="button" value="All versions..." name="makelink" id="makelink" />';
html += '<input id="link" style="display:none; width:90%;" />';
if (filename) {
@@ -60,6 +64,10 @@ function createVersionsDropdown(filename, files) {
} else {
$(html).appendTo($('thead .share'));
}
+
+ $("#makelink").click(function() {
+ goToVersionPage(historyUrl);
+ });
$.ajax({
type: 'GET',
diff --git a/apps/files_versions/l10n/uk.php b/apps/files_versions/l10n/uk.php
index 49acda81079..861523bf6a4 100644
--- a/apps/files_versions/l10n/uk.php
+++ b/apps/files_versions/l10n/uk.php
@@ -1,5 +1,13 @@
<?php $TRANSLATIONS = array(
+"Could not revert: %s" => "Не вдалося відновити: %s",
+"success" => "успішно",
+"File %s was reverted to version %s" => "Файл %s був відновлений до версії %s",
+"failure" => "неуспішно",
+"File %s could not be reverted to version %s" => "Файл %s не може бути відновлений до версії %s",
+"No old versions available" => "Старі версії недоступні",
+"No path specified" => "Шлях не вказаний",
"History" => "Історія",
+"Revert a file to a previous version by clicking on its revert button" => "Відновити файл на попередню версію, натиснувши на кнопку Відновити",
"Files Versioning" => "Версії файлів",
"Enable" => "Включити"
);
diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php
index dc02c605c44..6c87eba423d 100644
--- a/apps/files_versions/lib/hooks.php
+++ b/apps/files_versions/lib/hooks.php
@@ -20,13 +20,10 @@ class Hooks {
public static function write_hook( $params ) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versions = new Storage( new \OC\Files\View('') );
-
$path = $params[\OC\Files\Filesystem::signal_param_path];
-
- if($path<>'') $versions->store( $path );
-
+ if($path<>'') {
+ Storage::store($path);
+ }
}
}
@@ -40,12 +37,10 @@ class Hooks {
*/
public static function remove_hook($params) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versions = new Storage( new \OC_FilesystemView('') );
-
$path = $params[\OC\Files\Filesystem::signal_param_path];
-
- if($path<>'') $versions->delete( $path );
+ if($path<>'') {
+ Storage::delete($path);
+ }
}
}
@@ -59,13 +54,11 @@ class Hooks {
*/
public static function rename_hook($params) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versions = new Storage( new \OC_FilesystemView('') );
-
$oldpath = $params['oldpath'];
$newpath = $params['newpath'];
-
- if($oldpath<>'' && $newpath<>'') $versions->rename( $oldpath, $newpath );
+ if($oldpath<>'' && $newpath<>'') {
+ Storage::rename( $oldpath, $newpath );
+ }
}
}
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index f23381cb156..ba9f8ba41cb 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -35,37 +35,25 @@ class Storage {
'step' => 604800),
);
- private static function getUidAndFilename($filename)
- {
- if (\OCP\App::isEnabled('files_sharing')
- && substr($filename, 0, 7) == '/Shared'
- && $source = \OCP\Share::getItemSharedWith('file',
- substr($filename, 7),
- \OC_Share_Backend_File::FORMAT_SHARED_STORAGE)) {
- $filename = $source['path'];
- $pos = strpos($filename, '/files', 1);
- $uid = substr($filename, 1, $pos - 1);
- $filename = substr($filename, $pos + 6);
- } else {
- $uid = \OCP\User::getUser();
+ private static function getUidAndFilename($filename) {
+ $uid = \OC\Files\Filesystem::getOwner($filename);
+ if ( $uid != \OCP\User::getUser() ) {
+ $info = \OC\Files\Filesystem::getFileInfo($filename);
+ $ownerView = new \OC\Files\View('/'.$uid.'/files');
+ $filename = $ownerView->getPath($info['fileid']);
}
return array($uid, $filename);
}
-
+
/**
* store a new version of a file.
*/
- public function store($filename) {
+ public static function store($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
- $files_view = new \OC\Files\View('/'.\OCP\User::getUser() .'/files');
- $users_view = new \OC\Files\View('/'.\OCP\User::getUser());
-
- //check if source file already exist as version to avoid recursions.
- // todo does this check work?
- if ($users_view->file_exists($filename)) {
- return false;
- }
+
+ $files_view = new \OC\Files\View('/'.$uid .'/files');
+ $users_view = new \OC\Files\View('/'.$uid);
// check if filename is a directory
if($files_view->is_dir($filename)) {
@@ -106,10 +94,10 @@ class Storage {
*/
public static function delete($filename) {
list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.$uid .'/files_versions');
+ $versions_fileview = new \OC\Files\View('/'.$uid .'/files_versions');
$abs_path = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$filename.'.v';
- if( ($versions = self::getVersions($filename)) ) {
+ if( ($versions = self::getVersions($uid, $filename)) ) {
if ( ($versionsSize = \OCP\Config::getAppValue('files_versions', 'size')) === null ) {
$versionsSize = self::calculateSize($uid);
}
@@ -127,16 +115,15 @@ class Storage {
public static function rename($oldpath, $newpath) {
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
list($uidn, $newpath) = self::getUidAndFilename($newpath);
- $versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
- $files_view = new \OC_FilesystemView('/'.$uid .'/files');
+ $versions_view = new \OC\Files\View('/'.$uid .'/files_versions');
+ $files_view = new \OC\Files\View('/'.$uid .'/files');
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_view->getAbsolutePath('').$newpath;
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
$versions_view->rename($oldpath, $newpath);
- } else if ( ($versions = Storage::getVersions($oldpath)) ) {
+ } else if ( ($versions = Storage::getVersions($uid, $oldpath)) ) {
$info=pathinfo($abs_newpath);
if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true);
- $versions = Storage::getVersions($oldpath);
foreach ($versions as $v) {
$versions_view->rename($oldpath.'.v'.$v['version'], $newpath.'.v'.$v['version']);
}
@@ -177,14 +164,14 @@ class Storage {
/**
* @brief get a list of all available versions of a file in descending chronological order
+ * @param $uid user id from the owner of the file
* @param $filename file to find versions of, relative to the user files dir
* @param $count number of versions to return
* @returns array
*/
- public static function getVersions( $filename, $count = 0 ) {
+ public static function getVersions($uid, $filename, $count = 0 ) {
if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
- list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC\Files\View('/' . \OCP\User::getUser() . '/files_versions');
+ $versions_fileview = new \OC\Files\View('/' . $uid . '/files_versions');
$versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
$versions = array();
@@ -197,7 +184,7 @@ class Storage {
sort( $matches );
- $files_view = new \OC_FilesystemView('/'.$uid.'/files');
+ $files_view = new \OC\Files\View('/'.$uid.'/files');
$local_file = $files_view->getLocalFile($filename);
$local_file_md5 = \md5_file( $local_file );
@@ -248,7 +235,7 @@ class Storage {
*/
private static function calculateSize($uid) {
if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
- $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
+ $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
$versionsRoot = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($versionsRoot), \RecursiveIteratorIterator::CHILD_FIRST);
@@ -273,7 +260,7 @@ class Storage {
*/
private static function getAllVersions($uid) {
if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
- $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
+ $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
$versionsRoot = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($versionsRoot), \RecursiveIteratorIterator::CHILD_FIRST);
@@ -319,7 +306,7 @@ class Storage {
private static function expire($filename, $versionsSize = null) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
+ $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
// get available disk space for user
$quota = \OCP\Util::computerFileSize(\OC_Preferences::getValue($uid, 'files', 'quota'));
@@ -338,7 +325,7 @@ class Storage {
}
// calculate available space for version history
- $files_view = new \OC_FilesystemView('/'.$uid.'/files');
+ $files_view = new \OC\Files\View('/'.$uid.'/files');
$rootInfo = $files_view->getFileInfo('/');
$free = $quota-$rootInfo['size']; // remaining free space for user
if ( $free > 0 ) {
@@ -354,7 +341,7 @@ class Storage {
$versions_by_file = $result['by_file'];
$all_versions = $result['all'];
} else {
- $all_versions = Storage::getVersions($filename);
+ $all_versions = Storage::getVersions($uid, $filename);
$versions_by_file[$filename] = $all_versions;
}
s="k">line-height: 125%; font-size: 24px; } #nojavascript div { display: block; position: relative; width: 50%; top: 35%; margin: 0px auto; } #nojavascript a { color: #fff; border-bottom: 2px dotted #fff; } #nojavascript a:hover, #nojavascript a:focus { color: #ddd; } /* INPUTS */ input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], input[type="time"], input[type="date"], textarea, select, button, .button, input[type="submit"], input[type="button"], #quota, .pager li a { width: 130px; margin: 3px 3px 3px 0; padding: 7px 6px 5px; font-size: 13px; background-color: #fff; color: #333; border: 1px solid #ddd; outline: none; border-radius: 3px; } input[type="hidden"] { height: 0; width: 0; } input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], input[type="time"], textarea { background: #fff; color: #555; cursor: text; font-family: inherit; /* use default ownCloud font instead of default textarea monospace */ } input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], input[type="time"] { -webkit-appearance:textfield; -moz-appearance:textfield; -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; } input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active, input[type="password"]:hover, input[type="password"]:focus, input[type="password"]:active, input[type="number"]:hover, input[type="number"]:focus, input[type="number"]:active, .searchbox input[type="search"]:hover, .searchbox input[type="search"]:focus, .searchbox input[type="search"]:active, input[type="email"]:hover, input[type="email"]:focus, input[type="email"]:active, input[type="url"]:hover, input[type="url"]:focus, input[type="url"]:active, input[type="time"]:hover, input[type="time"]:focus, input[type="time"]:active, textarea:hover, textarea:focus, textarea:active { color: #333; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } input[type="checkbox"] { margin:0; padding:0; height:auto; width:auto; } input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:#111 !important; } input[type="time"] { width: initial; height: 31px; -moz-box-sizing: border-box; box-sizing: border-box; } .select2-choices { border: 1px solid #ddd; border-radius: 3px; color: #333; background-image: none; } .select2-dropdown-open .select2-choices { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: 1px solid #3875d7; } /* correctly align images inside of buttons */ input img, button img, .button img { vertical-align: text-bottom; } #quota { cursor: default; margin: 30px; } /* SCROLLING */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track-piece { background-color: transparent; } ::-webkit-scrollbar-thumb { background: #ccc; } /* BUTTONS */ input[type="submit"], input[type="button"], button, .button, #quota, select, .pager li a { width: auto; min-width: 25px; padding: 5px; background-color: rgba(240,240,240,.9); font-weight: bold; color: #555; border: 1px solid rgba(190,190,190,.9); cursor: pointer; } input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, input[type="button"]:focus, button:hover, button:focus, .button:hover, .button:focus, .button a:focus, select:hover, select:focus, select:active { background-color: rgba(255, 255, 255, .95); color: #111; } input[type="submit"] img, input[type="button"] img, button img, .button img { cursor:pointer; } #header .button { border: none; box-shadow: none; } /* disabled input fields and buttons */ input:disabled, input:disabled:hover, input:disabled:focus, button:disabled, button:disabled:hover, button:disabled:focus, .button:disabled, .button:disabled:hover, .button:disabled:focus, a.disabled, a.disabled:hover, a.disabled:focus, textarea:disabled { background-color: rgba(230,230,230,.9); color: #999; cursor: default; } /* Primary action button, use sparingly */ .primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary { border: 1px solid #1d2d44; background-color: #35537a; color: #ddd; } .primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover, .primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus { border: 1px solid #1d2d44; background-color: #304d76; color: #fff; } .primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active { border: 1px solid #1d2d44; background-color: #1d2d44; color: #bbb; } /* Searchbox */ .searchbox input[type="search"] { position: relative; font-size: 1.2em; padding-left: 1.5em; background: #fff url('../img/actions/search.svg') no-repeat .5em center; border: 0; border-radius: 2em; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity: .7; margin-top: 6px; float: right; } input[type="submit"].enabled { background-color: #66f866; border: 1px solid #5e5; } /* CONTENT ------------------------------------------------------------------ */ #controls { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; position: fixed; top: 45px; right: 0; left: 0; height: 44px; width: 100%; padding: 0; margin: 0; background-color: rgba(255, 255, 255, .95); z-index: 50; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } /* position controls for apps with app-navigation */ #app-navigation+#app-content #controls { left: 250px; } .viewer-mode #app-navigation+#app-content #controls { left: 0; } #controls .button, #controls button, #controls input[type='submit'], #controls input[type='text'], #controls input[type='password'], #controls select { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; display: inline-block; height: 36px; padding: 7px 10px } #controls .button.hidden { display: none; } #content { position: relative; height: 100%; width: 100%; } #content .hascontrols { position: relative; top: 45px; } #content-wrapper { position: absolute; height: 100%; width: 100%; overflow-x: hidden; /* prevent horizontal scrollbar */ padding-top: 45px; -moz-box-sizing:border-box; box-sizing:border-box; } /* allow horizontal scrollbar for personal and admin settings */ #body-settings:not(.snapjs-left) .app-settings { overflow-x: auto; } #emptycontent { font-size: 16px; color: #888; position: absolute; text-align: center; top: 30%; width: 100%; } #emptycontent h2 { font-size: 22px; margin-bottom: 10px; } #emptycontent [class^="icon-"], #emptycontent [class*=" icon-"] { background-size: 64px; height: 64px; width: 64px; margin: 0 auto 15px; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); opacity: .5; } /* LOG IN & INSTALLATION ------------------------------------------------------------ */ /* Some whitespace to the top */ #body-login #header { padding-top: 100px; } #body-login { background-attachment: fixed; /* fix background gradient */ height: 100%; /* fix sticky footer */ } /* Dark subtle label text */ #body-login p.info, #body-login form fieldset legend, #body-login #datadirContent label, #body-login form fieldset .warning-info, #body-login form input[type="checkbox"]+label { text-align: center; color: #ccc; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter: alpha(opacity=60); opacity: .6; } /* overrides another !important statement that sets this to unreadable black */ #body-login form .warning input[type="checkbox"]:hover+label, #body-login form .warning input[type="checkbox"]:focus+label, #body-login form .warning input[type="checkbox"]+label { color: #fff !important; } #body-login .update h2 { font-size: 20px; line-height: 130%; margin-bottom: 30px; } #body-login .update a { color: #fff; border-bottom: 1px solid #aaa; } #body-login .infogroup { margin-bottom: 15px; } #body-login p#message img { vertical-align: middle; padding: 5px; } #body-login div.buttons { text-align:center; } #body-login p.info { width: 22em; margin: 0 auto; padding-top: 20px; } #body-login p.info a { font-weight: bold; padding: 13px; margin: -13px; } #body-login #submit.login { margin-right:7px; } /* quick fix for log in button not being aligned with input fields, should be properly fixed by input field width later */ #body-login form { width:22em; margin:2em auto 2em; padding:0; } #body-login form fieldset { margin-bottom: 20px; text-align: left; } #body-login form #adminaccount { margin-bottom:15px; } #body-login form fieldset legend, #datadirContent label { width: 100%; } #body-login #datadirContent label { display: block; margin: 0; } #body-login form #datadirField legend { margin-bottom: 15px; } #body-login #showAdvanced { padding: 13px; /* increase clickable area of Advanced dropdown */ } #body-login #showAdvanced img { vertical-align: bottom; /* adjust position of Advanced dropdown arrow */ margin-left: -4px; } /* strengthify wrapper */ #body-login .strengthify-wrapper { display: inline-block; position: relative; left: 15px; top: -21px; width: 252px; } /* tipsy for the strengthify wrapper looks better with following font settings */ #body-login .tipsy-inner { font-weight: bold; color: #ccc; } /* Icons for username and password fields to better recognize them */ #adminlogin, #adminpass, input[name='adminpass-clone'], #user, #password, input[name='password-clone'] { width: 223px !important; padding-left: 36px !important; } #adminlogin+label+img, #adminpass-icon, #user+label+img, #password-icon { position: absolute; left: 16px; top: 22px; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; filter: alpha(opacity=30); opacity: .3; } #adminpass-icon, #password-icon { top: 17px; } /* General new input field look */ #body-login input[type="text"], #body-login input[type="password"], #body-login input[type="email"], #body-login input[type="submit"] { border: none; border-radius: 5px; } /* Nicely grouping input field sets */ .grouptop, .groupmiddle, .groupbottom { position: relative; } #body-login .grouptop input, .grouptop input { margin-bottom: 0; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } #body-login .groupmiddle input, .groupmiddle input { margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; border-radius: 0; box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important; } #body-login .groupbottom input, .groupbottom input { margin-top: 0; border-top: 0; border-top-right-radius: 0; border-top-left-radius: 0; box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important; } /* keep the labels for screen readers but hide them since we use placeholders */ label.infield { display: none; } #body-login form input[type="checkbox"]+label { position: relative; margin: 0; padding: 14px; padding-left: 28px; margin-left: -28px; vertical-align: middle; } #body-login form .errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 2em; padding:1em; } #body-login .success { background:#d7fed7; border:1px solid #0f0; width: 35%; margin: 30px auto; padding:1em; text-align: center;} #body-login #remember_login:hover+label, #body-login #remember_login:focus+label { color: #fff !important; } #body-login #showAdvanced > img { padding: 4px; box-sizing: border-box; } #body-login p.info a, #body-login #showAdvanced { color: #ccc; } #body-login p.info a:hover, #body-login p.info a:focus { color: #fff; } #body-login footer .info { white-space: nowrap; } /* Show password toggle */ #show, #dbpassword { position: absolute; right: 1em; top: .8em; float: right; } #show, #dbpassword, #personal-show { display: none; } #show + label, #dbpassword + label { right: 21px; top: 15px !important; margin: -14px !important; padding: 14px !important; } #show:checked + label, #dbpassword:checked + label, #personal-show:checked + label { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80); opacity: .8; } #show + label, #dbpassword + label, #personal-show + label { position: absolute !important; height: 20px; width: 24px; background-image: url("../img/actions/toggle.png"); background-repeat: no-repeat; background-position: center; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; filter: alpha(opacity=30); opacity: .3; } #pass2, input[name="personal-password-clone"] { padding: .6em 2.5em .4em .4em; width: 8em; } #personal-show + label { height: 14px; margin-top: 14px; margin-left: -36px; } #passwordbutton { margin-left: .5em; } /* Database selector */ #body-login form #selectDbType { text-align:center; white-space: nowrap; } #body-login form #selectDbType label { position:static; margin:0 -3px 5px; padding:.4em; font-size:12px; background:#f8f8f8; color:#888; cursor:pointer; border: 1px solid #ddd; } #body-login form #selectDbType label.ui-state-hover, #body-login form #selectDbType label.ui-state-active { color:#000; background-color:#e8e8e8; } /* Warnings and errors are the same */ #body-login .warning, #body-login .update, #body-login .error { display: block; padding: 10px; background-color: rgba(0,0,0,.3); color: #fff; text-align: left; border-radius: 3px; cursor: default; } #body-login .update { width: inherit; text-align: center; color: #ccc; } #body-login .v-align { width: inherit; } #body-login .update img.float-spinner { float: left; } #body-user .warning, #body-settings .warning { margin-top: 8px; padding: 5px; background: #fdd; border-radius: 3px; } .warning legend, .warning a, .error a { color: #fff !important; font-weight: bold !important; } .error pre { white-space: pre-wrap; text-align: left; } .error-wide { width: 700px; margin-left: -200px !important; } .error-wide .button { color: black !important; } .warning-input { border-color: #cc3333 !important; } /* Fixes for log in page, TODO should be removed some time */ #body-login .update, #body-login .error { margin: 35px auto; } #body-login .warning { margin: 0 7px 5px; } #body-login .warning legend { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter: alpha(opacity=100); opacity: 1; } #body-login a.warning { cursor: pointer; } /* fixes for update page TODO should be fixed some time in a proper way */ /* this is just for an error while updating the ownCloud instance */ #body-login .updateProgress .error { margin-top: 10px; margin-bottom: 10px; } /* Alternative Logins */ #alternative-logins legend { margin-bottom:10px; } #alternative-logins li { height:40px; display:inline-block; white-space:nowrap; } /* Log in and install button */ #body-login input { font-size: 20px; margin: 5px; padding: 11px 10px 9px; } #body-login input[type="text"], #body-login input[type="password"] { width: 249px; } #body-login input.login { width: auto; float: right; } #body-login input[type="submit"] { padding: 10px 20px; /* larger log in and installation buttons */ } #remember_login { margin: 24px 5px 0 16px !important; vertical-align: text-bottom; } /* Sticky footer */ #body-login .wrapper { min-height: 100%; margin: 0 auto -70px; width: 300px; } #body-login footer, #body-login .push { height: 70px; } /* VARIOUS REUSABLE SELECTORS */ .hidden { display: none; } .hidden-visually { position: absolute; left:-10000px; top: auto; width: 1px; height: 1px; overflow: hidden; } .bold { font-weight:bold; } .center { text-align:center; } .inlineblock { display: inline-block; } #notification-container { position: absolute; top: 0; width: 100%; text-align: center; } #notification, #update-notification { margin: 0 auto; max-width: 60%; z-index: 8000; background-color: #fc4; border: 0; padding: 1px 8px; display: none; position: relative; top: 0; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; filter:alpha(opacity=90); opacity: .9; } #notification span, #update-notification span { cursor: pointer; margin-left: 1em; } tr .action:not(.permanent), .selectedActions a { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); opacity: 0; } tr:hover .action, tr:focus .action, tr .action.permanent, .selectedActions a { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); opacity: .5; } tr .action { width: 16px; height: 16px; } .header-action { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80); opacity: .8; } tr:hover .action:hover, tr:focus .action:focus, .selectedActions a:hover, .selectedActions a:focus, .header-action:hover, .header-action:focus { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter: alpha(opacity=100); opacity: 1; } tbody tr:hover, tbody tr:focus, tbody tr:active { background-color: #f8f8f8; } code { font-family:"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace; } #quota { position: relative; padding: 0; } #quota div { padding: 0; background-color: rgb(220,220,220); font-weight: normal; white-space: nowrap; border-bottom-left-radius: 3px; border-top-left-radius: 3px; min-width: 1%; max-width: 100%; } #quotatext {padding:.6em 1em;} #quota div.quota-warning { background-color: #fc4; } .pager { list-style:none; float:right; display:inline; margin:.7em 13em 0 0; } .pager li { display:inline-block; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { overflow:hidden; text-overflow:ellipsis; } .separator { display:inline; border-left:1px solid #d3d3d3; border-right:1px solid #fff; height:10px; width:0px; margin:4px; } a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;padding-top:0px;padding-bottom:2px; text-decoration:none; margin-top:5px } .exception{color:#000;} .exception textarea{width:95%;height:200px;background:#ffe;border:0;} .ui-icon-circle-triangle-e{ background-image:url('../img/actions/play-next.svg'); } .ui-icon-circle-triangle-w{ background-image:url('../img/actions/play-previous.svg'); } .ui-datepicker-prev,.ui-datepicker-next{ border:1px solid #ddd; background:#fff; } /* ---- DIALOGS ---- */ #oc-dialog-filepicker-content .dirtree {width:92%; overflow:hidden; } #oc-dialog-filepicker-content .dirtree .home { background-image:url('../img/places/home.svg'); background-repeat:no-repeat; background-position: left center; width: 26px; display: inline-block; } #oc-dialog-filepicker-content .dirtree span:not(:last-child) { cursor: pointer; } #oc-dialog-filepicker-content .dirtree span:last-child { font-weight: bold; } #oc-dialog-filepicker-content .dirtree span:not(:last-child)::after { content: '>'; padding: 3px;} #oc-dialog-filepicker-content .filelist { overflow-y:auto; max-height: 300px; background-color:white; width:100%; } #oc-dialog-filepicker-content .filelist li { position: relative; } #oc-dialog-filepicker-content .filelist .filename { position: absolute; top: 8px; max-width: 60%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } #oc-dialog-filepicker-content .filelist img { margin: 2px 1em 0 4px; } #oc-dialog-filepicker-content .filelist .date { float: right; margin-right: 10px; margin-top: 0; padding-top: 9px; } #oc-dialog-filepicker-content .filepicker_element_selected { background-color:lightblue;} .ui-dialog {position:fixed !important;} span.ui-icon {float: left; margin: 3px 7px 30px 0;} .loading { background: url('../img/loading.gif') no-repeat center; cursor: wait; } .loading-small { background: url('../img/loading-small.gif') no-repeat center; cursor: wait; } .move2trash { /* decrease spinner size */ width: 16px; height: 16px; } /* ---- TOOLTIPS ---- */ .extra-data { padding-right: 5px !important; } .tipsy-inner { max-width: 400px !important; overflow: hidden; text-overflow: ellipsis; } /* ---- TAGS ---- */ #tagsdialog .content { width: 100%; height: 280px; } #tagsdialog .scrollarea { overflow:auto; border:1px solid #ddd; width: 100%; height: 240px; } #tagsdialog .bottombuttons { width: 100%; height: 30px; } #tagsdialog .bottombuttons * { float:left;} #tagsdialog .taglist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; } #tagsdialog .taglist li:hover, #tagsdialog .taglist li:active { background:#eee; } #tagsdialog .addinput { width: 90%; clear: both; } /* ---- APP SETTINGS - LEGACY, DO NOT USE THE POPUP! ---- */ .popup { background-color: #fff; border-radius: 3px; box-shadow: 0 0 10px #aaa; color: #333; padding: 10px; position: fixed !important; z-index: 100; } .popup.topright { top:7em; right:1em; } .popup.bottomleft { bottom:1em; left:33em; } .popup .close { position:absolute; top:0.2em; right:0.2em; height:20px; width:20px; background:url('../img/actions/close.svg') no-repeat center; } .popup h2 { font-size:20px; } .arrow { border-bottom:10px solid white; border-left:10px solid transparent; border-right:10px solid transparent; display:block; height:0; position:absolute; width:0; z-index:201; } .arrow.left { left:-13px; bottom:1.2em; -webkit-transform:rotate(270deg); -moz-transform:rotate(270deg); -o-transform:rotate(270deg); -ms-transform:rotate(270deg); transform:rotate(270deg); } .arrow.up { top:-8px; right:6px; } .arrow.down { -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -o-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); } /* ---- BREADCRUMB ---- */ div.crumb { float: left; display: block; background: url('../img/breadcrumb.svg') no-repeat right center; height: 44px; background-size: auto 24px; } div.crumb.hidden { display: none; } div.crumb a, div.crumb span { position: relative; top: 12px; padding: 14px 24px 14px 17px; color: #555; } div.crumb:first-child a { position: relative; top: 13px; } div.crumb.last { font-weight: bold; margin-right: 10px; } div.crumb a.ellipsislink { padding: 0 !important; position: relative; top: 8px !important; } /* some feedback for hover/tap on breadcrumbs */ div.crumb:hover, div.crumb:focus, div.crumb:active { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity:.7; } .appear { opacity: 1; transition: opacity 500ms ease 0s; -moz-transition: opacity 500ms ease 0s; -ms-transition: opacity 500ms ease 0s; -o-transition: opacity 500ms ease 0s; -webkit-transition: opacity 500ms ease 0s; } .appear.transparent { opacity: 0; } /* public footer */ #body-public footer { margin-top: 65px; text-align: center; } #body-public footer .info { color: #777; text-align: center; margin: 0 auto; padding: 20px 0; } #body-public footer .info a { color: #777; font-weight: bold; padding: 13px; margin: -13px; } /* LEGACY FIX only - do not use fieldsets for settings */ fieldset.warning legend, fieldset.update legend { top: 18px; position: relative; } fieldset.warning legend + p, fieldset.update legend + p { margin-top: 12px; } /* for IE10 */ @-ms-viewport { width: device-width; }