minor fixes

This commit is contained in:
naomiaro 2010-12-21 23:56:14 -05:00
parent 5795871bcc
commit 4e7b3ce86b
5 changed files with 17 additions and 23 deletions

View File

@ -24,7 +24,7 @@ class LibraryController extends Zend_Controller_Action
public function indexAction() public function indexAction()
{ {
$this->view->headScript()->appendFile('/js/campcaster/library/library.js','text/javascript'); $this->view->headScript()->appendFile('/js/campcaster/onready/library.js','text/javascript');
$this->_helper->layout->setLayout('library'); $this->_helper->layout->setLayout('library');
@ -84,6 +84,8 @@ class LibraryController extends Zend_Controller_Action
{ {
$this->_helper->viewRenderer->setResponseSegment('library'); $this->_helper->viewRenderer->setResponseSegment('library');
$this->view->headScript()->appendFile('/js/campcaster/library/library.js','text/javascript');
$query["category"] = $this->_getParam('ob', "dc:creator"); $query["category"] = $this->_getParam('ob', "dc:creator");
$query["order"] = $this->_getParam('order', "asc"); $query["order"] = $this->_getParam('order', "asc");

View File

@ -24,6 +24,8 @@ class SearchController extends Zend_Controller_Action
{ {
$this->_helper->layout->setLayout('search'); $this->_helper->layout->setLayout('search');
$this->view->headScript()->appendFile('/js/campcaster/onready/search.js','text/javascript');
$this->_helper->actionStack('context-menu', 'library'); $this->_helper->actionStack('context-menu', 'library');
$this->_helper->actionStack('display', 'search'); $this->_helper->actionStack('display', 'search');
$this->_helper->actionStack('contents', 'library'); $this->_helper->actionStack('contents', 'library');

View File

@ -57,20 +57,12 @@ function searchLibrary() {
}); });
} }
$(document).ready(function() { function setUpSearch() {
$("#search_add").click(ajaxAddField); $("#search_add").click(ajaxAddField);
$("#search_submit").click(searchLibrary); $("#search_submit").click(searchLibrary);
$('[id^="fieldset-row_"]').each(function(i, el){ $('[id^="fieldset-row_"]').each(function(i, el){
addRemove(el); addRemove(el);
}); });
}
$("#library_display tr:not(:first-child)")
.contextMenu({menu: 'myMenu'}, contextMenu)
.draggable({
helper: 'clone'
});
setUpSPL();
});

View File

@ -14,13 +14,14 @@ function setLibraryContents(data){
$("#library_display tr:not(:first-child)").remove(); $("#library_display tr:not(:first-child)").remove();
$("#library_display").append(data); $("#library_display").append(data);
$("#library_display tr:not(:first-child)").contextMenu( $("#library_display tr:not(:first-child)")
{menu: 'myMenu'}, contextMenu .contextMenu({menu: 'myMenu'}, contextMenu)
); .draggable({
helper: 'clone'
});
} }
$(document).ready(function() { function setUpLibrary() {
$("#library_display tr:first-child span.title").data({'ob': 'dc:title', 'order' : 'asc'}); $("#library_display tr:first-child span.title").data({'ob': 'dc:title', 'order' : 'asc'});
$("#library_display tr:first-child span.artist").data({'ob': 'dc:creator', 'order' : 'desc'}); $("#library_display tr:first-child span.artist").data({'ob': 'dc:creator', 'order' : 'desc'});
$("#library_display tr:first-child span.album").data({'ob': 'dc:source', 'order' : 'asc'}); $("#library_display tr:first-child span.album").data({'ob': 'dc:source', 'order' : 'asc'});
@ -53,7 +54,4 @@ $(document).ready(function() {
.draggable({ .draggable({
helper: 'clone' helper: 'clone'
}); });
}
setUpSPL();
});

View File

@ -72,8 +72,8 @@ function setUpSPL() {
$("#spl_sortable" ).bind( "sortstop", moveSPLItem); $("#spl_sortable" ).bind( "sortstop", moveSPLItem);
$("#spl_remove_selected").click(deleteSPLItem); $("#spl_remove_selected").click(deleteSPLItem);
$("#side_playlist").droppable(); $("#spl_sortable").droppable();
$("#side_playlist" ).bind( "drop", addSPLItem); $("#spl_sortable" ).bind( "drop", addSPLItem);
$('input[name="all"]').click(function(){ $('input[name="all"]').click(function(){
$('form[name="SPL"]').find('input').attr("checked", $(this).attr("checked")); $('form[name="SPL"]').find('input').attr("checked", $(this).attr("checked"));