fix closed list

This commit is contained in:
2012-10-30 15:02:51 +01:00
parent b952a10f64
commit 3580b8a89e
2 changed files with 12 additions and 11 deletions
@@ -145,10 +145,15 @@ function getUrlVars() {
return $url_vars; return $url_vars;
} }
$(function(){ $(function(){
if(getUrlVars().message){ if(getUrlVars().message){
var container = $('.alert-success div'); var container = $('.alert-success');
container.text($translations[$locale]['messages'][getUrlVars().message] || ('Message ' + getUrlVars().message + ' not found')); container.find('div').text($translations[$locale]['messages'][getUrlVars().message] || ('Message ' + getUrlVars().message + ' not found'));
container.show(); container.show();
} }
if(getUrlVars().list_closed){
var container = $('.alert-error');
container.find('div').text($translations[$locale]['messages']['the_list_has_been_closed']);
container.show();
}
$('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
}); });
+4 -8
View File
@@ -17,9 +17,9 @@ html lang="en"
link href="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed" link href="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed"
link href="/favicon.ico" rel="shortcut icon" link href="/favicon.ico" rel="shortcut icon"
javascript: javascript:
//var data_host = 'http://data.qwaiter.com'; var data_host = 'http://data.qwaiter.com';
//var data_host = 'http://localhost:3000'; //var data_host = 'http://localhost:3000';
var data_host = 'http://192.168.1.74:3000'; //var data_host = 'http://192.168.1.74:3000';
var $locale = '#{I18n.locale}'; var $locale = '#{I18n.locale}';
var $url_vars = null; var $url_vars = null;
// Dummy holder when Qmobile object is not supplied by the mobile phone // Dummy holder when Qmobile object is not supplied by the mobile phone
@@ -65,13 +65,9 @@ html lang="en"
.row .row
.span12 .span12
= yield = yield
/! /
Javascripts Javascripts
\================================================== \==================================================
/! Placed at the end of the document so the pages load faster / Placed at the end of the document so the pages load faster
= javascript_include_tag "user/application" = javascript_include_tag "user/application"
= yield :footer = yield :footer
javascript:
$(function(){
$('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
});