[FIX] Improved slide transition on change page.
bzr revid: jra@tinyerp.com-20110922123440-93ddlany5czr2sur
This commit is contained in:
@@ -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", false, true);
|
||||
});
|
||||
self.$element.find('#content').find("a").click(self.on_clicked);
|
||||
self.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
@@ -128,10 +128,10 @@ openerp.web_mobile.Shortcuts = openerp.web.Widget.extend({
|
||||
this.options.start();
|
||||
}
|
||||
else{
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", false, true);
|
||||
}
|
||||
});
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", true, true);
|
||||
$.mobile.changePage("#oe_shortcuts", "slide", false, true);
|
||||
});
|
||||
},
|
||||
on_clicked: function(ev) {
|
||||
@@ -147,7 +147,7 @@ openerp.web_mobile.Shortcuts = openerp.web.Widget.extend({
|
||||
this.listview = new openerp.web_mobile.ListView(self, "oe_list_"+res_id, res_id);
|
||||
this.listview.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_list_'+res_id, "slide", true, true);
|
||||
$.mobile.changePage('#oe_list_'+res_id, "slide", false, true);
|
||||
}
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
@@ -181,7 +181,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", false, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
@@ -190,11 +190,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", false, 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", false, true);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
var $menu = $(ev.currentTarget);
|
||||
@@ -215,7 +215,7 @@ openerp.web_mobile.Menu = openerp.web.Widget.extend({
|
||||
this.secondary = new openerp.web_mobile.Secondary(this, "oe_sec_menu_"+id, this.children);
|
||||
this.secondary.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_sec_menu_'+id, "slide", true, true);
|
||||
$.mobile.changePage('#oe_sec_menu_'+id, "slide", false, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -238,7 +238,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", false, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
@@ -247,14 +247,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", false, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", false, true);
|
||||
});
|
||||
|
||||
$.mobile.changePage("#"+this.element_id, "slide", true, true);
|
||||
$.mobile.changePage("#"+this.element_id, "slide", false, true);
|
||||
},
|
||||
on_menu_click: function(ev, id) {
|
||||
var $menu = $(ev.currentTarget);
|
||||
@@ -267,7 +267,7 @@ openerp.web_mobile.Secondary = openerp.web.Widget.extend({
|
||||
this.listview = new openerp.web_mobile.ListView(this, "oe_list_"+id, id);
|
||||
this.listview.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_list_'+id, "slide", true, true);
|
||||
$.mobile.changePage('#oe_list_'+id, "slide", false, true);
|
||||
}
|
||||
jQuery("#oe_header").find("h1").html($menu.data('name'));
|
||||
}
|
||||
@@ -285,17 +285,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", false, true);
|
||||
}
|
||||
});
|
||||
this.$element.find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", false, true);
|
||||
});
|
||||
this.$element.find("[data-role=content]").find('a').click(function(){
|
||||
$('#oe_login').empty();
|
||||
window.location.replace('/mobile');
|
||||
});
|
||||
$.mobile.changePage("#oe_options", "slide", true, true);
|
||||
$.mobile.changePage("#oe_options", "slide", false, true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -49,7 +49,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", false, true);
|
||||
});
|
||||
self.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
@@ -57,7 +57,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", false, true);
|
||||
}
|
||||
});
|
||||
self.$element.find("[data-role=footer]").find('#preference').click(function(){
|
||||
@@ -66,7 +66,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", false, true);
|
||||
}
|
||||
});
|
||||
self.$element.find('#formbutton').click(function(){
|
||||
@@ -79,7 +79,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
||||
this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false);
|
||||
this.formview.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", true, true);
|
||||
$.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -115,7 +115,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
||||
this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false);
|
||||
this.formview.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", true, true);
|
||||
$.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -150,7 +150,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
||||
$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html(QWeb.render("ListView", {'records' : res}));
|
||||
$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('h1').html(head);
|
||||
$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", false, true);
|
||||
});
|
||||
$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
@@ -158,7 +158,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", false, true);
|
||||
}
|
||||
});
|
||||
$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=footer]").find('#preference').click(function(){
|
||||
@@ -167,7 +167,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", false, true);
|
||||
}
|
||||
});
|
||||
$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("a#list-id").click(function(ev){
|
||||
@@ -203,7 +203,7 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
||||
|
||||
$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('h1').html(head_title);
|
||||
$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('#home').click(function(){
|
||||
$.mobile.changePage("#oe_menu", "slide", true, true);
|
||||
$.mobile.changePage("#oe_menu", "slide", false, true);
|
||||
});
|
||||
$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=footer]").find('#shrotcuts').click(function(){
|
||||
if(!$('#oe_shortcuts').html().length){
|
||||
@@ -211,7 +211,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", false, true);
|
||||
}
|
||||
});
|
||||
$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=footer]").find('#preference').click(function(){
|
||||
@@ -220,7 +220,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", false, true);
|
||||
}
|
||||
});
|
||||
$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find('#formbutton').click(function(){
|
||||
@@ -233,24 +233,24 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({
|
||||
this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false);
|
||||
this.formview.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", true, true);
|
||||
$.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
$.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", true, true);
|
||||
$.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", false, true);
|
||||
}else{
|
||||
$.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", true, true);
|
||||
$.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", false, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
$.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", true, true);
|
||||
$.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true);
|
||||
}else{
|
||||
$.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", true, true);
|
||||
$.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$.mobile.changePage("#"+self.element_id, "slide", true, true);
|
||||
$.mobile.changePage("#"+self.element_id, "slide", false, 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", false, 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", false, 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", false, true);
|
||||
}
|
||||
});
|
||||
self.$element.find("a#list-id").click(self.on_list_click);
|
||||
$.mobile.changePage("#"+self.element_id, "slide", true, true);
|
||||
$.mobile.changePage("#"+self.element_id, "slide", false, true);
|
||||
});
|
||||
},
|
||||
on_list_click: function(ev) {
|
||||
@@ -64,7 +64,7 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({
|
||||
this.formview = new openerp.web_mobile.FormView(this, "oe_form_"+id+this.action.res_model, id, this.action, head_title, '' ,'');
|
||||
this.formview.start();
|
||||
}else{
|
||||
$.mobile.changePage('#oe_form_'+id+this.action.res_model, "slide", true, true);
|
||||
$.mobile.changePage('#oe_form_'+id+this.action.res_model, "slide", false, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user