Better way to disable and reenable xfade button in playlist/sb editors
This commit is contained in:
parent
8c3f1cf535
commit
e6494e7ff0
3 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,7 @@ if (isset($this->obj)) {
|
||||||
<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'>
|
<div class='btn-group'>
|
||||||
<button id="spl_crossfade" class="btn crossfade-main-button" <?php if ($count <= 0) echo "disabled=disabled"; ?>>
|
<button id="spl_crossfade" class="btn crossfade-main-button">
|
||||||
<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>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -52,7 +52,7 @@ if (isset($this->obj)) {
|
||||||
<?php echo $this->form->getElement('shuffle_button');?>
|
<?php echo $this->form->getElement('shuffle_button');?>
|
||||||
</div>
|
</div>
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button id="spl_crossfade" class="btn crossfade-main-button" <?php if (!$this->obj->isStatic() || $count <= 0) echo "disabled=disabled"; ?>>
|
<button id="spl_crossfade" class="btn crossfade-main-button">
|
||||||
<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>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -406,7 +406,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var empty = $pl.find(".spl_empty");
|
var empty = $pl.find(".spl_empty");
|
||||||
|
|
||||||
if (!show || empty.length > 0) {
|
if (!show || empty.length > 0) {
|
||||||
//$pl.find("#spl_crossfade").hide();
|
$pl.find("#spl_crossfade").attr("disabled", "disabled");
|
||||||
} else {
|
} else {
|
||||||
//get list of playlist contents
|
//get list of playlist contents
|
||||||
var list = contents.children();
|
var list = contents.children();
|
||||||
|
@ -416,9 +416,9 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var last = list.last();
|
var last = list.last();
|
||||||
if (first.find(':first-child').children().attr('blockid') !== undefined &&
|
if (first.find(':first-child').children().attr('blockid') !== undefined &&
|
||||||
last.find(':first-child').children().attr('blockid') !== undefined) {
|
last.find(':first-child').children().attr('blockid') !== undefined) {
|
||||||
//$pl.find("#spl_crossfade").hide();
|
$pl.find("#spl_crossfade").attr("disabled", "disabled");
|
||||||
} else {
|
} else {
|
||||||
$pl.find("#spl_crossfade").show();
|
$pl.find("#spl_crossfade").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue