Merge branch 'saas-dev' into soundcloud

This commit is contained in:
Duncan Sommerville 2015-06-17 10:14:03 -04:00
commit 3a1d34dffe
10 changed files with 27 additions and 31 deletions

View File

@ -100,10 +100,10 @@ try {
echo "<pre>"; echo "<pre>";
echo $e->getTraceAsString(); echo $e->getTraceAsString();
echo "</pre>"; echo "</pre>";
Logging::info($e->getMessage()); Logging::error($e->getMessage());
Logging::info($e->getTraceAsString()); Logging::error($e->getTraceAsString());
} else { } else {
Logging::info($e->getTrace()); Logging::error($e->getTrace());
} }
throw $e; throw $e;
} }

View File

@ -99,10 +99,10 @@ class DashboardController extends Zend_Controller_Action
$this->_helper->layout->setLayout('livestream'); $this->_helper->layout->setLayout('livestream');
$logo = Application_Model_Preference::GetStationLogo(); $logo = Application_Model_Preference::GetStationLogo();
if ($logo) { if ($logo === DEFAULT_LOGO_PLACEHOLDER) {
$this->view->logo = "data:image/png;base64,$logo"; $this->view->logo = "/".DEFAULT_LOGO_FILE;
} else { } else {
$this->view->logo = $baseUrl."css/images/airtime_logo_jp.png"; $this->view->logo = "data:image/png;base64,".$logo;
} }
} }

View File

@ -78,17 +78,12 @@ class EmbedController extends Zend_Controller_Action
public function weeklyProgramAction() public function weeklyProgramAction()
{ {
$this->view->layout()->disableLayout();
$CC_CONFIG = Config::getConfig(); $CC_CONFIG = Config::getConfig();
$request = $this->getRequest(); $request = $this->getRequest();
$useIframe = $request->getParam('useiframe');
if (!isset($useIframe)) {
$this->view->layout()->disableLayout();
} elseif ($useIframe == "1") {
$this->_helper->layout->setLayout('bare');
}
$widgetStyle = $request->getParam('style'); $widgetStyle = $request->getParam('style');
if ($widgetStyle == "premium") { if ($widgetStyle == "premium") {

View File

@ -7,7 +7,6 @@ class ErrorController extends Zend_Controller_Action {
//We cannot show that. //We cannot show that.
$this->view->layout()->disableLayout(); $this->view->layout()->disableLayout();
$this->setupCSS(); $this->setupCSS();
} }
public function errorAction() { public function errorAction() {
@ -31,9 +30,9 @@ class ErrorController extends Zend_Controller_Action {
break; break;
} }
} else { } else {
$exceptions = $this->_getAllParams(); //$exceptions = $this->_getAllParams();
Logging::error($exceptions); //Logging::error($exceptions);
$this->error500Action(); $this->error404Action();
return; return;
} }
@ -74,7 +73,7 @@ class ErrorController extends Zend_Controller_Action {
* 404 error - route or controller * 404 error - route or controller
*/ */
public function error404Action() { public function error404Action() {
$this->_helper->viewRenderer('error-404'); $this->_helper->viewRenderer('error');
$this->getResponse()->setHttpResponseCode(404); $this->getResponse()->setHttpResponseCode(404);
$this->view->message = _('Page not found.'); $this->view->message = _('Page not found.');
} }

View File

@ -134,7 +134,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
//$r->gotoSimpleAndExit('index', 'login', $request->getModuleName()); //$r->gotoSimpleAndExit('index', 'login', $request->getModuleName());
//die(); //die();
throw new Zend_Controller_Exception("hi", 401); throw new Zend_Controller_Exception("Incorrect API key", 401);
} }
} }
else //Non-REST, regular Airtime web app requests else //Non-REST, regular Airtime web app requests

View File

@ -83,7 +83,11 @@ class Logging {
{ {
$logger = self::getLogger(); $logger = self::getLogger();
$logger->err(self::getLinePrefix(true) . self::toString($p_msg)); $logger->err(self::getLinePrefix(true) . self::toString($p_msg));
SentryLogger::getInstance()->captureError(self::toString($p_msg));
//Escape the % symbols in any of our errors because Sentry chokes (vsprint formatting error).
$msg = self::toString($p_msg);
$msg = str_replace("%", "%%", $msg);
SentryLogger::getInstance()->captureError($msg);
} }
public static function debug($p_msg) public static function debug($p_msg)

View File

@ -4,8 +4,6 @@
<head> <head>
<link rel="stylesheet" href="<?php echo $this->css?>" type="text/css"> <link rel="stylesheet" href="<?php echo $this->css?>" type="text/css">
<script src="<?php echo $this->jquery ?>" type="text/javascript"></script> <script src="<?php echo $this->jquery ?>" type="text/javascript"></script>
<script src="<?php echo $this->jquery_custom ?>" type="text/javascript"></script>
<script src="<?php echo $this->widget_js ?>" type="text/javascript"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {

View File

@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<div class="error-content"> <div class="error-content">
<h2><?php echo _("Page not found!")?></h2> <h2><?php echo $this->escape($this->message)?></h2>
<p><?php echo _("Looks like the page you were looking for doesn't exist!")?></p> <p><?php echo _("Looks like the page you were looking for doesn't exist!")?></p>
<div class="button-bar"> <div class="button-bar">
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a> <a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>

View File

@ -4,10 +4,11 @@ var newheight;
var newwidth; var newwidth;
if(document.getElementById){ if(document.getElementById){
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight; newheight=document.getElementById(id).contentWindow.document.body.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth; // Hack to get height in Firefox
if (newheight == 0) newheight = newheight = document.getElementById(id).contentWindow.document.documentElement.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document.body.scrollWidth;
} }
document.getElementById(id).height= (newheight) + "px"; document.getElementById(id).height= (newheight) + "px";
document.getElementById(id).width= (newwidth) + "px"; document.getElementById(id).width= (newwidth) + "px";
} }
@ -31,7 +32,6 @@ document.getElementById(id).width= (newwidth) + "px";
</div> </div>
<div id="tab-1" class="schedule tab_content current"> <div id="tab-1" class="schedule tab_content current">
<?php //echo $this->action('weekly-program','embed', 'default', array('style' => 'premium', 'useiframe' => '1')); ?>
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe> <iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
</div> </div>
@ -68,6 +68,7 @@ document.getElementById(id).width= (newwidth) + "px";
$("#player_iframe").contents().find('.bottom_bar .button').removeClass('current'); $("#player_iframe").contents().find('.bottom_bar .button').removeClass('current');
$('.tab_content').removeClass('current'); $('.tab_content').removeClass('current');
window.scrollTo(0,0);
$(this).addClass('current'); $(this).addClass('current');
$("#"+tab_id).addClass('current'); $("#"+tab_id).addClass('current');
}); });

View File

@ -15,7 +15,7 @@ body {
.bck_cover { .bck_cover {
position: absolute; position: fixed;
top: 0px; top: 0px;
right: 0px; right: 0px;
bottom: 0px; bottom: 0px;
@ -59,13 +59,12 @@ span.login-img {
text-align: center; text-align: center;
width: 770px; width: 770px;
max-width: 770px; max-width: 770px;
margin: 0 auto; margin: 0 auto 0px -380px;
margin-bottom: 140px;
padding: 10px; padding: 10px;
padding-left: 0px; padding-left: 0px;
padding-bottom: 140px;
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-left: -380px;
/* -webkit-transition-delay: 1s; /* -webkit-transition-delay: 1s;
transition-delay: 1s;*/ transition-delay: 1s;*/
} }
@ -87,7 +86,7 @@ span.login-img {
opacity: 0; opacity: 0;
} }
.about_us.current, .login.current { .about_us.current, .login.current, .schedule.current {
opacity: 1; opacity: 1;
-webkit-transition-delay: 0.4s; -webkit-transition-delay: 0.4s;
transition-delay: 0.4s; transition-delay: 0.4s;