Better user specs for joining tables

This commit is contained in:
2013-12-09 10:01:06 +01:00
parent afb30556bd
commit 087cfa639d
15 changed files with 159 additions and 16 deletions
@@ -154,7 +154,8 @@ String.prototype.capitalize = function() {
function t(path, vars){
vars || (vars = {});
var parts = path.split('.');
var accessor = '$translations.'+$locale+'["' + parts.join('"]["')+ '"]';
var locale = Qstorage.getItem('locale') || 'en';
var accessor = '$translations.'+locale+'["' + parts.join('"]["')+ '"]';
var result;
try{
result = eval(accessor);
@@ -175,7 +176,6 @@ $.ajaxSetup({
}
});
$(function(){
$locale = Qstorage.getItem('locale') || 'en';
if(Qstorage.getItem('message')){
var container = $('.alert-success');
var msg_finder = Qstorage.getItem('message');
@@ -186,7 +186,7 @@ $(function(){
}
if(Qstorage.getItem('list_closed')){
var container = $('.alert-error');
container.find('div').text($translations[$locale]['messages']['the_list_has_been_closed']);
container.find('div').text(t('messages.the_list_has_been_closed'));
container.show();
Qstorage.removeItem('list_closed');
}
@@ -194,7 +194,6 @@ $(function(){
});
function setLocale(locale){
Qstorage.setItem('locale', locale);
$locale = locale;
setTranslations();
}
function Qupdate(selector){
@@ -202,8 +201,9 @@ function Qupdate(selector){
}
function setTranslations(selector){
var list = $('#top-navigation-list');
var locale = Qstorage.getItem('locale');
list.find('.locale').show();
list.find('.locale-'+$locale).hide();
list.find('.locale-'+locale).hide();
if(selector){
$(selector).find('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
}else{