mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
take out command 'view', is now covered by view classes
This commit is contained in:
parent
ae33edbcdc
commit
479ee94fd8
|
@ -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')) {
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user