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()
{
$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');
@ -84,6 +84,8 @@ class LibraryController extends Zend_Controller_Action
{
$this->_helper->viewRenderer->setResponseSegment('library');
$this->view->headScript()->appendFile('/js/campcaster/library/library.js','text/javascript');
$query["category"] = $this->_getParam('ob', "dc:creator");
$query["order"] = $this->_getParam('order', "asc");

View File

@ -24,6 +24,8 @@ class SearchController extends Zend_Controller_Action
{
$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('display', 'search');
$this->_helper->actionStack('contents', 'library');

View File

@ -57,20 +57,12 @@ function searchLibrary() {
});
}
$(document).ready(function() {
function setUpSearch() {
$("#search_add").click(ajaxAddField);
$("#search_submit").click(searchLibrary);
$('[id^="fieldset-row_"]').each(function(i, 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").append(data);
$("#library_display tr:not(:first-child)").contextMenu(
{menu: 'myMenu'}, contextMenu
);
$("#library_display tr:not(:first-child)")
.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.artist").data({'ob': 'dc:creator', 'order' : 'desc'});
$("#library_display tr:first-child span.album").data({'ob': 'dc:source', 'order' : 'asc'});
@ -53,7 +54,4 @@ $(document).ready(function() {
.draggable({
helper: 'clone'
});
setUpSPL();
});
}

View File

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