mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-23 01:51:25 +00:00
showing the clipboard will filter out those objects which are no longer available
This commit is contained in:
parent
a85a620d80
commit
3301dbeda5
|
@ -1237,12 +1237,10 @@ $(function() {
|
||||||
function mainClipboard($clipboard){ /* {{{ */
|
function mainClipboard($clipboard){ /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$content = '';
|
$content = '';
|
||||||
if(!$clipboard['docs'] && !$clipboard['folders']) {
|
$foldercount = $doccount = 0;
|
||||||
$content .= "<div class=\"alert\">".getMLText("drag_icon_here")."</div>";
|
|
||||||
} else {
|
|
||||||
$content .= "<table class=\"table\">";
|
|
||||||
if($clipboard['folders']) {
|
if($clipboard['folders']) {
|
||||||
foreach($clipboard['folders'] as $folderid) {
|
foreach($clipboard['folders'] as $folderid) {
|
||||||
|
/* FIXME: check for access rights, which could have changed after adding the folder to the clipboard */
|
||||||
if($folder = $dms->getFolder($folderid)) {
|
if($folder = $dms->getFolder($folderid)) {
|
||||||
$comment = $folder->getComment();
|
$comment = $folder->getComment();
|
||||||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||||
|
@ -1257,12 +1255,14 @@ $(function() {
|
||||||
$content .= "<div class=\"list-action\"><a class=\"removefromclipboard\" rel=\"F".$folderid."\" msg=\"".getMLText('splash_removed_from_clipboard')."\" _href=\"../op/op.RemoveFromClipboard.php?folderid=".(isset($this->params['folder']) ? $this->params['folder']->getID() : '')."&id=".$folderid."&type=folder\" title=\"".getMLText('rm_from_clipboard')."\"><i class=\"icon-remove\"></i></a></div>";
|
$content .= "<div class=\"list-action\"><a class=\"removefromclipboard\" rel=\"F".$folderid."\" msg=\"".getMLText('splash_removed_from_clipboard')."\" _href=\"../op/op.RemoveFromClipboard.php?folderid=".(isset($this->params['folder']) ? $this->params['folder']->getID() : '')."&id=".$folderid."&type=folder\" title=\"".getMLText('rm_from_clipboard')."\"><i class=\"icon-remove\"></i></a></div>";
|
||||||
$content .= "</td>\n";
|
$content .= "</td>\n";
|
||||||
$content .= "</tr>\n";
|
$content .= "</tr>\n";
|
||||||
|
$foldercount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$previewer = new SeedDMS_Preview_Previewer($this->params['cachedir'], 40);
|
$previewer = new SeedDMS_Preview_Previewer($this->params['cachedir'], 40);
|
||||||
if($clipboard['docs']) {
|
if($clipboard['docs']) {
|
||||||
foreach($clipboard['docs'] as $docid) {
|
foreach($clipboard['docs'] as $docid) {
|
||||||
|
/* FIXME: check for access rights, which could have changed after adding the document to the clipboard */
|
||||||
if($document = $dms->getDocument($docid)) {
|
if($document = $dms->getDocument($docid)) {
|
||||||
$comment = $document->getComment();
|
$comment = $document->getComment();
|
||||||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||||
|
@ -1293,12 +1293,21 @@ $(function() {
|
||||||
$content .= "<div class=\"list-action\"><a class=\"removefromclipboard\" rel=\"D".$docid."\" msg=\"".getMLText('splash_removed_from_clipboard')."\" _href=\"../op/op.RemoveFromClipboard.php?folderid=".(isset($this->params['folder']) ? $this->params['folder']->getID() : '')."&id=".$docid."&type=document\" title=\"".getMLText('rm_from_clipboard')."\"><i class=\"icon-remove\"></i></a></div>";
|
$content .= "<div class=\"list-action\"><a class=\"removefromclipboard\" rel=\"D".$docid."\" msg=\"".getMLText('splash_removed_from_clipboard')."\" _href=\"../op/op.RemoveFromClipboard.php?folderid=".(isset($this->params['folder']) ? $this->params['folder']->getID() : '')."&id=".$docid."&type=document\" title=\"".getMLText('rm_from_clipboard')."\"><i class=\"icon-remove\"></i></a></div>";
|
||||||
$content .= "</td>\n";
|
$content .= "</td>\n";
|
||||||
$content .= "</tr>";
|
$content .= "</tr>";
|
||||||
|
$doccount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* $foldercount or $doccount will only count objects which are
|
||||||
|
* actually available
|
||||||
|
*/
|
||||||
|
if($foldercount || $doccount) {
|
||||||
|
$content = "<table class=\"table\">".$content;
|
||||||
$content .= "</table>";
|
$content .= "</table>";
|
||||||
|
} else {
|
||||||
}
|
}
|
||||||
|
$content .= "<div class=\"alert\">".getMLText("drag_icon_here")."</div>";
|
||||||
return $content;
|
return $content;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -1309,7 +1318,7 @@ $(function() {
|
||||||
*/
|
*/
|
||||||
function printClipboard($clipboard){ /* {{{ */
|
function printClipboard($clipboard){ /* {{{ */
|
||||||
$this->contentHeading(getMLText("clipboard"), true);
|
$this->contentHeading(getMLText("clipboard"), true);
|
||||||
echo "<div id=\"main-clipboard\" class=\"well\" ondragover=\"allowDrop(event)\" ondrop=\"onAddClipboard(event)\">\n";
|
echo "<div id=\"main-clipboard\" _class=\"well\" ondragover=\"allowDrop(event)\" ondrop=\"onAddClipboard(event)\">\n";
|
||||||
echo $this->mainClipboard($clipboard);
|
echo $this->mainClipboard($clipboard);
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user