-implemented UI changes for playlist/block/webstream builder

This commit is contained in:
denise 2012-09-14 15:49:39 -04:00
parent 198d15adc8
commit 0524e4e5d2
11 changed files with 97 additions and 40 deletions

View file

@ -16,9 +16,9 @@ var AIRTIME = (function(AIRTIME) {
}
if (check === true) {
AIRTIME.button.enableButton("icon-plus", true);
AIRTIME.button.enableButton("btn-group #library-plus", true);
} else {
AIRTIME.button.disableButton("icon-plus", true);
AIRTIME.button.disableButton("btn-group #library-plus", true);
}
};
@ -109,7 +109,7 @@ var AIRTIME = (function(AIRTIME) {
.find('.icon-plus').parent()
.click(function() {
if (AIRTIME.button.isDisabled('icon-plus') === true) {
if (AIRTIME.button.isDisabled('btn-group #library-plus') === true) {
return;
}

View file

@ -16,9 +16,9 @@ var AIRTIME = (function(AIRTIME) {
}
if (check === true) {
AIRTIME.button.enableButton("icon-plus", true);
AIRTIME.button.enableButton("btn-group #library-plus", true);
} else {
AIRTIME.button.disableButton("icon-plus", true);
AIRTIME.button.disableButton("btn-group #library-plus", true);
}
};
@ -121,7 +121,7 @@ var AIRTIME = (function(AIRTIME) {
.click(
function() {
if (AIRTIME.button.isDisabled('icon-plus') === true) {
if (AIRTIME.button.isDisabled('btn-group #library-plus') === true) {
return;
}

View file

@ -110,7 +110,7 @@ var AIRTIME = (function(AIRTIME) {
"</ul>" +
"</div>")
.append("<div class='btn-group'>" +
"<button class='btn btn-small'>" +
"<button class='btn btn-small' id='library-plus'>" +
"<i class='icon-white icon-plus'></i> Add to current playlist" +
"</button>" +
"</div>")

View file

@ -943,6 +943,7 @@ var AIRTIME = (function(AIRTIME){
};
mod.init = function() {
/*
$.contextMenu({
selector: '#spl_new, #ws_new',
trigger: "left",
@ -953,6 +954,10 @@ var AIRTIME = (function(AIRTIME){
"ws": {name: "New Webstream", callback: AIRTIME.playlist.fnWsNew}
}
});
*/
$('#lib-new-pl').live('click', function(){AIRTIME.playlist.fnNew();});
$('#lib-new-bl').live('click', function(){AIRTIME.playlist.fnNewBlock();});
$('#lib-new-ws').live('click', function(){AIRTIME.playlist.fnWsNew();});
/*
$pl.delegate("#spl_new",
{"click": AIRTIME.playlist.fnNew});*/

View file

@ -6,7 +6,7 @@ function setSmartBlockEvents() {
var form = $('#smart-block-form');
/********** ADD CRITERIA ROW **********/
form.find('.criteria_add').live('click', function(){
form.find('#criteria_add').live('click', function(){
var div = $('dd[id="sp_criteria-element"]').children('div:visible:last').next();
@ -52,7 +52,7 @@ function setSmartBlockEvents() {
sizeTextBoxes(newRowVal, 'sp_extra_input_text', 'sp_input_text');
//remove the 'criteria add' button from new modifier row
newRow.find('.criteria_add').remove();
newRow.find('#criteria_add').remove();
$(this).parent().after(newRow);
reindexElements();
@ -490,12 +490,12 @@ function removeSuccessMsg() {
}
function appendAddButton() {
var add_button = "<a class='ui-button sp-ui-button-icon-only criteria_add'>" +
"<span class='ui-icon ui-icon-plusthick'></span></a>";
var add_button = "<a class='btn btn-small' id='criteria_add'>" +
"<i class='icon-white icon-plus'></i></a>";
var rows = $('#smart_block_options'),
enabled = rows.find('select[name^="sp_criteria_field"]:enabled');
rows.find('.criteria_add').remove();
rows.find('#criteria_add').remove();
if (enabled.length > 1) {
rows.find('select[name^="sp_criteria_field"]:enabled:last')