mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
70ea4c2314
|
@ -98,7 +98,8 @@ class SeedDMS_Core_DocumentCategory {
|
|||
|
||||
$documents = array();
|
||||
foreach ($resArr as $row) {
|
||||
array_push($documents, $this->_dms->getDocument($row["documentID"]));
|
||||
if($doc = $this->_dms->getDocument($row["documentID"]))
|
||||
array_push($documents, $doc);
|
||||
}
|
||||
return $documents;
|
||||
} /* }}} */
|
||||
|
|
|
@ -46,6 +46,8 @@ $(document).ready( function() {
|
|||
});
|
||||
});
|
||||
<?php
|
||||
$this->printDeleteFolderButtonJs();
|
||||
$this->printDeleteDocumentButtonJs();
|
||||
} /* }}} */
|
||||
|
||||
function info() { /* {{{ */
|
||||
|
@ -63,18 +65,20 @@ $(document).ready( function() {
|
|||
echo "</table>";
|
||||
|
||||
$documents = $selcat->getDocumentsByCategory(10);
|
||||
print "<table id=\"viewfolder-table\" class=\"table\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("action")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout);
|
||||
foreach($documents as $doc) {
|
||||
echo $this->documentListRow($doc, $previewer);
|
||||
if($documents) {
|
||||
print "<table id=\"viewfolder-table\" class=\"table\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("status")."</th>\n";
|
||||
print "<th>".getMLText("action")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout);
|
||||
foreach($documents as $doc) {
|
||||
echo $this->documentListRow($doc, $previewer);
|
||||
}
|
||||
print "</tbody></table>";
|
||||
}
|
||||
print "</tbody></table>";
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
@ -134,6 +138,8 @@ $(document).ready( function() {
|
|||
$categories = $this->params['categories'];
|
||||
$selcat = $this->params['selcategory'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/bootbox/bootbox.min.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
|
|
|
@ -102,18 +102,18 @@ function loadMoreObjects(element, limit) {
|
|||
var folder = element.data('folder')
|
||||
var offset = element.data('offset')
|
||||
// var limit = element.data('limit')
|
||||
url = seeddms_webroot+"out/out.ViewFolder.php?action=entries&folderid="+folder+"&offset="+offset+"&limit="+limit;
|
||||
url = seeddms_webroot+"out/out.ViewFolder.php?action=entries&folderid="+folder+"&offset="+offset+"&limit="+limit<?= $orderby ? '+"&orderby='.$orderby.'"' : "" ?>;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
$('#viewfolder-table').append(data.html);
|
||||
console.log(data.count);
|
||||
if(data.count <= 0) {
|
||||
element.hide();
|
||||
} else {
|
||||
element.text(data.count+" more objects");
|
||||
var str = '<?= getMLText('x_more_objects') ?>';
|
||||
element.text(str.replace('[number]', data.count));
|
||||
element.data('offset', offset+limit);
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,6 @@ $('#loadmore').click(function(e) {
|
|||
$txt = $this->callHook('folderListSeparator', $folder);
|
||||
if(is_string($txt))
|
||||
$content .= $txt;
|
||||
else $content .= "<tr><td colspan=\"4\">kkkkk</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -454,7 +453,7 @@ $('#loadmore').click(function(e) {
|
|||
echo "</tbody>\n</table>\n";
|
||||
|
||||
if($maxItemsPerPage && $i > $maxItemsPerPage)
|
||||
echo "<button id=\"loadmore\" style=\"width: 100%; margin-bottom: 20px;\" class=\"btn btn-default\" data-folder=\"".$folder->getId()."\"data-offset=\"".$maxItemsPerPage."\" data-limit=\"".$incItemsPerPage."\" data-all=\"".($i-$maxItemsPerPage)."\">".getMLText('x_more_objects', array('number', ($i-$maxItemsPerPage)))."</button>";
|
||||
echo "<button id=\"loadmore\" style=\"width: 100%; margin-bottom: 20px;\" class=\"btn btn-default\" data-folder=\"".$folder->getId()."\"data-offset=\"".$maxItemsPerPage."\" data-limit=\"".$incItemsPerPage."\" data-all=\"".($i-$maxItemsPerPage)."\">".getMLText('x_more_objects', array('number'=>($i-$maxItemsPerPage)))."</button>";
|
||||
}
|
||||
else printMLText("empty_folder_list");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user