From 253075e41822e3f3c3e218a55e5688bf6f86d26b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Dec 2015 09:51:51 +0100 Subject: [PATCH] return just the html to be embedded into a existing page --- views/bootstrap/class.DocumentChooser.php | 13 +++++++----- views/bootstrap/class.FolderChooser.php | 24 ++++++++++++++++++----- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/views/bootstrap/class.DocumentChooser.php b/views/bootstrap/class.DocumentChooser.php index d382e6227..9c704dfe8 100644 --- a/views/bootstrap/class.DocumentChooser.php +++ b/views/bootstrap/class.DocumentChooser.php @@ -34,6 +34,8 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ $folder = $this->params['folder']; $form = $this->params['form']; + + header('Content-Type: application/json'); $this->printNewTreeNavigationJs($folder->getID(), M_READ, 1, $form); } /* }}} */ @@ -43,12 +45,13 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style { $folder = $this->params['folder']; $form = $this->params['form']; - $this->htmlStartPage(getMLText("choose_target_document")); - $this->contentContainerStart(); +// $this->htmlStartPage(getMLText("choose_target_document")); +// $this->contentContainerStart(); +// $this->printNewTreeNavigationHtml($folder->getID(), M_READ, 1, $form); $this->printNewTreeNavigationHtml($folder->getID(), M_READ, 1, $form); - $this->contentContainerEnd(); - $this->htmlEndPage(true); -// echo "\n\n"; + echo ''."\n"; +// $this->contentContainerEnd(); +// $this->htmlEndPage(true); } /* }}} */ } ?> diff --git a/views/bootstrap/class.FolderChooser.php b/views/bootstrap/class.FolderChooser.php index 4d346de45..b7ae3d257 100644 --- a/views/bootstrap/class.FolderChooser.php +++ b/views/bootstrap/class.FolderChooser.php @@ -31,6 +31,15 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_FolderChooser extends SeedDMS_Bootstrap_Style { + function js() { /* {{{ */ + $rootfolderid = $this->params['rootfolderid']; + $form = $this->params['form']; + $mode = $this->params['mode']; + + header('Content-Type: application/json'); + $this->printNewTreeNavigationJs($rootfolderid, $mode, 0, $form); + } /* }}} */ + function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -39,11 +48,16 @@ class SeedDMS_View_FolderChooser extends SeedDMS_Bootstrap_Style { $form = $this->params['form']; $rootfolderid = $this->params['rootfolderid']; - $this->htmlStartPage(getMLText("choose_target_folder")); - $this->contentContainerStart(); - $this->printNewTreeNavigation($rootfolderid, $mode, 0, $form); - $this->contentContainerEnd(); - echo "\n\n"; +// $this->htmlStartPage(getMLText("choose_target_folder")); +// $this->contentContainerStart(); +if(1) { + $this->printNewTreeNavigationHtml($rootfolderid, $mode, 0, $form); + echo ''."\n"; +} else { + $this->printNewTreeNavigation($rootfolderid, $mode, 0, $form); +} +// $this->contentContainerEnd(); +// $this->htmlEndPage(true); } /* }}} */ } ?>