CC-4246: Smart Playlist: Click shuffle button will shuffle the contents multiple times
-fixed
This commit is contained in:
parent
8b23f73fb5
commit
92408612f6
|
@ -329,9 +329,20 @@ function setupUI() {
|
||||||
if (shuffleButton.hasClass('ui-state-disabled')) {
|
if (shuffleButton.hasClass('ui-state-disabled')) {
|
||||||
shuffleButton.removeClass('ui-state-disabled');
|
shuffleButton.removeClass('ui-state-disabled');
|
||||||
}
|
}
|
||||||
shuffleButton.live('click', function(){
|
//check if shuffle button already has a click event
|
||||||
buttonClickAction('shuffle', 'Playlist/smart-block-shuffle');
|
var clickEvents = $(document).data('events').click;
|
||||||
|
var hasEvent = false;
|
||||||
|
$.each(clickEvents, function(i, event) {
|
||||||
|
if (event.selector == shuffleButton.selector) {
|
||||||
|
hasEvent = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if (!hasEvent) {
|
||||||
|
shuffleButton.live('click', function(){
|
||||||
|
buttonClickAction('shuffle', 'Playlist/smart-block-shuffle');
|
||||||
|
});
|
||||||
|
}
|
||||||
} else if (!shuffleButton.hasClass('ui-state-disabled')) {
|
} else if (!shuffleButton.hasClass('ui-state-disabled')) {
|
||||||
shuffleButton.addClass('ui-state-disabled');
|
shuffleButton.addClass('ui-state-disabled');
|
||||||
shuffleButton.die('click');
|
shuffleButton.die('click');
|
||||||
|
|
Loading…
Reference in New Issue