summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-05-18 18:02:51 +0200
committerqsm-odoo <qsm@odoo.com>2016-07-04 17:23:59 +0200
commit62fb1bb92493b00bd45ed3f4eced5ca8b23f81d6 (patch)
tree911fcb10158fa89ddd75ff2aac195f79236f3e59 /addons/web/static/src/js/framework
parentc1ab17337bdc816222be372aff314fcf5de8ba92 (diff)
[REF] web_editor: code refactoring and simplification
* Remove dead code + optimization * Use Dialog API from web module * Reorganize files * Correct buggy $() function for snippet option class * Add comments * Fix the snippet parent navigation : If a page contained a three level snippet structure (i.e A contains B contains C), when editing the following bug occured : If B or C was selected first, parenting buttons were correctly set. But if selecting A then C, clicking on the parent lead to going back on A instead of going on B. * Fix snippet thumbnail layout * Better isolate ui css from themes * MediaDialog image list : prevent displaying empty attachments * ...
Diffstat (limited to 'addons/web/static/src/js/framework')
-rw-r--r--addons/web/static/src/js/framework/ajax.js4
-rw-r--r--addons/web/static/src/js/framework/dialog.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/framework/ajax.js b/addons/web/static/src/js/framework/ajax.js
index 50e0e2f0c59..09bcc40d918 100644
--- a/addons/web/static/src/js/framework/ajax.js
+++ b/addons/web/static/src/js/framework/ajax.js
@@ -12,7 +12,7 @@ function genericJsonRpc (fct_name, params, fct) {
params: params,
id: Math.floor(Math.random() * 1000 * 1000 * 1000)
};
- var xhr = fct(data);
+ var xhr = fct(data);
var result = xhr.pipe(function(result) {
core.bus.trigger('rpc:result', data, result);
if (result.error !== undefined) {
@@ -119,7 +119,7 @@ function jsonpRpc(url, fct_name, params, settings) {
});
}
-// helper function to make a rpc with a function name hardcoded to 'call'
+// helper function to make a rpc with a function name hardcoded to 'call'
function rpc(url, params, settings) {
return jsonRpc(url, 'call', params, settings);
}
diff --git a/addons/web/static/src/js/framework/dialog.js b/addons/web/static/src/js/framework/dialog.js
index f401cf78591..bf590f9a582 100644
--- a/addons/web/static/src/js/framework/dialog.js
+++ b/addons/web/static/src/js/framework/dialog.js
@@ -60,7 +60,7 @@ var Dialog = Widget.extend({
this.$footer = this.$modal.find(".modal-footer");
this.set_buttons(options.buttons);
-
+
this.$modal.on('hidden.bs.modal', _.bind(this.destroy, this));
},
@@ -94,7 +94,7 @@ var Dialog = Widget.extend({
self.$footer.append($b);
});
},
-
+
set_title: function(title, subtitle) {
this.title = title || "";
if (subtitle !== undefined) {
@@ -122,7 +122,7 @@ var Dialog = Widget.extend({
self.$modal.modal('show');
self._opened.resolve();
});
-
+
return self;
},