Merge branch 'saas-dev' of github.com:sourcefabric/Airtime into saas-dev
This commit is contained in:
commit
f05157c376
10 changed files with 110 additions and 37 deletions
|
@ -77,6 +77,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
cb.append("<input id='super-checkbox' type='checkbox'>");
|
||||
}
|
||||
|
||||
var libEmpty = $('#library_empty');
|
||||
if (emptyRow.length > 0) {
|
||||
emptyRow.hide();
|
||||
var mediaType = parseInt($('.media_type_selector.selected').attr('data-selection-id')),
|
||||
|
@ -92,13 +93,13 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$('#library_empty_text').html(
|
||||
$.i18n._("You haven't added any " + opts.media + ".")
|
||||
+ "<br/>" + $.i18n._(opts.subtext)
|
||||
+ "<br/><a href='" + opts.href + "'>" + $.i18n._("Learn about " + opts.media) + "</a>"
|
||||
+ "<br/><a target='_blank' href='" + opts.href + "'>" + $.i18n._("Learn about " + opts.media) + "</a>"
|
||||
);
|
||||
}) ;
|
||||
});
|
||||
|
||||
$('#library_empty').show();
|
||||
libEmpty.show();
|
||||
} else {
|
||||
$('#library_empty').hide();
|
||||
libEmpty.hide();
|
||||
}
|
||||
|
||||
if ($("#show_builder_table").is(":visible")) {
|
||||
|
|
|
@ -421,17 +421,19 @@ var AIRTIME = (function(AIRTIME){
|
|||
$('.zend_form + .spl-no-margin > div:has(*:visible):last').css('margin-left', 0);
|
||||
}
|
||||
|
||||
function getId() {
|
||||
return parseInt($pl.find(".obj_id").val(), 10);
|
||||
function getId(pl) {
|
||||
pl = (pl === undefined) ? $pl : pl;
|
||||
return parseInt(pl.find(".obj_id").val(), 10);
|
||||
}
|
||||
|
||||
mod.getModified = function() {
|
||||
return parseInt($pl.find(".obj_lastMod").val(), 10);
|
||||
}
|
||||
mod.getModified = function(pl) {
|
||||
pl = (pl === undefined) ? $pl : pl;
|
||||
return parseInt(pl.find(".obj_lastMod").val(), 10);
|
||||
};
|
||||
|
||||
mod.setModified = function(modified) {
|
||||
$pl.find(".obj_lastMod").val(modified);
|
||||
}
|
||||
};
|
||||
|
||||
function setTitleLabel(title) {
|
||||
$pl.find(".title_obj_name").text(title);
|
||||
|
@ -569,6 +571,10 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (pane.get(0) == curr.get(0)) { // Closing the current tab, otherwise we don't need to switch tabs
|
||||
AIRTIME.showbuilder.switchTab(toPane, toTab);
|
||||
}
|
||||
|
||||
// If we close a tab that was causing tabs to wrap to the next row, we need to resize to change the
|
||||
// margin for the tab nav
|
||||
AIRTIME.playlist.onResize();
|
||||
}
|
||||
|
||||
mod.closeTab = function(id) {
|
||||
|
@ -1208,8 +1214,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
var url, id, lastMod, type, pl = (tabId === undefined) ? $pl : $('#pl-tab-content-' + tabId);
|
||||
|
||||
stopAudioPreview();
|
||||
id = (plid === undefined) ? getId() : plid;
|
||||
lastMod = mod.getModified();
|
||||
id = (plid === undefined) ? getId(pl) : plid;
|
||||
lastMod = mod.getModified(pl);
|
||||
type = pl.find('.obj_type').val();
|
||||
url = baseUrl+'playlist/delete';
|
||||
|
||||
|
@ -1558,6 +1564,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
mod.setAsActive = function() {
|
||||
$pl = $(".active-tab");
|
||||
$.post(baseUrl + "playlist/change-playlist", {"id": getId(), "type": $pl.find('.obj_type').val()});
|
||||
};
|
||||
|
||||
mod.init = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue