quick search string session var
This commit is contained in:
parent
7aac80ed58
commit
daf37fa548
|
@ -38,9 +38,9 @@ class LibraryController extends Zend_Controller_Action
|
||||||
unset($this->search_sess->page);
|
unset($this->search_sess->page);
|
||||||
unset($this->search_sess->md);
|
unset($this->search_sess->md);
|
||||||
|
|
||||||
if ($this->getRequest()->isGet()) {
|
//if ($this->getRequest()->isGet()) {
|
||||||
unset($this->search_sess->quick);
|
// unset($this->search_sess->quick);
|
||||||
}
|
//}
|
||||||
|
|
||||||
$this->_helper->actionStack('contents', 'library');
|
$this->_helper->actionStack('contents', 'library');
|
||||||
$this->_helper->actionStack('quick-search', 'library');
|
$this->_helper->actionStack('quick-search', 'library');
|
||||||
|
@ -153,10 +153,7 @@ class LibraryController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$last_page = null;
|
$last_page = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$currpage = isset($page) ? $page : $last_page;
|
|
||||||
$this->search_sess->page = $currpage;
|
|
||||||
|
|
||||||
if(isset($this->search_sess->md)){
|
if(isset($this->search_sess->md)){
|
||||||
$md = $this->search_sess->md;
|
$md = $this->search_sess->md;
|
||||||
|
@ -170,6 +167,9 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$md = array();
|
$md = array();
|
||||||
$quick = false;
|
$quick = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$currpage = isset($page) ? $page : $last_page;
|
||||||
|
$this->search_sess->page = $currpage;
|
||||||
|
|
||||||
$count = StoredFile::searchFiles($md, $order, true, null, null, $quick);
|
$count = StoredFile::searchFiles($md, $order, true, null, null, $quick);
|
||||||
|
|
||||||
|
@ -206,17 +206,18 @@ class LibraryController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->view->headScript()->appendFile('/js/airtime/library/quicksearch.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/airtime/library/quicksearch.js','text/javascript');
|
||||||
|
|
||||||
$this->_helper->viewRenderer->setResponseSegment('quick_search');
|
$this->_helper->viewRenderer->setResponseSegment('quick_search');
|
||||||
|
|
||||||
//$this->view->urlparams = array("route" => array("controller"=> "Library", "action"=> "index", "module"=> "default"));
|
$this->view->qs_value = $this->search_sess->quick_string;
|
||||||
$this->route = 'quick_search';
|
|
||||||
|
|
||||||
$search = $this->_getParam('search', null);
|
|
||||||
$format = $this->_getParam('format', 'layout');
|
$format = $this->_getParam('format', 'layout');
|
||||||
|
|
||||||
if($format !== 'json')
|
if($format !== 'json')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
$search = $this->_getParam('search', null);
|
||||||
|
$this->search_sess->quick_string = $search;
|
||||||
|
|
||||||
$categories = array("dc:title", "dc:creator", "dc:source");
|
$categories = array("dc:title", "dc:creator", "dc:source");
|
||||||
$keywords = explode(" ", $search);
|
$keywords = explode(" ", $search);
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<label for="quick_search">Search:</label>
|
<label for="quick_search">Search:</label>
|
||||||
<input id="quick_search" name="quick_search" type="text"></input>
|
<input id="quick_search" name="quick_search" type="text" value = "<?php echo $this->qs_value ?>"></input>
|
||||||
|
|
Loading…
Reference in New Issue