add code for bootbox, make drag&drop work

This commit is contained in:
Uwe Steinmann 2019-07-12 16:42:29 +02:00
parent a115cb30f2
commit 9579c0480b
2 changed files with 26 additions and 7 deletions

View File

@ -36,6 +36,13 @@ require_once("SeedDMS/Preview.php");
*/
class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
header('Content-Type: application/javascript; charset=UTF-8');
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
$this->printDeleteDocumentButtonJs();
} /* }}} */
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
@ -46,6 +53,8 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
$this->htmlStartPage(getMLText("approval_summary"));
$this->globalNavigation();
$this->contentStart();
@ -84,10 +93,10 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
}
$class = $st['status'] == 1 ? ' success' : ($st['status'] == -1 ? ' error' : ( $st['status'] == -2 ? ' info' : ''));
print "<tr id=\"table-row-document-".$st['documentID']."\" class=\"table-row-document".$class."\" rel=\"document_".$st['documentID']."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
echo $this->documentListRowStart($document, $class);
echo $this->documentListRow($document, $previewer, true, $st['version']);
print "<td><small>".getApprovalStatusText($st['status'])."<br />".$st["date"]."<br />". htmlspecialchars($moduser->getFullName()) ."</small></td>";
print "</tr>\n";
echo $this->documentListRowEnd($document);
}
if ($st["status"]!=-2) {
$iRev[] = $st["documentID"];
@ -126,10 +135,10 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style {
}
$class = $st['status'] == 1 ? ' success' : ($st['status'] == -1 ? ' error' : ( $st['status'] == -2 ? ' info' : ''));
print "<tr id=\"table-row-document-".$st['documentID']."\" class=\"table-row-document".$class."\" rel=\"document_".$st['documentID']."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
echo $this->documentListRowStart($document, $class);
echo $this->documentListRow($document, $previewer, true, $st['version']);
print "<td><small>".getApprovalStatusText($st["status"])."<br />".$st["date"]."<br />". htmlspecialchars($moduser->getFullName()) ."</small></td>";
print "</tr>\n";
echo $this->documentListRowEnd($document);
}
}
if (!$printheader) {

View File

@ -36,6 +36,13 @@ require_once("SeedDMS/Preview.php");
*/
class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */
header('Content-Type: application/javascript; charset=UTF-8');
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
$this->printDeleteDocumentButtonJs();
} /* }}} */
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
@ -46,6 +53,8 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
$this->htmlStartPage(getMLText("my_documents"));
$this->globalNavigation();
$this->contentStart();
@ -87,10 +96,10 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
}
$class = $st['status'] == 1 ? ' success' : ($st['status'] == -1 ? ' error' : ( $st['status'] == -2 ? ' info' : ''));
print "<tr id=\"table-row-document-".$st['documentID']."\" class=\"table-row-document".$class."\" rel=\"document_".$st['documentID']."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
echo $this->documentListRowStart($document, $class);
echo $this->documentListRow($document, $previewer, true, $st['version']);
print "<td><small>".getReviewStatusText($st['status'])."<br />".$st["date"]."<br />". htmlspecialchars($moduser->getFullName()) ."</small></td>";
print "</tr>\n";
echo $this->documentListRowEnd($document);
}
if ($st["status"]!=-2) {
$iRev[] = $st["documentID"];
@ -130,7 +139,8 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style {
}
$class = $st['status'] == 1 ? ' success' : ($st['status'] == -1 ? ' error' : ( $st['status'] == -2 ? ' info' : ''));
print "<tr id=\"table-row-document-".$st['documentID']."\" class=\"table-row-document".$class."\" rel=\"document_".$st['documentID']."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
// print "<tr id=\"table-row-document-".$st['documentID']."\" class=\"table-row-document".$class."\" rel=\"document_".$st['documentID']."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
echo $this->documentListRowStart($document, $class);
echo $this->documentListRow($document, $previewer, true, $st['version']);
print "<td><small>".getReviewStatusText($st['status'])."<br />".$st["date"]."<br />". htmlspecialchars($moduser->getFullName()) ."</small></td>";
print "</tr>\n";