diff --git a/app/assets/javascripts/user/application.js.erb b/app/assets/javascripts/user/application.js.erb index be129448..63c7c024 100644 --- a/app/assets/javascripts/user/application.js.erb +++ b/app/assets/javascripts/user/application.js.erb @@ -145,10 +145,15 @@ function getUrlVars() { return $url_vars; } $(function(){ - if(getUrlVars().message){ - var container = $('.alert-success div'); - container.text($translations[$locale]['messages'][getUrlVars().message] || ('Message ' + getUrlVars().message + ' not found')); + var container = $('.alert-success'); + container.find('div').text($translations[$locale]['messages'][getUrlVars().message] || ('Message ' + getUrlVars().message + ' not found')); 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')))}) }); diff --git a/app/views/layouts/phone.html.slim b/app/views/layouts/phone.html.slim index 2f6ecc3f..8201c953 100644 --- a/app/views/layouts/phone.html.slim +++ b/app/views/layouts/phone.html.slim @@ -17,9 +17,9 @@ html lang="en" link href="/images/apple-touch-icon.png" rel="apple-touch-icon-precomposed" link href="/favicon.ico" rel="shortcut icon" 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://192.168.1.74:3000'; + //var data_host = 'http://192.168.1.74:3000'; var $locale = '#{I18n.locale}'; var $url_vars = null; // Dummy holder when Qmobile object is not supplied by the mobile phone @@ -65,13 +65,9 @@ html lang="en" .row .span12 = yield - /! + / 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" = yield :footer - javascript: - $(function(){ - $('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))}) - });