first evented steps

This commit is contained in:
2012-11-27 15:31:31 +01:00
parent e65dc584a4
commit 3da9dc68d7
9 changed files with 53 additions and 24 deletions
+8 -2
View File
@@ -11,6 +11,7 @@ html lang="en"
/[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
= stylesheet_link_tag "user/application", :media => "all"
= javascript_include_tag 'http://localhost:9292/faye.js'
link href="/images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144"
link href="/images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114"
link href="/images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72"
@@ -31,6 +32,7 @@ html lang="en"
authentication_string: function(){return this.authentication_string_storage || ''},
authentication_object: function(){return this.authentication_object_storage || '{}'},
setAuthToken: function(token){
this.auth_token = token;
this.authentication_string_storage = 'auth_token='+token;
this.authentication_object_storage = '{"auth_token": "'+token+'"}'
},
@@ -39,9 +41,13 @@ html lang="en"
goHome: function(){ redirect_to('user_root')},
connection_problem: function(){alert('There is a problem connecting to the server')},
locale: function(){ return $locale || ($locale = 'en')},
setLocale: function(locale){$locale = locale; return locale}
setLocale: function(locale){$locale = locale; return locale},
token: function(){return this.auth_token},
setUserId: function(id){ this.stored_user_id = id},
user_id: function(){return this.stored_user_id }
});
//QMobile.setAuthToken('i5brDZ1HS1okoEq3pMyh');
QMobile.setAuthToken('#{current_user.authentication_token}');
QMobile.setUserId('#{current_user.id}');
body class=action_name
.navbar.navbar-fixed-top