summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-02-02 14:52:15 +0100
committerChristophe Simonis <chs@odoo.com>2016-02-02 14:52:15 +0100
commit469e04e97c2aa60d9d41bd430e0aeba77ee6f9dd (patch)
tree0119f59009274d2c569920432c9a7fabafde0974 /addons/web/static/src/js
parent78d20b552b4374b94aec7097c0e6a48a3dd2d961 (diff)
parent2611a8198eaac60cf424742e4dc411700e439352 (diff)
[MERGE] forward port of branch saas-8 up to 2611a81
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/action_manager.js3
-rw-r--r--addons/web/static/src/js/boot.js23
-rw-r--r--addons/web/static/src/js/framework/misc.js2
-rw-r--r--addons/web/static/src/js/views/graph_view.js4
-rw-r--r--addons/web/static/src/js/views/list_view_editable.js2
-rw-r--r--addons/web/static/src/js/widgets/data_export.js1
6 files changed, 21 insertions, 14 deletions
diff --git a/addons/web/static/src/js/action_manager.js b/addons/web/static/src/js/action_manager.js
index 2337583b7f9..5eb5aaa9891 100644
--- a/addons/web/static/src/js/action_manager.js
+++ b/addons/web/static/src/js/action_manager.js
@@ -180,6 +180,9 @@ var ViewManagerAction = WidgetAction.extend({
* @return {jQuery} the view_manager's $el
*/
detach: function() {
+ // Hack to remove badly inserted nvd3 tooltips ; should be removed when upgrading nvd3 lib
+ $('body > .nvtooltip').remove();
+
return this.widget.$el.detach();
},
/**
diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js
index 77115499b46..34abca7ef03 100644
--- a/addons/web/static/src/js/boot.js
+++ b/addons/web/static/src/js/boot.js
@@ -203,23 +203,28 @@
function process_job (job) {
var require = make_require(job);
+
+ var job_exec;
+ var def = $.Deferred();
try {
- var def = $.Deferred();
- $.when(job.factory.call(null, require)).then(
+ job_exec = job.factory.call(null, require);
+ jobs.splice(jobs.indexOf(job), 1);
+ job_deferred.push(def);
+ } catch (e) {
+ job.error = e;
+ }
+ if (!job.error) {
+ $.when(job_exec).then(
function (data) {
services[job.name] = data;
- clearTimeout(time);
- time = _.defer(odoo.process_jobs, jobs, services);
def.resolve();
+ odoo.process_jobs(jobs, services);
}, function (e) {
job.rejected = e || true;
jobs.push(job);
def.resolve();
- });
- jobs.splice(jobs.indexOf(job), 1);
- job_deferred.push(def);
- } catch (e) {
- job.error = e;
+ }
+ );
}
}
diff --git a/addons/web/static/src/js/framework/misc.js b/addons/web/static/src/js/framework/misc.js
index fd6bb6d6288..25e80c33e84 100644
--- a/addons/web/static/src/js/framework/misc.js
+++ b/addons/web/static/src/js/framework/misc.js
@@ -93,12 +93,14 @@ function blockUI () {
var throbber = new Throbber();
throbbers.push(throbber);
throbber.appendTo($(".oe_blockui_spin_container"));
+ $('body').addClass('o_ui_blocked');
return tmp;
}
function unblockUI () {
_.invoke(throbbers, 'destroy');
throbbers = [];
+ $('body').removeClass('o_ui_blocked');
return $.unblockUI.apply($, arguments);
}
diff --git a/addons/web/static/src/js/views/graph_view.js b/addons/web/static/src/js/views/graph_view.js
index f8f1bba909a..8a604640fc9 100644
--- a/addons/web/static/src/js/views/graph_view.js
+++ b/addons/web/static/src/js/views/graph_view.js
@@ -19,10 +19,6 @@ var GraphView = View.extend({
icon: 'fa-bar-chart',
view_type: 'graph',
- on_detach_callback: function () {
- $('body > .nvtooltip').remove();
- },
-
init: function(parent, dataset, view_id, options) {
this._super(parent, dataset, view_id, options);
diff --git a/addons/web/static/src/js/views/list_view_editable.js b/addons/web/static/src/js/views/list_view_editable.js
index 9a38d27e050..2bd6dc1ab25 100644
--- a/addons/web/static/src/js/views/list_view_editable.js
+++ b/addons/web/static/src/js/views/list_view_editable.js
@@ -420,7 +420,7 @@ ListView.include(/** @lends instance.web.ListView# */{
*/
resize_field: function (field, cell) {
var $cell = $(cell);
- field.set_dimensions($cell.outerHeight(), $cell.outerWidth()-3); // -3 to have a gap between fields
+ field.set_dimensions($cell.outerHeight(), $cell.outerWidth());
field.$el.addClass('o_temp_visible').css({top: 0, left: 0}).position({
my: 'left top',
at: 'left top',
diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js
index 57159732ad6..a73020ce9b2 100644
--- a/addons/web/static/src/js/widgets/data_export.js
+++ b/addons/web/static/src/js/widgets/data_export.js
@@ -388,6 +388,7 @@ var DataExport = Dialog.extend({
},
add_field: function(field_id, string) {
var field_list = this.$el.find('#fields_list');
+ field_id = this.records[field_id] || field_id;
if (this.$el.find("#fields_list option[value='" + field_id + "']")
&& !this.$el.find("#fields_list option[value='" + field_id + "']").length) {
field_list.append(new Option(string, field_id));