summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/media
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-07-30 08:53:45 +0200
committerAleksander Machniak <alec@alec.pl>2012-07-30 08:53:45 +0200
commit750fcf8ece50e8d3b34439723d3ed788808e94f6 (patch)
treeaaf532dbbfaaf2b3922e6e90ab9263b661eb018d /program/js/tiny_mce/plugins/media
parentbaecd8becccd7786632c1cda895123293ceb1408 (diff)
Update to TinyMCE 3.5.6
Diffstat (limited to 'program/js/tiny_mce/plugins/media')
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin_src.js2
-rw-r--r--program/js/tiny_mce/plugins/media/js/media.js35
2 files changed, 35 insertions, 2 deletions
diff --git a/program/js/tiny_mce/plugins/media/editor_plugin_src.js b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
index aee92360b..33a58050e 100644
--- a/program/js/tiny_mce/plugins/media/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
@@ -382,7 +382,7 @@
data = JSON.parse(data);
typeItem = this.getType(node.attr('class'));
- style = node.attr('data-mce-style')
+ style = node.attr('data-mce-style');
if (!style) {
style = node.attr('style');
diff --git a/program/js/tiny_mce/plugins/media/js/media.js b/program/js/tiny_mce/plugins/media/js/media.js
index 733c5f6c2..f6a081a63 100644
--- a/program/js/tiny_mce/plugins/media/js/media.js
+++ b/program/js/tiny_mce/plugins/media/js/media.js
@@ -78,7 +78,7 @@
get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
- get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image');
+ get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media');
html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
if (html == "")
@@ -326,6 +326,39 @@
setVal('src', src);
setVal('media_type', data.type);
}
+
+ // Vimeo
+ if (src.match(/vimeo.com\/([0-9]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // stream.cz
+ if (src.match(/stream.cz\/((?!object).)*\/([0-9]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // Google maps
+ if (src.match(/maps.google.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed";
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
if (data.type == 'video') {
if (!data.video.sources)