Revert "SAAS-1061 - implement podcast list view skeleton; small bugfixes"

This reverts commit 0fcf6a8dac.
This commit is contained in:
Duncan Sommerville 2015-09-14 18:29:43 -04:00
parent 0fcf6a8dac
commit 893d60ed44
16 changed files with 439 additions and 512 deletions

View file

@ -31,7 +31,6 @@ require_once "Auth.php";
require_once "interface/OAuth2.php";
require_once "TaskManager.php";
require_once "UsabilityHints.php";
require_once "MediaType.php";
require_once __DIR__.'/models/formatters/LengthFormatter.php';
require_once __DIR__.'/services/CeleryService.php';
require_once __DIR__.'/services/SoundcloudService.php';

View file

@ -36,8 +36,6 @@ set_include_path(implode(PATH_SEPARATOR, array(
)));
set_include_path(APPLICATION_PATH . 'common' . PATH_SEPARATOR . get_include_path());
set_include_path(APPLICATION_PATH . 'common/enum' . PATH_SEPARATOR . get_include_path());
set_include_path(APPLICATION_PATH . 'common/interface' . PATH_SEPARATOR . get_include_path());
//Propel classes.
set_include_path(APPLICATION_PATH . 'models' . PATH_SEPARATOR . get_include_path());

View file

@ -1,47 +0,0 @@
<?php
/**
* Basic enumeration implementation; from http://stackoverflow.com/questions/254514/php-and-enumerations
*
* Class Enum
*/
abstract class Enum {
const __default = NULL;
private static $constCacheArray = NULL;
private function __construct() {}
private static function getConstants() {
if (self::$constCacheArray == NULL) {
self::$constCacheArray = [];
}
$calledClass = get_called_class();
if (!array_key_exists($calledClass, self::$constCacheArray)) {
$reflect = new ReflectionClass($calledClass);
self::$constCacheArray[$calledClass] = $reflect->getConstants();
}
return self::$constCacheArray[$calledClass];
}
public static function isValidName($name, $strict = false) {
$constants = self::getConstants();
if ($strict) {
return array_key_exists($name, $constants);
}
$keys = array_map('strtolower', array_keys($constants));
return in_array(strtolower($name), $keys);
}
public static function isValidValue($value) {
$values = array_values(self::getConstants());
return in_array($value, $values, $strict = true);
}
public static function getDefault() {
return static::__default;
}
}

View file

@ -1,14 +0,0 @@
<?php
require_once "Enum.php";
final class MediaType extends Enum {
const __default = self::FILE;
const FILE = 1;
const PLAYLIST = 2;
const BLOCK = 3;
const WEBSTREAM = 4;
const PODCAST = 5;
}

View file

@ -66,21 +66,22 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<a href="#"><?php echo _("Webstream") ?></a>
</li>
</ul>
<a href="/plupload">
<a href="/Plupload">
<button id="add_media_btn" class="btn btn-small dashboard-btn btn-new">
<span><?php echo _("Upload") ?></span>
</button>
</a>
</div>
<div class="media_type_selector top-link" data-selection-id="<?php echo MediaType::getDefault(); ?>">
<a href="/showbuilder#">
<i class='icon-home icon-white'></i>
<?php echo _("Dashboard") ?>
</a>
</div>
<?php $subnavPrefix = "/showbuilder"; require_once APPLICATION_PATH . "views/scripts/partialviews/dashboard-sub-nav.php"; ?>
<div class="media_type_selector top-link" data-selection-id="1">
<a href="/showbuilder#"><i class='icon-home icon-white'></i><?php echo _("Dashboard") ?></a></div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="1">
<a href="/showbuilder#tracks"><i class='icon-music icon-white'></i><?php echo _("Tracks") ?></a></div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="2">
<a href="/showbuilder#playlists"><i class='icon-list icon-white'></i><?php echo _("Playlists") ?></a></div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="3">
<a href="/showbuilder#smart-blocks"><i class='icon-time icon-white'></i><?php echo _("Smart Blocks") ?></a></div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="4">
<a href="/showbuilder#webstreams"><i class='icon-random icon-white'></i><?php echo _("Webstreams") ?></a></div>
<hr style="margin-left: 5px; margin-right: 5px">
<div id="nav">
<?php echo $this->navigation()->menu(); ?>
@ -89,6 +90,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<?php
$partitions = Application_Model_Systemstatus::GetDiskInfo();
$status = new StdClass;
$partitions = $partitions;
$disk = $partitions[0];
$used = $disk->totalSpace-$disk->totalFreeSpace;
$total = $disk->totalSpace;

View file

@ -805,17 +805,21 @@ SQL;
$unionTable = "({$plTable} UNION {$blTable} UNION {$fileTable} UNION {$streamTable}) AS RESULTS";
//choose which table we need to select data from.
// TODO : use constants instead of numbers -- RG
switch ($type) {
case MediaType::FILE:
case 0:
$fromTable = $unionTable;
break;
case 1:
$fromTable = $fileTable." AS File"; //need an alias for the table if it's standalone.
break;
case MediaType::PLAYLIST:
case 2:
$fromTable = $plTable." AS Playlist"; //need an alias for the table if it's standalone.
break;
case MediaType::BLOCK:
case 3:
$fromTable = $blTable." AS Block"; //need an alias for the table if it's standalone.
break;
case MediaType::WEBSTREAM:
case 4:
$fromTable = $streamTable." AS StreamTable"; //need an alias for the table if it's standalone.
break;
default:

View file

@ -1,30 +0,0 @@
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::FILE ?>">
<a href="<?php echo $subnavPrefix; ?>#tracks">
<i class='icon-music icon-white'></i>
<span class="selector-name"><?php echo _("Tracks") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::PLAYLIST ?>">
<a href="<?php echo $subnavPrefix; ?>#playlists">
<i class='icon-list icon-white'></i>
<span class="selector-name"><?php echo _("Playlists") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::BLOCK ?>">
<a href="<?php echo $subnavPrefix; ?>#smart-blocks">
<i class='icon-time icon-white'></i>
<span class="selector-name"><?php echo _("Smart Blocks") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::WEBSTREAM ?>">
<a href="<?php echo $subnavPrefix; ?>#webstreams">
<i class='icon-random icon-white'></i>
<span class="selector-name"><?php echo _("Webstreams") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="<?php echo MediaType::PODCAST ?>">
<a href="<?php echo $subnavPrefix; ?>#podcasts">
<i class='icon-headphones icon-white'></i>
<span class="selector-name"><?php echo _("Podcasts") ?></span>
</a>
</div>

View file

@ -1,7 +1,30 @@
<div><!-- jQuery UI changes the styling on the outermost div; use a blank div so as not to break the .wrapper styling-->
<div class="wrapper">
<div id="media_selector_wrapper">
<?php $subnavPrefix = ""; require_once APPLICATION_PATH . "views/scripts/partialviews/dashboard-sub-nav.php"; ?>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="1">
<a href="#tracks">
<i class='icon-music icon-white'></i>
<span class="selector-name"><?php echo _("Tracks") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="2">
<a href="#playlists">
<i class='icon-list icon-white'></i>
<span class="selector-name"><?php echo _("Playlists") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="3">
<a href="#smart-blocks">
<i class='icon-time icon-white'></i>
<span class="selector-name"><?php echo _("Smart Blocks") ?></span>
</a>
</div>
<div class="media_type_selector dashboard_sub_nav" data-selection-id="4">
<a href="#webstreams">
<i class='icon-random icon-white'></i>
<span class="selector-name"><?php echo _("Webstreams") ?></span>
</a>
</div>
</div>
<?php echo $this->csrf ?>

View file

@ -15,7 +15,6 @@
</div>
<div class="outer-datatable-wrapper">
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable"></table>
<table id="podcast_table" cellpadding="0" cellspacing="0" class="datatable"></table>
</div>
</div>