[IMP] Add HashUrl for Back button action.
bzr revid: jra@tinyerp.com-20110920123757-87thdg8lm3mpemth
This commit is contained in:
parent
f918b47dcc
commit
388d96e759
|
@ -119,7 +119,7 @@ openerp.web_mobile.Shortcuts = openerp.web.Widget.extend({
|
|||
|
||||
self.$element.find("[data-role=header]").find('h1').html('Favourite');
|
||||
self.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
self.$element.find('#content').find("a").click(self.on_clicked);
|
||||
self.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -177,7 +177,7 @@ openerp.web_mobile.Menu = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -186,11 +186,11 @@ openerp.web_mobile.Menu = openerp.web.Widget.extend({
|
|||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
this.$element.add(this.$secondary_menu).find("#content").find('a').click(this.on_menu_click);
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
var $menu = $(ev.currentTarget);
|
||||
|
@ -234,7 +234,7 @@ openerp.web_mobile.Secondary = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -243,14 +243,14 @@ openerp.web_mobile.Secondary = openerp.web.Widget.extend({
|
|||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
|
||||
$.mobile.changePage($("#oe_sec_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_sec_menu", "slide", true, true);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
var $menu = $(ev.currentTarget);
|
||||
|
@ -282,17 +282,17 @@ openerp.web_mobile.Options = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
this.$element.find("[data-role=content]").find('a').click(function(){
|
||||
this.$element.find("[data-role=content]").find('a#logout').click(function(){
|
||||
$('#oe_login').empty();
|
||||
window.location.replace('/mobile');
|
||||
});
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
|
||||
self.$element.find("[data-role=header]").find('h1').html(self.head_title);
|
||||
self.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
self.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
|
@ -52,7 +52,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
self.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -61,7 +61,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
self.$element.find('select').change(function(ev){
|
||||
|
@ -121,7 +121,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
$('#oe_list').html(QWeb.render("ListView", {'records' : res}));
|
||||
$('#oe_list').find("[data-role=header]").find('h1').html(head);
|
||||
$('#oe_list').find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
$('#oe_list').find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
|
@ -129,7 +129,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
$('#oe_list').find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -138,7 +138,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
$('#oe_list').find("a#list-id").click(function(ev){
|
||||
|
@ -174,7 +174,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
});
|
||||
$('#oe_form').find("[data-role=header]").find('h1').html(head_title);
|
||||
$('#oe_form').find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
$('#oe_form').find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
|
@ -182,7 +182,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
$('#oe_form').find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -191,19 +191,19 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
|||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
$.mobile.changePage($("#oe_form"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_form", "slide", true, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
$.mobile.changePage($("#oe_list"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_list", "slide", true, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$.mobile.changePage($("#oe_form"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_form", "slide", true, true);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -27,7 +27,7 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({
|
|||
self.$element.html(QWeb.render("ListView", {'records' : result}));
|
||||
self.$element.find("[data-role=header]").find('h1').html(self.action.name);
|
||||
self.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage($("#oe_menu"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
});
|
||||
self.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
|
@ -35,7 +35,7 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({
|
|||
this.shortcuts.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_shortcuts"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
}
|
||||
});
|
||||
self.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
|
@ -44,11 +44,11 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({
|
|||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage($("#oe_options"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
}
|
||||
});
|
||||
self.$element.find("a#list-id").click(self.on_list_click);
|
||||
$.mobile.changePage($("#oe_list"), "slide", true, true);
|
||||
$.mobile.changePage("#oe_list", "slide", true, true);
|
||||
});
|
||||
},
|
||||
on_list_click: function(ev) {
|
||||
|
|
|
@ -4,15 +4,11 @@
|
|||
<meta charset="utf-8" />
|
||||
<title>OpenERP Web Mobile</title>
|
||||
|
||||
<link rel="stylesheet" href="/web_mobile/static/lib/jquery_mobile/css/jquery.mobile-1.0a4.1.css"/>
|
||||
<link rel="stylesheet" href="/web_mobile/static/src/css/web_mobile.css"/>
|
||||
|
||||
<script type="text/javascript" src="/web/static/lib/jquery/jquery-1.6.2.js"></script>
|
||||
<script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.8.9.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js"></script>
|
||||
<script type="text/javascript" src="/web/static/lib/underscore/underscore.js"></script>
|
||||
<script type="text/javascript" src="/web/static/lib/underscore/underscore.string.js"></script>
|
||||
<script type="text/javascript" src="/web_mobile/static/lib/jquery_mobile/js/jquery.mobile-1.0a4.1.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/web/static/lib/qweb/qweb2.js"></script>
|
||||
<script type="text/javascript" src="/web/static/src/js/boot.js"></script>
|
||||
|
@ -26,6 +22,9 @@
|
|||
<script type="text/javascript" src="/web_mobile/static/src/js/list_mobile.js"></script>
|
||||
<script type="text/javascript" src="/web_mobile/static/src/js/form_mobile.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/web_mobile/static/lib/jquery_mobile/css/jquery.mobile-1.0a4.1.css"/>
|
||||
<link rel="stylesheet" href="/web_mobile/static/src/css/web_mobile.css"/>
|
||||
<script type="text/javascript" src="/web_mobile/static/lib/jquery_mobile/js/jquery.mobile-1.0a4.1.js"></script>
|
||||
<script type="text/javascript">
|
||||
var QWeb;
|
||||
$(function() {
|
||||
|
|
Loading…
Reference in New Issue