SAAS-948 - showbuilder styling

This commit is contained in:
Duncan Sommerville 2015-08-07 16:49:05 -04:00
parent 0c3d9a8af4
commit e6609896a5
19 changed files with 429 additions and 279 deletions

View file

@ -6,15 +6,15 @@ if (isset($this->obj)) {
?>
<?php if (isset($this->obj)) : ?>
<div class="inner_playlist_wrapper">
<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="inner_editor_wrapper">
<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 class='obj_type' type='hidden' value='playlist'/>
<div class="playlist_title">
<h3 id="obj_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
<h3 class="obj_name">
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
</h3>
<h4 id="obj_length"><?php echo _("Playlist Length: ") . $this->length; ?></h4>
<h4 class="obj_length"><?php echo $this->length; ?></h4>
</div>
<div id='sp-success' class='success' style='display:none'></div>
@ -25,23 +25,18 @@ if (isset($this->obj)) {
</dd>
</dl>
<div class="btn-toolbar spl-no-margin clearfix">
<?php if (isset($this->obj)) : ?>
<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>
</div>
<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>
</div>
<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 class='btn-group pull-right'>
<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 class="btn-toolbar spl-no-margin clearfix left-floated">
<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>
</div>
<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>
</div>
<div class='btn-group pull-right'>
<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>
</div>
<?php //echo $this->form; ?>
@ -62,6 +57,11 @@ if (isset($this->obj)) {
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</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 : ?>
<div><?php echo _("No open playlist") ?></div>

View file

@ -4,41 +4,25 @@ if (isset($this->obj)) {
$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&#39s 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)) : ?>
<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">
<?php
if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->escape($this->obj->getName());
?>
</a>
</h3>
<h4 id="obj_length"><?php echo $this->length; ?></h4>
</div>
<div id='sp-success-saved' class='success' style='display:none'></div>
<div class="inner_editor_wrapper">
<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 class='obj_type' type='hidden' value='block'/>
<div class="playlist_title">
<h3 class="obj_name">
<a class="playlist_name_display" contenteditable="true">
<?php
if (isset($this->unsavedName)) echo $this->unsavedName;
else echo $this->escape($this->obj->getName());
?>
</a>
</h3>
<h4 class="obj_length"><?php echo $this->length; ?></h4>
</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">
<dt id="description-label"><label for="description"><?php echo _("Description") ?></label></dt>
<dd id="description-element">
@ -48,28 +32,39 @@ if (isset($this->obj)) {
</textarea>
</dd>
</dl>
</fieldset>
<?php echo $this->form; ?>
<div id="crossfade_main" class="crossfade-main clearfix" 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>
<?php echo $this->form; ?>
<div class="btn-toolbar spl-no-top-margin clearfix">
<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'>
<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>
</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 class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>
<ul class="spl_sortable">
<?php $this->contents = $contents;
echo $this->render('playlist/update.phtml') ?>
</ul>
<div class="btn-toolbar spl-no-top-margin clearfix">
<div class='btn-group pull-right'>
<button class="btn btn-inverse" title='Save smart block&#39s title, description, and criteria' type="button" id="save_button"><?php echo _("Save") ?></button>
</div>
</div>
<?php else : ?>

View file

@ -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_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>
<h3 class="obj_name">
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
</h3>
<h4 id="obj_length"><?php echo $this->length; ?></h4>
<h4 class="obj_length"><?php echo $this->length; ?></h4>
</div>
<div id='sp-success' class='success' style='display:none'></div>

View file

@ -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_type' type='hidden' value='block'></input>
<div class="playlist_title">
<h3 id="obj_name">
<h3 class="obj_name">
<a id="playlist_name_display" contenteditable="true">
<?php
if (isset($this->unsavedName)) echo $this->unsavedName;
@ -47,7 +47,7 @@ if (isset($this->obj)) {
?>
</a>
</h3>
<h4 id="obj_length"><?php echo $this->length; ?></h4>
<h4 class="obj_length"><?php echo $this->length; ?></h4>
</div>
<div id='sp-success-saved' class='success' style='display:none'></div>

View file

@ -13,13 +13,13 @@ if ($item['type'] == 2) {
else if ($item['type'] == 1) {
$fileUrl = null;
}
else if ($item['type'] == 0) {
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
$fileUrl = $audiofile->getFileUrl();
else if ($item['type'] == 0) {
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
$fileUrl = $audiofile->getFileUrl();
}
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();
}
?>
@ -79,7 +79,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
'id' => $item["id"],
'cueIn' => $item['cuein'],
'cueOut' => $item['cueout'],
'cueInSec' => $item['cueInSec'],
'cueInSec' => $item['cueInSec'],
'cueOutSec' => $item['cueOutSec'],
'uri' => $fileUrl,
'origLength' => $item['orig_length'])); ?>
@ -99,18 +99,18 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
'fadeOut' => $items[$i]['fadeout'],
'fadeIn' => $items[$i+1]['fadein'],
'item1Type' => $items[$i]['type'],
'cueIn1' => $items[$i]['cueInSec'],
'cueIn1' => $items[$i]['cueInSec'],
'cueOut1' => $items[$i]['cueOutSec'],
'item1Url' => $fileUrl
);
$item2 = array(
$item2 = array(
'item2Url' => $nextFileUrl,
'item2' => $items[$i+1]['id'],
'item2Type' => $items[$i+1]['type'],
'offset' => $items[$i]['trackSec'] - $items[$i+1]['trackoffset'],
'cueIn2' => $items[$i+1]['cueInSec'],
'cueOut2' => $items[$i+1]['cueOutSec']
'item2' => $items[$i+1]['id'],
'item2Type' => $items[$i+1]['type'],
'offset' => $items[$i]['trackSec'] - $items[$i+1]['trackoffset'],
'cueIn2' => $items[$i+1]['cueInSec'],
'cueOut2' => $items[$i+1]['cueOutSec']
);
if (isset($nextFileUrl)) {
@ -129,13 +129,10 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
<?php endforeach; ?>
<?php else : ?>
<li class="spl_empty">
<div class="spl_empty">
<?php
if ($this->obj instanceof Application_Model_Block) {
echo _("Empty smart block");
} else {
echo _("Empty playlist");
}
echo _("Drag tracks here from your library to add them to the "
. ($this->obj instanceof Application_Model_Block ? "smart block" : "playlist"));
?>
</li>
</div>
<?php endif; ?>

View file

@ -5,37 +5,32 @@
<!-- </div>-->
<!--</form>-->
<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 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>-->
<?php echo $this->csrf ?>
<div id="library_content" class="lib-content tabs content-pane wide-panel">
<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">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>

View file

@ -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)) : ?>
<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'); ?>"/>
@ -18,10 +6,10 @@
<div class="playlist_title">
<div id="name-error" class="errors" style="display:none;"></div>
<h3 id="ws_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
<h3 class="ws_name">
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
</h3>
<h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
<h4 class="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
</div>
<dl class="zend_form">
@ -29,7 +17,6 @@
<dd id="description-element">
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->obj->getDescription(); ?></textarea>
</dd>
</dl>
<dl class="zend_form">
@ -46,6 +33,12 @@
</dd>
</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 : ?>
<div><?php echo _("No webstream") ?></div>
<?php endif; ?>

View file

@ -13,7 +13,7 @@
<?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>
<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>
@ -29,10 +29,10 @@
<div class="playlist_title">
<div id="name-error" class="errors" style="display:none;"></div>
<h3 id="ws_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
<h3 class="ws_name">
<a class="playlist_name_display" contenteditable="true"><?php echo $this->escape($this->obj->getName()); ?></a>
</h3>
<h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
<h4 class="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
</div>
<fieldset class="toggle" id="fieldset-metadate_change">