summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-11-17 15:27:29 +0100
committerChristophe Simonis <chs@odoo.com>2016-11-17 15:27:29 +0100
commite2fcace05e244bbf65da75680fe62c96eeb58455 (patch)
tree738a2b396b4326ff92b2012dd4bc87c97b9ffb68 /addons/web/static/src
parent41cebc4637b7aa15fcf25229746bb252f9745d4e (diff)
parent13dc7041a6b47bbcc703b855044f41321145c7ab (diff)
[MERGE] forward port branch 10.0 up to 13dc704
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/form_upgrade_widgets.js18
-rw-r--r--addons/web/static/src/js/views/form_widgets.js4
-rw-r--r--addons/web/static/src/js/views/graph_widget.js11
-rw-r--r--addons/web/static/src/js/views/list_view.js7
-rw-r--r--addons/web/static/src/less/form_view.less5
-rw-r--r--addons/web/static/src/less/graph_view.less6
6 files changed, 35 insertions, 16 deletions
diff --git a/addons/web/static/src/js/views/form_upgrade_widgets.js b/addons/web/static/src/js/views/form_upgrade_widgets.js
index ce32ef0664b..57f7ec858a3 100644
--- a/addons/web/static/src/js/views/form_upgrade_widgets.js
+++ b/addons/web/static/src/js/views/form_upgrade_widgets.js
@@ -18,16 +18,15 @@ var AbstractFieldUpgrade = {
events: {
'click input': 'on_click_input',
},
-
+
start: function() {
this._super.apply(this, arguments);
-
this.get_enterprise_label().after($("<span>", {
text: "Enterprise",
'class': "label label-primary oe_inline"
}));
},
-
+
open_dialog: function() {
var message = $(QWeb.render('EnterpriseUpgrade'));
@@ -43,7 +42,7 @@ var AbstractFieldUpgrade = {
close: true,
},
];
-
+
return new Dialog(this, {
size: 'medium',
buttons: buttons,
@@ -53,20 +52,20 @@ var AbstractFieldUpgrade = {
title: _t("Odoo Enterprise"),
}).open();
},
-
+
confirm_upgrade: function() {
new Model("res.users").call("search_count", [[["share", "=", false]]]).then(function(data) {
framework.redirect("https://www.odoo.com/odoo-enterprise/upgrade?num_users=" + data);
});
},
-
+
get_enterprise_label: function() {},
on_click_input: function() {},
};
var UpgradeBoolean = form_widgets.FieldBoolean.extend(AbstractFieldUpgrade, {
template: "FieldUpgradeBoolean",
-
+
get_enterprise_label: function() {
return this.$label;
},
@@ -82,11 +81,12 @@ var UpgradeBoolean = form_widgets.FieldBoolean.extend(AbstractFieldUpgrade, {
var UpgradeRadio = form_widgets.FieldRadio.extend(AbstractFieldUpgrade, {
get_enterprise_label: function() {
+ // override the margin:0px
+ this.$('label').addClass('mr4');
return this.$('label').last();
},
-
on_click_input: function(event) {
- if($(event.target).val() === 1) {
+ if($(event.target).val() === "1") {
this.open_dialog().on('closed', this, function() {
this.$('input').first().prop("checked", true);
});
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index fdd6b071110..d353831ba15 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -1584,8 +1584,8 @@ var AceEditor = common.AbstractField.extend(common.ReinitializeFieldMixin, {
if (!window.ace && !this.loadJS_def) {
this.loadJS_def = ajax.loadJS('/web/static/lib/ace/ace.odoo-custom.js').then(function () {
return $.when(ajax.loadJS('/web/static/lib/ace/mode-python.js'),
- ajax.loadJS('/web/static/lib/ace/mode-xml.js'),
- ajax.loadJS('/web/static/lib/ace/theme-monokai.js'));
+ ajax.loadJS('/web/static/lib/ace/mode-xml.js')
+ );
});
}
return $.when(this._super(), this.loadJS_def);
diff --git a/addons/web/static/src/js/views/graph_widget.js b/addons/web/static/src/js/views/graph_widget.js
index 80a575d0505..b2cd726c95c 100644
--- a/addons/web/static/src/js/views/graph_widget.js
+++ b/addons/web/static/src/js/views/graph_widget.js
@@ -98,7 +98,8 @@ return Widget.extend({
"there is no active filter in the search bar."),
}));
} else {
- this['display_' + this.mode]();
+ var chart = this['display_' + this.mode]();
+ chart.tooltip.chartContainer(this.$el[0]);
}
},
display_bar: function () {
@@ -182,6 +183,8 @@ return Widget.extend({
chart(svg);
this.to_remove = chart.update;
nv.utils.onWindowResize(chart.update);
+
+ return chart;
},
display_pie: function () {
var data = [],
@@ -232,6 +235,8 @@ return Widget.extend({
chart(svg);
this.to_remove = chart.update;
nv.utils.onWindowResize(chart.update);
+
+ return chart;
},
display_line: function () {
if (this.data.length < 2) {
@@ -309,7 +314,9 @@ return Widget.extend({
chart(svg);
this.to_remove = chart.update;
- nv.utils.onWindowResize(chart.update);
+ nv.utils.onWindowResize(chart.update);
+
+ return chart;
},
destroy: function () {
nv.utils.offWindowResize(this.to_remove);
diff --git a/addons/web/static/src/js/views/list_view.js b/addons/web/static/src/js/views/list_view.js
index bf4a48a5917..1a1c05f4d70 100644
--- a/addons/web/static/src/js/views/list_view.js
+++ b/addons/web/static/src/js/views/list_view.js
@@ -554,8 +554,11 @@ var ListView = View.extend({
if (self.display_nocontent_helper()) {
self.no_result();
} else {
- // Load previous page if the current one is empty
- if (self.records.length === 0 && self.dataset.size() > 0) {
+ if (self.records.length && self.current_min === 1) {
+ // Reload the list view if we delete all the records of the first page
+ self.reload();
+ } else if (self.records.length && self.dataset.size() > 0) {
+ // Load previous page if the current one is empty
self.pager.previous();
}
// Reload the list view if we are not on the last page
diff --git a/addons/web/static/src/less/form_view.less b/addons/web/static/src/less/form_view.less
index 7d870122502..22ce69a194f 100644
--- a/addons/web/static/src/less/form_view.less
+++ b/addons/web/static/src/less/form_view.less
@@ -136,6 +136,11 @@
}
}
+ // ace editor RO
+ .oe_form_field_text .oe_form_text_content {
+ white-space: pre-wrap;
+ }
+
// Tags
.o_form_field_many2manytags {
.badge {
diff --git a/addons/web/static/src/less/graph_view.less b/addons/web/static/src/less/graph_view.less
index c0d460ab3f1..f77b4faa9d0 100644
--- a/addons/web/static/src/less/graph_view.less
+++ b/addons/web/static/src/less/graph_view.less
@@ -10,9 +10,13 @@
}
}
+.nvtooltip thead {
+ background-color: transparent;
+}
+
// ------------------------------------------------------------------
// Control panel buttons
// ------------------------------------------------------------------
.o_graph_measures_list {
.o-selected-li;
-} \ No newline at end of file
+}