From 348d05be82f59d8aac0c1dd1f9d713d7e39569e2 Mon Sep 17 00:00:00 2001 From: "Kunal Chavda (Open ERP)" Date: Thu, 3 Oct 2013 11:00:02 +0530 Subject: [IMP]improved position of m2o autocomplete. bzr revid: kch@tinyerp.com-20131003053002-v4bzzklwzbinxw2a --- addons/web/static/src/js/view_form.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index a00b66cbeda..79fdb3e4f4e 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3390,6 +3390,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc minLength: 0, delay: 0 }); + //set position for list of suggetions box + this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } ); this.$input.autocomplete("widget").openerpClass(); // used to correct a bug when selecting an element by pushing 'enter' in an editable list this.$input.keyup(function(e) { -- cgit v1.2.3 From 2185a2600f23104cb8d750a6b9b504e76e3d0bfc Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Wed, 11 Dec 2013 11:19:55 +0530 Subject: [IMP] Improved Quick add wizard bzr revid: cod@tinyerp.com-20131211054955-vnfmj46y761whvvb --- addons/web/static/src/xml/base.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index ae7a4f279b0..c6ad1754e64 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1925,13 +1925,14 @@
+

You are creating a new record, are you sure it does not exist yet?

Name:
- - - + + or + -- cgit v1.2.3 From 01aa3406507b9a39f1af9f164b39c29649f0b99f Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Wed, 11 Dec 2013 14:12:19 +0530 Subject: [IMP] Improved code for apply oe_link class on cancel button bzr revid: cod@tinyerp.com-20131211084219-5gz7jeu1nb0szhji --- addons/web/static/src/xml/base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index c6ad1754e64..7fed402aac0 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1932,7 +1932,7 @@ or - + -- cgit v1.2.3 From 9ca1c1394c49e3ae505f9daa2bd61f1fad453599 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Wed, 18 Dec 2013 10:37:16 +0530 Subject: [IMP] Improved the name of wizard Instead of Add XXX set Create a XXX bzr revid: cod@tinyerp.com-20131218050716-8zsx7a2k3fme9w0f --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index f20e9053867..89ec4cbeee4 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3166,7 +3166,7 @@ instance.web.form.M2ODialog = instance.web.Dialog.extend({ template: "M2ODialog", init: function(parent) { this._super(parent, { - title: _.str.sprintf(_t("Add %s"), parent.string), + title: _.str.sprintf(_t("Create a %s"), parent.string), width: 312, }); }, -- cgit v1.2.3 From 0abd187bec3126e917959b1c7b67082f98757ce4 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Thu, 23 Jan 2014 18:52:41 +0530 Subject: [IMP]Improved code to set message of quick add wizard bzr revid: cod@tinyerp.com-20140123132241-zfd0e3la6ebrvtd5 --- addons/web/static/src/js/view_form.js | 3 +++ addons/web/static/src/xml/base.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 89ec4cbeee4..87cf8c4c886 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3165,6 +3165,7 @@ instance.web.form.CompletionFieldMixin = { instance.web.form.M2ODialog = instance.web.Dialog.extend({ template: "M2ODialog", init: function(parent) { + this.name = parent.string; this._super(parent, { title: _.str.sprintf(_t("Create a %s"), parent.string), width: 312, @@ -3172,6 +3173,8 @@ instance.web.form.M2ODialog = instance.web.Dialog.extend({ }, start: function() { var self = this; + var text = _.str.sprintf(_t("You are creating a new %s, are you sure it does not exist yet?"), self.name); + $( "p" ).text( text ); this.$buttons.html(QWeb.render("M2ODialog.buttons")); this.$("input").val(this.getParent().last_query); this.$buttons.find(".oe_form_m2o_qc_button").click(function(){ diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 7fed402aac0..55a9865fef9 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1925,7 +1925,7 @@
-

You are creating a new record, are you sure it does not exist yet?

+

Name:

-- cgit v1.2.3 From 055cae21512a7af32f1a67ed0460c11477679711 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 2 Apr 2014 13:27:09 +0200 Subject: [WIP] load script bzr revid: fme@openerp.com-20140402112709-vbm7p35s980p0s2u --- addons/web/static/src/js/openerpframework.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js index 5dcc2197944..8a2961e058f 100644 --- a/addons/web/static/src/js/openerpframework.js +++ b/addons/web/static/src/js/openerpframework.js @@ -1477,6 +1477,26 @@ openerp.time_to_str = function(obj) { + lpad(obj.getSeconds(),2); }; +openerp.load_script = function (url) { + var def = $.Deferred(); + if (document.getElementById(url)) { + def.resolve(); + } else { + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = script.id = url; + script.onload = function () { + def.resolve(); + }; + script.onerror = function () { + console.error("Error loading file", url); + def.reject(); + }; + document.head.appendChild(script); + } + return def; +}; + openerp.declare = declare; return openerp; -- cgit v1.2.3 From 8e14e7a870b04345e7ae101910b1dc97c1865dca Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 9 Apr 2014 18:16:48 +0200 Subject: [WIP] AssetsBundle bzr revid: fme@openerp.com-20140409161648-sx87vc0saj30f68x --- addons/web/static/src/js/chrome.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 8e5df84e2c3..ae1499549ba 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1478,7 +1478,7 @@ instance.web.embed = function (origin, dbname, login, key, action, options) { $('head').append($('', { 'rel': 'stylesheet', 'type': 'text/css', - 'href': origin +'/web/webclient/css' + 'href': origin +'/web/css/web.assets_webclient' })); var currentScript = document.currentScript; if (!currentScript) { -- cgit v1.2.3 From faadf0fec4c577e984d916e7fd54c2a42ad621c5 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Mon, 14 Apr 2014 12:53:33 +0200 Subject: [FIX] get_file error: the exception can be the only node and must be json parsed bzr revid: sle@openerp.com-20140414105333-05jona7myntifamw --- addons/web/static/src/js/core.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 90c84ba9cda..45ed6f41c6f 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -460,14 +460,11 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ .appendTo(document.body) .load(function () { try { - if (options.error) { - if (!this.contentDocument.body.childNodes[1]) { - options.error(this.contentDocument.body.childNodes); - } - else { - options.error(JSON.parse(this.contentDocument.body.childNodes[1].textContent)); - } - } + if (options.error) { + var body = this.contentDocument.body; + var node = body.childNodes[1] || body.childNodes[0]; + options.error(JSON.parse(node.textContent)); + } } finally { complete(); } -- cgit v1.2.3 From 3e99ca7285a3eb7b9aa2a8179ba408beca021f40 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 17 Apr 2014 15:34:57 +0200 Subject: [IMP] small css tweaks to stat buttons (addon web) bzr revid: ged@openerp.com-20140417133457-m04g3560jnwjudnr --- addons/web/static/src/css/base.css | 4 ++-- addons/web/static/src/css/base.sass | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 570bb367a70..a4653fad853 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -79,7 +79,7 @@ vertical-align: top; } .openerp .oe_title { - width: 50%; + width: 38%; float: left; } .openerp .oe_title:after { @@ -316,7 +316,7 @@ } .openerp .oe_button_box { width: 400px; - text-align: left; + text-align: right; } .openerp .oe_button_box .oe_stat_button:hover { background: #7c7bad; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 0a2bee832e4..d2bc762853d 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -190,7 +190,7 @@ $sheet-padding: 16px td vertical-align: top .oe_title - width: 50% + width: 38% float: left .oe_title:after content: "." @@ -332,7 +332,7 @@ $sheet-padding: 16px background: #ED6F6A .oe_button_box width: 400px - text-align: left + text-align: right .oe_stat_button:hover background: #7c7bad color: white -- cgit v1.2.3 From 8ae48fae7d1338c2ade0870ed51842af4ca7b1bc Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 17 Apr 2014 15:36:30 +0200 Subject: [IMP] simplify the stat button html structure (one less span) (addon web) bzr revid: ged@openerp.com-20140417133630-q001n7sjrt9xw0to --- addons/web/static/src/js/view_form.js | 2 +- addons/web/static/src/xml/base.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 0ecd164a5e1..8cd7042ada8 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1922,7 +1922,7 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({ init: function(field_manager, node) { node.attrs.type = node.attrs['data-button-type']; this.is_stat_button = /\boe_stat_button\b/.test(node.attrs['class']); - this.icon = node.attrs.icon && ""; + this.icon_class = node.attrs.icon && "stat_button_icon fa " + node.attrs.icon + " fa-fw"; this._super(field_manager, node); this.force_disabled = false; this.string = (this.node.attrs.string || '').replace(/_/g, ''); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a08de0bc4bd..24985ec0520 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1410,7 +1410,7 @@ t-att-autofocus="widget.node.attrs.autofocus" t-att-accesskey="widget.node.attrs.accesskey"> -
+
-- cgit v1.2.3 From fcacd5452c34304e9bb781f5d2fa2f740138e1ce Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 17 Apr 2014 15:37:06 +0200 Subject: [IMP] improves the css for the stat buttons: moves the css independent of oe_button_box to a oe_stat_button section to allow a better look when used out of the button box (addon web) bzr revid: ged@openerp.com-20140417133706-c60zdovc3k4ll9ga --- addons/web/static/src/css/base.css | 56 +++++++++++++++++-------------- addons/web/static/src/css/base.sass | 67 +++++++++++++++++++------------------ 2 files changed, 64 insertions(+), 59 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index a4653fad853..813f75345a3 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,4 +1,4 @@ -@charset "utf-8"; +@charset "UTF-8"; @font-face { font-family: "mnmliconsRegular"; src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot"); @@ -314,56 +314,58 @@ .openerp .oe_form_dirty button.oe_highlight_on_dirty:hover { background: #ed6f6a; } -.openerp .oe_button_box { - width: 400px; - text-align: right; -} -.openerp .oe_button_box .oe_stat_button:hover { - background: #7c7bad; - color: white; -} -.openerp .oe_button_box .oe_stat_button:hover .fa { - color: white; -} -.openerp .oe_button_box .oe_stat_button { +.openerp .oe_stat_button { font-weight: normal; - display: inline-table; - width: 33% !important; height: 42px; - margin: 0px -1px -1px 0px; - padding: 0; color: #666666; border: 1px solid #dddddd; border-radius: 0; box-shadow: none; background: white; } -.openerp .oe_button_box .oe_stat_button > div { +.openerp .oe_stat_button > div { display: table-cell; vertical-align: middle; text-align: left; padding: 0; line-height: 120%; } -.openerp .oe_button_box .oe_stat_button .stat_button_icon { +.openerp .oe_stat_button .stat_button_icon { color: #7c7bad; font-size: 24px; padding: 0px 3px; width: 37px; text-align: center; } -.openerp .oe_button_box .oe_stat_button .oe_form_field_percent_pie { +.openerp .oe_stat_button .oe_form_field_percent_pie { width: 42px; } -.openerp .oe_button_box .oe_stat_button .oe_form_field_bar_chart { +.openerp .oe_stat_button .oe_form_field_bar_chart { width: 42px; } -.openerp .oe_button_box .oe_stat_button svg { +.openerp .oe_stat_button svg { width: 38px; height: 38px; display: inline; vertical-align: middle; } +.openerp .oe_stat_button:hover { + background: #7c7bad; + color: white; +} +.openerp .oe_stat_button:hover .fa { + color: white; +} +.openerp .oe_button_box { + width: 400px; + text-align: right; +} +.openerp .oe_button_box .oe_stat_button { + display: inline-table; + width: 33% !important; + margin: 0px -1px -1px 0px; + padding: 0; +} .openerp .oe_avatar > img { max-height: 90px; max-width: 90px; @@ -3331,6 +3333,7 @@ body.oe_single_form .oe_single_form_container { width: 18px; height: 18px; } + .modal .modal-header button.close { border: none; background: none; @@ -3341,12 +3344,13 @@ body.oe_single_form .oe_single_form_container { .modal .modal-footer { text-align: left; } -.modal .oe_act_window.modal-body{ - padding: 0; -} -.modal .oe_button{ +.modal .oe_button { margin: 0 4px 0 0; } +.modal .oe_act_window.modal-body { + padding: 0; +} + input[type="radio"], input[type="checkbox"] { margin-right: 4px; margin-left: 4px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index d2bc762853d..23a0095cb08 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -330,47 +330,48 @@ $sheet-padding: 16px @include box-shadow(none) &:hover background: #ED6F6A + .oe_stat_button + font-weight: normal + height: 42px + color: #666 + border: 1px solid #dddddd + border-radius: 0 + box-shadow: none + background: white + > div + display: table-cell + vertical-align: middle + text-align: left + padding: 0 + line-height: 120% + .stat_button_icon + color: #7C7BAD + font-size: 24px + padding: 0px 3px + width: 37px + text-align: center + .oe_form_field_percent_pie + width: 42px + .oe_form_field_bar_chart + width: 42px + svg + width: 38px + height: 38px + display: inline + vertical-align: middle + .oe_stat_button:hover + background: #7c7bad + color: white + .fa + color: white .oe_button_box width: 400px text-align: right - .oe_stat_button:hover - background: #7c7bad - color: white - .fa - color: white .oe_stat_button - font-weight: normal display: inline-table width: 33% !important - height: 42px margin: 0px -1px -1px 0px padding: 0 - color: #666 - border: 1px solid #dddddd - border-radius: 0 - box-shadow: none - background: white - > div - display: table-cell - vertical-align: middle - text-align: left - padding: 0 - line-height: 120% - .stat_button_icon - color: #7C7BAD - font-size: 24px - padding: 0px 3px - width: 37px - text-align: center - .oe_form_field_percent_pie - width: 42px - .oe_form_field_bar_chart - width: 42px - svg - width: 38px - height: 38px - display: inline - vertical-align: middle .oe_avatar > img max-height: 90px -- cgit v1.2.3 From 98b45f97ebebdb70a21347508fca327b4975f6d5 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 17 Apr 2014 15:37:35 +0200 Subject: [IMP] small css tweaks to stat buttons (addon web) bzr revid: ged@openerp.com-20140417133735-ijp8il7e1igs7z95 --- addons/web/static/src/css/base.css | 6 +++--- addons/web/static/src/css/base.sass | 6 +++--- addons/web/static/src/xml/base.xml | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 813f75345a3..b9f681281bb 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -316,8 +316,11 @@ } .openerp .oe_stat_button { font-weight: normal; + width: 132px !important; height: 42px; color: #666666; + margin: 0px -1px -1px 0px; + padding: 0; border: 1px solid #dddddd; border-radius: 0; box-shadow: none; @@ -362,9 +365,6 @@ } .openerp .oe_button_box .oe_stat_button { display: inline-table; - width: 33% !important; - margin: 0px -1px -1px 0px; - padding: 0; } .openerp .oe_avatar > img { max-height: 90px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 23a0095cb08..3934f0f9acb 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -332,8 +332,11 @@ $sheet-padding: 16px background: #ED6F6A .oe_stat_button font-weight: normal + width: 132px !important height: 42px color: #666 + margin: 0px -1px -1px 0px + padding: 0 border: 1px solid #dddddd border-radius: 0 box-shadow: none @@ -369,9 +372,6 @@ $sheet-padding: 16px text-align: right .oe_stat_button display: inline-table - width: 33% !important - margin: 0px -1px -1px 0px - padding: 0 .oe_avatar > img max-height: 90px diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 24985ec0520..7b502bc4e8a 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1986,6 +1986,5 @@
- - +
-- cgit v1.2.3 From 5910f9375f2181da8f847738eb2118073986bc61 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Fri, 18 Apr 2014 11:34:53 +0200 Subject: [IMP] removes 2px to the stat button height, to save on vertical space (addon web) bzr revid: ged@openerp.com-20140418093453-4u0vcqbtj2pdqi69 --- addons/web/static/src/css/base.css | 2 +- addons/web/static/src/css/base.sass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b9f681281bb..b0bfcda8b38 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -317,7 +317,7 @@ .openerp .oe_stat_button { font-weight: normal; width: 132px !important; - height: 42px; + height: 40px; color: #666666; margin: 0px -1px -1px 0px; padding: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 3934f0f9acb..7b863cb1527 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -333,7 +333,7 @@ $sheet-padding: 16px .oe_stat_button font-weight: normal width: 132px !important - height: 42px + height: 40px color: #666 margin: 0px -1px -1px 0px padding: 0 -- cgit v1.2.3 From f584b030bc869277f8ae2573e125b347d579364c Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Tue, 22 Apr 2014 17:03:16 +0200 Subject: [FIX] correct fix for the scrolling problem in graph view: the view now saves its scrolling position before redrawing itself (addon web_graph) bzr revid: ged@openerp.com-20140422150316-m51u750732re8qib --- addons/web/static/src/js/search.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 04bb1a61d99..251f1977332 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -29,8 +29,8 @@ my.Facet = B.Model.extend({ B.Model.prototype.initialize.apply(this, arguments); this.values = new my.FacetValues(values || []); - this.values.on('add remove change reset', function () { - this.trigger('change', this); + this.values.on('add remove change reset', function (_, options) { + this.trigger('change', this, options); }, this); }, get: function (key) { @@ -399,7 +399,8 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea this.setup_global_completion(); this.query = new my.SearchQuery() .on('add change reset remove', this.proxy('do_search')) - .on('add change reset remove', this.proxy('renderFacets')); + .on('change', this.proxy('renderChangedFacets')) + .on('add reset remove', this.proxy('renderFacets')); if (this.options.hidden) { this.$el.hide(); @@ -578,14 +579,20 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea .trigger('blur'); }, /** - * - * @param {openerp.web.search.SearchQuery | openerp.web.search.Facet} _1 - * @param {openerp.web.search.Facet} [_2] + * Call the renderFacets method with the correct arguments. + * This is due to the fact that change events are called with two arguments + * (model, options) while add, reset and remove events are called with + * (collection, model, options) as arguments + */ + renderChangedFacets: function (model, options) { + this.renderFacets(undefined, model, options); + }, + /** + * @param {openerp.web.search.SearchQuery | undefined} Undefined if event is change + * @param {openerp.web.search.Facet} * @param {Object} [options] */ - renderFacets: function (_1, _2, options) { - // _1: model if event=change, otherwise collection - // _2: undefined if event=change, otherwise model + renderFacets: function (collection, model, options) { var self = this; var started = []; var $e = this.$('div.oe_searchview_facets'); @@ -610,6 +617,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea }); $.when.apply(null, started).then(function () { + if (options && options.focus_input === false) return; var input_to_focus; // options.at: facet inserted at given index, focus next input // otherwise just focus last input @@ -618,7 +626,6 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea } else { input_to_focus = self.input_subviews[(options.at + 1) * 2]; } - input_to_focus.$el.focus(); }); }, -- cgit v1.2.3 From 447fa873dfa72b49e75baa2953b9a5346b661502 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 23 Apr 2014 10:19:14 +0200 Subject: [FIX] Force zindex for elements which should be at top of a modal window. bzr revid: jke@openerp.com-20140423081914-anmpeae40z7dav4a --- addons/web/static/src/css/base.css | 14 ++++++++++---- addons/web/static/src/css/base.sass | 6 +++++- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index b8c28e1660e..9dd8e55723e 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -754,7 +754,7 @@ border-bottom-left-radius: 8px; } .openerp .oe_notification { - z-index: 1050; + z-index: 1500; } .openerp .oe_webclient_timezone_notification a { color: white; @@ -3331,6 +3331,7 @@ body.oe_single_form .oe_single_form_container { width: 18px; height: 18px; } + .modal .modal-header button.close { border: none; background: none; @@ -3341,12 +3342,17 @@ body.oe_single_form .oe_single_form_container { .modal .modal-footer { text-align: left; } -.modal .oe_act_window.modal-body{ +.modal .oe_button { + margin: 0 4px 0 0; +} +.modal .oe_act_window.modal-body { padding: 0; } -.modal .oe_button{ - margin: 0 4px 0 0; + +.ui-datepicker { + z-index: 1500 !important; } + input[type="radio"], input[type="checkbox"] { margin-right: 4px; margin-left: 4px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index a98948117f6..ebffed27410 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -666,7 +666,8 @@ $sheet-padding: 16px // }}} // Notifications {{{ .oe_notification - z-index: 1050 + z-index: 1500 + .oe_webclient_timezone_notification a color: white @@ -2725,6 +2726,9 @@ body.oe_single_form .oe_act_window.modal-body padding: 0 +.ui-datepicker + z-index: 1500 !important + input[type="radio"], input[type="checkbox"] margin-right: 4px margin-left: 4px -- cgit v1.2.3 From 48e9d255ae71b6325ab1d92c83bca4728b449410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 23 Apr 2014 11:41:24 +0200 Subject: [FIX] web: list view: fixed button behavior - icon-like behavior is the default behavior - text-based buttons (using btn_txt class) are used whenever no icon is given to the button in a list view. This way the previous behavior is always the default behavior, and the css modifications are done only for the text-based buttons, avoiding side-effects. bzr revid: tde@openerp.com-20140423094124-8zq3yysy616aowu2 --- addons/web/static/src/css/base.css | 10 ++++++---- addons/web/static/src/css/base.sass | 7 +++++-- addons/web/static/src/xml/base.xml | 7 +++---- 3 files changed, 14 insertions(+), 10 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 9dd8e55723e..503d6f84aa1 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2776,13 +2776,15 @@ padding: 3px 6px; white-space: pre-line; } -.openerp .oe_list_content > tbody > tr > td > button.btn_img, .openerp .oe_list_content > tbody > tr > th > button.btn_img { +.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button { border: none; background: transparent; padding: 0; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; +} +.openerp .oe_list_content > tbody > tr > td > button.btn_txt, .openerp .oe_list_content > tbody > tr > th > button.btn_txt { + border: 1px solid rgba(0, 0, 0, 0.4); + background: #e3e3e3; + padding: 3px 12px; } .openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child { width: 17px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index ebffed27410..8ebb2d88ca3 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -2248,11 +2248,14 @@ $sheet-padding: 16px padding: 3px 6px white-space: pre-line > td, > th - > button.btn_img + > button border: none background: transparent padding: 0 - @include box-shadow(none) + > button.btn_txt + border: 1px solid rgba(0,0,0,0.4) + background: #e3e3e3 + padding: 3px 12px > td.oe_list_checkbox:first-child, th.oe_list_checkbox:first-child width: 17px &:after diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a08de0bc4bd..85f3d3cf63b 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -800,12 +800,11 @@
+ t-att-class="disabled ? 'oe_list_button_disabled btn_txt oe_link' : 'btn_txt oe_link'" + > -- cgit v1.2.3 From 1b594f5cce8e99a6a120a326783df70ea2252a96 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 23 Apr 2014 15:15:48 +0200 Subject: [FIX]while everything is not adaptative, leave overflow-y on modal body bzr revid: csn@openerp.com-20140423131548-7hyo9eei2d2z99zc --- addons/web/static/src/xml/base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 85f3d3cf63b..3a2f22e78a1 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -40,7 +40,7 @@ - -- cgit v1.2.3 From 775e553d5a9b7abb1218bb36b22bad03221d3049 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Fri, 25 Apr 2014 15:43:40 +0530 Subject: [IMP]Improved code for add

tag bzr revid: cod@tinyerp.com-20140425101340-znewo5agt8vdl5mw --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5207794bb39..1db4112d2a4 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3365,7 +3365,7 @@ instance.web.form.M2ODialog = instance.web.Dialog.extend({ start: function() { var self = this; var text = _.str.sprintf(_t("You are creating a new %s, are you sure it does not exist yet?"), self.name); - $( "p" ).text( text ); + this.$("p").text( text ); this.$buttons.html(QWeb.render("M2ODialog.buttons")); this.$("input").val(this.getParent().last_query); this.$buttons.find(".oe_form_m2o_qc_button").click(function(){ -- cgit v1.2.3 From dde0c9324bda2aff24a832ace320f23379d1ad07 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 28 Apr 2014 20:24:51 +0200 Subject: [IMP] Convered qunit test suite to template bzr revid: fme@openerp.com-20140428182451-u4mgen9669gnldva --- addons/web/static/src/js/testing.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js index 1f1c718ad5f..5e9483addc1 100644 --- a/addons/web/static/src/js/testing.js +++ b/addons/web/static/src/js/testing.js @@ -48,15 +48,6 @@ openerp.testing = {}; testing.dependencies = window['oe_all_dependencies'] || []; testing.current_module = null; - testing.templates = { }; - testing.add_template = function (name) { - var xhr = QWeb2.Engine.prototype.get_xhr(); - xhr.open('GET', name, false); - xhr.send(null); - (testing.templates[testing.current_module] = - testing.templates[testing.current_module] || []) - .push(xhr.responseXML); - }; /** * Function which does not do anything */ @@ -206,7 +197,7 @@ openerp.testing = {}; teardown: testing.noop }); - QUnit.module(testing.current_module + '.' + name, {_oe: options}); + QUnit.module(name, {_oe: options}); body(testing['case']); }; testing['case'] = function (name, options, callback) { @@ -244,18 +235,6 @@ openerp.testing = {}; expect(opts.asserts); } - if (opts.templates) { - for(var i=0; i Date: Wed, 30 Apr 2014 09:33:42 +0200 Subject: [REM] useless load_script bzr revid: fme@openerp.com-20140430073342-nyjdb88soxggzkvr --- addons/web/static/src/js/openerpframework.js | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js index 8a2961e058f..5dcc2197944 100644 --- a/addons/web/static/src/js/openerpframework.js +++ b/addons/web/static/src/js/openerpframework.js @@ -1477,26 +1477,6 @@ openerp.time_to_str = function(obj) { + lpad(obj.getSeconds(),2); }; -openerp.load_script = function (url) { - var def = $.Deferred(); - if (document.getElementById(url)) { - def.resolve(); - } else { - var script = document.createElement('script'); - script.type = 'text/javascript'; - script.src = script.id = url; - script.onload = function () { - def.resolve(); - }; - script.onerror = function () { - console.error("Error loading file", url); - def.reject(); - }; - document.head.appendChild(script); - } - return def; -}; - openerp.declare = declare; return openerp; -- cgit v1.2.3 From af03a3e4e02dbdc3bb69ac13940b229d1e2b5387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Snauwaert?= <> Date: Wed, 30 Apr 2014 13:56:50 +0200 Subject: [FIX] export: make the 'Close' button works fine with modal bzr revid: mat@openerp.com-20140430115650-334th9boorlb80aw --- addons/web/static/src/js/data_export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index 2de933f45e8..2f7ff81d089 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -32,7 +32,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ var self = this; var options = { buttons: [ - {text: _t("Close"), click: function () { self.close(); }}, + {text: _t("Close"), click: function () { self.$el.parents('.modal').modal('hide'); }}, {text: _t("Export To File"), click: function () { self.on_click_export_data(); }} ], close: function () { self.close();} -- cgit v1.2.3 From aa943fae185ee7129fcaf9ef69dd1de2f5e045b5 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 1 May 2014 22:42:42 +0200 Subject: [FIX] qweb loading concat mode only, increase cache age to one day bzr revid: al@openerp.com-20140501204242-jngte754yqyj4nb0 --- addons/web/static/src/js/core.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 74866112d99..c64da7e5810 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -232,7 +232,7 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ var self = this; return this.session_reload().then(function(result) { var modules = instance._modules.join(','); - var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).then(self.load_qweb.bind(self)); + var deferred = self.load_qweb(modules); if(self.session_is_valid()) { return deferred.then(function() { return self.load_modules(); }); } @@ -318,7 +318,7 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ loaded = $.when( loaded, self.rpc('/web/webclient/csslist', {mods: to_load}).done(self.load_css.bind(self)), - self.rpc('/web/webclient/qweblist', {mods: to_load}).then(self.load_qweb.bind(self)), + self.load_qweb(to_load), self.rpc('/web/webclient/jslist', {mods: to_load}).done(function(files) { file_list = file_list.concat(files); }) @@ -375,14 +375,12 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ } return d; }, - load_qweb: function(files) { + load_qweb: function(mods) { var self = this; - _.each(files, function(file) { - self.qweb_mutex.exec(function() { - return self.rpc('/web/proxy/load', {path: file}).then(function(xml) { - if (!xml) { return; } - instance.web.qweb.add_template(_.str.trim(xml)); - }); + self.qweb_mutex.exec(function() { + return self.rpc('/web/proxy/load', {path: '/web/webclient/qweb?mods=' + mods}).then(function(xml) { + if (!xml) { return; } + instance.web.qweb.add_template(_.str.trim(xml)); }); }); return self.qweb_mutex.def; -- cgit v1.2.3