summaryrefslogtreecommitdiff
path: root/addons/base_setup/static/src
diff options
context:
space:
mode:
authorTejas Tank <tta@openerp.com>2012-08-17 16:16:10 +0530
committerTejas Tank <tta@openerp.com>2012-08-17 16:16:10 +0530
commitf4f0d42a70d62320b0d0b0d3aab16336b696a485 (patch)
treeac01c07c02a5284eb67d044e92e3255506e70a08 /addons/base_setup/static/src
parentae1ed5900caf1d0429ef731343af4ae364d989ae (diff)
parent6666d5993f9753c6ec3aec721b41ebd3fbc6c18c (diff)
Merged with latest.
bzr revid: tta@openerp.com-20120817104610-h7pova57capzm1by
Diffstat (limited to 'addons/base_setup/static/src')
-rw-r--r--addons/base_setup/static/src/css/base_setup.css24
-rw-r--r--addons/base_setup/static/src/js/base_setup.js24
2 files changed, 48 insertions, 0 deletions
diff --git a/addons/base_setup/static/src/css/base_setup.css b/addons/base_setup/static/src/css/base_setup.css
new file mode 100644
index 00000000000..4e4b8a3c00a
--- /dev/null
+++ b/addons/base_setup/static/src/css/base_setup.css
@@ -0,0 +1,24 @@
+/* Remove bold from labels in config wizards */
+.oe_form_configuration .oe_form_group td:last-child .oe_form_label_help,
+.oe_form_configuration .oe_form_group td:last-child .oe_form_label {
+ font-weight: normal;
+}
+
+/* Separate .eo_link elements from the rest of the label's text */
+.oe_form_configuration .oe_form_group td:last-child .oe_link,
+.oe_form_configuration .oe_form_group td:last-child .oe_separate-from-text {
+ position: relative;
+ left: 2em;
+}
+.oe_form_configuration .oe_form_group td:last-child .oe_link:before,
+.oe_form_configuration .oe_form_group td:last-child .oe_separate-from-text:before {
+ content:"—";
+ padding-right: 1em;
+ color: grey;
+
+ /* Prevent the pseudo element's content to behave like its parent element */
+ position: absolute;
+ right: 100%;
+ bottom: 0; /* Parent element's height can vary */
+ pointer-events: none;
+}
diff --git a/addons/base_setup/static/src/js/base_setup.js b/addons/base_setup/static/src/js/base_setup.js
new file mode 100644
index 00000000000..4f900a3d69b
--- /dev/null
+++ b/addons/base_setup/static/src/js/base_setup.js
@@ -0,0 +1,24 @@
+openerp.base_setup = function(openerp) {
+ /* extend kanban to include the names of partner categories in the kanban view of partners */
+ openerp.web_kanban.KanbanView.include({
+ on_groups_started: function() {
+ var self = this;
+ self._super.apply(this, arguments);
+ if (this.dataset.model === 'res.partner') {
+ /* Set names for partner categories */
+ var category_ids = [];
+ this.$element.find('.oe_kanban_partner_categories span').each(function() {
+ category_ids.push($(this).data('category_id'));
+ });
+ var dataset = new openerp.web.DataSetSearch(this, 'res.partner.category', self.session.context);
+ dataset.name_get(_.uniq(category_ids)).then(function(result) {
+ _.each(result, function(value) {
+ self.$element
+ .find('.oe_kanban_partner_categories span[data-category_id=' + value[0] + ']')
+ .html(value[1]);
+ });
+ });
+ }
+ }
+ });
+};