summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-06-20 16:27:28 +0200
committerqsm-odoo <qsm@odoo.com>2017-06-21 12:56:13 +0200
commit85d1e76ddbac9aeedfba4710443b74cbcc6586be (patch)
treece266dbcf69bb3aae986bc3cdc91536c03597ef6 /addons/web_editor/static/src/js
parent9fc7a04b4b4bc68535620fda7cfe2bafba6e0081 (diff)
[IMP] web, *: reorganize our libraries' extensions
* web_editor, web_tour, website_event_track Before this commit, one JS file was responsible for all the library extensions and fixes. There were two main problems with this system: - The file was only available in the backend (as some extensions are made on backend-only libraries). - Some other modules were doing library customizations. This commit creates one file per library to regroup their associated customization and adds them in the right asset. These are placed in the web module and every other module should avoid doing customizations. This allows to have libraries consistency accross all modules and between the backend and the frontend.
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/snippets.editor.js9
-rw-r--r--addons/web_editor/static/src/js/translator.js15
2 files changed, 0 insertions, 24 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index f68bf8756bb..e11e3205815 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -18,15 +18,6 @@ var data = {};
/* ----- SNIPPET SELECTOR ---- */
-$.extend($.expr[':'], {
- hasData: function (node) {
- return !!_.toArray(node.dataset).length;
- },
- data: function (node, i, m) {
- return $(node).data(m[3]);
- }
-});
-
data.globalSelector = {
closest: function () { return $(); },
all: function () { return $(); },
diff --git a/addons/web_editor/static/src/js/translator.js b/addons/web_editor/static/src/js/translator.js
index b2e7aa483fb..9d1ebe94082 100644
--- a/addons/web_editor/static/src/js/translator.js
+++ b/addons/web_editor/static/src/js/translator.js
@@ -13,21 +13,6 @@ var _t = core._t;
var translatable = !!$('html').data('translatable');
var edit_translations = !!$('html').data('edit_translations');
-$.fn.extend({
- prependEvent: function (events, selector, data, handler) {
- this.on(events, selector, data, handler);
- events = events.split(' ');
- this.each(function () {
- var el = this;
- _.each(events, function (event) {
- var handler = $._data(el, 'events')[event].pop();
- $._data(el, 'events')[event].unshift(handler);
- });
- });
- return this;
- }
-});
-
var RTE_Translate = rte.Class.extend({
saveElement: function ($el, context) {
// remove multi edition