[WIP] website: media editor for image
authorchm@openerp.com <>
Wed, 26 Mar 2014 16:07:01 +0000 (17:07 +0100)
committerchm@openerp.com <>
Wed, 26 Mar 2014 16:07:01 +0000 (17:07 +0100)
bzr revid: chm@openerp.com-20140326160701-6wf21suhkv4rimyw

addons/website/static/src/js/website.editor.js

index e7e7a44..ad6f2f6 100644 (file)
             this._super();
             this.editor = editor;
         },
+        save: function () {
+        },
+        cancel: function () {
+        },
+        close: function () {
+        },
     });
     website.editor.MediaDialog = website.editor.Dialog.extend({
         template: 'website.editor.dialog.media',
+
         init: function (editor, media) {
             this.media = media;
             this.editor = editor;
         start: function (editor, media) {
             this.imageDialog = new website.editor.RTEImageDialog(this.editor, this.media);
             this.imageDialog.appendTo(this.$("#editor-media-image"));
-            console.log(this.imageDialog.$el[0]);
             this.iconDialog = new website.editor.FontIconsDialog(this.editor, this.media);
             this.iconDialog.appendTo(this.$("#editor-media-icon"));
             this.videoDialog = null;
             //this.videoDialog.appendTo(this.$("#editor-media-video"));
             return this._super();
-        }
+        },
+        save: function () {
+            this.imageDialog.save();
+            this.iconDialog.save();
+            // this.videoDialog.save();
+            return this._super();
+        },
     });
 
     /**