diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index 93d6bc9bd..0e7db962c 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -42,13 +42,15 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
echo ''."\n";
echo ''."\n";
echo ''."\n";
+ echo ''."\n";
if($this->extraheader)
echo $this->extraheader;
- echo ''."\n";
+ echo ''."\n";
echo ''."\n";
- echo ''."\n";
- echo ''."\n";
- echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
+ echo ''."\n";
echo ''."\n";
if($this->params['session'] && $this->params['session']->getSu()) {
@@ -703,22 +705,13 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
} /* }}} */
function printDocumentChooser($formName) { /* {{{ */
-?>
-
- ";
print "
+
+
/* Set up a callback which is called when a folder in the tree is selected */
modalFolderChooser= $formName ?> = $('#folderChooser= $formName ?>');
-function folderSelectedCallback= $formName ?>(id, name) {
+function folderSelected(id, name) {
+ $('#targetid= $formName ?>').val(id);
+ $('#choosefoldersearch').val(name);
modalFolderChooser= $formName ?>.modal('hide');
}
@@ -1031,43 +1034,98 @@ function folderSelectedCallback= $formName ?>(id, name) {
if ($folderID == $this->params['rootfolderid']) print "\n";
} /* }}} */
- function printTreeNavigation($folderid, $showtree){ /* {{{ */
-?>
-
-params['dms']->getFolder($folderid);
+ $path = $folder->getPath();
+ $folder = array_shift($path);
+ $node = array('label'=>$folder->getName(), 'id'=>$folder->getID(), 'load_on_demand'=>true, 'is_folder'=>true);
+ if(!$folder->hasSubFolders()) {
+ $node['load_on_demand'] = false;
+ $node['children'] = array();
+ } else {
+ $node['children'] = jqtree($path, $folder, $this->params['user'], $showdocs);
+ }
+ $tree[] = $node;
+
+ } else {
+ $root = $this->params['dms']->getFolder($this->params['rootfolderid']);
+ $tree = array(array('label'=>$root->getName(), 'id'=>$root->getID(), 'load_on_demand'=>true, 'is_folder'=>true));
+ }
+
+ echo "
\n";
+?>
+
+contentHeading("
", true);
$this->contentContainerStart();
- $this->printFoldersTree(M_READ, -1, $this->params['rootfolderid'], $folderid, true);
+?>
+
+printNewTreeNavigation($folderid, $showtree, 0);
$this->contentContainerEnd();
-
- }else{
-
+ } else {
$this->contentHeading("
", true);
}
-
} /* }}} */
function printClipboard($clipboard){ /* {{{ */
diff --git a/views/bootstrap/class.DocumentChooser.php b/views/bootstrap/class.DocumentChooser.php
index 0ec1472e1..24f886094 100644
--- a/views/bootstrap/class.DocumentChooser.php
+++ b/views/bootstrap/class.DocumentChooser.php
@@ -47,16 +47,15 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
print "
\n";
}
print " - \n";
- print "
printImgPath("minus.png");
- else if (count($subFolders) + count($documents) > 0) $this->printImgPath("minus.png");
+ print " 0) echo "icon-minus-sign";
else $this->printImgPath("blank.png");
- print "\" border=0>\n";
+ print "\">\n";
if ($folder->getAccessMode($this->user) >= M_READ) {
- print "
getImgPath("folder_opened.gif")."\" border=0>".htmlspecialchars($folder->getName())."\n";
- }
- else
- print "
getImgPath("folder_opened.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n";
+ print " ".htmlspecialchars($folder->getName())."\n";
+ } else
+ print " ".htmlspecialchars($folder->getName())."\n";
print " \n";
print "";
@@ -70,17 +69,17 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
$documents_ = SeedDMS_Core_DMS::filterAccess($subFolders[$i]->getDocuments(), $this->user, M_READ);
if (count($subFolders_) + count($documents_) > 0)
- print "form."&folderid=".$subFolders[$i]->getID()."\">
getImgPath("plus.png")."\" border=0>";
+ print "form."&folderid=".$subFolders[$i]->getID()."\"> ";
else
- print "
getImgPath("blank.png")."\">";
- print "
getImgPath("folder_closed.gif")."\" border=0>".htmlspecialchars($subFolders[$i]->getName())."\n";
+ print " ";
+ print " ".htmlspecialchars($subFolders[$i]->getName())."\n";
print "";
}
}
for ($i = 0; $i < count($documents); $i++) {
print "- \n";
- print "
";
- print "getID().",'".str_replace("'", "\\'", htmlspecialchars($documents[$i]->getName()))."');\">
".htmlspecialchars($documents[$i]->getName())."";
+ print " ";
+ print " getID().",'".str_replace("'", "\\'", htmlspecialchars($documents[$i]->getName()))."');\">".htmlspecialchars($documents[$i]->getName())."";
print " ";
}
@@ -98,36 +97,11 @@ class SeedDMS_View_DocumentChooser extends SeedDMS_Bootstrap_Style {
$this->form = $this->params['form'];
$this->htmlStartPage(getMLText("choose_target_document"));
-// $this->globalBanner();
-// $this->pageNavigation(getMLText("choose_target_document"));
-?>
-
-
-
-contentContainerStart();
+ $this->printNewTreeNavigation($folderid, $showtree, 1);
$this->printTree($folder->getPath());
$this->contentContainerEnd();
-?>
-
-
-
-\n