From 693ec72528d0bda2b254f5ca64e656755690a6b2 Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Thu, 28 Jun 2012 17:16:09 +0530 Subject: [PATCH 01/15] added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button bzr revid: pan@tinyerp.com-20120628114609-xmj17x8t2pymftcf --- addons/web/static/src/css/base.css | 3 +++ addons/web/static/src/js/view_form.js | 8 +++++++- addons/web/static/src/xml/base.xml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index d06c157696b..2f4111882c4 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2216,3 +2216,6 @@ .kitten-mode-activated > * { opacity: 0.7; } +.openerp .bounce { + float:left; +} diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 1941e48affd..2dc954c414d 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -92,7 +92,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this._super(); }, on_loaded: function(data) { - var self = this; + var self = this; if (!data) { throw new Error("No data provided."); } @@ -286,6 +286,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_record_loaded: function(record) { var self = this, set_values = []; + self.on_invalidclick(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -581,6 +582,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM self.set({mode: "view"}); }); }, + on_invalidclick: function() { + this.$element.find(".oe_form_field").click(function () { + $(".oe_form_button_edit").effect("bounce", { times:3,distance:100 }, 500); + }); + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { this.set({mode: "view"}); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 13be46806cb..641d37a818a 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -680,7 +680,7 @@
- +
From 13458db46f61545b63c11a60137ab2e9d8f27d9c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Thu, 28 Jun 2012 17:18:44 +0530 Subject: [PATCH 02/15] added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button bzr revid: pan@tinyerp.com-20120628114844-3c1rv4ckk888yhzo --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 2dc954c414d..09c8ac67dfc 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -584,7 +584,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_invalidclick: function() { this.$element.find(".oe_form_field").click(function () { - $(".oe_form_button_edit").effect("bounce", { times:3,distance:100 }, 500); + $(".oe_form_button_edit").effect("bounce", { times:3}, 500); }); }, on_button_cancel: function(event) { From e748c3d4cf18eb3e8defde43f46ee3eeeff0404c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Fri, 29 Jun 2012 12:52:48 +0530 Subject: [PATCH 03/15] improoved code for [added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button] bzr revid: pan@tinyerp.com-20120629072248-kb0vfjjo707l8vaj --- addons/web/static/src/css/base.css | 5 +---- addons/web/static/src/js/view_form.js | 7 +++++-- addons/web/static/src/xml/base.xml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 2f4111882c4..f738fe757ac 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2215,7 +2215,4 @@ } .kitten-mode-activated > * { opacity: 0.7; -} -.openerp .bounce { - float:left; -} +} \ No newline at end of file diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 09c8ac67dfc..65f825c6cf5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -582,8 +582,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM self.set({mode: "view"}); }); }, - on_invalidclick: function() { - this.$element.find(".oe_form_field").click(function () { + on_invalidclick: function() { + var div = $("
", {id:"bounce"}); + this.$element.find(".oe_form_field").click(function () { + $(".oe_form_button_edit").wrap(div); + $("#bounce").css({"float":"left","margin-right":"4px"}); $(".oe_form_button_edit").effect("bounce", { times:3}, 500); }); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 641d37a818a..02ff528b993 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -679,8 +679,8 @@
- -
+ + From 58d7c74c1dfba66a1e56f1524d0a54bc59744b43 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 29 Jun 2012 13:11:24 +0530 Subject: [PATCH 04/15] [IMP]If the user clicks on an empty row of a list, bounce the Create button bzr revid: ggh@tinyerp.com-20120629074124-vxh7ngcyvqvb9zok --- addons/web/static/src/js/view_list.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index b5634c3443f..848c2934b17 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -285,6 +285,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$element.find('.oe_list_buttons').replaceWith(this.$buttons); } this.$buttons.find('.oe_list_add') + .wrap("
") + .css({"float":"left","margin-right":"4px"}) .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -978,6 +980,11 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } self.row_clicked(e); } + else{ + if (opts.options.$buttons){ + $(opts.options.$buttons.find('.oe_list_add')).effect("bounce", { times:5 }, 300); + } + } }); }, row_clicked: function (e, view) { From 219ad444b7a3816ee72de0c693d7e3248568945d Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Mon, 2 Jul 2012 12:55:19 +0530 Subject: [PATCH 05/15] On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120702072519-r54mncuq083jesln --- addons/web_kanban/static/src/js/kanban.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 09858b92fff..9fd2b0e77af 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,6 +415,11 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); + var click_column = this.$element.find('.oe_kanban_add'); + this.$records.click(function() { + click_column.effect("bounce", { times:3 }, 300); + }); + this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); @@ -479,6 +484,12 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ do_toggle_fold: function(compute_width) { this.$element.add(this.$records).toggleClass('oe_kanban_group_folded'); this.state.folded = this.$element.is('.oe_kanban_group_folded'); + if(this.state.folded) { + this.$element.find('.oe_kanban_add').css({"visibility": "hidden"}); + } + if(!this.state.folded) { + this.$element.find('.oe_kanban_add').css({"visibility": "visible"}); + } }, do_save_sequences: function() { var self = this; From 07575c10f2c222cc8d8c67c1a570c5497b185c35 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Tue, 3 Jul 2012 11:41:28 +0530 Subject: [PATCH 06/15] [Improved]On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120703061128-u7k490cdo8e8uuag --- addons/web_kanban/static/src/js/kanban.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 9fd2b0e77af..a840d60a59e 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,11 +415,11 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); - var click_column = this.$element.find('.oe_kanban_add'); + var click_column = this.$element.find('.oe_kanban_add'); + click_column.css({"float":"right"}); this.$records.click(function() { click_column.effect("bounce", { times:3 }, 300); }); - this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); From d26b36480b6908a0bbb2016bf914e91cea648249 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 4 Jul 2012 11:21:06 +0530 Subject: [PATCH 07/15] [IMP]Improve code for Bounce effect in listview bzr revid: ggh@tinyerp.com-20120704055106-r3yuhcvadpel9mhy --- addons/web/static/src/css/base.css | 4 ++++ addons/web/static/src/js/corelib.js | 7 +++++++ addons/web/static/src/js/view_list.js | 11 ++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index f738fe757ac..00ecab65951 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2215,4 +2215,8 @@ } .kitten-mode-activated > * { opacity: 0.7; +} +.openerp .oe_bounce_button_left { + float: left; + margin-right: 4px; } \ No newline at end of file diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 5af51fa519a..a4b0ca97eaa 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -728,6 +728,12 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, + /* + * In button to bounce effect + */ + do_bounce: function(element) { + element.effect("bounce", { times:3}, 500); + }, do_notify: function() { if (this.getParent()) { return this.getParent().do_notify.apply(this,arguments); @@ -740,6 +746,7 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, + rpc: function(url, data, success, error) { var def = $.Deferred().then(success, error); var self = this; diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 848c2934b17..4c725c157ab 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -285,8 +285,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$element.find('.oe_list_buttons').replaceWith(this.$buttons); } this.$buttons.find('.oe_list_add') - .wrap("
") - .css({"float":"left","margin-right":"4px"}) + .wrap("
") + .addClass('oe_bounce_button_left') .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -982,9 +982,10 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } else{ if (opts.options.$buttons){ - $(opts.options.$buttons.find('.oe_list_add')).effect("bounce", { times:5 }, 300); - } - } + var a = $(opts.options.$buttons.find('.oe_list_add')); + self.view.do_bounce(a); + } + } }); }, row_clicked: function (e, view) { From e155f29f18168665b7124464150e551b38fd1936 Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Wed, 4 Jul 2012 11:38:36 +0530 Subject: [PATCH 08/15] [IMP]improve code for the bounce effect in form view bzr revid: pan@tinyerp.com-20120704060836-2y2vu2c2aj7mn8lq --- addons/web/static/src/js/view_form.js | 18 ++++++++---------- addons/web/static/src/js/view_list.js | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 65f825c6cf5..c66c287aa62 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -286,7 +286,13 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_record_loaded: function(record) { var self = this, set_values = []; - self.on_invalidclick(); + var div = $("
", {id:"bounce"}); + this.$element.find(".oe_form_field").click(function () { + $(".oe_form_button_edit").wrap(div); + $("#bounce").addClass('oe_bounce_button_left'); + var val_bounce = $(".oe_form_button_edit"); + self.do_bounce(val_bounce); + }); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -581,15 +587,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return this.do_save().then(function(result) { self.set({mode: "view"}); }); - }, - on_invalidclick: function() { - var div = $("
", {id:"bounce"}); - this.$element.find(".oe_form_field").click(function () { - $(".oe_form_button_edit").wrap(div); - $("#bounce").css({"float":"left","margin-right":"4px"}); - $(".oe_form_button_edit").effect("bounce", { times:3}, 500); - }); - }, + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { this.set({mode: "view"}); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 4c725c157ab..015829a0579 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -982,8 +982,8 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } else{ if (opts.options.$buttons){ - var a = $(opts.options.$buttons.find('.oe_list_add')); - self.view.do_bounce(a); + var bounce_val = $(opts.options.$buttons.find('.oe_list_add')); + self.view.do_bounce(bounce_val); } } }); From d5572fdc8ae336da6b29cbc2e87cee96d31b4164 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 4 Jul 2012 11:49:30 +0530 Subject: [PATCH 09/15] [IMP] On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120704061930-jyw2kohww5a7enbf --- addons/web/static/src/js/corelib.js | 6 +++--- addons/web_kanban/static/src/css/kanban.css | 4 +++- addons/web_kanban/static/src/js/kanban.js | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index a4b0ca97eaa..988c419182b 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -728,11 +728,11 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, - /* - * In button to bounce effect + /** + * Add bounce effect when click on wrong area */ do_bounce: function(element) { - element.effect("bounce", { times:3}, 500); + element.effect("bounce", { times:3}, 300); }, do_notify: function() { if (this.getParent()) { diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index b65bd7dd8f4..c26620e7978 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -453,8 +453,10 @@ .openerp .oe_kanban_view .oe_kanban_color_9 { background-color: #ffc7f1; } - .openerp .oe_form .oe_kanban_view .oe_kanban_column, .openerp .oe_form .oe_kanban_view .oe_kanban_group_header { padding: 0px; background: white; } +.openerp .oe_kanban_quick_create { + float: right; +} \ No newline at end of file diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index a840d60a59e..6cce376d475 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,9 +416,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); - click_column.css({"float":"right"}); + click_column.addClass('oe_kanban_quick_create'); this.$records.click(function() { - click_column.effect("bounce", { times:3 }, 300); + self.view.do_bounce(click_column); }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { From 0a27cc3c1cd8d33e1eaa08263735bdf2c23a8b1f Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 4 Jul 2012 11:58:07 +0530 Subject: [PATCH 10/15] [IMP] On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120704062807-579ovj2h5unkxbok --- addons/web_kanban/static/src/css/kanban.css | 2 +- addons/web_kanban/static/src/js/kanban.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index c26620e7978..d3bfdb17bd9 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -457,6 +457,6 @@ padding: 0px; background: white; } -.openerp .oe_kanban_quick_create { +.openerp .oe_kanban_quick_create_bounce { float: right; } \ No newline at end of file diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 6cce376d475..66577cc1c08 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,7 +416,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); - click_column.addClass('oe_kanban_quick_create'); + click_column.addClass('oe_kanban_quick_create_bounce'); this.$records.click(function() { self.view.do_bounce(click_column); }); From a2087dc4c52fd36b74c9273a1bd165db4b783465 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 5 Jul 2012 12:19:49 +0530 Subject: [PATCH 11/15] [IMP] Bounce effect on FOLD ICON in KANBAN VIEW. bzr revid: psa@tinyerp.com-20120705064949-pw01zfhl3sesu6uz --- addons/web_kanban/static/src/js/kanban.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 66577cc1c08..c2cc8bcd17b 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,9 +416,13 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); + var fold_icon = this.$element.find('.oe_kanban_fold_icon'); click_column.addClass('oe_kanban_quick_create_bounce'); this.$records.click(function() { self.view.do_bounce(click_column); + if(self.state.folded) { + self.view.do_bounce(fold_icon); + } }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { @@ -487,7 +491,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ if(this.state.folded) { this.$element.find('.oe_kanban_add').css({"visibility": "hidden"}); } - if(!this.state.folded) { + else { this.$element.find('.oe_kanban_add').css({"visibility": "visible"}); } }, From 202238473c6eb90e539028d553265eb1ec43c87a Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Thu, 5 Jul 2012 12:27:57 +0530 Subject: [PATCH 12/15] [IMP] Improove code for form view bounce effect bzr revid: pan@tinyerp.com-20120705065757-483b5y765cvupail --- addons/web/static/src/js/view_form.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c66c287aa62..a2d849d5172 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -284,8 +284,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } this._super(); }, - on_record_loaded: function(record) { - var self = this, set_values = []; + on_invalidclick : function (){ + var self = this; var div = $("
", {id:"bounce"}); this.$element.find(".oe_form_field").click(function () { $(".oe_form_button_edit").wrap(div); @@ -293,6 +293,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM var val_bounce = $(".oe_form_button_edit"); self.do_bounce(val_bounce); }); + }, + on_record_loaded: function(record) { + var self = this, set_values = []; + self.on_invalidclick(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -586,6 +590,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM var self = this; return this.do_save().then(function(result) { self.set({mode: "view"}); + self.on_invalidclick(); }); }, on_button_cancel: function(event) { From 16eef6db4a5820ace292b6e5dc5e3b8cf388ff96 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Mon, 9 Jul 2012 15:49:54 +0530 Subject: [PATCH 13/15] [MERGE] Merged from openerp-web. bzr revid: psa@tinyerp.com-20120709101954-gdsaosq9p7wp5zff --- addons/web_kanban/static/src/js/kanban.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 26638ec762a..8dde2efe7c3 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,13 +416,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); - var fold_icon = this.$element.find('.oe_kanban_fold_icon'); click_column.addClass('oe_kanban_quick_create_bounce'); this.$records.click(function() { self.view.do_bounce(click_column); - if(self.state.folded) { - self.view.do_bounce(fold_icon); - } }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { @@ -488,12 +484,6 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ do_toggle_fold: function(compute_width) { this.$element.add(this.$records).toggleClass('oe_kanban_group_folded'); this.state.folded = this.$element.is('.oe_kanban_group_folded'); - if(this.state.folded) { - this.$element.find('.oe_kanban_add').css({"visibility": "hidden"}); - } - else { - this.$element.find('.oe_kanban_add').css({"visibility": "visible"}); - } }, do_save_sequences: function() { var self = this; From 9b936e7e29a6b48fa7a5c4fa703dee78b8df771d Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Mon, 9 Jul 2012 16:12:18 +0530 Subject: [PATCH 14/15] [IMP] improve code for bounce effect on non editable form view. bzr revid: pan@tinyerp.com-20120709104218-tot71riz8bww6itp --- addons/web/static/src/js/view_form.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index a65e471c6bf..2a5c0679bd2 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -92,7 +92,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this._super(); }, on_loaded: function(data) { - var self = this; + var self = this; if (!data) { throw new Error("No data provided."); } @@ -287,16 +287,18 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_invalidclick : function (){ var self = this; var div = $("
", {id:"bounce"}); - this.$element.find(".oe_form_field").click(function () { + this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { $(".oe_form_button_edit").wrap(div); $("#bounce").addClass('oe_bounce_button_left'); - var val_bounce = $(".oe_form_button_edit"); + var val_bounce = $(".oe_form_button_edit"); self.do_bounce(val_bounce); - }); + e.stopImmediatePropagation(); + }); + }, on_record_loaded: function(record) { - var self = this, set_values = []; - self.on_invalidclick(); + var self = this, set_values = []; + self.on_invalidclick(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -338,6 +340,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } self.$element.add(self.$buttons).removeClass('oe_form_dirty'); }); + }, on_form_changed: function() { this.trigger("view_content_has_changed"); @@ -596,9 +599,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_button_save: function() { var self = this; return this.do_save().then(function(result) { - self.set({mode: "view"}); - self.on_invalidclick(); + self.set({mode: "view"}); + self.on_invalidclick(); }); + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { @@ -2982,7 +2986,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ return def; }, reload_current_view: function() { - var self = this; + var self = this; return self.is_loaded = self.is_loaded.pipe(function() { var active_view = self.viewmanager.active_view; var view = self.viewmanager.views[active_view].controller; From d5e57ecdf5c37d4c0f64d2075ed87c4419323237 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 11 Jul 2012 10:34:25 +0530 Subject: [PATCH 15/15] [MERGE] Bounce effect on QUICK CREATE[+] Button in KANBAN VIEW. bzr revid: psa@tinyerp.com-20120711050425-eiywgtwi0upzmm80 --- addons/web_kanban/static/src/js/kanban.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 8dde2efe7c3..56612f3bf08 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -417,9 +417,13 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ }); var click_column = this.$element.find('.oe_kanban_add'); click_column.addClass('oe_kanban_quick_create_bounce'); - this.$records.click(function() { + this.$records.click(function(e) { + var $target = e.target; + var $currenttarget = e.currentTarget; + if ($target == $currenttarget) { self.view.do_bounce(click_column); - }); + } + }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold();