From 3dae59cabdcb6e0bf37fad5b98fe091df925d0d3 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 15 Nov 2012 15:44:55 +0100 Subject: [PATCH 1/5] [FIX]7.0 bookmark module - not working correctly lp bug: https://launchpad.net/bugs/1077138 fixed bzr revid: dle@openerp.com-20121115144455-gdpss6sp4ul5zut3 --- addons/web_shortcuts/static/src/js/web_shortcuts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_shortcuts/static/src/js/web_shortcuts.js b/addons/web_shortcuts/static/src/js/web_shortcuts.js index e7cbbaccef6..583069cc3d1 100644 --- a/addons/web_shortcuts/static/src/js/web_shortcuts.js +++ b/addons/web_shortcuts/static/src/js/web_shortcuts.js @@ -54,7 +54,7 @@ instance.web_shortcuts.Shortcuts = instance.web.Widget.extend({ }, add: function (sc) { var self = this; - this.dataset.create(sc, function (out) { + this.dataset.create(sc).then(function(out){ self.trigger('display', { name : sc.name, id : out.result, From bba12d9e95d681e17d2898ea598ac0f1f4e90207 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 15 Nov 2012 16:57:08 +0100 Subject: [PATCH 2/5] [FIX]wrong out id when adding shortcut to system tray list lp bug: https://launchpad.net/bugs/1077138 fixed bzr revid: dle@openerp.com-20121115155708-vbz1djvtp15dit78 --- addons/web_shortcuts/static/src/js/web_shortcuts.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/web_shortcuts/static/src/js/web_shortcuts.js b/addons/web_shortcuts/static/src/js/web_shortcuts.js index 583069cc3d1..04fa09e300c 100644 --- a/addons/web_shortcuts/static/src/js/web_shortcuts.js +++ b/addons/web_shortcuts/static/src/js/web_shortcuts.js @@ -57,7 +57,7 @@ instance.web_shortcuts.Shortcuts = instance.web.Widget.extend({ this.dataset.create(sc).then(function(out){ self.trigger('display', { name : sc.name, - id : out.result, + id : out, res_id : sc.res_id }); }); @@ -108,24 +108,24 @@ instance.web.UserMenu.include({ }); instance.web.ViewManagerAction.include({ - switch_mode: function (view_type, no_store) { + switch_mode: function () { var self = this; this._super.apply(this, arguments).done(function() { - self.shortcut_check(self.views[view_type]); + self.shortcut_check(); }); }, - shortcut_check : function(view) { + shortcut_check : function() { var self = this; var shortcuts_menu = instance.webclient.user_menu.shortcuts; var grandparent = this.getParent() && this.getParent().getParent(); // display shortcuts if on the first view for the action var $shortcut_toggle = this.$el.find('.oe_shortcuts_toggle'); - if (!this.action.name || + /*if (!this.action.name || !(view.view_type === this.views_src[0].view_type && view.view_id === this.views_src[0].view_id)) { $shortcut_toggle.hide(); return; - } + }*/ $shortcut_toggle.toggleClass('oe_shortcuts_remove', shortcuts_menu.has(self.session.active_id)); $shortcut_toggle.unbind("click").click(function() { if ($shortcut_toggle.hasClass("oe_shortcuts_remove")) { From e72542b6ecf4efdcb1539abc29e065bc8a1ec5a8 Mon Sep 17 00:00:00 2001 From: "Denis Ledoux dle@openerp.com" <> Date: Thu, 15 Nov 2012 17:05:50 +0100 Subject: [PATCH 3/5] [FIX]Reload whole favorites (by rpc call) instead of adding the new one, otherwise the name of the new starred item is not structured like the other ones lp bug: https://launchpad.net/bugs/1077138 fixed bzr revid: dle@openerp.com-20121115160550-p5kc3j8swxu3lfv0 --- .../web_shortcuts/static/src/js/web_shortcuts.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/addons/web_shortcuts/static/src/js/web_shortcuts.js b/addons/web_shortcuts/static/src/js/web_shortcuts.js index 04fa09e300c..918feb4634d 100644 --- a/addons/web_shortcuts/static/src/js/web_shortcuts.js +++ b/addons/web_shortcuts/static/src/js/web_shortcuts.js @@ -55,11 +55,7 @@ instance.web_shortcuts.Shortcuts = instance.web.Widget.extend({ add: function (sc) { var self = this; this.dataset.create(sc).then(function(out){ - self.trigger('display', { - name : sc.name, - id : out, - res_id : sc.res_id - }); + self.trigger('load'); }); }, display: function(sc) { @@ -108,24 +104,24 @@ instance.web.UserMenu.include({ }); instance.web.ViewManagerAction.include({ - switch_mode: function () { + switch_mode: function (view_type, no_store) { var self = this; this._super.apply(this, arguments).done(function() { - self.shortcut_check(); + self.shortcut_check(self.views[view_type]); }); }, - shortcut_check : function() { + shortcut_check : function(view) { var self = this; var shortcuts_menu = instance.webclient.user_menu.shortcuts; var grandparent = this.getParent() && this.getParent().getParent(); // display shortcuts if on the first view for the action var $shortcut_toggle = this.$el.find('.oe_shortcuts_toggle'); - /*if (!this.action.name || + if (!this.action.name || !(view.view_type === this.views_src[0].view_type && view.view_id === this.views_src[0].view_id)) { $shortcut_toggle.hide(); return; - }*/ + } $shortcut_toggle.toggleClass('oe_shortcuts_remove', shortcuts_menu.has(self.session.active_id)); $shortcut_toggle.unbind("click").click(function() { if ($shortcut_toggle.hasClass("oe_shortcuts_remove")) { From 801927cb14b267d4cfadfb9f316572218d41296d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 15 Nov 2012 18:12:01 +0100 Subject: [PATCH 4/5] [FIX] make root menu links works bzr revid: chs@openerp.com-20121115171201-76y7ul1jhjyi2e78 --- addons/web/static/src/js/chrome.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 941d26db6c6..ea087f43679 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1160,10 +1160,10 @@ instance.web.WebClient = instance.web.Client.extend({ var self = this; var state = event.getState(true); if (!_.isEqual(this._current_state, state)) { - if(state.action === undefined && state.menu_id) { + if(!state.action && state.menu_id) { self.menu.has_been_loaded.done(function() { self.menu.do_reload().done(function() { - self.menu.menu_click(state.menu_id) + self.menu.menu_click(state.menu_id); }); }); } else { From 79e1118c165a197eb7056a7bbe3751537068a3fe Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 15 Nov 2012 18:36:14 +0100 Subject: [PATCH 5/5] [IMP] Clean base.sass folding sections bzr revid: fme@openerp.com-20121115173614-o5pchmm889yxz5cy --- addons/web/static/src/css/base.css | 168 +++++++++++++--------------- addons/web/static/src/css/base.sass | 151 +++++++++++++------------ 2 files changed, 155 insertions(+), 164 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 85e0a7db719..f530415740b 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -20,20 +20,6 @@ font-style: normal; } -@media print { - .oe_topbar, .oe_leftbar, .oe_loading { - display: none !important; - } -} -.openerp.openerp_webclient_container { - height: 100%; -} - -.text-tag .text-button { - height: auto !important; - min-height: 16px; -} - .openerp { padding: 0; margin: 0; @@ -46,6 +32,9 @@ * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image */ } +.openerp.openerp_webclient_container { + height: 100%; +} .openerp :-moz-placeholder { color: #afafb6 !important; font-style: italic !important; @@ -197,6 +186,10 @@ .openerp .oe_bounce_container { display: inline-block; } +.openerp .text-tag .text-button { + height: auto !important; + min-height: 16px; +} .openerp .ui-tabs { position: static; } @@ -2361,6 +2354,77 @@ .openerp .oe_form .oe_form_field_image:hover .oe_form_field_image_controls { display: block; } +.openerp .oe_fileupload { + display: inline-block; + clear: both; + width: 100%; +} +.openerp .oe_fileupload .oe_add { + float: left; + position: relative; + width: 100%; + left: 2px; + top: 7px; +} +.openerp .oe_fileupload .oe_add button { + display: inline; + height: 24px; + font-size: 12px; + line-height: 12px; + vertical-align: middle; +} +.openerp .oe_fileupload .oe_add button.oe_attach { + width: 24px; + overflow: hidden; + width: 24px; + overflow: hidden; + background: transparent; + color: #7c7bad; + box-shadow: none; + border: none; + text-shadow: none; +} +.openerp .oe_fileupload .oe_add button.oe_attach .oe_e { + position: relative; + top: -1px; + left: -9px; +} +.openerp .oe_fileupload .oe_add input.oe_form_binary_file { + display: inline-block; + margin-left: -5px; + height: 28px; + width: 52px; + margin-top: -26px; +} +.openerp .oe_fileupload .oe_add .oe_attach_label { + color: #7c7bad; + margin-left: -3px; +} +.openerp .oe_fileupload .oe_attachments { + margin-bottom: 4px; + margin-right: 0px; + font-size: 12px; + border-radius: 2px; + border: solid 1px rgba(124, 123, 173, 0.14); +} +.openerp .oe_fileupload .oe_attachments .oe_attachment { + padding: 2px; + padding-left: 4px; + padding-right: 4px; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e { + font-size: 23px; + margin-top: -5px; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e:hover { + text-decoration: none; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(odd) { + background: white; +} +.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(even) { + background: #f4f5fa; +} .openerp .oe_form_field_many2one td:first-child { position: relative; } @@ -2893,78 +2957,6 @@ color: #333333; } -.openerp .oe_fileupload { - display: inline-block; - clear: both; - width: 100%; -} -.openerp .oe_fileupload .oe_add { - float: left; - position: relative; - width: 100%; - left: 2px; - top: 7px; -} -.openerp .oe_fileupload .oe_add button { - display: inline; - height: 24px; - font-size: 12px; - line-height: 12px; - vertical-align: middle; -} -.openerp .oe_fileupload .oe_add button.oe_attach { - width: 24px; - overflow: hidden; - width: 24px; - overflow: hidden; - background: transparent; - color: #7c7bad; - box-shadow: none; - border: none; - text-shadow: none; -} -.openerp .oe_fileupload .oe_add button.oe_attach .oe_e { - position: relative; - top: -1px; - left: -9px; -} -.openerp .oe_fileupload .oe_add input.oe_form_binary_file { - display: inline-block; - margin-left: -5px; - height: 28px; - width: 52px; - margin-top: -26px; -} -.openerp .oe_fileupload .oe_add .oe_attach_label { - color: #7c7bad; - margin-left: -3px; -} -.openerp .oe_fileupload .oe_attachments { - margin-bottom: 4px; - margin-right: 0px; - font-size: 12px; - border-radius: 2px; - border: solid 1px rgba(124, 123, 173, 0.14); -} -.openerp .oe_fileupload .oe_attachments .oe_attachment { - padding: 2px; - padding-left: 4px; - padding-right: 4px; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e { - font-size: 23px; - margin-top: -5px; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment .oe_e:hover { - text-decoration: none; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(odd) { - background: white; -} -.openerp .oe_fileupload .oe_attachments .oe_attachment:nth-child(even) { - background: #f4f5fa; -} - .kitten-mode-activated { background-image: url(http://placekitten.com/g/1365/769); background-size: cover; @@ -3023,8 +3015,8 @@ div.ui-widget-overlay { .openerp { text-shadow: none; } - .openerp .oe_header_row, .openerp ul.oe_header, .openerp div.oe_mail_thread_action, .openerp .oe_mail_recthread_actions, .openerp .oe_button_box, .openerp .oe_form button, .openerp button.oe_invite, .openerp .oe_form header, .openerp .openerp .oe_notebook > li.ui-state-default { - display: none; + .openerp .oe_header_row, .openerp ul.oe_header, .openerp div.oe_mail_thread_action, .openerp .oe_mail_recthread_actions, .openerp .oe_button_box, .openerp .oe_form button, .openerp button.oe_invite, .openerp .oe_form header, .openerp .openerp .oe_notebook > li.ui-state-default, .openerp .oe_topbar, .openerp .oe_leftbar, .openerp .oe_loading { + display: none !important; } .openerp .oe_list_content button, .openerp .oe_list_content input[type=checkbox] { visibility: hidden; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 586bca407d0..7669af0ee2c 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -140,18 +140,6 @@ $sheet-padding: 16px // }}} -@media print - .oe_topbar, .oe_leftbar, .oe_loading - display: none !important - -.openerp.openerp_webclient_container - height: 100% - -// jQueryUI css bug fixing -.text-tag .text-button - height: auto !important - min-height: 16px - .openerp // Global style {{{ padding: 0 @@ -161,6 +149,8 @@ $sheet-padding: 16px font-size: 13px background: white text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5) + &.openerp_webclient_container + height: 100% // }}} //Placeholder style{{{ \:-moz-placeholder @@ -254,6 +244,11 @@ $sheet-padding: 16px .oe_bounce_container display: inline-block + // Bug lp:1051746 + .text-tag .text-button + height: auto !important + min-height: 16px + // bug noted in jquery ui CSS doesn't seem to occur in IE9, // so remove position:relative .ui-tabs @@ -1886,6 +1881,64 @@ $sheet-padding: 16px @include box-sizing(border) &:hover .oe_form_field_image_controls display: block + .oe_fileupload + display: inline-block + clear: both + width: 100% + .oe_add + float: left + position: relative + width: 100% + left: +2px + top: +7px + button + display: inline + height: 24px + font-size: 12px + line-height: 12px + vertical-align: middle + button.oe_attach + width: 24px + overflow: hidden + width: 24px + overflow: hidden + background: transparent + color: #7C7BAD + box-shadow: none + border: none + text-shadow: none + .oe_e + position: relative + top: -1px + left: -9px + input.oe_form_binary_file + display: inline-block + margin-left: -5px + height: 28px + width: 52px + margin-top: -26px + .oe_attach_label + color: #7C7BAD + margin-left: -3px + .oe_attachments + margin-bottom: 4px + margin-right: 0px + font-size: 12px + border-radius: 2px + border: solid 1px rgba(124,123,173,0.14) + .oe_attachment + padding: 2px + padding-left: 4px + padding-right: 4px + .oe_e + font-size: 23px + margin-top: -5px + .oe_e:hover + text-decoration: none + .oe_attachment:nth-child(odd) + background: white + .oe_attachment:nth-child(even) + background: #F4F5FA // }}} // FormView.many2one {{{ .oe_form_field_many2one @@ -2288,67 +2341,6 @@ $sheet-padding: 16px float: right color: #333 // }}} - -.openerp - .oe_fileupload - display: inline-block - clear: both - width: 100% - .oe_add - float: left - position: relative - width: 100% - left: +2px - top: +7px - button - display: inline - height: 24px - font-size: 12px - line-height: 12px - vertical-align: middle - button.oe_attach - width: 24px - overflow: hidden - width: 24px - overflow: hidden - background: transparent - color: #7C7BAD - box-shadow: none - border: none - text-shadow: none - .oe_e - position: relative - top: -1px - left: -9px - input.oe_form_binary_file - display: inline-block - margin-left: -5px - height: 28px - width: 52px - margin-top: -26px - .oe_attach_label - color: #7C7BAD - margin-left: -3px - .oe_attachments - margin-bottom: 4px - margin-right: 0px - font-size: 12px - border-radius: 2px - border: solid 1px rgba(124,123,173,0.14) - .oe_attachment - padding: 2px - padding-left: 4px - padding-right: 4px - .oe_e - font-size: 23px - margin-top: -5px - .oe_e:hover - text-decoration: none - .oe_attachment:nth-child(odd) - background: white - .oe_attachment:nth-child(even) - background: #F4F5FA - // Kitten Mode {{{ .kitten-mode-activated background-image: url(http://placekitten.com/g/1365/769) @@ -2358,11 +2350,13 @@ $sheet-padding: 16px opacity: 0.70 // }}} +// jQueryUI top level {{{ // The jQuery-ui overlay and Autocomplete are outside the .openerp div, please don't add indentation !!! div.ui-widget-overlay background: black @include opacity(0.3) - +// TODO: I think only the overlay is problematic, the other top level widgets should use $.fn.openerpClass() +// eg: $el.autocomplete().openerpClass(); .ui-widget font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif color: #4c4c4c @@ -2389,11 +2383,14 @@ div.ui-widget-overlay .ui-corner-all @include radius(3px) +// }}} +// @media print {{{ @media print .openerp - .oe_header_row, ul.oe_header, div.oe_mail_thread_action, .oe_mail_recthread_actions, .oe_button_box, .oe_form button, button.oe_invite, .oe_form header, .openerp .oe_notebook > li.ui-state-default - display: none + .oe_header_row, ul.oe_header, div.oe_mail_thread_action, .oe_mail_recthread_actions, .oe_button_box, .oe_form button, button.oe_invite, .oe_form header, .openerp .oe_notebook > li.ui-state-default, .oe_topbar, .oe_leftbar, .oe_loading + // We use !important here because jQuery adds @style = display: block on elements when using $.fn.show() + display: none !important .oe_list_content button, input[type=checkbox] visibility: hidden @@ -2419,5 +2416,7 @@ div.ui-widget-overlay background: none .openerp div.oe_mail_wall overflow: hidden !important +// }}} + // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: