Permalink
Browse files

Merge branch '2.5.x' into 2.5.x-installer

Conflicts:
	airtime_mvc/public/index.php
  • Loading branch information...
Albert Santoni
Albert Santoni committed Jun 16, 2015
2 parents b5b3d96 + efad7be commit 8c9981a1550fb62f835ac64ccefa3b810f6fce37
Showing with 5,024 additions and 996 deletions.
  1. +1 −1 airtime_mvc/application/Bootstrap.php
  2. +8 −0 airtime_mvc/application/controllers/AudiopreviewController.php
  3. +27 −18 airtime_mvc/application/controllers/PreferenceController.php
  4. +0 −1 airtime_mvc/application/controllers/ScheduleController.php
  5. +8 −0 airtime_mvc/application/controllers/ShowbuilderController.php
  6. +22 −0 airtime_mvc/application/forms/GeneralPreferences.php
  7. +7 −3 airtime_mvc/application/forms/Preferences.php
  8. +0 −13 airtime_mvc/application/forms/SupportSettings.php
  9. +1 −1 airtime_mvc/application/layouts/scripts/layout.phtml
  10. +76 −42 airtime_mvc/application/logging/Logging.php
  11. +17 −14 airtime_mvc/application/models/Block.php
  12. +5 −8 airtime_mvc/application/models/Preference.php
  13. +2 −1 airtime_mvc/application/models/Scheduler.php
  14. +14 −4 airtime_mvc/application/models/Webstream.php
  15. +1 −0 airtime_mvc/application/services/ShowFormService.php
  16. +3 −1 airtime_mvc/application/views/scripts/form/preferences.phtml
  17. +10 −0 airtime_mvc/application/views/scripts/form/preferences_general.phtml
  18. +0 −20 airtime_mvc/application/views/scripts/form/support-setting.phtml
  19. +4 −5 airtime_mvc/application/views/scripts/preference/index.phtml
  20. BIN airtime_mvc/locale/az/LC_MESSAGES/airtime.mo
  21. +1 −1 airtime_mvc/locale/az/LC_MESSAGES/airtime.po
  22. BIN airtime_mvc/locale/cs_CZ/LC_MESSAGES/airtime.mo
  23. +1 −1 airtime_mvc/locale/cs_CZ/LC_MESSAGES/airtime.po
  24. BIN airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo
  25. +1 −1 airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po
  26. BIN airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo
  27. +1 −1 airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po
  28. BIN airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.mo
  29. +1 −1 airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.po
  30. BIN airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo
  31. +1 −1 airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.po
  32. BIN airtime_mvc/locale/ja/LC_MESSAGES/airtime.mo
  33. +1 −1 airtime_mvc/locale/ja/LC_MESSAGES/airtime.po
  34. BIN airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo
  35. +1 −1 airtime_mvc/locale/ka/LC_MESSAGES/airtime.po
  36. BIN airtime_mvc/locale/nl_NL/LC_MESSAGES/airtime.mo
  37. +839 −837 airtime_mvc/locale/nl_NL/LC_MESSAGES/airtime.po
  38. BIN airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo
  39. +1 −1 airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.po
  40. BIN airtime_mvc/locale/tr/LC_MESSAGES/airtime.mo
  41. +3,908 −0 airtime_mvc/locale/tr/LC_MESSAGES/airtime.po
  42. +35 −6 airtime_mvc/public/css/styles.css
  43. +8 −8 airtime_mvc/public/js/airtime/common/common.js
  44. +10 −1 airtime_mvc/public/js/airtime/library/library.js
  45. +8 −2 airtime_mvc/public/js/airtime/preferences/preferences.js
  46. +1 −1 python_apps/pypo/pypo/pypofetch.py
@@ -119,7 +119,7 @@ protected function _initHeadScript()
$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/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');
@@ -204,10 +204,14 @@ private function createElementMap($track)
$elementMap['element_mp3'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/ogg') {
$elementMap['element_oga'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/vorbis') {
$elementMap['element_oga'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/mp4') {
$elementMap['element_m4a'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/wav') {
$elementMap['element_wav'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/x-wav') {
$elementMap['element_wav'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/x-flac') {
$elementMap['element_flac'] = $track['item_id'];
} else {
@@ -289,10 +293,14 @@ public function getShowAction()
$elementMap['element_mp3'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/ogg') {
$elementMap['element_oga'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/vorbis') {
$elementMap['element_oga'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/mp4') {
$elementMap['element_m4a'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/wav') {
$elementMap['element_wav'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/x-wav') {
$elementMap['element_wav'] = $track['item_id'];
} elseif (strtolower($mime) === 'audio/x-flac') {
$elementMap['element_flac'] = $track['item_id'];
} else {
@@ -34,16 +34,13 @@ public function indexAction()
$form = new Application_Form_Preferences();
$values = array();
if ($request->isPost()) {
$params = $request->getPost();
$postData = explode('&', $params['data']);
foreach($postData as $k=>$v) {
$v = explode('=', $v);
$values[$v[0]] = urldecode($v[1]);
}
if ($form->isValid($values)) {
if ($request->isPost()) {
$values = $request->getPost();
if ($form->isValid($values))
{
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
Application_Model_Preference::SetStationDescription($values["stationDescription"]);
Application_Model_Preference::SetDefaultCrossfadeDuration($values["stationDefaultCrossfadeDuration"]);
Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]);
Application_Model_Preference::SetDefaultFadeOut($values["stationDefaultFadeOut"]);
@@ -52,6 +49,15 @@ public function indexAction()
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
$logoUploadElement->receive();
$imagePath = $logoUploadElement->getFileName();
// Only update the image logo if the new logo is non-empty
if (!is_null($imagePath) && $imagePath != "") {
Application_Model_Preference::SetStationLogo($imagePath);
}
Application_Model_Preference::SetEnableSystemEmail($values["enableSystemEmail"]);
Application_Model_Preference::SetSystemEmail($values["systemEmail"]);
Application_Model_Preference::SetMailServerConfigured($values["configureMailServer"]);
@@ -73,12 +79,14 @@ public function indexAction()
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
$this->view->form = $form;
$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
//$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
} else {
$this->view->form = $form;
$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
//$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
}
}
$this->view->logoImg = Application_Model_Preference::GetStationLogo();
$this->view->form = $form;
}
@@ -111,24 +119,16 @@ public function supportSettingAction()
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
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);
if (isset($values["Privacy"])) {
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
}
}
$this->view->statusMsg = "<div class='success'>"._("Support setting updated.")."</div>";
}
$logo = Application_Model_Preference::GetStationLogo();
if ($logo) {
$this->view->logoImg = $logo;
}
$privacyChecked = false;
if (Application_Model_Preference::GetPrivacyPolicyCheck() == 1) {
$privacyChecked = true;
@@ -151,6 +151,15 @@ public function directoryConfigAction()
$this->view->form = $watched_dirs_pref;
}
public function removeLogoAction()
{
$this->view->layout()->disableLayout();
// Remove reliance on .phtml files to render requests
$this->_helper->viewRenderer->setNoRender(true);
Application_Model_Preference::SetStationLogo("");
}
public function streamSettingAction()
{
$CC_CONFIG = Config::getConfig();
@@ -136,7 +136,6 @@ public function eventFeedPreloadAction()
$editable = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$calendar_interval = Application_Model_Preference::GetCalendarTimeScale();
Logging::info($calendar_interval);
if ($calendar_interval == "agendaDay") {
list($start, $end) = Application_Model_Show::getStartEndCurrentDayView();
} else if ($calendar_interval == "agendaWeek") {
@@ -283,6 +283,14 @@ public function scheduleAddAction()
$mediaItems = $request->getParam("mediaIds", array());
$scheduledItems = $request->getParam("schedIds", array());
$log_vars = array();
$log_vars["url"] = $_SERVER['HTTP_HOST'];
$log_vars["action"] = "showbuilder/schedule-add";
$log_vars["params"] = array();
$log_vars["params"]["media_items"] = $mediaItems;
$log_vars["params"]["scheduled_items"] = $scheduledItems;
Logging::info($log_vars);
try {
$scheduler = new Application_Model_Scheduler();
$scheduler->scheduleAfter($scheduledItems, $mediaItems);
@@ -1,11 +1,14 @@
<?php
require_once 'customfilters/ImageSize.php';
class Application_Form_GeneralPreferences extends Zend_Form_SubForm
{
public function init()
{
$maxLens = Application_Model_Show::getMaxLengths();
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
$rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9);
@@ -34,6 +37,25 @@ public function init()
$stationDescription->setAttrib('rows', 4);
$this->addElement($stationDescription);
// Station Logo
$stationLogoUpload = new Zend_Form_Element_File('stationLogo');
$stationLogoUpload->setLabel(_('Station Logo:'))
->setDescription(_("Note: Anything larger than 600x600 will be resized."))
->setRequired(false)
->addValidator('Count', false, 1)
->addValidator('Extension', false, 'jpg,jpeg,png,gif')
->setMaxFileSize(1000000)
->addFilter('ImageSize');
$stationLogoUpload->setAttrib('accept', 'image/*');
$this->addElement($stationLogoUpload);
$stationLogoRemove = new Zend_Form_Element_Button('stationLogoRemove');
$stationLogoRemove->setLabel(_('Remove'));
$stationLogoRemove->setAttrib('class', 'btn');
$stationLogoRemove->setAttrib('id', 'logo-remove-btn');
$stationLogoRemove->setAttrib('onclick', 'removeLogo();');
$this->addElement($stationLogoRemove);
//Default station crossfade duration
$this->addElement('text', 'stationDefaultCrossfadeDuration', array(
'class' => 'input_text',
@@ -7,9 +7,6 @@ public function init()
{
$baseUrl = Application_Common_OsPath::getBaseDir();
$this->setMethod('post');
$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
));
@@ -31,5 +28,12 @@ public function init()
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel(_('Save'));
//$submit->removeDecorator('Label');
$submit->setAttribs(array('class'=>'btn right-floated'));
$submit->removeDecorator('DtDdWrapper');
$this->addElement($submit);
}
}
@@ -1,7 +1,5 @@
<?php
require_once 'customfilters/ImageSize.php';
class Application_Form_SupportSettings extends Zend_Form
{
@@ -96,17 +94,6 @@ public function init()
->setAttrib('COLS','58');
$this->addElement($description);
// Station Logo
$upload = new Zend_Form_Element_File('Logo');
$upload->setLabel(_('Station Logo:'))
->setRequired(false)
->setDecorators(array('File'))
->addValidator('Count', false, 1)
->addValidator('Extension', false, 'jpg,jpeg,png,gif')
->addFilter('ImageSize');
$upload->setAttrib('accept', 'image/*');
$this->addElement($upload);
//enable support feedback
$this->addElement('checkbox', 'SupportFeedback', array(
'label' => _('Send support feedback'),
@@ -11,7 +11,7 @@
<body>
<?php echo $this->partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
<div id="Panel">
<div id="Panel" class="sticky">
<div class="logo"></div>
<?php echo $this->versionNotify();
$sss = $this->SourceSwitchStatus();
Oops, something went wrong.

0 comments on commit 8c9981a

Please sign in to comment.