Try the mobile interface link in site

This commit is contained in:
mdipierro
2012-10-05 10:38:58 -05:00
parent 41d234bf48
commit 231a3e1278
6 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-10-05 10:24:10) dev
Version 2.0.9 (2012-10-05 10:38:54) dev
+2 -2
View File
@@ -147,8 +147,8 @@ if request.controller == "webservices":
time.sleep(10)
raise HTTP(403,"Not authorized")
elif not session.authorized and not \
(request.controller == 'default' and \
request.function in ('index','user')):
(request.controller+'/'+request.function in
('default/index','default/user','plugin_jqmobile/index','plugin_jqmobile/about')):
if request.env.query_string:
query_string = '?' + request.env.query_string
@@ -11,6 +11,7 @@
<tr><td>{{=T('Administrator Password:')}}</td><td><input type="password" name="password" id="password"/></td></tr>
<tr><td></td><td><button name="login">{{=T('Login')}}</button></td></tr>
</table>
<input type="hidden" name="is_mobile" value="true"/>
</form>
</div>
{{else:}}
@@ -86,7 +86,7 @@ $(document).bind("mobileinit", function(){
<a rel="external" href="{{=URL('default','user',args='logout')}}" data-icon="logout" class="ui-btn-left">Logout</a>
{{pass}}
{{pass}}
<a rel="external" href="{{=URL('default','index')}}" data-icon="home" class="ui-btn-right">{{=T("Home")}}</a>
<a rel="external" href="{{=URL('default','index',vars=dict(is_mobile='true'))}}" data-icon="home" class="ui-btn-right">{{=T("Home")}}</a>
{{end}}
</div>
<div data-role="content">
@@ -76,6 +76,9 @@
<p>
{{=T("Running on %s", request.env.server_software)}}
</p>
{{if session.is_mobile=='auto':}}<p>
{{=A(T('Try the mobile interface'),_href=URL('plugin_jqmobile','about'))}}</p>
{{pass}}
</div>
{{pass}}
<!-- MULTI_USER_INTERFACE -->
@@ -34,7 +34,7 @@
</style>
</head>
<body>
<iframe src="{{=URL('index')}}"></iframe>
<iframe src="{{=URL('default','index',vars=dict(is_mobile='true'))}}"></iframe>
<div id="about">
<h1><a href="http://web2py.com">web2py</a> plugin</h1>
<h2>for <a href="http://jquerymobile.com/">jQuery Mobile</a></h2>