CC-4166: Playlist Builder -> Regular Playlist : clicking Fade in/out button for a empty playlist will cause PHP Fatal Error
- fixed. Not displaying fade setting button if the playst/smartplaylist is empty.
This commit is contained in:
parent
83917ed894
commit
d1e6f8178b
6 changed files with 40 additions and 9 deletions
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
$contents = $this->obj->getContents();
|
||||
$count = count($contents);
|
||||
?>
|
||||
<button id="spl_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<button id="spl_delete" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">Delete</button>
|
||||
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button">
|
||||
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button" style="display:<?php echo $count > 0 ?"block;":"none;"?>">
|
||||
<span class="ui-icon crossfade-main-icon"></span><span class="ui-button-text">Playlist crossfade</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
@ -49,7 +53,8 @@
|
|||
<div class="clear"></div>
|
||||
<div class="" style="clear:both; float:none; width:100%;">
|
||||
<ul id="spl_sortable">
|
||||
<?php echo $this->render('playlist/update.phtml') ?>
|
||||
<?php $this->contents = $contents;
|
||||
echo $this->render('playlist/update.phtml') ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?php
|
||||
$contents = $this->obj->getContents();
|
||||
$count = count($contents);
|
||||
?>
|
||||
<button id="spl_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<button id="spl_delete" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">Delete</button>
|
||||
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button">
|
||||
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"block;":"none;"?>">
|
||||
<span class="ui-icon crossfade-main-icon"></span><span class="ui-button-text">Playlist crossfade</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
@ -49,7 +53,8 @@
|
|||
<div class="clear"></div>
|
||||
<div class="" style="clear:both; float:none; width:100%;">
|
||||
<ul id="spl_sortable">
|
||||
<?php echo $this->render('playlist/update.phtml') ?>
|
||||
<?php $this->contents = $contents;
|
||||
echo $this->render('playlist/update.phtml') ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$items = $this->obj->getContents();
|
||||
$items = $this->contents;
|
||||
if (count($items)) : ?>
|
||||
<?php $i = 0; ?>
|
||||
<?php foreach($items as $item) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue