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

This commit is contained in:
Martin Konecny 2013-01-25 11:31:05 -05:00
commit a14d99d87b
4 changed files with 4 additions and 7 deletions

View File

@ -4,10 +4,6 @@ class LocaleController extends Zend_Controller_Action
{
public function init()
{
$ajaxContext = $this->_helper->getHelper("AjaxContext");
$ajaxContext->addActionContext("general-translation-table", "json")
->addActionContext("datatables-translation-table", "json")
->initContext();
}
public function datatablesTranslationTableAction()
@ -26,7 +22,7 @@ class LocaleController extends Zend_Controller_Action
$locale.".txt")
);
}
public function generalTranslationTableAction()
{
$translations = array (

View File

@ -110,7 +110,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
{
$controller = strtolower($request->getControllerName());
if (in_array($controller, array("api", "auth"))) {
if (in_array($controller, array("api", "auth", "locale"))) {
$this->setRoleName("G");
} elseif (!Zend_Auth::getInstance()->hasIdentity()) {

View File

@ -1,6 +1,6 @@
$(window).load(function(){
$("#username").focus();
$("#locale").val($.cookie("airtime_locale")!== null?$.cookie("airtime_locale"):'en_CA');
$("#locale").val($.cookie("airtime_locale")!== null?$.cookie("airtime_locale"):$.cookie("default_airtime_locale"));
});
$(document).ready(function() {

View File

@ -111,6 +111,7 @@ $(document).ready(function() {
$.post(url, {format: "json", data: data}, function(data){
var json = $.parseJSON(data);
$('#content').empty().append(json.html);
$.cookie("default_airtime_locale", $('#locale').val(), {path: '/'});
setTimeout(removeSuccessMsg, 5000);
showErrorSections();
});