Major layout work on the smartblock and playlist editors
* CC-6088: Smart Block form needs to have a form layout * CC-6089: Editor view name fields must be made <input> fields
This commit is contained in:
parent
706caa8458
commit
98ac8fd851
|
@ -109,7 +109,7 @@ class Billing
|
||||||
$result = self::makeRequest($credentials["url"], $query_string);
|
$result = self::makeRequest($credentials["url"], $query_string);
|
||||||
|
|
||||||
//XXX: Debugging / local testing
|
//XXX: Debugging / local testing
|
||||||
if ($_SERVER['SERVER_NAME'] == "airtime.localhost") {
|
if ($_SERVER['SERVER_NAME'] == "localhost") {
|
||||||
$_SERVER['SERVER_NAME'] = "bananas.airtime.pro";
|
$_SERVER['SERVER_NAME'] = "bananas.airtime.pro";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,9 +127,9 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
{
|
{
|
||||||
if (!isset($this->sortOptions)) {
|
if (!isset($this->sortOptions)) {
|
||||||
$this->sortOptions = array(
|
$this->sortOptions = array(
|
||||||
"random" => _("random"),
|
"random" => _("Randomly"),
|
||||||
"newest" => _("newest"),
|
"newest" => _("Newest"),
|
||||||
"oldest" => _("oldest")
|
"oldest" => _("Oldest")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $this->sortOptions;
|
return $this->sortOptions;
|
||||||
|
@ -176,7 +176,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
}
|
}
|
||||||
|
|
||||||
$spType = new Zend_Form_Element_Radio('sp_type');
|
$spType = new Zend_Form_Element_Radio('sp_type');
|
||||||
$spType->setLabel(_('Set smart block type:'))
|
$spType->setLabel(_('Type:'))
|
||||||
->setDecorators(array('viewHelper'))
|
->setDecorators(array('viewHelper'))
|
||||||
->setMultiOptions(array(
|
->setMultiOptions(array(
|
||||||
'static' => _('Static'),
|
'static' => _('Static'),
|
||||||
|
@ -294,7 +294,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
|
|
||||||
$repeatTracks = new Zend_Form_Element_Checkbox('sp_repeat_tracks');
|
$repeatTracks = new Zend_Form_Element_Checkbox('sp_repeat_tracks');
|
||||||
$repeatTracks->setDecorators(array('viewHelper'))
|
$repeatTracks->setDecorators(array('viewHelper'))
|
||||||
->setLabel(_('Allow Repeat Tracks:'));
|
->setLabel(_('Allow Repeated Tracks:'));
|
||||||
if (isset($storedCrit["repeat_tracks"])) {
|
if (isset($storedCrit["repeat_tracks"])) {
|
||||||
$repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false);
|
$repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false);
|
||||||
}
|
}
|
||||||
|
@ -303,6 +303,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
$sort = new Zend_Form_Element_Select('sp_sort_options');
|
$sort = new Zend_Form_Element_Select('sp_sort_options');
|
||||||
$sort->setAttrib('class', 'sp_input_select')
|
$sort->setAttrib('class', 'sp_input_select')
|
||||||
->setDecorators(array('viewHelper'))
|
->setDecorators(array('viewHelper'))
|
||||||
|
->setLabel(_("Sort Tracks:"))
|
||||||
->setMultiOptions($this->getSortOptions());
|
->setMultiOptions($this->getSortOptions());
|
||||||
if (isset($storedCrit["sort"])) {
|
if (isset($storedCrit["sort"])) {
|
||||||
$sort->setValue($storedCrit["sort"]["value"]);
|
$sort->setValue($storedCrit["sort"]["value"]);
|
||||||
|
@ -320,7 +321,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
|
|
||||||
$limitValue = new Zend_Form_Element_Text('sp_limit_value');
|
$limitValue = new Zend_Form_Element_Text('sp_limit_value');
|
||||||
$limitValue->setAttrib('class', 'sp_input_text_limit')
|
$limitValue->setAttrib('class', 'sp_input_text_limit')
|
||||||
->setLabel(_('Limit to'))
|
->setLabel(_('Limit to:'))
|
||||||
->setDecorators(array('viewHelper'));
|
->setDecorators(array('viewHelper'));
|
||||||
$this->addElement($limitValue);
|
$this->addElement($limitValue);
|
||||||
if (isset($storedCrit["limit"])) {
|
if (isset($storedCrit["limit"])) {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<form class="smart-block-form" method="post" action="">
|
<form class="smart-block-form" method="post" action="">
|
||||||
<dl class='zend_form search-criteria'>
|
<dl class='zend_form search-criteria'>
|
||||||
<div id='sp-success' class='success' style='display:none'></div>
|
<div id='sp-success' class='success' style='display:none'></div>
|
||||||
<dd id='sp_type-element'>
|
<dt>
|
||||||
<label class='sp-label'>
|
<label class='sp-label'>
|
||||||
<?php echo $this->element->getElement('sp_type')->getLabel() ?>
|
<?php echo $this->element->getElement('sp_type')->getLabel() ?>
|
||||||
</label>
|
</label>
|
||||||
|
</dt>
|
||||||
|
<dd id='sp_type-element'>
|
||||||
<?php $i=0;
|
<?php $i=0;
|
||||||
$value = $this->element->getElement('sp_type')->getValue();
|
$value = $this->element->getElement('sp_type')->getValue();
|
||||||
foreach ($this->element->getElement('sp_type')->getMultiOptions() as $radio) : ?>
|
foreach ($this->element->getElement('sp_type')->getMultiOptions() as $radio) : ?>
|
||||||
|
@ -17,6 +19,51 @@
|
||||||
<span class='playlist_type_help_icon'></span>
|
<span class='playlist_type_help_icon'></span>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<label class='sp_text_font'><?php echo $this->element->getElement('sp_repeat_tracks')->getLabel() ?></label>
|
||||||
|
</dt>
|
||||||
|
<dd id='sp_repeat_tracks-element'>
|
||||||
|
<?php echo $this->element->getElement('sp_repeat_tracks')?>
|
||||||
|
<?php if($this->element->getElement("sp_repeat_tracks")->hasErrors()) : ?>
|
||||||
|
<?php foreach($this->element->getElement("sp_repeat_tracks")->getMessages() as $error): ?>
|
||||||
|
<span class='errors sp-errors'>
|
||||||
|
<?php echo $error; ?>
|
||||||
|
</span>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<span class='repeat_tracks_help_icon'></span>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<label class='sp_text_font'><?php echo $this->element->getElement('sp_sort_options')->getLabel();?></label>
|
||||||
|
</dt>
|
||||||
|
<dd id='sp_sort-element'>
|
||||||
|
<?php echo $this->element->getElement('sp_sort_options') ?>
|
||||||
|
<?php if($this->element->getElement("sp_sort_options")->hasErrors()) : ?>
|
||||||
|
<?php foreach($this->element->getElement("sp_sort_options")->getMessages() as $error): ?>
|
||||||
|
<span class='errors sp-errors'>
|
||||||
|
<?php echo $error; ?>
|
||||||
|
</span>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<label class='sp_text_font'><?php echo $this->element->getElement('sp_limit_value')->getLabel() ?></label>
|
||||||
|
</dt>
|
||||||
|
<dd id='sp_limit-element'>
|
||||||
|
<?php echo $this->element->getElement('sp_limit_value')?>
|
||||||
|
<?php echo $this->element->getElement('sp_limit_options') ?>
|
||||||
|
<?php if($this->element->getElement("sp_limit_value")->hasErrors()) : ?>
|
||||||
|
<?php foreach($this->element->getElement("sp_limit_value")->getMessages() as $error): ?>
|
||||||
|
<span class='errors sp-errors'>
|
||||||
|
<?php echo $error; ?>
|
||||||
|
</span>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt><label><?php echo(_("Search Criteria:"));?></label></dt>
|
||||||
<dd id='sp_criteria-element' class='criteria-element'>
|
<dd id='sp_criteria-element' class='criteria-element'>
|
||||||
<?php for ($i = 0; $i < $this->criteriasLength; $i++) {
|
<?php for ($i = 0; $i < $this->criteriasLength; $i++) {
|
||||||
// modRowMap holds the number of modifier rows for each criteria element
|
// modRowMap holds the number of modifier rows for each criteria element
|
||||||
|
@ -44,19 +91,19 @@
|
||||||
echo 'style=display:none';
|
echo 'style=display:none';
|
||||||
} ?>>
|
} ?>>
|
||||||
<?php echo $this->element->getElement("sp_criteria_field_".$i."_".$j) ?>
|
<?php echo $this->element->getElement("sp_criteria_field_".$i."_".$j) ?>
|
||||||
<a class='btn btn-small' id='modifier_add_<?php echo $i ?>'>
|
|
||||||
<i class='icon-white icon-plus'></i>
|
|
||||||
</a>
|
|
||||||
<?php echo $this->element->getElement("sp_criteria_modifier_".$i."_".$j) ?>
|
<?php echo $this->element->getElement("sp_criteria_modifier_".$i."_".$j) ?>
|
||||||
<?php echo $this->element->getElement("sp_criteria_value_".$i."_".$j) ?>
|
<?php echo $this->element->getElement("sp_criteria_value_".$i."_".$j) ?>
|
||||||
<span class='sp_text_font' id="extra_criteria" <?php echo $this->element->getElement("sp_criteria_extra_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>><?php echo _(" to "); ?><?php echo $this->element->getElement('sp_criteria_extra_'.$i."_".$j) ?></span>
|
<span class='sp_text_font' id="extra_criteria" <?php echo $this->element->getElement("sp_criteria_extra_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>><?php echo _(" to "); ?><?php echo $this->element->getElement('sp_criteria_extra_'.$i."_".$j) ?></span>
|
||||||
|
|
||||||
<a style='margin-right:3px' class='btn btn-small btn-danger' id='criteria_remove_<?php echo $i ?>'>
|
<a style='margin-right:3px' class='btn btn-small btn-danger' id='criteria_remove_<?php echo $i ?>'>
|
||||||
<i class='icon-white icon-remove'></i>
|
<i class='icon-white icon-remove'></i>
|
||||||
</a>
|
</a>
|
||||||
<span class='db-logic-label' <?php if ($nextDisabled) echo "style='display:none'"?>>
|
<span class='db-logic-label' <?php if ($nextDisabled) echo "style='display:none'"?>>
|
||||||
<?php echo $logicLabel;?>
|
<?php echo $logicLabel;?>
|
||||||
</span>
|
</span>
|
||||||
|
<a class='btn btn-small' id='modifier_add_<?php echo $i ?>'>
|
||||||
|
<i class='icon-white icon-plus'></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
<?php if($this->element->getElement("sp_criteria_field_".$i."_".$j)->hasErrors()) : ?>
|
<?php if($this->element->getElement("sp_criteria_field_".$i."_".$j)->hasErrors()) : ?>
|
||||||
<?php foreach($this->element->getElement("sp_criteria_field_".$i."_".$j)->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement("sp_criteria_field_".$i."_".$j)->getMessages() as $error): ?>
|
||||||
<span class='errors sp-errors'>
|
<span class='errors sp-errors'>
|
||||||
|
@ -70,42 +117,6 @@
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dd id='sp_repeat_tracks-element'>
|
|
||||||
<span class='sp_text_font'><?php echo $this->element->getElement('sp_repeat_tracks')->getLabel() ?></span>
|
|
||||||
<?php echo $this->element->getElement('sp_repeat_tracks')?>
|
|
||||||
<?php if($this->element->getElement("sp_repeat_tracks")->hasErrors()) : ?>
|
|
||||||
<?php foreach($this->element->getElement("sp_repeat_tracks")->getMessages() as $error): ?>
|
|
||||||
<span class='errors sp-errors'>
|
|
||||||
<?php echo $error; ?>
|
|
||||||
</span>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
<span class='repeat_tracks_help_icon'></span>
|
|
||||||
</dd>
|
|
||||||
<dd id='sp_sort-element'>
|
|
||||||
<span class='sp_text_font'>Sort tracks by</span>
|
|
||||||
<?php echo $this->element->getElement('sp_sort_options') ?>
|
|
||||||
<?php if($this->element->getElement("sp_sort_options")->hasErrors()) : ?>
|
|
||||||
<?php foreach($this->element->getElement("sp_sort_options")->getMessages() as $error): ?>
|
|
||||||
<span class='errors sp-errors'>
|
|
||||||
<?php echo $error; ?>
|
|
||||||
</span>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</dd>
|
|
||||||
<dd id='sp_limit-element'>
|
|
||||||
<span class='sp_text_font'><?php echo $this->element->getElement('sp_limit_value')->getLabel() ?></span>
|
|
||||||
<?php echo $this->element->getElement('sp_limit_value')?>
|
|
||||||
<?php echo $this->element->getElement('sp_limit_options') ?>
|
|
||||||
<?php if($this->element->getElement("sp_limit_value")->hasErrors()) : ?>
|
|
||||||
<?php foreach($this->element->getElement("sp_limit_value")->getMessages() as $error): ?>
|
|
||||||
<span class='errors sp-errors'>
|
|
||||||
<?php echo $error; ?>
|
|
||||||
</span>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<?php if ($this->showPoolCount) { ?>
|
<?php if ($this->showPoolCount) { ?>
|
||||||
<div class='sp_text_font sp_text_font_bold'>
|
<div class='sp_text_font sp_text_font_bold'>
|
||||||
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
|
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
|
||||||
|
@ -137,12 +148,3 @@
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class='btn-toolbar left-floated'>
|
|
||||||
<div class='btn-group sp-button'>
|
|
||||||
<?php echo $this->element->getElement('generate_button');?>
|
|
||||||
</div>
|
|
||||||
<div class='btn-group sp-button'>
|
|
||||||
<?php echo $this->element->getElement('shuffle_button');?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -10,54 +10,60 @@ if (isset($this->obj)) {
|
||||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
||||||
<input class='obj_type' type='hidden' value='playlist'/>
|
<input class='obj_type' type='hidden' value='playlist'/>
|
||||||
<div class="playlist_title">
|
|
||||||
<h3 class="obj_name">
|
|
||||||
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
|
||||||
</h3>
|
|
||||||
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
|
||||||
</div>
|
|
||||||
<div id='sp-success' class='success' style='display:none'></div>
|
<div id='sp-success' class='success' style='display:none'></div>
|
||||||
|
|
||||||
<dl class="zend_form">
|
<dl class="zend_form playlist_editor">
|
||||||
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
|
<dt>
|
||||||
|
<label><?php echo(_("Name:")); ?></label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<input type="text" class="playlist_name_display" contenteditable="true" value="<?php echo $this->escape($this->obj->getName()); ?>">
|
||||||
|
</dd>
|
||||||
|
<dt id="description-label"><label for="description"><?php echo _("Description:") ?></label></dt>
|
||||||
<dd id="description-element">
|
<dd id="description-element">
|
||||||
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->escape($this->obj->getDescription()); ?></textarea>
|
<textarea cols="24" rows="3" id="description" name="description"><?php echo $this->escape($this->obj->getDescription()); ?></textarea>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<div class="btn-toolbar spl-no-margin clearfix left-floated">
|
<?php //echo $this->form; ?>
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<button class="btn btn-danger" title='<?php echo _("Empty playlist content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
|
<div class="ui-widget-header fg-toolbar btn-toolbar clearfix">
|
||||||
|
<h4 class="obj_length"><?php echo($this->length); ?></h4>
|
||||||
|
<h4 class="obj_length_label"><?php echo(_("Duration:"));?></h4>
|
||||||
|
<div class='btn-group'>
|
||||||
<button class="btn" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
|
<button class="btn" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
|
||||||
</div>
|
</div>
|
||||||
<div class='btn-group pull-right'>
|
<div class='btn-group'>
|
||||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo $count > 0 ?"block;":"none;"?>">
|
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo $count > 0 ?"inherit;":"none;"?>">
|
||||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class='btn-group'>
|
||||||
|
<button class="btn btn-danger" title='<?php echo _("Empty playlist content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php //echo $this->form; ?>
|
|
||||||
|
|
||||||
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
|
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
|
||||||
<span class="ui-icon ui-icon-closethick sp-closethick-center"></span>
|
<span class="ui-icon ui-icon-closethick sp-closethick-center"></span>
|
||||||
<dl id="spl_editor-main" class="inline-list">
|
<dl id="spl_editor-main" class="inline-list">
|
||||||
<dt><?php echo _("Fade in: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt>
|
<dt><?php echo _("Fade in: "); ?><span class='spl_cue_hint'>(ss.msec)</span></dt>
|
||||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'>(ss.t)</span></dt>
|
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'>(ss.msec)</span></dt>
|
||||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<ul class="spl_sortable">
|
<ul class="spl_sortable">
|
||||||
<?php $this->contents = $contents;
|
<?php $this->contents = $contents;
|
||||||
echo $this->render('playlist/update.phtml') ?>
|
echo $this->render('playlist/update.phtml') ?>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="btn-toolbar spl-no-margin clearfix">
|
<div class="btn-toolbar clearfix">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<button class="btn" type="button" id="cancel_button" name="submit"><?php echo _("Cancel") ?></button>
|
<button class="btn" type="button" id="cancel_button" name="submit"><?php echo _("Cancel") ?></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,36 +10,51 @@ if (isset($this->obj)) {
|
||||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
||||||
<input class='obj_type' type='hidden' value='block'/>
|
<input class='obj_type' type='hidden' value='block'/>
|
||||||
<div class="playlist_title">
|
|
||||||
<h3 class="obj_name">
|
|
||||||
<a class="playlist_name_display" contenteditable="true">
|
|
||||||
<?php
|
|
||||||
if (isset($this->unsavedName)) echo $this->unsavedName;
|
|
||||||
else echo $this->escape($this->obj->getName());
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
|
||||||
</div>
|
|
||||||
<div id='sp-success-saved' class='success' style='display:none'></div>
|
<div id='sp-success-saved' class='success' style='display:none'></div>
|
||||||
|
|
||||||
<dl class="zend_form">
|
<dl class="zend_form playlist_editor">
|
||||||
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
|
<dt>
|
||||||
|
<label><?php echo(_("Name:")); ?></label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<input type="text" class="playlist_name_display" contenteditable="true" value="<?php
|
||||||
|
if (isset($this->unsavedName)) echo $this->unsavedName;
|
||||||
|
else echo $this->escape($this->obj->getName());
|
||||||
|
?>">
|
||||||
|
</dd>
|
||||||
|
<dt id="description-label"><label for="description"><?php echo _("Description:") ?></label></dt>
|
||||||
<dd id="description-element">
|
<dd id="description-element">
|
||||||
<textarea cols="80" rows="24" id="description" name="description"><?php if (isset($this->unsavedDesc)) echo $this->unsavedDesc; else echo $this->obj->getDescription();?></textarea>
|
<textarea cols="24" rows="3" id="description" name="description"><?php
|
||||||
|
if (isset($this->unsavedDesc)) echo $this->unsavedDesc;
|
||||||
|
else echo $this->obj->getDescription();
|
||||||
|
?></textarea>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<?php echo $this->form; ?>
|
<?php echo $this->form; ?>
|
||||||
<div class="btn-toolbar spl-no-margin clearfix left-floated">
|
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<button class="btn btn-danger" title='<?php echo _("Empty smart block content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"block;":"none;"?>">
|
<div class="ui-widget-header fg-toolbar btn-toolbar clearfix">
|
||||||
|
<h4 class="obj_length"><?php echo($this->length); ?></h4>
|
||||||
|
<h4 class="obj_length_label"><?php echo(_("Duration:"));?></h4>
|
||||||
|
|
||||||
|
<div class='btn-group'>
|
||||||
|
<?php echo $this->form->getElement('generate_button');?>
|
||||||
|
</div>
|
||||||
|
<div class='btn-group'>
|
||||||
|
<?php echo $this->form->getElement('shuffle_button');?>
|
||||||
|
</div>
|
||||||
|
<div class='btn-group'>
|
||||||
|
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"inherit;":"none;"?>">
|
||||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class='btn-group'>
|
||||||
|
<button class="btn btn-danger" title='<?php echo _("Remove all content from this smart block") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
|
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
|
||||||
|
@ -53,12 +68,12 @@ if (isset($this->obj)) {
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<ul class="spl_sortable">
|
<ul class="spl_sortable">
|
||||||
<?php $this->contents = $contents;
|
<?php $this->contents = $contents;
|
||||||
echo $this->render('playlist/update.phtml') ?>
|
echo $this->render('playlist/update.phtml') ?>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="btn-toolbar spl-no-margin clearfix">
|
<div class="btn-toolbar clearfix">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<button class="btn" type="button" id="cancel_button" name="submit"><?php echo _("Cancel") ?></button>
|
<button class="btn" type="button" id="cancel_button" name="submit"><?php echo _("Cancel") ?></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,5 +83,5 @@ if (isset($this->obj)) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div><?php echo _("No open smart block") ?></div>
|
<div><?php echo _("No smart block currently open") ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -385,6 +385,7 @@ li.ui-state-default {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-content fieldset label {
|
.sb-content fieldset label {
|
||||||
|
@ -415,6 +416,8 @@ li.ui-state-default {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex: 1 0 100%;
|
flex: 1 0 100%;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clearfix:after, .side_playlist li:after {
|
.clearfix:after, .side_playlist li:after {
|
||||||
|
@ -425,7 +428,7 @@ li.ui-state-default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spl-no-margin > div:last-child {
|
.spl-no-margin > div:first-child {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,7 +440,11 @@ li.ui-state-default {
|
||||||
|
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 0;
|
padding: 5px;
|
||||||
|
border: 1px solid #444;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #111;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spl_sortable .list-item-container {
|
.spl_sortable .list-item-container {
|
||||||
|
@ -447,7 +454,8 @@ li.ui-state-default {
|
||||||
.spl_empty {
|
.spl_empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
color: white;
|
margin-top: 100px;
|
||||||
|
color: #efefef;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
|
@ -28,12 +28,18 @@
|
||||||
height: 28px;
|
height: 28px;
|
||||||
margin: 0 7px 20px 0;
|
margin: 0 7px 20px 0;
|
||||||
}*/
|
}*/
|
||||||
.side_playlist textarea {
|
|
||||||
|
.playlist_editor dt {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.playlist_editor input, .playlist_editor textarea {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_playlist textarea {
|
.side_playlist textarea {
|
||||||
height: 100px;
|
height: 3.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spl_sortable {
|
.spl_sortable {
|
||||||
|
@ -157,18 +163,23 @@
|
||||||
|
|
||||||
.side_playlist h4 {
|
.side_playlist h4 {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
margin: 8px 0 10px 0;
|
margin: 3px 8px 0px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: #4f4f4f;
|
color: #4f4f4f;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
clear: both;
|
float: right;
|
||||||
float: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_playlist h3+h4 {
|
.side_playlist h3+h4 {
|
||||||
margin: 0 0 11px 0;
|
margin: 0 0 11px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-toolbar {
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.spl_sortable div.big_play {
|
.spl_sortable div.big_play {
|
||||||
display: block;
|
display: block;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -458,13 +469,6 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_playlist .zend_form dt,.side_playlist .zend_form dd {
|
|
||||||
display: block;
|
|
||||||
float: none;
|
|
||||||
margin: 4px 0 0;
|
|
||||||
padding: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.side_playlist .zend_form dd.buttons {
|
.side_playlist .zend_form dd.buttons {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
@ -475,17 +479,37 @@
|
||||||
margin: 0 0 0 10px;
|
margin: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_playlist .zend_form dt {
|
|
||||||
color: #5B5B5B;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 9px 0 0;
|
|
||||||
padding: 0 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.side_playlist .zend_form dt:first-child {
|
.side_playlist .zend_form dt:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.side_playlist .zend_form dt {
|
||||||
|
width: 170px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side_playlist .zend_form dd {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.search-criteria dt label.sp_label
|
||||||
|
{
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-criteria dt {
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
width: 170px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-criteria dd {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sp_criteria-element {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
.side_playlist .zend_form dd textarea {
|
.side_playlist .zend_form dd textarea {
|
||||||
background-color: #dddddd;
|
background-color: #dddddd;
|
||||||
border: 1px solid #5B5B5B;
|
border: 1px solid #5B5B5B;
|
||||||
|
@ -496,8 +520,7 @@
|
||||||
-moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
|
-moz-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
|
||||||
-webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
|
-webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
|
||||||
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
|
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, 0.1);
|
||||||
width: 99.7%;
|
}*/
|
||||||
}
|
|
||||||
|
|
||||||
.side_playlist fieldset {
|
.side_playlist fieldset {
|
||||||
border: 1px solid #9a9a9a;
|
border: 1px solid #9a9a9a;
|
||||||
|
@ -526,9 +549,6 @@ fieldset>legend {
|
||||||
background-image: url(redmond/images/ui-icons_454545_256x240.png);
|
background-image: url(redmond/images/ui-icons_454545_256x240.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
.side_playlist .zend_form input,.side_playlist .zend_form textarea {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#fieldset-metadate_change {
|
#fieldset-metadate_change {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
|
|
@ -569,9 +569,9 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus, .input_t
|
||||||
border: 1px solid #5b5b5b;
|
border: 1px solid #5b5b5b;
|
||||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-indent: 3px;
|
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin:0;
|
margin:0;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
.input_select, select {
|
.input_select, select {
|
||||||
background-color: #DDDDDD;
|
background-color: #DDDDDD;
|
||||||
|
|
|
@ -359,7 +359,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//remove any newlines if user somehow snuck them in (easy to do if dragging/dropping text)
|
//remove any newlines if user somehow snuck them in (easy to do if dragging/dropping text)
|
||||||
nameElement.text(nameElement.text().replace("\n", ""));
|
nameElement.text(nameElement.text().replace("\n", ""));
|
||||||
|
|
||||||
var name = $pl.find(".playlist_name_display").text();
|
var name = $pl.find(".playlist_name_display").val();
|
||||||
$(".nav.nav-tabs .active a > span.tab-name").text(name);
|
$(".nav.nav-tabs .active a > span.tab-name").text(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
pane = $(".editor_pane_wrapper:last"),
|
pane = $(".editor_pane_wrapper:last"),
|
||||||
name = json.type == "md" ? // file
|
name = json.type == "md" ? // file
|
||||||
pane.append(json.html).find("#track_title").val() + $.i18n._(" - Metadata Editor")
|
pane.append(json.html).find("#track_title").val() + $.i18n._(" - Metadata Editor")
|
||||||
: pane.append(json.html).find(".playlist_name_display").text(),
|
: pane.append(json.html).find(".playlist_name_display").val(),
|
||||||
tab =
|
tab =
|
||||||
"<li data-tab-id='" + $tabCount + "' data-tab-type='" + json.type + "' id='pl-tab-" + $tabCount + "' role='presentation' class='active'>" +
|
"<li data-tab-id='" + $tabCount + "' data-tab-type='" + json.type + "' id='pl-tab-" + $tabCount + "' role='presentation' class='active'>" +
|
||||||
"<a href='#'><span class='tab-name'></span>" +
|
"<a href='#'><span class='tab-name'></span>" +
|
||||||
|
@ -862,7 +862,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var description = $pl.find("#description").val();
|
var description = $pl.find("#description").val();
|
||||||
var streamurl = $pl.find("#streamurl-element input").val();
|
var streamurl = $pl.find("#streamurl-element input").val();
|
||||||
var length = $pl.find("#streamlength-element input").val();
|
var length = $pl.find("#streamlength-element input").val();
|
||||||
var name = $pl.find(".playlist_name_display").text();
|
var name = $pl.find(".playlist_name_display").val();
|
||||||
|
|
||||||
//hide any previous errors (if any)
|
//hide any previous errors (if any)
|
||||||
$(".side_playlist.active-tab .errors").empty().hide();
|
$(".side_playlist.active-tab .errors").empty().hide();
|
||||||
|
@ -941,10 +941,14 @@ var AIRTIME = (function(AIRTIME){
|
||||||
// We also need to run the draw callback to update how dragged items are drawn
|
// We also need to run the draw callback to update how dragged items are drawn
|
||||||
AIRTIME.library.fnDrawCallback();
|
AIRTIME.library.fnDrawCallback();
|
||||||
|
|
||||||
var name = $pl.find('.playlist_name_display').text().trim();
|
var playlistNameElem = $pl.find('.playlist_name_display');
|
||||||
|
var name = "";
|
||||||
|
if (playlistNameElem.val() !== undefined) {
|
||||||
|
name = playlistNameElem.val().trim();
|
||||||
|
}
|
||||||
|
|
||||||
if ((name == "Untitled Playlist"
|
if ((name == $.i18n._("Untitled Playlist")
|
||||||
|| name == "Untitled Smart Block")
|
|| name == $.i18n._("Untitled Smart Block"))
|
||||||
&& $pl.find(".spl_sortable .spl_empty").length == 1) {
|
&& $pl.find(".spl_sortable .spl_empty").length == 1) {
|
||||||
mod.fnDelete(undefined, tabId);
|
mod.fnDelete(undefined, tabId);
|
||||||
} else {
|
} else {
|
||||||
|
@ -969,7 +973,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
* Playlists: get name, description
|
* Playlists: get name, description
|
||||||
*/
|
*/
|
||||||
var criteria = $pl.find('form').serializeArray(),
|
var criteria = $pl.find('form').serializeArray(),
|
||||||
block_name = $pl.find('.playlist_name_display').text(),
|
block_name = $pl.find('.playlist_name_display').val(),
|
||||||
block_desc = $pl.find('textarea[name="description"]').val(),
|
block_desc = $pl.find('textarea[name="description"]').val(),
|
||||||
save_action = baseUrl+'playlist/save',
|
save_action = baseUrl+'playlist/save',
|
||||||
obj_id = $pl.find(".obj_id").val(),
|
obj_id = $pl.find(".obj_id").val(),
|
||||||
|
|
|
@ -351,7 +351,7 @@ function setupUI() {
|
||||||
*/
|
*/
|
||||||
var sortable = activeTab.find('.spl_sortable'),
|
var sortable = activeTab.find('.spl_sortable'),
|
||||||
plContents = sortable.children(),
|
plContents = sortable.children(),
|
||||||
shuffleButton = activeTab.find('.sp-button, #pl-bl-clear-content');
|
shuffleButton = activeTab.find('button[name="shuffle_button"], #pl-bl-clear-content');
|
||||||
|
|
||||||
if (!plContents.hasClass('spl_empty')) {
|
if (!plContents.hasClass('spl_empty')) {
|
||||||
if (shuffleButton.hasClass('ui-state-disabled')) {
|
if (shuffleButton.hasClass('ui-state-disabled')) {
|
||||||
|
|
Loading…
Reference in New Issue