From 69fd654fce7dfdc6ecc4982b1f4e6c6be13fb428 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 15 Feb 2013 12:08:25 +0530 Subject: [PATCH 1/9] [IMP]Bounce effect on bigger names(H1) and o2m fields bzr revid: ggh@tinyerp.com-20130215063825-lkq8p74kbt1ynliq --- 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 4880b3882ff..4362f78d4df 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -203,7 +203,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.has_been_loaded.resolve(); // Add bounce effect on button 'Edit' when click on readonly page view. - this.$el.find(".oe_form_group_row,.oe_form_field,label").on('click', function (e) { + this.$el.find(".oe_form_group_row,.oe_form_field,label,.oe_title,.oe_notebook_page").on('click', function (e) { if(self.get("actual_mode") == "view") { var $button = self.options.$buttons.find(".oe_form_button_edit"); $button.openerpBounce(); From 51879ca61673561510866fc4a4352f2b94143fce Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 15 Feb 2013 13:06:01 +0530 Subject: [PATCH 2/9] [IMP] Improve bounce in H1 and lost content bzr revid: ggh@tinyerp.com-20130215073601-nw5tqcabrlet1qn8 --- 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 4362f78d4df..0ef448b0d6e 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -203,7 +203,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.has_been_loaded.resolve(); // Add bounce effect on button 'Edit' when click on readonly page view. - this.$el.find(".oe_form_group_row,.oe_form_field,label,.oe_title,.oe_notebook_page").on('click', function (e) { + this.$el.find(".oe_form_group_row,.oe_form_field,label,h1,.oe_title,.oe_notebook_page, .oe_list_content").on('click', function (e) { if(self.get("actual_mode") == "view") { var $button = self.options.$buttons.find(".oe_form_button_edit"); $button.openerpBounce(); From dff2dd01963e8a098987fcb2e088415472f29f78 Mon Sep 17 00:00:00 2001 From: Vishmita Date: Thu, 28 Feb 2013 11:19:10 +0530 Subject: [PATCH 3/9] [IMP]Bounce ob image bzr revid: vja@tinyerp.com-20130228054910-3s7mrp39y0kmkfpy --- addons/web/static/src/js/view_form.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 0ef448b0d6e..3464f23549b 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -4985,6 +4985,13 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({ url = this.placeholder; } var $img = $(QWeb.render("FieldBinaryImage-img", { widget: this, url: url })); + $($img).click(function(e) { + if(self.view.get("actual_mode") == "view") { + var $button = $(".oe_form_button_edit"); + $button.openerpBounce(); + e.stopPropagation(); + } + }); this.$el.find('> img').remove(); this.$el.prepend($img); $img.load(function() { From 4d7cfc9ab32f24ef89312667cce8ae61f53d26e3 Mon Sep 17 00:00:00 2001 From: Vishmita Date: Thu, 28 Feb 2013 19:17:40 +0530 Subject: [PATCH 4/9] [IMP]Improve code for bounce on boolean field bzr revid: vja@tinyerp.com-20130228134740-jqv0zqletq6v1792 --- addons/web/static/src/css/base.css | 10 ++++++++++ addons/web/static/src/js/view_form.js | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 6cfee50d6a4..5d5ca46b4ec 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -3145,6 +3145,16 @@ div.ui-widget-overlay { .openerp_ie .oe_form_field_boolean input { background: white; } +.openerp .oe_form_field_boolean .boolean{ + position: relative; + top: -14px; + width: 14px; + height: 14px; + z-index:10000; + // IE needs a color in order for the layer to respond to mouse events + backgroundColor: "#fff"; + opacity: 0; +} .openerp_ie .db_option_table .oe_form_field_selection { width: auto; } diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 3464f23549b..87bf7c1c49a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2659,6 +2659,7 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ }, this)); var check_readonly = function() { self.$checkbox.prop('disabled', self.get("effective_readonly")); + self.click_disabled_boolean(); }; this.on("change:effective_readonly", this, check_readonly); check_readonly.call(this); @@ -2669,7 +2670,19 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ }, focus: function() { this.$checkbox[0].focus(); + }, + click_disabled_boolean: function(){ + var $disabled = $(document).find('input[type=checkbox]:disabled'); + $disabled.each(function (){ + var $parent = $(this).closest("span"); + if($(this).next('div')){ + $(this).next('div').remove(); + } + var $overlay = $("
"); + $parent.append($overlay); + }); } + }); /** From ae6d15de59251618a21d4520e50456fd9777de33 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 1 Mar 2013 16:24:39 +0530 Subject: [PATCH 5/9] [IMP] Add saas file bzr revid: ggh@tinyerp.com-20130301105439-29y4yrr5yn2xcolt --- addons/web/static/src/css/base.css | 20 ++++++++++---------- addons/web/static/src/css/base.sass | 10 ++++++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 1c4f2509fa7..33bba914f3f 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2374,6 +2374,16 @@ } .openerp .oe_form .oe_form_field_boolean { width: auto; + height: 14px; +} +.openerp .oe_form .oe_form_field_boolean .boolean { + position: relative; + top: -20px; + width: 14px; + height: 14px; + z-index: 10000; + backgroundColor: "#fff"; + opacity: 0; } .openerp .oe_form .oe_datepicker_container { display: none; @@ -3168,16 +3178,6 @@ div.ui-widget-overlay { .openerp_ie .oe_form_field_boolean input { background: white; } -.openerp .oe_form_field_boolean .boolean{ - position: relative; - top: -14px; - width: 14px; - height: 14px; - z-index:10000; - // IE needs a color in order for the layer to respond to mouse events - backgroundColor: "#fff"; - opacity: 0; -} .openerp_ie .db_option_table .oe_form_field_selection { width: auto; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 0a73728678d..db25cff9b3e 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1878,6 +1878,16 @@ $sheet-padding: 16px white-space: nowrap .oe_form_field_boolean width: auto + height: 14px + .boolean + position: relative + top: -20px + width: 14px + height: 14px + z-index: 10000 + // IE needs a color in order for the layer to respond to mouse events + backgroundColor: "#fff" + opacity: 0 .oe_datepicker_container display: none .oe_datepicker_root From 847c51b1d7b898d8726bd711b431ba55eba935d4 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Wed, 1 May 2013 11:17:15 +0530 Subject: [PATCH 6/9] [IMP]css change bzr revid: vja@tinyerp.com-20130501054715-ssssf5pgj7c7pn1c --- addons/web/static/src/css/base.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 1e82daeb4ff..500ae1857bb 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2648,6 +2648,16 @@ div.ui-widget-overlay { width: 80px; } .openerp_ie .oe_form_field_boolean input { background: white; } +.openerp .oe_form_field_boolean .boolean{ + position: relative; + top: -14px; + width: 14px; + height: 14px; + z-index:10000; + // IE needs a color in order for the layer to respond to mouse events + backgroundColor: "#fff"; + opacity: 0; +} .openerp_ie .db_option_table .oe_form_field_selection { width: auto; } .openerp_ie input[type='checkbox'] { From 23687ef653b9d5fb11dcac5cf71dabdf8448e976 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Wed, 1 May 2013 11:26:18 +0530 Subject: [PATCH 7/9] [IMP]Improve code bzr revid: vja@tinyerp.com-20130501055618-06xc6fgj50npvk3u --- addons/web/static/src/js/view_form.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 0373af78358..514d3dad51c 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2757,14 +2757,10 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ return input ? input.focus() : false; }, click_disabled_boolean: function(){ - var $disabled = $(document).find('input[type=checkbox]:disabled'); + var $disabled = this.$el.find('input[type=checkbox]:disabled'); $disabled.each(function (){ - var $parent = $(this).closest("span"); - if($(this).next('div')){ - $(this).next('div').remove(); - } - var $overlay = $("
"); - $parent.append($overlay); + $(this).next('div').remove(); + $(this).closest("span").append($('
')); }); } }); From 330cf7949768f9851fe3956d8d7db5e3260ef631 Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 2 May 2013 12:50:52 +0530 Subject: [PATCH 8/9] [IMP]Minor change bzr revid: vja@tinyerp.com-20130502072052-2jo04lhsz3y3fhxi --- 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 514d3dad51c..eae34b678b0 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2760,7 +2760,7 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({ var $disabled = this.$el.find('input[type=checkbox]:disabled'); $disabled.each(function (){ $(this).next('div').remove(); - $(this).closest("span").append($('
')); + $(this).closest("span").append($('
')); }); } }); From 3c0bc3aad8534bc1f7e681a36639432710a212ce Mon Sep 17 00:00:00 2001 From: "Vishmita Jadeja (openerp)" Date: Thu, 2 May 2013 13:07:06 +0530 Subject: [PATCH 9/9] [IMP]Improve in css bzr revid: vja@tinyerp.com-20130502073706-onxr8vdi3f3vhqvs --- addons/web/static/src/css/base.css | 2 +- addons/web/static/src/css/base.sass | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 500ae1857bb..7921b40d7d7 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2648,7 +2648,7 @@ div.ui-widget-overlay { width: 80px; } .openerp_ie .oe_form_field_boolean input { background: white; } -.openerp .oe_form_field_boolean .boolean{ +.openerp .oe_form_readonly .oe_form_field_boolean .boolean{ position: relative; top: -14px; width: 14px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index b4e70e6bdc9..b39fb7748be 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1695,6 +1695,15 @@ $sheet-padding: 16px display: none !important .oe_form .oe_form_field_date width: auto + .oe_form_field_boolean.boolean + position: relative + top: -20px + width: 14px + height: 14px + z-index: 10000 + // IE needs a color in order for the layer to respond to mouse events + backgroundColor: "#fff" + opacity: 0 // Sheet and padding .oe_form_nosheet margin: 16px @@ -1930,16 +1939,6 @@ $sheet-padding: 16px white-space: nowrap .oe_form_field_boolean width: auto - height: 14px - .boolean - position: relative - top: -20px - width: 14px - height: 14px - z-index: 10000 - // IE needs a color in order for the layer to respond to mouse events - backgroundColor: "#fff" - opacity: 0 .oe_datepicker_container display: none .oe_datepicker_root