From 239b6bc0b5a2a644486737f2b0b71e7e6c0a2edf Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 21 Aug 2014 18:00:23 +0200 Subject: [IMP] website snippet new option, gallery website.snippet: The methods described in javascript will be called automatically from the data-method_name = value on li snippets options. The methods are called in the order relative to children of xml (eg:
  • ...
  • ... , the method1 is then called method2). Methods receive two arguments: type (over, click, reset) and value. data-snippet-id-option becomes data-snippet-id. Several xml options can use the same data-snippet-id. add a new gallery snippet convert website_sale to the new option system --- addons/website/static/src/js/website.editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/website/static/src/js/website.editor.js') diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 9b86002626c..205d8dde076 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -1568,9 +1568,9 @@ } var callback = _.uniqueId('func_'); this.$('input[name=func]').val(callback); - window[callback] = function (url, error) { + window[callback] = function (attachments, error) { delete window[callback]; - self.file_selected(url, error); + self.file_selected(attachments[0]['website_url'], error); }; }, file_selection: function () { -- cgit v1.2.3