From 61be1b4637fc04c1d95c807eff44e2c49d8d669e Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 21 Jan 2013 16:33:58 +0100 Subject: [PATCH 01/19] [FIX] kanban: display no_result message when there are no records in the kanban view with columns bzr revid: chm@openerp.com-20130121153358-tzp976npk1jp9yip --- addons/web_kanban/static/src/js/kanban.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 1d9ced0ca6d..6d361bc4311 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -223,7 +223,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ }, do_search: function(domain, context, group_by) { var self = this; - this.$el.find('.oe_view_nocontent').remove(); this.search_domain = domain; this.search_context = context; this.search_group_by = group_by; @@ -235,6 +234,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ self.$el.toggleClass('oe_kanban_grouped_by_m2o', self.grouped_by_m2o); var grouping = new instance.web.Model(self.dataset.model, context, domain).query().group_by(self.group_by); $.when(grouping).done(function(groups) { + self.$el.find('.oe_view_nocontent').remove(); if (groups) { self.do_process_groups(groups); } else { @@ -245,6 +245,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ }, do_process_groups: function(groups) { var self = this; + this.$el.find('table:first').show(); this.$el.removeClass('oe_kanban_ungrouped').addClass('oe_kanban_grouped'); this.add_group_mutex.exec(function() { self.do_clear_groups(); @@ -253,13 +254,15 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ self.no_result(); return false; } + self.nb_records = 0; var remaining = groups.length - 1, groups_array = []; return $.when.apply(null, _.map(groups, function (group, index) { var dataset = new instance.web.DataSetSearch(self, self.dataset.model, new instance.web.CompoundContext(self.dataset.get_context(), group.model.context()), group.model.domain()); return dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }) - .then(function(records) { + .then(function (records) { + self.nb_records += records.length; self.dataset.ids.push.apply(self.dataset.ids, dataset.ids); groups_array[index] = new instance.web_kanban.KanbanGroup(self, records, group, dataset); if (!remaining--) { @@ -267,11 +270,16 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ return self.do_add_groups(groups_array); } }); - })); + })).then(function () { + if(!self.nb_records) { + self.no_result(); + } + }); }); }, do_process_dataset: function() { var self = this; + this.$el.find('table:first').show(); this.$el.removeClass('oe_kanban_grouped').addClass('oe_kanban_ungrouped'); this.add_group_mutex.exec(function() { var def = $.Deferred(); @@ -447,7 +455,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ || !this.options.action.help) { return; } - this.$el.find('.oe_view_nocontent').remove(); + this.$el.find('table:first').hide(); this.$el.prepend( $('
').html(this.options.action.help) ); From d345c7b07a0d08bac01d3d5936c1f1d1516f0f46 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 22 Jan 2013 11:30:37 +0100 Subject: [PATCH 02/19] [IMP] kanban: no_message on hover columns with opacity effect bzr revid: chm@openerp.com-20130122103037-iyciy625vnhjak0x --- addons/web_kanban/static/src/css/kanban.css | 27 +++++++++++++++++ addons/web_kanban/static/src/css/kanban.sass | 29 +++++++++++++++++-- addons/web_kanban/static/src/js/kanban.js | 16 ++++++---- .../web_kanban/static/src/xml/web_kanban.xml | 8 +++++ 4 files changed, 72 insertions(+), 8 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 3083a9e30a5..5492d4923fe 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -172,9 +172,11 @@ } .openerp .oe_kanban_view .oe_kanban_add { top: -8px; + z-index: 2; } .openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_toggle { top: -2px; + z-index: 2; } .openerp .oe_kanban_view .oe_kanban_card, .openerp .oe_kanban_view .oe_dropdown_toggle { cursor: pointer; @@ -190,6 +192,9 @@ width: 185px; padding: 10px; } +.openerp .oe_kanban_view .oe_kanban_quick_create { + z-index: 2; +} .openerp .oe_kanban_view .oe_kanban_quick_create input { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -607,6 +612,28 @@ background: white; } +.openerp .oe_kanban_grouped .oe_view_nocontent { + position: relative; + z-index: 1; + max-width: none; + height: 100%; +} +.openerp .oe_kanban_grouped .oe_view_nocontent .oe_view_nocontent_content { + margin-left: 90px; + margin-top: 5px; + max-width: 700px; +} +.openerp .oe_kanban_grouped .oe_view_nocontent .oe_view_nocontent_bg { + background: #eee; + opacity: 0.7; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: -1; +} + .openerp .oe_popup_form .oe_kanban_buttons .oe_highlight { color: #404040; background: none; diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 988dee01051..4c4d8fa5dff 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -51,9 +51,28 @@ //background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==) background: white height: inherit - &.oe_kanban_grouped .oe_kanban_dummy_cell - background: url(/web/static/src/img/form_sheetbg.png) - width: 100% + &.oe_kanban_grouped + .oe_kanban_dummy_cell + background: url(/web/static/src/img/form_sheetbg.png) + width: 100% + .oe_view_nocontent + position: relative + z-index: 1 + max-width: none + height: 100% + .oe_view_nocontent_content + margin-left: 90px + margin-top: 5px + max-width: 700px + .oe_view_nocontent_bg + background: #eee + opacity: 0.7 + position: absolute + top: 0 + bottom: 0 + left: 0 + right: 0 + z-index: -1 .ui-sortable-placeholder border: 1px solid rgba(0,0,0,0.1) visibility: visible !important @@ -187,8 +206,10 @@ position: relative .oe_kanban_add top: -8px + z-index: 2 .oe_kanban_header .oe_dropdown_toggle top: -2px + z-index: 2 .oe_kanban_card, .oe_dropdown_toggle cursor: pointer display: inline-block @@ -200,6 +221,8 @@ .oe_kanban_no_group .oe_kanban_quick_create width: 185px padding: 10px + .oe_kanban_quick_create + z-index: 2 .oe_kanban_quick_create input @include box-sizing(border-box) outline: none diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 6d361bc4311..758c4246d87 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -234,7 +234,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ self.$el.toggleClass('oe_kanban_grouped_by_m2o', self.grouped_by_m2o); var grouping = new instance.web.Model(self.dataset.model, context, domain).query().group_by(self.group_by); $.when(grouping).done(function(groups) { - self.$el.find('.oe_view_nocontent').remove(); + self.remove_no_result(); if (groups) { self.do_process_groups(groups); } else { @@ -318,6 +318,9 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var $last_td = self.$el.find('.oe_kanban_groups_headers td:last'); var groups_started = _.map(this.groups, function(group) { if (!group.is_started) { + group.on("add_record", self, function () { + self.remove_no_result(); + }); return group.insertBefore($last_td); } }); @@ -455,15 +458,17 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ || !this.options.action.help) { return; } - this.$el.find('table:first').hide(); - this.$el.prepend( - $('
').html(this.options.action.help) - ); + this.$el.find('table:first').css("position", "absolute"); + $(QWeb.render('KanbanView.nocontent', { content : this.options.action.help})).insertAfter(this.$('table:first')); var create_nocontent = this.$buttons; this.$el.find('.oe_view_nocontent').click(function() { create_nocontent.openerpBounce(); }); }, + remove_no_result: function() { + this.$el.find('table:first').css("position", false); + this.$el.find('.oe_view_nocontent').remove(); + }, /* * postprocessing of fields type many2many @@ -726,6 +731,7 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({ */ quick_created: function (record) { var id = record, self = this; + self.trigger("add_record"); this.dataset.read_ids([id], this.view.fields_keys) .done(function (records) { self.view.dataset.ids.push(id); diff --git a/addons/web_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index 67ee563c14d..7b3cfb10447 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -93,4 +93,12 @@
+ +
+
+
+ +
+
+
From b02c1eb263dadb4d4a4bf20025d0e4e448c73204 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 23 Jan 2013 11:31:02 +0100 Subject: [PATCH 03/19] [IMP] view: no message alias bzr revid: chm@openerp.com-20130123103102-81kafjq0l61uq8qx --- addons/web/static/src/js/view_list.js | 1 + addons/web/static/src/js/views.js | 29 ++++++++++++++++++++++- addons/web_kanban/static/src/js/kanban.js | 5 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index fbbfabcacca..c0231487640 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -850,6 +850,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$el.find('.oe_view_nocontent').click(function() { create_nocontent.openerpBounce(); }); + this.insert_alias(this.$el.find('.oe_view_nocontent')); } }); instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.ListView.List# */{ diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 9fd49367171..8f5eed37521 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1394,7 +1394,34 @@ instance.web.View = instance.web.Widget.extend({ is_action_enabled: function(action) { var attrs = this.fields_view.arch.attrs; return (action in attrs) ? JSON.parse(attrs[action]) : true; - } + }, + /** + * insert alias into the dom + */ + insert_alias: function ($dom) { + var self = this; + var context = this.options.action.context || {}; + if (context && context.alias) { + new instance.web.Model('mail.alias').call("get_alias", [], {'alias': context.alias}).then(function (alias_ids) { + if (alias_ids.length) { + var $alias = $('

'); + var global = false; + var inc = 0; + _.each(alias_ids, function (alias_id) { + if (alias_id.email.match(/@.+/)) { + if (inc && global != alias_id.global) { + $alias.append('
' + _t("or")); + global = alias_id.global; + } + $alias.append((inc? '
': '') + '' + alias_id.email + ''); + inc++; + } + }) + $dom.append($alias); + } + }); + } + }, }); /** diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 758c4246d87..b1ed4f16973 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -453,6 +453,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ } }, no_result: function() { + var self = this; if (this.groups.group_by || !this.options.action || !this.options.action.help) { @@ -460,10 +461,10 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ } this.$el.find('table:first').css("position", "absolute"); $(QWeb.render('KanbanView.nocontent', { content : this.options.action.help})).insertAfter(this.$('table:first')); - var create_nocontent = this.$buttons; this.$el.find('.oe_view_nocontent').click(function() { - create_nocontent.openerpBounce(); + self.$buttons.openerpBounce(); }); + this.insert_alias(this.$el.find('.oe_view_nocontent_content')); }, remove_no_result: function() { this.$el.find('table:first').css("position", false); From 65555ae9720dfa2b9873dbd542abaf9a2b9bdab2 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 23 Jan 2013 12:16:28 +0100 Subject: [PATCH 04/19] [IMP] view: alias bzr revid: chm@openerp.com-20130123111628-m74jj7xj1c9t5zf9 --- addons/web/static/src/js/views.js | 8 +++++--- addons/web/static/src/xml/base.xml | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 8f5eed37521..006d3e50c2d 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1404,7 +1404,7 @@ instance.web.View = instance.web.Widget.extend({ if (context && context.alias) { new instance.web.Model('mail.alias').call("get_alias", [], {'alias': context.alias}).then(function (alias_ids) { if (alias_ids.length) { - var $alias = $('

'); + var $alias = $(QWeb.render('View.nocontent_alias')); var global = false; var inc = 0; _.each(alias_ids, function (alias_id) { @@ -1413,11 +1413,13 @@ instance.web.View = instance.web.Widget.extend({ $alias.append('
' + _t("or")); global = alias_id.global; } - $alias.append((inc? '
': '') + '' + alias_id.email + ''); + $alias.append('
' + alias_id.email + ''); inc++; } }) - $dom.append($alias); + if(inc) { + $dom.append($alias); + } } }); } diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6d707bb4627..8d8adaf1a3a 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1873,4 +1873,9 @@ + +

+ You can also create the document by sending an email to : +

+
From aec0de7a96599154eaf4742a33f33d48316c7a76 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 23 Jan 2013 12:38:34 +0100 Subject: [PATCH 05/19] [IMP] view: alias bzr revid: chm@openerp.com-20130123113834-xlujbrmxgrr8e8ft --- addons/web/static/src/js/views.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 006d3e50c2d..625f50ca2f8 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1401,8 +1401,11 @@ instance.web.View = instance.web.Widget.extend({ insert_alias: function ($dom) { var self = this; var context = this.options.action.context || {}; - if (context && context.alias) { - new instance.web.Model('mail.alias').call("get_alias", [], {'alias': context.alias}).then(function (alias_ids) { + if (context && context.help_alias) { + new instance.web.Model('mail.alias').call("get_alias", [], { + 'model': this.options.action.res_model, + 'alias_defaults': context.help_alias + }).then(function (alias_ids) { if (alias_ids.length) { var $alias = $(QWeb.render('View.nocontent_alias')); var global = false; From b79cf38a37c32159bf459dfcf74fa76c53c29351 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 23 Jan 2013 13:12:06 +0100 Subject: [PATCH 06/19] [IMP] kanban: help message position bzr revid: chm@openerp.com-20130123121206-uehsdih50xy8jgts --- addons/web_kanban/static/src/css/kanban.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 5492d4923fe..3eab33a0569 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -612,18 +612,18 @@ background: white; } -.openerp .oe_kanban_grouped .oe_view_nocontent { +.openerp .oe_kanban_view .oe_view_nocontent { position: relative; z-index: 1; max-width: none; height: 100%; } -.openerp .oe_kanban_grouped .oe_view_nocontent .oe_view_nocontent_content { +.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_content { margin-left: 90px; margin-top: 5px; max-width: 700px; } -.openerp .oe_kanban_grouped .oe_view_nocontent .oe_view_nocontent_bg { +.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_bg { background: #eee; opacity: 0.7; position: absolute; From 6416b6f27590ea643667ff8aba71a5cf5b0144e4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 23 Jan 2013 13:13:46 +0100 Subject: [PATCH 07/19] [IMP] kanban: help message position bzr revid: chm@openerp.com-20130123121346-o1n8ne749npinkc4 --- addons/web_kanban/static/src/css/kanban.sass | 36 ++++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 4c4d8fa5dff..83ae61da356 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -51,28 +51,28 @@ //background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==) background: white height: inherit + .oe_view_nocontent + position: relative + z-index: 1 + max-width: none + height: 100% + .oe_view_nocontent_content + margin-left: 90px + margin-top: 5px + max-width: 700px + .oe_view_nocontent_bg + background: #eee + opacity: 0.7 + position: absolute + top: 0 + bottom: 0 + left: 0 + right: 0 + z-index: -1 &.oe_kanban_grouped .oe_kanban_dummy_cell background: url(/web/static/src/img/form_sheetbg.png) width: 100% - .oe_view_nocontent - position: relative - z-index: 1 - max-width: none - height: 100% - .oe_view_nocontent_content - margin-left: 90px - margin-top: 5px - max-width: 700px - .oe_view_nocontent_bg - background: #eee - opacity: 0.7 - position: absolute - top: 0 - bottom: 0 - left: 0 - right: 0 - z-index: -1 .ui-sortable-placeholder border: 1px solid rgba(0,0,0,0.1) visibility: visible !important From d738d755066873640e835473289606fa4002f82d Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 25 Jan 2013 13:01:53 +0100 Subject: [PATCH 08/19] [IMP] kanban: display number of folded records bzr revid: chm@openerp.com-20130125120153-5ygo6kvscmap8tnq --- addons/web_kanban/static/src/css/kanban.css | 19 ++++++++++--- addons/web_kanban/static/src/css/kanban.sass | 15 ++++++++--- .../web_kanban/static/src/xml/web_kanban.xml | 27 ++++++++++++------- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 3083a9e30a5..eaba760292c 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -92,12 +92,21 @@ overflow: hidden; text-overflow: ellipsis; } -.openerp .oe_kanban_view .oe_kanban_group_title .oe_kanban_group_length { +.openerp .oe_kanban_view .oe_kanban_group_length { + text-align: center; + display: none; +} +.openerp .oe_kanban_view .oe_kanban_group_length .oe_tag { + position: relative; + top: +8px; + font-weight: bold; +} +.openerp .oe_kanban_view .oe_fold_column .oe_kanban_group_length { position: absolute; top: -1px; right: -14px; - text-align: center; float: right; + display: block; } .openerp .oe_kanban_view .oe_kanban_header:hover .oe_kanban_group_length { display: none; @@ -141,7 +150,8 @@ .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title, .openerp .oe_kanban_view .oe_kanban_group_folded.oe_kanban_column *, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_aggregates, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_add { display: none; } -.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title_vertical { +.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title_vertical, +.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_length { display: block; } .openerp .oe_kanban_view .oe_kanban_group_folded .oe_dropdown_kanban { @@ -163,7 +173,7 @@ display: none; position: relative; opacity: 0.75; - top: 20px; + top: 26px; } .openerp .oe_kanban_view .oe_kanban_add, .openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_toggle { margin-left: 4px; @@ -175,6 +185,7 @@ } .openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_toggle { top: -2px; + height: 14px; } .openerp .oe_kanban_view .oe_kanban_card, .openerp .oe_kanban_view .oe_dropdown_toggle { cursor: pointer; diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 988dee01051..7fef8604c97 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -54,6 +54,13 @@ &.oe_kanban_grouped .oe_kanban_dummy_cell background: url(/web/static/src/img/form_sheetbg.png) width: 100% + .oe_kanban_group_length + text-align: center + display: none + .oe_tag + position: relative + top: +8px + font-weight: bold .ui-sortable-placeholder border: 1px solid rgba(0,0,0,0.1) visibility: visible !important @@ -118,12 +125,13 @@ white-space: nowrap overflow: hidden text-overflow: ellipsis + .oe_fold_column .oe_kanban_group_length position: absolute top: -1px right: -14px - text-align: center float: right + display: block &.oe_kanban_grouped .oe_kanban_column, .oe_kanban_group_header width: 185px @@ -159,7 +167,7 @@ .oe_kanban_group_folded .oe_kanban_group_title, &.oe_kanban_column *, .oe_kanban_aggregates, .oe_kanban_add display: none - .oe_kanban_group_title_vertical + .oe_kanban_group_title_vertical, .oe_kanban_group_length display: block .oe_dropdown_kanban left: -5px @@ -178,7 +186,7 @@ display: none position: relative opacity: 0.75 - top: 20px + top: 26px // }}} // KanbanQuickCreate {{{ .oe_kanban_add, .oe_kanban_header .oe_dropdown_toggle @@ -189,6 +197,7 @@ top: -8px .oe_kanban_header .oe_dropdown_toggle top: -2px + height: 14px; .oe_kanban_card, .oe_dropdown_toggle cursor: pointer display: inline-block diff --git a/addons/web_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index 67ee563c14d..f943541d007 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -34,16 +34,21 @@
]
-
- í - +
+
+ + 99+ +
+ í + +
@@ -57,7 +62,9 @@
- + + +
From 06b2fd58654f06a7356a3f885685fc0393809d79 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 29 Jan 2013 11:06:14 +0100 Subject: [PATCH 09/19] [IMP] base: apply same css of body content for the textarea bzr revid: chm@openerp.com-20130129100614-fwz3lf8pvqeuuohl --- addons/web/static/src/css/base.css | 2 ++ addons/web/static/src/css/base.sass | 2 ++ 2 files changed, 4 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 638f446c5ba..1e1c4812be4 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2341,6 +2341,7 @@ background: white; min-width: 60px; color: #1f1f1f; + font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; } .openerp .oe_form input[readonly], .openerp .oe_form select[readonly], .openerp .oe_form textarea[readonly], .openerp .oe_form input[disabled], .openerp .oe_form select[disabled] { background: #e5e5e5 !important; @@ -2355,6 +2356,7 @@ -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; + color: #4C4C4C; } .openerp .oe_form textarea.oe_inline[disabled] { border-left: 8px solid #eeeeee; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 42ade77ccbb..20e573b099d 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1857,6 +1857,7 @@ $sheet-padding: 16px background: white min-width: 60px color: #1f1f1f + font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif input[readonly], select[readonly], textarea[readonly], input[disabled], select[disabled] background: #E5E5E5 !important color: #666 @@ -1865,6 +1866,7 @@ $sheet-padding: 16px padding-left: 8px @include box-shadow(none) @include radius(0px) + color: #4C4C4C textarea.oe_inline[disabled] border-left: 8px solid #eee .oe_form_field_url button img From 0d3004e8290b7d9ff90d1f84ee7353b6a9e75694 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 1 Feb 2013 10:51:33 +0100 Subject: [PATCH 10/19] [IMP] view: only first alias displayed bzr revid: chm@openerp.com-20130201095133-i3p6vehexh7a9bqh --- addons/web/static/src/js/views.js | 20 ++++---------------- addons/web/static/src/xml/base.xml | 2 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 625f50ca2f8..4b532e633be 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1406,23 +1406,11 @@ instance.web.View = instance.web.Widget.extend({ 'model': this.options.action.res_model, 'alias_defaults': context.help_alias }).then(function (alias_ids) { - if (alias_ids.length) { + if (alias_ids.length && alias_ids[0].email.match(/@.+/)) { + // alias_ids[0].global var $alias = $(QWeb.render('View.nocontent_alias')); - var global = false; - var inc = 0; - _.each(alias_ids, function (alias_id) { - if (alias_id.email.match(/@.+/)) { - if (inc && global != alias_id.global) { - $alias.append('
' + _t("or")); - global = alias_id.global; - } - $alias.append('
' + alias_id.email + ''); - inc++; - } - }) - if(inc) { - $dom.append($alias); - } + $alias.append('' + alias_ids[0].email + ''); + $dom.append($alias); } }); } diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 30a3f8f2351..47eb0214616 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1873,7 +1873,7 @@

- You can also create the document by sending an email to : + You can also create documents by sending an email to:

From c349508149be291dc4a4e90d6f521baee6f3d9d7 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 4 Feb 2013 16:03:04 +0100 Subject: [PATCH 11/19] [IMP] web view: remove insert_alias and add active_id, active_model, active_ids into the context for web/action/load bzr revid: chm@openerp.com-20130204150304-j11944irbcp4o4gf --- addons/web/static/src/js/view_list.js | 1 - addons/web/static/src/js/views.js | 22 +--------------------- addons/web/static/src/xml/base.xml | 5 ----- addons/web_kanban/static/src/js/kanban.js | 5 ++--- 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index c0231487640..fbbfabcacca 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -850,7 +850,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$el.find('.oe_view_nocontent').click(function() { create_nocontent.openerpBounce(); }); - this.insert_alias(this.$el.find('.oe_view_nocontent')); } }); instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.ListView.List# */{ diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 4b532e633be..fbe53711c8a 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1306,7 +1306,7 @@ instance.web.View = instance.web.Widget.extend({ } else if (action_data.type=="action") { return this.rpc('/web/action/load', { action_id: action_data.name, - context: instance.web.pyeval.eval('context', context), + context: _.extend({'active_model': dataset.model, 'active_ids': dataset.ids, 'active_id': record_id}, instance.web.pyeval.eval('context', context)), do_not_eval: true }).then(handler); } else { @@ -1395,26 +1395,6 @@ instance.web.View = instance.web.Widget.extend({ var attrs = this.fields_view.arch.attrs; return (action in attrs) ? JSON.parse(attrs[action]) : true; }, - /** - * insert alias into the dom - */ - insert_alias: function ($dom) { - var self = this; - var context = this.options.action.context || {}; - if (context && context.help_alias) { - new instance.web.Model('mail.alias').call("get_alias", [], { - 'model': this.options.action.res_model, - 'alias_defaults': context.help_alias - }).then(function (alias_ids) { - if (alias_ids.length && alias_ids[0].email.match(/@.+/)) { - // alias_ids[0].global - var $alias = $(QWeb.render('View.nocontent_alias')); - $alias.append('' + alias_ids[0].email + ''); - $dom.append($alias); - } - }); - } - }, }); /** diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 47eb0214616..7604814fe1d 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1871,9 +1871,4 @@ - -

- You can also create documents by sending an email to: -

-
diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 9fac388d7bc..618e3c7e915 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -456,15 +456,14 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var self = this; if (this.groups.group_by || !this.options.action - || !this.options.action.help) { + || (!this.options.action.help)) { return; } this.$el.find('table:first').css("position", "absolute"); - $(QWeb.render('KanbanView.nocontent', { content : this.options.action.help})).insertAfter(this.$('table:first')); + $(QWeb.render('KanbanView.nocontent', { content : this.options.action.dynamic_help || this.options.action.help})).insertAfter(this.$('table:first')); this.$el.find('.oe_view_nocontent').click(function() { self.$buttons.openerpBounce(); }); - this.insert_alias(this.$el.find('.oe_view_nocontent_content')); }, remove_no_result: function() { this.$el.find('table:first').css("position", false); From 8c58ae9ad20f3d9c5a2a4742e6e9bfe2070f2d82 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 5 Feb 2013 15:52:44 +0100 Subject: [PATCH 12/19] [IMP] kanban: auto close quick_create when click an other quick_create, and hide help message bzr revid: chm@openerp.com-20130205145244-309lce3bsl5fb704 --- addons/web_kanban/static/src/js/kanban.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 618e3c7e915..7db23b3225d 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -583,19 +583,26 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({ }); this.$el.find('.oe_kanban_add').click(function () { - if (self.quick) { - return self.quick.trigger('close'); + if (self.view.quick) { + self.view.quick.trigger('close'); } + if (self.quick) { + return false; + } + self.view.$el.find('.oe_view_nocontent').hide(); var ctx = {}; ctx['default_' + self.view.group_by] = self.value; self.quick = new (get_class(self.view.quick_create_class))(this, self.dataset, ctx, true) .on('added', self, self.proxy('quick_created')) .on('close', self, function() { + self.view.$el.find('.oe_view_nocontent').show(); this.quick.destroy(); + delete self.view.quick; delete this.quick; }); self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); + self.view.quick = self.quick; }); // Add bounce effect on image '+' of kanban header when click on empty space of kanban grouped column. this.$records.on('click', '.oe_kanban_show_more', this.do_show_more); @@ -731,6 +738,7 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({ */ quick_created: function (record) { var id = record, self = this; + self.view.remove_no_result(); self.trigger("add_record"); this.dataset.read_ids([id], this.view.fields_keys) .done(function (records) { From 85af3bfca627f89bbd835463fc26d9806e14116d Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 4 Mar 2013 14:52:44 +0100 Subject: [PATCH 13/19] [IMP] css: add a class oe_read_only bzr revid: chm@openerp.com-20130304135244-p32vbjd493h06oq4 --- addons/web/static/src/css/base.css | 3 +++ addons/web/static/src/css/base.sass | 2 ++ 2 files changed, 5 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 36e2c4658cd..c58185d8d54 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2096,6 +2096,9 @@ .openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { display: none !important; } +.openerp .oe_form_editable .oe_read_only { + display: none !important; +} .openerp .oe_form_readonly .oe_form .oe_form_field_date { width: auto; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 1f58e12976f..55f3fe0b04b 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1659,6 +1659,8 @@ $sheet-padding: 16px .oe_form_readonly .oe_edit_only, .oe_form_field:empty display: none !important + .oe_read_only + display: none !important .oe_form .oe_form_field_date width: auto // Sheet and padding From 5bce8e3d3da841b7c67cc5440170d801dd01fac2 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 4 Mar 2013 14:59:25 +0100 Subject: [PATCH 14/19] [IMP] css: oe_kanban_group z-index:1 bzr revid: chm@openerp.com-20130304135925-drjoivburtj23p9i --- addons/web/static/src/css/base.css | 4 ++++ addons/web/static/src/css/base.sass | 3 +++ 2 files changed, 7 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index c58185d8d54..1420ab577a8 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -3200,6 +3200,10 @@ div.ui-widget-overlay { clear: both; text-align: center; } +.openerp .oe_kanban_grouped { + position: relative; + z-index: 1; +} .openerp_ie.oe_kanban_grouped .oe_kanban_show_more .oe_button { width: 100%; padding: 3px 12px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 55f3fe0b04b..c31ffbe43a3 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1599,6 +1599,9 @@ $sheet-padding: 16px // }}} + .oe_kanban_grouped + position: relative + z-index: 1 // Views Common {{{ .oe_view_nocontent padding: 15px From f6f4c735ce5397dc124325a7d4dfeda1e87d4c66 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 4 Mar 2013 16:15:11 +0100 Subject: [PATCH 15/19] [fix] kanban: add dynamic_help bzr revid: chm@openerp.com-20130304151511-ob5ugrshni3zr2ql --- addons/web_kanban/static/src/js/kanban.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 7db23b3225d..49acc3c4327 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -456,7 +456,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var self = this; if (this.groups.group_by || !this.options.action - || (!this.options.action.help)) { + || (!this.options.action.help && !this.options.action.dynamic_help)) { return; } this.$el.find('table:first').css("position", "absolute"); From dc709078ffbaf06158e6c1d9d12e54e00bb044c3 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 21 Mar 2013 14:30:53 +0100 Subject: [PATCH 16/19] [IMP] code cleaning for get_empty_list_help bzr revid: chm@openerp.com-20130321133053-wczo7iizsci4hkjs --- addons/web_kanban/static/src/js/kanban.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index fb6dc0781ec..b02f8d12151 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -459,11 +459,11 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var self = this; if (this.groups.group_by || !this.options.action - || (!this.options.action.help && !this.options.action.dynamic_help)) { + || (!this.options.action.help && !this.options.action.get_empty_list_help)) { return; } this.$el.find('table:first').css("position", "absolute"); - $(QWeb.render('KanbanView.nocontent', { content : this.options.action.dynamic_help || this.options.action.help})).insertAfter(this.$('table:first')); + $(QWeb.render('KanbanView.nocontent', { content : this.options.action.get_empty_list_help || this.options.action.help})).insertAfter(this.$('table:first')); this.$el.find('.oe_view_nocontent').click(function() { self.$buttons.openerpBounce(); }); From caff74a6504d48e2a3fde8fb61d23efcd3c68a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 28 Mar 2013 12:23:27 +0100 Subject: [PATCH 17/19] [CLEAN] Moved kanban specific css from base.sass to kanban.sass; regenerated css files accordingly. bzr revid: tde@openerp.com-20130328112327-3jurcsvur7u4z2ry --- addons/web/static/src/css/base.css | 16 +++--- addons/web/static/src/css/base.sass | 5 +- addons/web_kanban/static/src/css/kanban.css | 58 ++++++++------------- 3 files changed, 29 insertions(+), 50 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 96b8a23a705..1bad7a02f90 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1269,7 +1269,7 @@ color: white; padding: 2px 4px; margin: 1px 6px 0 0; - border: 1px solid lightGray; + border: 1px solid lightgrey; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -1301,7 +1301,7 @@ transform: scale(1.1); } .openerp .oe_secondary_submenu .oe_active { - border-top: 1px solid lightGray; + border-top: 1px solid lightgrey; border-bottom: 1px solid #dedede; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2); @@ -2108,8 +2108,8 @@ .openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { display: none !important; } -.openerp .oe_form_editable .oe_read_only { - display: none !important; +.openerp .oe_form_readonly .oe_read_only { + display: none !important; } .openerp .oe_form_readonly .oe_form .oe_form_field_date { width: auto; @@ -2286,7 +2286,7 @@ } .openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span { font-size: 80%; - color: darkGreen; + color: darkgreen; vertical-align: top; position: relative; top: -4px; @@ -2397,7 +2397,7 @@ -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; - color: #4C4C4C; + color: #4c4c4c; } .openerp .oe_form textarea.oe_inline[disabled] { border-left: 8px solid #eeeeee; @@ -3267,10 +3267,6 @@ div.ui-widget-overlay { clear: both; text-align: center; } -.openerp .oe_kanban_grouped { - position: relative; - z-index: 1; -} .openerp_ie.oe_kanban_grouped .oe_kanban_show_more .oe_button { width: 100%; padding: 3px 12px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 1e70d09e0fd..a9fa725b07c 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1607,9 +1607,6 @@ $sheet-padding: 16px // }}} - .oe_kanban_grouped - position: relative - z-index: 1 // Views Common {{{ .oe_view_nocontent padding: 15px @@ -1898,7 +1895,7 @@ $sheet-padding: 16px padding-left: 8px @include box-shadow(none) @include radius(0px) - color: #4C4C4C + color: #4c4c4c textarea.oe_inline[disabled] border-left: 8px solid #eee .oe_form_field_url button img diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index fee8a3642f1..1c30f752a86 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -3,6 +3,27 @@ background: white; height: inherit; } +.openerp .oe_kanban_view .oe_view_nocontent { + position: relative; + z-index: 1; + max-width: none; + height: 100%; +} +.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_content { + margin-left: 90px; + margin-top: 5px; + max-width: 700px; +} +.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_bg { + background: #eeeeee; + opacity: 0.7; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: -1; +} .openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_dummy_cell { background: url(/web/static/src/img/form_sheetbg.png); width: 100%; @@ -101,15 +122,6 @@ overflow: hidden; text-overflow: ellipsis; } -.openerp .oe_kanban_view .oe_kanban_group_length { - text-align: center; - display: none; -} -.openerp .oe_kanban_view .oe_kanban_group_length .oe_tag { - position: relative; - top: +8px; - font-weight: bold; -} .openerp .oe_kanban_view .oe_fold_column .oe_kanban_group_length { position: absolute; top: -1px; @@ -117,9 +129,6 @@ float: right; display: block; } -.openerp .oe_kanban_view .oe_kanban_header:hover .oe_kanban_group_length { - display: none; -} .openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_column, .openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_group_header { width: 185px; min-width: 185px; @@ -159,8 +168,7 @@ .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title, .openerp .oe_kanban_view .oe_kanban_group_folded.oe_kanban_column *, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_aggregates, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_add { display: none; } -.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title_vertical, -.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_length { +.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title_vertical, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_length { display: block; } .openerp .oe_kanban_view .oe_kanban_group_folded .oe_dropdown_kanban { @@ -631,28 +639,6 @@ background: white; } -.openerp .oe_kanban_view .oe_view_nocontent { - position: relative; - z-index: 1; - max-width: none; - height: 100%; -} -.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_content { - margin-left: 90px; - margin-top: 5px; - max-width: 700px; -} -.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_bg { - background: #eee; - opacity: 0.7; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: -1; -} - .openerp .oe_popup_form .oe_kanban_buttons .oe_highlight { color: #404040; background: none; From 6e846120b353fe94b0f61127503f77663f5a4f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 4 Apr 2013 13:56:58 +0200 Subject: [PATCH 18/19] [FIX] base.sass: fixed oe_read_only bzr revid: tde@openerp.com-20130404115658-1rrfr3nhvc34l18u --- addons/web/static/src/css/base.css | 48 ++++++++++++++--------------- addons/web/static/src/css/base.sass | 5 +-- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 50028703f51..1b5ce950b60 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -544,6 +544,28 @@ background: #7c7bad; color: #eeeeee; } +.openerp .oe_form_field_radio.oe_horizontal { + white-space: nowrap; +} +.openerp .oe_form_field_radio.oe_horizontal .oe_radio_header { + display: inline-block; + text-align: center; +} +.openerp .oe_form_field_radio.oe_vertical .oe_radio_header { + cursor: pointer; +} +.openerp .oe_form_field_radio .oe_radio_input { + cursor: pointer; + display: inline-block; + width: 20px; + background: transparent url(/web/static/src/img/icons/input_radio-off.png) no-repeat center center; +} +.openerp .oe_form_field_radio .oe_radio_input_on { + background: transparent url(/web/static/src/img/icons/input_radio-on.png) no-repeat center center; +} +.openerp .oe_form_field_radio .oe_radio_label { + cursor: default; +} .openerp .oe_tags { margin-bottom: 1px; } @@ -2105,10 +2127,10 @@ .openerp .oe_form_invisible { display: none !important; } -.openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { +.openerp .oe_form_editable .oe_read_only { display: none !important; } -.openerp .oe_form_readonly .oe_read_only { +.openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty { display: none !important; } .openerp .oe_form_readonly .oe_form .oe_form_field_date { @@ -2312,28 +2334,6 @@ display: inline-block; min-width: 70px; } -.openerp .oe_form_field_radio.oe_horizontal { - white-space: nowrap; -} -.openerp .oe_form_field_radio.oe_horizontal .oe_radio_header { - display: inline-block; - text-align: center; -} -.openerp .oe_form_field_radio.oe_vertical .oe_radio_header { - cursor: pointer; -} -.openerp .oe_form_field_radio .oe_radio_input { - cursor: pointer; - display: inline-block; - width: 20px; - background: transparent url(/web/static/src/img/icons/input_radio-off.png) no-repeat center center; -} -.openerp .oe_form_field_radio .oe_radio_input_on { - background: transparent url(/web/static/src/img/icons/input_radio-on.png) no-repeat center center; -} -.openerp .oe_form_field_radio .oe_radio_label { - cursor: default; -} .openerp .oe_form_field_progressbar.ui-progressbar { height: 22px; font-size: 10px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index c0d5aa0ad91..4be6aa9e150 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1681,11 +1681,12 @@ $sheet-padding: 16px @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) .oe_form_invisible display: none !important + .oe_form_editable + .oe_read_only + display: none !important .oe_form_readonly .oe_edit_only, .oe_form_field:empty display: none !important - .oe_read_only - display: none !important .oe_form .oe_form_field_date width: auto // Sheet and padding From 825d3445a8993fc5a720d4ad2cecb2a4dde41bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 5 Apr 2013 13:08:39 +0200 Subject: [PATCH 19/19] [IMP] kanban: added some css for alias box that appear in several kanban view, in order to factorize a bit. bzr revid: tde@openerp.com-20130405110839-umm25ui4stg7axs4 --- addons/web_kanban/static/src/css/kanban.css | 12 ++++++++++++ addons/web_kanban/static/src/css/kanban.sass | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 1c30f752a86..7feb371754c 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -291,6 +291,18 @@ font-weight: bold; margin: 2px 4px; } +.openerp .oe_kanban_view .oe_kanban_record .oe_kanban_alias { + margin: 0px 0 8px 0; +} +.openerp .oe_kanban_view .oe_kanban_record .oe_kanban_alias .oe_e { + font-size: 30px; + line-height: 6px; + vertical-align: top; + margin-right: 3px; + color: white; + text-shadow: 0px 0px 2px black; + float: left; +} .openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_record { margin-bottom: 4px; } diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index d87d39f5cb5..2752cecd294 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -280,6 +280,16 @@ .oe_kanban_title font-weight: bold margin: 2px 4px + .oe_kanban_alias + margin: 0px 0 8px 0 + .oe_e + font-size: 30px + line-height: 6px + vertical-align: top + margin-right: 3px + color: white + text-shadow: 0px 0px 2px rgba(0, 0, 0, 1) + float: left &.oe_kanban_grouped .oe_kanban_record margin-bottom: 4px