summaryrefslogtreecommitdiff
path: root/addons/website_mail/static/src/js/website_mail.editor.js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-05-28 11:12:33 +0200
committerThibault Delavallée <tde@openerp.com>2014-05-28 11:12:33 +0200
commit0c89ca0f8f2d96e37353348fe33591da8142368b (patch)
tree337a7a4f08a83b15bf4bc99b9f4b1ce95612db07 /addons/website_mail/static/src/js/website_mail.editor.js
parent02018563b3e9b805eaee5d1d9672e6cc5eb240c4 (diff)
[FIX] website_mail, websit_mail_group: moved discussion group snippet to the right module; it should not be available when the mailing list archives module is not installed. Also fixed get_alias_info route to be mail_group specific and to avoid allowing people to browse the database.
Diffstat (limited to 'addons/website_mail/static/src/js/website_mail.editor.js')
-rw-r--r--addons/website_mail/static/src/js/website_mail.editor.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/addons/website_mail/static/src/js/website_mail.editor.js b/addons/website_mail/static/src/js/website_mail.editor.js
deleted file mode 100644
index fdfb948121f..00000000000
--- a/addons/website_mail/static/src/js/website_mail.editor.js
+++ /dev/null
@@ -1,40 +0,0 @@
-(function () {
- 'use strict';
-
- var website = openerp.website;
- var _t = openerp._t;
-
- website.snippet.options.subscribe = website.snippet.Option.extend({
- on_prompt: function () {
- var self = this;
- return website.prompt({
- id: "editor_new_subscribe_button",
- window_title: _t("Add a Subscribe Button"),
- select: _t("Discussion List"),
- init: function (field) {
- return website.session.model('mail.group')
- .call('name_search', ['', [['public','=','public']]], { context: website.get_context() });
- },
- }).then(function (mail_group_id) {
- self.$target.attr("data-id", mail_group_id);
- });
- },
- drop_and_build_snippet: function() {
- var self = this;
- this._super();
- this.on_prompt().fail(function () {
- self.editor.on_remove();
- });
- },
- start : function () {
- var self = this;
- this.$el.find(".js_mailing_list").on("click", _.bind(this.on_prompt, this));
- this._super();
- },
- clean_for_save: function () {
- this.$target.addClass("hidden");
- },
- });
-})();
-
-