diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php index b40c5e748..7d83a165e 100644 --- a/airtime_mvc/application/controllers/LocaleController.php +++ b/airtime_mvc/application/controllers/LocaleController.php @@ -6,7 +6,7 @@ class LocaleController extends Zend_Controller_Action public function init() { } - + public function datatablesTranslationTableAction() { $this->view->layout()->disableLayout(); diff --git a/airtime_mvc/application/controllers/LoginController.php b/airtime_mvc/application/controllers/LoginController.php index fa6ea36bb..1de9e106e 100644 --- a/airtime_mvc/application/controllers/LoginController.php +++ b/airtime_mvc/application/controllers/LoginController.php @@ -16,15 +16,16 @@ class LoginController extends Zend_Controller_Action $request = $this->getRequest(); $response = $this->getResponse(); + $stationLocale = Application_Model_Preference::GetDefaultLocale(); //Enable AJAX requests from www.airtime.pro for the sign-in process. CORSHelper::enableATProCrossOriginRequests($request, $response); - Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA')); + + Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', $stationLocale)); $auth = Zend_Auth::getInstance(); - if ($auth->hasIdentity()) - { + if ($auth->hasIdentity()) { $this->_redirect('Showbuilder'); } @@ -130,7 +131,9 @@ class LoginController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/airtime/login/password-restore.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $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()) { $this->_redirect('login'); @@ -174,7 +177,9 @@ class LoginController extends Zend_Controller_Action public function passwordRestoreAfterAction() { $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. $this->_helper->layout->setLayout('login'); @@ -192,8 +197,10 @@ class LoginController extends Zend_Controller_Action $form = new Application_Form_PasswordChange(); $auth = new Application_Model_Auth(); $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 if (!$auth->checkToken($user_id, $token, 'password.restore')) { diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index e1f2846ca..51ac869e7 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -73,12 +73,6 @@ class UserController extends Zend_Controller_Action $user->setJabber($formData['jabber']); $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(); $this->view->form = $form; @@ -87,7 +81,7 @@ class UserController extends Zend_Controller_Action } else { $this->view->successMessage = "
jPlayer events that have occurred over the past 1 second:'
+ + '
(Backgrounds: Never occurred Occurred before Occurred Multiple occurrences reset)
Update jPlayer Inspector
' + + '' + + 'This jPlayer instance is running in your browser where:
"
+
+ for(i = 0; i < $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions.length; i++) {
+ var solution = $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions[i];
+ jPlayerInfo += " jPlayer's " + solution + " solution is";
+ if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].used) {
+ jPlayerInfo += " being used and will support:";
+ for(format in $(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support) {
+ if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support[format]) {
+ jPlayerInfo += " " + format;
+ }
+ }
+ jPlayerInfo += "
";
+ } else {
+ jPlayerInfo += " not required
";
+ }
+ }
+ jPlayerInfo += "
status.formatType = '" + formatType + "'
";
+ if(formatType) {
+ jPlayerInfo += "Browser canPlay('" + $.jPlayer.prototype.format[formatType].codec + "')
";
+ } else {
+ jPlayerInfo += "
status.src = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src + "'
status.media = {
";
+ for(prop in $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media) {
+ jPlayerInfo += " " + prop + ": " + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop] + "
"; // Some are strings
+ }
+ jPlayerInfo += "};
";
+ jPlayerInfo += "status.videoWidth = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth + "'
";
+ jPlayerInfo += " | status.videoHeight = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight + "'
";
+ jPlayerInfo += "status.width = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width + "'
";
+ jPlayerInfo += " | status.height = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height + "'
";
+ jPlayerInfo += "
Raw browser test for HTML5 support. Should equal a function if HTML5 is available.
";
+ if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.audio.available) {
+ jPlayerInfo += "htmlElement.audio.canPlayType = " + (typeof $(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType) +"
"
+ }
+ if($(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.video.available) {
+ jPlayerInfo += "htmlElement.video.canPlayType = " + (typeof $(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType) +"
";
+ }
+ jPlayerInfo += "
This instance is using the constructor options:
"
+ + "$('#" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id + "').jPlayer({
"
+
+ + " swfPath: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "swfPath") + "',
"
+
+ + " solution: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "solution") + "',
"
+
+ + " supplied: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "supplied") + "',
"
+
+ + " preload: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "preload") + "',
"
+
+ + " volume: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "volume") + ",
"
+
+ + " muted: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "muted") + ",
"
+
+ + " backgroundColor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "backgroundColor") + "',
"
+
+ + " cssSelectorAncestor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelectorAncestor") + "',
"
+
+ + " cssSelector: {";
+
+ var cssSelector = $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector");
+ for(prop in cssSelector) {
+
+ // jPlayerInfo += "
" + prop + ": '" + cssSelector[prop] + "'," // This works too of course, but want to use option method for deep keys.
+ jPlayerInfo += "
" + prop + ": '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector." + prop) + "',"
+ }
+
+ jPlayerInfo = jPlayerInfo.slice(0, -1); // Because the sloppy comma was bugging me.
+
+ jPlayerInfo += "
},
"
+
+ + " errorAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "errorAlerts") + ",
"
+
+ + " warningAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "warningAlerts") + "
"
+
+ + "});
jPlayer is " + + ($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused ? "paused" : "playing") + + " at time: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime*10)/10 + "s." + + " (d: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration*10)/10 + "s" + + ", sp: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent) + "%" + + ", cpr: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative) + "%" + + ", cpa: " + Math.floor($(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute) + "%)
" + ); + return this; + } + }; + $.fn.jPlayerInspector = function( method ) { + // Method calling logic + if ( methods[method] ) { + return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 )); + } else if ( typeof method === 'object' || ! method ) { + return methods.init.apply( this, arguments ); + } else { + $.error( 'Method ' + method + ' does not exist on jQuery.jPlayerInspector' ); + } + }; +})(jQuery); diff --git a/airtime_mvc/public/js/jplayer/jquery.jplayer.min.js b/airtime_mvc/public/js/jplayer/jquery.jplayer.min.js index 796e970e2..f7acb7704 100644 --- a/airtime_mvc/public/js/jplayer/jquery.jplayer.min.js +++ b/airtime_mvc/public/js/jplayer/jquery.jplayer.min.js @@ -2,113 +2,119 @@ * jPlayer Plugin for jQuery JavaScript Library * http://www.jplayer.org * - * Copyright (c) 2009 - 2013 Happyworm Ltd + * Copyright (c) 2009 - 2014 Happyworm Ltd * Licensed under the MIT license. * http://opensource.org/licenses/MIT * * Author: Mark J Panaghiston - * Version: 2.5.0 - * Date: 7th November 2013 + * Version: 2.7.0 + * Date: 1st September 2014 */ (function(b,f){"function"===typeof define&&define.amd?define(["jquery"],f):b.jQuery?f(b.jQuery):f(b.Zepto)})(this,function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this;a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b(this).data("jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b(this).data("jPlayer");c?c.option(a|| {}):b(this).data("jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};"function"!==typeof b.fn.stop&&(b.fn.stop=function(){});b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent= -"ready flashreset resize repeat error warning";b.jPlayer.event={};b.each("ready flashreset resize repeat click error warning loadstart progress suspend abort emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange".split(" "),function(){b.jPlayer.event[this]="jPlayer_"+this});b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough".split(" ");b.jPlayer.pause= -function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var m=function(){this.init()};m.prototype={init:function(){this.options={timeFormat:b.jPlayer.timeFormat}},time:function(a){var c=new Date(1E3*(a&&"number"===typeof a?a:0)),b=c.getUTCHours();a=this.options.timeFormat.showHour?c.getUTCMinutes():c.getUTCMinutes()+60* -b;c=this.options.timeFormat.showMin?c.getUTCSeconds():c.getUTCSeconds()+60*a;b=this.options.timeFormat.padHour&&10>b?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var n=new m;b.jPlayer.convertTime=function(a){return n.time(a)}; +"ready flashreset resize repeat error warning";b.jPlayer.event={};b.each("ready setmedia flashreset resize repeat click error warning loadstart progress suspend abort emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange".split(" "),function(){b.jPlayer.event[this]="jPlayer_"+this});b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough".split(" "); +b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var l=function(){this.init()};l.prototype={init:function(){this.options={timeFormat:b.jPlayer.timeFormat}},time:function(a){var c=new Date(1E3*(a&&"number"===typeof a?a:0)),b=c.getUTCHours();a=this.options.timeFormat.showHour?c.getUTCMinutes():c.getUTCMinutes()+ +60*b;c=this.options.timeFormat.showMin?c.getUTCSeconds():c.getUTCSeconds()+60*a;b=this.options.timeFormat.padHour&&10>b?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var n=new l;b.jPlayer.convertTime=function(a){return n.time(a)}; b.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var c=a.toLowerCase(),b=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(c)||[];c=/(ipad|playbook)/.exec(c)||!e.exec(c)&&b.exec(c)|| [];a[1]&&(a[1]=a[1].replace(/\s/g,"_"));return{platform:a[1]||"",tablet:c[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var k=b.jPlayer.uaBrowser(navigator.userAgent);k.browser&&(b.jPlayer.browser[k.browser]=!0,b.jPlayer.browser.version=k.version);k=b.jPlayer.uaPlatform(navigator.userAgent);k.platform&&(b.jPlayer.platform[k.platform]=!0,b.jPlayer.platform.mobile=!k.tablet,b.jPlayer.platform.tablet=!!k.tablet);b.jPlayer.getDocMode=function(){var a;b.jPlayer.browser.msie&&(document.documentMode? a=document.documentMode:(a=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(a=7)));return a};b.jPlayer.browser.documentMode=b.jPlayer.getDocMode();b.jPlayer.nativeFeatures={init:function(){var a=document,c=a.createElement("video"),b={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "), webkit:" webkitCurrentFullScreenElement webkitRequestFullScreen webkitCancelFullScreen webkitfullscreenchange ".split(" "),webkitVideo:"webkitSupportsFullscreen webkitDisplayingFullscreen webkitEnterFullscreen webkitExitFullscreen ".split(" ")},e=["w3c","moz","webkit","webkitVideo"],g,h;this.fullscreen=c={support:{w3c:!!a[b.w3c[0]],moz:!!a[b.moz[0]],webkit:"function"===typeof a[b.webkit[3]],webkitVideo:"function"===typeof c[b.webkitVideo[2]]},used:{}};g=0;for(h=e.length;g