Showbuilder checkboxes and style fixes
This commit is contained in:
parent
83902ebbbe
commit
cc36fcd37b
|
@ -217,6 +217,40 @@ class LibraryController extends Zend_Controller_Action
|
|||
// is a cloud_file and handle it appropriately.
|
||||
$url = $baseUrl."api/get-media/file/$id/download/true";
|
||||
$menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url);
|
||||
|
||||
// SOUNDCLOUD MENU OPTION
|
||||
$ownerId = empty($obj) ? $file->getFileOwnerId() : $obj->getCreatorId();
|
||||
if ($isAdminOrPM || $ownerId == $user->getId()) {
|
||||
$soundcloudService = new SoundcloudService();
|
||||
if ($type === "audioclip" && $soundcloudService->hasAccessToken()) {
|
||||
|
||||
//create a menu separator
|
||||
$menu["sep1"] = "-----------";
|
||||
|
||||
//create a sub menu for Soundcloud actions.
|
||||
$menu["soundcloud"] = array("name" => _(SOUNDCLOUD), "icon" => "soundcloud", "items" => array());
|
||||
|
||||
$serviceId = $soundcloudService->getServiceId($id);
|
||||
if (!is_null($file) && $serviceId != 0) {
|
||||
$menu["soundcloud"]["items"]["view"] = array("name" => _("View track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/view-on-sound-cloud/id/{$id}");
|
||||
$menu["soundcloud"]["items"]["remove"] = array("name" => _("Remove track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/delete/id/{$id}");
|
||||
} else {
|
||||
// If a reference exists for this file ID, that means the user has uploaded the track
|
||||
// but we haven't yet gotten a response from Celery, so disable the menu item
|
||||
if ($soundcloudService->referenceExists($id)) {
|
||||
$menu["soundcloud"]["items"]["upload"] = array(
|
||||
"name" => _("Upload track"), "icon" => "soundcloud",
|
||||
"url" => $baseUrl . "soundcloud/upload/id/{$id}", "disabled" => true
|
||||
);
|
||||
} else {
|
||||
$menu["soundcloud"]["items"]["upload"] = array(
|
||||
"name" => _("Upload track"), "icon" => "soundcloud",
|
||||
"url" => $baseUrl . "soundcloud/upload/id/{$id}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($type === "playlist" || $type === "block") {
|
||||
if ($type === 'playlist') {
|
||||
$obj = new Application_Model_Playlist($id);
|
||||
|
@ -263,40 +297,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
// SOUNDCLOUD MENU OPTION
|
||||
$ownerId = empty($obj) ? $file->getFileOwnerId() : $obj->getCreatorId();
|
||||
if ($isAdminOrPM || $ownerId == $user->getId()) {
|
||||
$soundcloudService = new SoundcloudService();
|
||||
if ($type === "audioclip" && $soundcloudService->hasAccessToken()) {
|
||||
|
||||
//create a menu separator
|
||||
$menu["sep1"] = "-----------";
|
||||
|
||||
//create a sub menu for Soundcloud actions.
|
||||
$menu["soundcloud"] = array("name" => _(SOUNDCLOUD), "icon" => "soundcloud", "items" => array());
|
||||
|
||||
$serviceId = $soundcloudService->getServiceId($id);
|
||||
if (!is_null($file) && $serviceId != 0) {
|
||||
$menu["soundcloud"]["items"]["view"] = array("name" => _("View track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/view-on-sound-cloud/id/{$id}");
|
||||
$menu["soundcloud"]["items"]["remove"] = array("name" => _("Remove track"), "icon" => "soundcloud", "url" => $baseUrl . "soundcloud/delete/id/{$id}");
|
||||
} else {
|
||||
// If a reference exists for this file ID, that means the user has uploaded the track
|
||||
// but we haven't yet gotten a response from Celery, so disable the menu item
|
||||
if ($soundcloudService->referenceExists($id)) {
|
||||
$menu["soundcloud"]["items"]["upload"] = array(
|
||||
"name" => _("Upload track"), "icon" => "soundcloud",
|
||||
"url" => $baseUrl . "soundcloud/upload/id/{$id}", "disabled" => true
|
||||
);
|
||||
} else {
|
||||
$menu["soundcloud"]["items"]["upload"] = array(
|
||||
"name" => _("Upload track"), "icon" => "soundcloud",
|
||||
"url" => $baseUrl . "soundcloud/upload/id/{$id}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($menu)) {
|
||||
$menu["noaction"] = array("name"=>_("No action available"));
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class Application_Form_ShowBuilderNew extends Zend_Form_SubForm
|
|||
|
||||
private function getShowNames()
|
||||
{
|
||||
$showNames = array("0" => "Filter by Show");
|
||||
$showNames = array("0" => _("Filter by Show"));
|
||||
|
||||
$shows = CcShowQuery::create()
|
||||
->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)
|
||||
|
|
|
@ -9,7 +9,7 @@ if ($this->showPlaylist) {
|
|||
$display = "display:none";
|
||||
}
|
||||
?>
|
||||
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded" style="height:697px; width:720px;<?php echo $display?>">
|
||||
<div class="side_playlist pl-content ui-widget ui-widget-content block-shadow omega-block padded" style="height:697px; width:720px;<?php echo $display?>">
|
||||
<?php if ($this->type == 'block') {
|
||||
echo $this->render('playlist/smart-block.phtml');
|
||||
} else if ($this->type == 'playlist') {
|
||||
|
|
|
@ -28,9 +28,9 @@ if (isset($this->obj)) {
|
|||
</div>
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input id='obj_type' type='hidden' value='playlist'></input>
|
||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input class='obj_type' type='hidden' value='playlist'></input>
|
||||
<div class="playlist_title">
|
||||
<h3 id="obj_name">
|
||||
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||
|
@ -65,7 +65,7 @@ if (isset($this->obj)) {
|
|||
|
||||
<div class="clear"></div>
|
||||
<div class="" style="clear:both; float:none; width:100%;">
|
||||
<ul id="spl_sortable">
|
||||
<ul class="spl_sortable">
|
||||
<?php $this->contents = $contents;
|
||||
echo $this->render('playlist/update.phtml') ?>
|
||||
</ul>
|
||||
|
|
|
@ -25,9 +25,9 @@ if (isset($this->obj)) {
|
|||
</div>
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input id='obj_type' type='hidden' value='block'></input>
|
||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input class='obj_type' type='hidden' value='block'></input>
|
||||
<div class="playlist_title">
|
||||
<h3 id="obj_name">
|
||||
<a id="playlist_name_display" contenteditable="true">
|
||||
|
@ -70,7 +70,7 @@ if (isset($this->obj)) {
|
|||
|
||||
<div class="clear"></div>
|
||||
<div class="" style="clear:both; float:none; width:100%;">
|
||||
<ul id="spl_sortable">
|
||||
<ul class="spl_sortable">
|
||||
<?php $this->contents = $contents;
|
||||
echo $this->render('playlist/update.phtml') ?>
|
||||
</ul>
|
||||
|
|
|
@ -38,9 +38,9 @@ if (isset($this->obj)) {
|
|||
</div>
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input id='obj_type' type='hidden' value='playlist'></input>
|
||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input class='obj_type' type='hidden' value='playlist'></input>
|
||||
<div class="playlist_title">
|
||||
<h3 id="obj_name">
|
||||
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||
|
@ -75,7 +75,7 @@ if (isset($this->obj)) {
|
|||
|
||||
<div class="clear"></div>
|
||||
<div class="" style="clear:both; float:none; width:100%;">
|
||||
<ul id="spl_sortable">
|
||||
<ul class="spl_sortable">
|
||||
<?php $this->contents = $contents;
|
||||
echo $this->render('playlist/update.phtml') ?>
|
||||
</ul>
|
||||
|
|
|
@ -35,9 +35,9 @@ if (isset($this->obj)) {
|
|||
</div>
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input id='obj_type' type='hidden' value='block'></input>
|
||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||
<input class='obj_type' type='hidden' value='block'></input>
|
||||
<div class="playlist_title">
|
||||
<h3 id="obj_name">
|
||||
<a id="playlist_name_display" contenteditable="true">
|
||||
|
@ -80,7 +80,7 @@ if (isset($this->obj)) {
|
|||
|
||||
<div class="clear"></div>
|
||||
<div class="" style="clear:both; float:none; width:100%;">
|
||||
<ul id="spl_sortable">
|
||||
<ul class="spl_sortable">
|
||||
<?php $this->contents = $contents;
|
||||
echo $this->render('playlist/update.phtml') ?>
|
||||
</ul>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
</div>
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
|
||||
<input id="obj_type" type="hidden" value="webstream"/>
|
||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||
<input class="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
|
||||
<input class="obj_type" type="hidden" value="webstream"/>
|
||||
<div class="status" style="display:none;"></div>
|
||||
|
||||
<div class="playlist_title">
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
</div>
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
|
||||
<input id="obj_type" type="hidden" value="webstream"/>
|
||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||
<input class="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
|
||||
<input class="obj_type" type="hidden" value="webstream"/>
|
||||
<div class="status" style="display:none;"></div>
|
||||
|
||||
<div class="playlist_title">
|
||||
|
|
|
@ -25,6 +25,11 @@ div.ColVis_collectionBackground {
|
|||
flex-flow: row wrap;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
-webkit-transition: top 0.2s linear;
|
||||
-moz-transition: top 0.2s linear;
|
||||
-o-transition: top 0.2s linear;
|
||||
transition: top 0.2s linear;
|
||||
}
|
||||
|
||||
/* Usability hint */
|
||||
|
@ -65,6 +70,8 @@ div.ColVis_collectionBackground {
|
|||
|
||||
.content-pane {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
|
||||
border: 1px solid #202020;
|
||||
border-top: 1px solid #353535;
|
||||
|
@ -207,6 +214,7 @@ div.ColVis_collectionBackground {
|
|||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
#library_display_processing {
|
||||
|
@ -337,9 +345,10 @@ div.ColVis_collectionBackground {
|
|||
}
|
||||
|
||||
.sb-options-form {
|
||||
position: relative;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.sb-options-form label {
|
||||
|
@ -348,8 +357,8 @@ div.ColVis_collectionBackground {
|
|||
}
|
||||
|
||||
#sb_show_filter {
|
||||
float: right;
|
||||
margin-left: 4px;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
|
@ -425,7 +434,7 @@ div.ColVis_collectionBackground {
|
|||
|
||||
/* Playlist/Block/Webstream Editors */
|
||||
|
||||
#side_playlist {
|
||||
.side_playlist {
|
||||
/*margin-top: 34px;*/
|
||||
width: 100%; /* Override because we're using flexbox */
|
||||
|
||||
|
@ -441,7 +450,7 @@ div.ColVis_collectionBackground {
|
|||
padding: 4px;
|
||||
}
|
||||
|
||||
#spl_sortable .list-item-container {
|
||||
.spl_sortable .list-item-container {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
|
@ -499,6 +508,41 @@ div.ColVis_collectionBackground {
|
|||
overflow: auto;
|
||||
}
|
||||
|
||||
#show_builder .ColVis.TableTools {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
.ColVis.TableTools {
|
||||
margin: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
.ColVis.TableTools > button {
|
||||
padding: 3px 9px;
|
||||
}
|
||||
|
||||
#show_builder .fg-toolbar > .btn-toolbar {
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
left: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#show_builder .dataTables_scrolling {
|
||||
top: 69px;
|
||||
}
|
||||
|
||||
.sb-padded > .fg-toolbar {
|
||||
height: 66px;
|
||||
}
|
||||
|
||||
.fg-toolbar .btn-toolbar {
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.datatable tr, .datatable td {
|
||||
border: none !important;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
#side_playlist {
|
||||
.side_playlist {
|
||||
width: 40%;
|
||||
font-size: 16px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#side_playlist,#side_playlist ul,#side_playlist li {
|
||||
.side_playlist,.side_playlist ul,.side_playlist li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#spl_sortable,#spl_sortable>li,#side_playlist>div,#spl_editor,.spl_artist,.spl_cue_in,.spl_fade_in,.spl_cue_out,.spl_fade_out
|
||||
.spl_sortable,.spl_sortable>li,.side_playlist>div,#spl_editor,.spl_artist,.spl_cue_in,.spl_fade_in,.spl_cue_out,.spl_fade_out
|
||||
{
|
||||
clear: left;
|
||||
}
|
||||
|
||||
#spl_sortable>li {
|
||||
.spl_sortable>li {
|
||||
width: 100%;
|
||||
margin-bottom: -1px;
|
||||
position: relative;
|
||||
|
@ -22,21 +22,21 @@
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*#side_playlist button {
|
||||
/*.side_playlist button {
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
margin: 0 7px 20px 0;
|
||||
}*/
|
||||
#side_playlist textarea {
|
||||
.side_playlist textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#side_playlist textarea {
|
||||
.side_playlist textarea {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#spl_sortable {
|
||||
.spl_sortable {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
padding-bottom: 50px;
|
||||
|
@ -46,7 +46,7 @@
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#side_playlist li div.list-item-container,#side_playlist li div.list-item-container.ui-state-active
|
||||
.side_playlist li div.list-item-container,.side_playlist li div.list-item-container.ui-state-active
|
||||
{
|
||||
height: 56px;
|
||||
border: none;
|
||||
|
@ -145,7 +145,7 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#side_playlist h3 {
|
||||
.side_playlist h3 {
|
||||
font-size: 20px;
|
||||
margin: 9px 0 3px 0;
|
||||
padding: 0;
|
||||
|
@ -155,7 +155,7 @@
|
|||
float: left;
|
||||
}
|
||||
|
||||
#side_playlist h4 {
|
||||
.side_playlist h4 {
|
||||
font-size: 15px;
|
||||
margin: 8px 0 10px 0;
|
||||
padding: 0;
|
||||
|
@ -165,11 +165,11 @@
|
|||
float: left;
|
||||
}
|
||||
|
||||
#side_playlist h3+h4 {
|
||||
.side_playlist h3+h4 {
|
||||
margin: 0 0 11px 0;
|
||||
}
|
||||
|
||||
#spl_sortable div.big_play {
|
||||
.spl_sortable div.big_play {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 50px;
|
||||
|
@ -183,7 +183,7 @@
|
|||
color-stop(100%, #666666) );
|
||||
}
|
||||
|
||||
#spl_sortable div.big_play_disabled {
|
||||
.spl_sortable div.big_play_disabled {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 50px;
|
||||
|
@ -197,7 +197,7 @@
|
|||
color-stop(100%, #666666) );
|
||||
}
|
||||
|
||||
#spl_sortable div.big_play:hover {
|
||||
.spl_sortable div.big_play:hover {
|
||||
border: 1px solid #282828;
|
||||
background-color: #3b3b3b;
|
||||
background: -moz-linear-gradient(top, #3b3b3b 0, #292929 100%);
|
||||
|
@ -206,31 +206,31 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#spl_sortable div.big_play .ui-icon {
|
||||
.spl_sortable div.big_play .ui-icon {
|
||||
margin: 17px 0 0 1px;
|
||||
}
|
||||
|
||||
#spl_sortable div.big_play_disabled .ui-icon {
|
||||
.spl_sortable div.big_play_disabled .ui-icon {
|
||||
margin: 17px 0 0 1px;
|
||||
}
|
||||
|
||||
#spl_sortable div.big_play:hover .ui-icon-play,#spl_sortable div.big_play:hover .ui-icon-pause
|
||||
.spl_sortable div.big_play:hover .ui-icon-play,.spl_sortable div.big_play:hover .ui-icon-pause
|
||||
{
|
||||
background-image: url(redmond/images/ui-icons_ff5d1a_256x240.png);
|
||||
}
|
||||
|
||||
#spl_sortable .ui-icon-closethick {
|
||||
.spl_sortable .ui-icon-closethick {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 6px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
#spl_sortable .ui-icon-closethick:hover {
|
||||
.spl_sortable .ui-icon-closethick:hover {
|
||||
background-image: url(redmond/images/ui-icons_ff5d1a_256x240.png)
|
||||
}
|
||||
|
||||
#spl_sortable .spl_fade_control {
|
||||
.spl_sortable .spl_fade_control {
|
||||
position: absolute;
|
||||
right: 35px;
|
||||
z-index: 6;
|
||||
|
@ -240,11 +240,11 @@
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
#spl_sortable li .container {
|
||||
.spl_sortable li .container {
|
||||
|
||||
}
|
||||
|
||||
#spl_sortable .text-row {
|
||||
.spl_sortable .text-row {
|
||||
height: 20px;
|
||||
line-height: 19px;
|
||||
overflow: hidden;
|
||||
|
@ -254,38 +254,38 @@
|
|||
float: none;
|
||||
}
|
||||
|
||||
#spl_sortable .top {
|
||||
.spl_sortable .top {
|
||||
padding-top: 9px;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_control.ui-state-default {
|
||||
.spl_sortable li .spl_fade_control.ui-state-default {
|
||||
background: transparent url(images/crossfade_playlist.png) no-repeat 0 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_control.ui-state-active {
|
||||
.spl_sortable li .spl_fade_control.ui-state-active {
|
||||
background: transparent url(images/crossfade_playlist.png) no-repeat 0
|
||||
-30px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .crossfade,#spl_sortable li .cue-edit {
|
||||
.spl_sortable li .crossfade,.spl_sortable li .cue-edit {
|
||||
background: #debc9e url(images/crossfade_bg.png) repeat-x 0 0 !important;
|
||||
border: 1px solid #5d5d5d;
|
||||
border-width: 1px 0 0 0;
|
||||
min-height: 35px;
|
||||
}
|
||||
|
||||
#spl_sortable li .cue-edit {
|
||||
.spl_sortable li .cue-edit {
|
||||
background: #b6d1d5 url(images/cue-editor_bg.png) repeat-x 0 0
|
||||
!important;
|
||||
}
|
||||
|
||||
#spl_sortable dl.inline-list {
|
||||
.spl_sortable dl.inline-list {
|
||||
margin: 10px 0 0 37px;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_start,#spl_sortable li .spl_fade_end {
|
||||
.spl_sortable li .spl_fade_start,.spl_sortable li .spl_fade_end {
|
||||
background-color: transparent;
|
||||
float: right;
|
||||
font-size: 9px;
|
||||
|
@ -295,22 +295,22 @@
|
|||
margin-top: 2px;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_start.ui-state-default {
|
||||
.spl_sortable li .spl_fade_start.ui-state-default {
|
||||
background: transparent url(images/fade_in.png) no-repeat 0 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_start.ui-state-active {
|
||||
.spl_sortable li .spl_fade_start.ui-state-active {
|
||||
background: transparent url(images/fade_in.png) no-repeat 0 -30px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_end.ui-state-default {
|
||||
.spl_sortable li .spl_fade_end.ui-state-default {
|
||||
background: transparent url(images/fade_out.png) no-repeat 0 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_end.ui-state-active {
|
||||
.spl_sortable li .spl_fade_end.ui-state-active {
|
||||
background: transparent url(images/fade_out.png) no-repeat 0 -30px;
|
||||
border: none;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@
|
|||
z-index: 3;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_cue {
|
||||
.spl_sortable li .spl_cue {
|
||||
background-color: transparent;
|
||||
float: right;
|
||||
font-size: 9px;
|
||||
|
@ -383,17 +383,17 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_cue.ui-state-default {
|
||||
.spl_sortable li .spl_cue.ui-state-default {
|
||||
background: transparent url(images/cue_playlist.png) no-repeat 0 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_cue.ui-state-default:hover {
|
||||
.spl_sortable li .spl_cue.ui-state-default:hover {
|
||||
background: transparent url(images/cue_playlist.png) no-repeat 0 -15px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_cue.ui-state-active,#spl_sortable li .spl_cue.ui-state-active:hover
|
||||
.spl_sortable li .spl_cue.ui-state-active,.spl_sortable li .spl_cue.ui-state-active:hover
|
||||
{
|
||||
background: transparent url(images/cue_playlist.png) no-repeat 0 -30px;
|
||||
border: none;
|
||||
|
@ -406,30 +406,30 @@
|
|||
clear: both;
|
||||
}
|
||||
|
||||
#side_playlist .playlist_title h3,#side_playlist .playlist_title h4 {
|
||||
.side_playlist .playlist_title h3,.side_playlist .playlist_title h4 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#side_playlist .playlist_title h3 {
|
||||
.side_playlist .playlist_title h3 {
|
||||
float: left;
|
||||
width: 84%;
|
||||
}
|
||||
|
||||
#side_playlist .playlist_title h4 {
|
||||
.side_playlist .playlist_title h4 {
|
||||
float: right;
|
||||
clear: none;
|
||||
font-size: 16px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#side_playlist .playlist_title h3 a {
|
||||
.side_playlist .playlist_title h3 a {
|
||||
padding: 0 22px 0 2px;
|
||||
background: url(images/icon_edit_l.png) no-repeat right center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#side_playlist .playlist_title h3 a:hover {
|
||||
.side_playlist .playlist_title h3 a:hover {
|
||||
background-color: #D8D8D8;
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#side_playlist .playlist_title h3 input[type="text"] {
|
||||
.side_playlist .playlist_title h3 input[type="text"] {
|
||||
background-color: #dddddd;
|
||||
border: 1px solid #8F8F8F;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
@ -453,12 +453,12 @@
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form {
|
||||
.side_playlist .zend_form {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form dt,#side_playlist .zend_form dd {
|
||||
.side_playlist .zend_form dt,.side_playlist .zend_form dd {
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 4px 0 0;
|
||||
|
@ -466,27 +466,27 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form dd.buttons {
|
||||
.side_playlist .zend_form dd.buttons {
|
||||
margin-top: 8px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form dd.buttons .ui-button {
|
||||
.side_playlist .zend_form dd.buttons .ui-button {
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form dt {
|
||||
.side_playlist .zend_form dt {
|
||||
color: #5B5B5B;
|
||||
font-weight: bold;
|
||||
margin: 9px 0 0;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form dt:first-child {
|
||||
.side_playlist .zend_form dt:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#side_playlist .zend_form dd textarea {
|
||||
.side_playlist .zend_form dd textarea {
|
||||
background-color: #dddddd;
|
||||
border: 1px solid #5B5B5B;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
@ -499,17 +499,17 @@
|
|||
width: 99.7%;
|
||||
}
|
||||
|
||||
#side_playlist fieldset {
|
||||
.side_playlist fieldset {
|
||||
border: 1px solid #9a9a9a;
|
||||
margin: 0 0 8px 0;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#side_playlist fieldset.closed .zend_form {
|
||||
.side_playlist fieldset.closed .zend_form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#side_playlist fieldset.closed {
|
||||
.side_playlist fieldset.closed {
|
||||
border-width: 1px 0 0;
|
||||
margin-bottom: -6px;
|
||||
margin-left: 1px;
|
||||
|
@ -526,7 +526,7 @@ fieldset>legend {
|
|||
background-image: url(redmond/images/ui-icons_454545_256x240.png);
|
||||
}
|
||||
|
||||
#side_playlist .zend_form input,#side_playlist .zend_form textarea {
|
||||
.side_playlist .zend_form input,.side_playlist .zend_form textarea {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -160,10 +160,10 @@ fieldset {
|
|||
}
|
||||
|
||||
/* Clearfix */
|
||||
.clearfix:after, #side_playlist li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}
|
||||
.clearfix, #side_playlist li { display: inline-block; }
|
||||
.clearfix:after, .side_playlist li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}
|
||||
.clearfix, .side_playlist li { display: inline-block; }
|
||||
* html .clearfix, * html li { height: 1%;}
|
||||
.clearfix, #side_playlist li { display: block; }
|
||||
.clearfix, .side_playlist li { display: block; }
|
||||
|
||||
/* Master Panel */
|
||||
|
||||
|
@ -2000,19 +2000,19 @@ span.errors.sp-errors{
|
|||
#show_content_dialog .datatable {
|
||||
margin-top:8px;
|
||||
}
|
||||
.simple-formblock.metadata, #side_playlist .simple-formblock.metadata {
|
||||
.simple-formblock.metadata, .side_playlist .simple-formblock.metadata {
|
||||
border:none;
|
||||
width:auto;
|
||||
display:block;
|
||||
padding: 2px;
|
||||
}
|
||||
#side_playlist .simple-formblock.metadata .input_text, #side_playlist .simple-formblock.metadata .input_text_area {
|
||||
.side_playlist .simple-formblock.metadata .input_text, .side_playlist .simple-formblock.metadata .input_text_area {
|
||||
width:95%;
|
||||
}
|
||||
#side_playlist .simple-formblock.metadata.simple-formblock dd {
|
||||
.side_playlist .simple-formblock.metadata.simple-formblock dd {
|
||||
width:70%;
|
||||
}
|
||||
#side_playlist h3.plain {
|
||||
.side_playlist h3.plain {
|
||||
float:none;
|
||||
font-size:18px;
|
||||
margin:2px 0 20px 0;
|
||||
|
@ -3345,8 +3345,13 @@ dd .stream-status {
|
|||
* absolute positioning in Airtime) when we want
|
||||
* to focus on responsive design.
|
||||
*/
|
||||
.usability_hint + .wrapper {
|
||||
.usability_hint:not(.hidden) + .wrapper {
|
||||
top: 170px;
|
||||
|
||||
-webkit-transition: top 0.2s linear;
|
||||
-moz-transition: top 0.2s linear;
|
||||
-o-transition: top 0.2s linear;
|
||||
transition: top 0.2s linear;
|
||||
}
|
||||
|
||||
.usability_hint {
|
||||
|
|
|
@ -82,8 +82,8 @@ function openAudioPreview(p_event) {
|
|||
p_event.stopPropagation();
|
||||
|
||||
var audioFileID = $(this).attr('audioFile');
|
||||
var objId = $('#obj_id:first').attr('value');
|
||||
var objType = $('#obj_type:first').attr('value');
|
||||
var objId = $('.obj_id:first').attr('value');
|
||||
var objType = $('.obj_type:first').attr('value');
|
||||
var playIndex = $(this).parent().parent().attr('id');
|
||||
playIndex = playIndex.substring(4); //remove the spl_
|
||||
|
||||
|
@ -169,19 +169,18 @@ function getUsabilityHint() {
|
|||
var current_hint = $hint_div.html();
|
||||
if (json === "") {
|
||||
// there are no more hints to display to the user
|
||||
$hint_div.hide();
|
||||
$hint_div.hide("slow").addClass("hidden");
|
||||
} else if (current_hint !== json) {
|
||||
// we only change the message if it is new
|
||||
if ($hint_div.is(":visible")) {
|
||||
$hint_div.hide();
|
||||
$hint_div.hide("slow").addClass("hidden");
|
||||
}
|
||||
$hint_div.html(json);
|
||||
$hint_div.show("slow");
|
||||
|
||||
$hint_div.show("slow").removeClass("hidden");
|
||||
} else {
|
||||
// hint is the same before we hid it so we just need to show it
|
||||
if ($hint_div.is(":hidden")) {
|
||||
$hint_div.show();
|
||||
$hint_div.show("slow").removeClass("hidden");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -7,7 +7,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
LIB_SELECTED_CLASS = "lib-selected",
|
||||
chosenItems = {},
|
||||
visibleChosenItems = {},
|
||||
$previouslySelected;
|
||||
$previouslySelected,
|
||||
flagForDeselection = false;
|
||||
|
||||
|
||||
// we need to know whether the criteria value is string or
|
||||
|
@ -253,6 +254,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
if ($el.length !== 0) {
|
||||
mod.highlightItem($el);
|
||||
mod.checkItem($el);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -279,6 +281,14 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
};
|
||||
|
||||
mod.checkItem = function($el) {
|
||||
$el.find(".library_checkbox > input").prop('checked', true);
|
||||
};
|
||||
|
||||
mod.uncheckItem = function($el) {
|
||||
$el.find(".library_checkbox > input").prop('checked', false);
|
||||
};
|
||||
|
||||
mod.highlightItem = function($el) {
|
||||
$el.addClass(LIB_SELECTED_CLASS);
|
||||
};
|
||||
|
@ -310,11 +320,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
mod.selectCurrentPage = function() {
|
||||
$.fn.reverse = [].reverse;
|
||||
var $trs = $libTable.find("tbody").find("tr").reverse();
|
||||
$trs.addClass(LIB_SELECTED_CLASS);
|
||||
|
||||
$trs.each(function(i, el){
|
||||
$el = $(this);
|
||||
mod.addToChosen($el);
|
||||
mod.selectItem($(el));
|
||||
mod.checkItem($(el));
|
||||
});
|
||||
|
||||
mod.checkToolBarIcons();
|
||||
|
@ -326,13 +335,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
* from gmail)
|
||||
*/
|
||||
mod.deselectCurrentPage = function() {
|
||||
var $trs = $libTable.find("tr"), id;
|
||||
$trs.removeClass(LIB_SELECTED_CLASS);
|
||||
var $trs = $libTable.find("tr");
|
||||
|
||||
$trs.each(function(i, el){
|
||||
$el = $(this);
|
||||
id = $el.attr("id");
|
||||
delete chosenItems[id];
|
||||
mod.deselectItem($(el));
|
||||
mod.uncheckItem($(el));
|
||||
});
|
||||
|
||||
mod.checkToolBarIcons();
|
||||
|
@ -340,7 +347,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
mod.selectNone = function() {
|
||||
var $trs = $libTable.find("tr");
|
||||
$trs.removeClass(LIB_SELECTED_CLASS);
|
||||
$trs.each(function(i, el){
|
||||
mod.deselectItem($(el));
|
||||
mod.uncheckItem($(el));
|
||||
});
|
||||
$previouslySelected = undefined;
|
||||
|
||||
chosenItems = {};
|
||||
|
@ -349,9 +359,20 @@ var AIRTIME = (function(AIRTIME) {
|
|||
};
|
||||
|
||||
mod.fnDeleteItems = function(aMedia) {
|
||||
|
||||
//Prevent the user from spamming the delete button while the AJAX request is in progress
|
||||
AIRTIME.button.disableButton("btn-group #sb-trash", false);
|
||||
var openTabObjectIds = $(".obj_id"),
|
||||
mediaIds = [];
|
||||
for (var i in aMedia) {
|
||||
mediaIds.push(aMedia[i].id);
|
||||
}
|
||||
openTabObjectIds.each(function(i, el) {
|
||||
var v = $(el).val();
|
||||
if ($.inArray(v, mediaIds)) {
|
||||
AIRTIME.playlist.fnOpenPlaylist({id: v});
|
||||
AIRTIME.playlist.closeTab();
|
||||
}
|
||||
});
|
||||
|
||||
$.post(baseUrl+"library/delete",
|
||||
{"format": "json", "media": aMedia},
|
||||
|
@ -374,8 +395,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
item,
|
||||
temp,
|
||||
aMedia = [],
|
||||
currentObjId = $("#side_playlist").find("#obj_id").val(),
|
||||
currentObjType = $("#side_playlist").find("#obj_type").val(),
|
||||
currentObjId = $(".side_playlist.active-tab").find(".obj_id").val(),
|
||||
currentObjType = $(".side_playlist.active-tab").find(".obj_type").val(),
|
||||
closeObj = false;
|
||||
|
||||
// process selected files/playlists.
|
||||
|
@ -763,35 +784,6 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
AIRTIME.library.setupLibraryToolbar(oTable);
|
||||
|
||||
$libTable.find("tbody").on("click", ".library_checkbox", function(ev) {
|
||||
var $cb = $(this),
|
||||
$tr = $cb.parents("tr"),
|
||||
// Get the ID of the selected row
|
||||
$rowId = $tr.attr("id");
|
||||
|
||||
if (!$tr.hasClass(LIB_SELECTED_CLASS)) {
|
||||
if (ev.shiftKey && $previouslySelected !== undefined) {
|
||||
// If the selected row comes before the previously selected row,
|
||||
// we want to select previous rows, otherwise we select next
|
||||
if ($previouslySelected.prevAll("#"+$rowId).length !== 0) {
|
||||
$previouslySelected.prevUntil($tr).each(function(i, el) {
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
} else {
|
||||
$previouslySelected.nextUntil($tr).each(function(i, el) {
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
mod.selectItem($tr);
|
||||
// Remember this row so we can properly multiselect
|
||||
$previouslySelected = $tr;
|
||||
} else {
|
||||
mod.deselectItem($tr);
|
||||
}
|
||||
});
|
||||
|
||||
$libTable.find("tbody").on("dblclick", "tr", function(ev) {
|
||||
var data = $(this).data("aData");
|
||||
AIRTIME.library.dblClickAdd(data, data.ftype);
|
||||
|
@ -802,33 +794,28 @@ var AIRTIME = (function(AIRTIME) {
|
|||
// Get the ID of the selected row
|
||||
$rowId = $tr.attr("id");
|
||||
|
||||
if (ev.shiftKey && $previouslySelected !== undefined) {
|
||||
if ($previouslySelected.attr("id") == $rowId) {
|
||||
return;
|
||||
}
|
||||
if (!$tr.hasClass(LIB_SELECTED_CLASS)) {
|
||||
if (ev.shiftKey && $previouslySelected !== undefined) {
|
||||
if ($previouslySelected.attr("id") == $rowId) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the selected row comes before the previously selected row,
|
||||
// we want to select previous rows, otherwise we select next
|
||||
if ($previouslySelected.prevAll("#"+$rowId).length !== 0) {
|
||||
$previouslySelected.prevUntil($tr).each(function(i, el){
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
} else {
|
||||
$previouslySelected.nextUntil($tr).each(function(i, el){
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
// If the selected row comes before the previously selected row,
|
||||
// we want to select previous rows, otherwise we select next
|
||||
if ($previouslySelected.prevAll("#" + $rowId).length !== 0) {
|
||||
$previouslySelected.prevUntil($tr).each(function (i, el) {
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
} else {
|
||||
$previouslySelected.nextUntil($tr).each(function (i, el) {
|
||||
mod.selectItem($(el));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
mod.selectItem($tr);
|
||||
} else if (ev.ctrlKey) {
|
||||
mod.selectItem($tr);
|
||||
mod.checkItem($tr);
|
||||
} else {
|
||||
if (!$tr.hasClass(LIB_SELECTED_CLASS)) {
|
||||
$("." + LIB_SELECTED_CLASS).each(function (i, el) {
|
||||
mod.deselectItem($(el))
|
||||
});
|
||||
}
|
||||
mod.selectItem($tr);
|
||||
flagForDeselection = true;
|
||||
}
|
||||
|
||||
// Remember this row so we can properly multiselect
|
||||
|
@ -836,11 +823,14 @@ var AIRTIME = (function(AIRTIME) {
|
|||
});
|
||||
|
||||
$libTable.find("tbody").on("click", "tr", function(ev) {
|
||||
if (!ev.ctrlKey && !ev.shiftKey) {
|
||||
$("." + LIB_SELECTED_CLASS).each(function (i, el) {
|
||||
mod.deselectItem($(el))
|
||||
});
|
||||
mod.selectItem($(this));
|
||||
//ev.preventDefault();
|
||||
|
||||
if (flagForDeselection) {
|
||||
flagForDeselection = false;
|
||||
mod.deselectItem($(this));
|
||||
mod.uncheckItem($(this));
|
||||
} else {
|
||||
mod.checkItem($(this));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -872,23 +862,20 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
// define an edit callback.
|
||||
if (oItems.edit !== undefined) {
|
||||
|
||||
if (data.ftype === "audioclip") {
|
||||
callback = function() {
|
||||
$.get(oItems.edit.url, {format: "json"}, function(json){
|
||||
buildEditMetadataDialog(json);
|
||||
AIRTIME.playlist.fileMdEdit(json);
|
||||
});
|
||||
};
|
||||
} else if (data.ftype === "playlist" || data.ftype === "block") {
|
||||
callback = function() {
|
||||
var url = baseUrl+'Playlist/edit';
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, baseUrl+'new-playlist/edit');
|
||||
AIRTIME.playlist.validatePlaylistElements();
|
||||
};
|
||||
} else if (data.ftype === "stream") {
|
||||
callback = function() {
|
||||
var url = baseUrl+'Webstream/edit';
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, baseUrl + 'new-webstream/edit');
|
||||
}
|
||||
} else {
|
||||
throw new Exception($.i18n._("Unknown type: ") + data.ftype);
|
||||
|
|
|
@ -75,7 +75,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if (!isTimeValid(cueIn)){
|
||||
showError(span, $.i18n._("please put in a time '00:00:00 (.0)'"));
|
||||
|
@ -96,7 +96,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+unqid+']');
|
||||
li = $('.side_playlist.active-tab li[unqid='+unqid+']');
|
||||
li.find(".cue-edit").toggle();
|
||||
highlightActive(li);
|
||||
highlightActive(li.find('.spl_cue'));
|
||||
|
@ -112,7 +112,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if (!isTimeValid(cueOut)){
|
||||
showError(span, $.i18n._("please put in a time '00:00:00 (.0)'"));
|
||||
|
@ -134,7 +134,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+unqid+']');
|
||||
li = $('.side_playlist.active-tab li[unqid='+unqid+']');
|
||||
li.find(".cue-edit").toggle();
|
||||
highlightActive(li);
|
||||
highlightActive(li.find('.spl_cue'));
|
||||
|
@ -146,7 +146,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
var url = baseUrl+"new-playlist/set-cue",
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val(),
|
||||
type = $pl.find('.obj_type').val(),
|
||||
li,
|
||||
span;
|
||||
|
||||
|
@ -179,7 +179,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
if (json.cue_error !== undefined) {
|
||||
|
||||
li = $('#side_playlist li[unqid='+id+']');
|
||||
li = $('.side_playlist.active-tab li[unqid='+id+']');
|
||||
|
||||
if (json.code === 0) {
|
||||
|
||||
|
@ -204,7 +204,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+id+']');
|
||||
li = $('.side_playlist.active-tab li[unqid='+id+']');
|
||||
li.find(".cue-edit").toggle();
|
||||
highlightActive(li);
|
||||
highlightActive(li.find('.spl_cue'));
|
||||
|
@ -216,7 +216,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
var url = baseUrl+"new-playlist/set-crossfade",
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
$.post(url,
|
||||
{format: "json", fadeIn: fadeIn, fadeOut: fadeOut, id1: id1, id2: id2, offset: offset, modified: lastMod, type: type},
|
||||
|
@ -248,7 +248,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeIn)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -286,7 +286,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeOut)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -386,8 +386,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
.empty()
|
||||
.val(json.description);
|
||||
|
||||
$('#spl_sortable').off('focusout keydown');
|
||||
$('#spl_sortable')
|
||||
$pl.find('.spl_sortable').off('focusout keydown');
|
||||
$pl.find('.spl_sortable')
|
||||
.empty()
|
||||
.append($html);
|
||||
setCueEvents();
|
||||
|
@ -398,7 +398,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
function setFadeIcon(){
|
||||
var contents = $pl.find("#spl_sortable");
|
||||
var contents = $pl.find(".spl_sortable");
|
||||
var show = contents.is(":visible");
|
||||
var empty = $pl.find(".spl_empty");
|
||||
|
||||
|
@ -421,29 +421,29 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
function getId() {
|
||||
return parseInt($pl.find("#obj_id").val(), 10);
|
||||
return parseInt($pl.find(".obj_id").val(), 10);
|
||||
}
|
||||
|
||||
function getModified() {
|
||||
return parseInt($pl.find("#obj_lastMod").val(), 10);
|
||||
return parseInt($pl.find(".obj_lastMod").val(), 10);
|
||||
}
|
||||
|
||||
function setModified(modified) {
|
||||
$pl.find("#obj_lastMod").val(modified);
|
||||
$pl.find(".obj_lastMod").val(modified);
|
||||
}
|
||||
|
||||
/*
|
||||
* Should all be moved to builder.js eventually
|
||||
*/
|
||||
function openFileMdEditor(json) {
|
||||
$tabCount++;
|
||||
var tabId = $openTabs[json.id];
|
||||
if ($openTabs[json.id] !== undefined) {
|
||||
AIRTIME.showbuilder.switchTab($(".pl-tab-content-" + tabId), $("#pl-tab-" + tabId));
|
||||
return;
|
||||
}
|
||||
$tabCount++;
|
||||
|
||||
var wrapper = "<div id='side_playlist' class='pl-content pl-tab-content-" + $tabCount + "'><div class='editor_pane_wrapper'></div></div>",
|
||||
var wrapper = "<div class='side_playlist pl-content pl-tab-content-" + $tabCount + "'><div class='editor_pane_wrapper'></div></div>",
|
||||
t = $("#show_builder").append(wrapper).find(".pl-tab-content-" + $tabCount),
|
||||
pane = $(".editor_pane_wrapper:last"),
|
||||
name = pane.append(json.dialog).find("#track_title").val() + $.i18n._(" - Metadata Editor"),
|
||||
|
@ -468,15 +468,14 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
function openPlaylist(json) {
|
||||
$tabCount++;
|
||||
console.log(json);
|
||||
var tabId = $openTabs[json.id];
|
||||
if ($openTabs[json.id] !== undefined) {
|
||||
AIRTIME.showbuilder.switchTab($(".pl-tab-content-" + tabId), $("#pl-tab-" + tabId));
|
||||
return;
|
||||
}
|
||||
$tabCount++;
|
||||
|
||||
var wrapper = "<div id='side_playlist' class='pl-content pl-tab-content-" + $tabCount + "'><div class='editor_pane_wrapper'></div></div>",
|
||||
var wrapper = "<div class='side_playlist pl-content pl-tab-content-" + $tabCount + "'><div class='editor_pane_wrapper'></div></div>",
|
||||
t = $("#show_builder").append(wrapper).find(".pl-tab-content-" + $tabCount),
|
||||
pane = $(".editor_pane_wrapper:last"),
|
||||
name = pane.append(json.html).find("#playlist_name_display").text(),
|
||||
|
@ -494,7 +493,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
newTab.on("click", function() {
|
||||
AIRTIME.showbuilder.switchTab(t, newTab);
|
||||
$.post(baseUrl+'new-playlist/edit',
|
||||
{format: "json", id: t.find("#obj_id").val(), type: t.find("#obj_type").val()});
|
||||
{format: "json", id: t.find(".obj_id").val(), type: t.find(".obj_type").val()});
|
||||
});
|
||||
AIRTIME.showbuilder.switchTab(t, newTab);
|
||||
AIRTIME.playlist.init();
|
||||
|
@ -517,7 +516,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
function closeTab() {
|
||||
delete $openTabs[$(".active-tab").find("#obj_id").val()];
|
||||
delete $openTabs[$(".active-tab").find(".obj_id").val()];
|
||||
$(".nav.nav-tabs .active").remove();
|
||||
$pl.remove();
|
||||
AIRTIME.showbuilder.switchTab($("#show_builder .outer-datatable-wrapper"), $("#timeline-tab"));
|
||||
|
@ -593,7 +592,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
//sets events dynamically for playlist entries (each row in the playlist)
|
||||
function setPlaylistEntryEvents() {
|
||||
$pl.delegate("#spl_sortable .ui-icon-closethick",
|
||||
$pl.delegate(".spl_sortable .ui-icon-closethick",
|
||||
{"click": function(ev){
|
||||
var id;
|
||||
id = parseInt($(this).attr("id").split("_").pop(), 10);
|
||||
|
@ -660,7 +659,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
//sets events dynamically for the cue editor.
|
||||
function setCueEvents() {
|
||||
var temp = $('#spl_sortable');
|
||||
var temp = $('.active-tab .spl_sortable');
|
||||
temp.on("focusout", ".spl_cue_in span", changeCueIn);
|
||||
temp.on("keydown", ".spl_cue_in span", submitOnEnter);
|
||||
|
||||
|
@ -677,7 +676,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
//sets events dynamically for the fade editor.
|
||||
function setFadeEvents() {
|
||||
var temp = $('#spl_sortable');
|
||||
var temp = $('.active-tab .spl_sortable');
|
||||
temp.on("focusout", ".spl_fade_in span", changeFadeIn);
|
||||
temp.on("keydown", ".spl_fade_in span", submitOnEnter);
|
||||
|
||||
|
@ -698,7 +697,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
//main playlist fades events
|
||||
$pl.on("click", "#spl_crossfade", function() {
|
||||
var lastMod = getModified(),
|
||||
type = $pl.find('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if ($(this).hasClass("ui-state-active")) {
|
||||
$(this).removeClass("ui-state-active");
|
||||
|
@ -748,7 +747,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
span = $(this),
|
||||
fadeIn = $.trim(span.text()),
|
||||
lastMod = getModified(),
|
||||
type = $pl.find('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeIn)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -772,7 +771,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
span = $(this),
|
||||
fadeOut = $.trim(span.text()),
|
||||
lastMod = getModified(),
|
||||
type = $pl.find('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeOut)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -816,7 +815,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
|
||||
$pl.on("click", 'button[id="playlist_shuffle_button"]', function(){
|
||||
obj_id = $('input[id="obj_id"]').val();
|
||||
obj_id = $pl.find('.obj_id').val();
|
||||
url = baseUrl+"new-playlist/shuffle";
|
||||
enableLoadingIcon();
|
||||
$.post(url, {format: "json", obj_id: obj_id}, function(json){
|
||||
|
@ -840,14 +839,14 @@ var AIRTIME = (function(AIRTIME){
|
|||
//stream url
|
||||
//default_length
|
||||
//playlist name
|
||||
var id = $pl.find("#obj_id").attr("value");
|
||||
var id = $pl.find(".obj_id").attr("value");
|
||||
var description = $pl.find("#description").val();
|
||||
var streamurl = $pl.find("#streamurl-element input").val();
|
||||
var length = $pl.find("#streamlength-element input").val();
|
||||
var name = $pl.find("#playlist_name_display").text();
|
||||
|
||||
//hide any previous errors (if any)
|
||||
$("#side_playlist .errors").empty().hide();
|
||||
$(".side_playlist.active-tab .errors").empty().hide();
|
||||
|
||||
var url = baseUrl+'new-webstream/save';
|
||||
$.post(url,
|
||||
|
@ -859,23 +858,23 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
if (!field[0]) {
|
||||
var elemId = "#"+s+"-error";
|
||||
var $div = $("#side_playlist " + elemId).text(field[1]).show();
|
||||
var $div = $(".side_playlist.active-tab " + elemId).text(field[1]).show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var $status = $("#side_playlist .status");
|
||||
var $status = $(".side_playlist.active-tab .status");
|
||||
$status.html(json.statusMessage);
|
||||
$status.show();
|
||||
setTimeout(function(){$status.fadeOut("slow", function(){$status.empty()})}, 5000);
|
||||
|
||||
var $ws_id = $("#obj_id");
|
||||
var $ws_id = $(".active-tab .obj_id");
|
||||
$ws_id.attr("value", json.streamId);
|
||||
|
||||
var $ws_id = $("#ws_delete");
|
||||
$ws_id.show();
|
||||
|
||||
|
||||
var length = $("#side_playlist #ws_length");
|
||||
var length = $(".side_playlist.active-tab #ws_length");
|
||||
length.text(json.length);
|
||||
|
||||
//redraw the library to show the new webstream
|
||||
|
@ -913,7 +912,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
if ((name == "Untitled Playlist"
|
||||
|| name == "Untitled Smart Block")
|
||||
&& $pl.find("#spl_sortable .spl_empty").length == 1) {
|
||||
&& $pl.find(".spl_sortable .spl_empty").length == 1) {
|
||||
mod.fnDelete();
|
||||
} else {
|
||||
closeTab();
|
||||
|
@ -940,8 +939,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
block_name = $pl.find('#playlist_name_display').text(),
|
||||
block_desc = $pl.find('textarea[name="description"]').val(),
|
||||
save_action = baseUrl+'new-playlist/save',
|
||||
obj_id = $pl.find('input[id="obj_id"]').val(),
|
||||
obj_type = $pl.find('#obj_type').val(),
|
||||
obj_id = $pl.find(".obj_id").val(),
|
||||
obj_type = $pl.find('.obj_type').val(),
|
||||
lastMod = getModified(),
|
||||
dt = $('table[id="library_display"]').dataTable();
|
||||
enableLoadingIcon();
|
||||
|
@ -1064,7 +1063,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
}());
|
||||
|
||||
$pl.find("#spl_sortable").sortable(sortableConf);
|
||||
$pl.find(".spl_sortable").sortable(sortableConf);
|
||||
AIRTIME.playlist.validatePlaylistElements();
|
||||
}
|
||||
|
||||
|
@ -1131,7 +1130,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
stopAudioPreview();
|
||||
id = (plid === undefined) ? getId() : plid;
|
||||
lastMod = getModified();
|
||||
type = $pl.find('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
url = baseUrl+'new-playlist/delete';
|
||||
|
||||
$.post(url,
|
||||
|
@ -1149,7 +1148,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
stopAudioPreview();
|
||||
id = (wsid === undefined) ? getId() : wsid;
|
||||
lastMod = getModified();
|
||||
type = $pl.find('#obj_type').val();
|
||||
type = $pl.find('.obj_type').val();
|
||||
url = baseUrl+'new-webstream/delete';
|
||||
|
||||
$.post(url,
|
||||
|
@ -1200,7 +1199,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
function playlistRequest(sUrl, oData) {
|
||||
var lastMod,
|
||||
obj_type = $pl.find('#obj_type').val();
|
||||
obj_type = $pl.find('.obj_type').val();
|
||||
|
||||
mod.disableUI();
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
btnText = $.i18n._('Add to current show');
|
||||
}
|
||||
} else {
|
||||
var objType = $('#obj_type').val();
|
||||
var objType = $('.active-tab .obj_type').val();
|
||||
if (objType === 'block') {
|
||||
btnText = ' ' + $.i18n._('Add to current smart block');
|
||||
} else {
|
||||
|
@ -115,7 +115,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
helper: function () {
|
||||
|
||||
var $el = $(this), selected = mod
|
||||
.getChosenAudioFilesLength(), container, message, li = $("#side_playlist ul[id='spl_sortable'] li:first"),
|
||||
.getChosenAudioFilesLength(), container, message, li = $(".side_playlist.active-tab ul.spl_sortable li:first"),
|
||||
width = li.width(), height = 55;
|
||||
if (width > 798) width = 798;
|
||||
|
||||
|
@ -146,7 +146,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
top: 30,
|
||||
left: 100
|
||||
},
|
||||
connectToSortable: '#spl_sortable'
|
||||
connectToSortable: '.active-tab .spl_sortable'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
mod.checkAddButton = function() {
|
||||
|
||||
var selected = mod.getChosenItemsLength(),
|
||||
sortable = $('#spl_sortable:visible'),
|
||||
sortable = $('.spl_sortable:visible'),
|
||||
check = false,
|
||||
blockType = $('input[name=sp_type]:checked', '#smart-block-form').val();
|
||||
|
||||
|
@ -27,7 +27,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
AIRTIME.button.disableButton("btn-group #library-plus", false);
|
||||
}
|
||||
|
||||
var objType = $('#obj_type').val(),
|
||||
var objType = $('.obj_type').val(),
|
||||
btnText;
|
||||
if (objType === 'playlist') {
|
||||
btnText = ' '+$.i18n._('Add to current playlist');
|
||||
|
@ -75,7 +75,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
helper : function() {
|
||||
|
||||
var $el = $(this), selected = mod
|
||||
.getChosenAudioFilesLength(), container, message, li = $("#side_playlist ul[id='spl_sortable'] li:first"),
|
||||
.getChosenAudioFilesLength(), container, message, li = $(".side_playlist ul[id='spl_sortable'] li:first"),
|
||||
width = li.width(), height = 55;
|
||||
if (width > 798) width = 798;
|
||||
|
||||
|
@ -106,7 +106,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
top: 30,
|
||||
left: 100
|
||||
},
|
||||
connectToSortable : '#spl_sortable'
|
||||
connectToSortable : '.spl_sortable'
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -148,7 +148,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
if (temp.ftype === "audioclip"
|
||||
|| temp.ftype === "block"
|
||||
|| (temp.ftype === "stream" && $(
|
||||
"#obj_type").val() === "playlist")) {
|
||||
".obj_type").val() === "playlist")) {
|
||||
aMediaIds.push(new Array(temp.id,
|
||||
temp.ftype));
|
||||
}
|
||||
|
@ -157,9 +157,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
AIRTIME.playlist.fnAddItems(aMediaIds,
|
||||
undefined, 'after');
|
||||
} else {
|
||||
if ($('#obj_type').val() == 'block') {
|
||||
if ($('.obj_type').val() == 'block') {
|
||||
alert($.i18n._('You can only add tracks to smart blocks.'));
|
||||
} else if ($('#obj_type').val() == 'playlist') {
|
||||
} else if ($('.obj_type').val() == 'playlist') {
|
||||
alert($.i18n._('You can only add tracks, smart blocks, and webstreams to playlists.'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -345,8 +345,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
item,
|
||||
temp,
|
||||
aMedia = [],
|
||||
currentObjId = $("#side_playlist").find("#obj_id").val(),
|
||||
currentObjType = $("#side_playlist").find("#obj_type").val(),
|
||||
currentObjId = $(".side_playlist").find(".obj_id").val(),
|
||||
currentObjType = $(".side_playlist").find(".obj_type").val(),
|
||||
closeObj = false;
|
||||
|
||||
// process selected files/playlists.
|
||||
|
@ -370,7 +370,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$.post(baseUrl+"playlist/close-playlist",
|
||||
{"format": "json", "type": currentObjType},
|
||||
function(json) {
|
||||
$("#side_playlist").empty().append(json.html);
|
||||
$(".side_playlist").empty().append(json.html);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if (!isTimeValid(cueIn)){
|
||||
showError(span, $.i18n._("please put in a time '00:00:00 (.0)'"));
|
||||
|
@ -93,7 +93,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+unqid+']');
|
||||
li = $('.side_playlist li[unqid='+unqid+']');
|
||||
li.find(".cue-edit").toggle();
|
||||
highlightActive(li);
|
||||
highlightActive(li.find('.spl_cue'));
|
||||
|
@ -109,7 +109,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if (!isTimeValid(cueOut)){
|
||||
showError(span, $.i18n._("please put in a time '00:00:00 (.0)'"));
|
||||
|
@ -131,7 +131,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+unqid+']');
|
||||
li = $('.side_playlist li[unqid='+unqid+']');
|
||||
li.find(".cue-edit").toggle();
|
||||
highlightActive(li);
|
||||
highlightActive(li.find('.spl_cue'));
|
||||
|
@ -143,7 +143,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
var url = baseUrl+"Playlist/set-cue",
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val(),
|
||||
type = $('.obj_type').val(),
|
||||
li,
|
||||
span;
|
||||
|
||||
|
@ -176,7 +176,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
if (json.cue_error !== undefined) {
|
||||
|
||||
li = $('#side_playlist li[unqid='+id+']');
|
||||
li = $('.side_playlist li[unqid='+id+']');
|
||||
|
||||
if (json.code === 0) {
|
||||
|
||||
|
@ -201,7 +201,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+id+']');
|
||||
li = $('.side_playlist li[unqid='+id+']');
|
||||
li.find(".cue-edit").toggle();
|
||||
highlightActive(li);
|
||||
highlightActive(li.find('.spl_cue'));
|
||||
|
@ -213,7 +213,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
var url = baseUrl+"Playlist/set-crossfade",
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
$.post(url,
|
||||
{format: "json", fadeIn: fadeIn, fadeOut: fadeOut, id1: id1, id2: id2, offset: offset, modified: lastMod, type: type},
|
||||
|
@ -229,7 +229,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
$li = $('#side_playlist li[unqid='+id+']');
|
||||
$li = $('.side_playlist li[unqid='+id+']');
|
||||
$li.find('.crossfade').toggle();
|
||||
highlightActive($li.find('.spl_fade_control'));
|
||||
});
|
||||
|
@ -245,7 +245,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeIn)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -267,7 +267,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+unqid+']');
|
||||
li = $('.side_playlist li[unqid='+unqid+']');
|
||||
li.find('.crossfade').toggle();
|
||||
highlightActive(li.find('.spl_fade_control'));
|
||||
});
|
||||
|
@ -283,7 +283,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
li = span.parents("li"),
|
||||
unqid = li.attr("unqid"),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeOut)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -305,7 +305,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
setPlaylistContent(json);
|
||||
|
||||
li = $('#side_playlist li[unqid='+unqid+']');
|
||||
li = $('.side_playlist li[unqid='+unqid+']');
|
||||
li.find('.crossfade').toggle();
|
||||
highlightActive(li.find('.spl_fade_control'));
|
||||
});
|
||||
|
@ -357,7 +357,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
function editName() {
|
||||
var nameElement = $(this),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
//remove any newlines if user somehow snuck them in (easy to do if dragging/dropping text)
|
||||
nameElement.text(nameElement.text().replace("\n", ""));
|
||||
|
||||
|
@ -401,8 +401,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
.empty()
|
||||
.val(json.description);
|
||||
|
||||
$('#spl_sortable').off('focusout keydown');
|
||||
$('#spl_sortable')
|
||||
$('.spl_sortable').off('focusout keydown');
|
||||
$('.spl_sortable')
|
||||
.empty()
|
||||
.append($html);
|
||||
setCueEvents();
|
||||
|
@ -413,7 +413,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
function setFadeIcon(){
|
||||
var contents = $("#spl_sortable");
|
||||
var contents = $(".spl_sortable");
|
||||
var show = contents.is(":visible");
|
||||
var empty = $(".spl_empty");
|
||||
|
||||
|
@ -436,19 +436,19 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
|
||||
function getId() {
|
||||
return parseInt($("#obj_id").val(), 10);
|
||||
return parseInt($(".obj_id").val(), 10);
|
||||
}
|
||||
|
||||
function getModified() {
|
||||
return parseInt($("#obj_lastMod").val(), 10);
|
||||
return parseInt($(".obj_lastMod").val(), 10);
|
||||
}
|
||||
|
||||
function setModified(modified) {
|
||||
$("#obj_lastMod").val(modified);
|
||||
$(".obj_lastMod").val(modified);
|
||||
}
|
||||
|
||||
function openPlaylist(json) {
|
||||
$("#side_playlist")
|
||||
$(".side_playlist")
|
||||
.empty()
|
||||
.append(json.html);
|
||||
|
||||
|
@ -541,7 +541,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
//sets events dynamically for playlist entries (each row in the playlist)
|
||||
function setPlaylistEntryEvents() {
|
||||
|
||||
$pl.delegate("#spl_sortable .ui-icon-closethick",
|
||||
$pl.delegate(".spl_sortable .ui-icon-closethick",
|
||||
{"click": function(ev){
|
||||
var id;
|
||||
id = parseInt($(this).attr("id").split("_").pop(), 10);
|
||||
|
@ -608,7 +608,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
//sets events dynamically for the cue editor.
|
||||
function setCueEvents() {
|
||||
var temp = $('#spl_sortable');
|
||||
var temp = $('.spl_sortable');
|
||||
temp.on("focusout", ".spl_cue_in span", changeCueIn);
|
||||
temp.on("keydown", ".spl_cue_in span", submitOnEnter);
|
||||
|
||||
|
@ -625,7 +625,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
//sets events dynamically for the fade editor.
|
||||
function setFadeEvents() {
|
||||
var temp = $('#spl_sortable');
|
||||
var temp = $('.spl_sortable');
|
||||
temp.on("focusout", ".spl_fade_in span", changeFadeIn);
|
||||
temp.on("keydown", ".spl_fade_in span", submitOnEnter);
|
||||
|
||||
|
@ -646,7 +646,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
//main playlist fades events
|
||||
$pl.on("click", "#spl_crossfade", function() {
|
||||
var lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if ($(this).hasClass("ui-state-active")) {
|
||||
$(this).removeClass("ui-state-active");
|
||||
|
@ -696,7 +696,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
span = $(this),
|
||||
fadeIn = $.trim(span.text()),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeIn)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -720,7 +720,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
span = $(this),
|
||||
fadeOut = $.trim(span.text()),
|
||||
lastMod = getModified(),
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
|
||||
if (!isFadeValid(fadeOut)){
|
||||
showError(span, $.i18n._("please put in a time in seconds '00 (.0)'"));
|
||||
|
@ -788,14 +788,14 @@ var AIRTIME = (function(AIRTIME){
|
|||
//stream url
|
||||
//default_length
|
||||
//playlist name
|
||||
var id = $pl.find("#obj_id").attr("value");
|
||||
var id = $pl.find(".obj_id").attr("value");
|
||||
var description = $pl.find("#description").val();
|
||||
var streamurl = $pl.find("#streamurl-element input").val();
|
||||
var length = $pl.find("#streamlength-element input").val();
|
||||
var name = $pl.find("#playlist_name_display").text();
|
||||
|
||||
//hide any previous errors (if any)
|
||||
$("#side_playlist .errors").empty().hide();
|
||||
$(".side_playlist .errors").empty().hide();
|
||||
|
||||
var url = baseUrl+'Webstream/save';
|
||||
$.post(url,
|
||||
|
@ -807,23 +807,23 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
if (!field[0]) {
|
||||
var elemId = "#"+s+"-error";
|
||||
var $div = $("#side_playlist " + elemId).text(field[1]).show();
|
||||
var $div = $(".side_playlist " + elemId).text(field[1]).show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var $status = $("#side_playlist .status");
|
||||
var $status = $(".side_playlist .status");
|
||||
$status.html(json.statusMessage);
|
||||
$status.show();
|
||||
setTimeout(function(){$status.fadeOut("slow", function(){$status.empty()})}, 5000);
|
||||
|
||||
var $ws_id = $("#obj_id");
|
||||
var $ws_id = $(".obj_id");
|
||||
$ws_id.attr("value", json.streamId);
|
||||
|
||||
var $ws_id = $("#ws_delete");
|
||||
$ws_id.show();
|
||||
|
||||
|
||||
var length = $("#side_playlist #ws_length");
|
||||
var length = $(".side_playlist #ws_length");
|
||||
length.text(json.length);
|
||||
|
||||
//redraw the library to show the new webstream
|
||||
|
@ -877,7 +877,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
block_desc = $('textarea[name="description"]').val(),
|
||||
save_action = baseUrl+'Playlist/save',
|
||||
obj_id = $('input[id="obj_id"]').val(),
|
||||
obj_type = $('#obj_type').val(),
|
||||
obj_type = $('.obj_type').val(),
|
||||
lastMod = getModified(),
|
||||
dt = $('table[id="library_display"]').dataTable();
|
||||
enableLoadingIcon();
|
||||
|
@ -1000,7 +1000,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
}());
|
||||
|
||||
$pl.find("#spl_sortable").sortable(sortableConf);
|
||||
$pl.find(".spl_sortable").sortable(sortableConf);
|
||||
AIRTIME.playlist.validatePlaylistElements();
|
||||
}
|
||||
|
||||
|
@ -1064,7 +1064,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
stopAudioPreview();
|
||||
id = (plid === undefined) ? getId() : plid;
|
||||
lastMod = getModified();
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
url = baseUrl+'Playlist/delete';
|
||||
|
||||
$.post(url,
|
||||
|
@ -1081,7 +1081,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
stopAudioPreview();
|
||||
id = (wsid === undefined) ? getId() : wsid;
|
||||
lastMod = getModified();
|
||||
type = $('#obj_type').val();
|
||||
type = $('.obj_type').val();
|
||||
url = baseUrl+'Webstream/delete';
|
||||
|
||||
$.post(url,
|
||||
|
@ -1137,7 +1137,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
function playlistRequest(sUrl, oData) {
|
||||
var lastMod,
|
||||
obj_type = $('#obj_type').val();
|
||||
obj_type = $('.obj_type').val();
|
||||
|
||||
mod.disableUI();
|
||||
|
||||
|
@ -1473,7 +1473,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
mod.onReady = function() {
|
||||
$lib = $("#library_content");
|
||||
$pl = $("#side_playlist");
|
||||
$pl = $(".side_playlist");
|
||||
|
||||
setWidgetSize();
|
||||
|
||||
|
|
|
@ -350,7 +350,7 @@ function setupUI() {
|
|||
/* Activate or Deactivate shuffle button
|
||||
* It is only active if playlist is not empty
|
||||
*/
|
||||
var plContents = $('#spl_sortable').children();
|
||||
var plContents = $('.spl_sortable').children();
|
||||
var shuffleButton = $('button[id="shuffle_button"], button[id="playlist_shuffle_button"], button[id="pl-bl-clear-content"]');
|
||||
|
||||
if (!plContents.hasClass('spl_empty')) {
|
||||
|
@ -364,15 +364,15 @@ function setupUI() {
|
|||
}
|
||||
|
||||
var dynamic_length = target_length;
|
||||
if ($('#obj_type').val() == 'block') {
|
||||
if ($('.obj_type').val() == 'block') {
|
||||
if (playlist_type == "0") {
|
||||
$('button[id="generate_button"]').show();
|
||||
$('button[id="shuffle_button"]').show();
|
||||
$('#spl_sortable').show();
|
||||
$('.spl_sortable').show();
|
||||
} else {
|
||||
$('button[id="generate_button"]').hide();
|
||||
$('button[id="shuffle_button"]').hide();
|
||||
$('#spl_sortable').hide();
|
||||
$('.spl_sortable').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -548,7 +548,7 @@ function removeButtonCheck() {
|
|||
}
|
||||
|
||||
function enableLoadingIcon() {
|
||||
$("#side_playlist").block({
|
||||
$(".side_playlist").block({
|
||||
message: $.i18n._("Processing..."),
|
||||
theme: true,
|
||||
allowBodyStretch: true,
|
||||
|
@ -557,7 +557,7 @@ function enableLoadingIcon() {
|
|||
}
|
||||
|
||||
function disableLoadingIcon() {
|
||||
$("#side_playlist").unblock()
|
||||
$(".side_playlist").unblock()
|
||||
}
|
||||
// We need to know if the criteria value will be a string
|
||||
// or numeric value in order to populate the modifier
|
||||
|
|
|
@ -809,6 +809,104 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
});
|
||||
|
||||
//begin context menu initialization.
|
||||
$.contextMenu({
|
||||
selector: '#show_builder tr.lib-audio:not(.sb-past)',
|
||||
trigger: "right",
|
||||
|
||||
build: function($el, e) {
|
||||
var items,
|
||||
$tr = $el,
|
||||
data = $tr.data("aData"),
|
||||
cursorClass = "cursor-selected-row",
|
||||
callback;
|
||||
|
||||
function processMenuItems(oItems) {
|
||||
|
||||
//define a preview callback.
|
||||
if (oItems.preview !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
open_show_preview(data.instance, data.pos);
|
||||
};
|
||||
|
||||
oItems.preview.callback = callback;
|
||||
}
|
||||
|
||||
//define a select cursor callback.
|
||||
if (oItems.selCurs !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
var $tr = $(this).parents('tr').next();
|
||||
|
||||
mod.selectCursor($tr);
|
||||
};
|
||||
|
||||
oItems.selCurs.callback = callback;
|
||||
}
|
||||
|
||||
//define a remove cursor callback.
|
||||
if (oItems.delCurs !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
var $tr = $(this).parents('tr').next();
|
||||
|
||||
mod.removeCursor($tr);
|
||||
};
|
||||
|
||||
oItems.delCurs.callback = callback;
|
||||
}
|
||||
|
||||
//define a delete callback.
|
||||
if (oItems.del !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
AIRTIME.showbuilder.fnRemove([{
|
||||
id: data.id,
|
||||
timestamp: data.timestamp,
|
||||
instance: data.instance
|
||||
}]);
|
||||
};
|
||||
|
||||
oItems.del.callback = callback;
|
||||
}
|
||||
|
||||
//only show the cursor selecting options if the library is visible on the page.
|
||||
if ($tr.next().find('.marker').length === 0) {
|
||||
delete oItems.selCurs;
|
||||
delete oItems.delCurs;
|
||||
}
|
||||
//check to include either select or remove cursor.
|
||||
else {
|
||||
if ($tr.next().hasClass(cursorClass)) {
|
||||
delete oItems.selCurs;
|
||||
}
|
||||
else {
|
||||
delete oItems.delCurs;
|
||||
}
|
||||
}
|
||||
|
||||
items = oItems;
|
||||
}
|
||||
|
||||
request = $.ajax({
|
||||
url: baseUrl+"showbuilder/context-menu",
|
||||
type: "GET",
|
||||
data: {id : data.id, format: "json"},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json){
|
||||
processMenuItems(json.items);
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
items: items
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
var sortableConf = (function(){
|
||||
var origTrs,
|
||||
aItemData = [],
|
||||
|
@ -973,7 +1071,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
$toolbar = $(".sb-content .fg-toolbar:first");
|
||||
var footer = $(".sb-content .fg-toolbar:last"),
|
||||
timerange = $(".sb-timerange");
|
||||
footer.append(timerange);
|
||||
$toolbar.append(timerange);
|
||||
|
||||
$menu = $("<div class='btn-toolbar'/>");
|
||||
$menu.append("<div class='btn-group'>" +
|
||||
|
|
Loading…
Reference in New Issue