Merge branch 'saas' into saas-landing-page

This commit is contained in:
drigato 2015-05-04 09:40:26 -04:00
commit f375115825
22 changed files with 4795 additions and 1207 deletions

View File

@ -147,7 +147,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headScript()->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $view->headScript()->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); // $view->headScript()->appendFile($baseUrl . 'js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . 'js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $view->headScript()->appendFile($baseUrl . 'js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . 'js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $view->headScript()->appendFile($baseUrl . 'js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . 'js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $view->headScript()->appendFile($baseUrl . 'js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');

View File

@ -21,7 +21,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?> <?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
<div id="Panel"> <div id="Panel" class="sticky">
<?php if($this->suspended) : ?> <?php if($this->suspended) : ?>
<?php echo $this->partial('partialviews/suspended.phtml'); ?> <?php echo $this->partial('partialviews/suspended.phtml'); ?>
<?php else : ?> <?php else : ?>

View File

@ -64,13 +64,6 @@ SQL;
{ {
//Everything in this function must be done in UTC. You will get a swift kick in the pants if you mess that up. //Everything in this function must be done in UTC. You will get a swift kick in the pants if you mess that up.
if (!is_int($p_prev) || !is_int($p_next)) {
//must enter integers to specify ranges
Logging::info("Invalid range parameters: $p_prev or $p_next");
return array();
}
// when timeEnd is unspecified, return to the default behaviour - set a range of 48 hours from current time // when timeEnd is unspecified, return to the default behaviour - set a range of 48 hours from current time
if (!$utcTimeEnd) { if (!$utcTimeEnd) {
$end = new DateTime(); $end = new DateTime();

View File

@ -238,8 +238,8 @@
} }
// variables for updating the player's metadata // variables for updating the player's metadata
var time_to_next_track_starts; var time_to_next_track_starts = 0;
var metadataTimer; var metadataTimer = null;
// Fetches the streams metadata from the Airtime live-info API // Fetches the streams metadata from the Airtime live-info API
// and attaches it to the player UI. // and attaches it to the player UI.
@ -252,7 +252,12 @@
success: function(data) { success: function(data) {
if (data.current === null) { if (data.current === null) {
$("p.now_playing").html("Offline"); if (data.currentShow != null) {
//Master/show source have no current track but they do have a current show.
$("p.now_playing").html(data.currentShow[0].name);
} else {
$("p.now_playing").html("Offline");
}
time_to_next_track_starts = 20000; time_to_next_track_starts = 20000;
} else { } else {
var artist = data.current.name.split(" - ")[0]; var artist = data.current.name.split(" - ")[0];
@ -260,6 +265,12 @@
$("p.now_playing").html(artist + "<span>" + track + "</span>"); $("p.now_playing").html(artist + "<span>" + track + "</span>");
var current_track_end_time = new Date(data.current.ends); var current_track_end_time = new Date(data.current.ends);
if (current_track_end_time == "Invalid Date" || isNaN(current_track_end_time)) {
// If the conversion didn't work (since the String is not in ISO format)
// then change it to be ISO-compliant. This is somewhat hacky and may break
// if the date string format in live-info changes!
current_track_end_time = new Date((data.current.ends).replace(" ", "T"));
}
var current_time = new Date(); var current_time = new Date();
//convert current_time to UTC to match the timezone of time_to_next_track_starts //convert current_time to UTC to match the timezone of time_to_next_track_starts
current_time = new Date(current_time.getTime() + current_time.getTimezoneOffset() * 60 * 1000); current_time = new Date(current_time.getTime() + current_time.getTimezoneOffset() * 60 * 1000);
@ -271,9 +282,14 @@
} else { } else {
$("ul.schedule_list").find("li").html(data.next.name); $("ul.schedule_list").find("li").html(data.next.name);
} }
} }
}); });
//Preventative code if the local and remote clocks are out of sync.
if (isNaN(time_to_next_track_starts) || time_to_next_track_starts < 0) {
time_to_next_track_starts = 0;
}
// Add 3 seconds to the timeout so Airtime has time to update the metadata before we fetch it // Add 3 seconds to the timeout so Airtime has time to update the metadata before we fetch it
metadataTimer = setTimeout(attachStreamMetadataToPlayer, time_to_next_track_starts+3000); metadataTimer = setTimeout(attachStreamMetadataToPlayer, time_to_next_track_starts+3000);
} }

View File

@ -5,7 +5,10 @@
</style> </style>
<?php if ($this->quotaLimitReached) { ?> <?php if ($this->quotaLimitReached) { ?>
<div class="errors quota-reached"> <div class="errors quota-reached">
Disk quota exceeded. You cannot upload files until you <a href="http://www.sourcefabric.org/en/airtime" target="_blank">upgrade your storage</a>. Disk quota exceeded. You cannot upload files until you
<a target="_parent" href=<?php $baseUrl = Application_Common_OsPath::getBaseDir(); echo $baseUrl . "billing/upgrade"?>>
upgrade your storage
</a>.
</div> </div>
<?php <?php
} }

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -262,6 +262,9 @@ table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hov
margin: 0; margin: 0;
padding: 10px 0 0 0; padding: 10px 0 0 0;
overflow: hidden; overflow: hidden;
top: 0;
left: 0;
right: 0;
} }
.ui-dialog .lib_content { .ui-dialog .lib_content {
@ -281,4 +284,4 @@ table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hov
.ui-dialog .sb_content .padded { .ui-dialog .sb_content .padded {
padding: 5px 10px 5px 16px; padding: 5px 10px 5px 16px;
} }

View File

@ -141,8 +141,22 @@ select {
* html .clearfix, * html li { height: 1%;} * html .clearfix, * html li { height: 1%;}
.clearfix, #side_playlist li { display: block; } .clearfix, #side_playlist li { display: block; }
/* Master Panel */ /* Master Panel */
.sticky {
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 1000;
border-top: 0;
}
.push {
width: 100%;
height: 139px;
}
#sticky { #sticky {
position:fixed; position:fixed;
height:130px; height:130px;
@ -150,7 +164,6 @@ select {
left:0; left:0;
} }
#master-panel { #master-panel {
background:#3d3d3d url(images/masterpanel_bg.png) repeat-x 0 0; background:#3d3d3d url(images/masterpanel_bg.png) repeat-x 0 0;
height:100px; height:100px;
@ -427,7 +440,10 @@ select {
.wrapper { .wrapper {
margin: 0 5px 0 5px; position: absolute;
top: 141px;
left: 10px;
right: 10px;
padding:10px 0 0 0; padding:10px 0 0 0;
} }
@ -1182,10 +1198,10 @@ input[type="checkbox"] {
left:0; left:0;
margin-bottom:140px; margin-bottom:140px;
}*/ }*/
.sticky { /*.sticky {*/
padding:0; /*padding:0;*/
width:100%; /*width:100%;*/
} /*}*/
.floated-panel { .floated-panel {
margin-top:0; margin-top:0;
@ -3222,7 +3238,13 @@ dd .stream-status {
{ {
text-align: center; text-align: center;
background-color: #D27A7A; background-color: #D27A7A;
padding: 20px; height: 143px;
font-size: 16px; font-size: 16px;
font-family: Helvetica, Arial, sans-serif; font-family: Helvetica, Arial, sans-serif;
} }
.suspension_notice h2
{
padding-bottom: 0px;
padding-top: 13px;
}

View File

@ -1,11 +1,11 @@
$(document).ready(function() { $(document).ready(function() {
$("#Panel").stickyPanel({ /* Removed as this is now (hopefully) unnecessary */
topPadding: 1, //$("#Panel").stickyPanel({
afterDetachCSSClass: "floated-panel", // topPadding: 1,
savePanelSpace: true // afterDetachCSSClass: "floated-panel",
}); // savePanelSpace: true
//});
//this statement tells the browser to fade out any success message after 5 seconds //this statement tells the browser to fade out any success message after 5 seconds
setTimeout(function(){$(".success").fadeOut("slow", function(){$(this).empty()});}, 5000); setTimeout(function(){$(".success").fadeOut("slow", function(){$(this).empty()});}, 5000);
@ -52,8 +52,8 @@ var i18n_days_short = [
$.i18n._("We"), $.i18n._("We"),
$.i18n._("Th"), $.i18n._("Th"),
$.i18n._("Fr"), $.i18n._("Fr"),
$.i18n._("Sa"), $.i18n._("Sa")
] ];
function adjustDateToServerDate(date, serverTimezoneOffset){ function adjustDateToServerDate(date, serverTimezoneOffset){
//date object stores time in the browser's localtime. We need to artificially shift //date object stores time in the browser's localtime. We need to artificially shift

View File

@ -1445,7 +1445,7 @@ var AIRTIME = (function(AIRTIME){
initialEvents(); initialEvents();
setUpPlaylist(); setUpPlaylist();
}; };
function setWidgetSize() { function setWidgetSize() {
viewport = AIRTIME.utilities.findViewportDimensions(); viewport = AIRTIME.utilities.findViewportDimensions();
widgetHeight = viewport.height - 185; widgetHeight = viewport.height - 185;
@ -1458,7 +1458,7 @@ var AIRTIME = (function(AIRTIME){
.find(".dataTables_scrolling") .find(".dataTables_scrolling")
.css("max-height", libTableHeight) .css("max-height", libTableHeight)
.end() .end()
.width(Math.floor(width * 0.55)); .width(Math.floor(width * 0.54));
$pl.height(widgetHeight) $pl.height(widgetHeight)
.width(Math.floor(width * 0.45)); .width(Math.floor(width * 0.45));

View File

@ -53,8 +53,8 @@ AIRTIME = (function(AIRTIME) {
function setWidgetSize() { function setWidgetSize() {
viewport = AIRTIME.utilities.findViewportDimensions(); viewport = AIRTIME.utilities.findViewportDimensions();
widgetHeight = viewport.height - 180; widgetHeight = viewport.height - 180;
screenWidth = Math.floor(viewport.width - 40); screenWidth = Math.floor(viewport.width - 50);
var libTableHeight = widgetHeight - 175, var libTableHeight = widgetHeight - 175,
builderTableHeight = widgetHeight - 95, builderTableHeight = widgetHeight - 95,
oTable; oTable;
@ -77,9 +77,9 @@ AIRTIME = (function(AIRTIME) {
if ($lib.filter(':visible').length > 0) { if ($lib.filter(':visible').length > 0) {
$lib.width(Math.floor(screenWidth * 0.48)); $lib.width(Math.floor(screenWidth * 0.47));
$builder.width(Math.floor(screenWidth * 0.48)) $builder.width(Math.floor(screenWidth * 0.47))
.find("#sb_edit") .find("#sb_edit")
.remove() .remove()
.end() .end()

View File

@ -60,6 +60,9 @@ class AirtimeAnalyzerServer:
#Disable most pika/rabbitmq logging: #Disable most pika/rabbitmq logging:
pika_logger = logging.getLogger('pika') pika_logger = logging.getLogger('pika')
pika_logger.setLevel(logging.CRITICAL) pika_logger.setLevel(logging.CRITICAL)
boto_logger = logging.getLogger('auth')
boto_logger.setLevel(logging.CRITICAL)
# Set up logging # Set up logging
logFormatter = logging.Formatter("%(asctime)s [%(module)s] [%(levelname)-5.5s] %(message)s") logFormatter = logging.Formatter("%(asctime)s [%(module)s] [%(levelname)-5.5s] %(message)s")