1
0
mirror of https://github.com/Mowie/Mowie synced 2024-06-01 16:46:41 +00:00

Moved Files dir to /content/Files

This commit is contained in:
kolaente 2017-01-29 20:32:35 +01:00
parent 47d380d1cc
commit 91b8687e12
5 changed files with 259 additions and 236 deletions

View File

@ -1280,232 +1280,6 @@ header .stream{
background: #2280db;
}
/*Files*/
table#filesList {
min-width: calc(100% + 20px);
display: table;
box-shadow: none;
margin: 5px -10px;
border-left: 0;
border-right: 0;
}
table#filesList td {
padding: 5px 10px;
}
table#filesList a {
color: #212121;
}
table#filesList thead{
border-bottom: 1px solid #E0E0E0;
}
table#filesList thead th{
cursor: pointer;
}
table#filesList thead th:after{
font-family: 'FontAwesome' !important;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\f0dc";
padding-left: 6px;
}
table#filesList thead th.headerSortDown:after{
content: "\f0de";
}
table#filesList thead th.headerSortUp:after{
content: "\f0dd";
}
.upbtninput {
position: fixed;
top: -100px;
}
.overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
z-index: 99;
}
.window {
width: 100%;
max-width: 984px;
left: calc((50vw - 366px));
top: 40px;
background: #fff;
padding: 10px 10px 20px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
z-index: 1;
border-radius: 2px;
position: fixed;
overflow: auto;
max-height: calc(100vh - 80px);
height: auto;
}
.window .head {
margin: -10px -10px 20px;
padding: 10px 10px;
background: #eaeaea;
border-radius: 2px 2px 0 0;
-moz-user-select: -moz-none;
-webkit-user-select: none;
user-select: none;
cursor: default;
position: fixed;
width: 984px;
}
.window .head .closeMsg {
color: #212121;
}
.window .head .closeMsg:hover {
color: #5d5d5d;
}
.window #content {
margin-top: 60px;
}
.window-confirm, .window-confirm .head {
width: 350px;
text-align: center;
left: calc(50vw - 175px);
}
.window-confirm .head {
margin: -10px -10px 10px 0;
text-align: left;
}
.select {
width: 95%;
}
.select:focus {
background: #fff;
border-bottom: 1px solid #4CAF50;
}
.window textarea {
width: calc(100% - 10px);
height: 400px;
font-family: monospace;
max-width: 100%;
resize: none;
}
.window textarea:focus {
background: #fff;
border-bottom: 1px solid #4CAF50;
}
.progbar_btm {
background: #4CAF50;
height: 4px;
margin-top: 2px;
}
/*dropFileArea*/
#dropFileArea{
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
background: rgba(250,250,250,0.6);
}
.dropmsgcontainer{
width: 400px;
text-align: center;
bottom: 20px;
position: fixed;
left: calc(50vw - 215px);
}
.dropmsg{
background: #2196F3;
color: #fff;
font-size: 16px;
padding: 10px;
border-radius: 2px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
}
.dropicon{
font-size: 90px;
text-shadow: 0 2px 2px rgba(0, 0, 0, .14), 0 3px 1px rgba(0, 0, 0, .2), 0 1px 5px rgba(0, 0, 0, .12);
height: 110px;
-moz-animation: bounce 2s infinite;
-webkit-animation: bounce 2s infinite;
animation: bounce 2s infinite;
}
@-webkit-keyframes bounce {
0%, 20%, 50%, 80%, 100% {
padding-bottom:0;
}
40% {
padding-bottom:15px;
}
60% {
padding-bottom:10px;
}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
padding-bottom:0;
}
40% {
padding-bottom:15px;
}
60% {
padding-bottom:10px;
}
}
/*Bild ZooomIN*/
.imgContaienr {
margin: 10px -10px;
overflow: auto;
height: 500px;
}
.imgContaienr img {
margin: 0 auto;
display: block;
cursor: zoom-in;
max-height: 100%;
max-width: 100%;
}
img.zoomedin {
max-height: inherit;
max-width: inherit;
cursor: zoom-out;
}
/*icons*/
.icon_ue {
width: 95px;

225
apps/Files/css/files.css Normal file
View File

@ -0,0 +1,225 @@
/*Files*/
table#filesList {
min-width: calc(100% + 20px);
display: table;
box-shadow: none;
margin: 5px -10px;
border-left: 0;
border-right: 0;
}
table#filesList td {
padding: 5px 10px;
}
table#filesList a {
color: #212121;
}
table#filesList thead{
border-bottom: 1px solid #E0E0E0;
}
table#filesList thead th{
cursor: pointer;
}
table#filesList thead th:after{
font-family: 'FontAwesome' !important;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\f0dc";
padding-left: 6px;
}
table#filesList thead th.headerSortDown:after{
content: "\f0de";
}
table#filesList thead th.headerSortUp:after{
content: "\f0dd";
}
.upbtninput {
position: fixed;
top: -100px;
}
.overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
z-index: 99;
}
.window {
width: 100%;
max-width: 984px;
left: calc((50vw - 366px));
top: 40px;
background: #fff;
padding: 10px 10px 20px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
z-index: 1;
border-radius: 2px;
position: fixed;
overflow: auto;
max-height: calc(100vh - 80px);
height: auto;
}
.window .head {
margin: -10px -10px 20px;
padding: 10px 10px;
background: #eaeaea;
border-radius: 2px 2px 0 0;
-moz-user-select: -moz-none;
-webkit-user-select: none;
user-select: none;
cursor: default;
position: fixed;
width: 984px;
}
.window .head .closeMsg {
color: #212121;
}
.window .head .closeMsg:hover {
color: #5d5d5d;
}
.window #content {
margin-top: 60px;
}
.window-confirm, .window-confirm .head {
width: 350px;
text-align: center;
left: calc(50vw - 175px);
}
.window-confirm .head {
margin: -10px -10px 10px 0;
text-align: left;
}
.select {
width: 95%;
}
.select:focus {
background: #fff;
border-bottom: 1px solid #4CAF50;
}
.window textarea {
width: calc(100% - 10px);
height: 400px;
font-family: monospace;
max-width: 100%;
resize: none;
}
.window textarea:focus {
background: #fff;
border-bottom: 1px solid #4CAF50;
}
.progbar_btm {
background: #4CAF50;
height: 4px;
margin-top: 2px;
}
/*dropFileArea*/
#dropFileArea{
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
background: rgba(250,250,250,0.6);
}
.dropmsgcontainer{
width: 400px;
text-align: center;
bottom: 20px;
position: fixed;
left: calc(50vw - 215px);
}
.dropmsg{
background: #2196F3;
color: #fff;
font-size: 16px;
padding: 10px;
border-radius: 2px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
}
.dropicon{
font-size: 90px;
text-shadow: 0 2px 2px rgba(0, 0, 0, .14), 0 3px 1px rgba(0, 0, 0, .2), 0 1px 5px rgba(0, 0, 0, .12);
height: 110px;
-moz-animation: bounce 2s infinite;
-webkit-animation: bounce 2s infinite;
animation: bounce 2s infinite;
}
@-webkit-keyframes bounce {
0%, 20%, 50%, 80%, 100% {
padding-bottom:0;
}
40% {
padding-bottom:15px;
}
60% {
padding-bottom:10px;
}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
padding-bottom:0;
}
40% {
padding-bottom:15px;
}
60% {
padding-bottom:10px;
}
}
/*Bild ZooomIN*/
.imgContaienr {
margin: 10px -10px;
overflow: auto;
height: 500px;
}
.imgContaienr img {
margin: 0 auto;
display: block;
cursor: zoom-in;
max-height: 100%;
max-width: 100%;
}
img.zoomedin {
max-height: inherit;
max-width: inherit;
cursor: zoom-out;
}

View File

@ -16,7 +16,7 @@ function checkFolder($dir)
$dir = str_replace('../', '', $dir);
$parts = explode('/', $dir);
//print_r($parts);
if ($parts[0] == 'Files')
if ($parts[1] == 'Files')
{
return true;
} else
@ -61,21 +61,36 @@ if (isset($_GET['json']))
header('Location: index.php?json&folder=' . str_replace(end($folders), '', str_replace('/..', '', $get_url)), true, 301);
}
$dir = $get_url;
if (strpos(substr($dir, 0, 6), 'Files/') !== false) $dir = substr($dir, 6);
//echo substr($dir, 0, 14);
//var_dump(strpos(substr($dir, 0, 14), 'content/Files/'));
if (strpos(substr($dir, 0, 14), 'content/Files/') !== false) $dir = substr($dir, 14);
$dir = str_replace('..', '', $dir);
$dir = '../../Files/' . str_replace('../', '', $dir) . '/';
//echo $dir.'|';
$dir = '../../content/Files/' . str_replace('../', '', $dir) . '/';
//echo $dir;
} else
{
$dir = '../../Files/';
$dir = '../../content/Files/';
}
$dir = str_replace('//', '/', $dir);
//If the folder doesn't exist, create it
if($dir == '../../content/Files/')
{
if(!file_exists($dir))
{
if(!mkdir($dir)) echo 'An Error occured while trying to create '.$dir.'. Please make sure the webserver is allowed to write to /content.';
}
}
$files['url'] = $dir;
$files['displayUrl'] = str_replace('../', '', cleanUrl($dir));
//Verzeichnisse
//Wenn man nicht im root-verzeichnis ist, soll .. als ordner angezeigt werden, um auch zurückzukommen
//if($dir != '../../Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '', 'icon' => 'folder'];
if (cleanUrl($dir) != '../../Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '-', 'icon' => 'folder'];
//if($dir != '../../content/Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '', 'icon' => 'folder'];
if (cleanUrl($dir) != '../../content/Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '-', 'icon' => 'folder'];
$handle = opendir($dir) or die (http_response_code(404));
while (false !== ($datei = readdir($handle)))
@ -328,9 +343,9 @@ else
url: webUri + 'apps/Files/index.php?ajax&json&folder=' + folder,
dataType: 'json',
success: function (data) {
msgDo(' ');
if (folder == '') folder = 'Files';
if (data.displayUrl == 'Files/') {
msgDo(' ');
if (folder == '') folder = 'content/Files/';
if (data.displayUrl == 'content/Files/') {
$('#delFolder').hide();
}
else {
@ -341,12 +356,13 @@ else
}
$('#files').html('<h3 id="displayUrl">' + data.displayUrl + '</h3><table id="filesList" width="100%"><thead><tr><th><?php echo $lang->get('files_filename'); ?></th><th><?php echo $lang->get('files_last_modified'); ?></th><th><?php echo $lang->get('files_filetype'); ?></th><th><?php echo $lang->get('files_filesize'); ?></th></tr></thead><tbody id="filesContent"></tbody></table><div id="extra"></div>');
var i = 0;
$.each(data.files, function () {
/*if (this.type == 'Ordner') {
var name = '<a href="#folder=' + data.displayUrl + this.name + '"><i class="fa fa-' + this.icon + '"></i> ' + this.name;
} else// onclick="openFile(\'' + this.name + '\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"*/
if (this.name == '..') {
var name = '<a onclick="openFile(\'..\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"><i class="fa fa-' + this.icon + '"></i> ' + this.name;
var name = '<a onclick="openFile(\'..\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"><i class="fa fa-' + this.icon + '"></i> ' + this.name + ' [<?php echo $lang->get('back')?>]';
} else {
var name = '<a onclick="openFile(\'' + this.name + '\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"><i class="fa fa-' + this.icon + '"></i> ' + this.name;
}
@ -357,7 +373,13 @@ else
}
//$('#filesContent').append('<tr><td>' + name + '</td><td>' + this.date + '</td><td>' + this.type + '</td><td>' + this.size + '</td></tr>');
filesContent += '<tr' + static_folder + '><td>' + name + '</td><td>' + this.date + '</td><td>' + this.type + '</td><td>' + this.size + '</td></tr>';
i++;
});
//If the folder is empty
if(i<2) {
$('#files').append('<div style="text-align: center"><?php echo $lang->get('files_folder_empty'); ?></div>');
}
},
timeout: 5000,
error: function (jqXHR, status, errorThrown) {

View File

@ -45,6 +45,7 @@ $lang['files_too_large_file'] = 'Die ausgewählte Datei ist zu groß!';
$lang['files_processing'] = 'Datei wird verarbeitet...';
$lang['files_upload_finished'] = 'Upload abgeschlossen.';
$lang['files_upload_failed'] = 'Upload fehlgeschlagen.';
$lang['files_folder_empty'] = 'Dieser Ordner ist leer. Lade Dateien hoch, um in zu füllen!';
//Stream Messages
$lang['files_stream_deleted_folder'] = '{user} hat den Ordner "{extra}" gelöscht.';

View File

@ -45,6 +45,7 @@ $lang['files_too_large_file'] = 'This file is too big!';
$lang['files_processing'] = 'Processing file...';
$lang['files_upload_finished'] = 'Upload finished.';
$lang['files_upload_failed'] = 'Upload failed.';
$lang['files_folder_empty'] = 'This Folder is empty. Upload Files to fill it!';
//Stream Messages
$lang['files_stream_deleted_folder'] = '{user} deleted the folder "{extra}".';