searching includes groups for and/or
This commit is contained in:
parent
f6a56c01a9
commit
101b6fafa6
|
@ -35,6 +35,7 @@
|
|||
<actionMethod actionName="delete"/>
|
||||
<actionMethod actionName="contents"/>
|
||||
<actionMethod actionName="editFileMd"/>
|
||||
<actionMethod actionName="quickSearch"/>
|
||||
</controllerFile>
|
||||
<controllerFile controllerName="Plupload">
|
||||
<actionMethod actionName="index"/>
|
||||
|
@ -45,6 +46,7 @@
|
|||
<actionMethod actionName="index"/>
|
||||
<actionMethod actionName="newfield"/>
|
||||
<actionMethod actionName="display"/>
|
||||
<actionMethod actionName="newgroup"/>
|
||||
</controllerFile>
|
||||
<controllerFile controllerName="Login">
|
||||
<actionMethod actionName="index"/>
|
||||
|
@ -85,6 +87,7 @@
|
|||
<formFile formName="AddShow"/>
|
||||
<formFile formName="ScheduleShow"/>
|
||||
<formFile formName="AddUser"/>
|
||||
<formFile formName="AdvancedSearchGroup"/>
|
||||
</formsDirectory>
|
||||
<layoutsDirectory enabled="false"/>
|
||||
<modelsDirectory/>
|
||||
|
@ -229,6 +232,12 @@
|
|||
<viewControllerScriptsDirectory forControllerName="Library">
|
||||
<viewScriptFile forActionName="editFileMd"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="Library">
|
||||
<viewScriptFile forActionName="quickSearch"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="Search">
|
||||
<viewScriptFile forActionName="newgroup"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
</viewScriptsDirectory>
|
||||
<viewHelpersDirectory/>
|
||||
<viewFiltersDirectory enabled="false"/>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
class LibraryController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
protected $pl_sess = null;
|
||||
|
||||
protected $search_sess = null;
|
||||
|
||||
public function init()
|
||||
|
@ -18,6 +20,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
->addActionContext('upload', 'json')
|
||||
->addActionContext('delete', 'json')
|
||||
->addActionContext('context-menu', 'json')
|
||||
->addActionContext('quick-search', 'json')
|
||||
->initContext();
|
||||
|
||||
$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
||||
|
@ -36,6 +39,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
unset($this->search_sess->md);
|
||||
|
||||
$this->_helper->actionStack('contents', 'library');
|
||||
$this->_helper->actionStack('quick-search', 'library');
|
||||
$this->_helper->actionStack('index', 'sideplaylist');
|
||||
}
|
||||
|
||||
|
@ -94,7 +98,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
public function deleteAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
|
||||
|
||||
if (!is_null($id)) {
|
||||
$file = StoredFile::Recall($id);
|
||||
|
||||
|
@ -121,7 +125,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
public function contentsAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/campcaster/library/library.js','text/javascript');
|
||||
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('library');
|
||||
|
||||
$cat = $this->_getParam('ob', null);
|
||||
|
@ -183,7 +187,48 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
public function quickSearchAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/campcaster/library/quicksearch.js','text/javascript');
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('quick_search');
|
||||
|
||||
$search = $this->_getParam('search', null);
|
||||
$format = $this->_getParam('format', 'layout');
|
||||
|
||||
if($format !== 'json')
|
||||
return;
|
||||
|
||||
$categories = array("dc:title", "dc:creator", "dc:source");
|
||||
$keywords = explode(" ", $search);
|
||||
|
||||
$md = array();
|
||||
|
||||
$i = 0;
|
||||
foreach($keywords as $word) {
|
||||
|
||||
foreach($categories as $cat) {
|
||||
$md["row_".$i]["metadata_".$i] = $cat;
|
||||
$md["row_".$i]["match_".$i] = 0;
|
||||
$md["row_".$i]["search_".$i] = $word;
|
||||
|
||||
$i = $i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
$currpage = isset($this->search_sess->page) ? $this->search_sess->page : null;
|
||||
$order = isset($this->search_sess->order) ? $this->search_sess->order : null;
|
||||
$count = StoredFile::searchFiles($md, $order, true);
|
||||
|
||||
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Null($count));
|
||||
$paginator->setCurrentPageNumber($currpage);
|
||||
$this->view->paginator = $paginator;
|
||||
$this->view->files = StoredFile::searchFiles($md, $order, false, $paginator->getCurrentPageNumber(), $paginator->getItemCountPerPage());
|
||||
|
||||
$this->view->html = $this->view->render('library/contents.phtml');
|
||||
unset($this->view->files);
|
||||
unset($this->view->paginator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -200,3 +245,5 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,29 +2,49 @@
|
|||
|
||||
class SearchController extends Zend_Controller_Action
|
||||
{
|
||||
protected $search_sess = null;
|
||||
|
||||
protected $form;
|
||||
protected $search_sess = null;
|
||||
private function addGroup($group_id) {
|
||||
|
||||
$form = new Application_Form_AdvancedSearch();
|
||||
|
||||
$form->addGroup($group_id, 1);
|
||||
$group = $form->getSubForm('group_'.$group_id);
|
||||
|
||||
return $group->__toString();
|
||||
}
|
||||
|
||||
private function addFieldToGroup($group_id, $row_id) {
|
||||
|
||||
$form = new Application_Form_AdvancedSearch();
|
||||
|
||||
$form->addGroup($group_id);
|
||||
$group = $form->getSubForm('group_'.$group_id);
|
||||
|
||||
$group->addRow($row_id);
|
||||
|
||||
return $group->__toString();
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
if(!Zend_Auth::getInstance()->hasIdentity())
|
||||
if(!Zend_Auth::getInstance()->hasIdentity())
|
||||
{
|
||||
$this->_redirect('login/index');
|
||||
}
|
||||
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('newfield', 'html')
|
||||
$ajaxContext->addActionContext('newfield', 'json')
|
||||
->addActionContext('newgroup', 'json')
|
||||
->initContext();
|
||||
|
||||
$this->form = new Application_Form_AdvancedSearch();
|
||||
$this->search_sess = new Zend_Session_Namespace("search");
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_helper->layout->setLayout('search');
|
||||
|
||||
$this->_helper->layout->setLayout('search');
|
||||
|
||||
$this->view->headScript()->appendFile('/js/campcaster/onready/search.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
||||
$this->view->headLink()->appendStylesheet('/css/contextmenu.css');
|
||||
|
@ -36,28 +56,30 @@ class SearchController extends Zend_Controller_Action
|
|||
|
||||
public function displayAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/campcaster/library/advancedsearch.js','text/javascript');
|
||||
$this->view->headLink()->appendStylesheet('/css/library_search.css');
|
||||
$this->view->headScript()->appendFile('/js/campcaster/library/advancedsearch.js','text/javascript');
|
||||
//$this->view->headLink()->appendStylesheet('/css/library_search.css');
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('search');
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$this->form = new Application_Form_AdvancedSearch();
|
||||
$form = $this->form;
|
||||
$form = new Application_Form_AdvancedSearch();
|
||||
$this->view->form = $form;
|
||||
|
||||
// Form has not been submitted - displayed using layouts
|
||||
if (!$request->isPost()) {
|
||||
|
||||
$sub = new Application_Form_AdvancedSearchRow(1);
|
||||
$form->addSubForm($sub, 'row_1');
|
||||
$form->getSubForm('row_1')->removeDecorator('DtDdWrapper');
|
||||
$form->addGroup(1, 1);
|
||||
|
||||
$this->search_sess->next_group = 2;
|
||||
$this->search_sess->next_row[1] = 2;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Form has been submitted - run data through preValidation()
|
||||
$this->view->md = $request->getPost();
|
||||
|
||||
// Form has been submitted
|
||||
$form->preValidation($request->getPost());
|
||||
|
||||
if (!$form->isValid($request->getPost())) {
|
||||
|
@ -65,8 +87,8 @@ class SearchController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
// valid form was submitted set as search criteria.
|
||||
$info = $form->getValues();
|
||||
$this->search_sess->md = $info;
|
||||
$this->view->md = $form->getValues();
|
||||
$this->search_sess->md = $form->getValues();
|
||||
|
||||
//make sure to start on first page of new results.
|
||||
unset($this->search_sess->page);
|
||||
|
@ -74,19 +96,31 @@ class SearchController extends Zend_Controller_Action
|
|||
|
||||
public function newfieldAction()
|
||||
{
|
||||
$id = $this->_getParam('id', 1);
|
||||
$group_id = $this->_getParam('group', 1);
|
||||
$row_id = $this->search_sess->next_row[$group_id];
|
||||
|
||||
$this->form->addSubForm(new Application_Form_AdvancedSearchRow($id), 'row_'.$id, $id);
|
||||
$this->view->html = $this->addFieldToGroup($group_id, $row_id);
|
||||
$this->view->row = $row_id;
|
||||
|
||||
$this->form->getSubForm('row_'.$id)->removeDecorator('DtDdWrapper');
|
||||
$e = $this->form->getSubForm('row_'.$id);
|
||||
|
||||
$this->view->field = $e->__toString();
|
||||
$this->search_sess->next_row[$group_id] = $row_id + 1;
|
||||
}
|
||||
|
||||
public function newgroupAction()
|
||||
{
|
||||
$group_id = $this->search_sess->next_group;
|
||||
|
||||
$this->view->html = $this->addGroup($group_id);
|
||||
|
||||
$this->search_sess->next_group = $group_id + 1;
|
||||
$this->search_sess->next_row[$group_id] = 2;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,18 +5,13 @@ class Application_Form_AdvancedSearch extends Zend_Form
|
|||
|
||||
public function init()
|
||||
{
|
||||
$this->addElement('hidden', 'search_next_id', array(
|
||||
'value' => 2
|
||||
));
|
||||
$this->getElement('search_next_id')->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
|
||||
// Add the add button
|
||||
$this->addElement('button', 'search_add', array(
|
||||
$this->addElement('button', 'search_add_group', array(
|
||||
'ignore' => true,
|
||||
'label' => 'Add',
|
||||
'order' => '-2'
|
||||
));
|
||||
$this->getElement('search_add')->removeDecorator('DtDdWrapper');
|
||||
$this->getElement('search_add_group')->removeDecorator('DtDdWrapper');
|
||||
|
||||
// Add the submit button
|
||||
$this->addElement('submit', 'search_submit', array(
|
||||
|
@ -27,6 +22,17 @@ class Application_Form_AdvancedSearch extends Zend_Form
|
|||
$this->getElement('search_submit')->removeDecorator('DtDdWrapper');
|
||||
}
|
||||
|
||||
public function addGroup($group_id, $row_id=null) {
|
||||
|
||||
$this->addSubForm(new Application_Form_AdvancedSearchGroup(), 'group_'.$group_id, $group_id);
|
||||
$this->getSubForm('group_'.$group_id)->removeDecorator('DtDdWrapper');
|
||||
|
||||
if(!is_null($row_id)) {
|
||||
$subGroup = $this->getSubForm('group_'.$group_id);
|
||||
$subGroup->addRow($row_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function preValidation(array $data) {
|
||||
|
||||
function findId($name) {
|
||||
|
@ -34,36 +40,26 @@ class Application_Form_AdvancedSearch extends Zend_Form
|
|||
return $t[1];
|
||||
}
|
||||
|
||||
// array_filter callback
|
||||
function findFields($field) {
|
||||
return strpos($field, 'row') !== false;
|
||||
return strpos($field, 'group') !== false;
|
||||
}
|
||||
|
||||
$fields = array_filter(array_keys($data), 'findFields');
|
||||
$groups = array_filter(array_keys($data), 'findFields');
|
||||
|
||||
foreach ($fields as $field) {
|
||||
// use id to set new order
|
||||
$id = findId($field);
|
||||
$this->addNewField($data, $id);
|
||||
foreach ($groups as $group) {
|
||||
|
||||
$group_id = findId($group);
|
||||
$this->addGroup($group_id);
|
||||
|
||||
$subGroup = $this->getSubForm($group);
|
||||
|
||||
foreach (array_keys($data[$group]) as $row) {
|
||||
|
||||
$row_id = findId($row);
|
||||
$subGroup->addRow($row_id, $data[$group][$row]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function addNewField($data, $id) {
|
||||
|
||||
$sub = new Application_Form_AdvancedSearchRow($id);
|
||||
|
||||
$values = array("metadata_".$id => $data["row_".$id]["metadata_".$id],
|
||||
"match_".$id => $data["row_".$id]["match_".$id],
|
||||
"search_".$id => $data["row_".$id]["search_".$id]);
|
||||
|
||||
$sub->setDefaults($values);
|
||||
|
||||
$this->addSubForm($sub, 'row_'.$id, $id);
|
||||
$this->getSubForm('row_'.$id)->removeDecorator('DtDdWrapper');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
class Application_Form_AdvancedSearchGroup extends Zend_Form_SubForm
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
// Add the add button
|
||||
$this->addElement('button', 'search_add_row', array(
|
||||
'ignore' => true,
|
||||
'label' => 'Add',
|
||||
'order' => '-2'
|
||||
));
|
||||
$this->getElement('search_add_row')->removeDecorator('DtDdWrapper');
|
||||
}
|
||||
|
||||
public function addRow($row_id, $data=null) {
|
||||
|
||||
$this->addSubForm(new Application_Form_AdvancedSearchRow(), 'row_'.$row_id, $row_id);
|
||||
$row = $this->getSubForm('row_'.$row_id);
|
||||
$row->removeDecorator('DtDdWrapper');
|
||||
|
||||
if(!is_null($data)) {
|
||||
$row->setDefaults($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -2,22 +2,11 @@
|
|||
|
||||
class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
protected $_rowid;
|
||||
|
||||
public function __construct($id = null)
|
||||
{
|
||||
$this->_rowid = $id;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
$id = $this->_rowid;
|
||||
|
||||
$this->addElement(
|
||||
'select',
|
||||
'metadata_'.$id,
|
||||
'metadata',
|
||||
array(
|
||||
'required' => true,
|
||||
'multiOptions' => array(
|
||||
|
@ -50,11 +39,11 @@ class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm
|
|||
),
|
||||
)
|
||||
);
|
||||
$this->getElement('metadata_'.$id)->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
$this->getElement('metadata')->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
|
||||
$this->addElement(
|
||||
'select',
|
||||
'match_'.$id,
|
||||
'match',
|
||||
array(
|
||||
'required' => true,
|
||||
'multiOptions' => array(
|
||||
|
@ -68,12 +57,12 @@ class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm
|
|||
),
|
||||
)
|
||||
);
|
||||
$this->getElement('match_'.$id)->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
$this->getElement('match')->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
|
||||
$this->addElement('text', 'search_'.$id, array(
|
||||
$this->addElement('text', 'search', array(
|
||||
'required' => true,
|
||||
));
|
||||
$this->getElement('search_'.$id)->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
$this->getElement('search')->removeDecorator('Label')->removeDecorator('HtmlTag');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<div id="nav"><?php echo $this->navigation()->menu()->setRenderInvisible(true) ?></div>
|
||||
|
||||
<div id="library_quick_search"><?php echo $this->layout()->quick_search ?></div>
|
||||
<div id="library_content"><?php echo $this->layout()->library ?></div>
|
||||
|
||||
<div id="side_playlist"><?php echo $this->layout()->spl ?></div>
|
||||
|
|
|
@ -155,8 +155,7 @@ class Playlist {
|
|||
{
|
||||
$con = Propel::getConnection("campcaster");
|
||||
|
||||
$sql = "SELECT * FROM cc_playlist LEFT JOIN cc_playlisttimes USING(id) WHERE length <= '{$p_length}' ";
|
||||
//AND state != 'edited'
|
||||
$sql = "SELECT * FROM cc_playlist LEFT JOIN cc_playlisttimes USING(id) WHERE length <= '{$p_length}' AND state != 'edited' ";
|
||||
|
||||
$r = $con->query($sql);
|
||||
return $r->fetchAll();
|
||||
|
|
|
@ -1799,27 +1799,35 @@ class StoredFile {
|
|||
|
||||
$sql = $selector." ".$from;
|
||||
|
||||
$cond = array();
|
||||
foreach(array_keys($md) as $key) {
|
||||
if(strpos($key, 'row') !== false){
|
||||
$t = explode("_", $key);
|
||||
$row_num = $t[1];
|
||||
$or_cond = array();
|
||||
foreach (array_keys($md) as $group) {
|
||||
|
||||
$string = $g_metadata_xml_to_db_mapping[$md[$key]["metadata_".$row_num]];
|
||||
if(strpos($group, 'group') === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$string = $string ." ".$match[$md[$key]["match_".$row_num]];
|
||||
$and_cond = array();
|
||||
foreach (array_keys($md[$group]) as $row) {
|
||||
|
||||
if ($md[$key]["match_".$row_num] === "0")
|
||||
$string = $string." '%". $md[$key]["search_".$row_num]."%'";
|
||||
$string = $g_metadata_xml_to_db_mapping[$md[$group][$row]["metadata"]];
|
||||
|
||||
$string = $string ." ".$match[$md[$group][$row]["match"]];
|
||||
|
||||
if ($md[$group][$row]["match"] === "0")
|
||||
$string = $string." '%". $md[$group][$row]["search"]."%'";
|
||||
else
|
||||
$string = $string." '". $md[$key]["search_".$row_num]."'";
|
||||
$string = $string." '". $md[$group][$row]["search"]."'";
|
||||
|
||||
$cond[] = $string;
|
||||
$and_cond[] = $string;
|
||||
}
|
||||
|
||||
if(count($and_cond) > 0) {
|
||||
$or_cond[] = "(".join(" AND ", $and_cond).")";
|
||||
}
|
||||
}
|
||||
|
||||
if(count($cond) > 0) {
|
||||
$where = " WHERE ". join(" AND ", $cond);
|
||||
if(count($or_cond) > 0) {
|
||||
$where = " WHERE ". join(" OR ", $or_cond);
|
||||
$sql = $sql . $where;
|
||||
}
|
||||
|
||||
|
@ -1841,7 +1849,8 @@ class StoredFile {
|
|||
$paginate = " LIMIT ".$limit. " OFFSET " .$offset;
|
||||
$sql = $sql . $paginate;
|
||||
}
|
||||
//echo $sql;
|
||||
//echo var_dump($md);
|
||||
echo $sql;
|
||||
|
||||
return $CC_DBC->getAll($sql);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<label for="quick_search">Search:</label>
|
||||
<input id="quick_search" name="quick_search" type="text"></input>
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
$this->form->setAction($this->url());
|
||||
echo $this->form;
|
||||
echo var_dump($this->md);
|
||||
?>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<?php echo $this->field; ?>
|
|
@ -0,0 +1 @@
|
|||
<br /><br /><center>View script for controller <b>Search</b> and script/action name <b>newgroup</b></center>
|
|
@ -10,27 +10,37 @@ function addRemove(el) {
|
|||
$(el).find("dl input").after(span);
|
||||
}
|
||||
|
||||
function ajaxAddField() {
|
||||
function ajaxAddRow() {
|
||||
var group_id;
|
||||
|
||||
var id = $("#search_next_id").val();
|
||||
group_id = $(this).parent().parent().attr("id").split("_").pop();
|
||||
|
||||
var url = '/Search/newfield';
|
||||
url = url + '/format/html';
|
||||
url = url + '/id/' + id;
|
||||
var url = '/Search/newfield/format/json';
|
||||
|
||||
$.post(url, function(newElement) {
|
||||
|
||||
var el = $(newElement);
|
||||
addRemove(el);
|
||||
$.post(url, {group: group_id}, function(json) {
|
||||
|
||||
var newRow = $(json.html).find("#fieldset-row_"+json.row);
|
||||
|
||||
$("#fieldset-group_"+group_id+" dl:first").append(newRow);
|
||||
});
|
||||
}
|
||||
|
||||
function ajaxAddGroup() {
|
||||
|
||||
var url = '/Search/newgroup/format/json';
|
||||
|
||||
$.post(url, function(json) {
|
||||
|
||||
$(".zend_form").append(el);
|
||||
$("#search_next_id").val(++id);
|
||||
$(".zend_form").append(json.html);
|
||||
$('[id$="search_add_row"]').click(ajaxAddRow);
|
||||
});
|
||||
}
|
||||
|
||||
function setUpSearch() {
|
||||
|
||||
$("#search_add").click(ajaxAddField);
|
||||
$("#search_add_group").click(ajaxAddGroup);
|
||||
|
||||
$('[id$="search_add_row"]').click(ajaxAddRow);
|
||||
|
||||
$('[id^="fieldset-row_"]').each(function(i, el){
|
||||
addRemove(el);
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
function setUpQuickSearch() {
|
||||
|
||||
$("#library_quick_search input").keyup(function(ev){
|
||||
var url, string;
|
||||
//alert(x);
|
||||
|
||||
url = "/Library/quick-search/format/json";
|
||||
string = $(this).val();
|
||||
|
||||
$.post(url, {search: string}, function(json){
|
||||
var x;
|
||||
});
|
||||
});
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
setUpQuickSearch();
|
||||
setUpLibrary();
|
||||
setUpSPL();
|
||||
|
||||
|
|
Loading…
Reference in New Issue