mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
show path of document/folder in typeahead search
This commit is contained in:
parent
ecb0258186
commit
6341e13ca6
|
@ -367,10 +367,10 @@ function typeahead() { /* {{{ */
|
|||
foreach ($entries as $entry) {
|
||||
if($entry->isType('document')) {
|
||||
// $recs[] = 'D'.$entry->getName();
|
||||
$recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>$entry->getName());
|
||||
$recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>$entry->getName(), 'path'=>$entry->getParent()->getFolderPathPlain(true, '/'));
|
||||
} elseif($entry->isType('folder')) {
|
||||
// $recs[] = 'F'.$entry->getName();
|
||||
$recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>$entry->getName());
|
||||
$recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>$entry->getName(), 'path'=>$entry->getParent()->getFolderPathPlain(true, '/'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,6 +265,11 @@ span.datepicker {
|
|||
span.datepicker input {
|
||||
max-width: 100px;
|
||||
}
|
||||
|
||||
div.typeahead span.path {
|
||||
font-size: 85%;
|
||||
color: #888;
|
||||
}
|
||||
/* Sidenav for Docs
|
||||
* -------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -148,9 +148,9 @@ function initMost() {
|
|||
**/
|
||||
highlighter : function (item) {
|
||||
if(item.type.charAt(0) == 'D')
|
||||
return '<i class="fa fa-file"></i> ' + item.name.replace(/</g, '<');
|
||||
return '<i class="fa fa-file"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||
else if(item.type.charAt(0) == 'F')
|
||||
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<');
|
||||
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||
else
|
||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<');
|
||||
},
|
||||
|
|
|
@ -275,6 +275,11 @@ a.accordion2-toggle:focus, a.accordion2-toggle:hover {
|
|||
span.datepicker {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.typeahead span.path {
|
||||
font-size: 85%;
|
||||
color: #888;
|
||||
}
|
||||
/* Sidenav for Docs
|
||||
* -------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -153,9 +153,9 @@ function initMost() {
|
|||
**/
|
||||
highlighter : function (item) {
|
||||
if(item.type.charAt(0) == 'D')
|
||||
return '<i class="fa fa-file"></i> ' + item.name.replace(/</g, '<');
|
||||
return '<i class="fa fa-file"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||
else if(item.type.charAt(0) == 'F')
|
||||
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<');
|
||||
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||
else
|
||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<');
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user