* Code for task #89485.
This commit is contained in:
@@ -1035,7 +1035,6 @@ class doc extends control
|
||||
$table = $this->config->objectTables[$type];
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
if(!empty($_POST)) $searchTitle = $this->post->title;
|
||||
if(empty($_POST) and !empty($searchTitle)) $this->post->title = $searchTitle;
|
||||
|
||||
/* Load pager. */
|
||||
@@ -1045,7 +1044,7 @@ class doc extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$this->app->rawMethod = $rawMethod;
|
||||
|
||||
$files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
|
||||
$files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
|
||||
|
||||
$this->view->title = $object->name;
|
||||
$this->view->position[] = $object->name;
|
||||
|
||||
@@ -4,6 +4,19 @@ $(function()
|
||||
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + type + ']').addClass('active');
|
||||
$('#leftBar .searchBox #title').keypress(function(e)
|
||||
{
|
||||
if(e.which == 13)
|
||||
{
|
||||
$(this).closest('form').attr('action', searchLink.replace('%s', $(this).val()));
|
||||
}
|
||||
});
|
||||
|
||||
$('#leftBar .searchBox #submit').click(function(e)
|
||||
{
|
||||
var searchTitle = $(this).prev('#title').val();
|
||||
$(this).closest('form').attr('action', searchLink.replace('%s', searchTitle));
|
||||
})
|
||||
|
||||
/**
|
||||
* Render Dropdown dom.
|
||||
|
||||
@@ -20,12 +20,13 @@
|
||||
<?php js::set('canViewFiles', common::hasPriv('doc', 'showfiles'));?>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('tab', $this->app->tab);?>
|
||||
<?php js::set('searchLink', helper::createLink('doc', 'showFiles', "type=$type&objectID=$objectID&viewType=$viewType&orderBy=id_desc&recTotal=0&recPerPage=20&pageID=1&searchTitle=%s"));?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<div class='btn-group searchBox'>
|
||||
<form class="input-control has-icon-right table-col" method="post">
|
||||
<?php echo html::input('title', $this->post->title, "class='form-control' placeholder='{$lang->doc->fileTitle}'");?>
|
||||
<form class="input-control has-icon-right table-col not-watch" method="post">
|
||||
<?php echo html::input('title', $searchTitle, "class='form-control' placeholder='{$lang->doc->fileTitle}'");?>
|
||||
<?php echo html::submitButton("<i class='icon icon-search'></i>", '', "btn btn-icon btn-link input-control-icon-right");?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user