Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

Conflicts:
	airtime_mvc/application/controllers/PlaylistController.php
This commit is contained in:
James 2012-08-23 10:43:28 -04:00
commit c2d475e6d8
57 changed files with 1304 additions and 703 deletions

View file

@ -54,11 +54,11 @@
<?php
$titleMaxStrLen = 35;
if (mb_strlen($row["track_title"], 'UTF-8') > $titleMaxStrLen) {
$row["track_title"] = substr($row["track_title"], 0, 34)."...";
$row["track_title"] = mb_substr($row["track_title"], 0, 34, 'UTF-8')."...";
}
$artistMaxStrLen = 22;
if (strlen($row["creator"]) > $artistMaxStrLen) {
$row["creator"] = substr($row["creator"], 0, 21)."...";
if (mb_strlen($row["creator"], 'UTF-8') > $artistMaxStrLen) {
$row["creator"] = mb_substr($row["creator"], 0, 21, 'UTF-8')."...";
}
?>
<?php if ($row["type"] == 2) {

View file

@ -0,0 +1,19 @@
<div id="library_content" class="lib-content ui-widget ui-widget-content block-shadow alpha-block padded" style="z-index:254">
<?php echo $this->render('library/library.phtml') ?>
</div>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded">
<?php if ($this->type == 'block') {
echo $this->render('playlist/smart-block.phtml');
} else if ($this->type == 'playlist') {
echo $this->render('playlist/playlist.phtml');
} else if ($this->type == 'stream') {
echo $this->render('webstream/webstream.phtml');
} else {
echo $this->render('webstream/webstream.phtml');
//throw new Exception("Unrecognized type: '{$this->type}'");
}
?>
</div>

View file

@ -1,11 +0,0 @@
<div id="library_content" class="lib-content ui-widget ui-widget-content block-shadow alpha-block padded" style="z-index:254">
<?php echo $this->render('library/library.phtml') ?>
</div>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded">
<?php if ($this->type == 'block') {
echo $this->render('playlist/smart-block.phtml');
} else {
echo $this->render('playlist/playlist.phtml');
} ?>
</div>

View file

@ -13,7 +13,7 @@ if (isset($this->obj)) {
<?php endif; ?>
<?php if (isset($this->obj)) : ?>
<button class="ui-button ui-state-default sp-save" type="button" id="save_button">Save</button>
<button class="ui-button ui-state-default sp-save" title='Save playlist' type="button" id="save_button">Save</button>
<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>

View file

@ -10,7 +10,7 @@ if (isset($this->obj)) {
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button" style="display:<?php echo ($this->obj->isStatic() && $count > 0) ?"block;":"none;"?>">
<span class="ui-icon crossfade-main-icon"></span><span class="ui-button-text">Playlist crossfade</span>
</a>
<button class="ui-button ui-state-default sp-save" type="button" id="save_button">Save</button>
<button class="ui-button ui-state-default sp-save" title='Save smart block&#39s title, description, and criteria' type="button" id="save_button">Save</button>
<?php endif; ?>
<?php if (isset($this->obj)) : ?>

View file

@ -55,7 +55,7 @@ if ($item['type'] == 2) {
'id' => $item["id"],
'cueIn' => $item['cuein'],
'cueOut' => $item['cueout'],
'origLength' => $item['length'])); ?>
'origLength' => $item['orig_length'])); ?>
</div>
<?php }?>

View file

@ -1,18 +1,20 @@
<button id="ws_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
<?php if (isset($this->ws)) : ?>
<?php if (isset($this->obj)) : ?>
<button id="ws_delete" class="ui-button ui-widget ui-state-default" <?php if ($this->action == "new"): ?>style="display:none;"<?php endif; ?> role="button" aria-disabled="false">Delete</button>
<?php endif; ?>
<?php if (isset($this->ws)) : ?>
<input id="ws_id" type="hidden" value="<?php echo $this->ws->getId(); ?>"></input>
<input id="pl_lastMod" type="hidden" value="<?php echo $this->ws->getLastModified('U'); ?>"></input>
<?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 "1";//$this->obj->getLastModified('U'); ?>"></input>
<input id="obj_type" type="hidden" value="webstream"></input>
<div class="status" style="display:none;"></div>
<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->ws->getName(); ?></a>
<a id="playlist_name_display" contenteditable="true"><?php echo $this->obj->getName(); ?></a>
</h3>
<h4 id="ws_length"><?php echo $this->ws->getDefaultLength(); ?></h4>
<h4 id="ws_length"><?php echo $this->obj->getDefaultLength(); ?></h4>
</div>
<fieldset class="toggle" id="fieldset-metadate_change">
@ -20,18 +22,18 @@
<dl class="zend_form">
<dt id="description-label"><label for="description">Description</label></dt>
<dd id="description-element">
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->ws->getDescription(); ?></textarea>
<textarea cols="80" rows="24" id="description" name="description"><?php echo $this->obj->getDescription(); ?></textarea>
</dd>
<dt id="submit-label" style="display: none;">&nbsp;</dt>
<div id="url-error" class="errors" style="display:none;"></div>
<dt id="streamurl-label"><label for="streamurl">Stream URL:</label></dt>
<dd id="streamurl-element">
<input type="text" value="<?php echo $this->ws->getUrl(); ?>" size="40"/>
<input type="text" value="<?php echo $this->obj->getUrl(); ?>" size="40"/>
</dd>
<div id="length-error" class="errors" style="display:none;"></div>
<dt id="streamlength-label"><label for="streamlength">Default Length:</label></dt>
<dd id="streamlength-element">
<input type="text" value="<?php echo $this->ws->getDefaultLength() ?>"/>
<input type="text" value="<?php echo $this->obj->getDefaultLength() ?>"/>
</dd>
<dd id="submit-element" class="buttons">
<input class="ui-button ui-state-default" type="submit" value="Save" id="webstream_save" name="submit">