From 4f0c87d26f2c378b449954b6e02d92abffa6014c Mon Sep 17 00:00:00 2001 From: Anon Ray Date: Sun, 6 Oct 2013 19:03:45 +0530 Subject: [PATCH] Add callback input for JS plugin in UI Add callback input in the UI for JS plugins. --- mouchak/static/js/editor.js | 9 ++++++++- mouchak/templates/editor.html | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/mouchak/static/js/editor.js b/mouchak/static/js/editor.js index 030da12..4e74771 100644 --- a/mouchak/static/js/editor.js +++ b/mouchak/static/js/editor.js @@ -326,7 +326,7 @@ } } else if(type === 'image' || type === 'video' || - type === 'audio' || type === 'plugin') { + type === 'audio') { var template = _.template($('#media-template').html()); $('#specific-content').html(template({ @@ -338,6 +338,13 @@ //$('#specific-content.preview').html(); view.render('.preview');*/ } + else if(type === 'plugin') { + var template = _.template($('#plugin-template').html()); + $('#specific-content').html(template({ + src: this.model.get('src'), + callback: this.model.get('callback') + })); + } else if(type === 'map') { var template = _.template($('#map-template').html()); $('#specific-content').html(template({ diff --git a/mouchak/templates/editor.html b/mouchak/templates/editor.html index 437779b..8f56c2b 100644 --- a/mouchak/templates/editor.html +++ b/mouchak/templates/editor.html @@ -288,6 +288,31 @@ + +