fix message handling for mobile

This commit is contained in:
2012-10-30 14:14:27 +01:00
parent 28ec047f1d
commit b952a10f64
5 changed files with 106 additions and 20 deletions
+11 -12
View File
@@ -17,18 +17,19 @@ 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.240: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
var QMobile, Qwaiter, Quser;
QMobile || (QMobile = {
scanQr: function(){window.location = '/select_qrcode'},
activateRotation: function(){},
mobile: function(){return false},
authentication_string: function(){return this.authentication_string_storage},
authentication_object: function(){return this.authentication_object_storage},
authentication_string: function(){return this.authentication_string_storage || ''},
authentication_object: function(){return this.authentication_object_storage || '{}'},
setAuthToken: function(token){
this.authentication_string_storage = 'auth_token='+token;
this.authentication_object_storage = '{"auth_token": "'+token+'"}'
@@ -55,14 +56,12 @@ html lang="en"
.container
.content
- if flash[:alert].present?
.alert.alert-error
a.close data-dismiss="alert" ×
div= flash[:alert]
- if flash[:notice].present?
.alert.alert-success
a.close data-dismiss="alert" ×
div= flash[:notice]
.alert.alert-error.hide
button.close type="button" data-dismiss="alert" ×
div= flash[:alert]
.alert.alert-success.hide
button.close type="button" data-dismiss="alert" ×
div
.row
.span12
= yield