Merge branch '2.5.x' into cc-5709-airtime-analyzer
Conflicts: airtime_mvc/application/Bootstrap.php
This commit is contained in:
commit
f08535cc10
|
@ -51,8 +51,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||||
|
|
||||||
$view->headScript()->appendScript("var baseUrl = '$baseUrl'");
|
$view->headScript()->appendScript("var baseUrl = '$baseUrl';");
|
||||||
|
$this->_initTranslationGlobals($view);
|
||||||
|
|
||||||
$user = Application_Model_User::GetCurrentUser();
|
$user = Application_Model_User::GetCurrentUser();
|
||||||
if (!is_null($user)){
|
if (!is_null($user)){
|
||||||
$userType = $user->getType();
|
$userType = $user->getType();
|
||||||
|
@ -60,7 +61,17 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
$userType = "";
|
$userType = "";
|
||||||
}
|
}
|
||||||
$view->headScript()->appendScript("var userType = '$userType';");
|
$view->headScript()->appendScript("var userType = '$userType';");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ideally, globals should be written to a single js file once
|
||||||
|
* from a php init function. This will save us from having to
|
||||||
|
* reinitialize them every request
|
||||||
|
*/
|
||||||
|
private function _initTranslationGlobals($view) {
|
||||||
|
$view->headScript()->appendScript("var PRODUCT_NAME = '" . PRODUCT_NAME . "';");
|
||||||
|
$view->headScript()->appendScript("var USER_MANUAL_URL = '" . USER_MANUAL_URL . "';");
|
||||||
|
$view->headScript()->appendScript("var COMPANY_NAME = '" . COMPANY_NAME . "';");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _initHeadLink()
|
protected function _initHeadLink()
|
||||||
|
|
|
@ -1,5 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
define('PRODUCT_NAME' , 'Airtime');
|
||||||
|
define('PRODUCT_SITE_URL' , 'http://airtime.sourcefabric.org');
|
||||||
|
|
||||||
|
define('COMPANY_NAME' , 'Sourcefabric');
|
||||||
|
define('COMPANY_SUFFIX' , 'z.ú.');
|
||||||
|
define('COMPANY_SITE' , 'Sourcefabric.org');
|
||||||
|
define('COMPANY_SITE_URL' , 'http://sourcefabric.org/');
|
||||||
|
|
||||||
|
define('WHOS_USING_URL' , 'http://sourcefabric.org/en/airtime/whosusing');
|
||||||
|
define('TERMS_AND_CONDITIONS_URL' , 'http://www.sourcefabric.org/en/about/policy/');
|
||||||
|
define('PRIVACY_POLICY_URL' , 'http://www.sourcefabric.org/en/about/policy/');
|
||||||
|
define('USER_MANUAL_URL' , 'http://www.sourcefabric.org/en/airtime/manuals/');
|
||||||
|
|
||||||
|
define('LICENSE_VERSION' , 'GNU AGPL v.3');
|
||||||
|
define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.html');
|
||||||
|
|
||||||
define('AIRTIME_COPYRIGHT_DATE' , '2010-2012');
|
define('AIRTIME_COPYRIGHT_DATE' , '2010-2012');
|
||||||
define('AIRTIME_REST_VERSION' , '1.1');
|
define('AIRTIME_REST_VERSION' , '1.1');
|
||||||
define('AIRTIME_API_VERSION' , '1.1');
|
define('AIRTIME_API_VERSION' , '1.1');
|
||||||
|
|
|
@ -770,7 +770,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
//File is not in database anymore.
|
//File is not in database anymore.
|
||||||
if (is_null($file)) {
|
if (is_null($file)) {
|
||||||
$return_hash['error'] = _("File does not exist in Airtime.");
|
$return_hash['error'] = sprintf(_("File does not exist in %s"), PRODUCT_NAME);
|
||||||
}
|
}
|
||||||
//Updating a metadata change.
|
//Updating a metadata change.
|
||||||
else {
|
else {
|
||||||
|
@ -790,7 +790,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
$md['MDATA_KEY_ORIGINAL_PATH'], $con);
|
$md['MDATA_KEY_ORIGINAL_PATH'], $con);
|
||||||
|
|
||||||
if (is_null($file)) {
|
if (is_null($file)) {
|
||||||
$return_hash['error'] = _('File does not exist in Airtime');
|
$return_hash['error'] = sprintf(_('File does not exist in %s'), PRODUCT_NAME);
|
||||||
} else {
|
} else {
|
||||||
$filepath = $md['MDATA_KEY_FILEPATH'];
|
$filepath = $md['MDATA_KEY_FILEPATH'];
|
||||||
//$filepath = str_replace("\\", "", $filepath);
|
//$filepath = str_replace("\\", "", $filepath);
|
||||||
|
@ -802,7 +802,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
$file = Application_Model_StoredFile::RecallByFilepath($filepath, $con);
|
$file = Application_Model_StoredFile::RecallByFilepath($filepath, $con);
|
||||||
|
|
||||||
if (is_null($file)) {
|
if (is_null($file)) {
|
||||||
$return_hash['error'] = _("File doesn't exist in Airtime.");
|
$return_hash['error'] = sprintf(_('File does not exist in %s'), PRODUCT_NAME);
|
||||||
Logging::warn("Attempt to delete file that doesn't exist.
|
Logging::warn("Attempt to delete file that doesn't exist.
|
||||||
Path: '$filepath'");
|
Path: '$filepath'");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,7 +5,7 @@ class LocaleController extends Zend_Controller_Action
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function datatablesTranslationTableAction()
|
public function datatablesTranslationTableAction()
|
||||||
{
|
{
|
||||||
$this->view->layout()->disableLayout();
|
$this->view->layout()->disableLayout();
|
||||||
|
|
|
@ -12,12 +12,12 @@ class LoginController extends Zend_Controller_Action
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
$stationLocale = Application_Model_Preference::GetDefaultLocale();
|
||||||
|
|
||||||
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA'));
|
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', $stationLocale));
|
||||||
$auth = Zend_Auth::getInstance();
|
$auth = Zend_Auth::getInstance();
|
||||||
|
|
||||||
if ($auth->hasIdentity())
|
if ($auth->hasIdentity()) {
|
||||||
{
|
|
||||||
$this->_redirect('Showbuilder');
|
$this->_redirect('Showbuilder');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,9 @@ class LoginController extends Zend_Controller_Action
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/airtime/login/password-restore.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/airtime/login/password-restore.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA'));
|
$stationLocale = Application_Model_Preference::GetDefaultLocale();
|
||||||
|
|
||||||
|
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', $stationLocale));
|
||||||
|
|
||||||
if (!Application_Model_Preference::GetEnableSystemEmail()) {
|
if (!Application_Model_Preference::GetEnableSystemEmail()) {
|
||||||
$this->_redirect('login');
|
$this->_redirect('login');
|
||||||
|
@ -154,7 +156,9 @@ class LoginController extends Zend_Controller_Action
|
||||||
public function passwordRestoreAfterAction()
|
public function passwordRestoreAfterAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA'));
|
$stationLocale = Application_Model_Preference::GetDefaultLocale();
|
||||||
|
|
||||||
|
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', $stationLocale));
|
||||||
|
|
||||||
//uses separate layout without a navigation.
|
//uses separate layout without a navigation.
|
||||||
$this->_helper->layout->setLayout('login');
|
$this->_helper->layout->setLayout('login');
|
||||||
|
@ -172,8 +176,10 @@ class LoginController extends Zend_Controller_Action
|
||||||
$form = new Application_Form_PasswordChange();
|
$form = new Application_Form_PasswordChange();
|
||||||
$auth = new Application_Model_Auth();
|
$auth = new Application_Model_Auth();
|
||||||
$user = CcSubjsQuery::create()->findPK($user_id);
|
$user = CcSubjsQuery::create()->findPK($user_id);
|
||||||
|
|
||||||
|
$stationLocale = Application_Model_Preference::GetDefaultLocale();
|
||||||
|
|
||||||
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA'));
|
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', $stationLocale));
|
||||||
|
|
||||||
//check validity of token
|
//check validity of token
|
||||||
if (!$auth->checkToken($user_id, $token, 'password.restore')) {
|
if (!$auth->checkToken($user_id, $token, 'password.restore')) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$obj = null;
|
$obj = null;
|
||||||
$objInfo = Application_Model_Library::getObjInfo($p_type);
|
$objInfo = Application_Model_Library::getObjInfo($p_type);
|
||||||
|
|
||||||
$obj_sess = new Zend_Session_Namespace( UI_PLAYLISTCONTROLLER_OBJ_SESSNAME);
|
$obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME);
|
||||||
if (isset($obj_sess->id)) {
|
if (isset($obj_sess->id)) {
|
||||||
$obj = new $objInfo['className']($obj_sess->id);
|
$obj = new $objInfo['className']($obj_sess->id);
|
||||||
|
|
||||||
|
@ -422,29 +422,29 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function setCrossfadeAction()
|
public function setCrossfadeAction()
|
||||||
{
|
{
|
||||||
$id1 = $this->_getParam('id1', null);
|
$id1 = $this->_getParam('id1', null);
|
||||||
$id2 = $this->_getParam('id2', null);
|
$id2 = $this->_getParam('id2', null);
|
||||||
$type = $this->_getParam('type');
|
$type = $this->_getParam('type');
|
||||||
$fadeIn = $this->_getParam('fadeIn', 0);
|
$fadeIn = $this->_getParam('fadeIn', 0);
|
||||||
$fadeOut = $this->_getParam('fadeOut', 0);
|
$fadeOut = $this->_getParam('fadeOut', 0);
|
||||||
$offset = $this->_getParam('offset', 0);
|
$offset = $this->_getParam('offset', 0);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$obj = $this->getPlaylist($type);
|
$obj = $this->getPlaylist($type);
|
||||||
$response = $obj->createCrossfade($id1, $fadeOut, $id2, $fadeIn, $offset);
|
$response = $obj->createCrossfade($id1, $fadeOut, $id2, $fadeIn, $offset);
|
||||||
|
|
||||||
if (!isset($response["error"])) {
|
if (!isset($response["error"])) {
|
||||||
$this->createUpdateResponse($obj);
|
$this->createUpdateResponse($obj);
|
||||||
} else {
|
} else {
|
||||||
$this->view->error = $response["error"];
|
$this->view->error = $response["error"];
|
||||||
}
|
}
|
||||||
} catch (PlaylistOutDatedException $e) {
|
} catch (PlaylistOutDatedException $e) {
|
||||||
$this->playlistOutdated($e);
|
$this->playlistOutdated($e);
|
||||||
} catch (PlaylistNotFoundException $e) {
|
} catch (PlaylistNotFoundException $e) {
|
||||||
$this->playlistNotFound($type);
|
$this->playlistNotFound($type);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->playlistUnknownError($e);
|
$this->playlistUnknownError($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPlaylistFadesAction()
|
public function getPlaylistFadesAction()
|
||||||
|
|
|
@ -69,12 +69,6 @@ class UserController extends Zend_Controller_Action
|
||||||
$user->setJabber($formData['jabber']);
|
$user->setJabber($formData['jabber']);
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
// Language and timezone settings are saved on a per-user basis
|
|
||||||
// By default, the default language, and timezone setting on
|
|
||||||
// preferences page is what gets assigned.
|
|
||||||
Application_Model_Preference::SetUserLocale();
|
|
||||||
Application_Model_Preference::SetUserTimezone();
|
|
||||||
|
|
||||||
$form->reset();
|
$form->reset();
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
|
||||||
|
@ -83,7 +77,7 @@ class UserController extends Zend_Controller_Action
|
||||||
} else {
|
} else {
|
||||||
$this->view->successMessage = "<div class='success'>"._("User updated successfully!")."</div>";
|
$this->view->successMessage = "<div class='success'>"._("User updated successfully!")."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('user/add-user.phtml')));
|
$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('user/add-user.phtml')));
|
||||||
} else {
|
} else {
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth");
|
$cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth");
|
||||||
$cb_airtime_auth->setLabel(_("Use Airtime Authentication:"))
|
$cb_airtime_auth->setLabel(sprintf(_("Use %s Authentication:"), PRODUCT_NAME))
|
||||||
->setRequired(false)
|
->setRequired(false)
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
$this->addElement($cb_airtime_auth);
|
$this->addElement($cb_airtime_auth);
|
||||||
|
|
|
@ -53,13 +53,11 @@ class Application_Form_Login extends Zend_Form
|
||||||
$locale->setMultiOptions(Application_Model_Locale::getLocales());
|
$locale->setMultiOptions(Application_Model_Locale::getLocales());
|
||||||
$locale->setDecorators(array('ViewHelper'));
|
$locale->setDecorators(array('ViewHelper'));
|
||||||
$this->addElement($locale);
|
$this->addElement($locale);
|
||||||
|
$this->setDefaults(array(
|
||||||
|
"locale" => Application_Model_Locale::getUserLocale()
|
||||||
|
));
|
||||||
|
|
||||||
$recaptchaNeeded = false;
|
|
||||||
if (Application_Model_LoginAttempts::getAttempts($_SERVER['REMOTE_ADDR']) >= 3) {
|
if (Application_Model_LoginAttempts::getAttempts($_SERVER['REMOTE_ADDR']) >= 3) {
|
||||||
$recaptchaNeeded = true;
|
|
||||||
}
|
|
||||||
if ($recaptchaNeeded) {
|
|
||||||
// recaptcha
|
|
||||||
$this->addRecaptcha();
|
$this->addRecaptcha();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
|
|
||||||
// checkbox for publicise
|
// checkbox for publicise
|
||||||
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
|
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
|
||||||
$checkboxPublicise->setLabel(_('Promote my station on Sourcefabric.org'))
|
$checkboxPublicise->setLabel(sprintf(_('Promote my station on %s'), COMPANY_SITE))
|
||||||
->setRequired(false)
|
->setRequired(false)
|
||||||
->setDecorators(array('ViewHelper'))
|
->setDecorators(array('ViewHelper'))
|
||||||
->setValue(Application_Model_Preference::GetPublicise());
|
->setValue(Application_Model_Preference::GetPublicise());
|
||||||
|
@ -143,11 +143,14 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$privacyPolicyAnchorOpen = "<a id='link_to_privacy' href='" . PRIVACY_POLICY_URL
|
||||||
|
. "' onclick='window.open(this.href); return false;'>";
|
||||||
// checkbox for privacy policy
|
// checkbox for privacy policy
|
||||||
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
||||||
$checkboxPrivacy->setLabel(
|
$checkboxPrivacy->setLabel(
|
||||||
sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
|
sprintf(_('By checking this box, I agree to %s\'s %sprivacy policy%s.'),
|
||||||
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
|
COMPANY_NAME,
|
||||||
|
$privacyPolicyAnchorOpen,
|
||||||
"</a>"))
|
"</a>"))
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
$this->addElement($checkboxPrivacy);
|
$this->addElement($checkboxPrivacy);
|
||||||
|
|
|
@ -119,7 +119,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
||||||
|
|
||||||
// checkbox for publicise
|
// checkbox for publicise
|
||||||
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
|
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
|
||||||
$checkboxPublicise->setLabel(_('Promote my station on Sourcefabric.org'))
|
$checkboxPublicise->setLabel(sprintf(_('Promote my station on %s'), COMPANY_SITE))
|
||||||
->setRequired(false)
|
->setRequired(false)
|
||||||
->setDecorators(array('ViewHelper'))
|
->setDecorators(array('ViewHelper'))
|
||||||
->setValue(Application_Model_Preference::GetPublicise());
|
->setValue(Application_Model_Preference::GetPublicise());
|
||||||
|
@ -142,11 +142,14 @@ class Application_Form_SupportSettings extends Zend_Form
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$privacyPolicyAnchorOpen = "<a id='link_to_privacy' href='" . PRIVACY_POLICY_URL
|
||||||
|
. "' onclick='window.open(this.href); return false;'>";
|
||||||
// checkbox for privacy policy
|
// checkbox for privacy policy
|
||||||
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
||||||
$checkboxPrivacy->setLabel(
|
$checkboxPrivacy->setLabel(
|
||||||
sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
|
sprintf(_('By checking this box, I agree to %s\'s %sprivacy policy%s.'),
|
||||||
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
|
COMPANY_NAME,
|
||||||
|
$privacyPolicyAnchorOpen,
|
||||||
"</a>"))
|
"</a>"))
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
$this->addElement($checkboxPrivacy);
|
$this->addElement($checkboxPrivacy);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<?php echo $this->doctype() ?>
|
<?php echo $this->doctype() ?>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<?php echo $this->headTitle() ?>
|
<?php echo $this->headTitle() ?>
|
||||||
<?php echo $this->headLink() ?>
|
<?php echo $this->headLink() ?>
|
||||||
<?php echo $this->headScript() ?>
|
<?php echo $this->headScript() ?>
|
||||||
<?php echo isset($this->google_analytics)?$this->google_analytics:"" ?>
|
<?php echo isset($this->google_analytics)?$this->google_analytics:"" ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -13,9 +13,20 @@
|
||||||
<?php echo $this->layout()->content ?>
|
<?php echo $this->layout()->content ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<?php echo sprintf(_("Airtime copyright © Sourcefabric z.ú. All rights reserved.%s"
|
<?php
|
||||||
."Maintained and distributed under the GNU GPL v.3 by %sSourcefabric z.ú.%s"),
|
$company = COMPANY_NAME . " " . COMPANY_SUFFIX;
|
||||||
"<br>", "<a href='http://www.sourcefabric.org'>" ,"</a>");?>
|
$licenseSiteAnchor = "<a href='" . LICENSE_URL . "'>"
|
||||||
|
. LICENSE_VERSION
|
||||||
|
. "</a>";
|
||||||
|
$companySiteAnchor = "<a href='" . COMPANY_SITE_URL . "'>"
|
||||||
|
. $company
|
||||||
|
. "</a>";
|
||||||
|
echo sprintf(_('%1$s copyright © %2$s All rights reserved.%3$s'
|
||||||
|
. 'Maintained and distributed under the %4$s by %5$s'),
|
||||||
|
PRODUCT_NAME, $company, "<br>",
|
||||||
|
$licenseSiteAnchor,
|
||||||
|
$companySiteAnchor);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -33,7 +33,8 @@ class Application_Model_Auth
|
||||||
$message = sprintf(_("Hi %s, \n\nClick this link to reset your password: "), $user->getDbLogin());
|
$message = sprintf(_("Hi %s, \n\nClick this link to reset your password: "), $user->getDbLogin());
|
||||||
$message .= "{$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
|
$message .= "{$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
|
||||||
|
|
||||||
$success = Application_Model_Email::send(_('Airtime Password Reset'), $message, $user->getDbEmail());
|
$str = sprintf(_('%s Password Reset'), PRODUCT_NAME);
|
||||||
|
$success = Application_Model_Email::send($str, $message, $user->getDbEmail());
|
||||||
|
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,5 +47,22 @@ class Application_Model_Locale
|
||||||
textdomain($domain);
|
textdomain($domain);
|
||||||
bind_textdomain_codeset($domain, $codeset);
|
bind_textdomain_codeset($domain, $codeset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We need this function for the case where a user has logged out, but
|
||||||
|
* has an airtime_locale cookie containing their locale setting.
|
||||||
|
*
|
||||||
|
* If the user does not have an airtime_locale cookie set, we default
|
||||||
|
* to the station locale.
|
||||||
|
*
|
||||||
|
* When the user logs in, the value set in the login form will be passed
|
||||||
|
* into the airtime_locale cookie. This cookie is also updated when
|
||||||
|
* a user updates their user settings.
|
||||||
|
*/
|
||||||
|
public static function getUserLocale() {
|
||||||
|
$request = Zend_Controller_Front::getInstance()->getRequest();
|
||||||
|
$locale = $request->getCookie('airtime_locale', Application_Model_Preference::GetLocale());
|
||||||
|
return $locale;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,45 +4,44 @@ require_once 'Cache.php';
|
||||||
|
|
||||||
class Application_Model_Preference
|
class Application_Model_Preference
|
||||||
{
|
{
|
||||||
|
|
||||||
private static function getUserId()
|
private static function getUserId()
|
||||||
{
|
{
|
||||||
//pass in true so the check is made with the autoloader
|
//pass in true so the check is made with the autoloader
|
||||||
//we need this check because saas calls this function from outside Zend
|
//we need this check because saas calls this function from outside Zend
|
||||||
if (!class_exists("Zend_Auth", true) || !Zend_Auth::getInstance()->hasIdentity()) {
|
if (!class_exists("Zend_Auth", true) || !Zend_Auth::getInstance()->hasIdentity()) {
|
||||||
$userId = null;
|
$userId = null;
|
||||||
}
|
} else {
|
||||||
else {
|
$auth = Zend_Auth::getInstance();
|
||||||
$auth = Zend_Auth::getInstance();
|
$userId = $auth->getIdentity()->id;
|
||||||
$userId = $auth->getIdentity()->id;
|
}
|
||||||
}
|
|
||||||
|
return $userId;
|
||||||
return $userId;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param boolean $isUserValue is true when we are setting a value for the current user
|
* @param boolean $isUserValue is true when we are setting a value for the current user
|
||||||
*/
|
*/
|
||||||
private static function setValue($key, $value, $isUserValue = false)
|
private static function setValue($key, $value, $isUserValue = false)
|
||||||
{
|
{
|
||||||
$cache = new Cache();
|
$cache = new Cache();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$con = Propel::getConnection(CcPrefPeer::DATABASE_NAME);
|
$con = Propel::getConnection(CcPrefPeer::DATABASE_NAME);
|
||||||
$con->beginTransaction();
|
$con->beginTransaction();
|
||||||
|
|
||||||
$userId = self::getUserId();
|
$userId = self::getUserId();
|
||||||
|
|
||||||
if ($isUserValue && is_null($userId)) {
|
if ($isUserValue && is_null($userId))
|
||||||
throw new Exception("User id can't be null for a user preference {$key}.");
|
throw new Exception("User id can't be null for a user preference {$key}.");
|
||||||
}
|
|
||||||
|
|
||||||
Application_Common_Database::prepareAndExecute("LOCK TABLE cc_pref");
|
Application_Common_Database::prepareAndExecute("LOCK TABLE cc_pref");
|
||||||
|
|
||||||
//Check if key already exists
|
//Check if key already exists
|
||||||
$sql = "SELECT COUNT(*) FROM cc_pref"
|
$sql = "SELECT COUNT(*) FROM cc_pref"
|
||||||
." WHERE keystr = :key";
|
." WHERE keystr = :key";
|
||||||
|
|
||||||
$paramMap = array();
|
$paramMap = array();
|
||||||
$paramMap[':key'] = $key;
|
$paramMap[':key'] = $key;
|
||||||
|
@ -64,37 +63,33 @@ class Application_Model_Preference
|
||||||
//this case should not happen.
|
//this case should not happen.
|
||||||
throw new Exception("Invalid number of results returned. Should be ".
|
throw new Exception("Invalid number of results returned. Should be ".
|
||||||
"0 or 1, but is '$result' instead");
|
"0 or 1, but is '$result' instead");
|
||||||
}
|
} else if ($result == 1) {
|
||||||
elseif ($result == 1) {
|
|
||||||
|
|
||||||
// result found
|
// result found
|
||||||
if (!$isUserValue) {
|
if (!$isUserValue) {
|
||||||
// system pref
|
// system pref
|
||||||
$sql = "UPDATE cc_pref"
|
$sql = "UPDATE cc_pref"
|
||||||
." SET subjid = NULL, valstr = :value"
|
." SET subjid = NULL, valstr = :value"
|
||||||
." WHERE keystr = :key";
|
." WHERE keystr = :key";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// user pref
|
// user pref
|
||||||
$sql = "UPDATE cc_pref"
|
$sql = "UPDATE cc_pref"
|
||||||
. " SET valstr = :value"
|
. " SET valstr = :value"
|
||||||
. " WHERE keystr = :key AND subjid = :id";
|
. " WHERE keystr = :key AND subjid = :id";
|
||||||
|
|
||||||
$paramMap[':id'] = $userId;
|
$paramMap[':id'] = $userId;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
// result not found
|
// result not found
|
||||||
if (!$isUserValue) {
|
if (!$isUserValue) {
|
||||||
// system pref
|
// system pref
|
||||||
$sql = "INSERT INTO cc_pref (keystr, valstr)"
|
$sql = "INSERT INTO cc_pref (keystr, valstr)"
|
||||||
." VALUES (:key, :value)";
|
." VALUES (:key, :value)";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// user pref
|
// user pref
|
||||||
$sql = "INSERT INTO cc_pref (subjid, keystr, valstr)"
|
$sql = "INSERT INTO cc_pref (subjid, keystr, valstr)"
|
||||||
." VALUES (:id, :key, :value)";
|
." VALUES (:id, :key, :value)";
|
||||||
|
|
||||||
$paramMap[':id'] = $userId;
|
$paramMap[':id'] = $userId;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +104,7 @@ class Application_Model_Preference
|
||||||
$con);
|
$con);
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch (Exception $e) {
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
header('HTTP/1.0 503 Service Unavailable');
|
header('HTTP/1.0 503 Service Unavailable');
|
||||||
Logging::info("Database error: ".$e->getMessage());
|
Logging::info("Database error: ".$e->getMessage());
|
||||||
|
@ -118,26 +112,22 @@ class Application_Model_Preference
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache->store($key, $value, $isUserValue, $userId);
|
$cache->store($key, $value, $isUserValue, $userId);
|
||||||
//Logging::info("SAVING {$key} {$userId} into cache. = {$value}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getValue($key, $isUserValue = false)
|
private static function getValue($key, $isUserValue = false)
|
||||||
{
|
{
|
||||||
$cache = new Cache();
|
$cache = new Cache();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$userId = self::getUserId();
|
$userId = self::getUserId();
|
||||||
|
|
||||||
if ($isUserValue && is_null($userId)) {
|
if ($isUserValue && is_null($userId))
|
||||||
throw new Exception("User id can't be null for a user preference.");
|
throw new Exception("User id can't be null for a user preference.");
|
||||||
}
|
|
||||||
|
|
||||||
$res = $cache->fetch($key, $isUserValue, $userId);
|
// If the value is already cached, return it
|
||||||
if ($res !== false) {
|
$res = $cache->fetch($key, $isUserValue, $userId);
|
||||||
//Logging::info("returning {$key} {$userId} from cache. = {$res}");
|
if ($res !== false) return $res;
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Check if key already exists
|
//Check if key already exists
|
||||||
$sql = "SELECT COUNT(*) FROM cc_pref"
|
$sql = "SELECT COUNT(*) FROM cc_pref"
|
||||||
|
@ -147,7 +137,7 @@ class Application_Model_Preference
|
||||||
$paramMap[':key'] = $key;
|
$paramMap[':key'] = $key;
|
||||||
|
|
||||||
//For user specific preference, check if id matches as well
|
//For user specific preference, check if id matches as well
|
||||||
if ($isUserValue) {
|
if ($isUserValue) {
|
||||||
$sql .= " AND subjid = :id";
|
$sql .= " AND subjid = :id";
|
||||||
$paramMap[':id'] = $userId;
|
$paramMap[':id'] = $userId;
|
||||||
}
|
}
|
||||||
|
@ -157,8 +147,7 @@ class Application_Model_Preference
|
||||||
//return an empty string if the result doesn't exist.
|
//return an empty string if the result doesn't exist.
|
||||||
if ($result == 0) {
|
if ($result == 0) {
|
||||||
$res = "";
|
$res = "";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sql = "SELECT valstr FROM cc_pref"
|
$sql = "SELECT valstr FROM cc_pref"
|
||||||
." WHERE keystr = :key";
|
." WHERE keystr = :key";
|
||||||
|
|
||||||
|
@ -248,53 +237,53 @@ class Application_Model_Preference
|
||||||
|
|
||||||
public static function SetDefaultCrossfadeDuration($duration)
|
public static function SetDefaultCrossfadeDuration($duration)
|
||||||
{
|
{
|
||||||
self::setValue("default_crossfade_duration", $duration);
|
self::setValue("default_crossfade_duration", $duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetDefaultCrossfadeDuration()
|
public static function GetDefaultCrossfadeDuration()
|
||||||
{
|
{
|
||||||
$duration = self::getValue("default_crossfade_duration");
|
$duration = self::getValue("default_crossfade_duration");
|
||||||
|
|
||||||
if ($duration === "") {
|
if ($duration === "") {
|
||||||
// the default value of the fade is 00.5
|
// the default value of the fade is 00.5
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $duration;
|
return $duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetDefaultFadeIn($fade)
|
public static function SetDefaultFadeIn($fade)
|
||||||
{
|
{
|
||||||
self::setValue("default_fade_in", $fade);
|
self::setValue("default_fade_in", $fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetDefaultFadeIn()
|
public static function GetDefaultFadeIn()
|
||||||
{
|
{
|
||||||
$fade = self::getValue("default_fade_in");
|
$fade = self::getValue("default_fade_in");
|
||||||
|
|
||||||
if ($fade === "") {
|
if ($fade === "") {
|
||||||
// the default value of the fade is 00.5
|
// the default value of the fade is 00.5
|
||||||
return "00.5";
|
return "00.5";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $fade;
|
return $fade;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetDefaultFadeOut($fade)
|
public static function SetDefaultFadeOut($fade)
|
||||||
{
|
{
|
||||||
self::setValue("default_fade_out", $fade);
|
self::setValue("default_fade_out", $fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetDefaultFadeOut()
|
public static function GetDefaultFadeOut()
|
||||||
{
|
{
|
||||||
$fade = self::getValue("default_fade_out");
|
$fade = self::getValue("default_fade_out");
|
||||||
|
|
||||||
if ($fade === "") {
|
if ($fade === "") {
|
||||||
// the default value of the fade is 00.5
|
// the default value of the fade is 00.5
|
||||||
return "00.5";
|
return "00.5";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $fade;
|
return $fade;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetDefaultFade($fade)
|
public static function SetDefaultFade($fade)
|
||||||
|
@ -556,9 +545,8 @@ class Application_Model_Preference
|
||||||
{
|
{
|
||||||
// When a new user is created they will get the default timezone
|
// When a new user is created they will get the default timezone
|
||||||
// setting which the admin sets on preferences page
|
// setting which the admin sets on preferences page
|
||||||
if (is_null($timezone)) {
|
if (is_null($timezone))
|
||||||
$timezone = self::GetDefaultTimezone();
|
$timezone = self::GetDefaultTimezone();
|
||||||
}
|
|
||||||
self::setValue("user_timezone", $timezone, true);
|
self::setValue("user_timezone", $timezone, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,8 +555,7 @@ class Application_Model_Preference
|
||||||
$timezone = self::getValue("user_timezone", true);
|
$timezone = self::getValue("user_timezone", true);
|
||||||
if (!$timezone) {
|
if (!$timezone) {
|
||||||
return self::GetDefaultTimezone();
|
return self::GetDefaultTimezone();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return $timezone;
|
return $timezone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -580,8 +567,7 @@ class Application_Model_Preference
|
||||||
|
|
||||||
if (!is_null($userId)) {
|
if (!is_null($userId)) {
|
||||||
return self::GetUserTimezone();
|
return self::GetUserTimezone();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return self::GetDefaultTimezone();
|
return self::GetDefaultTimezone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -612,9 +598,8 @@ class Application_Model_Preference
|
||||||
{
|
{
|
||||||
// When a new user is created they will get the default locale
|
// When a new user is created they will get the default locale
|
||||||
// setting which the admin sets on preferences page
|
// setting which the admin sets on preferences page
|
||||||
if (is_null($locale)) {
|
if (is_null($locale))
|
||||||
$locale = self::GetDefaultLocale();
|
$locale = self::GetDefaultLocale();
|
||||||
}
|
|
||||||
self::setValue("user_locale", $locale, true);
|
self::setValue("user_locale", $locale, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,8 +609,7 @@ class Application_Model_Preference
|
||||||
|
|
||||||
if (!is_null($userId)) {
|
if (!is_null($userId)) {
|
||||||
return self::GetUserLocale();
|
return self::GetUserLocale();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return self::GetDefaultLocale();
|
return self::GetDefaultLocale();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -648,7 +632,7 @@ class Application_Model_Preference
|
||||||
|
|
||||||
public static function SetUniqueId($id)
|
public static function SetUniqueId($id)
|
||||||
{
|
{
|
||||||
self::setValue("uniqueId", $id);
|
self::setValue("uniqueId", $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetUniqueId()
|
public static function GetUniqueId()
|
||||||
|
@ -908,7 +892,7 @@ class Application_Model_Preference
|
||||||
|
|
||||||
public static function SetAirtimeVersion($version)
|
public static function SetAirtimeVersion($version)
|
||||||
{
|
{
|
||||||
self::setValue("system_version", $version);
|
self::setValue("system_version", $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetAirtimeVersion()
|
public static function GetAirtimeVersion()
|
||||||
|
@ -1404,12 +1388,11 @@ class Application_Model_Preference
|
||||||
return self::getValue("enable_replay_gain", false);
|
return self::getValue("enable_replay_gain", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getReplayGainModifier(){
|
public static function getReplayGainModifier() {
|
||||||
$rg_modifier = self::getValue("replay_gain_modifier");
|
$rg_modifier = self::getValue("replay_gain_modifier");
|
||||||
|
|
||||||
if ($rg_modifier === "") {
|
if ($rg_modifier === "")
|
||||||
return "0";
|
return "0";
|
||||||
}
|
|
||||||
|
|
||||||
return $rg_modifier;
|
return $rg_modifier;
|
||||||
}
|
}
|
||||||
|
@ -1420,19 +1403,19 @@ class Application_Model_Preference
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetHistoryItemTemplate($value) {
|
public static function SetHistoryItemTemplate($value) {
|
||||||
self::setValue("history_item_template", $value);
|
self::setValue("history_item_template", $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetHistoryItemTemplate() {
|
public static function GetHistoryItemTemplate() {
|
||||||
return self::getValue("history_item_template");
|
return self::getValue("history_item_template");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetHistoryFileTemplate($value) {
|
public static function SetHistoryFileTemplate($value) {
|
||||||
self::setValue("history_file_template", $value);
|
self::setValue("history_file_template", $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetHistoryFileTemplate() {
|
public static function GetHistoryFileTemplate() {
|
||||||
return self::getValue("history_file_template");
|
return self::getValue("history_file_template");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getDiskUsage()
|
public static function getDiskUsage()
|
||||||
|
|
|
@ -1112,35 +1112,36 @@ class Application_Model_Scheduler
|
||||||
|
|
||||||
$removedItems = CcScheduleQuery::create()->findPks($scheduledIds);
|
$removedItems = CcScheduleQuery::create()->findPks($scheduledIds);
|
||||||
|
|
||||||
//check to make sure all items selected are up to date
|
// This array is used to keep track of every show instance that was
|
||||||
foreach ($removedItems as $removedItem) {
|
// effected by the track deletion. It will be used later on to
|
||||||
|
// remove gaps in the schedule and adjust crossfade times.
|
||||||
|
$effectedInstanceIds = array();
|
||||||
|
|
||||||
|
foreach ($removedItems as $removedItem) {
|
||||||
$instance = $removedItem->getCcShowInstances($this->con);
|
$instance = $removedItem->getCcShowInstances($this->con);
|
||||||
|
$effectedInstanceIds[] = $instance->getDbId();
|
||||||
|
|
||||||
//check if instance is linked and if so get the schedule items
|
//check if instance is linked and if so get the schedule items
|
||||||
//for all linked instances so we can delete them too
|
//for all linked instances so we can delete them too
|
||||||
if (!$cancelShow && $instance->getCcShow()->isLinked()) {
|
if (!$cancelShow && $instance->getCcShow()->isLinked()) {
|
||||||
//returns all linked instances if linked
|
//returns all linked instances if linked
|
||||||
$ccShowInstances = $this->getInstances($instance->getDbId());
|
$ccShowInstances = $this->getInstances($instance->getDbId());
|
||||||
|
|
||||||
$instanceIds = array();
|
$instanceIds = array();
|
||||||
foreach ($ccShowInstances as $ccShowInstance) {
|
foreach ($ccShowInstances as $ccShowInstance) {
|
||||||
$instanceIds[] = $ccShowInstance->getDbId();
|
$instanceIds[] = $ccShowInstance->getDbId();
|
||||||
}
|
}
|
||||||
/*
|
$effectedInstanceIds = array_merge($effectedInstanceIds, $instanceIds);
|
||||||
* Find all the schedule items that are in the same position
|
|
||||||
* as the selected item by the user.
|
// Delete the same track, represented by $removedItem, in
|
||||||
* The position of each track is the same across each linked instance
|
// each linked show instance.
|
||||||
*/
|
|
||||||
$itemsToDelete = CcScheduleQuery::create()
|
$itemsToDelete = CcScheduleQuery::create()
|
||||||
->filterByDbPosition($removedItem->getDbPosition())
|
->filterByDbPosition($removedItem->getDbPosition())
|
||||||
->filterByDbInstanceId($instanceIds, Criteria::IN)
|
->filterByDbInstanceId($instanceIds, Criteria::IN)
|
||||||
->find();
|
->filterByDbId($removedItem->getDbId(), Criteria::NOT_EQUAL)
|
||||||
foreach ($itemsToDelete as $item) {
|
->delete($this->con);
|
||||||
if (!$removedItems->contains($item)) {
|
|
||||||
$removedItems->append($item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//check to truncate the currently playing item instead of deleting it.
|
//check to truncate the currently playing item instead of deleting it.
|
||||||
if ($removedItem->isCurrentItem($this->epochNow)) {
|
if ($removedItem->isCurrentItem($this->epochNow)) {
|
||||||
|
@ -1165,29 +1166,11 @@ class Application_Model_Scheduler
|
||||||
} else {
|
} else {
|
||||||
$removedItem->delete($this->con);
|
$removedItem->delete($this->con);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update is_scheduled in cc_files but only if
|
|
||||||
// the file is not scheduled somewhere else
|
|
||||||
$fileId = $removedItem->getDbFileId();
|
|
||||||
// check if the removed item is scheduled somewhere else
|
|
||||||
$futureScheduledFiles = Application_Model_Schedule::getAllFutureScheduledFiles();
|
|
||||||
if (!is_null($fileId) && !in_array($fileId, $futureScheduledFiles)) {
|
|
||||||
$db_file = CcFilesQuery::create()->findPk($fileId, $this->con);
|
|
||||||
$db_file->setDbIsScheduled(false)->save($this->con);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Application_Model_StoredFile::updatePastFilesIsScheduled();
|
||||||
|
|
||||||
if ($adjustSched === true) {
|
if ($adjustSched === true) {
|
||||||
//get the show instances of the shows we must adjust times for.
|
foreach ($effectedInstanceIds as $instance) {
|
||||||
foreach ($removedItems as $item) {
|
|
||||||
|
|
||||||
$instance = $item->getDBInstanceId();
|
|
||||||
if (!in_array($instance, $showInstances)) {
|
|
||||||
$showInstances[] = $instance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($showInstances as $instance) {
|
|
||||||
$this->removeGaps($instance);
|
$this->removeGaps($instance);
|
||||||
$this->calculateCrossfades($instance);
|
$this->calculateCrossfades($instance);
|
||||||
}
|
}
|
||||||
|
@ -1195,7 +1178,7 @@ class Application_Model_Scheduler
|
||||||
|
|
||||||
//update the status flag in cc_schedule.
|
//update the status flag in cc_schedule.
|
||||||
$instances = CcShowInstancesQuery::create()
|
$instances = CcShowInstancesQuery::create()
|
||||||
->filterByPrimaryKeys($showInstances)
|
->filterByPrimaryKeys($effectedInstanceIds)
|
||||||
->find($this->con);
|
->find($this->con);
|
||||||
|
|
||||||
foreach ($instances as $instance) {
|
foreach ($instances as $instance) {
|
||||||
|
|
|
@ -1131,7 +1131,6 @@ SELECT s.name,
|
||||||
s.genre,
|
s.genre,
|
||||||
s.id,
|
s.id,
|
||||||
si.id AS instance_id,
|
si.id AS instance_id,
|
||||||
si.description AS instance_description,
|
|
||||||
si.record,
|
si.record,
|
||||||
s.url,
|
s.url,
|
||||||
s.image_path,
|
s.image_path,
|
||||||
|
@ -1220,7 +1219,6 @@ SELECT si.starts AS start_timestamp,
|
||||||
s.description,
|
s.description,
|
||||||
s.id,
|
s.id,
|
||||||
si.id AS instance_id,
|
si.id AS instance_id,
|
||||||
si.description AS instance_description,
|
|
||||||
si.record,
|
si.record,
|
||||||
s.url,
|
s.url,
|
||||||
s.image_path,
|
s.image_path,
|
||||||
|
@ -1267,7 +1265,6 @@ SQL;
|
||||||
$results['previousShow'][0] = array(
|
$results['previousShow'][0] = array(
|
||||||
"id" => $rows[$i-1]['id'],
|
"id" => $rows[$i-1]['id'],
|
||||||
"instance_id" => $rows[$i-1]['instance_id'],
|
"instance_id" => $rows[$i-1]['instance_id'],
|
||||||
"instance_description" => $rows[$i-1]['instance_description'],
|
|
||||||
"name" => $rows[$i-1]['name'],
|
"name" => $rows[$i-1]['name'],
|
||||||
"description" => $rows[$i-1]['description'],
|
"description" => $rows[$i-1]['description'],
|
||||||
"url" => $rows[$i-1]['url'],
|
"url" => $rows[$i-1]['url'],
|
||||||
|
@ -1286,7 +1283,6 @@ SQL;
|
||||||
$results['nextShow'][0] = array(
|
$results['nextShow'][0] = array(
|
||||||
"id" => $rows[$i+1]['id'],
|
"id" => $rows[$i+1]['id'],
|
||||||
"instance_id" => $rows[$i+1]['instance_id'],
|
"instance_id" => $rows[$i+1]['instance_id'],
|
||||||
"instance_description" => $rows[$i+1]['instance_description'],
|
|
||||||
"name" => $rows[$i+1]['name'],
|
"name" => $rows[$i+1]['name'],
|
||||||
"description" => $rows[$i+1]['description'],
|
"description" => $rows[$i+1]['description'],
|
||||||
"url" => $rows[$i+1]['url'],
|
"url" => $rows[$i+1]['url'],
|
||||||
|
@ -1309,7 +1305,6 @@ SQL;
|
||||||
$results['nextShow'][0] = array(
|
$results['nextShow'][0] = array(
|
||||||
"id" => $rows[$i]['id'],
|
"id" => $rows[$i]['id'],
|
||||||
"instance_id" => $rows[$i]['instance_id'],
|
"instance_id" => $rows[$i]['instance_id'],
|
||||||
"instance_description" => $rows[$i]['instance_description'],
|
|
||||||
"name" => $rows[$i]['name'],
|
"name" => $rows[$i]['name'],
|
||||||
"description" => $rows[$i]['description'],
|
"description" => $rows[$i]['description'],
|
||||||
"url" => $rows[$i]['url'],
|
"url" => $rows[$i]['url'],
|
||||||
|
@ -1329,7 +1324,6 @@ SQL;
|
||||||
$results['previousShow'][0] = array(
|
$results['previousShow'][0] = array(
|
||||||
"id" => $rows[$previousShowIndex]['id'],
|
"id" => $rows[$previousShowIndex]['id'],
|
||||||
"instance_id" => $rows[$previousShowIndex]['instance_id'],
|
"instance_id" => $rows[$previousShowIndex]['instance_id'],
|
||||||
"instance_description" => $rows[$previousShowIndex]['instance_description'],
|
|
||||||
"name" => $rows[$previousShowIndex]['name'],
|
"name" => $rows[$previousShowIndex]['name'],
|
||||||
"description" => $rows[$previousShowIndex]['description'],
|
"description" => $rows[$previousShowIndex]['description'],
|
||||||
"start_timestamp" => $rows[$previousShowIndex]['start_timestamp'],
|
"start_timestamp" => $rows[$previousShowIndex]['start_timestamp'],
|
||||||
|
|
|
@ -362,33 +362,22 @@ class Application_Service_ShowFormService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Before we send the form data in for validation, there
|
* Before we send the form data in for validation, there
|
||||||
* are a few fields we may need to adjust first
|
* are a few fields we may need to adjust first
|
||||||
|
*
|
||||||
* @param $formData
|
* @param $formData
|
||||||
*/
|
*/
|
||||||
public function preEditShowValidationCheck($formData)
|
public function preEditShowValidationCheck($formData)
|
||||||
{
|
{
|
||||||
$validateStartDate = true;
|
// If the start date or time were disabled, don't validate them
|
||||||
$validateStartTime = true;
|
$validateStartDate = $formData['start_date_disabled'] === "false";
|
||||||
|
$validateStartTime = $formData['start_time_disabled'] === "false";
|
||||||
|
|
||||||
//CcShowDays object of the show currently being edited
|
//CcShowDays object of the show currently being edited
|
||||||
$currentShowDay = $this->ccShow->getFirstCcShowDay();
|
$currentShowDay = $this->ccShow->getFirstCcShowDay();
|
||||||
|
|
||||||
//DateTime object
|
//DateTime object
|
||||||
$dt = $currentShowDay->getLocalStartDateAndTime();
|
$dt = $currentShowDay->getLocalStartDateAndTime();
|
||||||
|
|
||||||
if (!array_key_exists('add_show_start_date', $formData)) {
|
|
||||||
//Changing the start date was disabled, since the
|
|
||||||
//array key does not exist. We need to repopulate this entry from the db.
|
|
||||||
$formData['add_show_start_date'] = $dt->format("Y-m-d");
|
|
||||||
|
|
||||||
if (!array_key_exists('add_show_start_time', $formData)) {
|
|
||||||
$formData['add_show_start_time'] = $dt->format("H:i");
|
|
||||||
$validateStartTime = false;
|
|
||||||
}
|
|
||||||
$validateStartDate = false;
|
|
||||||
}
|
|
||||||
$formData['add_show_record'] = $currentShowDay->getDbRecord();
|
$formData['add_show_record'] = $currentShowDay->getDbRecord();
|
||||||
|
|
||||||
//if the show is repeating, set the start date to the next
|
//if the show is repeating, set the start date to the next
|
||||||
|
@ -412,11 +401,9 @@ class Application_Service_ShowFormService
|
||||||
$ccShowInstance = CcShowInstancesQuery::create()
|
$ccShowInstance = CcShowInstancesQuery::create()
|
||||||
->filterByDbShowId($this->ccShow->getDbId())
|
->filterByDbShowId($this->ccShow->getDbId())
|
||||||
->filterByDbModifiedInstance(false)
|
->filterByDbModifiedInstance(false)
|
||||||
->filterByDbEnds(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN)
|
->filterByDbStarts(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN)
|
||||||
->orderByDbStarts()
|
|
||||||
->limit(1)
|
|
||||||
->findOne();
|
->findOne();
|
||||||
|
|
||||||
$starts = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC"));
|
$starts = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC"));
|
||||||
$ends = new DateTime($ccShowInstance->getDbEnds(), new DateTimeZone("UTC"));
|
$ends = new DateTime($ccShowInstance->getDbEnds(), new DateTimeZone("UTC"));
|
||||||
$showTimezone = $this->ccShow->getFirstCcShowDay()->getDbTimezone();
|
$showTimezone = $this->ccShow->getFirstCcShowDay()->getDbTimezone();
|
||||||
|
@ -427,6 +414,7 @@ class Application_Service_ShowFormService
|
||||||
return array($starts, $ends);
|
return array($starts, $ends);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Validates show forms
|
* Validates show forms
|
||||||
|
|
|
@ -2,19 +2,25 @@
|
||||||
<h2><?php echo _("About") ?></h2>
|
<h2><?php echo _("About") ?></h2>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
echo sprintf(_("%sAirtime%s %s, the open radio software for scheduling and remote station management. %s"),
|
|
||||||
"<a href='http://airtime.sourcefabric.org' target='_blank'>",
|
$productSiteAnchor = "<a href='" . PRODUCT_SITE_URL . "' target='_blank'>"
|
||||||
"</a>",
|
. PRODUCT_NAME
|
||||||
$this->airtime_version,
|
. "</a>";
|
||||||
"<br />")
|
echo sprintf(_('%1$s %2$s, the open radio software for scheduling and remote station management.'),
|
||||||
|
$productSiteAnchor,
|
||||||
|
$this->airtime_version)
|
||||||
?>
|
?>
|
||||||
<br>© 2013
|
<br />
|
||||||
|
<br />© 2013
|
||||||
<?php
|
<?php
|
||||||
echo sprintf(_("%sSourcefabric%s z.ú Airtime is distributed under the %sGNU GPL v.3%s"),
|
$companySiteAnchor = "<a href='" . COMPANY_SITE_URL . "' target='_blank'>"
|
||||||
"<a href='http://www.sourcefabric.org' target='_blank'>",
|
. COMPANY_NAME . " " . COMPANY_SUFFIX
|
||||||
"</a>",
|
. "</a>";
|
||||||
"<a href='http://www.gnu.org/licenses/gpl-3.0-standalone.html' target='_blank'>",
|
$licenseAnchor = "<a href='" . LICENSE_URL . "' target='_blank'>"
|
||||||
"</a>")
|
. LICENSE_VERSION
|
||||||
|
. "</a>";
|
||||||
|
echo sprintf(_('%1$s %2$s is distributed under the %3$s'),
|
||||||
|
$companySiteAnchor, PRODUCT_NAME, $licenseAnchor)
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="gray-logo"></div>
|
<div class="gray-logo"></div>
|
||||||
<div class="text-content">
|
<div class="text-content">
|
||||||
<h2><?php echo _("Welcome to Airtime!") ?></h2>
|
<h2><?php echo sprintf(_("Welcome to %s!"), PRODUCT_NAME) ?></h2>
|
||||||
<p><?php echo _("Here's how you can get started using Airtime to automate your broadcasts: ")?></p>
|
<p><?php echo sprintf(_("Here's how you can get started using %s to automate your broadcasts: "), PRODUCT_NAME)?></p>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><?php echo _("Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too.")?></li>
|
<li><?php echo _("Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too.")?></li>
|
||||||
|
@ -10,8 +10,12 @@
|
||||||
<li><?php echo _("Select your media from the left pane and drag them to your show in the right pane."); ?></li>
|
<li><?php echo _("Select your media from the left pane and drag them to your show in the right pane."); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
<p><strong><?php echo _("Then you're good to go!")?></strong><br />
|
<p><strong><?php echo _("Then you're good to go!")?></strong><br />
|
||||||
<?php echo sprintf(_("For more detailed help, read the %suser manual%s."),
|
<?php
|
||||||
"<a href='http://www.sourcefabric.org/en/airtime/manuals/' target='_blank'>",
|
$userManualAnchorOpen = "<a href='" . USER_MANUAL_URL . "' target='_blank'>";
|
||||||
"</a>") ?></p>
|
echo sprintf(_("For more detailed help, read the %suser manual%s."),
|
||||||
|
$userManualAnchorOpen, "</a>")
|
||||||
|
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,8 @@
|
||||||
<?php foreach($watched_dirs as $watched_dir): ?>
|
<?php foreach($watched_dirs as $watched_dir): ?>
|
||||||
<dd class="block-display selected-item">
|
<dd class="block-display selected-item">
|
||||||
<?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo htmlspecialchars($watched_dir->getDirectory());?></span></span>
|
<?php echo ($watched_dir->getExistsFlag())?"":"<span class='ui-icon-alert'><img src='/css/images/warning-icon.png'></span>"?><span id="folderPath" style="display:block; width:350px"><?php echo htmlspecialchars($watched_dir->getDirectory());?></span></span>
|
||||||
<span title="<?php echo _("Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)")?>" class="ui-icon ui-icon-refresh"></span>
|
<span title="<?php echo sprintf(_("Rescan watched directory (This is useful if it is network mount and may be out of sync with %s)"), PRODUCT_NAME)?>" class="ui-icon ui-icon-refresh"></span>
|
||||||
<span title="<?php echo _("Remove watched directory")?>" class="ui-icon ui-icon-close"></span>
|
<span title="<?php echo _("Remove watched directory")?>" class="ui-icon ui-icon-close"></span>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
<dt class="block-display info-text">
|
<dt class="block-display info-text">
|
||||||
<?php echo sprintf(_("Help Airtime improve by letting us know how you are using it. This info "
|
<?php echo sprintf(_('Help %1$s improve by letting us know how you are using it. This info '
|
||||||
."will be collected regularly in order to enhance your user experience.%s"
|
.'will be collected regularly in order to enhance your user experience.%2$s'
|
||||||
."Click 'Yes, help Airtime' and we'll make sure the features you use are "
|
.'Click \'Yes, help %1$s\' and we\'ll make sure the features you use are '
|
||||||
."constantly improving."), "<br /><br />") ?>
|
.'constantly improving.'), PRODUCT_NAME, "<br /><br />") ?>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="SupportFeedback-element" class="block-display">
|
<dd id="SupportFeedback-element" class="block-display">
|
||||||
<label class="optional" for="SupportFeedback">
|
<label class="optional" for="SupportFeedback">
|
||||||
|
@ -22,10 +22,12 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt class="block-display info-text">
|
<dt class="block-display info-text">
|
||||||
<?php echo sprintf(_("Click the box below to advertise your station on %sSourcefabric.org%s."
|
<?php
|
||||||
." In order to promote your station, 'Send support feedback' must be enabled. This data will be collected in addition to the support feedback."),
|
$whosUsingAnchor = "<a id='link_to_whos_using' href='" . WHOS_USING_URL . "' onclick='window.open(this.href); return false'>"
|
||||||
"<a id='link_to_whos_using' href='http://sourcefabric.org/en/airtime/whosusing' onclick='window.open(this.href); return false'>",
|
. COMPANY_SITE
|
||||||
"</a>")?>
|
. "</a>";
|
||||||
|
echo sprintf(_("Click the box below to promote your station on %s."), $whosUsingAnchor)
|
||||||
|
?>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="publicize-element" class="block-display">
|
<dd id="publicize-element" class="block-display">
|
||||||
<label class="optional" for="Publicise">
|
<label class="optional" for="Publicise">
|
||||||
|
@ -175,7 +177,7 @@
|
||||||
<?php echo $this->element->getElement('Privacy')->getLabel() ?>
|
<?php echo $this->element->getElement('Privacy')->getLabel() ?>
|
||||||
</label>
|
</label>
|
||||||
<?php }else{?>
|
<?php }else{?>
|
||||||
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;"><?php echo _("Terms and Conditions") ?></a>
|
<a id="link_to_terms_and_condition" href="<?php echo TERMS_AND_CONDITIONS_URL ?>" onclick="window.open(this.href); return false;"><?php echo _("Terms and Conditions") ?></a>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
<dd id="SupportFeedback-element" style="width:90%;">
|
<dd id="SupportFeedback-element" style="width:90%;">
|
||||||
<div class="info-text">
|
<div class="info-text">
|
||||||
<?php echo sprintf(_("Help Airtime improve by letting Sourcefabric know how you are using it. This information"
|
<?php echo sprintf(_("Help %s improve by letting %s know how you are using it. This information"
|
||||||
." will be collected regularly in order to enhance your user experience.%s"
|
." will be collected regularly in order to enhance your user experience.%s"
|
||||||
."Click the 'Send support feedback' box and we'll make sure the features you use are constantly improving."), "<br />")?>
|
."Click the 'Send support feedback' box and we'll make sure the features you use are constantly improving."),
|
||||||
|
PRODUCT_NAME, COMPANY_NAME, "<br />")?>
|
||||||
</div>
|
</div>
|
||||||
<label class="optional" for="SupportFeedback">
|
<label class="optional" for="SupportFeedback">
|
||||||
<?php echo $this->element->getElement('SupportFeedback') ?>
|
<?php echo $this->element->getElement('SupportFeedback') ?>
|
||||||
|
@ -20,9 +21,13 @@
|
||||||
</dd>
|
</dd>
|
||||||
<dd id="publicize-element" style="width:90%;">
|
<dd id="publicize-element" style="width:90%;">
|
||||||
<div class="info-text">
|
<div class="info-text">
|
||||||
<?php echo sprintf(_("Click the box below to promote your station on %sSourcefabric.org%s."),
|
<?php
|
||||||
"<a id='link_to_whos_using' href='http://www.sourcefabric.org/en/airtime/whosusing/' onclick='window.open(this.href); return false'>",
|
|
||||||
"</a>")?>
|
$whosUsingAnchor = "<a id='link_to_whos_using' href='" . WHOS_USING_URL . "' onclick='window.open(this.href); return false'>"
|
||||||
|
. COMPANY_SITE
|
||||||
|
. "</a>";
|
||||||
|
echo sprintf(_("Click the box below to promote your station on %s."), $whosUsingAnchor)
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<label class="optional" for="Publicise">
|
<label class="optional" for="Publicise">
|
||||||
<?php echo $this->element->getElement('Publicise') ?>
|
<?php echo $this->element->getElement('Publicise') ?>
|
||||||
|
@ -183,7 +188,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php }else{?>
|
<?php }else{?>
|
||||||
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;"><?php echo _("Sourcefabric Privacy Policy") ?></a>
|
<a id="link_to_terms_and_condition" href="<?php echo PRIVACY_POLICY_URL ?>" onclick="window.open(this.href); return false;"><?php echo _("Sourcefabric Privacy Policy") ?></a>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div id="login" class="login-content clearfix">
|
<div id="login" class="login-content clearfix">
|
||||||
<?php if(isset($this->demo) && $this->demo == 1){?>
|
<?php if(isset($this->demo) && $this->demo == 1){?>
|
||||||
<p style="font-weight:bold">
|
<p style="font-weight:bold">
|
||||||
<?php echo _("Welcome to the Airtime demo! You can log in using the username 'admin' and the password 'admin'.")?>
|
<?php echo sprintf(_("Welcome to the %s demo! You can log in using the username 'admin' and the password 'admin'."), PRODUCT_NAME)?>
|
||||||
</p>
|
</p>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
|
<p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="trial-box-calendar-gray"><?php echo _("days") ?></div>
|
<div class="trial-box-calendar-gray"><?php echo _("days") ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="trial-box-button">
|
<div class="trial-box-button">
|
||||||
<a title="<?php echo _("Purchase your copy of Airtime")?> href="https://account.sourcefabric.com/clientarea.php" target="_blank"><?php echo _("My Account") ?></a>
|
<a title="<?php echo sprintf(_("Purchase your copy of %s"), PRODUCT_NAME)?> href="https://account.sourcefabric.com/clientarea.php" target="_blank"><?php echo _("My Account") ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<table width="60%" cellpadding="0" cellspacing="0" border="0" class="statustable">
|
<table width="60%" cellpadding="0" cellspacing="0" border="0" class="statustable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="ui-state-default strong">
|
<tr class="ui-state-default strong">
|
||||||
<td><?php echo _("Service") ?></td>
|
<td><?php echo _("Service") ?></td>
|
||||||
<td><?php echo _("Status") ?></td>
|
<td><?php echo _("Status") ?></td>
|
||||||
<td><?php echo _("Uptime") ?></td>
|
<td><?php echo _("Uptime") ?></td>
|
||||||
<td><?php echo _("CPU") ?></td>
|
<td><?php echo _("CPU") ?></td>
|
||||||
<td><?php echo _("Memory") ?></td>
|
<td><?php echo _("Memory") ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<!--
|
<!--
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td><?php echo _("Airtime Version") ?></td>
|
<td><?php echo sprintf(_("%s Version"), PRODUCT_NAME) ?></td>
|
||||||
<td>1.9.3</td>
|
<td>1.9.3</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
-->
|
||||||
<?php $i=0; ?>
|
<?php $i=0; ?>
|
||||||
|
@ -26,8 +26,8 @@
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<tr id="partitions" class="even">
|
<tr id="partitions" class="even">
|
||||||
<th colspan="5"><?php echo _("Disk Space") ?></th>
|
<th colspan="5"><?php echo _("Disk Space") ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,5 @@
|
||||||
$(window).load(function(){
|
$(window).load(function() {
|
||||||
$("#username").focus();
|
$("#username").focus();
|
||||||
$("#locale").val($.cookie("airtime_locale")!== null?$.cookie("airtime_locale"):$.cookie("default_airtime_locale"));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
|
@ -25,7 +25,7 @@ $(document).ready(function(){
|
||||||
data: {format:"json"}
|
data: {format:"json"}
|
||||||
});
|
});
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "remind_never",
|
id: "remind_never",
|
||||||
|
@ -41,12 +41,12 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "help_airtime",
|
id: "help_airtime",
|
||||||
text: $.i18n._("Yes, help Airtime"),
|
text: sprintf($.i18n._("Yes, help %s"), PRODUCT_NAME),
|
||||||
"class": "btn",
|
"class": "btn",
|
||||||
click: function() {
|
click: function() {
|
||||||
$("#register-form").submit();
|
$("#register-form").submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
@ -97,12 +97,12 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#Privacy").live('click', function(){
|
$("#Privacy").live('click', function(){
|
||||||
var support = $("#SupportFeedback");
|
var support = $("#SupportFeedback");
|
||||||
var button = $("#help_airtime");
|
var button = $("#help_airtime");
|
||||||
if($(this).is(':checked') && support.is(':checked')){
|
if($(this).is(':checked') && support.is(':checked')){
|
||||||
button.removeAttr('disabled').removeClass('ui-state-disabled');
|
button.removeAttr('disabled').removeClass('ui-state-disabled');
|
||||||
}else{
|
}else{
|
||||||
button.attr('disabled', 'disabled' ).addClass('ui-state-disabled');
|
button.attr('disabled', 'disabled' ).addClass('ui-state-disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -118,36 +118,36 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#Logo").live('change', function(ev){
|
$("#Logo").live('change', function(ev){
|
||||||
var content, res, logoEl;
|
var content, res, logoEl;
|
||||||
|
|
||||||
content = $(this).val();
|
content = $(this).val();
|
||||||
res = content.match(/(jpg|jpeg|png|gif)$/gi);
|
res = content.match(/(jpg|jpeg|png|gif)$/gi);
|
||||||
logoEl = $("#Logo-element");
|
logoEl = $("#Logo-element");
|
||||||
|
|
||||||
//not an accepted image extension.
|
//not an accepted image extension.
|
||||||
if (!res) {
|
if (!res) {
|
||||||
var ul, li;
|
var ul, li;
|
||||||
|
|
||||||
ul = logoEl.find('.errors');
|
ul = logoEl.find('.errors');
|
||||||
li = $("<li/>").append($.i18n._("Image must be one of jpg, jpeg, png, or gif"));
|
li = $("<li/>").append($.i18n._("Image must be one of jpg, jpeg, png, or gif"));
|
||||||
|
|
||||||
//errors ul has already been created.
|
//errors ul has already been created.
|
||||||
if (ul.length > 0) {
|
if (ul.length > 0) {
|
||||||
ul.empty()
|
ul.empty()
|
||||||
.append(li);
|
.append(li);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logoEl
|
logoEl
|
||||||
.append('<ul class="errors"></ul>')
|
.append('<ul class="errors"></ul>')
|
||||||
.find(".errors")
|
.find(".errors")
|
||||||
.append(li);
|
.append(li);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).val("");
|
$(this).val("");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logoEl.find(".errors").remove();
|
logoEl.find(".errors").remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ function setupUI() {
|
||||||
|
|
||||||
$(".repeat_tracks_help_icon").qtip({
|
$(".repeat_tracks_help_icon").qtip({
|
||||||
content: {
|
content: {
|
||||||
text: $.i18n._("The desired block length will not be reached if Airtime cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block.")
|
text: sprintf($.i18n._("The desired block length will not be reached if %s cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block."), PRODUCT_NAME)
|
||||||
},
|
},
|
||||||
hide: {
|
hide: {
|
||||||
delay: 500,
|
delay: 500,
|
||||||
|
|
|
@ -43,7 +43,7 @@ function setWatchedDirEvents() {
|
||||||
$('#storageFolder-ok').click(function(){
|
$('#storageFolder-ok').click(function(){
|
||||||
var url, chosen;
|
var url, chosen;
|
||||||
|
|
||||||
if(confirm($.i18n._("Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!"))){
|
if(confirm(sprintf($.i18n._("Are you sure you want to change the storage folder?\nThis will remove the files from your %s library!"), PRODUCT_NAME))){
|
||||||
url = baseUrl+"Preference/change-stor-directory";
|
url = baseUrl+"Preference/change-stor-directory";
|
||||||
chosen = $('#storageFolder').val();
|
chosen = $('#storageFolder').val();
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,6 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$.post(url, {format: "json", data: data}, function(json){
|
$.post(url, {format: "json", data: data}, function(json){
|
||||||
$('#content').empty().append(json.html);
|
$('#content').empty().append(json.html);
|
||||||
$.cookie("default_airtime_locale", $('#locale').val(), {path: '/'});
|
|
||||||
setTimeout(removeSuccessMsg, 5000);
|
setTimeout(removeSuccessMsg, 5000);
|
||||||
showErrorSections();
|
showErrorSections();
|
||||||
setMailServerInputReadonly();
|
setMailServerInputReadonly();
|
||||||
|
|
|
@ -250,12 +250,14 @@ function setupEventListeners() {
|
||||||
showErrorSections();
|
showErrorSections();
|
||||||
checkLiquidsoapStatus();
|
checkLiquidsoapStatus();
|
||||||
|
|
||||||
|
var userManualAnchorOpen = "<a target='_blank' href='" + USER_MANUAL_URL + "'>";
|
||||||
|
|
||||||
// qtip for help text
|
// qtip for help text
|
||||||
$(".override_help_icon").qtip({
|
$(".override_help_icon").qtip({
|
||||||
content: {
|
content: {
|
||||||
text: $.i18n._("If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151.")+" "+
|
text: sprintf($.i18n._("If %s is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151."), PRODUCT_NAME)+" "+
|
||||||
sprintf($.i18n._(
|
sprintf($.i18n._(
|
||||||
"For more details, please read the %sAirtime Manual%s"), "<a target='_blank' href='http://www.sourcefabric.org/en/airtime/manuals/'>", "</a>")
|
"For more details, please read the %s%s Manual%s"), userManualAnchorOpen, PRODUCT_NAME, "</a>")
|
||||||
},
|
},
|
||||||
hide: {
|
hide: {
|
||||||
delay: 500,
|
delay: 500,
|
||||||
|
@ -465,7 +467,7 @@ $(document).ready(function() {
|
||||||
getAdminPasswordStatus();
|
getAdminPasswordStatus();
|
||||||
|
|
||||||
$('#stream_save').live('click', function(){
|
$('#stream_save').live('click', function(){
|
||||||
var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted.");
|
var confirm_pypo_restart_text = sprintf($.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If %s is recording, and if the change causes a playout engine restart, the recording will be interrupted."), PRODUCT_NAME);
|
||||||
if (confirm(confirm_pypo_restart_text)) {
|
if (confirm(confirm_pypo_restart_text)) {
|
||||||
var data = $('#stream_form').serialize();
|
var data = $('#stream_form').serialize();
|
||||||
var url = baseUrl+'Preference/stream-setting';
|
var url = baseUrl+'Preference/stream-setting';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Schedule Dialog creation methods.
|
* Schedule Dialog creation methods.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -53,14 +53,14 @@ function removeAddShowButton(){
|
||||||
//$el is DOM element #add-show-form
|
//$el is DOM element #add-show-form
|
||||||
//form is the new form contents to append to $el
|
//form is the new form contents to append to $el
|
||||||
function redrawAddShowForm($el, form) {
|
function redrawAddShowForm($el, form) {
|
||||||
|
|
||||||
//need to clean up the color picker.
|
//need to clean up the color picker.
|
||||||
$el.find("#schedule-show-style input").each(function(i, el){
|
$el.find("#schedule-show-style input").each(function(i, el){
|
||||||
var $input = $(this),
|
var $input = $(this),
|
||||||
colId = $input.data("colorpickerId");
|
colId = $input.data("colorpickerId");
|
||||||
|
|
||||||
$("#"+colId).remove();
|
$("#"+colId).remove();
|
||||||
$input.removeData();
|
$input.removeData();
|
||||||
});
|
});
|
||||||
|
|
||||||
$el.empty().append(form);
|
$el.empty().append(form);
|
||||||
|
@ -74,12 +74,12 @@ function closeAddShowForm(event) {
|
||||||
|
|
||||||
var $el = $("#add-show-form");
|
var $el = $("#add-show-form");
|
||||||
|
|
||||||
$el.hide();
|
$el.hide();
|
||||||
windowResize();
|
windowResize();
|
||||||
|
|
||||||
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json) {
|
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json) {
|
||||||
|
|
||||||
redrawAddShowForm($el, json.form);
|
redrawAddShowForm($el, json.form);
|
||||||
});
|
});
|
||||||
|
|
||||||
makeAddShowButton();
|
makeAddShowButton();
|
||||||
|
@ -87,29 +87,29 @@ function closeAddShowForm(event) {
|
||||||
|
|
||||||
//dateText mm-dd-yy
|
//dateText mm-dd-yy
|
||||||
function startDpSelect(dateText, inst) {
|
function startDpSelect(dateText, inst) {
|
||||||
var time, date;
|
var time, date;
|
||||||
|
|
||||||
time = dateText.split("-");
|
time = dateText.split("-");
|
||||||
date = new Date(time[0], time[1] - 1, time[2]);
|
date = new Date(time[0], time[1] - 1, time[2]);
|
||||||
|
|
||||||
if (inst.input)
|
if (inst.input)
|
||||||
inst.input.trigger('input');
|
inst.input.trigger('input');
|
||||||
}
|
}
|
||||||
|
|
||||||
function endDpSelect(dateText, inst) {
|
function endDpSelect(dateText, inst) {
|
||||||
var time, date;
|
var time, date;
|
||||||
|
|
||||||
time = dateText.split("-");
|
time = dateText.split("-");
|
||||||
date = new Date(time[0], time[1] - 1, time[2]);
|
date = new Date(time[0], time[1] - 1, time[2]);
|
||||||
|
|
||||||
if (inst.input)
|
if (inst.input)
|
||||||
inst.input.trigger('input');
|
inst.input.trigger('input');
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDateInput(el, onSelect) {
|
function createDateInput(el, onSelect) {
|
||||||
var date;
|
var date;
|
||||||
|
|
||||||
el.datepicker({
|
el.datepicker({
|
||||||
minDate: adjustDateToServerDate(new Date(), timezoneOffset),
|
minDate: adjustDateToServerDate(new Date(), timezoneOffset),
|
||||||
onSelect: onSelect,
|
onSelect: onSelect,
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
|
@ -119,42 +119,42 @@ function createDateInput(el, onSelect) {
|
||||||
closeText: $.i18n._('Close'),
|
closeText: $.i18n._('Close'),
|
||||||
//showButtonPanel: true,
|
//showButtonPanel: true,
|
||||||
firstDay: calendarPref.weekStart
|
firstDay: calendarPref.weekStart
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoSelect(event, ui) {
|
function autoSelect(event, ui) {
|
||||||
|
|
||||||
$("#add_show_hosts-"+ui.item.index).attr("checked", "checked");
|
$("#add_show_hosts-"+ui.item.index).attr("checked", "checked");
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function findHosts(request, callback) {
|
function findHosts(request, callback) {
|
||||||
var search, url;
|
var search, url;
|
||||||
|
|
||||||
url = baseUrl+"User/get-hosts";
|
url = baseUrl+"User/get-hosts";
|
||||||
search = request.term;
|
search = request.term;
|
||||||
|
|
||||||
var noResult = new Array();
|
var noResult = new Array();
|
||||||
noResult[0] = new Array();
|
noResult[0] = new Array();
|
||||||
noResult[0]['value'] = $("#add_show_hosts_autocomplete").val();
|
noResult[0]['value'] = $("#add_show_hosts_autocomplete").val();
|
||||||
noResult[0]['label'] = $.i18n._("No result found");
|
noResult[0]['label'] = $.i18n._("No result found");
|
||||||
noResult[0]['index'] = null;
|
noResult[0]['index'] = null;
|
||||||
|
|
||||||
$.post(url,
|
$.post(url,
|
||||||
{format: "json", term: search},
|
{format: "json", term: search},
|
||||||
|
|
||||||
function(json) {
|
function(json) {
|
||||||
if(json.hosts.length<1){
|
if(json.hosts.length<1){
|
||||||
callback(noResult);
|
callback(noResult);
|
||||||
}else{
|
}else{
|
||||||
callback(json.hosts);
|
callback(json.hosts);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function beginEditShow(data){
|
function beginEditShow(data){
|
||||||
|
|
||||||
if (data.show_error == true){
|
if (data.show_error == true){
|
||||||
alertShowErrorAndReload();
|
alertShowErrorAndReload();
|
||||||
return false;
|
return false;
|
||||||
|
@ -201,11 +201,11 @@ function stringToColor(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContrastYIQ(hexcolor){
|
function getContrastYIQ(hexcolor){
|
||||||
var r = parseInt(hexcolor.substr(0,2),16);
|
var r = parseInt(hexcolor.substr(0,2),16);
|
||||||
var g = parseInt(hexcolor.substr(2,2),16);
|
var g = parseInt(hexcolor.substr(2,2),16);
|
||||||
var b = parseInt(hexcolor.substr(4,2),16);
|
var b = parseInt(hexcolor.substr(4,2),16);
|
||||||
var yiq = ((r*299)+(g*587)+(b*114))/1000;
|
var yiq = ((r*299)+(g*587)+(b*114))/1000;
|
||||||
return (yiq >= 128) ? '000000' : 'ffffff';
|
return (yiq >= 128) ? '000000' : 'ffffff';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ function setAddShowEvents(form) {
|
||||||
|
|
||||||
//var form = $("#add-show-form");
|
//var form = $("#add-show-form");
|
||||||
|
|
||||||
form.find("h3").click(function(){
|
form.find("h3").click(function(){
|
||||||
$(this).next().toggle();
|
$(this).next().toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -308,16 +308,16 @@ function setAddShowEvents(form) {
|
||||||
form.find("#add_show_rebroadcast").click(function(){
|
form.find("#add_show_rebroadcast").click(function(){
|
||||||
$(this).blur();
|
$(this).blur();
|
||||||
if(form.find("#add_show_record").attr('checked')){
|
if(form.find("#add_show_record").attr('checked')){
|
||||||
if($(this).attr('checked') && !form.find("#add_show_repeats").attr('checked')) {
|
if($(this).attr('checked') && !form.find("#add_show_repeats").attr('checked')) {
|
||||||
form.find("#add_show_rebroadcast_absolute").show();
|
form.find("#add_show_rebroadcast_absolute").show();
|
||||||
}
|
}
|
||||||
else if($(this).attr('checked') && form.find("#add_show_repeats").attr('checked')) {
|
else if($(this).attr('checked') && form.find("#add_show_repeats").attr('checked')) {
|
||||||
form.find("#add_show_rebroadcast_relative").show();
|
form.find("#add_show_rebroadcast_relative").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
form.find("#schedule-record-rebroadcast > fieldset:not(:first-child)").hide();
|
form.find("#schedule-record-rebroadcast > fieldset:not(:first-child)").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// in case user is creating a new show, there will be
|
// in case user is creating a new show, there will be
|
||||||
|
@ -492,9 +492,9 @@ function setAddShowEvents(form) {
|
||||||
endDateVisibility();
|
endDateVisibility();
|
||||||
form.find("#add_show_no_end").click(endDateVisibility);
|
form.find("#add_show_no_end").click(endDateVisibility);
|
||||||
|
|
||||||
createDateInput(form.find("#add_show_start_date"), startDpSelect);
|
createDateInput(form.find("#add_show_start_date"), startDpSelect);
|
||||||
createDateInput(form.find("#add_show_end_date_no_repeat"), endDpSelect);
|
createDateInput(form.find("#add_show_end_date_no_repeat"), endDpSelect);
|
||||||
createDateInput(form.find("#add_show_end_date"), endDpSelect);
|
createDateInput(form.find("#add_show_end_date"), endDpSelect);
|
||||||
|
|
||||||
$("#add_show_start_time").timepicker({
|
$("#add_show_start_time").timepicker({
|
||||||
amPmText: ['', ''],
|
amPmText: ['', ''],
|
||||||
|
@ -519,7 +519,7 @@ function setAddShowEvents(form) {
|
||||||
closeText: 'Close',
|
closeText: 'Close',
|
||||||
showButtonPanel: true,
|
showButtonPanel: true,
|
||||||
firstDay: calendarPref.weekStart
|
firstDay: calendarPref.weekStart
|
||||||
});
|
});
|
||||||
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
|
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
|
||||||
amPmText: ['', ''],
|
amPmText: ['', ''],
|
||||||
defaultTime: '',
|
defaultTime: '',
|
||||||
|
@ -569,36 +569,36 @@ function setAddShowEvents(form) {
|
||||||
list.next().show();
|
list.next().show();
|
||||||
});
|
});
|
||||||
|
|
||||||
form.find("#add_show_hosts_autocomplete").autocomplete({
|
form.find("#add_show_hosts_autocomplete").autocomplete({
|
||||||
source: findHosts,
|
source: findHosts,
|
||||||
select: autoSelect,
|
select: autoSelect,
|
||||||
delay: 200
|
delay: 200
|
||||||
});
|
});
|
||||||
|
|
||||||
form.find("#add_show_hosts_autocomplete").keypress(function(e){
|
form.find("#add_show_hosts_autocomplete").keypress(function(e){
|
||||||
if( e.which == 13 ){
|
if( e.which == 13 ){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
form.find("#schedule-show-style input").ColorPicker({
|
form.find("#schedule-show-style input").ColorPicker({
|
||||||
onChange: function (hsb, hex, rgb, el) {
|
onChange: function (hsb, hex, rgb, el) {
|
||||||
$(el).val(hex);
|
$(el).val(hex);
|
||||||
},
|
},
|
||||||
onSubmit: function(hsb, hex, rgb, el) {
|
onSubmit: function(hsb, hex, rgb, el) {
|
||||||
$(el).val(hex);
|
$(el).val(hex);
|
||||||
$(el).ColorPickerHide();
|
$(el).ColorPickerHide();
|
||||||
},
|
},
|
||||||
onBeforeShow: function () {
|
onBeforeShow: function () {
|
||||||
$(this).ColorPickerSetColor(this.value);
|
$(this).ColorPickerSetColor(this.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
form.find("#add-show-close").click(closeAddShowForm);
|
form.find("#add-show-close").click(closeAddShowForm);
|
||||||
|
|
||||||
form.find(".add-show-submit").click(function(event) {
|
form.find(".add-show-submit").click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var addShowButton = $(this);
|
var addShowButton = $(this);
|
||||||
|
|
||||||
$('#schedule-add-show').block({
|
$('#schedule-add-show').block({
|
||||||
|
@ -612,9 +612,25 @@ function setAddShowEvents(form) {
|
||||||
if (form.find("#add_show_record").attr("disabled", true)) {
|
if (form.find("#add_show_record").attr("disabled", true)) {
|
||||||
form.find("#add_show_record").attr("disabled", false);
|
form.find("#add_show_record").attr("disabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var startDateDisabled = false,
|
||||||
|
startTimeDisabled = false;
|
||||||
|
|
||||||
|
// Similarly, we need to re-enable start date and time if they're disabled
|
||||||
|
if (form.find("#add_show_start_date").prop("disabled") === true) {
|
||||||
|
form.find("#add_show_start_date").attr("disabled", false);
|
||||||
|
startDateDisabled = true;
|
||||||
|
}
|
||||||
|
if (form.find("#add_show_start_time").prop("disabled") === true) {
|
||||||
|
form.find("#add_show_start_time").attr("disabled", false);
|
||||||
|
startTimeDisabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
var data = $("form").serializeArray();
|
var data = $("form").serializeArray();
|
||||||
|
// We need to notify the application if date and time were disabled
|
||||||
|
data.push({name: 'start_date_disabled', value: startDateDisabled});
|
||||||
|
data.push({name: 'start_time_disabled', value: startTimeDisabled});
|
||||||
|
|
||||||
var hosts = $('#add_show_hosts-element input').map(function() {
|
var hosts = $('#add_show_hosts-element input').map(function() {
|
||||||
if($(this).attr("checked")) {
|
if($(this).attr("checked")) {
|
||||||
return $(this).val();
|
return $(this).val();
|
||||||
|
@ -638,21 +654,21 @@ function setAddShowEvents(form) {
|
||||||
var $addShowForm = $("#add-show-form");
|
var $addShowForm = $("#add-show-form");
|
||||||
|
|
||||||
if (json.form) {
|
if (json.form) {
|
||||||
|
|
||||||
redrawAddShowForm($addShowForm, json.form);
|
redrawAddShowForm($addShowForm, json.form);
|
||||||
|
|
||||||
$("#add_show_end_date").val(end_date);
|
$("#add_show_end_date").val(end_date);
|
||||||
$("#add_show_start_date").val(start_date);
|
$("#add_show_start_date").val(start_date);
|
||||||
showErrorSections();
|
showErrorSections();
|
||||||
}
|
}
|
||||||
else if (json.edit) {
|
else if (json.edit) {
|
||||||
|
|
||||||
$("#schedule_calendar").removeAttr("style")
|
$("#schedule_calendar").removeAttr("style")
|
||||||
.fullCalendar('render');
|
.fullCalendar('render');
|
||||||
|
|
||||||
$addShowForm.hide();
|
$addShowForm.hide();
|
||||||
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
|
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
|
||||||
redrawAddShowForm($addShowForm, json.form);
|
redrawAddShowForm($addShowForm, json.form);
|
||||||
});
|
});
|
||||||
makeAddShowButton();
|
makeAddShowButton();
|
||||||
}
|
}
|
||||||
|
@ -662,60 +678,60 @@ function setAddShowEvents(form) {
|
||||||
scheduleRefetchEvents(json);
|
scheduleRefetchEvents(json);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var regDate = new RegExp(/^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$/);
|
var regDate = new RegExp(/^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$/);
|
||||||
var regTime = new RegExp(/^[0-2][0-9]:[0-5][0-9]$/);
|
var regTime = new RegExp(/^[0-2][0-9]:[0-5][0-9]$/);
|
||||||
|
|
||||||
// when start date/time changes, set end date/time to start date/time+1 hr
|
// when start date/time changes, set end date/time to start date/time+1 hr
|
||||||
$('#add_show_start_date, #add_show_start_time').bind('input', 'change', function(){
|
$('#add_show_start_date, #add_show_start_time').bind('input', 'change', function(){
|
||||||
var startDateString = $('#add_show_start_date').val();
|
var startDateString = $('#add_show_start_date').val();
|
||||||
var startTimeString = $('#add_show_start_time').val();
|
var startTimeString = $('#add_show_start_time').val();
|
||||||
|
|
||||||
if(regDate.test(startDateString) && regTime.test(startTimeString)){
|
if(regDate.test(startDateString) && regTime.test(startTimeString)){
|
||||||
var startDate = startDateString.split('-');
|
var startDate = startDateString.split('-');
|
||||||
var startTime = startTimeString.split(':');
|
var startTime = startTimeString.split(':');
|
||||||
var startDateTime = new Date(startDate[0], parseInt(startDate[1], 10)-1, startDate[2], startTime[0], startTime[1], 0, 0);
|
var startDateTime = new Date(startDate[0], parseInt(startDate[1], 10)-1, startDate[2], startTime[0], startTime[1], 0, 0);
|
||||||
|
|
||||||
var endDateString = $('#add_show_end_date_no_repeat').val();
|
var endDateString = $('#add_show_end_date_no_repeat').val();
|
||||||
var endTimeString = $('#add_show_end_time').val()
|
var endTimeString = $('#add_show_end_time').val()
|
||||||
var endDate = endDateString.split('-');
|
var endDate = endDateString.split('-');
|
||||||
var endTime = endTimeString.split(':');
|
var endTime = endTimeString.split(':');
|
||||||
var endDateTime = new Date(endDate[0], parseInt(endDate[1], 10)-1, endDate[2], endTime[0], endTime[1], 0, 0);
|
var endDateTime = new Date(endDate[0], parseInt(endDate[1], 10)-1, endDate[2], endTime[0], endTime[1], 0, 0);
|
||||||
|
|
||||||
if(startDateTime.getTime() >= endDateTime.getTime()){
|
if(startDateTime.getTime() >= endDateTime.getTime()){
|
||||||
var duration = $('#add_show_duration').val();
|
var duration = $('#add_show_duration').val();
|
||||||
// parse duration
|
// parse duration
|
||||||
var time = 0;
|
var time = 0;
|
||||||
var info = duration.split(' ');
|
var info = duration.split(' ');
|
||||||
var h = parseInt(info[0], 10);
|
var h = parseInt(info[0], 10);
|
||||||
time += h * 60 * 60* 1000;
|
time += h * 60 * 60* 1000;
|
||||||
if(info.length >1 && $.trim(info[1]) !== ''){
|
if(info.length >1 && $.trim(info[1]) !== ''){
|
||||||
var m = parseInt(info[1], 10);
|
var m = parseInt(info[1], 10);
|
||||||
time += m * 60 * 1000;
|
time += m * 60 * 1000;
|
||||||
}
|
}
|
||||||
endDateTime = new Date(startDateTime.getTime() + time);
|
endDateTime = new Date(startDateTime.getTime() + time);
|
||||||
}
|
}
|
||||||
|
|
||||||
var endDateFormat = endDateTime.getFullYear() + '-' + pad(endDateTime.getMonth()+1,2) + '-' + pad(endDateTime.getDate(),2);
|
var endDateFormat = endDateTime.getFullYear() + '-' + pad(endDateTime.getMonth()+1,2) + '-' + pad(endDateTime.getDate(),2);
|
||||||
var endTimeFormat = pad(endDateTime.getHours(),2) + ':' + pad(endDateTime.getMinutes(),2);
|
var endTimeFormat = pad(endDateTime.getHours(),2) + ':' + pad(endDateTime.getMinutes(),2);
|
||||||
|
|
||||||
$('#add_show_end_date_no_repeat').val(endDateFormat);
|
$('#add_show_end_date_no_repeat').val(endDateFormat);
|
||||||
$('#add_show_end_time').val(endTimeFormat);
|
$('#add_show_end_time').val(endTimeFormat);
|
||||||
|
|
||||||
// calculate duration
|
// calculate duration
|
||||||
var startDateTimeString = startDateString + " " + startTimeString;
|
var startDateTimeString = startDateString + " " + startTimeString;
|
||||||
var endDateTimeString = $('#add_show_end_date_no_repeat').val() + " " + $('#add_show_end_time').val();
|
var endDateTimeString = $('#add_show_end_date_no_repeat').val() + " " + $('#add_show_end_time').val();
|
||||||
var timezone = $("#add_show_timezone").val();
|
var timezone = $("#add_show_timezone").val();
|
||||||
calculateDuration(startDateTimeString, endDateTimeString, timezone);
|
calculateDuration(startDateTimeString, endDateTimeString, timezone);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// when end date/time changes, check if the changed date is in past of start date/time
|
// when end date/time changes, check if the changed date is in past of start date/time
|
||||||
$('#add_show_end_date_no_repeat, #add_show_end_time').bind('input', 'change', function(){
|
$('#add_show_end_date_no_repeat, #add_show_end_time').bind('input', 'change', function(){
|
||||||
var endDateString = $('#add_show_end_date_no_repeat').val();
|
var endDateString = $('#add_show_end_date_no_repeat').val();
|
||||||
var endTimeString = $('#add_show_end_time').val()
|
var endTimeString = $('#add_show_end_time').val()
|
||||||
|
|
||||||
if(regDate.test(endDateString) && regTime.test(endTimeString)){
|
if(regDate.test(endDateString) && regTime.test(endTimeString)){
|
||||||
var startDateString = $('#add_show_start_date').val();
|
var startDateString = $('#add_show_start_date').val();
|
||||||
var startTimeString = $('#add_show_start_time').val();
|
var startTimeString = $('#add_show_start_time').val();
|
||||||
|
@ -727,21 +743,21 @@ function setAddShowEvents(form) {
|
||||||
var endTime = endTimeString.split(':');
|
var endTime = endTimeString.split(':');
|
||||||
var endDateTime = new Date(endDate[0], parseInt(endDate[1], 10)-1, endDate[2], endTime[0], endTime[1], 0, 0);
|
var endDateTime = new Date(endDate[0], parseInt(endDate[1], 10)-1, endDate[2], endTime[0], endTime[1], 0, 0);
|
||||||
|
|
||||||
if(startDateTime.getTime() > endDateTime.getTime()){
|
if(startDateTime.getTime() > endDateTime.getTime()){
|
||||||
$('#add_show_end_date_no_repeat').css('background-color', '#F49C9C');
|
$('#add_show_end_date_no_repeat').css('background-color', '#F49C9C');
|
||||||
$('#add_show_end_time').css('background-color', '#F49C9C');
|
$('#add_show_end_time').css('background-color', '#F49C9C');
|
||||||
}else{
|
}else{
|
||||||
$('#add_show_end_date_no_repeat').css('background-color', '');
|
$('#add_show_end_date_no_repeat').css('background-color', '');
|
||||||
$('#add_show_end_time').css('background-color', '');
|
$('#add_show_end_time').css('background-color', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate duration
|
// calculate duration
|
||||||
var startDateTimeString = startDateString + " " + startTimeString;
|
var startDateTimeString = startDateString + " " + startTimeString;
|
||||||
var endDateTimeString = endDateString + " " + endTimeString;
|
var endDateTimeString = endDateString + " " + endTimeString;
|
||||||
var timezone = $("#add_show_timezone").val();
|
var timezone = $("#add_show_timezone").val();
|
||||||
calculateDuration(startDateTimeString, endDateTimeString, timezone);
|
calculateDuration(startDateTimeString, endDateTimeString, timezone);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if($('#cb_custom_auth').attr('checked')){
|
if($('#cb_custom_auth').attr('checked')){
|
||||||
$('#custom_auth_div').show()
|
$('#custom_auth_div').show()
|
||||||
|
@ -757,18 +773,18 @@ function setAddShowEvents(form) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function calculateDuration(startDateTime, endDateTime, timezone){
|
function calculateDuration(startDateTime, endDateTime, timezone){
|
||||||
var loadingIcon = $('#icon-loader-small');
|
var loadingIcon = $('#icon-loader-small');
|
||||||
|
|
||||||
loadingIcon.show();
|
loadingIcon.show();
|
||||||
$.post(
|
$.post(
|
||||||
baseUrl+"Schedule/calculate-duration",
|
baseUrl+"Schedule/calculate-duration",
|
||||||
{startTime: startDateTime, endTime: endDateTime, timezone: timezone},
|
{startTime: startDateTime, endTime: endDateTime, timezone: timezone},
|
||||||
function(data) {
|
function(data) {
|
||||||
$('#add_show_duration').val(JSON.parse(data));
|
$('#add_show_duration').val(JSON.parse(data));
|
||||||
loadingIcon.hide();
|
loadingIcon.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var bgColorEle = $("#add_show_background_color");
|
var bgColorEle = $("#add_show_background_color");
|
||||||
var textColorEle = $("#add_show_color");
|
var textColorEle = $("#add_show_color");
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"sProcessing": "処理中...",
|
||||||
|
"sLengthMenu": "_MENU_ 件表示",
|
||||||
|
"sZeroRecords": "データはありません。",
|
||||||
|
"sInfo": " _TOTAL_ 件中 _START_ から _END_ まで表示",
|
||||||
|
"sInfoEmpty": " 0 件中 0 から 0 まで表示",
|
||||||
|
"sInfoFiltered": "(全 _MAX_ 件より抽出)",
|
||||||
|
"sInfoPostFix": "",
|
||||||
|
"sSearch": "検索:",
|
||||||
|
"sUrl": "",
|
||||||
|
"oPaginate": {
|
||||||
|
"sFirst": "先頭",
|
||||||
|
"sPrevious": "前",
|
||||||
|
"sNext": "次",
|
||||||
|
"sLast": "最終"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"sProcessing": "処理中...",
|
||||||
|
"sLengthMenu": "_MENU_ 件表示",
|
||||||
|
"sZeroRecords": "データはありません。",
|
||||||
|
"sInfo": " _TOTAL_ 件中 _START_ から _END_ まで表示",
|
||||||
|
"sInfoEmpty": " 0 件中 0 から 0 まで表示",
|
||||||
|
"sInfoFiltered": "(全 _MAX_ 件より抽出)",
|
||||||
|
"sInfoPostFix": "",
|
||||||
|
"sSearch": "検索:",
|
||||||
|
"sUrl": "",
|
||||||
|
"oPaginate": {
|
||||||
|
"sFirst": "先頭",
|
||||||
|
"sPrevious": "前",
|
||||||
|
"sNext": "次",
|
||||||
|
"sLast": "最終"
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,10 +29,6 @@ echo "----------------------------------------------------"
|
||||||
|
|
||||||
dist=`lsb_release -is`
|
dist=`lsb_release -is`
|
||||||
code=`lsb_release -cs`
|
code=`lsb_release -cs`
|
||||||
set +e
|
|
||||||
apache2 -v | grep "2\.4" > /dev/null
|
|
||||||
apacheversion=$?
|
|
||||||
set -e
|
|
||||||
|
|
||||||
#enable squeeze backports to get lame packages
|
#enable squeeze backports to get lame packages
|
||||||
if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then
|
if [ "$dist" = "Debian" -a "$code" = "squeeze" ]; then
|
||||||
|
@ -130,21 +126,27 @@ if [ "$server" = "nginx" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
apt-get -y --force-yes install apache2 libapache2-mod-php5
|
apt-get -y --force-yes install apache2 libapache2-mod-php5
|
||||||
|
set +e
|
||||||
|
apache2 -v | grep "2\.4" > /dev/null
|
||||||
|
apacheversion=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
|
||||||
# Apache Config File
|
# Apache Config File
|
||||||
echo "----------------------------------------------------"
|
echo "----------------------------------------------------"
|
||||||
echo "2.1 Apache Config File"
|
echo "2.1 Apache Config File"
|
||||||
echo "----------------------------------------------------"
|
echo "----------------------------------------------------"
|
||||||
|
|
||||||
if [ "$apacheversion" != "1" ]; then
|
if [ "$apacheversion" != "1" ]; then
|
||||||
airtimeconfigfile="airtime.conf"
|
airtimeconfigfile="airtime.conf"
|
||||||
else
|
else
|
||||||
airtimeconfigfile="airtime"
|
airtimeconfigfile="airtime"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /etc/apache2/sites-available/$airtimeconfigfile ]; then
|
if [ ! -f /etc/apache2/sites-available/$airtimeconfigfile ]; then
|
||||||
echo "Creating Apache config for Airtime..."
|
echo "Creating Apache config for Airtime..."
|
||||||
|
|
||||||
cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/$airtimeconfigfile
|
cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/$airtimeconfigfile
|
||||||
a2dissite 000-default
|
a2dissite 000-default
|
||||||
a2ensite airtime
|
a2ensite airtime
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,196 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Account Plans</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table cellpadding="1" cellspacing="1" border="1">
|
|
||||||
<thead>
|
|
||||||
<tr><td rowspan="1" colspan="3">Account Plans</td></tr>
|
|
||||||
</thead><tbody>
|
|
||||||
<tr>
|
|
||||||
<td>open</td>
|
|
||||||
<td>/billing/upgrade</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>clickAndWait</td>
|
|
||||||
<td>link=Account Plans</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=hobbyist_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=starter_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=plus_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=premium_grid_price</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=hobbyist_grid_price</td>
|
|
||||||
<td>$9.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=starter_grid_price</td>
|
|
||||||
<td>$39.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=plus_grid_price</td>
|
|
||||||
<td>$64.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyText</td>
|
|
||||||
<td>id=premium_grid_price</td>
|
|
||||||
<td>$99.95 / month</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=current_plan</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductbillingcycle-monthly</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductbillingcycle-annually</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-25</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-26</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-27</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=newproductid-28</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>css=span.subtotal</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=firstname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=lastname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=companyname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=email</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=address1</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=address2</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=city</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=state</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=postcode</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=country</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=phonenumber</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=securityqid</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=securityqans</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=customfields-7</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=customfields-71</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>id=paymentmethod-paypal</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>//div[@id='total_box']/b[2]</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>verifyElementPresent</td>
|
|
||||||
<td>css=input[type="submit"]</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody></table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Add Media Skeleton Present</title>
|
<title>Add Media Skeleton Present</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Calendar Add Show Skeleton</title>
|
<title>Calendar Add Show Skeleton</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Calendar Day Week Month Views</title>
|
<title>Calendar Day Week Month Views</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Calendar Skeleton Present</title>
|
<title>Calendar Skeleton Present</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Library Skeleton Present</title>
|
<title>Library Skeleton Present</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Listen Button Skeleton</title>
|
<title>Listen Button Skeleton</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Login and Logout</title>
|
<title>Login and Logout</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Login</title>
|
<title>Login</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>Preferences Skeletons</title>
|
<title>Preferences Skeletons</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
|
|
||||||
<title>System Menu Contents</title>
|
<title>System Menu Contents</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in New Issue