From 87afddd90785c86306bd7dfd1522bf8e8b5e2f47 Mon Sep 17 00:00:00 2001 From: vishmita Date: Tue, 15 May 2012 14:30:51 +0530 Subject: [FIX]Password error in backup database. lp bug: https://launchpad.net/bugs/986781 fixed bzr revid: vja@vja-desktop-20120515090051-mg8xi4pdt4dbal1l --- addons/web/static/src/js/chrome.js | 9 ++++++++- 1 file changed, 8 insertions(+), 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 d1ff69d22cb..475f0b4d16e 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -392,7 +392,14 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ success: function () { self.do_notify(_t("Backed"), _t("Database backed up successfully")); }, - error: instance.webclient.crashmanager.on_rpc_error, + error: function(){ + if (instance.webclient.crashmanager.on_rpc_error) { + self.display_error({ + title: 'Backup Database', + error: 'AccessDenied' + }); + } + }, complete: function() { self.unblockUI(); } -- cgit v1.2.3 From 2d7a4327e8b48713934aeb46c5aaff2f1fc8b485 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 8 Jun 2012 13:23:58 +0200 Subject: [ADD] make clicking on the needaction tag/count enable a predefined filter by default bzr revid: xmo@openerp.com-20120608112358-wo8uwd8ad4esrmsx --- addons/web/static/src/js/chrome.js | 67 +++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 27 deletions(-) (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 a36421f2b2b..2b0f755f75f 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -669,32 +669,36 @@ instance.web.Menu = instance.web.Widget.extend({ * * @param {Number} id the menu_id */ - menu_click: function(id) { - if (id) { - this.do_hide_more(); - // find back the menuitem in dom to get the action - var $item = this.$element.find('a[data-menu=' + id + ']'); - if (!$item.length) { - $item = this.$secondary_menus.find('a[data-menu=' + id + ']'); - } - var action_id = $item.data('action-id'); - // If first level menu doesnt have action trigger first leaf - if (!action_id) { - if(this.$element.has($item).length) { - $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']'); - $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]'); - if($items.length) { - action_id = $items.data('action-id'); - id = $items.data('menu'); - } + menu_click: function(id, needaction) { + if (!id) { return; } + + this.do_hide_more(); + // find back the menuitem in dom to get the action + var $item = this.$element.find('a[data-menu=' + id + ']'); + if (!$item.length) { + $item = this.$secondary_menus.find('a[data-menu=' + id + ']'); + } + var action_id = $item.data('action-id'); + // If first level menu doesnt have action trigger first leaf + if (!action_id) { + if(this.$element.has($item).length) { + var $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']'); + var $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]'); + if($items.length) { + action_id = $items.data('action-id'); + id = $items.data('menu'); } } - this.open_menu(id); - this.current_menu = id; - this.session.active_id = id; - if (action_id) { - this.trigger('menu_click', action_id, id, $item); - } + } + this.open_menu(id); + this.current_menu = id; + this.session.active_id = id; + if (action_id) { + this.trigger('menu_click', { + action_id: action_id, + needaction: needaction, + id: id + }, $item); } }, /** @@ -703,7 +707,8 @@ instance.web.Menu = instance.web.Widget.extend({ * @param {Event} ev the jquery event */ on_menu_click: function(ev) { - this.menu_click($(ev.currentTarget).data('menu')); + var needaction = !!$(ev.target).filter('div.oe_menu_counter').length; + this.menu_click($(ev.currentTarget).data('menu'), needaction); ev.stopPropagation(); return false; }, @@ -988,8 +993,16 @@ instance.web.WebClient = instance.web.Widget.extend({ this._current_state = _.clone(state); $.bbq.pushState(url); }, - on_menu_action: function(action) { - this.action_manager.do_action(action); + on_menu_action: function(options) { + var self = this; + this.rpc("/web/action/load", { action_id: options.action_id }) + .then(function (result) { + var action = result.result; + if (options.needaction) { + action.context.search_default_needaction_pending = true; + } + self.action_manager.do_action(action); + }); }, do_action: function(action) { var self = this; -- cgit v1.2.3 From c6f4efa99e563b6bbd288abf077edf1d767253e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 21 Jun 2012 10:29:54 +0200 Subject: [FIX] chrome.js: removed a do_hide_more that was left wshen merging trunk. bzr revid: tde@openerp.com-20120621082954-5nkypmhlkkthlp45 --- addons/web/static/src/js/chrome.js | 1 - 1 file changed, 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 88074525d08..41cab5f0834 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -669,7 +669,6 @@ instance.web.Menu = instance.web.Widget.extend({ menu_click: function(id, needaction) { if (!id) { return; } - this.do_hide_more(); // find back the menuitem in dom to get the action var $item = this.$element.find('a[data-menu=' + id + ']'); if (!$item.length) { -- cgit v1.2.3 From 26dc7e2fa936dd1692a6d9fe767cde520695042b Mon Sep 17 00:00:00 2001 From: Vishmita Date: Thu, 21 Jun 2012 14:34:25 +0530 Subject: [FIX]Minor changes. bzr revid: vja@tinyerp.com-20120621090425-wa3lrw5tait9lt9s --- addons/web/static/src/js/chrome.js | 10 +++++----- addons/web/static/src/js/coresetup.js | 13 ++++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) (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 475f0b4d16e..1b318ae13de 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -392,13 +392,13 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ success: function () { self.do_notify(_t("Backed"), _t("Database backed up successfully")); }, - error: function(){ - if (instance.webclient.crashmanager.on_rpc_error) { - self.display_error({ + error: function(error){ + if(error){ + self.display_error({ title: 'Backup Database', error: 'AccessDenied' - }); - } + }); + } }, complete: function() { self.unblockUI(); diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 8e7b5d4f75d..b8924d81680 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -332,11 +332,14 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess .appendTo(document.body) .load(function () { try { - if (options.error) { - options.error(JSON.parse( - this.contentDocument.body.childNodes[1].textContent - )); - } + 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)); + } + } } finally { complete(); } -- cgit v1.2.3 From de4cfe7920f0cc5d0d4b42e5dee1f9168a67818e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 21 Jun 2012 11:26:32 +0200 Subject: [CLEAN] chrome.js: fixed indentation issue, thanks to meld. bzr revid: tde@openerp.com-20120621092632-k13ixq4xea2p1btx --- 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 41cab5f0834..140b9082c35 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -704,7 +704,7 @@ instance.web.Menu = instance.web.Widget.extend({ */ on_menu_click: function(ev) { var needaction = !!$(ev.target).filter('div.oe_menu_counter').length; - ev.preventDefault(); + ev.preventDefault(); this.menu_click($(ev.currentTarget).data('menu'), needaction); }, }); -- cgit v1.2.3 From dd2b3227a8c2e8d39fad5139ff575eea6d02d660 Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Mon, 25 Jun 2012 16:48:45 +0200 Subject: Graph dropdown toggle improvement bzr revid: mit@openerp.com-20120625144845-idyfjd3px6pct5jj --- addons/web/static/src/css/base.css | 7 ++++++- addons/web/static/src/css/base.sass | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) (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 0d4912c2840..986539e5555 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"); @@ -315,6 +315,11 @@ list-style: none; zoom: 1; } +.openerp .oe_notebook.ui-corner-all { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} .openerp .oe_notebook:before, .openerp .oe_notebook:after { display: table; content: ""; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 35e1d08e17f..389490bcd0a 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -275,6 +275,8 @@ $colour4: #8a89ba padding: 0 16px list-style: none zoom: 1 + .oe_notebook.ui-corner-all + @include radius(0) .oe_notebook:before, .oe_notebook:after display: table content: "" -- cgit v1.2.3 From cc2d116e47e27eccc00ec215c3fe3ef1f65f13cb Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 25 Jun 2012 17:35:45 +0200 Subject: [IMP] better integration of openerp's i18n in timeago.js a suggestion for easier third party i18n integration will be made on the original project's git repo: https://github.com/rmm5t/jquery-timeago bzr revid: abo@openerp.com-20120625153545-zca7qljrizugxntk --- addons/web/static/src/js/coresetup.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 99e134e7bd4..ace41234e0c 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -606,12 +606,7 @@ instance.web.qweb.preprocess_node = function() { /** Setup jQuery timeago */ var timeago_setup = function () { - var s = $.timeago.settings.strings; - _.each(s, function(v,k) { - if(_.isString(v)) { - s[k] = instance.web._t(v); - } - }); + $.timeago.settings.translator = instance.web._t; } instance.connection.on('module_loaded', this, timeago_setup); -- cgit v1.2.3 From 1f84b7a37dd0bee6ad599e3fdc8afd5f2520a1b7 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 26 Jun 2012 11:13:07 +0200 Subject: [ADD] set 'default_' key in context when searching on a single existing record in an m2o, by default bzr revid: xmo@openerp.com-20120626091307-45vygymu8y1198ar --- addons/web/static/src/js/search.js | 9 +++++++++ 1 file changed, 9 insertions(+) (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 85521a14651..4faf9dabdd5 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1530,6 +1530,15 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({ return [[name, '=', facetValue.get('value')]]; } return this._super(name, operator, facetValue); + }, + get_context: function (facet) { + var values = facet.values; + if (!this.attrs.context && values.length === 1) { + var c = {}; + c['default_' + this.attrs.name] = values.at(0).get('value'); + return c; + } + return this._super(facet); } }); -- cgit v1.2.3 From 7b0bef5bccf900100b7c463a0c3ae62f4db27064 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 27 Jun 2012 11:57:44 +0200 Subject: [FIX] incorrect handling of present-but-empty contexts, which seem to be rather common bzr revid: xmo@openerp.com-20120627095744-ijhf7p769pw4fqdg --- addons/web/static/src/js/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 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 4faf9dabdd5..087c4c22294 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1234,7 +1234,7 @@ instance.web.search.Field = instance.web.search.Input.extend( /** @lends instanc var self = this; // A field needs a context to send when active var context = this.attrs.context; - if (!context || !facet.values.length) { + if (_.isEmpty(context) || !facet.values.length) { return; } var contexts = facet.values.map(function (facetValue) { @@ -1533,7 +1533,7 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({ }, get_context: function (facet) { var values = facet.values; - if (!this.attrs.context && values.length === 1) { + if (_.isEmpty(this.attrs.context) && values.length === 1) { var c = {}; c['default_' + this.attrs.name] = values.at(0).get('value'); return c; -- cgit v1.2.3 From 2856eeb63266e1bd9abdc2bccd8dc93cdec05ec8 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 27 Jun 2012 15:56:49 +0530 Subject: when we click in URL it opens in new tab bzr revid: ggh@tinyerp.com-20120627102649-rfq1akvhvoa2fs4l --- 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 050ce1530e6..13964263bd2 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -874,7 +874,7 @@ - +
Date: Wed, 27 Jun 2012 18:23:16 +0530 Subject: [IMP]fading out login panel while loading for easy user access bzr revid: dhr@tinyerp.com-20120627125316-ft87ccisslbo5lma --- addons/web/static/src/js/chrome.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 a398ceb67d9..b2b5ba3ac35 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -484,7 +484,7 @@ instance.web.Login = instance.web.Widget.extend({ self.databasemanager.do_exit.add_last(function() { self.databasemanager.destroy(); self.$element.find('.oe_login_bottom').show(); - self.$element.find('.oe_login_pane').show(); + self.$element.find('.oe_login_pane').show('fast'); self.load_db_list(true).then(self.proxy('_db_list_loaded')); }); }); @@ -525,7 +525,6 @@ instance.web.Login = instance.web.Widget.extend({ } var login = $e.find("form input[name=login]").val(); var password = $e.find("form input[name=password]").val(); - this.do_login(db, login, password); }, /** @@ -538,6 +537,7 @@ instance.web.Login = instance.web.Widget.extend({ do_login: function (db, login, password) { var self = this; this.$element.removeClass('oe_login_invalid'); + self.$(".oe_login_pane").fadeOut("slow"); return this.session.session_authenticate(db, login, password).pipe(function() { if (self.has_local_storage) { if(self.remember_credentials) { @@ -552,9 +552,10 @@ instance.web.Login = instance.web.Widget.extend({ localStorage.setItem('last_password_login_success', ''); } } - self.$(".oe_login_pane").fadeOut("slow"); + self.trigger("login"); },function () { + self.$(".oe_login_pane").fadeIn("fast"); self.$element.addClass("oe_login_invalid"); }); } -- cgit v1.2.3 From b543e27c3b2fb3e6f10dae8d38edef7c3496c1b2 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (OpenERP)" Date: Wed, 27 Jun 2012 18:41:42 +0530 Subject: [IMP]disabling login and pasword textbox while loading bzr revid: dhr@tinyerp.com-20120627131142-vqww3gtq4d3drdkq --- addons/web/static/src/js/chrome.js | 4 ++++ 1 file changed, 4 insertions(+) (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 b2b5ba3ac35..df991faf180 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -525,6 +525,8 @@ instance.web.Login = instance.web.Widget.extend({ } var login = $e.find("form input[name=login]").val(); var password = $e.find("form input[name=password]").val(); + $e.find("form input[name=login]").attr("disabled", "disabled"); + $e.find("form input[name=password]").attr("disabled", "disabled") this.do_login(db, login, password); }, /** @@ -557,6 +559,8 @@ instance.web.Login = instance.web.Widget.extend({ },function () { self.$(".oe_login_pane").fadeIn("fast"); self.$element.addClass("oe_login_invalid"); + self.$element.find("form input[name=login]").removeAttr("disabled"); + self.$element.find("form input[name=password]").removeAttr("disabled"); }); } }); -- cgit v1.2.3 From c5c08808f73152557577a47dd9c3eef19871f116 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 28 Jun 2012 09:41:23 +0200 Subject: [IMP] Improved topbar dropdown css bzr revid: fme@openerp.com-20120628074123-et65mt93rq9tc9ri --- addons/web/static/src/css/base.css | 1 + addons/web/static/src/css/base.sass | 1 + 2 files changed, 2 insertions(+) (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 d06c157696b..543e701b5d9 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -779,6 +779,7 @@ border-top: 4px solid white; } .openerp .oe_topbar .oe_dropdown_menu { + top: 32px; background: #333333; background: rgba(37, 37, 37, 0.9); border-color: #999999; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index a0b29b1fc81..018b4088ee0 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -612,6 +612,7 @@ $colour4: #8a89ba .oe_dropdown_arrow:after border-top: 4px solid white .oe_dropdown_menu + top: 32px background: #333 background: rgba(37,37,37,0.9) border-color: #999 -- cgit v1.2.3 From 352efe8a9963410d28fc0ed8089ddbd2330b6518 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 28 Jun 2012 11:47:45 +0200 Subject: [FIX] Fixed list pager state when Unlimited is selected bzr revid: fme@openerp.com-20120628094745-2rbxz81u1kgka2fc --- addons/web/static/src/js/view_list.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index b5634c3443f..a55a3decf1e 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -373,11 +373,12 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi } var total = dataset.size(); - this.$pager.toggleClass('oe_list_pager_single_page', (total <= this.limit())); + var limit = this.limit() || total; + this.$pager.toggleClass('oe_list_pager_single_page', (total <= limit)); var spager = '-'; if (total) { - var range_start = this.page * this.limit() + 1; - var range_stop = range_start - 1 + this.limit(); + var range_start = this.page * limit + 1; + var range_stop = range_start - 1 + limit; if (range_stop > total) { range_stop = total; } -- cgit v1.2.3 From 06c9e2eb71ba208509ccc2a0a827cbdbd33e5d04 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 12:11:00 +0200 Subject: [IMP] added doc bzr revid: nicolas.vanhoren@openerp.com-20120628101100-27kqrho2ez2xudrm --- addons/web/static/src/js/view_form.js | 4 +++- 1 file changed, 3 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 1941e48affd..7622d9a0b1f 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1513,7 +1513,9 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi this._super.apply(this, arguments); }, /** - * Sets up blur/focus forwarding from DOM elements to a widget (`this`) + * Sets up blur/focus forwarding from DOM elements to a widget (`this`). + * + * This method is an utility method that is meant to be called by child classes. * * @param {jQuery} $e jQuery object of elements to bind focus/blur on */ -- cgit v1.2.3 From 0f2b27e161781957338cb7220a38dc337557ce56 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 14:04:23 +0200 Subject: [FIX] problem with search view bzr revid: nicolas.vanhoren@openerp.com-20120628120423-1rjiwsg35oleucyq --- addons/web/static/src/js/search.js | 1 - 1 file changed, 1 deletion(-) (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 169c7053575..c3e44dde287 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -635,7 +635,6 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea (new instance.web.search.CustomFilters(this)); // add Advanced to this.inputs (new instance.web.search.Advanced(this)); - (new instance.web.search.AddToDashboard(this)); // build drawer var drawer_started = $.when.apply( -- cgit v1.2.3 From 3e30f54cbf05a072f306a868dbf6cdfea78ade93 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 14:10:53 +0200 Subject: [FIX] lot of stupid stuff in add to dashboard bzr revid: nicolas.vanhoren@openerp.com-20120628121053-nct0zo9go1bzdjrs --- addons/web/static/src/js/search.js | 55 ++++++++++++-------------------------- 1 file changed, 17 insertions(+), 38 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 c3e44dde287..3dc8866b6b7 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -640,6 +640,8 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea var drawer_started = $.when.apply( null, _(this.select_for_drawer()).invoke( 'appendTo', this.$element.find('.oe_searchview_drawer'))); + + new instance.web.search.AddToDashboard(this).appendTo($('.oe_searchview_drawer', this.$element)); // load defaults var defaults_fetched = $.when.apply(null, _(this.inputs).invoke( @@ -1637,7 +1639,7 @@ instance.web.search.Filters = instance.web.search.Input.extend({ })); } }); -instance.web.search.AddToDashboard = instance.web.search.Input.extend({ +instance.web.search.AddToDashboard = instance.web.Widget.extend({ template: 'SearchView.addtodashboard', _in_drawer: true, start: function () { @@ -1645,44 +1647,18 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({ this.data_loaded = $.Deferred(); this.dashboard_data =[]; this.$element - .on('click', 'h4', this.proxy('show_option')) - .on('submit', 'form', function (e) {e.preventDefault(); self.add_dashboard();}); + .on('click', 'h4', this.proxy('show_option')) + .on('submit', 'form', function (e) { + e.preventDefault(); + self.add_dashboard(); + }); return $.when(this.load_data(),this.data_loaded).pipe(this.proxy("render_data")); }, load_data:function(){ - // get from database if dashboard position change than also works(from Reporting to else). - /*var self = this, - ir_actions_act_window = new instance.web.Model('ir.actions.act_window',{},[['res_model','=',"board.board"],['view_id','!=',false]]) - .query(['name','id']), - map_data = function(){ - var ir_actions_values = arguments[0],ir_values = arguments[1]; - _(ir_values).each(function(res){ - var get_name = _.detect(ir_actions_values,function(name){ return name.id == parseInt((res.value).split(",")[1]);}); - self.dashboard_data.push({"res_id":res.res_id,"name":get_name.name}) - }); - self.data_loaded.resolve(); - }, - make_domain = function(result){ - var domain = []; - _(result).map(function(value,key){ - domain.push(["value","=","ir.actions.act_window,"+value.id]); - ((result.length)- 1 !== key)?domain.unshift("|"):false; - }) - return domain; - }; - return ir_actions_act_window._execute().then(function(ir_actions_values){ - if(!ir_actions_values.length) {self.data_loaded.resolve();return;} - var ir_value = new instance.web.Model('ir.values',{},make_domain(ir_actions_values)).query(['res_id','value']); - ir_value._execute().done(function(ir_values){ - map_data(ir_actions_values,ir_values); - }) - });*/ - - //===============================get from instance.webclient.menu (with less rpc call) - var self = this,dashbaord_menu = instance.webclient.menu.data.data.children, - ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']), - map_data = function(result){ - _.detect(dashbaord_menu,function(dash){ + var self = this,dashboard_menu = instance.webclient.menu.data.data.children; + var ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']); + var map_data = function(result){ + _.detect(dashboard_menu, function(dash){ var id = _.pluck(dash.children, "id"),indexof = _.indexOf(id, result.res_id); if(indexof !== -1){ self.dashboard_data = dash.children[indexof].children @@ -1700,8 +1676,10 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({ this.$element.find("input").before(selection) }, add_dashboard:function(){ - var self = this,getParent = this.getParent(),view_parent = this.view.getParent(); - if(!view_parent.action || !this.$element.find("select").val()) + var self = this; + var getParent = this.getParent(); + var view_parent = this.getParent().getParent(); + if (! view_parent.action || ! this.$element.find("select").val()) return this.do_warn("Can't find dashboard action"); data = getParent.build_search_data(), context = new instance.web.CompoundContext(getParent.dataset.get_context() || []), @@ -1731,6 +1709,7 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({ this.$element.find("input").val(this.getParent().fields_view.name || "" ); } }); + instance.web.search.Advanced = instance.web.search.Input.extend({ template: 'SearchView.advanced', _in_drawer: true, -- cgit v1.2.3 From 492af8bef457c63e93a952a75a9ba7bae647dc01 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 14:17:45 +0200 Subject: [IMP] support multiple lines in m2o bzr revid: nicolas.vanhoren@openerp.com-20120628121745-9k3r7zfy5edgnivm --- addons/web/static/src/js/view_form.js | 3 ++- 1 file changed, 2 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 7622d9a0b1f..9315e08871a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2722,9 +2722,10 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc if (!this.get("effective_readonly")) { this.$input.val(str); } else { + str = _.escape(str).replace("\n", "
"); this.$element.find('a') .unbind('click') - .text(str) + .html(str) .click(function () { self.do_action({ type: 'ir.actions.act_window', -- cgit v1.2.3 From 0cbb2e8257d99d309f1361f6117289e330ba7603 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 14:36:21 +0200 Subject: [IMP] m2o only show first line bzr revid: nicolas.vanhoren@openerp.com-20120628123621-nt7uo6e2he83w27n --- addons/web/static/src/js/view_form.js | 6 +++--- 1 file changed, 3 insertions(+), 3 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 9315e08871a..6b8c607477b 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2453,7 +2453,7 @@ instance.web.form.CompletionFieldMixin = { // possible selections for the m2o var values = _.map(data, function(x) { return { - label: _.str.escapeHTML(x[1]), + label: _.str.escapeHTML(x[1].split("\n")[0]), value:x[1], name:x[1], id:x[0] @@ -2720,9 +2720,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc display_string: function(str) { var self = this; if (!this.get("effective_readonly")) { - this.$input.val(str); + this.$input.val(str.split("\n")[0]); } else { - str = _.escape(str).replace("\n", "
"); + str = _.escape(str).split("\n").join("
"); this.$element.find('a') .unbind('click') .html(str) -- cgit v1.2.3 From 4f6e8b25e1306f5338bcd5b7e82e55ba0b81bfae Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 14:52:42 +0200 Subject: [IMP] added 'always_reload' option to m2o bzr revid: nicolas.vanhoren@openerp.com-20120628125242-t3pf093fe88nrv8k --- addons/web/static/src/js/view_form.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 6b8c607477b..7592d4630e5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2448,7 +2448,7 @@ instance.web.form.CompletionFieldMixin = { return this.orderer.add(dataset.name_search( search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]), - 'ilike', this.limit + 1)).pipe(function(data) { + 'ilike', this.limit + 1, self.build_context())).pipe(function(data) { self.last_search = data; // possible selections for the m2o var values = _.map(data, function(x) { @@ -2710,7 +2710,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc return; } if (! no_recurse) { - var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context()); + var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context()); dataset.name_get([self.get("value")], function(data) { self.display_value["" + self.get("value")] = data[0][1]; self.render_value(true); @@ -2743,7 +2743,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc var self = this; if (value_ instanceof Array) { this.display_value = {}; - this.display_value["" + value_[0]] = value_[1]; + if (! this.get_definition_options().always_reload) { + this.display_value["" + value_[0]] = value_[1]; + } value_ = value_[0]; } value_ = value_ || false; -- cgit v1.2.3 From 69b7200d5a38e7a2b04f4611d839cc0dd2eb38a1 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 28 Jun 2012 15:02:49 +0200 Subject: [ADD] Restore default_focus in forms bzr revid: fme@openerp.com-20120628130249-31x3zb88fpan003m --- addons/web/static/src/js/view_form.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 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 7592d4630e5..c8041b82f03 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -322,9 +322,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM if (self.sidebar) { self.sidebar.do_attachement_update(self.dataset, self.datarecord.id); } - if (self.default_focus_field) { - self.default_focus_field.focus(); - } if (record.id) { self.do_push_state({id:record.id}); } @@ -573,6 +570,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM _.each(this.fields,function(field){ field.set({"force_readonly": false}); }); + var fields_order = self.fields_order.slice(0); + if (self.default_focus_field) { + fields_order.unshift(self.default_focus_field); + } + for (var i = 0; i < fields_order.length; i += 1) { + var field = self.fields[fields_order[i]]; + if (!field.get('effective_invisible') && !field.get('effective_readonly') && field.focus() !== false) { + break; + } + } } }, on_button_save: function() { @@ -909,6 +916,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM register_field: function(field, name) { this.fields[name] = field; this.fields_order.push(name); + if (field.node.attrs.default_focus == '1') { + this.default_focus_field = field; + } field.on('focused', null, this.proxy('widgetFocused')) .on('blurred', null, this.proxy('widgetBlurred')); @@ -1764,7 +1774,7 @@ instance.web.form.FieldInterface = { */ is_syntax_valid: function() {}, /** - * Must set the focus on the field. + * Must set the focus on the field. Return false if field is not focusable. */ focus: function() {}, }; @@ -4462,6 +4472,9 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ elem.css("color", color); } }, + focus: function() { + return false; + }, }); /** -- cgit v1.2.3 From 6cb0451944689577177ce65ced59b38cfde76821 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 28 Jun 2012 15:06:20 +0200 Subject: [ADD] Add 'Advanced Search' title on the search view dropdown toggle bzr revid: fme@openerp.com-20120628130620-v68h4qx440rq1ndk --- 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 13be46806cb..b82a4a6db14 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1202,7 +1202,7 @@
-
+
-- cgit v1.2.3 From 7cc69d917beaab4598f82ccb8e72cec4b7fb55b9 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 28 Jun 2012 15:08:08 +0200 Subject: [FIX] minor inconsistency in m2o bzr revid: nicolas.vanhoren@openerp.com-20120628130808-od8p8e52p02w63dc --- addons/web/static/src/js/view_form.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 c8041b82f03..632080b2ba9 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2462,11 +2462,12 @@ instance.web.form.CompletionFieldMixin = { self.last_search = data; // possible selections for the m2o var values = _.map(data, function(x) { + x[1] = x[1].split("\n")[0]; return { - label: _.str.escapeHTML(x[1].split("\n")[0]), - value:x[1], - name:x[1], - id:x[0] + label: _.str.escapeHTML(x[1]), + value: x[1], + name: x[1], + id: x[0], }; }); -- cgit v1.2.3 From 21cf7115be08aa00ed98bb33e753316737a8a8b6 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Thu, 28 Jun 2012 15:33:53 +0200 Subject: [IMP] make the strings composed by timeago.js easy to spot for launchpad rosetta by explicitly calling _t() method on them bzr revid: abo@openerp.com-20120628133353-7dx34sktz9eh3xxd --- addons/web/static/src/js/coresetup.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index ace41234e0c..b599a543055 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -606,7 +606,28 @@ instance.web.qweb.preprocess_node = function() { /** Setup jQuery timeago */ var timeago_setup = function () { + // provide timeago.js with our own translator method $.timeago.settings.translator = instance.web._t; + + /* + * Strings in timeago are "composed" with prefixes, words and suffixes. + * This makes their detection by the translating system pretty much + * imposible, so we'll declare those which will be used in a more explicit + * way. + */ + var timeAgoStrings = [ + instance.web._t('less than a minute ago'), + instance.web._t('about a minute ago'), + instance.web._t('%d minutes ago'), + instance.web._t('about an hour ago'), + instance.web._t('%d hours ago'), + instance.web._t('a day ago'), + instance.web._t('%d days ago'), + instance.web._t('about a month ago'), + instance.web._t('%d months ago'), + instance.web._t('about a year ago'), + instance.web._t('%d years ago'), + ]; } instance.connection.on('module_loaded', this, timeago_setup); -- cgit v1.2.3 From 89b2b1e3072f950c1e93ba9dc217819326904557 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 28 Jun 2012 16:32:52 +0200 Subject: [CHG] Applied new rules to oe_highlight. Added action.target to oe_view_manager class oe_highlight depend on target of the action current: readonly: red, editmode: dont apply inline : always red new: always red and save is always red (so no dirty anymore but keep the class just in case) bzr revid: fme@openerp.com-20120628143252-r9jxckyet9v1qn1l --- addons/web/static/src/css/base.css | 16 ++++++++-------- addons/web/static/src/css/base.sass | 4 ++-- addons/web/static/src/js/views.js | 5 +++-- addons/web/static/src/xml/base.xml | 2 +- 4 files changed, 14 insertions(+), 13 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 543e701b5d9..2bcb8d1ac3d 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1162,10 +1162,10 @@ .openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after { content: "f"; } -.openerp .oe_view_manager_global { +.openerp .oe_view_manager_current, .openerp .oe_view_manager_inline { height: 100%; } -.openerp .oe_view_manager_global > .oe_view_manager_header { +.openerp .oe_view_manager_current > .oe_view_manager_header, .openerp .oe_view_manager_inline > .oe_view_manager_header { border-top: 1px solid #cacaca; border-bottom: 1px solid #cacaca; background-color: #fcfcfc; @@ -1179,10 +1179,10 @@ -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); } -.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row td { +.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row td { padding: 8px; } -.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td { +.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row:first-child td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row:first-child td { padding-top: 8px; } .openerp .oe_popup_form > .oe_formview > .oe_form_pager { @@ -1566,11 +1566,11 @@ background-color: #ff6666 !important; border: 1px solid #dd0000 !important; } -.openerp .oe_form_editable .oe_highlight { +.openerp .oe_view_manager_current .oe_form_editable .oe_highlight { color: #404040; background: none; } -.openerp .oe_form_editable button.oe_highlight { +.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight { background-color: #efefef; background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8); @@ -1582,7 +1582,7 @@ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; } -.openerp .oe_form_editable button.oe_highlight:active { +.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:active { background-color: #e3e3e3; background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)); background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6); @@ -1594,7 +1594,7 @@ -webkit-box-shadow: none; box-shadow: none; } -.openerp .oe_form_editable button.oe_highlight:hover { +.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:hover { background-color: #f6f6f6; background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3); diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 018b4088ee0..116ca3c2ca2 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -913,7 +913,7 @@ $colour4: #8a89ba content: "f" // }}} // ViewManager application {{{ - .oe_view_manager_global + .oe_view_manager_current, .oe_view_manager_inline height: 100% > .oe_view_manager_header border-top: 1px solid #cacaca @@ -1241,7 +1241,7 @@ $colour4: #8a89ba input, select, textarea background-color: #F66 !important border: 1px solid #D00 !important - .oe_form_editable + .oe_view_manager_current .oe_form_editable .oe_highlight color: #404040 background: none diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 8d0493a9753..a364b9e0669 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -136,7 +136,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ }; } if (action.target === 'new') { - if (this.dialog == null) { + if (this.dialog === null) { this.dialog = new instance.web.Dialog(this, { width: '80%' }); if(on_close) this.dialog.on_close.add(on_close); @@ -146,6 +146,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.dialog.dialog_title = action.name; this.dialog_viewmanager = new instance.web.ViewManagerAction(this, action); this.dialog_viewmanager.appendTo(this.dialog.$element); + this.dialog_viewmanager.$element.addClass("oe_view_manager_" + action.target); this.dialog.open(); } else { this.dialog_stop(); @@ -158,7 +159,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.inner_action = action; this.inner_viewmanager = new instance.web.ViewManagerAction(this, action); this.inner_viewmanager.appendTo(this.$element); - this.inner_viewmanager.$element.addClass("oe_view_manager_global"); + this.inner_viewmanager.$element.addClass("oe_view_manager_" + action.target); } }, ir_actions_act_window_close: function (action, on_closed) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6c5ea76f394..09df3d246f4 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -684,7 +684,7 @@ - or
Discard + or Discard
-- cgit v1.2.3 From 656d3ac9dd436ce417f5e1323f7df3a5f0afde8e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 28 Jun 2012 16:36:16 +0200 Subject: [FIX] typo during process of o2m autosave bzr revid: xmo@openerp.com-20120628143616-79bpmgty632fp0in --- addons/web/static/src/js/view_form.js | 4 ++-- 1 file 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 632080b2ba9..13757f08ab0 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1876,7 +1876,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w is_false: function() { return this.get('value') === false; }, - _check_css_flags: function(show_invalid) { + _check_css_flags: function() { if (this.field.translate) { this.$element.find('.oe_field_translate').toggle(!this.field_manager.is_create_mode()); } @@ -3178,7 +3178,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ // Otherwise validate internal form return _(form.fields).chain() .invoke(function () { - this._check_css_flag(); + this._check_css_flags(); return this.is_valid(); }) .all(_.identity) -- cgit v1.2.3 From 3f6307bc0d39e17887c900a7e79a531ef3458a41 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 28 Jun 2012 16:57:19 +0200 Subject: [FIX] unfuck editable o2m icon in last cell bzr revid: xmo@openerp.com-20120628145719-vnbhicr1bxw9bwye --- addons/web/static/src/css/base.css | 8 +++++++- addons/web/static/src/css/base.sass | 6 +++++- addons/web/static/src/xml/base.xml | 2 +- 3 files changed, 13 insertions(+), 3 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 2bcb8d1ac3d..8df712d88d1 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2014,7 +2014,10 @@ display: none; } .openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save { - background-image: url(/web/static/src/img/iconset-b-remove.png); + background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat; +} +.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save:before { + visibility: hidden; } .openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top { display: none; @@ -2144,6 +2147,9 @@ .openerp .oe_list_content .numeric input { text-align: right; } +.openerp .oe_list_content .oe_list_edit_row_save:before { + content: "S"; +} .openerp .oe_trad_field.touched { border: 1px solid green !important; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 116ca3c2ca2..2846ce7235d 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1590,7 +1590,9 @@ $colour4: #8a89ba .oe_form_field_one2many // TODO: oe_form_field_one2many_list? .oe_list .oe_list_edit_row_save - background-image: url(/web/static/src/img/iconset-b-remove.png) + background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat + &:before + visibility: hidden &> .oe_view_manager .oe_header_row_top @@ -1685,6 +1687,8 @@ $colour4: #8a89ba width: 82px input text-align: right + .oe_list_edit_row_save:before + content: "S" // }}} // Translation {{{ .oe_trad_field.touched diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 09df3d246f4..46fab28d791 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -665,7 +665,7 @@ - + - or Import + + or Import +
-- cgit v1.2.3 From dc902a89fb78caf41aebc403eaed5a2723fed56c Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Mon, 2 Jul 2012 23:34:48 +0200 Subject: [FIX] inline mode hide view manager, fix nosheet margins bzr revid: al@openerp.com-20120702213448-2gphmpsen8imtgvx --- addons/web/static/src/css/base.css | 24 +++++++++++++++++------- addons/web/static/src/css/base.sass | 17 +++++++++++++---- 2 files changed, 30 insertions(+), 11 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 cf84870047d..68fdbc8a215 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1173,10 +1173,10 @@ .openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after { content: "f"; } -.openerp .oe_view_manager_current, .openerp .oe_view_manager_inline { +.openerp .oe_view_manager_current { height: 100%; } -.openerp .oe_view_manager_current > .oe_view_manager_header, .openerp .oe_view_manager_inline > .oe_view_manager_header { +.openerp .oe_view_manager_current > .oe_view_manager_header { border-top: 1px solid #cacaca; border-bottom: 1px solid #cacaca; background-color: #fcfcfc; @@ -1190,12 +1190,18 @@ -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1); } -.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row td { +.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row td { padding: 8px; } -.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row:first-child td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row:first-child td { +.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row:first-child td { padding-top: 8px; } +.openerp .oe_view_manager_inline { + height: 100%; +} +.openerp .oe_view_manager_inline > .oe_view_manager_header { + display: none; +} .openerp .oe_popup_form > .oe_formview > .oe_form_pager { display: none !important; } @@ -1623,9 +1629,13 @@ .openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { display: none !important; } -.openerp .oe_form_nosheet > *:not(header) { - margin-left: 10px !important; - margin-right: 10px !important; +.openerp .oe_form_nosheet { + margin-left: 10px; + margin-right: 10px; +} +.openerp .oe_form_nosheet > header { + margin-left: -10px; + margin-right: -10px; } .openerp .oe_form header { position: relative; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 93a1b2cf289..395b9dd694b 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -921,7 +921,7 @@ $colour4: #8a89ba content: "f" // }}} // ViewManager application {{{ - .oe_view_manager_current, .oe_view_manager_inline + .oe_view_manager_current height: 100% > .oe_view_manager_header border-top: 1px solid #cacaca @@ -935,6 +935,12 @@ $colour4: #8a89ba td padding-top: 8px // }}} + // ViewManager inline {{{ + .oe_view_manager_inline + height: 100% + > .oe_view_manager_header + display: none + // }}} // Viewmanager popup {{{ .oe_popup_form > .oe_formview > .oe_form_pager display: none !important @@ -1267,9 +1273,12 @@ $colour4: #8a89ba .oe_form_readonly .oe_edit_only, .oe_form_field:empty display: none !important - .oe_form_nosheet > *:not(header) - margin-left: 10px !important - margin-right: 10px !important + .oe_form_nosheet + margin-left: 10px + margin-right: 10px + .oe_form_nosheet > header + margin-left: -10px + margin-right: -10px // }}} // FormView.custom tags and classes {{{ .oe_form -- cgit v1.2.3 From 72ba5b724686c38113aa649ed01a5e8071d96dbf Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 3 Jul 2012 08:07:35 +0200 Subject: [IMP] improved CSS for oe_title bzr revid: fp@tinyerp.com-20120703060735-l2x8pkgxr6cv6j7k --- addons/web/static/src/css/base.css | 4 ++-- addons/web/static/src/css/base.sass | 2 +- 2 files changed, 3 insertions(+), 3 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 68fdbc8a215..d6212b64739 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -34,7 +34,7 @@ background: white; /* http://www.quirksmode.org/dom/inputfile.html * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image - */ + */ */ } .openerp a { text-decoration: none; @@ -294,7 +294,7 @@ background: #ed6f6a; } .openerp .oe_title { - width: 55%; + width: 60%; } .openerp .oe_title:after { content: "."; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 395b9dd694b..3010de3f675 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -260,7 +260,7 @@ $colour4: #8a89ba &:hover background: #ED6F6A .oe_title - width: 55% + width: 60% .oe_title:after content: "." display: block -- cgit v1.2.3 From 50413828c552636b596b1b572addc68fae5c261c Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 3 Jul 2012 11:53:11 +0200 Subject: [FIX] problem in m2o due to wrong element destruction in dialogs bzr revid: nicolas.vanhoren@openerp.com-20120703095311-4p3g3btqlsn4z0bl --- addons/web/static/src/js/chrome.js | 10 +++++++--- addons/web/static/src/js/views.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (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 031dc6cf9a5..b87ebe56856 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -136,14 +136,18 @@ instance.web.Dialog = instance.web.Widget.extend({ }, on_close: function() { if (this.dialog_options.destroy_on_close) { - this.$element.dialog('destroy'); + this.destroy(); } }, on_resized: function() { }, destroy: function () { - this.close(); - this.$element.dialog('destroy'); + _.each(this.getChildren(), function(el) { + el.destroy(); + }); + if (! this.isDestroyed()) { + this.$element.dialog('destroy'); + } this._super(); } }); diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index a364b9e0669..98df8a0af0d 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -144,7 +144,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.dialog_viewmanager.destroy(); } this.dialog.dialog_title = action.name; - this.dialog_viewmanager = new instance.web.ViewManagerAction(this, action); + this.dialog_viewmanager = new instance.web.ViewManagerAction(this.dialog, action); this.dialog_viewmanager.appendTo(this.dialog.$element); this.dialog_viewmanager.$element.addClass("oe_view_manager_" + action.target); this.dialog.open(); -- cgit v1.2.3 From e1ce5f153962d7b51a4f9a958b932a114807e969 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 3 Jul 2012 17:14:01 +0200 Subject: [FIX] correct jsonp. backport of revid:chs@openerp.com-20120531132020-ccagkni2dqu6i75u from 6.1 branch bzr revid: chs@openerp.com-20120703151401-tmb3puk00cigfdpl --- addons/web/static/src/js/corelib.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 5af51fa519a..1ed4c4788e3 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -1307,19 +1307,19 @@ instance.web.JsonRPC = instance.web.CallbackEnabled.extend({ } else { // Indirect jsonp request var ifid = _.uniqueId('oe_rpc_iframe'); - var display = options.openerp.debug ? 'block' : 'none'; + var display = self.debug ? 'block' : 'none'; var $iframe = $(_.str.sprintf("", ifid, ifid, display)); var $form = $('
') .attr('method', 'POST') .attr('target', ifid) .attr('enctype', "multipart/form-data") - .attr('action', ajax.url + '?' + $.param(data)) + .attr('action', ajax.url + '?jsonp=1&' + $.param(data)) .append($('').attr('value', payload_str)) .hide() .appendTo($('body')); var cleanUp = function() { if ($iframe) { - $iframe.unbind("load").attr("src", "javascript:false;").remove(); + $iframe.unbind("load").remove(); } $form.remove(); }; -- cgit v1.2.3 From fa5ef483d5381b683e0cf4f54bfd6e97d69c4d39 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 3 Jul 2012 17:55:40 +0200 Subject: [IMP] added exception in list view when trying to group on a field not declarer in the list view bzr revid: nicolas.vanhoren@openerp.com-20120703155540-0sp4m80yqa9r4ati --- addons/web/static/src/js/view_list.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index b19e483bed9..3033404b387 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -1328,6 +1328,11 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we row_data[group.grouped_on] = group; var group_column = _(self.columns).detect(function (column) { return column.id === group.grouped_on; }); + if (! group_column) { + throw new Error(_.str.sprintf( + _t("Grouping on field '%s' is not possible because that field does not appear in the list view."), + group.grouped_on)); + } try { $group_column.html(instance.web.format_cell( row_data, group_column, { -- cgit v1.2.3 From 9d908a38faa05716bb45c379ce63d6fe028982e6 Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Thu, 5 Jul 2012 13:58:47 +0200 Subject: various improvements to design bzr revid: mit@openerp.com-20120705115847-5oncw7ynqxs5m9ig --- addons/web/static/src/css/base.css | 25 +++++++++++++++++++------ addons/web/static/src/css/base.sass | 21 +++++++++++++++++---- 2 files changed, 36 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 39dc2fa86f8..443563a096b 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"); @@ -34,7 +34,7 @@ background: white; /* http://www.quirksmode.org/dom/inputfile.html * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image - */ */ + */ } .openerp a { text-decoration: none; @@ -352,6 +352,19 @@ .openerp .oe_button.oe_link span:hover { text-decoration: underline; } +.openerp .oe_star_on, .openerp .oe_star_off { + color: #cccccc; + text-shadow: 0 0 2px black; + vertical-align: top; + position: relative; + top: -5px; +} +.openerp .oe_star_on:hover, .openerp .oe_star_off:hover { + text-decoration: none; +} +.openerp .oe_star_on { + color: gold; +} .openerp.oe_tooltip { font-size: 12px; } @@ -446,12 +459,12 @@ .openerp .oe_dropdown_menu { display: none; position: absolute; - top: 28px; + top: 32px; z-index: 1; border: 1px solid #afafb6; background: white; - padding: 8px; - min-width: 120px; + padding: 6px 0; + min-width: 140px; text-align: left; -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -481,7 +494,7 @@ .openerp .oe_dropdown_menu > li > a { white-space: nowrap; display: block; - padding: 3px 6px; + padding: 4px 15px; color: #4c4c4c; text-decoration: none; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 0612d8dd3a0..61b7d267551 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -287,6 +287,18 @@ $colour4: #8a89ba font-weight: bold &:hover text-decoration: underline + .oe_star_on, .oe_star_off + color: #cccccc + text-shadow: 0 0 2px black + vertical-align: top + position: relative + top: -5px + + .oe_star_on:hover, .oe_star_off:hover + text-decoration: none + + .oe_star_on + color: gold //.oe_edit_only  // }}} @@ -363,12 +375,12 @@ $colour4: #8a89ba .oe_dropdown_menu display: none position: absolute - top: 28px + top: 32px z-index: 1 border: 1px solid #afafb6 background: white - padding: 8px - min-width: 120px + padding: 6px 0 + min-width: 140px text-align: left @include radius(3px) @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) @@ -383,7 +395,7 @@ $colour4: #8a89ba > a white-space: nowrap display: block - padding: 3px 6px + padding: 4px 15px color: #4c4c4c text-decoration: none &:hover @@ -637,6 +649,7 @@ $colour4: #8a89ba &:hover @include vertical-gradient(#292929, #191919) @include box-shadow(none) + // }}} // Webclient.leftbar {{{ .oe_leftbar -- cgit v1.2.3 From 8eac49ea96e4140ec319affb55c75e96e19e4978 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 5 Jul 2012 15:20:03 +0200 Subject: [IMP] white background bzr revid: fp@tinyerp.com-20120705132003-palqn02yh8gq6535 --- addons/web/static/src/css/base.css | 5 ++--- addons/web/static/src/css/base.sass | 1 - 2 files changed, 2 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 443563a096b..416d92672c6 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"); @@ -34,7 +34,7 @@ background: white; /* http://www.quirksmode.org/dom/inputfile.html * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image - */ + */ */ } .openerp a { text-decoration: none; @@ -2126,7 +2126,6 @@ } .openerp .oe_list_content > tbody { cursor: pointer; - background: white; } .openerp .oe_list_content > tbody > tr { border-top: 1px solid #dddddd; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 61b7d267551..586bdd7eece 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1683,7 +1683,6 @@ $colour4: #8a89ba @include opacity(0.6) > tbody cursor: pointer - background: white > tr border-top: 1px solid #ddd > td.oe_list_field_cell -- cgit v1.2.3 From edf61ae586625906a15c6708d4561cb6c51590e8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 5 Jul 2012 15:41:53 +0200 Subject: [IMP] original width of minh mockup bzr revid: fp@tinyerp.com-20120705134153-mxz87km72zos9idd --- 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 416d92672c6..ac767243e75 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1743,7 +1743,7 @@ } .openerp .oe_application .oe_form_sheet_width { min-width: 650px; - max-width: 960px; + max-width: 860px; margin: 0 auto; } .openerp .oe_application .oe_form_sheet { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 586bdd7eece..cdb14123666 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1362,7 +1362,7 @@ $colour4: #8a89ba border-bottom: 1px solid #ddd .oe_form_sheet_width min-width: 650px - max-width: 960px + max-width: 860px margin: 0 auto .oe_form_sheet background: white -- cgit v1.2.3 From f323d4209d818b944e894024fa97d192f011ba9e Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 6 Jul 2012 09:30:30 +0200 Subject: [IMP] width of sheet in a variable bzr revid: fp@tinyerp.com-20120706073030-dejwb1d37cmjm738 --- addons/web/static/src/css/base.css | 2 +- addons/web/static/src/css/base.sass | 5 +++-- 2 files changed, 4 insertions(+), 3 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 ac767243e75..863dbb80044 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1674,7 +1674,7 @@ } .openerp .oe_form footer { min-width: 650px; - max-width: 960px; + max-width: 860px; margin: 0 auto; } .openerp ul.oe_form_steps { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index cdb14123666..be1e8b6c08e 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -6,6 +6,7 @@ $facets-border: #afafb6 $facets-border-selected: #a6a6fe $hover-background: #f0f0fa $colour4: #8a89ba +$sheet-max-width: 860px // }}} // Mixins {{{ @font-face @@ -1307,7 +1308,7 @@ $colour4: #8a89ba float: right footer min-width: 650px - max-width: 960px + max-width: $sheet-max-width margin: 0 auto ul.oe_form_steps height: 30px @@ -1362,7 +1363,7 @@ $colour4: #8a89ba border-bottom: 1px solid #ddd .oe_form_sheet_width min-width: 650px - max-width: 860px + max-width: $sheet-max-width margin: 0 auto .oe_form_sheet background: white -- cgit v1.2.3 From 0267ed32bbb7ed75246e48e2ab28af0912e0387f Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Fri, 6 Jul 2012 18:43:57 +0200 Subject: Many improvements bzr revid: mit@openerp.com-20120706164357-c6p6z3ytoqbhmjjn --- addons/web/static/src/css/base.css | 108 ++++++++++++++++++++++++++++++++---- addons/web/static/src/css/base.sass | 103 +++++++++++++++++++++++++++------- 2 files changed, 180 insertions(+), 31 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 443563a096b..7bc210298db 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -91,7 +91,7 @@ list-style-type: none; } .openerp input, .openerp textarea, .openerp select { - padding: 1px 4px; + padding: 2px 4px; border: 1px solid #cccccc; -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -187,15 +187,97 @@ background: #f0f0fa; } .openerp.ui-dialog { - border: 13px solid rgba(0, 0, 0, 0.3); - -moz-border-radius: 16px; - -webkit-border-radius: 16px; - border-radius: 16px; + display: none; + position: fixed; + padding: 6px; + top: 50%; + left: 50%; + z-index: 1050; + width: 560px; + margin: -150px 0 0 -280px; + background-color: rgba(60, 60, 60, 0.7); + border: 1px solid; + border-color: #888888 #555555 #444444; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + -moz-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); + -webkit-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); + box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); + -webkit-background-clip: padding-box; -moz-background-clip: padding-box; - -webkit-background-clip: padding; background-clip: padding-box; - box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.6); - -webkit-box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.2); +} +.openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane { + padding: 16px; +} +.openerp.ui-dialog .ui-dialog-titlebar { + border-bottom: 1px solid #cacaca; + -moz-border-radius: 2px 2px 0 0; + -webkit-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + background-color: #fcfcfc; + background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede)); + background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede); + background-image: -moz-linear-gradient(top, #fcfcfc, #dedede); + background-image: -ms-linear-gradient(top, #fcfcfc, #dedede); + background-image: -o-linear-gradient(top, #fcfcfc, #dedede); + background-image: linear-gradient(to bottom, #fcfcfc, #dedede); +} +.openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title { + margin: 0; + padding: 0; +} +.openerp.ui-dialog .ui-widget-header { + border: none; +} +.openerp.ui-dialog .ui-dialog-content { + background: white; +} +.openerp.ui-dialog .ui-dialog-buttonpane { + border-top: 1px solid #e0e0e0; + background: #f5f7f9; + padding: 8px; + margin: 0; + -moz-border-radius: 0 0 2px 2px; + -webkit-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.openerp.ui-dialog .ui-dialog-buttonpane button { + margin-left: 8px; +} +.openerp.ui-dialog .ui-dialog-titlebar-close { + padding: 0; +} +.openerp.ui-dialog .ui-dialog-titlebar-close .ui-icon-closethick { + display: none; +} +.openerp.ui-dialog .ui-dialog-titlebar-close:before { + content: "×"; + font-size: 18px; + font-weight: bold; + line-height: 16px; + color: black; + text-shadow: 0 1px 0 white; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.openerp.ui-dialog .ui-dialog-titlebar-close:before:hover { + color: black; + text-decoration: none; +} +.openerp .modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: black; + filter: alpha(opacity=30); + opacity: 0.3; } .openerp .oe_i { font-family: "mnmliconsRegular" !important; @@ -352,17 +434,17 @@ .openerp .oe_button.oe_link span:hover { text-decoration: underline; } -.openerp .oe_star_on, .openerp .oe_star_off { +.openerp .oe_webclient .oe_star_on, .openerp .oe_webclient .oe_star_off { color: #cccccc; text-shadow: 0 0 2px black; vertical-align: top; position: relative; top: -5px; } -.openerp .oe_star_on:hover, .openerp .oe_star_off:hover { +.openerp .oe_webclient .oe_star_on:hover, .openerp .oe_webclient .oe_star_off:hover { text-decoration: none; } -.openerp .oe_star_on { +.openerp .oe_webclient .oe_star_on { color: gold; } .openerp.oe_tooltip { @@ -453,6 +535,10 @@ position: relative; cursor: pointer; } +.openerp .oe_dropdown_toggle { + color: #888888; + font-weight: normal; +} .openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened { display: block; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 61b7d267551..d5d271fe07d 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -143,7 +143,7 @@ $colour4: #8a89ba li list-style-type: none input, textarea, select - padding: 1px 4px + padding: 2px 4px border: 1px solid #ccc @include radius(3px) background: white @@ -200,14 +200,75 @@ $colour4: #8a89ba width: auto a.ui-state-active background: #f0f0fa + + // Modal box &.ui-dialog - border: 13px solid rgba(0, 0, 0, 0.3) - @include radius(16px) - -moz-background-clip: padding-box - -webkit-background-clip: padding - background-clip: padding-box - box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.6) - -webkit-box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.2) + display: none + position: fixed + padding: 6px + top: 50% + left: 50% + z-index: 1050 + width: 560px + margin: -150px 0 0 -280px + //overflow: hidden + background-color: rgba(60,60,60,0.7) + border: 1px solid + border-color: #888 #555 #444 + //overflow: hidden + @include radius(8px) + @include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6)) + @include background-clip() + .ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane + padding: 16px + .ui-dialog-titlebar + border-bottom: 1px solid #cacaca + @include radius(2px 2px 0 0) + @include vertical-gradient(#FCFCFC, #DEDEDE) + .ui-dialog-title + margin: 0 + padding: 0 + .ui-widget-header + border: none + .ui-dialog-content + background: white + .ui-dialog-buttonpane + border-top: 1px solid #e0e0e0 + background: #f5f7f9 + padding: 8px + margin: 0 + @include radius(0 0 2px 2px) + button + margin-left: 8px + .ui-dialog-titlebar-close + padding: 0 + .ui-icon-closethick + display: none + &:before + content: "×" + font-size: 18px + font-weight: bold + line-height: 16px + color: black + text-shadow: 0 1px 0 white + padding: 0 + cursor: pointer + background: transparent + border: 0 + &:hover + color: black + text-decoration: none + + .modal-backdrop + position: fixed + top: 0 + right: 0 + bottom: 0 + left: 0 + z-index: 1040 + background-color: black + @include opacity(.3) + // }}} // Generic classes {{{ .oe_i @@ -287,18 +348,17 @@ $colour4: #8a89ba font-weight: bold &:hover text-decoration: underline - .oe_star_on, .oe_star_off - color: #cccccc - text-shadow: 0 0 2px black - vertical-align: top - position: relative - top: -5px - - .oe_star_on:hover, .oe_star_off:hover - text-decoration: none - - .oe_star_on - color: gold + .oe_webclient + .oe_star_on, .oe_star_off + color: #cccccc + text-shadow: 0 0 2px black + vertical-align: top + position: relative + top: -5px + .oe_star_on:hover, .oe_star_off:hover + text-decoration: none + .oe_star_on + color: gold //.oe_edit_only  // }}} @@ -370,6 +430,9 @@ $colour4: #8a89ba .oe_dropdown, .oe_dropdown_hover, .oe_dropdown_toggle position: relative cursor: pointer + .oe_dropdown_toggle + color: #888 + font-weight: normal .oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened display: block .oe_dropdown_menu -- cgit v1.2.3