SAAS-948 - showbuilder styling
This commit is contained in:
parent
0c3d9a8af4
commit
e6609896a5
19 changed files with 429 additions and 279 deletions
|
@ -35,7 +35,6 @@ class ShowBuilderController extends Zend_Controller_Action {
|
||||||
|
|
||||||
// PLUPLOAD
|
// PLUPLOAD
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/libs/dropzone.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/libs/dropzone.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/dropzone/dropzone.min.css?'.$CC_CONFIG['airtime_version']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
|
@ -15,6 +15,7 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
$file_id->setValue($p_id);
|
$file_id->setValue($p_id);
|
||||||
$file_id->addDecorator('HtmlTag', array('tag' => 'div', 'style' => 'display:none'));
|
$file_id->addDecorator('HtmlTag', array('tag' => 'div', 'style' => 'display:none'));
|
||||||
$file_id->removeDecorator('Label');
|
$file_id->removeDecorator('Label');
|
||||||
|
$file_id->setAttrib('class', 'obj_id');
|
||||||
$this->addElement($file_id);
|
$this->addElement($file_id);
|
||||||
|
|
||||||
// Add title field
|
// Add title field
|
||||||
|
|
|
@ -81,7 +81,30 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||||
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>
|
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>
|
||||||
<div class="usability_hint" <?php if ($hint == "") { echo "style='display:none'"; } ?>><?php echo $hint; ?></div>
|
<div class="usability_hint" <?php if ($hint == "") { echo "style='display:none'"; } ?>><?php echo $hint; ?></div>
|
||||||
|
|
||||||
<div class="wrapper" id="content">
|
<div id="media_type_nav"> <!-- class="content-pane" -->
|
||||||
|
<div class="btn-group">
|
||||||
|
<button id="new_media_selector" class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
||||||
|
New <span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li id="new-playlist">
|
||||||
|
<a href="#"><?php echo _("Playlist") ?></a>
|
||||||
|
</li>
|
||||||
|
<li id="new-smart-block">
|
||||||
|
<a href="#"><?php echo _("Smart Block") ?></a>
|
||||||
|
</li>
|
||||||
|
<li id="new-webstream">
|
||||||
|
<a href="#"><?php echo _("Webstream") ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="media_type_selector selected" selection_id="1"><?php echo _("Files") ?></div>
|
||||||
|
<div class="media_type_selector" selection_id="2"><?php echo _("Playlists") ?></div>
|
||||||
|
<div class="media_type_selector" selection_id="3"><?php echo _("Smart Blocks") ?></div>
|
||||||
|
<div class="media_type_selector" selection_id="4"><?php echo _("Webstreams") ?></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wrapper dropzone" id="content">
|
||||||
<?php echo $this->layout()->content ?>
|
<?php echo $this->layout()->content ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,15 @@ if (isset($this->obj)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (isset($this->obj)) : ?>
|
<?php if (isset($this->obj)) : ?>
|
||||||
<div class="inner_playlist_wrapper">
|
<div class="inner_editor_wrapper">
|
||||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
||||||
<input class='obj_type' type='hidden' value='playlist'></input>
|
<input class='obj_type' type='hidden' value='playlist'/>
|
||||||
<div class="playlist_title">
|
<div class="playlist_title">
|
||||||
<h3 id="obj_name">
|
<h3 class="obj_name">
|
||||||
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||||
</h3>
|
</h3>
|
||||||
<h4 id="obj_length"><?php echo _("Playlist Length: ") . $this->length; ?></h4>
|
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
||||||
</div>
|
</div>
|
||||||
<div id='sp-success' class='success' style='display:none'></div>
|
<div id='sp-success' class='success' style='display:none'></div>
|
||||||
|
|
||||||
|
@ -25,23 +25,18 @@ if (isset($this->obj)) {
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<div class="btn-toolbar spl-no-margin clearfix">
|
<div class="btn-toolbar spl-no-margin clearfix left-floated">
|
||||||
<?php if (isset($this->obj)) : ?>
|
<div class='btn-group pull-right'>
|
||||||
<div class='btn-group pull-right'>
|
<button class="btn btn-inverse" title='<?php echo _("Empty playlist content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
||||||
<button class="btn btn-inverse" title='<?php echo _("Empty playlist content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
</div>
|
||||||
</div>
|
<div class='btn-group pull-right'>
|
||||||
<div class='btn-group pull-right'>
|
<button class="btn btn-inverse" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
|
||||||
<button class="btn btn-inverse" title='<?php echo _("Shuffle playlist") ?>' type="button" id="playlist_shuffle_button"><?php echo _("Shuffle") ?></button>
|
</div>
|
||||||
</div>
|
<div class='btn-group pull-right'>
|
||||||
<div class='btn-group pull-right'>
|
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo $count > 0 ?"block;":"none;"?>">
|
||||||
<button class="btn btn-inverse" title='<?php echo _("Save playlist") ?>' type="button" id="save_button"><?php echo _("Save") ?></button>
|
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||||
</div>
|
</a>
|
||||||
<div class='btn-group pull-right'>
|
</div>
|
||||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo $count > 0 ?"block;":"none;"?>">
|
|
||||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php //echo $this->form; ?>
|
<?php //echo $this->form; ?>
|
||||||
|
@ -62,6 +57,11 @@ if (isset($this->obj)) {
|
||||||
<?php $this->contents = $contents;
|
<?php $this->contents = $contents;
|
||||||
echo $this->render('playlist/update.phtml') ?>
|
echo $this->render('playlist/update.phtml') ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="btn-toolbar spl-no-margin clearfix">
|
||||||
|
<div class='btn-group pull-right'>
|
||||||
|
<button class="btn btn-inverse" title='<?php echo _("Save playlist") ?>' type="button" id="save_button"><?php echo _("Save") ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div><?php echo _("No open playlist") ?></div>
|
<div><?php echo _("No open playlist") ?></div>
|
||||||
|
|
|
@ -4,41 +4,25 @@ if (isset($this->obj)) {
|
||||||
$count = count($contents);
|
$count = count($contents);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="btn-toolbar spl-no-top-margin clearfix">
|
|
||||||
<?php if (isset($this->obj)) : ?>
|
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<button class="btn btn-inverse" title='<?php echo _("Empty smart block content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
|
||||||
</div>
|
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<button class="btn btn-inverse" title='Save smart block's title, description, and criteria' type="button" id="save_button"><?php echo _("Save") ?></button>
|
|
||||||
</div>
|
|
||||||
<div class='btn-group pull-right'>
|
|
||||||
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"block;":"none;"?>">
|
|
||||||
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if (isset($this->obj)) : ?>
|
<?php if (isset($this->obj)) : ?>
|
||||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
|
<div class="inner_editor_wrapper">
|
||||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
||||||
<input class='obj_type' type='hidden' value='block'></input>
|
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"/>
|
||||||
<div class="playlist_title">
|
<input class='obj_type' type='hidden' value='block'/>
|
||||||
<h3 id="obj_name">
|
<div class="playlist_title">
|
||||||
<a id="playlist_name_display" contenteditable="true">
|
<h3 class="obj_name">
|
||||||
<?php
|
<a class="playlist_name_display" contenteditable="true">
|
||||||
if (isset($this->unsavedName)) echo $this->unsavedName;
|
<?php
|
||||||
else echo $this->escape($this->obj->getName());
|
if (isset($this->unsavedName)) echo $this->unsavedName;
|
||||||
?>
|
else echo $this->escape($this->obj->getName());
|
||||||
</a>
|
?>
|
||||||
</h3>
|
</a>
|
||||||
<h4 id="obj_length"><?php echo $this->length; ?></h4>
|
</h3>
|
||||||
</div>
|
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
||||||
<div id='sp-success-saved' class='success' style='display:none'></div>
|
</div>
|
||||||
|
<div id='sp-success-saved' class='success' style='display:none'></div>
|
||||||
|
|
||||||
<fieldset class="toggle closed" id="fieldset-metadate_change">
|
|
||||||
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span><?php echo _("View / edit description"); ?></legend>
|
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
|
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
|
||||||
<dd id="description-element">
|
<dd id="description-element">
|
||||||
|
@ -48,28 +32,39 @@ if (isset($this->obj)) {
|
||||||
</textarea>
|
</textarea>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<?php echo $this->form; ?>
|
|
||||||
|
|
||||||
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
|
<?php echo $this->form; ?>
|
||||||
<span class="ui-icon ui-icon-closethick"></span>
|
<div class="btn-toolbar spl-no-top-margin clearfix">
|
||||||
<dl id="spl_editor-main" class="inline-list">
|
<div class='btn-group pull-right'>
|
||||||
<dt><?php echo _("Fade in: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
<button class="btn btn-inverse" title='<?php echo _("Empty smart block content") ?>' type="button" id="pl-bl-clear-content"><?php echo _("Clear") ?></button>
|
||||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
</div>
|
||||||
<dd class="edit-error"></dd>
|
<div class='btn-group pull-right'>
|
||||||
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
<a href="#" id="spl_crossfade" class="btn crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"block;":"none;"?>">
|
||||||
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
<i class='crossfade-main-icon'></i><span class="ui-button-text"><?php echo _("Playlist crossfade") ?></span>
|
||||||
<dd class="edit-error"></dd>
|
</a>
|
||||||
</dl>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="crossfade_main" class="crossfade-main clearfix left-floated" style="display:none;">
|
||||||
|
<span class="ui-icon ui-icon-closethick"></span>
|
||||||
|
<dl id="spl_editor-main" class="inline-list">
|
||||||
|
<dt><?php echo _("Fade in: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
||||||
|
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
|
||||||
|
<dd class="edit-error"></dd>
|
||||||
|
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
|
||||||
|
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00</span></dd>
|
||||||
|
<dd class="edit-error"></dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<ul class="spl_sortable">
|
||||||
<div class="clear"></div>
|
<?php $this->contents = $contents;
|
||||||
<div class="" style="clear:both; float:none; width:100%;">
|
echo $this->render('playlist/update.phtml') ?>
|
||||||
<ul class="spl_sortable">
|
</ul>
|
||||||
<?php $this->contents = $contents;
|
<div class="btn-toolbar spl-no-top-margin clearfix">
|
||||||
echo $this->render('playlist/update.phtml') ?>
|
<div class='btn-group pull-right'>
|
||||||
</ul>
|
<button class="btn btn-inverse" title='Save smart block's title, description, and criteria' type="button" id="save_button"><?php echo _("Save") ?></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
|
@ -42,10 +42,10 @@ if (isset($this->obj)) {
|
||||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||||
<input class='obj_type' type='hidden' value='playlist'></input>
|
<input class='obj_type' type='hidden' value='playlist'></input>
|
||||||
<div class="playlist_title">
|
<div class="playlist_title">
|
||||||
<h3 id="obj_name">
|
<h3 class="obj_name">
|
||||||
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||||
</h3>
|
</h3>
|
||||||
<h4 id="obj_length"><?php echo $this->length; ?></h4>
|
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
||||||
</div>
|
</div>
|
||||||
<div id='sp-success' class='success' style='display:none'></div>
|
<div id='sp-success' class='success' style='display:none'></div>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ if (isset($this->obj)) {
|
||||||
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
<input class="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
|
||||||
<input class='obj_type' type='hidden' value='block'></input>
|
<input class='obj_type' type='hidden' value='block'></input>
|
||||||
<div class="playlist_title">
|
<div class="playlist_title">
|
||||||
<h3 id="obj_name">
|
<h3 class="obj_name">
|
||||||
<a id="playlist_name_display" contenteditable="true">
|
<a id="playlist_name_display" contenteditable="true">
|
||||||
<?php
|
<?php
|
||||||
if (isset($this->unsavedName)) echo $this->unsavedName;
|
if (isset($this->unsavedName)) echo $this->unsavedName;
|
||||||
|
@ -47,7 +47,7 @@ if (isset($this->obj)) {
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
<h4 id="obj_length"><?php echo $this->length; ?></h4>
|
<h4 class="obj_length"><?php echo $this->length; ?></h4>
|
||||||
</div>
|
</div>
|
||||||
<div id='sp-success-saved' class='success' style='display:none'></div>
|
<div id='sp-success-saved' class='success' style='display:none'></div>
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,13 @@ if ($item['type'] == 2) {
|
||||||
else if ($item['type'] == 1) {
|
else if ($item['type'] == 1) {
|
||||||
$fileUrl = null;
|
$fileUrl = null;
|
||||||
}
|
}
|
||||||
else if ($item['type'] == 0) {
|
else if ($item['type'] == 0) {
|
||||||
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
|
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
|
||||||
$fileUrl = $audiofile->getFileUrl();
|
$fileUrl = $audiofile->getFileUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
$nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']);
|
$nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']);
|
||||||
$nextFileUrl = $nextAudiofile->getFileUrl();
|
$nextFileUrl = $nextAudiofile->getFileUrl();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -79,7 +79,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
'id' => $item["id"],
|
'id' => $item["id"],
|
||||||
'cueIn' => $item['cuein'],
|
'cueIn' => $item['cuein'],
|
||||||
'cueOut' => $item['cueout'],
|
'cueOut' => $item['cueout'],
|
||||||
'cueInSec' => $item['cueInSec'],
|
'cueInSec' => $item['cueInSec'],
|
||||||
'cueOutSec' => $item['cueOutSec'],
|
'cueOutSec' => $item['cueOutSec'],
|
||||||
'uri' => $fileUrl,
|
'uri' => $fileUrl,
|
||||||
'origLength' => $item['orig_length'])); ?>
|
'origLength' => $item['orig_length'])); ?>
|
||||||
|
@ -99,18 +99,18 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
'fadeOut' => $items[$i]['fadeout'],
|
'fadeOut' => $items[$i]['fadeout'],
|
||||||
'fadeIn' => $items[$i+1]['fadein'],
|
'fadeIn' => $items[$i+1]['fadein'],
|
||||||
'item1Type' => $items[$i]['type'],
|
'item1Type' => $items[$i]['type'],
|
||||||
'cueIn1' => $items[$i]['cueInSec'],
|
'cueIn1' => $items[$i]['cueInSec'],
|
||||||
'cueOut1' => $items[$i]['cueOutSec'],
|
'cueOut1' => $items[$i]['cueOutSec'],
|
||||||
'item1Url' => $fileUrl
|
'item1Url' => $fileUrl
|
||||||
);
|
);
|
||||||
|
|
||||||
$item2 = array(
|
$item2 = array(
|
||||||
'item2Url' => $nextFileUrl,
|
'item2Url' => $nextFileUrl,
|
||||||
'item2' => $items[$i+1]['id'],
|
'item2' => $items[$i+1]['id'],
|
||||||
'item2Type' => $items[$i+1]['type'],
|
'item2Type' => $items[$i+1]['type'],
|
||||||
'offset' => $items[$i]['trackSec'] - $items[$i+1]['trackoffset'],
|
'offset' => $items[$i]['trackSec'] - $items[$i+1]['trackoffset'],
|
||||||
'cueIn2' => $items[$i+1]['cueInSec'],
|
'cueIn2' => $items[$i+1]['cueInSec'],
|
||||||
'cueOut2' => $items[$i+1]['cueOutSec']
|
'cueOut2' => $items[$i+1]['cueOutSec']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($nextFileUrl)) {
|
if (isset($nextFileUrl)) {
|
||||||
|
@ -129,13 +129,10 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<li class="spl_empty">
|
<div class="spl_empty">
|
||||||
<?php
|
<?php
|
||||||
if ($this->obj instanceof Application_Model_Block) {
|
echo _("Drag tracks here from your library to add them to the "
|
||||||
echo _("Empty smart block");
|
. ($this->obj instanceof Application_Model_Block ? "smart block" : "playlist"));
|
||||||
} else {
|
|
||||||
echo _("Empty playlist");
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</li>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -5,37 +5,32 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!--</form>-->
|
<!--</form>-->
|
||||||
|
|
||||||
<div id="media_type_nav" class="content-pane">
|
<!--<div id="media_type_nav"> <!-- class="content-pane" -->
|
||||||
<div class="btn-group">
|
<!-- <div class="btn-group">-->
|
||||||
<button id="new_media_selector" class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
<!-- <button id="new_media_selector" class="btn btn-small dropdown-toggle" data-toggle="dropdown">-->
|
||||||
New <span class="caret"></span>
|
<!-- New <span class="caret"></span>-->
|
||||||
</button>
|
<!-- </button>-->
|
||||||
<ul class="dropdown-menu">
|
<!-- <ul class="dropdown-menu">-->
|
||||||
<li id="new-playlist">
|
<!-- <li id="new-playlist">-->
|
||||||
<a href="#"><?php echo _("Playlist") ?></a>
|
<!-- <a href="#">--><?php //echo _("Playlist") ?><!--</a>-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
<li id="new-smart-block">
|
<!-- <li id="new-smart-block">-->
|
||||||
<a href="#"><?php echo _("Smart Block") ?></a>
|
<!-- <a href="#">--><?php //echo _("Smart Block") ?><!--</a>-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
<li id="new-webstream">
|
<!-- <li id="new-webstream">-->
|
||||||
<a href="#"><?php echo _("Webstream") ?></a>
|
<!-- <a href="#">--><?php //echo _("Webstream") ?><!--</a>-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
</ul>
|
<!-- </ul>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="media_type_selector selected" selection_id="1"><?php echo _("Files") ?></div>
|
<!-- <div class="media_type_selector selected" selection_id="1">--><?php //echo _("Files") ?><!--</div>-->
|
||||||
<div class="media_type_selector" selection_id="2"><?php echo _("Playlists") ?></div>
|
<!-- <div class="media_type_selector" selection_id="2">--><?php //echo _("Playlists") ?><!--</div>-->
|
||||||
<div class="media_type_selector" selection_id="3"><?php echo _("Smart Blocks") ?></div>
|
<!-- <div class="media_type_selector" selection_id="3">--><?php //echo _("Smart Blocks") ?><!--</div>-->
|
||||||
<div class="media_type_selector" selection_id="4"><?php echo _("Webstreams") ?></div>
|
<!-- <div class="media_type_selector" selection_id="4">--><?php //echo _("Webstreams") ?><!--</div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
|
<?php echo $this->csrf ?>
|
||||||
|
|
||||||
<div id="library_content" class="lib-content tabs content-pane wide-panel">
|
<div id="library_content" class="lib-content tabs content-pane wide-panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<!-- <fieldset class="toggle closed" id="filter_options">-->
|
|
||||||
<!-- <legend style="cursor: pointer;">-->
|
|
||||||
<!-- <span class="ui-icon ui-icon-triangle-2-n-s"></span>-->
|
|
||||||
<!-- --><?php //echo _("Advanced Search Options") ?>
|
|
||||||
<!-- </legend>-->
|
|
||||||
<!-- </fieldset>-->
|
|
||||||
<div id="advanced-options" class="btn-group">
|
<div id="advanced-options" class="btn-group">
|
||||||
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
|
|
|
@ -1,15 +1,3 @@
|
||||||
<div class="btn-toolbar spl-no-top-margin clearfix">
|
|
||||||
|
|
||||||
<?php if (isset($this->obj)) : ?>
|
|
||||||
<div class="btn-group pull-right">
|
|
||||||
<button class="btn btn-inverse" type="submit" id="webstream_save" name="submit"><?php echo _("Save") ?></button>
|
|
||||||
</div>
|
|
||||||
<div class="btn-group pull-right">
|
|
||||||
<button id="ws_delete" class="btn" <?php if ($this->action == "new"): ?>style="display:none;"<?php endif; ?>aria-disabled="false"><?php echo _("Delete") ?></button>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if (isset($this->obj)) : ?>
|
<?php if (isset($this->obj)) : ?>
|
||||||
<input class="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
|
<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_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
|
||||||
|
@ -18,10 +6,10 @@
|
||||||
|
|
||||||
<div class="playlist_title">
|
<div class="playlist_title">
|
||||||
<div id="name-error" class="errors" style="display:none;"></div>
|
<div id="name-error" class="errors" style="display:none;"></div>
|
||||||
<h3 id="ws_name">
|
<h3 class="ws_name">
|
||||||
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||||
</h3>
|
</h3>
|
||||||
<h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
|
<h4 class="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
|
@ -29,7 +17,6 @@
|
||||||
<dd id="description-element">
|
<dd id="description-element">
|
||||||
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->obj->getDescription(); ?></textarea>
|
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->obj->getDescription(); ?></textarea>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
|
@ -46,6 +33,12 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<div class="btn-toolbar spl-no-margin clearfix">
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<button class="btn btn-inverse" type="submit" id="webstream_save" name="submit"><?php echo _("Save") ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div><?php echo _("No webstream") ?></div>
|
<div><?php echo _("No webstream") ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<?php if (isset($this->obj)) : ?>
|
<?php if (isset($this->obj)) : ?>
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<button class="btn btn-inverse" type="submit" id="webstream_save" name="submit"><?php echo _("Save") ?></button>
|
<button class="btn btn-inverse" type="submit" id="webstream_save" name="submit"><?php echo _("Save") ?></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<button id="ws_delete" class="btn" <?php if ($this->action == "new"): ?>style="display:none;"<?php endif; ?>aria-disabled="false"><?php echo _("Delete") ?></button>
|
<button id="ws_delete" class="btn" <?php if ($this->action == "new"): ?>style="display:none;"<?php endif; ?>aria-disabled="false"><?php echo _("Delete") ?></button>
|
||||||
|
@ -29,10 +29,10 @@
|
||||||
|
|
||||||
<div class="playlist_title">
|
<div class="playlist_title">
|
||||||
<div id="name-error" class="errors" style="display:none;"></div>
|
<div id="name-error" class="errors" style="display:none;"></div>
|
||||||
<h3 id="ws_name">
|
<h3 class="ws_name">
|
||||||
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
|
||||||
</h3>
|
</h3>
|
||||||
<h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
|
<h4 class="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldset class="toggle" id="fieldset-metadate_change">
|
<fieldset class="toggle" id="fieldset-metadate_change">
|
||||||
|
|
|
@ -11,10 +11,13 @@ div.ColVis_collectionBackground {
|
||||||
.wrapper {
|
.wrapper {
|
||||||
/*background: #242424;*/
|
/*background: #242424;*/
|
||||||
background: #111;
|
background: #111;
|
||||||
left: 0;
|
top: 139px;
|
||||||
|
left: 130px;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
padding: 10px;
|
padding: 10px 10px 40px;
|
||||||
|
/*padding: 0;*/
|
||||||
|
border: none;
|
||||||
|
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
|
@ -120,40 +123,39 @@ div.ColVis_collectionBackground {
|
||||||
flex: 8 100%;
|
flex: 8 100%;
|
||||||
min-height: 50%;
|
min-height: 50%;
|
||||||
}
|
}
|
||||||
#media_type_nav {
|
/*#media_type_nav {*/
|
||||||
display: -webkit-box;
|
/*display: -webkit-box;*/
|
||||||
display: -moz-box;
|
/*display: -moz-box;*/
|
||||||
display: -ms-flexbox;
|
/*display: -ms-flexbox;*/
|
||||||
display: -webkit-flex;
|
/*display: -webkit-flex;*/
|
||||||
display: flex;
|
/*display: flex;*/
|
||||||
-webkit-flex-flow: row;
|
/*-webkit-flex-flow: row;*/
|
||||||
flex-flow: row;
|
/*flex-flow: row;*/
|
||||||
|
|
||||||
-webkit-align-items: center;
|
/*-webkit-align-items: center;*/
|
||||||
align-items: center;
|
/*align-items: center;*/
|
||||||
-webkit-justify-content: center;
|
/*-webkit-justify-content: center;*/
|
||||||
justify-content: center;
|
/*justify-content: center;*/
|
||||||
}
|
/*}*/
|
||||||
#media_type_nav .btn-group {
|
/*#media_type_nav .btn-group {*/
|
||||||
flex: 1 100%;
|
/*flex: 1 100%;*/
|
||||||
}
|
/*}*/
|
||||||
#media_type_nav .dropdown-menu {
|
/*#media_type_nav .dropdown-menu {*/
|
||||||
width: 100%;
|
/*width: 100%;*/
|
||||||
}
|
/*}*/
|
||||||
#media_type_nav .media_type_selector {
|
/*#media_type_nav .media_type_selector {*/
|
||||||
flex: 1 100%;
|
/*flex: 1 100%;*/
|
||||||
margin-top: 3px;
|
/*margin-top: 3px;*/
|
||||||
}
|
/*}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 780px) {
|
@media screen and (max-width: 780px) {
|
||||||
.wrapper {
|
.wrapper {
|
||||||
/*height: 100% !important; /!* Correct for margins *!/*/
|
padding: 4px 4px 40px !important;
|
||||||
padding: 4px !important;
|
|
||||||
}
|
|
||||||
#media_type_nav {
|
|
||||||
min-width: 555px;
|
|
||||||
}
|
}
|
||||||
|
/*#media_type_nav {*/
|
||||||
|
/*min-width: 555px;*/
|
||||||
|
/*}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 555px) {
|
@media screen and (max-width: 555px) {
|
||||||
|
@ -395,8 +397,10 @@ div.ColVis_collectionBackground {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs .close-round {
|
.lib_pl_close {
|
||||||
margin: 1px 0 0 10px;
|
cursor: pointer;
|
||||||
|
margin-left: 10px;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Media editors */
|
/* Media editors */
|
||||||
|
@ -442,10 +446,6 @@ textarea {
|
||||||
|
|
||||||
/* Playlist/Block/Webstream Editors */
|
/* Playlist/Block/Webstream Editors */
|
||||||
|
|
||||||
.inner_playlist_wrapper {
|
|
||||||
flex: 1 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.side_playlist {
|
.side_playlist {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%; /* Override because we're using flexbox */
|
width: 100%; /* Override because we're using flexbox */
|
||||||
|
@ -487,13 +487,19 @@ textarea {
|
||||||
|
|
||||||
.spl-no-margin {
|
.spl-no-margin {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-bottom: 4px;
|
}
|
||||||
|
|
||||||
|
.spl-no-margin > div:last-child {
|
||||||
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spl_sortable {
|
.spl_sortable {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
min-height: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
flex: 1 100%;
|
flex: 1 100%;
|
||||||
|
|
||||||
|
margin: 4px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,12 +507,71 @@ textarea {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spl_empty {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crossfade-main {
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crossfade-main > dl {
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#save_button, #webstream_save {
|
||||||
|
background: #ff5d1a;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 38px;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#save_button:active, #webstream_save {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#save_button:focus, #webstream_save {
|
||||||
|
outline-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Media type selector */
|
/* Media type selector */
|
||||||
|
|
||||||
#media_type_nav {
|
#media_type_nav {
|
||||||
|
position: relative;
|
||||||
|
top: 139px;
|
||||||
|
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
width: 130px;
|
||||||
|
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
margin-right: 10px;
|
padding: 4px;
|
||||||
text-align: center;
|
/*margin-right: 10px;*/
|
||||||
|
/*text-align: center;*/
|
||||||
|
|
||||||
|
background: #353535;
|
||||||
|
border: 1px solid #242424;
|
||||||
|
border-top: 1px solid #7e7e7e;
|
||||||
|
/* border: 1px solid #242424; */
|
||||||
|
-moz-box-shadow: 0 2px 5px rgba(0,0,0,.35);
|
||||||
|
-webkit-box-shadow: 0 2px 5px rgba(0,0,0,.35);
|
||||||
|
box-shadow: 0 2px 5px rgba(0,0,0,.35);
|
||||||
|
|
||||||
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media_type_nav div {
|
#media_type_nav div {
|
||||||
|
@ -619,3 +684,7 @@ textarea {
|
||||||
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropzone .dz-message {
|
||||||
|
margin: 0;
|
||||||
|
}
|
|
@ -341,10 +341,6 @@ fieldset {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 970px) {
|
@media screen and (max-width: 970px) {
|
||||||
#nav {
|
|
||||||
height: inherit;
|
|
||||||
overflow-y: visible;
|
|
||||||
}
|
|
||||||
#nav .responsive-menu {
|
#nav .responsive-menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -393,7 +389,6 @@ fieldset {
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 1100px) {
|
@media screen and (max-width: 1100px) {
|
||||||
#nav {
|
#nav {
|
||||||
height: inherit;
|
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,7 +529,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
// https://wiki.sourcefabric.org/display/CC/Adding+a+new+library+datatable+column
|
// https://wiki.sourcefabric.org/display/CC/Adding+a+new+library+datatable+column
|
||||||
"aoColumns": [
|
"aoColumns": [
|
||||||
/* ftype */ { "sTitle" : "" , "mDataProp" : "ftype" , "bSearchable" : false , "bVisible" : false } ,
|
/* ftype */ { "sTitle" : "" , "mDataProp" : "ftype" , "bSearchable" : false , "bVisible" : false } ,
|
||||||
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "10px" , "sClass" : "library_checkbox" } ,
|
/* Checkbox */ { "sTitle" : "" , "mDataProp" : "checkbox" , "bSortable" : false , "bSearchable" : false , "sWidth" : "16px" , "sClass" : "library_checkbox" } ,
|
||||||
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "16px" , "sClass" : "library_type" , "iDataSort" : 0 } ,
|
/* Type */ { "sTitle" : "" , "mDataProp" : "image" , "bSearchable" : false , "sWidth" : "16px" , "sClass" : "library_type" , "iDataSort" : 0 } ,
|
||||||
/* Is Scheduled */ { "sTitle" : $.i18n._("Scheduled") , "mDataProp" : "is_scheduled" , "bVisible" : false , "bSearchable" : false , "sWidth" : "90px" , "sClass" : "library_is_scheduled"} ,
|
/* Is Scheduled */ { "sTitle" : $.i18n._("Scheduled") , "mDataProp" : "is_scheduled" , "bVisible" : false , "bSearchable" : false , "sWidth" : "90px" , "sClass" : "library_is_scheduled"} ,
|
||||||
///* Is Playlist */ { "sTitle" : $.i18n._("Playlist / Block") , "mDataProp" : "is_playlist" , "bSearchable" : false , "sWidth" : "110px" , "sClass" : "library_is_playlist"} ,
|
///* Is Playlist */ { "sTitle" : $.i18n._("Playlist / Block") , "mDataProp" : "is_playlist" , "bSearchable" : false , "sWidth" : "110px" , "sClass" : "library_is_playlist"} ,
|
||||||
|
|
|
@ -362,7 +362,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//remove any newlines if user somehow snuck them in (easy to do if dragging/dropping text)
|
//remove any newlines if user somehow snuck them in (easy to do if dragging/dropping text)
|
||||||
nameElement.text(nameElement.text().replace("\n", ""));
|
nameElement.text(nameElement.text().replace("\n", ""));
|
||||||
|
|
||||||
var name = $pl.find("#playlist_name_display").text();
|
var name = $pl.find(".playlist_name_display").text();
|
||||||
$(".nav.nav-tabs .active a > span.tab-name").text(name);
|
$(".nav.nav-tabs .active a > span.tab-name").text(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$('#spl_name > a')
|
$('#spl_name > a')
|
||||||
.empty()
|
.empty()
|
||||||
.append(json.name);
|
.append(json.name);
|
||||||
$('#obj_length')
|
$pl.find('.obj_length')
|
||||||
.empty()
|
.empty()
|
||||||
.append(json.length);
|
.append(json.length);
|
||||||
$('#fieldset-metadate_change textarea')
|
$('#fieldset-metadate_change textarea')
|
||||||
|
@ -448,11 +448,11 @@ var AIRTIME = (function(AIRTIME){
|
||||||
pane = $(".editor_pane_wrapper:last"),
|
pane = $(".editor_pane_wrapper:last"),
|
||||||
name = json.type == "md" ? // file
|
name = json.type == "md" ? // file
|
||||||
pane.append(json.html).find("#track_title").val() + $.i18n._(" - Metadata Editor")
|
pane.append(json.html).find("#track_title").val() + $.i18n._(" - Metadata Editor")
|
||||||
: pane.append(json.html).find("#playlist_name_display").text(),
|
: pane.append(json.html).find(".playlist_name_display").text(),
|
||||||
tab =
|
tab =
|
||||||
"<li tab-id='" + $tabCount + "' tab-type='" + json.type + "' id='pl-tab-" + $tabCount + "' role='presentation' class='active'>" +
|
"<li tab-id='" + $tabCount + "' tab-type='" + json.type + "' id='pl-tab-" + $tabCount + "' role='presentation' class='active'>" +
|
||||||
"<a href='#'><span class='tab-name'></span>" +
|
"<a href='#'><span class='tab-name'></span>" +
|
||||||
"<span href='#' class='close-round lib_pl_close'></span>" +
|
"<span href='#' class='lib_pl_close icon-remove'></span>" +
|
||||||
"</a>" +
|
"</a>" +
|
||||||
"</li>",
|
"</li>",
|
||||||
tabs = $(".nav.nav-tabs");
|
tabs = $(".nav.nav-tabs");
|
||||||
|
@ -482,6 +482,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
newTab.wrapper.find(".md-cancel").on("click", function() {
|
newTab.wrapper.find(".md-cancel").on("click", function() {
|
||||||
closeTab();
|
closeTab();
|
||||||
});
|
});
|
||||||
|
initialEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
function openPlaylist(json) {
|
function openPlaylist(json) {
|
||||||
|
@ -517,8 +518,9 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var pane = $(".active-tab"),
|
var pane = $(".active-tab"),
|
||||||
tab = $(".nav.nav-tabs .active"),
|
tab = $(".nav.nav-tabs .active"),
|
||||||
toPane = pane.next().length > 0 ? pane.next() : pane.prev(),
|
toPane = pane.next().length > 0 ? pane.next() : pane.prev(),
|
||||||
toTab = tab.next().length > 0 ? tab.next() : tab.prev();
|
toTab = tab.next().length > 0 ? tab.next() : tab.prev(),
|
||||||
delete $openTabs[tab.attr("tab-type") + pane.find(".obj_id").val()];
|
objId = pane.find(".obj_id").val();
|
||||||
|
delete $openTabs[tab.attr("tab-type") + objId];
|
||||||
tab.remove();
|
tab.remove();
|
||||||
$pl.remove();
|
$pl.remove();
|
||||||
AIRTIME.showbuilder.switchTab(toPane, toTab);
|
AIRTIME.showbuilder.switchTab(toPane, toTab);
|
||||||
|
@ -799,8 +801,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//end main playlist fades.
|
//end main playlist fades.
|
||||||
|
|
||||||
//edit playlist name event
|
//edit playlist name event
|
||||||
$pl.on("keydown", "#playlist_name_display", submitOnEnter);
|
$pl.on("keydown", ".playlist_name_display", submitOnEnter);
|
||||||
$pl.on("blur", "#playlist_name_display", editName);
|
$pl.on("blur", ".playlist_name_display", editName);
|
||||||
|
|
||||||
//edit playlist description events
|
//edit playlist description events
|
||||||
$pl.on("click", "legend", function(){
|
$pl.on("click", "legend", function(){
|
||||||
|
@ -845,7 +847,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var description = $pl.find("#description").val();
|
var description = $pl.find("#description").val();
|
||||||
var streamurl = $pl.find("#streamurl-element input").val();
|
var streamurl = $pl.find("#streamurl-element input").val();
|
||||||
var length = $pl.find("#streamlength-element input").val();
|
var length = $pl.find("#streamlength-element input").val();
|
||||||
var name = $pl.find("#playlist_name_display").text();
|
var name = $pl.find(".playlist_name_display").text();
|
||||||
|
|
||||||
//hide any previous errors (if any)
|
//hide any previous errors (if any)
|
||||||
$(".side_playlist.active-tab .errors").empty().hide();
|
$(".side_playlist.active-tab .errors").empty().hide();
|
||||||
|
@ -876,7 +878,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$ws_id.show();
|
$ws_id.show();
|
||||||
|
|
||||||
|
|
||||||
var length = $(".side_playlist.active-tab #ws_length");
|
var length = $(".side_playlist.active-tab .ws_length");
|
||||||
length.text(json.length);
|
length.text(json.length);
|
||||||
|
|
||||||
//redraw the library to show the new webstream
|
//redraw the library to show the new webstream
|
||||||
|
@ -903,7 +905,13 @@ var AIRTIME = (function(AIRTIME){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".lib_pl_close").unbind().click(function() {
|
// Unbind so each tab is only handled by its own close button
|
||||||
|
$(".lib_pl_close").unbind().click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
$(this).unbind("click"); // Prevent repeated clicks in quick succession from closing multiple tabs
|
||||||
|
|
||||||
var tabId = $(this).closest("li").attr("tab-id");
|
var tabId = $(this).closest("li").attr("tab-id");
|
||||||
AIRTIME.showbuilder.switchTab($("#pl-tab-content-" + tabId), $("#pl-tab-" + tabId));
|
AIRTIME.showbuilder.switchTab($("#pl-tab-content-" + tabId), $("#pl-tab-" + tabId));
|
||||||
|
|
||||||
|
@ -913,7 +921,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
// We also need to run the draw callback to update how dragged items are drawn
|
// We also need to run the draw callback to update how dragged items are drawn
|
||||||
AIRTIME.library.fnDrawCallback();
|
AIRTIME.library.fnDrawCallback();
|
||||||
|
|
||||||
var name = $pl.find('#playlist_name_display').text().trim();
|
var name = $pl.find('.playlist_name_display').text().trim();
|
||||||
|
|
||||||
if ((name == "Untitled Playlist"
|
if ((name == "Untitled Playlist"
|
||||||
|| name == "Untitled Smart Block")
|
|| name == "Untitled Smart Block")
|
||||||
|
@ -941,7 +949,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
* Playlists: get name, description
|
* Playlists: get name, description
|
||||||
*/
|
*/
|
||||||
var criteria = $pl.find('form').serializeArray(),
|
var criteria = $pl.find('form').serializeArray(),
|
||||||
block_name = $pl.find('#playlist_name_display').text(),
|
block_name = $pl.find('.playlist_name_display').text(),
|
||||||
block_desc = $pl.find('textarea[name="description"]').val(),
|
block_desc = $pl.find('textarea[name="description"]').val(),
|
||||||
save_action = baseUrl+'new-playlist/save',
|
save_action = baseUrl+'new-playlist/save',
|
||||||
obj_id = $pl.find(".obj_id").val(),
|
obj_id = $pl.find(".obj_id").val(),
|
||||||
|
|
|
@ -187,8 +187,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
aMediaIds.push(new Array(data.id, data.ftype));
|
aMediaIds.push(new Array(data.id, data.ftype));
|
||||||
|
|
||||||
// check if a playlist/block is open before adding items
|
// check if a playlist/block is open before adding items
|
||||||
if ($('input[id="obj_type"]').val() == 'playlist'
|
if ($('.active-tab .obj_type').val() == 'playlist'
|
||||||
|| $('input[id="obj_type"]').val() == 'block') {
|
|| $('.active-tab .obj_type').val() == 'block') {
|
||||||
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
|
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
function addToCurrentOrNext(arr) {
|
function addToCurrentOrNext(arr) {
|
||||||
var el;
|
var el;
|
||||||
// Add to the end of the current show by getting the footer
|
// Add to the end of the current or next show by getting the footer
|
||||||
el = $(".sb-footer.sb-future:first");
|
el = $(".sb-footer.sb-future:first");
|
||||||
var data = el.prev().data("aData");
|
var data = el.prev().data("aData");
|
||||||
|
|
||||||
|
@ -236,39 +236,53 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
if (AIRTIME.button.isDisabled('btn-group #library-plus') === true) {
|
if (AIRTIME.button.isDisabled('btn-group #library-plus') === true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var selected = AIRTIME.library.getSelectedData(), data, i, length, temp, aMediaIds = [], aSchedIds = [], aData = [];
|
|
||||||
|
|
||||||
// process selected files/playlists.
|
|
||||||
for (i = 0, length = selected.length; i < length; i++) {
|
|
||||||
data = selected[i];
|
|
||||||
aMediaIds.push( {
|
|
||||||
"id" : data.id,
|
|
||||||
"type" : data.ftype
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#show_builder_table tr.sb-selected")
|
|
||||||
.each(function(i, el) {
|
|
||||||
aData.push($(el).data("aData"));
|
|
||||||
});
|
|
||||||
|
|
||||||
// process selected schedule rows to add media
|
|
||||||
// after.
|
|
||||||
for (i = 0, length = aData.length; i < length; i++) {
|
|
||||||
temp = aData[i];
|
|
||||||
aSchedIds.push( {
|
|
||||||
"id" : temp.id,
|
|
||||||
"instance" : temp.instance,
|
|
||||||
"timestamp" : temp.timestamp
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aSchedIds.length == 0) {
|
var selected = AIRTIME.library.getSelectedData(), data, i, length, temp, aMediaIds = [], aSchedIds = [], aData = [];
|
||||||
addToCurrentOrNext(aSchedIds);
|
|
||||||
|
if ($("#show_builder_table").is(":visible")) {
|
||||||
|
for (i = 0, length = selected.length; i < length; i++) {
|
||||||
|
data = selected[i];
|
||||||
|
aMediaIds.push( {
|
||||||
|
"id" : data.id,
|
||||||
|
"type" : data.ftype
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// process selected files/playlists.
|
||||||
|
$("#show_builder_table tr.sb-selected").each(function(i, el) {
|
||||||
|
aData.push($(el).data("aData"));
|
||||||
|
});
|
||||||
|
|
||||||
|
// process selected schedule rows to add media
|
||||||
|
// after.
|
||||||
|
for (i = 0, length = aData.length; i < length; i++) {
|
||||||
|
temp = aData[i];
|
||||||
|
aSchedIds.push( {
|
||||||
|
"id" : temp.id,
|
||||||
|
"instance" : temp.instance,
|
||||||
|
"timestamp" : temp.timestamp
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aSchedIds.length == 0) {
|
||||||
|
if (!addToCurrentOrNext(aSchedIds)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AIRTIME.showbuilder.fnAdd(aMediaIds, aSchedIds);
|
||||||
|
} else {
|
||||||
|
for (i = 0, length = selected.length; i < length; i++) {
|
||||||
|
data = selected[i];
|
||||||
|
aMediaIds.push([data.id, data.ftype]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if a playlist/block is open before adding items
|
||||||
|
if ($('.active-tab .obj_type').val() == 'playlist'
|
||||||
|
|| $('.active-tab .obj_type').val() == 'block') {
|
||||||
|
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AIRTIME.showbuilder.fnAdd(aMediaIds, aSchedIds);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// delete from library.
|
// delete from library.
|
||||||
|
|
|
@ -394,7 +394,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$('#spl_name > a')
|
$('#spl_name > a')
|
||||||
.empty()
|
.empty()
|
||||||
.append(json.name);
|
.append(json.name);
|
||||||
$('#obj_length')
|
$('.obj_length')
|
||||||
.empty()
|
.empty()
|
||||||
.append(json.length);
|
.append(json.length);
|
||||||
$('#fieldset-metadate_change textarea')
|
$('#fieldset-metadate_change textarea')
|
||||||
|
@ -746,8 +746,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//end main playlist fades.
|
//end main playlist fades.
|
||||||
|
|
||||||
//edit playlist name event
|
//edit playlist name event
|
||||||
$pl.on("keydown", "#playlist_name_display", submitOnEnter);
|
$pl.on("keydown", ".playlist_name_display", submitOnEnter);
|
||||||
$pl.on("blur", "#playlist_name_display", editName);
|
$pl.on("blur", ".playlist_name_display", editName);
|
||||||
|
|
||||||
//edit playlist description events
|
//edit playlist description events
|
||||||
$pl.on("click", "legend", function(){
|
$pl.on("click", "legend", function(){
|
||||||
|
@ -792,7 +792,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
var description = $pl.find("#description").val();
|
var description = $pl.find("#description").val();
|
||||||
var streamurl = $pl.find("#streamurl-element input").val();
|
var streamurl = $pl.find("#streamurl-element input").val();
|
||||||
var length = $pl.find("#streamlength-element input").val();
|
var length = $pl.find("#streamlength-element input").val();
|
||||||
var name = $pl.find("#playlist_name_display").text();
|
var name = $pl.find(".playlist_name_display").text();
|
||||||
|
|
||||||
//hide any previous errors (if any)
|
//hide any previous errors (if any)
|
||||||
$(".side_playlist .errors").empty().hide();
|
$(".side_playlist .errors").empty().hide();
|
||||||
|
@ -823,7 +823,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$ws_id.show();
|
$ws_id.show();
|
||||||
|
|
||||||
|
|
||||||
var length = $(".side_playlist #ws_length");
|
var length = $(".side_playlist .ws_length");
|
||||||
length.text(json.length);
|
length.text(json.length);
|
||||||
|
|
||||||
//redraw the library to show the new webstream
|
//redraw the library to show the new webstream
|
||||||
|
@ -873,7 +873,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
* Playlists: get name, description
|
* Playlists: get name, description
|
||||||
*/
|
*/
|
||||||
var criteria = $('form').serializeArray(),
|
var criteria = $('form').serializeArray(),
|
||||||
block_name = $('#playlist_name_display').text(),
|
block_name = $('.playlist_name_display').text(),
|
||||||
block_desc = $('textarea[name="description"]').val(),
|
block_desc = $('textarea[name="description"]').val(),
|
||||||
save_action = baseUrl+'Playlist/save',
|
save_action = baseUrl+'Playlist/save',
|
||||||
obj_id = $('input[id="obj_id"]').val(),
|
obj_id = $('input[id="obj_id"]').val(),
|
||||||
|
|
|
@ -14,7 +14,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
headerFooter = [],
|
headerFooter = [],
|
||||||
DISABLED_CLASS = 'ui-state-disabled',
|
DISABLED_CLASS = 'ui-state-disabled',
|
||||||
selected,
|
selected,
|
||||||
$previouslySelected;
|
$previouslySelected,
|
||||||
|
flagForDeselection;
|
||||||
|
|
||||||
if (AIRTIME.showbuilder === undefined) {
|
if (AIRTIME.showbuilder === undefined) {
|
||||||
AIRTIME.showbuilder = {};
|
AIRTIME.showbuilder = {};
|
||||||
|
@ -244,15 +245,16 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
mod.selectAll = function () {
|
mod.selectAll = function () {
|
||||||
var $trs = $sbTable.find("tr.lib-audio").not(".sb-past, .sb-empty");
|
var $trs = $sbTable.find("tr.lib-audio").not(".sb-past, .sb-empty");
|
||||||
$trs.addClass(SB_SELECTED_CLASS);
|
$trs.addClass(SB_SELECTED_CLASS).find(".sb-checkbox > input").prop('checked', true);
|
||||||
|
|
||||||
mod.checkToolBarIcons();
|
mod.checkToolBarIcons();
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.selectNone = function () {
|
mod.selectNone = function () {
|
||||||
var $trs = $sbTable.find("tr.lib-audio");
|
var $trs = $sbTable.find("tr.lib-audio");
|
||||||
$trs.removeClass(SB_SELECTED_CLASS);
|
$trs.removeClass(SB_SELECTED_CLASS).find(".sb-checkbox > input").prop('checked', false);
|
||||||
$previouslySelected = undefined;
|
$previouslySelected = undefined;
|
||||||
|
selected = undefined;
|
||||||
|
|
||||||
mod.checkToolBarIcons();
|
mod.checkToolBarIcons();
|
||||||
};
|
};
|
||||||
|
@ -422,6 +424,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
oSchedTable = $sbTable.dataTable( {
|
oSchedTable = $sbTable.dataTable( {
|
||||||
"aoColumns": [
|
"aoColumns": [
|
||||||
|
/* checkbox */ {"mDataProp": "allowed", "sTitle": "", "sWidth": "16px", "sClass": "sb-checkbox"},
|
||||||
/* Type */ {"mDataProp": "image", "sTitle": "", "sClass": "library_image sb-image", "sWidth": "16px"},
|
/* Type */ {"mDataProp": "image", "sTitle": "", "sClass": "library_image sb-image", "sWidth": "16px"},
|
||||||
/* starts */ {"mDataProp": "starts", "sTitle": $.i18n._("Start"), "sClass": "sb-starts", "sWidth": "60px"},
|
/* starts */ {"mDataProp": "starts", "sTitle": $.i18n._("Start"), "sClass": "sb-starts", "sWidth": "60px"},
|
||||||
/* ends */ {"mDataProp": "ends", "sTitle": $.i18n._("End"), "sClass": "sb-ends", "sWidth": "60px"},
|
/* ends */ {"mDataProp": "ends", "sTitle": $.i18n._("End"), "sClass": "sb-ends", "sWidth": "60px"},
|
||||||
|
@ -629,6 +632,14 @@ var AIRTIME = (function(AIRTIME){
|
||||||
hide: 'mouseout'
|
hide: 'mouseout'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$node = $(nRow.children[0]);
|
||||||
|
if (aData.allowed === true && aData.scheduled >= 1 && aData.linked_allowed) {
|
||||||
|
$node.html('<input type="checkbox" name="'+aData.id+'"></input>');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$node.empty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the show colour to the leftmost td
|
//add the show colour to the leftmost td
|
||||||
|
@ -764,48 +775,93 @@ var AIRTIME = (function(AIRTIME){
|
||||||
"bScrollCollapseY": false
|
"bScrollCollapseY": false
|
||||||
});
|
});
|
||||||
|
|
||||||
$sbTable.find("tbody").on("mousedown", "tr:not(.sb-past, .sb-empty)", function(ev) {
|
//$sbTable.find("tbody").on("mousedown", "tr:not(.sb-past, .sb-empty)", function(ev) {
|
||||||
|
//
|
||||||
|
// var $tr = $(this),
|
||||||
|
// // Get the ID of the selected row
|
||||||
|
// $rowId = $tr.attr("id");
|
||||||
|
//
|
||||||
|
// 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){
|
||||||
|
// $(el).addClass(SB_SELECTED_CLASS);
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// $previouslySelected.nextUntil($tr).each(function(i, el){
|
||||||
|
// $(el).addClass(SB_SELECTED_CLASS);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// $tr.addClass(SB_SELECTED_CLASS);
|
||||||
|
// } else if (ev.ctrlKey && $previouslySelected !== undefined) {
|
||||||
|
// $tr.addClass(SB_SELECTED_CLASS);
|
||||||
|
// } else {
|
||||||
|
// if (!$tr.hasClass(SB_SELECTED_CLASS)) {
|
||||||
|
// $("."+SB_SELECTED_CLASS).removeClass(SB_SELECTED_CLASS);
|
||||||
|
// }
|
||||||
|
// $tr.addClass(SB_SELECTED_CLASS);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Remember this row so we can properly multiselect
|
||||||
|
// $previouslySelected = $tr;
|
||||||
|
//
|
||||||
|
// mod.checkToolBarIcons();
|
||||||
|
//});
|
||||||
|
//
|
||||||
|
//$sbTable.find("tbody").on("click", "tr:not(.sb-past, .sb-empty)", function(ev) {
|
||||||
|
// if (!ev.ctrlKey && !ev.shiftKey) {
|
||||||
|
// $("."+SB_SELECTED_CLASS).removeClass(SB_SELECTED_CLASS);
|
||||||
|
// $(this).addClass(SB_SELECTED_CLASS);
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
|
||||||
|
$sbTable.find("tbody").on("mousedown", "tr:not(.sb-past, .sb-empty)", function(ev) {
|
||||||
var $tr = $(this),
|
var $tr = $(this),
|
||||||
// Get the ID of the selected row
|
// Get the ID of the selected row
|
||||||
$rowId = $tr.attr("id");
|
$rowId = $tr.attr("id");
|
||||||
|
|
||||||
if (ev.shiftKey && $previouslySelected !== undefined) {
|
if (!$tr.hasClass(SB_SELECTED_CLASS)) {
|
||||||
if ($previouslySelected.attr("id") == $rowId) {
|
if (ev.shiftKey && $previouslySelected !== undefined) {
|
||||||
return;
|
if ($previouslySelected.attr("id") == $rowId) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If the selected row comes before the previously selected row,
|
// If the selected row comes before the previously selected row,
|
||||||
// we want to select previous rows, otherwise we select next
|
// we want to select previous rows, otherwise we select next
|
||||||
if ($previouslySelected.prevAll("#"+$rowId).length !== 0) {
|
if ($previouslySelected.prevAll("#" + $rowId).length !== 0) {
|
||||||
$previouslySelected.prevUntil($tr).each(function(i, el){
|
$previouslySelected.prevUntil($tr).each(function (i, el) {
|
||||||
$(el).addClass(SB_SELECTED_CLASS);
|
$(el).addClass(SB_SELECTED_CLASS);
|
||||||
});
|
$(el).find(".sb-checkbox > input").prop('checked', true);
|
||||||
} else {
|
});
|
||||||
$previouslySelected.nextUntil($tr).each(function(i, el){
|
} else {
|
||||||
$(el).addClass(SB_SELECTED_CLASS);
|
$previouslySelected.nextUntil($tr).each(function (i, el) {
|
||||||
});
|
$(el).addClass(SB_SELECTED_CLASS);
|
||||||
|
$(el).find(".sb-checkbox > input").prop('checked', true);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$tr.addClass(SB_SELECTED_CLASS);
|
$tr.addClass(SB_SELECTED_CLASS);
|
||||||
} else if (ev.ctrlKey && $previouslySelected !== undefined) {
|
$tr.find(".sb-checkbox > input").prop('checked', true);
|
||||||
$tr.addClass(SB_SELECTED_CLASS);
|
|
||||||
} else {
|
} else {
|
||||||
if (!$tr.hasClass(SB_SELECTED_CLASS)) {
|
flagForDeselection = true;
|
||||||
$("."+SB_SELECTED_CLASS).removeClass(SB_SELECTED_CLASS);
|
|
||||||
}
|
|
||||||
$tr.addClass(SB_SELECTED_CLASS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remember this row so we can properly multiselect
|
// Remember this row so we can properly multiselect
|
||||||
$previouslySelected = $tr;
|
$previouslySelected = $tr;
|
||||||
|
|
||||||
mod.checkToolBarIcons();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$sbTable.find("tbody").on("click", "tr:not(.sb-past, .sb-empty)", function(ev) {
|
$sbTable.find("tbody").on("click", "tr:not(.sb-past, .sb-empty)", function(ev) {
|
||||||
if (!ev.ctrlKey && !ev.shiftKey) {
|
if (flagForDeselection) {
|
||||||
$("."+SB_SELECTED_CLASS).removeClass(SB_SELECTED_CLASS);
|
flagForDeselection = false;
|
||||||
$(this).addClass(SB_SELECTED_CLASS);
|
$(this).removeClass(SB_SELECTED_CLASS);
|
||||||
|
$(this).find(".sb-checkbox > input").prop('checked', false);
|
||||||
|
} else {
|
||||||
|
$(this).find(".sb-checkbox > input").prop('checked', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -146,13 +146,18 @@ AIRTIME = (function(AIRTIME) {
|
||||||
mod.onReady = function() {
|
mod.onReady = function() {
|
||||||
// Normally we would just use audio/*, but it includes file types that we can't handle (like .m4a)
|
// Normally we would just use audio/*, but it includes file types that we can't handle (like .m4a)
|
||||||
// We initialize the acceptedMimeTypes variable in Bootstrap so we don't have to duplicate the list
|
// We initialize the acceptedMimeTypes variable in Bootstrap so we don't have to duplicate the list
|
||||||
Dropzone.options.uploadForm = {
|
Dropzone.options.content = {
|
||||||
|
url:'/rest/media',
|
||||||
|
clickable: false,
|
||||||
acceptedFiles: acceptedMimeTypes.join(),
|
acceptedFiles: acceptedMimeTypes.join(),
|
||||||
init: function () {
|
init: function () {
|
||||||
this.on("sending", function (file, xhr, data) {
|
this.on("sending", function (file, xhr, data) {
|
||||||
data.append("csrf_token", $("#csrf").val());
|
data.append("csrf_token", $("#csrf").val());
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
dictDefaultMessage: '',
|
||||||
|
createImageThumbnails: false,
|
||||||
|
previewTemplate : '<div style="display:none"></div>'
|
||||||
};
|
};
|
||||||
|
|
||||||
// define module vars.
|
// define module vars.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue