From ecf3348307026e915874193bb869ac13570e10fa Mon Sep 17 00:00:00 2001 From: sanj Date: Thu, 29 Jul 2010 00:37:12 +0530 Subject: [PATCH] allow to play media files in editor --- edgware/static/js/editor.js | 7 +++++++ edgware/templates/editor.html | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/edgware/static/js/editor.js b/edgware/static/js/editor.js index 65d1d87..41dba86 100644 --- a/edgware/static/js/editor.js +++ b/edgware/static/js/editor.js @@ -1629,6 +1629,13 @@ $('.upload_srts').live("click", function(e) { } }); +$('.play_media').live("click", function(e) { + var r = $(this).getResource(); + var filePath = r.file; + var base_url = "http://" + window.location.hostname; + window.open(base_url _ filePath); +}); + $('.toggle_handle').live("click", function() { var $that = $(this); var page = $(this).parents('.canvas'); diff --git a/edgware/templates/editor.html b/edgware/templates/editor.html index 8aefb5a..ce90e09 100644 --- a/edgware/templates/editor.html +++ b/edgware/templates/editor.html @@ -187,7 +187,8 @@