background-color: #f0eeee;
border-bottom: 1px solid #afafb6;
}
+.openerp .oe-view-manager-header .selected {
+ display: block;
+}
+.openerp .oe-view-manager-header .selected a {
+ font-weight: bold;
+}
+.openerp .oe-view-manager-header .selected a:before {
+ font-family: FontAwesome;
+ position: absolute;
+ left: 6px;
+ top: 3px;
+ content: "";
+}
+.openerp .oe-view-manager-header .dropdown-menu li {
+ position: relative;
+}
+.openerp .oe-view-manager-header .dropdown-menu li a {
+ padding: 3px 25px;
+}
.openerp .oe-view-manager-header .oe-right-toolbar {
float: right;
}
display: inline-block;
float: right;
}
+.openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_form_binary_form {
+ cursor: pointer;
+}
+.openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_form_binary_form span {
+ padding: 3px 20px;
+}
+.openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_form_binary_form input.oe_form_binary_file {
+ width: 100%;
+}
+.openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_form_binary_form:hover {
+ background-color: #f5f5f5;
+}
+.openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_file_attachment {
+ display: inline;
+ padding: 3px 20px;
+}
+.openerp .oe-view-manager-header .oe-view-manager-sidebar .oe_sidebar_delete_item {
+ display: inline;
+ padding: 0;
+}
.openerp .oe-view-manager-header .oe_form_buttons {
padding: 0;
}
border-radius: 0px;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input {
- padding: 0 0 0 6px;
+ padding: 2px 0 0 6px;
font-size: 12px;
height: 16px;
}
padding-left: 0;
padding-right: 10px;
}
-.openerp .oe-search-options .selected {
- display: block;
-}
-.openerp .oe-search-options .selected a {
- font-weight: bold;
-}
-.openerp .oe-search-options .selected a:before {
- font-family: FontAwesome;
- position: absolute;
- left: 6px;
- top: 3px;
- content: "";
-}
.openerp .oe-search-options .oe-group-selector {
margin: 3px 25px;
min-width: calc(100% - 40px);
},
'click .oe_searchview_unfold_drawer': function (e) {
e.stopImmediatePropagation();
- $(e.target).toggleClass('fa-chevron-right')
- .toggleClass('fa-chevron-down');
+ $(e.target).toggleClass('fa-caret-down')
+ .toggleClass('fa-caret-up');
localStorage.visible_search_menu = !(localStorage.visible_search_menu === 'true');
this.toggle_buttons();
},
context: this.dataset.get_context(),
});
this.$('.oe_searchview_unfold_drawer')
- .toggleClass('fa-chevron-right', !this.visible_filters)
- .toggleClass('fa-chevron-down', this.visible_filters);
+ .toggleClass('fa-caret-down', !this.visible_filters)
+ .toggleClass('fa-caret-up', this.visible_filters);
return $.when(this._super(), this.alive($.when(load_view))
.then(this.view_loaded.bind(this)));
},
this.model = model;
this.domain = domain;
this.mode = options.mode || 'pivot'; // pivot, bar, pie, line
- this.heatmap_mode = options.heatmap_mode || 'none';
this.visible_ui = options.visible_ui || true;
this.bar_ui = options.bar_ui || 'group';
this.graph_view = options.graph_view || null;
this.table = $('<table>');
this.$('.graph_main_content').append(this.table);
- var $pivot_button = this.$buttons.find('.oe-pivot-mode');
- $pivot_button.click(function () {
+ this.$buttons.find('.oe-pivot-mode').click(function () {
self.set_mode.bind(self)('pivot');
});
this.$measure_list = this.$buttons.find('.oe-measure-list');
- var $barchart_button = this.$buttons.find('.oe-bar-mode');
- $barchart_button.click(function () {
+ this.$buttons.find('.oe-bar-mode').click(function () {
self.set_mode.bind(self)('bar');
});
- var $line_chart_button = this.$buttons.find('.oe-line-mode');
- $line_chart_button.click(function () {
+ this.$buttons.find('.oe-line-mode').click(function () {
self.set_mode.bind(self)('line');
});
- var $pie_chart_button = this.$buttons.find('.oe-pie-mode');
- $pie_chart_button.click(function () {
+ this.$buttons.find('.oe-pie-mode').click(function () {
self.set_mode.bind(self)('pie');
});
+ this.$buttons.find('.fa-expand').click(this.swap_axis.bind(this));
+ this.$buttons.find('.fa-arrows-alt').click(function () {
+ self.pivot.expand_all().then(self.proxy('display_data'));
+ });
+ this.$buttons.find('.fa-download').click(this.export_xls.bind(this));
var indexes = {'pivot': 0, 'bar': 1, 'line': 2, 'chart': 3};
- this.$('.graph_mode_selection label').eq(indexes[this.mode]).addClass('active');
+ this.$('.graph_mode_selection label').eq(indexes[this.mode]).addClass('selected');
if (this.mode !== 'pivot') {
this.$('.graph_heatmap label').addClass('disabled');
this.display_data();
},
- set_heatmap_mode: function (mode) { // none, row, col, all
- this.heatmap_mode = mode;
- if (mode === 'none') {
- this.$('.graph_heatmap label').removeClass('disabled');
- this.$('.graph_heatmap label').removeClass('active');
- }
- this.display_data();
- },
-
create_field_value: function (f) {
var field = (_.contains(f, ':')) ? f.split(':')[0] : f,
groupby_field = _.findWhere(this.groupby_fields, {field:field}),
put_measure_checkmarks: function () {
var self = this,
measures_li = this.$measure_list.find('li');
- measures_li.removeClass('active');
+ measures_li.removeClass('selected');
_.each(this.measure_list, function (measure, index) {
if (_.findWhere(self.pivot.measures, measure)) {
- measures_li.eq(index).addClass('active');
+ measures_li.eq(index).addClass('selected');
}
});
}
},
- heatmap_mode_selection: function (event) {
- event.preventDefault();
- var mode = event.currentTarget.getAttribute('data-mode');
- if (this.heatmap_mode === mode) {
- event.stopPropagation();
- this.set_heatmap_mode('none');
- } else {
- this.set_heatmap_mode(mode);
- }
- },
-
header_cell_clicked: function (event) {
event.preventDefault();
event.stopPropagation();
var formatted_value = raw && !_.isUndefined(value) ? value : openerp.web.format_value(value, {type:this.pivot.measures[index].type}),
cell = {value:formatted_value};
- if (this.heatmap_mode === 'none') { return cell; }
- var total = (this.heatmap_mode === 'both') ? this.pivot.get_total()[index]
- : (this.heatmap_mode === 'row') ? this.pivot.get_total(row)[index]
- : this.pivot.get_total(col)[index];
- var color = Math.floor(90 + 165*(total - Math.abs(value))/total);
- if (color < 255) {
- cell.color = color;
- }
return cell;
},
this.$('.graph_main_content svg').remove();
this.$('.graph_main_content div').remove();
this.table.empty();
- this.table.toggleClass('heatmap', this.heatmap_mode !== 'none');
this.$('.graph_options_selection label').last().toggleClass('disabled', this.pivot.no_data);
this.width = this.$el.width();
this.height = Math.min(Math.max(document.documentElement.clientHeight - 116 - 60, 250), Math.round(0.8*this.$el.width()));