diff --git a/addons/web_mobile/static/src/js/chrome_mobile.js b/addons/web_mobile/static/src/js/chrome_mobile.js index ba467c5e19d..f0dca83b745 100644 --- a/addons/web_mobile/static/src/js/chrome_mobile.js +++ b/addons/web_mobile/static/src/js/chrome_mobile.js @@ -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); } }); diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index f31742d9760..269dd435406 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -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); }); }); }, diff --git a/addons/web_mobile/static/src/js/list_mobile.js b/addons/web_mobile/static/src/js/list_mobile.js index d7e7918afbe..ebf31b6d4fd 100644 --- a/addons/web_mobile/static/src/js/list_mobile.js +++ b/addons/web_mobile/static/src/js/list_mobile.js @@ -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) { diff --git a/addons/web_mobile/static/src/web_mobile.html b/addons/web_mobile/static/src/web_mobile.html index 9a17ff49dbb..678adc6f735 100755 --- a/addons/web_mobile/static/src/web_mobile.html +++ b/addons/web_mobile/static/src/web_mobile.html @@ -4,15 +4,11 @@