-Index: tinymce/plugins/media/js/media.js
+Index: lib/editor/tinymce/plugins/media/js/media.js
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/editor/tinymce/plugins/media/js/media.js,v
-retrieving revision 1.3
-diff -u -r1.3 media.js
---- tiny_mce/plugins/media/js/media.js 23 Sep 2008 04:10:42 -0000 1.3
-+++ tiny_mce/plugins/media/js/media.js 25 Nov 2008 10:39:39 -0000
-@@ -263,6 +263,11 @@
- \r
- h += ' />';\r
- \r
-+ var is_youtube = repo_hook(f.src.value);\r
-+ if (is_youtube) {\r
+retrieving revision 1.1
+diff -u -r1.1 media.js
+--- lib/editor/tinymce/plugins/media/js/media.js 16 May 2009 20:54:41 -0000 1.1
++++ lib/editor/tinymce/plugins/media/js/media.js 17 May 2009 07:44:27 -0000
+@@ -263,6 +263,13 @@
+
+ h += ' />';
+
++ var is_youtube = repo_hook(f.src.value);
++ if (is_youtube) {
+ var re = new RegExp("v\/(.+)\#(.+)", "i");
+ var result = f.src.value.match(re);
+ h = '<a href="'+f.src.value+'">'+result[2]+'</a>';
-+ }\r
-+\r
- ed.execCommand('mceInsertContent', false, h);\r
- }\r
- \r
-@@ -305,12 +310,14 @@
- fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');\r
- \r
- // YouTube\r
-- if (v.match(/watch\?v=(.+)(.*)/)) {\r
-+ if (v.match(/watch\?v=(.+)(.*)/)) {\r
- f.width.value = '425';\r
- f.height.value = '350';\r
-- }\r
-+ } else if (v.match(/v\/(.+)(.*)/)) {\r
-+ f.width.value = '425';\r
-+ f.height.value = '350';\r
-+ return 'flash';\r
-+ }\r
- \r
- // Google video\r
- if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {\r
-@@ -625,4 +632,15 @@
- p.innerHTML = "<!-- x --->" + h;\r
- }\r
- \r
-+function repo_hook(url){\r
-+ var f = document.forms[0];\r
-+ if (url.match(/v\/(.+)(.*)/)) {\r
-+ f.width.value = '425';\r
-+ f.height.value = '350';\r
-+ return true;\r
-+ } else {\r
-+ return false;\r
-+ }\r
-+}\r
-+\r
- tinyMCEPopup.onInit.add(init);\r
++ }
++
+ ed.execCommand('mceInsertContent', false, h);
+ }
+
+@@ -310,7 +317,11 @@
+ f.height.value = '350';
+ f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
+ return 'flash';
+- }
++ } else if (v.match(/v\/(.+)(.*)/)) {
++ f.width.value = '425';
++ f.height.value = '350';
++ return 'flash';
++ }
+
+ // Google video
+ if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
+@@ -627,4 +638,15 @@
+ p.innerHTML = "<!-- x --->" + h;
+ }
+
++function repo_hook(url){
++ var f = document.forms[0];
++ if (url.match(/v\/(.+)(.*)/)) {
++ f.width.value = '425';
++ f.height.value = '350';
++ return true;
++ } else {
++ return false;
++ }
++}
++
+ tinyMCEPopup.onInit.add(init);
\r
h += ' />';\r
\r
+ var is_youtube = repo_hook(f.src.value);\r
+ if (is_youtube) {\r
+ var re = new RegExp("v\/(.+)\#(.+)", "i");\r
+ var result = f.src.value.match(re);\r
+ h = '<a href="'+f.src.value+'">'+result[2]+'</a>';\r
+ }\r
+\r
ed.execCommand('mceInsertContent', false, h);\r
}\r
\r
f.height.value = '350';\r
f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];\r
return 'flash';\r
- }\r
+ } else if (v.match(/v\/(.+)(.*)/)) {\r
+ f.width.value = '425';\r
+ f.height.value = '350';\r
+ return 'flash';\r
+ }\r
\r
// Google video\r
if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {\r
p.innerHTML = "<!-- x --->" + h;\r
}\r
\r
+function repo_hook(url){\r
+ var f = document.forms[0];\r
+ if (url.match(/v\/(.+)(.*)/)) {\r
+ f.width.value = '425';\r
+ f.height.value = '350';\r
+ return true;\r
+ } else {\r
+ return false;\r
+ }\r
+}\r
+\r
tinyMCEPopup.onInit.add(init);\r
1/ Download latest dev package from http://tinymce.moxiecode.com/download.php
2/ replace tiny_mce*.* files, themes/*, utils/* and plugins/* (keep dragmath, moodlenolink, spellchecker)
3/ copy tinymce/jscripts/tiny_mce/classes/Popup.js to Popup.js
- 4/ apply patches
- 5/ compress modified js files using yuicompressor.jar from dev package, use shell file extra/tools/compress.sh
- 6/ download all TinyMCE lang files and update moodle lang string files
+ 4/ apply plugins/media/* (extra/tinymce_plugin_media.patch) - MDL-16650
+ 5/ apply strings patch
+ 6/ compress modified js files using yuicompressor.jar from dev package, use shell file extra/tools/compress.sh
+ 7/ download all TinyMCE lang files and update moodle lang string files
+ 8/ rebuild string files
TODO:
- * apply plugins/media/* (extra/tinymce_plugin_media.patch) - MDL-16650
+
* lang string handling
* customize spellchecker
* finish update with info from http://docs.moodle.org/en/Development:TinyMCE_Upgrade