diff --git a/module/doc/control.php b/module/doc/control.php index 66368aef64..3e8e8334f5 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -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; diff --git a/module/doc/js/showfiles.js b/module/doc/js/showfiles.js index c88a74f2ea..ab584802e8 100644 --- a/module/doc/js/showfiles.js +++ b/module/doc/js/showfiles.js @@ -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. diff --git a/module/doc/view/showfiles.html.php b/module/doc/view/showfiles.html.php index 300416d0c7..900c0e25fd 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -20,12 +20,13 @@ app->tab);?> +