commit
5d653753bd
@ -1 +1 @@ |
||||
Subproject commit 21b466b72cdd4c823c011669593ecef1defb1f3c |
||||
Subproject commit dc87ea630287f27502eba825fbb19fcc33c34c86 |
||||
@ -1,8 +1,8 @@ |
||||
<?php |
||||
$TRANSLATIONS = array( |
||||
"_Uploading %n file_::_Uploading %n files_" => array("",""), |
||||
"_%n folder_::_%n folders_" => array("",""), |
||||
"_%n file_::_%n files_" => array("",""), |
||||
"_Uploading %n file_::_Uploading %n files_" => array("",""), |
||||
"Download" => "Download" |
||||
); |
||||
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; |
||||
|
||||
@ -1,9 +1,9 @@ |
||||
<?php |
||||
$TRANSLATIONS = array( |
||||
"Files" => "ფაილები", |
||||
"_Uploading %n file_::_Uploading %n files_" => array(""), |
||||
"_%n folder_::_%n folders_" => array(""), |
||||
"_%n file_::_%n files_" => array(""), |
||||
"_Uploading %n file_::_Uploading %n files_" => array(""), |
||||
"Download" => "გადმოწერა" |
||||
); |
||||
$PLURAL_FORMS = "nplurals=1; plural=0;"; |
||||
|
||||
@ -1,9 +1,9 @@ |
||||
<?php |
||||
$TRANSLATIONS = array( |
||||
"Error" => "ایرر", |
||||
"_Uploading %n file_::_Uploading %n files_" => array("",""), |
||||
"_%n folder_::_%n folders_" => array("",""), |
||||
"_%n file_::_%n files_" => array("",""), |
||||
"_Uploading %n file_::_Uploading %n files_" => array("",""), |
||||
"Unshare" => "شئیرنگ ختم کریں" |
||||
); |
||||
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; |
||||
|
||||
@ -0,0 +1,85 @@ |
||||
<?php |
||||
/** |
||||
* Copyright (c) 2013 Georg Ehrke georg@ownCloud.com |
||||
* This file is licensed under the Affero General Public License version 3 or |
||||
* later. |
||||
* See the COPYING-README file. |
||||
*/ |
||||
if(!\OC_App::isEnabled('files_sharing')){ |
||||
exit; |
||||
} |
||||
|
||||
$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : ''; |
||||
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36'; |
||||
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36'; |
||||
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true; |
||||
$token = array_key_exists('t', $_GET) ? (string) $_GET['t'] : ''; |
||||
|
||||
if($token === ''){ |
||||
\OC_Response::setStatus(400); //400 Bad Request |
||||
\OC_Log::write('core-preview', 'No token parameter was passed', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
$linkedItem = \OCP\Share::getShareByToken($token); |
||||
if($linkedItem === false || ($linkedItem['item_type'] !== 'file' && $linkedItem['item_type'] !== 'folder')) { |
||||
\OC_Response::setStatus(404); |
||||
\OC_Log::write('core-preview', 'Passed token parameter is not valid', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) { |
||||
\OC_Response::setStatus(500); |
||||
\OC_Log::write('core-preview', 'Passed token seems to be valid, but it does not contain all necessary information . ("' . $token . '")', \OC_Log::WARN); |
||||
exit; |
||||
} |
||||
|
||||
$userId = $linkedItem['uid_owner']; |
||||
\OC_Util::setupFS($userId); |
||||
|
||||
$pathId = $linkedItem['file_source']; |
||||
$path = \OC\Files\Filesystem::getPath($pathId); |
||||
$pathInfo = \OC\Files\Filesystem::getFileInfo($path); |
||||
$sharedFile = null; |
||||
|
||||
if($linkedItem['item_type'] === 'folder') { |
||||
$isvalid = \OC\Files\Filesystem::isValidPath($file); |
||||
if(!$isvalid) { |
||||
\OC_Response::setStatus(400); //400 Bad Request |
||||
\OC_Log::write('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . $_SERVER['REMOTE_ADDR'] . '")', \OC_Log::WARN); |
||||
exit; |
||||
} |
||||
$sharedFile = \OC\Files\Filesystem::normalizePath($file); |
||||
} |
||||
|
||||
if($linkedItem['item_type'] === 'file') { |
||||
$parent = $pathInfo['parent']; |
||||
$path = \OC\Files\Filesystem::getPath($parent); |
||||
$sharedFile = $pathInfo['name']; |
||||
} |
||||
|
||||
$path = \OC\Files\Filesystem::normalizePath($path, false); |
||||
if(substr($path, 0, 1) === '/') { |
||||
$path = substr($path, 1); |
||||
} |
||||
|
||||
if($maxX === 0 || $maxY === 0) { |
||||
\OC_Response::setStatus(400); //400 Bad Request |
||||
\OC_Log::write('core-preview', 'x and/or y set to 0', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
$root = 'files/' . $path; |
||||
|
||||
try{ |
||||
$preview = new \OC\Preview($userId, $root); |
||||
$preview->setFile($sharedFile); |
||||
$preview->setMaxX($maxX); |
||||
$preview->setMaxY($maxY); |
||||
$preview->setScalingUp($scalingUp); |
||||
|
||||
$preview->show(); |
||||
} catch (\Exception $e) { |
||||
\OC_Response::setStatus(500); |
||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); |
||||
} |
||||
@ -0,0 +1,5 @@ |
||||
<?php |
||||
$this->create('core_ajax_public_preview', '/publicpreview.png')->action( |
||||
function() { |
||||
require_once __DIR__ . '/../ajax/publicpreview.php'; |
||||
}); |
||||
@ -0,0 +1,42 @@ |
||||
<?php |
||||
/** |
||||
* Copyright (c) 2013 Georg Ehrke georg@ownCloud.com |
||||
* This file is licensed under the Affero General Public License version 3 or |
||||
* later. |
||||
* See the COPYING-README file. |
||||
*/ |
||||
\OC_Util::checkLoggedIn(); |
||||
|
||||
if(!\OC_App::isEnabled('files_trashbin')){ |
||||
exit; |
||||
} |
||||
|
||||
$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : ''; |
||||
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '44'; |
||||
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '44'; |
||||
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true; |
||||
|
||||
if($file === '') { |
||||
\OC_Response::setStatus(400); //400 Bad Request |
||||
\OC_Log::write('core-preview', 'No file parameter was passed', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
if($maxX === 0 || $maxY === 0) { |
||||
\OC_Response::setStatus(400); //400 Bad Request |
||||
\OC_Log::write('core-preview', 'x and/or y set to 0', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
try{ |
||||
$preview = new \OC\Preview(\OC_User::getUser(), 'files_trashbin/files'); |
||||
$preview->setFile($file); |
||||
$preview->setMaxX($maxX); |
||||
$preview->setMaxY($maxY); |
||||
$preview->setScalingUp($scalingUp); |
||||
|
||||
$preview->showPreview(); |
||||
}catch(\Exception $e) { |
||||
\OC_Response::setStatus(500); |
||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); |
||||
} |
||||
@ -0,0 +1,5 @@ |
||||
<?php |
||||
$this->create('core_ajax_trashbin_preview', '/preview.png')->action( |
||||
function() { |
||||
require_once __DIR__ . '/../ajax/preview.php'; |
||||
}); |
||||
@ -0,0 +1,40 @@ |
||||
<?php |
||||
/** |
||||
* Copyright (c) 2013 Georg Ehrke georg@ownCloud.com |
||||
* This file is licensed under the Affero General Public License version 3 or |
||||
* later. |
||||
* See the COPYING-README file. |
||||
*/ |
||||
\OC_Util::checkLoggedIn(); |
||||
|
||||
$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : ''; |
||||
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36'; |
||||
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36'; |
||||
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true; |
||||
|
||||
if($file === '') { |
||||
//400 Bad Request |
||||
\OC_Response::setStatus(400); |
||||
\OC_Log::write('core-preview', 'No file parameter was passed', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
if($maxX === 0 || $maxY === 0) { |
||||
//400 Bad Request |
||||
\OC_Response::setStatus(400); |
||||
\OC_Log::write('core-preview', 'x and/or y set to 0', \OC_Log::DEBUG); |
||||
exit; |
||||
} |
||||
|
||||
try{ |
||||
$preview = new \OC\Preview(\OC_User::getUser(), 'files'); |
||||
$preview->setFile($file); |
||||
$preview->setMaxX($maxX); |
||||
$preview->setMaxY($maxY); |
||||
$preview->setScalingUp($scalingUp); |
||||
|
||||
$preview->show(); |
||||
}catch(\Exception $e) { |
||||
\OC_Response::setStatus(500); |
||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); |
||||
} |
||||
@ -0,0 +1,236 @@ |
||||
/* ---- APP STYLING ---- */ |
||||
|
||||
#app { |
||||
height: 100%; |
||||
width: 100%; |
||||
} |
||||
#app * { |
||||
-moz-box-sizing: border-box; box-sizing: border-box; |
||||
} |
||||
|
||||
/* Navigation: folder like structure */ |
||||
#app-navigation { |
||||
width: 300px; |
||||
height: 100%; |
||||
float: left; |
||||
-moz-box-sizing: border-box; box-sizing: border-box; |
||||
background-color: #f8f8f8; |
||||
border-right: 1px solid #ccc; |
||||
} |
||||
#app-navigation > ul { |
||||
height: 100%; |
||||
overflow: auto; |
||||
-moz-box-sizing: border-box; box-sizing: border-box; |
||||
} |
||||
#app-navigation li { |
||||
position: relative; |
||||
width: 100%; |
||||
-moz-box-sizing: border-box; box-sizing: border-box; |
||||
text-shadow: 0 1px 0 rgba(255,255,255,.9); |
||||
} |
||||
#app-navigation .active, |
||||
#app-navigation .active a, |
||||
#app-navigation li:hover > a { |
||||
background-color: #ddd; |
||||
text-shadow: 0 1px 0 rgba(255,255,255,.7); |
||||
} |
||||
|
||||
/* special rules for first-level entries and folders */ |
||||
#app-navigation > ul > li { |
||||
background-color: #f8f8f8; |
||||
} |
||||
|
||||
#app-navigation .with-icon a { |
||||
padding-left: 44px; |
||||
background-size: 16px 16px; |
||||
background-position: 14px center; |
||||
background-repeat: no-repeat; |
||||
} |
||||
|
||||
#app-navigation li > a { |
||||
display: block; |
||||
width: 100%; |
||||
height: 44px; |
||||
padding: 12px; |
||||
overflow: hidden; |
||||
-moz-box-sizing: border-box; box-sizing: border-box; |
||||
white-space: nowrap; |
||||
text-overflow: ellipsis; |
||||
color: #333; |
||||
} |
||||
|
||||
#app-navigation .collapse { |
||||
display: none; /* hide collapse button intially */ |
||||
} |
||||
#app-navigation .collapsible > .collapse { |
||||
position: absolute; |
||||
height: 44px; |
||||
width: 44px; |
||||
margin: 0; |
||||
padding: 0; |
||||
background: none; background-image: url('../img/actions/triangle-s.svg'); |
||||
background-size: 16px; background-repeat: no-repeat; background-position: center; |
||||
border: none; |
||||
border-radius: 0; |
||||
outline: none !important; |
||||
box-shadow: none; |
||||
} |
||||
#app-navigation .collapsible:hover > a { |
||||
background-image: none; |
||||
} |
||||
#app-navigation .collapsible:hover > .collapse { |
||||
display: block; |
||||
} |
||||
|
||||
#app-navigation .collapsible .collapse { |
||||
-moz-transform: rotate(-90deg); |
||||
-webkit-transform: rotate(-90deg); |
||||
-ms-transform:rotate(-90deg); |
||||
-o-transform:rotate(-90deg); |
||||
transform: rotate(-90deg); |
||||
} |
||||
#app-navigation .collapsible.open .collapse { |
||||
-moz-transform: rotate(0); |
||||
-webkit-transform: rotate(0); |
||||
-ms-transform:rotate(0); |
||||
-o-transform:rotate(0); |
||||
transform: rotate(0); |
||||
} |
||||
|
||||
/* Second level nesting for lists */ |
||||
#app-navigation > ul ul { |
||||
display: none; |
||||
} |
||||
#app-navigation > ul ul li > a { |
||||
padding-left: 32px; |
||||
} |
||||
#app-navigation > .with-icon ul li > a { |
||||
padding-left: 48px; |
||||
background-position: 24px center; |
||||
} |
||||
|
||||
#app-navigation .open { |
||||
background-image: linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); |
||||
background-image: -o-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); |
||||
background-image: -moz-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); |
||||
background-image: -webkit-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); |
||||
background-image: -ms-linear-gradient(top, rgb(238,238,238) 0%, rgb(245,245,245) 100%); |
||||
} |
||||
|
||||
#app-navigation > ul .open:hover { |
||||
-moz-box-shadow: inset 0 0 3px #ccc; -webkit-box-shadow: inset 0 0 3px #ccc; box-shadow: inset 0 0 3px #ccc; |
||||
} |
||||
|
||||
#app-navigation > ul .open ul { |
||||
display: block; |
||||
} |
||||
|
||||
|
||||
/* counter and actions */ |
||||
#app-navigation .utils { |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
bottom: 0; |
||||
font-size: 12px; |
||||
} |
||||
#app-navigation .utils button, |
||||
#app-navigation .utils .counter { |
||||
width: 44px; |
||||
height: 44px; |
||||
padding-top: 12px; |
||||
} |
||||
|
||||
|
||||
/* drag and drop */ |
||||
#app-navigation .drag-and-drop { |
||||
-moz-transition: padding-bottom 500ms ease 0s; |
||||
-o-transition: padding-bottom 500ms ease 0s; |
||||
-webkit-transition: padding-bottom 500ms ease 0s; |
||||
-ms-transition: padding-bottom 500ms ease 0s; |
||||
transition: padding-bottom 500ms ease 0s; |
||||
padding-bottom: 40px; |
||||
} |
||||
#app-navigation .personalblock > legend { /* TODO @Raydiation: still needed? */ |
||||
padding: 10px 0; margin: 0; |
||||
} |
||||
#app-navigation .error { |
||||
color: #dd1144; |
||||
} |
||||
|
||||
#app-navigation .app-navigation-separator { |
||||
border-bottom: 1px solid #ddd; |
||||
} |
||||
|
||||
|
||||
|
||||
/* Part where the content will be loaded into */ |
||||
#app-content { |
||||
height: 100%; |
||||
overflow-y: auto; |
||||
} |
||||
|
||||
/* settings area */ |
||||
#app-settings { |
||||
position: fixed; |
||||
width: 299px; |
||||
bottom: 0; |
||||
border-top: 1px solid #ccc; |
||||
} |
||||
#app-settings-header { |
||||
background-color: #eee; |
||||
} |
||||
#app-settings-content { |
||||
display: none; |
||||
padding: 10px; |
||||
background-color: #eee; |
||||
} |
||||
#app-settings.open #app-settings-content { |
||||
display: block; |
||||
} |
||||
|
||||
.settings-button { |
||||
display: block; |
||||
height: 32px; |
||||
width: 100%; |
||||
padding: 0; |
||||
margin: 0; |
||||
background-color: transparent; background-image: url('../img/actions/settings.svg'); |
||||
background-position: 10px center; background-repeat: no-repeat; |
||||
box-shadow: none; |
||||
border: 0; |
||||
border-radius: 0; |
||||
} |
||||
.settings-button:hover { |
||||
background-color: #ddd; |
||||
} |
||||
|
||||
/* icons */ |
||||
.folder-icon, .delete-icon, .edit-icon, .progress-icon { |
||||
background-repeat: no-repeat; |
||||
background-position: center; |
||||
} |
||||
.folder-icon { background-image: url('../img/places/folder.svg'); } |
||||
.delete-icon { background-image: url('../img/actions/delete.svg'); } |
||||
.delete-icon:hover, .delete-icon:focus { |
||||
background-image: url('../img/actions/delete-hover.svg'); |
||||
} |
||||
.edit-icon { background-image: url('../img/actions/rename.svg'); } |
||||
.progress-icon { |
||||
background-image: url('../img/loading.gif'); |
||||
background-size: 16px; |
||||
/* force show the loading icon, not only on hover */ |
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; |
||||
filter:alpha(opacity=100); |
||||
opacity: 1 !important; |
||||
display: inline !important; |
||||
} |
||||
|
||||
/* buttons */ |
||||
button.loading { |
||||
background-image: url('../img/loading.gif'); |
||||
background-position: right 10px center; background-repeat: no-repeat; |
||||
background-size: 16px; |
||||
padding-right: 30px; |
||||
} |
||||
|
||||
@ -0,0 +1,46 @@ |
||||
/* ---- BROWSER-SPECIFIC FIXES ---- */ |
||||
|
||||
/* remove dotted outlines in Firefox */ |
||||
::-moz-focus-inner { |
||||
border: 0; |
||||
} |
||||
|
||||
.lte8 .delete-icon { background-image: url('../img/actions/delete.png'); } |
||||
.lte8 .delete-icon:hover, .delete-icon:focus { |
||||
background-image: url('../img/actions/delete-hover.png'); |
||||
} |
||||
|
||||
/* IE8 needs background to be set to same color to make transparency look good. */ |
||||
.lte9 #body-login form input[type="text"] { |
||||
border: 1px solid lightgrey; /* use border to add 1px line between input fields */ |
||||
background-color: white; /* don't change background on hover */ |
||||
} |
||||
.lte9 #body-login form input[type="password"] { |
||||
/* leave out top border for 1px line between input fields*/ |
||||
border-left: 1px solid lightgrey; |
||||
border-right: 1px solid lightgrey; |
||||
border-bottom: 1px solid lightgrey; |
||||
background-color: white; /* don't change background on hover */ |
||||
} |
||||
.lte9 #body-login form label.infield { |
||||
background-color: white; /* don't change background on hover */ |
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Chroma(color='white')"; |
||||
} |
||||
|
||||
/* disable opacity of info text on gradient |
||||
since we cannot set a good backround color to use the filter&background hack as with the input labels */ |
||||
.lte9 #body-login p.info { |
||||
filter: initial; |
||||
} |
||||
|
||||
/* deactivate show password toggle for IE. Does not work for 8 and 9+ have their own implementation. */ |
||||
.ie #show, .ie #show+label { |
||||
display: none; |
||||
visibility: hidden; |
||||
} |
||||
|
||||
/* fix installation screen rendering issue for IE8+9 */ |
||||
.lte9 #body-login { |
||||
height: auto !important; |
||||
} |
||||
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue