Merge branch 'cc-3627-close-playlist' into devel
This commit is contained in:
commit
74291cc248
|
@ -4,6 +4,7 @@ if (isset($this->obj)) {
|
||||||
$count = count($contents);
|
$count = count($contents);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<a href="#" class="close-round" id="lib_pl_close"></a>
|
||||||
<div class="btn-toolbar spl-no-top-margin clearfix">
|
<div class="btn-toolbar spl-no-top-margin clearfix">
|
||||||
<div class="btn-group pull-left">
|
<div class="btn-group pull-left">
|
||||||
<button id="spl_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
|
<button id="spl_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
|
||||||
|
|
|
@ -4,6 +4,7 @@ if (isset($this->obj)) {
|
||||||
$count = count($contents);
|
$count = count($contents);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<a href="#" class="close-round" id="lib_pl_close"></a>
|
||||||
<div class="btn-toolbar spl-no-top-margin clearfix">
|
<div class="btn-toolbar spl-no-top-margin clearfix">
|
||||||
<div class="btn-group pull-left">
|
<div class="btn-group pull-left">
|
||||||
<button id="spl_new" class="btn dropdown-toggle" data-toggle='dropdown' aria-disabled="false">
|
<button id="spl_new" class="btn dropdown-toggle" data-toggle='dropdown' aria-disabled="false">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<a href="#" class="close-round" id="lib_pl_close"></a>
|
||||||
<div class="btn-toolbar spl-no-top-margin clearfix">
|
<div class="btn-toolbar spl-no-top-margin clearfix">
|
||||||
<div class="btn-group pull-left">
|
<div class="btn-group pull-left">
|
||||||
<button id="ws_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
|
<button id="ws_new" class="btn dropdown-toggle" data-toggle="dropdown" aria-disabled="false">
|
||||||
|
|
|
@ -12,6 +12,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
viewport,
|
viewport,
|
||||||
$lib,
|
$lib,
|
||||||
$pl,
|
$pl,
|
||||||
|
$togglePl = $("<a id='pl_edit' class='btn btn-small' href='#' title='"+$.i18n._("Open playlist")+"'>"+$.i18n._("Open Playlist")+"</a>"),
|
||||||
widgetHeight,
|
widgetHeight,
|
||||||
resizeTimeout,
|
resizeTimeout,
|
||||||
width;
|
width;
|
||||||
|
@ -363,6 +364,13 @@ var AIRTIME = (function(AIRTIME){
|
||||||
removeButtonCheck();
|
removeButtonCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openPlaylistPanel() {
|
||||||
|
var screenWidth = Math.floor(viewport.width - 40);
|
||||||
|
$lib.width(Math.floor(screenWidth * 0.53));
|
||||||
|
$pl.show().width(Math.floor(screenWidth * 0.44));
|
||||||
|
$("#pl_edit").hide();
|
||||||
|
}
|
||||||
|
|
||||||
//Purpose of this function is to iterate over all playlist elements
|
//Purpose of this function is to iterate over all playlist elements
|
||||||
//and verify whether they can be previewed by the browser or not. If not
|
//and verify whether they can be previewed by the browser or not. If not
|
||||||
//then the playlist element is greyed out
|
//then the playlist element is greyed out
|
||||||
|
@ -709,7 +717,17 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$lib.on("click", "#pl_edit", function() {
|
||||||
|
openPlaylistPanel();
|
||||||
|
});
|
||||||
|
|
||||||
|
$pl.on("click", "#lib_pl_close", function() {
|
||||||
|
var screenWidth = Math.floor(viewport.width - 40);
|
||||||
|
$pl.hide();
|
||||||
|
$lib.width(screenWidth).find("#library_display_length").append($togglePl.show());
|
||||||
|
});
|
||||||
|
|
||||||
$('#save_button').live("click", function(event){
|
$('#save_button').live("click", function(event){
|
||||||
/* Smart blocks: get name, description, and criteria
|
/* Smart blocks: get name, description, and criteria
|
||||||
* Playlists: get name, description
|
* Playlists: get name, description
|
||||||
|
@ -746,7 +764,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#pl-bl-clear-content").live("click", function(event) {
|
$("#pl-bl-clear-content").live("click", function(event) {
|
||||||
var sUrl = baseUrl+"playlist/empty-content",
|
var sUrl = baseUrl+"playlist/empty-content",
|
||||||
oData = {};
|
oData = {};
|
||||||
|
@ -887,7 +905,9 @@ var AIRTIME = (function(AIRTIME){
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.fnEdit = function(id, type, url) {
|
mod.fnEdit = function(id, type, url) {
|
||||||
|
if ($pl.is(":hidden")) {
|
||||||
|
openPlaylistPanel();
|
||||||
|
}
|
||||||
stopAudioPreview();
|
stopAudioPreview();
|
||||||
|
|
||||||
$.post(url,
|
$.post(url,
|
||||||
|
|
Loading…
Reference in New Issue