mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 17:05:46 +00:00
new onepage mode can be turned off
This commit is contained in:
parent
39217037b8
commit
49f29d007b
|
@ -100,15 +100,19 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
$enableDropUpload = $this->params['enableDropUpload'];
|
||||
$maxItemsPerPage = $this->params['maxItemsPerPage'];
|
||||
$showtree = $this->params['showtree'];
|
||||
$onepage = $this->params['onepage'];
|
||||
|
||||
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'));
|
||||
?>
|
||||
seeddms_folder = <?= $folder->getID() ?>;
|
||||
function folderSelected(id, name) {
|
||||
// window.location = '../out/out.ViewFolder.php?folderid=' + id;
|
||||
<?php if(!$onepage) { ?>
|
||||
window.location = '../out/out.ViewFolder.php?folderid=' + id;
|
||||
<?php } else { ?>
|
||||
seeddms_folder = id;
|
||||
$('div.ajax').trigger('update', {folderid: id, orderby: '<?= $orderby ?>'});
|
||||
<?php } ?>
|
||||
}
|
||||
<?php if($maxItemsPerPage) { ?>
|
||||
function loadMoreObjects(element, limit) {
|
||||
|
@ -147,7 +151,9 @@ $('#loadmore').click(function(e) {
|
|||
});
|
||||
|
||||
<?php } ?>
|
||||
/*
|
||||
<?php
|
||||
if($onepage) {
|
||||
?>
|
||||
$('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
||||
attr_id = $(ev.currentTarget).attr('id').split('-')[3];
|
||||
folderSelected(attr_id, '');
|
||||
|
@ -155,7 +161,13 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
|||
scrollTop: 200
|
||||
}, 200);
|
||||
});
|
||||
*/
|
||||
$('body').on('click', '.order-btn', function(ev) {
|
||||
ev.preventDefault();
|
||||
var element = $(this);
|
||||
var orderby = element.data('orderby');
|
||||
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder, orderby: orderby});
|
||||
});
|
||||
<?php } ?>
|
||||
<?php
|
||||
if($showtree == 1)
|
||||
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, '', ($expandFolderTree == 1) ? -1 : 3, $orderby);
|
||||
|
@ -268,6 +280,7 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
|||
$previewconverters = $this->params['previewConverters'];
|
||||
$timeout = $this->params['timeout'];
|
||||
$xsendfile = $this->params['xsendfile'];
|
||||
$onepage = $this->params['onepage'];
|
||||
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
||||
$previewer->setConverters($previewconverters);
|
||||
|
@ -286,7 +299,7 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
|||
if($documents === null)
|
||||
$documents = $folder->getDocuments($orderby[0], $orderdir);
|
||||
$documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ);
|
||||
$parent = null; //$folder->getParent();
|
||||
$parent = $onepage ? $folder->getParent() : null;
|
||||
|
||||
$txt = $this->callHook('folderListPreContent', $folder, $subFolders, $documents);
|
||||
if(is_string($txt))
|
||||
|
@ -301,9 +314,9 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
|||
print "<thead>\n<tr>\n";
|
||||
print "<th>".($parent ? '<button class="btn btn-mini btn-default" id="table-row-folder-'.$parent->getID().'"><i class="icon-arrow-up"></i></button>' : '')."</th>\n";
|
||||
print "<th>".getMLText("name");
|
||||
print " <a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"||$orderby=="na"?"&orderby=nd":"&orderby=n")."\" title=\"".getMLText("sort_by_name")."\">".($orderby=="n"||$orderby=="na"?' <i class="icon-sort-by-alphabet selected"></i>':($orderby=="nd"?' <i class="icon-sort-by-alphabet-alt selected"></i>':' <i class="icon-sort-by-alphabet"></i>'))."</a>";
|
||||
print " <a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="s"||$orderby=="sa"?"&orderby=sd":"&orderby=s")."\" title=\"".getMLText("sort_by_sequence")."\">".($orderby=="s"||$orderby=="sa"?' <i class="icon-sort-by-order selected"></i>':($orderby=="sd"?' <i class="icon-sort-by-order-alt selected"></i>':' <i class="icon-sort-by-order"></i>'))."</a>";
|
||||
print " <a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="d"||$orderby=="da"?"&orderby=dd":"&orderby=d")."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="icon-sort-by-attributes selected"></i>':($orderby=="dd"?' <i class="icon-sort-by-attributes-alt selected"></i>':' <i class="icon-sort-by-attributes"></i>'))."</a>";
|
||||
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"||$orderby=="na"?"&orderby=nd":"&orderby=n")."\" data-orderby=\"".($orderby=="n"||$orderby=="na"?"nd":"n")."\"title=\"".getMLText("sort_by_name")."\">".($orderby=="n"||$orderby=="na"?' <i class="icon-sort-by-alphabet selected"></i>':($orderby=="nd"?' <i class="icon-sort-by-alphabet-alt selected"></i>':' <i class="icon-sort-by-alphabet"></i>'))."</a>";
|
||||
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="s"||$orderby=="sa"?"&orderby=sd":"&orderby=s")."\" data-orderby=\"".($orderby=="s"||$orderby=="sa"?"sd":"s")."\" title=\"".getMLText("sort_by_sequence")."\">".($orderby=="s"||$orderby=="sa"?' <i class="icon-sort-by-order selected"></i>':($orderby=="sd"?' <i class="icon-sort-by-order-alt selected"></i>':' <i class="icon-sort-by-order"></i>'))."</a>";
|
||||
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="d"||$orderby=="da"?"&orderby=dd":"&orderby=d")."\" data-orderby=\"".($orderby=="d"||$orderby=="da"?"dd":"d")."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="icon-sort-by-attributes selected"></i>':($orderby=="dd"?' <i class="icon-sort-by-attributes-alt selected"></i>':' <i class="icon-sort-by-attributes"></i>'))."</a>";
|
||||
print "</th>\n";
|
||||
// print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
|
@ -547,7 +560,7 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
|||
echo "<div class=\"span4\">";
|
||||
// $this->dropUpload();
|
||||
?>
|
||||
<div class="ajax" data-view="ViewFolder" data-action="dropUpload" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
|
||||
<div class="ajax" data-view="ViewFolder" data-action="dropUpload" data-no-spinner="true" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
|
||||
<?php
|
||||
|
||||
echo "</div>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user