From 479ee94fd826059fed98fab8e6bde41ca7aaa810 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 20:08:32 +0100 Subject: [PATCH] take out command 'view', is now covered by view classes --- op/op.Ajax.php | 35 --------------------------------- styles/bootstrap/application.js | 27 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index d25efbb3f..9518c7f7f 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -489,41 +489,6 @@ switch($command) { } break; /* }}} */ - case 'view': /* {{{ */ - require_once("SeedDMS/Preview.php"); - $view = UI::factory($theme, '', array('dms'=>$dms, 'user'=>$user)); - if($view) { - $view->setParam('refferer', ''); - $view->setParam('cachedir', $settings->_cacheDir); - } - $content = ''; - $viewname = $_REQUEST["view"]; - switch($viewname) { - case 'menuclipboard': - $content = $view->menuClipboard($session->getClipboard()); - break; - case 'mainclipboard': - $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $settings->_previewWidthList); - $content = $view->mainClipboard($session->getClipboard(), $previewer); - break; - case 'documentlistrow': - $document = $dms->getDocument($_REQUEST['id']); - if($document) { - if ($document->getAccessMode($user) >= M_READ) { - $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $settings->_previewWidthList); - $view->setParam('previewWidthList', $settings->_previewWidthList); - $view->setParam('showtree', showtree()); - $content = $view->documentListRow($document, $previewer, true); - } - } - break; - default: - $content = ''; - } - echo $content; - - break; /* }}} */ - case 'uploaddocument': /* {{{ */ if($user) { if(checkFormKey('adddocument')) { diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 731782192..269b72217 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -165,8 +165,10 @@ $(document).ready( function() { { command: 'addtoclipboard', type: type, id: id }, function(data) { if(data.success) { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') noty({ text: attr_msg, type: 'success', @@ -200,8 +202,10 @@ $(document).ready( function() { { command: 'removefromclipboard', type: type, id: id }, function(data) { if(data.success) { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') noty({ text: attr_msg, type: 'success', @@ -234,7 +238,8 @@ $(document).ready( function() { { command: 'tooglelockdocument', id: id }, function(data) { if(data.success) { - $("#table-row-document-"+id).html('Loading').load('../op/op.Ajax.php?command=view&view=documentlistrow&id='+id) + //$("#table-row-document-"+id).html('Loading').load('../op/op.Ajax.php?command=view&view=documentlistrow&id='+id) + $("#table-row-document-"+id).html('Loading').load('../out/out.ViewDocument.php?action=documentlistitem&documentid='+id) noty({ text: attr_msg, type: 'success', @@ -450,8 +455,10 @@ $(document).ready( function() { success: function(data){ if(data.success) { if(element.data('param1') == 'command=clearclipboard') { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') } noty({ text: data.message, @@ -493,8 +500,10 @@ function onAddClipboard(ev) { /* {{{ */ { command: 'addtoclipboard', type: source_type, id: source_id }, function(data) { if(data.success) { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') noty({ text: data.message, type: 'success',