changed to better looking theme with newer version of jquery UI. Can create new playlists on the side.

This commit is contained in:
naomiaro 2011-01-16 17:12:02 -05:00
parent 91e0db7647
commit ccb36c8106
33 changed files with 886 additions and 73 deletions

View file

@ -45,16 +45,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
$view = $this->getResource('view');
$view->headLink()->appendStylesheet('/css/excite-bike/jquery-ui-1.8.7.custom.css');
$view->headLink()->appendStylesheet('/css/redmond/jquery-ui-1.8.8.custom.css');
}
protected function _initHeadScript()
{
$view = $this->getResource('view');
$view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript');
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.7.custom.min.js','text/javascript');
//$view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
//$view->headScript()->appendFile('/js/progressbar/jquery.progressbar.min.js','text/javascript');
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.8.custom.min.js','text/javascript');
}
}

View file

@ -84,9 +84,6 @@ class LibraryController extends Zend_Controller_Action
'title' => 'Close');
}
$menu[] = array('action' => array('type' => 'gourl', 'url' => '/Playlist/metadata'.$params),
'title' => 'Description');
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Playlist/delete'.$params, 'callback' => 'window["deletePlaylist"]'),
'title' => 'Delete');

View file

@ -19,6 +19,8 @@ class PlaylistController extends Zend_Controller_Action
->addActionContext('set-cue', 'json')
->addActionContext('move-item', 'json')
->addActionContext('close', 'json')
->addActionContext('new', 'json')
->addActionContext('metadata', 'json')
->addActionContext('edit', 'json')
->addActionContext('delete-active', 'json')
->addActionContext('delete', 'json')
@ -98,7 +100,9 @@ class PlaylistController extends Zend_Controller_Action
$this->changePlaylist($pl_id);
$this->_helper->redirector('metadata');
$form = new Application_Form_PlaylistMetadata();
$this->view->form = $form->__toString();
}
public function metadataAction()
@ -125,17 +129,19 @@ class PlaylistController extends Zend_Controller_Action
$formdata = $form->getValues();
$pl = $this->getPlaylist();
$pl->setPLMetaData(UI_MDATA_KEY_TITLE, $formdata["title"]);
$pl->setName($formdata["title"]);
if(isset($formdata["description"])) {
$pl->setPLMetaData(UI_MDATA_KEY_DESCRIPTION, $formdata["description"]);
}
$this->_helper->redirector('edit');
$this->view->pl = $pl;
$this->view->html = $this->view->render('playlist/index.phtml');
unset($this->view->pl);
}
}
$this->view->form = $form;
$this->view->form = $form->__toString();
}
public function editAction()

View file

@ -5,9 +5,6 @@ class Application_Form_PlaylistMetadata extends Zend_Form
public function init()
{
// Set the method for the display form to POST
$this->setMethod('post');
// Add username element
$this->addElement('text', 'title', array(
'label' => 'Title:',
@ -23,12 +20,6 @@ class Application_Form_PlaylistMetadata extends Zend_Form
'label' => 'Description:',
'required' => false,
));
// Add the submit button
$this->addElement('submit', 'submit', array(
'ignore' => true,
'label' => 'Submit',
));
}

View file

@ -15,7 +15,7 @@
<li class="spl_empty">Empty playlist</li>
<?php endif; ?>
</ul>
<div id="spl_cue_edit"></div>
<?php else : ?>
<div>No open playlist</div>
<?php endif; ?>