CC-1916 playlist metadata page looks better.
This commit is contained in:
parent
f8d3a38b2e
commit
89267748d4
|
@ -93,7 +93,8 @@ class PlaylistController extends Zend_Controller_Action
|
|||
|
||||
$this->changePlaylist($pl_id);
|
||||
$form = new Application_Form_PlaylistMetadata();
|
||||
$this->view->form = $form->__toString();
|
||||
$this->view->fieldset = $form;
|
||||
$this->view->form = $this->view->render('playlist/new.phtml');
|
||||
}
|
||||
|
||||
public function metadataAction()
|
||||
|
@ -115,26 +116,25 @@ class PlaylistController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
if ($request->isPost()) {
|
||||
if ($form->isValid($request->getPost())) {
|
||||
|
||||
$formdata = $form->getValues();
|
||||
$title = $this->_getParam('title', null);
|
||||
$description = $this->_getParam('description', null);
|
||||
|
||||
$pl = $this->getPlaylist();
|
||||
|
||||
if($formdata["title"])
|
||||
$pl->setName($formdata["title"]);
|
||||
|
||||
if(isset($formdata["description"])) {
|
||||
$pl->setPLMetaData(UI_MDATA_KEY_DESCRIPTION, $formdata["description"]);
|
||||
}
|
||||
$pl = $this->getPlaylist();
|
||||
|
||||
if($title)
|
||||
$pl->setName($title);
|
||||
|
||||
if(isset($description)) {
|
||||
$pl->setPLMetaData(UI_MDATA_KEY_DESCRIPTION, $description);
|
||||
}
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
unset($this->view->pl);
|
||||
}
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
unset($this->view->pl);
|
||||
}
|
||||
|
||||
$this->view->form = $form->__toString();
|
||||
$this->view->fieldset = $form;
|
||||
$this->view->form = $this->view->render('playlist/new.phtml');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
class Application_Form_PlaylistMetadata extends Zend_Form
|
||||
class Application_Form_PlaylistMetadata extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
public function init()
|
||||
|
@ -8,6 +8,7 @@ class Application_Form_PlaylistMetadata extends Zend_Form
|
|||
// Add username element
|
||||
$this->addElement('text', 'title', array(
|
||||
'label' => 'Title:',
|
||||
'class' => 'input_text',
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
|
@ -18,10 +19,15 @@ class Application_Form_PlaylistMetadata extends Zend_Form
|
|||
// Add the comment element
|
||||
$this->addElement('textarea', 'description', array(
|
||||
'label' => 'Description:',
|
||||
'class' => 'input_text_area',
|
||||
'required' => false,
|
||||
));
|
||||
|
||||
// Add the comment element
|
||||
$this->addElement('button', 'new_playlist_submit', array(
|
||||
'label' => 'Submit',
|
||||
'ignore' => true
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
<?php echo $this->form; ?>
|
||||
<form method="post" action="" enctype="application/x-www-form-urlencoded">
|
||||
<?php echo $this->view->fieldset; ?>
|
||||
</form>
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
<br /><br /><center>View script for controller <b>Playlist</b> and script/action name <b>new</b></center>
|
||||
<h3 class="plain">Playlist Metadata</h3>
|
||||
<form method="post" action="" enctype="application/x-www-form-urlencoded">
|
||||
<?php echo $this->fieldset; ?>
|
||||
</form>
|
||||
|
|
|
@ -1347,6 +1347,61 @@ ul.errors li {
|
|||
|
||||
#show_content_dialog .datatable {
|
||||
margin-top:8px;
|
||||
|
||||
|
||||
}
|
||||
.simple-formblock.metadata {
|
||||
border:none;
|
||||
width:100%;
|
||||
}
|
||||
#side_playlist .simple-formblock.metadata .input_text, #side_playlist .simple-formblock.metadata .input_text_area {
|
||||
width:95%;
|
||||
}
|
||||
#side_playlist .simple-formblock.metadata.simple-formblock dd {
|
||||
width:70%;
|
||||
}
|
||||
#side_playlist h3.plain {
|
||||
float:none;
|
||||
font-size:18px;
|
||||
margin:2px 0 20px 0;
|
||||
}
|
||||
|
||||
.qtip {
|
||||
font-size:11px;
|
||||
line-height:160%;
|
||||
}
|
||||
|
||||
#schedule-show-who.scrolled {
|
||||
margin-bottom: 0;
|
||||
max-height:300px;
|
||||
overflow:auto;
|
||||
}
|
||||
.text-content {
|
||||
padding:20px 10px 0 20px;
|
||||
}
|
||||
.text-content h2 {
|
||||
font-size:2.8em;
|
||||
color:#242424;
|
||||
}
|
||||
.text-content p {
|
||||
font-size:1.6em;
|
||||
line-height:140%;
|
||||
color:#242424;
|
||||
margin:0 0 1.4em 0;
|
||||
}
|
||||
.text-content a {
|
||||
color:#cccccc;
|
||||
text-decoration:none;
|
||||
}
|
||||
.text-content a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.text-content ol {
|
||||
margin:0;
|
||||
list-style-position:inside;
|
||||
}
|
||||
|
||||
.text-content ol li {
|
||||
margin:0 0 4px 0;
|
||||
font-size:1.6em;
|
||||
list-style-position:inside;
|
||||
}
|
|
@ -331,20 +331,8 @@ function closeSPL() {
|
|||
function createPlaylistMetaForm(json) {
|
||||
var submit, form;
|
||||
|
||||
submit = $('<button id="new_playlist_submit">Submit</button>')
|
||||
.button()
|
||||
.click(function(){
|
||||
var url, data;
|
||||
|
||||
url = '/Playlist/metadata/format/json';
|
||||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
||||
form = $(json.form);
|
||||
form.find("fieldset").addClass("simple-formblock metadata");
|
||||
|
||||
form.find("input, textarea")
|
||||
.keydown(function(event){
|
||||
|
@ -355,10 +343,24 @@ function createPlaylistMetaForm(json) {
|
|||
}
|
||||
})
|
||||
|
||||
form.find("#new_playlist_submit")
|
||||
.button()
|
||||
.click(function(event){
|
||||
event.preventDefault();
|
||||
|
||||
var url, data;
|
||||
|
||||
url = '/Playlist/metadata/format/json';
|
||||
data = $("#side_playlist form").serialize();
|
||||
|
||||
$.post(url, data, function(json){
|
||||
openDiffSPL(json);
|
||||
})
|
||||
});
|
||||
|
||||
$("#side_playlist")
|
||||
.empty()
|
||||
.append(form)
|
||||
.append(submit);
|
||||
.append(form);
|
||||
}
|
||||
|
||||
function newSPL() {
|
||||
|
|
Loading…
Reference in New Issue