CC-4458: Now Playing -> "+ Add to current playlist text" might be replaced by something more appropriate

-fixed
This commit is contained in:
denise 2012-09-18 11:22:37 -04:00
parent 75d6b509ea
commit e00ff6367d
3 changed files with 19 additions and 1 deletions

View File

@ -20,6 +20,17 @@ var AIRTIME = (function(AIRTIME) {
} else {
AIRTIME.button.disableButton("btn-group #library-plus", false);
}
var objType = $('#obj_type').val(),
btnText;
if (objType === 'playlist') {
btnText = ' Add to current playlist';
} else if (objType === 'block') {
btnText = ' Add to current smart block';
} else {
btnText = ' Add to current playlist';
}
AIRTIME.library.changeAddButtonText($('.btn-group #library-plus #lib-plus-text'), btnText);
};
mod.fnRowCallback = function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {

View File

@ -20,6 +20,8 @@ var AIRTIME = (function(AIRTIME) {
} else {
AIRTIME.button.disableButton("btn-group #library-plus", false);
}
AIRTIME.library.changeAddButtonText($('.btn-group #library-plus #lib-plus-text'), ' Add to selected show');
};
mod.fnRowCallback = function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {

View File

@ -98,6 +98,10 @@ var AIRTIME = (function(AIRTIME) {
return count;
};
mod.changeAddButtonText = function($button, btnText) {
$button.text(btnText);
}
mod.createToolbarButtons = function() {
$menu = $("<div class='btn-toolbar' />");
$menu
@ -113,7 +117,8 @@ var AIRTIME = (function(AIRTIME) {
"</div>")
.append("<div class='btn-group'>" +
"<button class='btn btn-small' id='library-plus'>" +
"<i class='icon-white icon-plus'></i> Add to current playlist" +
"<i class='icon-white icon-plus'></i>" +
"<span id='lib-plus-text'></span>" +
"</button>" +
"</div>")
.append("<div class='btn-group'>" +