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

This commit is contained in:
Martin Konecny 2012-03-29 11:31:59 -04:00
commit 7510e4c029
28 changed files with 175 additions and 522 deletions

View File

@ -25,9 +25,9 @@ $pages = array(
array(
'label' => 'Playlist Builder',
'module' => 'default',
'controller' => 'Library',
'controller' => 'Playlist',
'action' => 'index',
'resource' => 'library'
'resource' => 'playlist'
),
array(
'label' => 'Calendar',

View File

@ -29,16 +29,6 @@ class LibraryController extends Zend_Controller_Action
public function indexAction() {
$this->_helper->layout->setLayout('library');
$this->_helper->actionStack('library', 'library');
$this->_helper->actionStack('index', 'playlist');
}
public function libraryAction()
{
$this->_helper->viewRenderer->setResponseSegment('library');
}
public function contextMenuAction()
@ -143,7 +133,6 @@ class LibraryController extends Zend_Controller_Action
}
foreach ($files as $id) {
Logging::log("deleting file {$id}");
$file = Application_Model_StoredFile::Recall($id);

View File

@ -1,146 +0,0 @@
<?php
class NowplayingController extends Zend_Controller_Action
{
public function init()
{
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('get-data-grid-data', 'json')
->addActionContext('register', 'json')
->addActionContext('remindme', 'json')
->initContext();
}
public function indexAction()
{
global $CC_CONFIG;
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
//nowplayingdatagrid.js requires this variable, so that datePicker widget can be offset to server time instead of client time
$this->view->headScript()->appendScript("var timezoneOffset = ".date("Z")."; //in seconds");
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowplayingdatagrid.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowview.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$refer_sses = new Zend_Session_Namespace('referrer');
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
if ($request->isPost()) {
$form = new Application_Form_RegisterAirtime();
$values = $request->getPost();
if ($values["Publicise"] != 1 && $form->isValid($values)){
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
if(isset($values["Privacy"])){
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
}
// unset session
Zend_Session::namespaceUnset('referrer');
}
else if ($values["Publicise"] == '1' && $form->isValid($values)) {
Application_Model_Preference::SetHeadTitle($values["stnName"], $this->view);
Application_Model_Preference::SetPhone($values["Phone"]);
Application_Model_Preference::SetEmail($values["Email"]);
Application_Model_Preference::SetStationWebSite($values["StationWebSite"]);
Application_Model_Preference::SetPublicise($values["Publicise"]);
$form->Logo->receive();
$imagePath = $form->Logo->getFileName();
Application_Model_Preference::SetStationCountry($values["Country"]);
Application_Model_Preference::SetStationCity($values["City"]);
Application_Model_Preference::SetStationDescription($values["Description"]);
Application_Model_Preference::SetStationLogo($imagePath);
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
if(isset($values["Privacy"])){
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
}
// unset session
Zend_Session::namespaceUnset('referrer');
}else{
$logo = Application_Model_Preference::GetStationLogo();
if($logo){
$this->view->logoImg = $logo;
}
$this->view->dialog = $form;
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}
}else{
//popup if previous page was login
if($refer_sses->referrer == 'login' && Application_Model_Nowplaying::ShouldShowPopUp()
&& !Application_Model_Preference::GetSupportFeedback() && $user->isAdmin()){
$form = new Application_Form_RegisterAirtime();
$logo = Application_Model_Preference::GetStationLogo();
if($logo){
$this->view->logoImg = $logo;
}
$this->view->dialog = $form;
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}
}
}
public function getDataGridDataAction()
{
$viewType = $this->_request->getParam('view');
$dateString = $this->_request->getParam('date');
$this->view->entries = Application_Model_Nowplaying::GetDataGridData($viewType, $dateString);
}
/*
public function livestreamAction()
{
//use bare bones layout (no header bar or menu)
$this->_helper->layout->setLayout('bare');
}
*/
public function dayViewAction()
{
global $CC_CONFIG;
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
//nowplayingdatagrid.js requires this variable, so that datePicker widget can be offset to server time instead of client time
$this->view->headScript()->appendScript("var timezoneOffset = ".date("Z")."; //in seconds");
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowplayingdatagrid.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/dayview.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}
public function remindmeAction()
{
// unset session
Zend_Session::namespaceUnset('referrer');
Application_Model_Preference::SetRemindMeDate();
die();
}
public function donotshowregistrationpopupAction()
{
// unset session
Zend_Session::namespaceUnset('referrer');
die();
}
}

View File

@ -75,11 +75,11 @@ class PlaylistController extends Zend_Controller_Action
$this->view->pl = $pl;
$this->view->id = $pl->getId();
$this->view->html = $this->view->render('playlist/index.phtml');
$this->view->html = $this->view->render('playlist/playlist.phtml');
unset($this->view->pl);
}
else {
$this->view->html = $this->view->render('playlist/index.phtml');
$this->view->html = $this->view->render('playlist/playlist.phtml');
}
}
@ -136,8 +136,6 @@ class PlaylistController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
$this->_helper->viewRenderer->setResponseSegment('spl');
try {
if (isset($this->pl_sess->id)) {
$pl = new Application_Model_Playlist($this->pl_sess->id);

View File

@ -1,90 +0,0 @@
<?php
class SearchController extends Zend_Controller_Action
{
protected $search_sess = null;
private function addGroup($group_id) {
$form = new Application_Form_AdvancedSearch();
$form->addGroup($group_id, 1);
$group = $form->getSubForm('group_'.$group_id);
return $group->__toString();
}
private function addFieldToGroup($group_id, $row_id) {
$form = new Application_Form_AdvancedSearch();
$form->addGroup($group_id);
$group = $form->getSubForm('group_'.$group_id);
$group->addRow($row_id);
return $group->__toString();
}
public function init()
{
$ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('newfield', 'json')
->addActionContext('newgroup', 'json')
->addActionContext('index', 'json')
->addActionContext('display', 'json')
->initContext();
$this->search_sess = new Zend_Session_Namespace("search");
}
public function indexAction()
{
$data = $this->_getParam('data');
$form = new Application_Form_AdvancedSearch();
// Form has been submitted
$form->preValidation($data);
//if (!$form->isValid($data)) {
//$this->view->form = $form->__toString();
//return;
//}
// valid form was submitted set as search criteria.
$this->search_sess->md = $data;
}
public function displayAction()
{
}
public function newfieldAction()
{
$group_id = $this->_getParam('group', 1);
$row_id = $this->search_sess->next_row[$group_id];
$this->view->html = $this->addFieldToGroup($group_id, $row_id);
$this->view->row = $row_id;
$this->search_sess->next_row[$group_id] = $row_id + 1;
}
public function newgroupAction()
{
$group_id = $this->search_sess->next_group;
$this->view->html = $this->addGroup($group_id);
$this->search_sess->next_group = $group_id + 1;
$this->search_sess->next_row[$group_id] = 2;
}
}

View File

@ -43,9 +43,6 @@ class ShowbuilderController extends Zend_Controller_Action
$this->view->headLink()->appendStylesheet($baseUrl.'/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version']),'text/javascript');
$this->_helper->layout->setLayout('builder');
$this->_helper->viewRenderer->setResponseSegment('dialog');
$user = Application_Model_User::GetCurrentUser();
@ -97,76 +94,42 @@ class ShowbuilderController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}
}
else {
//popup if previous page was login
if ($refer_sses->referrer == 'login' && Application_Model_Nowplaying::ShouldShowPopUp()
&& !Application_Model_Preference::GetSupportFeedback() && $user->isAdmin()){
$form = new Application_Form_RegisterAirtime();
$logo = Application_Model_Preference::GetStationLogo();
if ($logo) {
$this->view->logoImg = $logo;
}
$this->view->dialog = $form;
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}
}
$data = Application_Model_Preference::GetValue("nowplaying_screen", true);
if ($data != "") {
$settings = unserialize($data);
if ($settings["library"] == "true") {
$this->view->headScript()->appendScript("AIRTIME.showLib = true;");
}
}
if (!$user->isGuest()) {
$this->_helper->actionStack('library', 'library');
}
$this->_helper->actionStack('builder', 'showbuilder');
}
public function contextMenuAction()
{
$id = $this->_getParam('id');
$now = floatval(microtime(true));
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$menu = array();
//popup if previous page was login
if ($refer_sses->referrer == 'login' && Application_Model_Nowplaying::ShouldShowPopUp()
&& !Application_Model_Preference::GetSupportFeedback() && $user->isAdmin()){
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$item = CcScheduleQuery::create()->findPK($id);
$instance = $item->getCcShowInstances();
$menu["preview"] = array("name"=> "Preview");
//select the cursor
$menu["selCurs"] = array("name"=> "Select Cursor");
$menu["delCurs"] = array("name"=> "Remove Cursor");
if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) {
//remove/truncate the item from the schedule
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove");
}
$this->view->items = $menu;
}
public function builderAction() {
global $CC_CONFIG;
$this->_helper->viewRenderer->setResponseSegment('builder');
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$form = new Application_Form_RegisterAirtime();
$logo = Application_Model_Preference::GetStationLogo();
if ($logo) {
$this->view->logoImg = $logo;
}
$this->view->dialog = $form;
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
}
//determine whether to remove/hide/display the library.
$showLib = false;
$user = Application_Model_User::GetCurrentUser();
if (!$user->isGuest()) {
$hideLib = false;
$data = Application_Model_Preference::GetValue("nowplaying_screen", true);
if ($data != "") {
$settings = unserialize($data);
if ($settings["library"] == "true") {
$showLib = true;
}
}
}
else {
$hideLib = true;
}
$this->view->hideLib = $hideLib;
$this->view->showLib = $showLib;
//populate date range form for show builder.
$now = time();
$from = $request->getParam("from", $now);
$to = $request->getParam("to", $now + (24*60*60));
@ -194,14 +157,35 @@ class ShowbuilderController extends Zend_Controller_Action
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'/css/showbuilder.css?'.$CC_CONFIG['airtime_version']);
$user = Application_Model_User::GetCurrentUser();
if (!$user->isGuest()) {
$this->view->toggleLib = true;
}
public function contextMenuAction()
{
$id = $this->_getParam('id');
$now = floatval(microtime(true));
$request = $this->getRequest();
$baseUrl = $request->getBaseUrl();
$menu = array();
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$item = CcScheduleQuery::create()->findPK($id);
$instance = $item->getCcShowInstances();
$menu["preview"] = array("name"=> "Preview");
//select the cursor
$menu["selCurs"] = array("name"=> "Select Cursor");
$menu["delCurs"] = array("name"=> "Remove Cursor");
if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) {
//remove/truncate the item from the schedule
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove");
}
else {
$this->view->toggleLib = false;
}
$this->view->items = $menu;
}
public function builderDialogAction() {

View File

@ -12,6 +12,8 @@ class UsersettingsController extends Zend_Controller_Action
->addActionContext('set-library-datatable', 'json')
->addActionContext('get-timeline-datatable', 'json')
->addActionContext('set-timeline-datatable', 'json')
->addActionContext('register', 'json')
->addActionContext('remindme', 'json')
->initContext();
}
@ -65,4 +67,17 @@ class UsersettingsController extends Zend_Controller_Action
$this->view->settings = unserialize($data);
}
}
public function remindmeAction()
{
// unset session
Zend_Session::namespaceUnset('referrer');
Application_Model_Preference::SetRemindMeDate();
}
public function donotshowregistrationpopupAction()
{
// unset session
Zend_Session::namespaceUnset('referrer');
}
}

View File

@ -7,7 +7,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
public function init()
{
$this->setAction('/Nowplaying');
$this->setAction('/Showbuilder');
$this->setMethod('post');
$country_list = Application_Model_Preference::GetCountryList();

View File

@ -1,35 +0,0 @@
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $this->headTitle() ?>
<?php echo $this->headScript() ?>
<?php echo $this->headLink() ?>
</head>
<body>
<div id="Panel">
<div class="logo"></div>
<?php echo $this->versionNotify();
$sss = $this->SourceSwitchStatus();
$scs = $this->SourceConnectionStatus();
?>
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
<?php $partial = array('menu.phtml', 'default');
$this->navigation()->menu()->setPartial($partial); ?>
<?php echo $this->navigation()->menu() ?>
</div>
<div class="wrapper">
<div id="library_content" class="lib-content tabs ui-widget ui-widget-content block-shadow alpha-block padded" style="display:none"><?php echo $this->layout()->library ?></div>
<div id="show_builder" class="sb-content ui-widget ui-widget-content block-shadow omega-block padded"><?php echo $this->layout()->builder ?></div>
</div>
<?php echo $this->layout()->dialog ?>
</body>
</html>

View File

@ -1,34 +0,0 @@
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $this->headTitle() ?>
<?php echo $this->headScript() ?>
<?php echo $this->headLink() ?>
<?php echo isset($this->google_analytics)?$this->google_analytics:"" ?>
</head>
<body>
<div id="Panel">
<div class="logo"></div>
<?php echo $this->versionNotify();
$sss = $this->SourceSwitchStatus();
$scs = $this->SourceConnectionStatus();
?>
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
<?php $partial = array('menu.phtml', 'default');
$this->navigation()->menu()->setPartial($partial); ?>
<?php echo $this->navigation()->menu() ?>
</div>
<div class="wrapper">
<!--Set to z-index 254 to make it lower than the top-panel and the ZFDebug info bar, but higher than the side-playlist-->
<div id="library_content" class="lib-content ui-widget ui-widget-content block-shadow alpha-block padded" style="z-index:254"><?php echo $this->layout()->library ?></div>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded"><?php echo $this->layout()->spl ?></div>
</div>
</body>
</html>

View File

@ -1,21 +0,0 @@
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $this->headTitle() ?>
<?php echo $this->headScript() ?>
<?php echo $this->headLink() ?>
<?php echo isset($this->google_analytics)?$this->google_analytics:"" ?>
</head>
<body>
<div id="nowplayingbar"><?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?></div>
<div id="nav"><?php echo $this->navigation()->menu()->setRenderInvisible(true) ?></div>
<div class="wrapper">
<div id="search"><?php echo $this->layout()->search ?></div>
<div id="library_content"><?php echo $this->layout()->library ?></div>
<div id="side_playlist"><?php echo $this->layout()->spl ?></div>
</div>
</body>
</html>

View File

@ -111,10 +111,6 @@ class CcShowInstances extends BaseCcShowInstances {
//post save hook to update the cc_schedule status column for the tracks in the show.
public function updateScheduleStatus(PropelPDO $con) {
Logging::log("in post save for showinstances");
$now = time();
//scheduled track is in the show
CcScheduleQuery::create()
->filterByDbInstanceId($this->id)
@ -122,8 +118,6 @@ class CcShowInstances extends BaseCcShowInstances {
->filterByDbEnds($this->ends, Criteria::LESS_EQUAL)
->update(array('DbPlayoutStatus' => 1), $con);
Logging::log("updating status for in show items.");
//scheduled track is a boundary track
CcScheduleQuery::create()
->filterByDbInstanceId($this->id)
@ -138,7 +132,6 @@ class CcShowInstances extends BaseCcShowInstances {
->filterByDbPlayoutStatus(0, Criteria::GREATER_EQUAL)
->filterByDbStarts($this->ends, Criteria::GREATER_THAN)
->update(array('DbPlayoutStatus' => 0), $con);
}
public function preInsert(PropelPDO $con = null) {

View File

@ -7,7 +7,7 @@
<input type="button" id="sb_submit" class="ui-button ui-state-default" value="GO"></input>
</div>
<div class="sb-advanced-options">
<fieldset class="padded display_field toggle push-down-8 closed">
<fieldset class="padded display_field push-down-8 closed">
<legend style="cursor: pointer;">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
Filter By Show:

View File

@ -1,3 +1,2 @@
<div id="import_status" class="library_import" style="display:none">File import in progress... <img src="/css/images/file_import_loader.gif"></img></div>
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable"></table>
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable"></table>

View File

@ -1,4 +0,0 @@
<div class="button-bar-top">
<span class="toggle-button end-button" id="now_view">Now View</span><span class="toggle-button-active" id="day_view">Day View</span><input type="text" id="datepicker" class="input_text">
</div>
<table cellpadding="0" cellspacing="0" border="0" class="datatable" id="nowplayingtable"></table>

View File

@ -1,2 +0,0 @@
<?php
echo $this->entries;

View File

@ -1,5 +0,0 @@
<div class="button-bar-top">
<span class="toggle-button-active end-button" id="now_view">Now View</span><span class="toggle-button" id="day_view">Day View</span>
</div>
<table cellpadding="0" cellspacing="0" border="0" class="datatable" id="nowplayingtable"></table>
<?php echo $this->dialog?>

View File

@ -1,9 +0,0 @@
<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="280" height="46">
<param name="fileName" value="http://localhost:8000/airtime.mp3">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="100">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://localhost:8000/airtime.mp3" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1 volume=100>
</OBJECT>

View File

@ -1,55 +1,7 @@
<button id="spl_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
<?php if (isset($this->pl)) : ?>
<button id="spl_delete" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">Delete</button>
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button">
<span class="ui-icon crossfade-main-icon"></span><span class="ui-button-text">Playlist crossfade</span>
</a>
<?php endif; ?>
<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>
<?php if (isset($this->pl)) : ?>
<input id="pl_id" type="hidden" value="<?php echo $this->pl->getId(); ?>"></input>
<input id="pl_lastMod" type="hidden" value="<?php echo $this->pl->getLastModified('U'); ?>"></input>
<div class="playlist_title">
<h3 id="spl_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->pl->getName(); ?></a>
</h3>
<h4 id="spl_length"><?php echo $this->length; ?></h4>
</div>
<fieldset class="toggle closed" id="fieldset-metadate_change">
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span>View / edit description</legend>
<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->pl->getDescription(); ?></textarea>
</dd>
<dt id="submit-label" style="display: none;">&nbsp;</dt>
<dd id="submit-element" class="buttons">
<input class="ui-button ui-state-default" type="submit" value="Cancel" id="description_cancel" name="cancel">
<input class="ui-button ui-state-default" type="submit" value="Save" id="description_save" name="submit">
</dd>
</dl>
</fieldset>
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick"></span>
<dl id="spl_editor-main" class="inline-list">
<dt>Fade in (s):</dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
<dd class="edit-error"></dd>
<dt>Fade out (s):</dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00/span></dd>
<dd class="edit-error"></dd>
</dl>
</div>
<div class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul id="spl_sortable">
<?php echo $this->render('playlist/update.phtml') ?>
</ul>
</div>
<?php else : ?>
<div>No open playlist</div>
<?php endif; ?>
<div id="side_playlist" class="pl-content ui-widget ui-widget-content block-shadow omega-block padded">
<?php echo $this->render('playlist/playlist.phtml') ?>
</div>

View File

@ -0,0 +1,55 @@
<button id="spl_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
<?php if (isset($this->pl)) : ?>
<button id="spl_delete" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">Delete</button>
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button">
<span class="ui-icon crossfade-main-icon"></span><span class="ui-button-text">Playlist crossfade</span>
</a>
<?php endif; ?>
<?php if (isset($this->pl)) : ?>
<input id="pl_id" type="hidden" value="<?php echo $this->pl->getId(); ?>"></input>
<input id="pl_lastMod" type="hidden" value="<?php echo $this->pl->getLastModified('U'); ?>"></input>
<div class="playlist_title">
<h3 id="spl_name">
<a id="playlist_name_display" contenteditable="true"><?php echo $this->pl->getName(); ?></a>
</h3>
<h4 id="spl_length"><?php echo $this->length; ?></h4>
</div>
<fieldset class="toggle closed" id="fieldset-metadate_change">
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span>View / edit description</legend>
<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->pl->getDescription(); ?></textarea>
</dd>
<dt id="submit-label" style="display: none;">&nbsp;</dt>
<dd id="submit-element" class="buttons">
<input class="ui-button ui-state-default" type="submit" value="Cancel" id="description_cancel" name="cancel">
<input class="ui-button ui-state-default" type="submit" value="Save" id="description_save" name="submit">
</dd>
</dl>
</fieldset>
<div id="crossfade_main" class="crossfade-main clearfix" style="display:none;">
<span class="ui-icon ui-icon-closethick"></span>
<dl id="spl_editor-main" class="inline-list">
<dt>Fade in (s):</dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_in">00</span></dd>
<dd class="edit-error"></dd>
<dt>Fade out (s):</dt>
<dd><span contenteditable="true" class="spl_text_input spl_main_fade_out">00/span></dd>
<dd class="edit-error"></dd>
</dl>
</div>
<div class="clear"></div>
<div class="" style="clear:both; float:none; width:100%;">
<ul id="spl_sortable">
<?php echo $this->render('playlist/update.phtml') ?>
</ul>
</div>
<?php else : ?>
<div>No open playlist</div>
<?php endif; ?>

View File

@ -1,6 +0,0 @@
<?php
echo $this->form;
echo var_dump($this->md);
?>

View File

@ -1 +0,0 @@
<br /><br /><center>View script for controller <b>Forms</b> and script/action name <b>index</b></center>

View File

@ -1 +0,0 @@
<br /><br /><center>View script for controller <b>Forms</b> and script/action name <b>newfield</b></center>

View File

@ -1 +0,0 @@
<br /><br /><center>View script for controller <b>Search</b> and script/action name <b>newgroup</b></center>

View File

@ -1 +1,23 @@
<?php if (!$this->hideLib): ?>
<div id="library_content" class="lib-content tabs ui-widget ui-widget-content block-shadow alpha-block padded"
<?php if (!$this->showLib): ?>
style="display:none"
<?php endif; ?>
>
<?php echo $this->render('library/library.phtml') ?>
</div>
<?php endif; ?>
<div id="show_builder" class="sb-content ui-widget ui-widget-content block-shadow omega-block padded">
<?php if (!$this->hideLib && !$this->showLib): ?>
<div id="sb_edit" class="ui-state-default" title="open the library to schedule files.">
<span class="ui-icon ui-icon-arrowthick-1-nw"></span>
</div>
<?php endif; ?>
<?php echo $this->sb_form; ?>
<table id="show_builder_table" cellpadding="0" cellspacing="0" class="datatable"></table>
</div>
<?php echo $this->dialog ?>

View File

@ -1,7 +1,7 @@
$(document).ready(function(){
function doNotShowPopup(){
$.get("/Nowplaying/donotshowregistrationpopup");
$.get("/Usersettings/donotshowregistrationpopup", {format:"json"});
}
var dialog = $("#register_popup");
@ -18,9 +18,10 @@ $(document).ready(function(){
id: "remind_me",
text: "Remind me in 1 week",
click: function() {
var url = '/Nowplaying/remindme';
var url = '/Usersettings/remindme';
$.ajax({
url: url,
data: {format:"json"}
});
$(this).dialog("close");
}

View File

@ -51,9 +51,9 @@ $(document).ready(function(){
AIRTIME.showbuilder.fnServerData.start = oRange.start;
AIRTIME.showbuilder.fnServerData.end = oRange.end;
if (AIRTIME.showLib === true) {
$lib.show()
.width(Math.floor(screenWidth * 0.5));
if ($lib.filter(':visible').length > 0) {
$lib.width(Math.floor(screenWidth * 0.5));
$builder.width(Math.floor(screenWidth * 0.5))
.find("#sb_edit")
@ -144,7 +144,7 @@ $(document).ready(function(){
$builder.find('legend').click(function(ev, item){
$fs = $(this).parents('fieldset');
var $fs = $(this).parents('fieldset');
if ($fs.hasClass("closed")) {