Merge branch '2.1.x' of dev.sourcefabric.org:airtime into 2.1.x

This commit is contained in:
Martin Konecny 2012-07-10 16:41:48 -04:00
commit f072be5d0e
4 changed files with 14 additions and 15 deletions

View File

@ -90,12 +90,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$userType = ""; $userType = "";
} }
$view->headScript()->appendScript("var userType = '$userType';"); $view->headScript()->appendScript("var userType = '$userType';");
if (Application_Model_Preference::GetPlanLevel() != "disabled"
&& !($_SERVER['REQUEST_URI'] == '/Dashboard/stream-player' || $_SERVER['REQUEST_URI'] == '/audiopreview/audio-preview-player')) {
$client_id = Application_Model_Preference::GetClientId();
$view->headScript()->appendScript("var livechat_client_id = '$client_id';");
$view->headScript()->appendFile($baseUrl . '/js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
}
if(isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1){ if(isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1){
$view->headScript()->appendFile($baseUrl.'/js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'/js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
} }

View File

@ -138,7 +138,13 @@ class PlaylistController extends Zend_Controller_Action
try { try {
if (isset($this->pl_sess->id)) { if (isset($this->pl_sess->id)) {
$pl = new Application_Model_Playlist($this->pl_sess->id); $pl = new Application_Model_Playlist($this->pl_sess->id);
$this->view->pl = $pl; $userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
if($isAdminOrPM || $pl->getCreatorId() == $userInfo->id){
$this->view->pl = $pl;
}
$formatter = new LengthFormatter($pl->getLength()); $formatter = new LengthFormatter($pl->getLength());
$this->view->length = $formatter->format(); $this->view->length = $formatter->format();

View File

@ -132,7 +132,7 @@ function findViewportDimensions() {
return { return {
width: viewportwidth, width: viewportwidth,
height: viewportheight height: viewportheight-45
}; };
} }

View File

@ -1136,13 +1136,11 @@ var AIRTIME = (function(AIRTIME){
if (oItems.del !== undefined) { if (oItems.del !== undefined) {
callback = function() { callback = function() {
if (confirm("Delete selected item?")) { AIRTIME.showbuilder.fnRemove([{
AIRTIME.showbuilder.fnRemove([{ id: data.id,
id: data.id, timestamp: data.timestamp,
timestamp: data.timestamp, instance: data.instance
instance: data.instance }]);
}]);
}
}; };
oItems.del.callback = callback; oItems.del.callback = callback;