Normalize line endings VIVO-101

This commit is contained in:
Brian Caruso 2013-07-18 15:19:53 -04:00
parent b097a4d754
commit 54f79f2ea7
587 changed files with 91501 additions and 91501 deletions

View file

@ -1,6 +1,6 @@
.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;}
.mceItemShockWave {background-image: url(../img/shockwave.gif);}
.mceItemFlash {background-image:url(../img/flash.gif);}
.mceItemQuickTime {background-image:url(../img/quicktime.gif);}
.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);}
.mceItemRealMedia {background-image:url(../img/realmedia.gif);}
.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;}
.mceItemShockWave {background-image: url(../img/shockwave.gif);}
.mceItemFlash {background-image:url(../img/flash.gif);}
.mceItemQuickTime {background-image:url(../img/quicktime.gif);}
.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);}
.mceItemRealMedia {background-image:url(../img/realmedia.gif);}

View file

@ -1,16 +1,16 @@
#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
#hspace, #vspace { width: 50px }
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
#flash_base, #flash_flashvars { width: 240px }
#width, #height { width: 40px }
#src, #media_type { width: 250px }
#class { width: 120px }
#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto }
.panel_wrapper div.current { height: 390px; overflow: auto }
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
.mceAddSelectValue { background-color: #DDDDDD }
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
#qt_qtsrc { width: 200px }
#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
#hspace, #vspace { width: 50px }
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
#flash_base, #flash_flashvars { width: 240px }
#width, #height { width: 40px }
#src, #media_type { width: 250px }
#class { width: 120px }
#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto }
.panel_wrapper div.current { height: 390px; overflow: auto }
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
.mceAddSelectValue { background-color: #DDDDDD }
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
#qt_qtsrc { width: 200px }

View file

@ -1,366 +1,366 @@
/**
* $Id: editor_plugin_src.js 880 2008-06-19 10:14:14Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
(function() {
var each = tinymce.each;
tinymce.create('tinymce.plugins.MediaPlugin', {
init : function(ed, url) {
var t = this;
t.editor = ed;
t.url = url;
function isMediaElm(n) {
return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);
};
ed.onPreInit.add(function() {
// Force in _value parameter this extra parameter is required for older Opera versions
ed.serializer.addRules('param[name|value|_value]');
});
// Register commands
ed.addCommand('mceMedia', function() {
ed.windowManager.open({
file : url + '/media.htm',
width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
height : 470 + parseInt(ed.getLang('media.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
ed.onNodeChange.add(function(ed, cm, n) {
cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n));
});
ed.onInit.add(function() {
var lo = {
mceItemFlash : 'flash',
mceItemShockWave : 'shockwave',
mceItemWindowsMedia : 'windowsmedia',
mceItemQuickTime : 'quicktime',
mceItemRealMedia : 'realmedia'
};
if (ed.settings.content_css !== false)
ed.dom.loadCSS(url + "/css/content.css");
if (ed.theme.onResolveName) {
ed.theme.onResolveName.add(function(th, o) {
if (o.name == 'img') {
each(lo, function(v, k) {
if (ed.dom.hasClass(o.node, k)) {
o.name = v;
o.title = ed.dom.getAttrib(o.node, 'title');
return false;
}
});
}
});
}
if (ed && ed.plugins.contextmenu) {
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) {
m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
}
});
}
});
ed.onBeforeSetContent.add(function(ed, o) {
var h = o.content;
h = h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) {
var o = t._parse(c);
return '<img class="mceItem' + b + '" title="' + ed.dom.encode(c) + '" src="' + url + '/img/trans.gif" width="' + o.width + '" height="' + o.height + '" />'
});
h = h.replace(/<object([^>]*)>/gi, '<span class="mceItemObject" $1>');
h = h.replace(/<embed([^>]*)\/?>/gi, '<span class="mceItemEmbed" $1></span>');
h = h.replace(/<embed([^>]*)>/gi, '<span class="mceItemEmbed" $1>');
h = h.replace(/<\/(object)([^>]*)>/gi, '</span>');
h = h.replace(/<\/embed>/gi, '');
h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<span ' + b.replace(/value=/gi, '_value=') + ' class="mceItemParam"></span>'});
h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam"></span>');
o.content = h;
});
ed.onSetContent.add(function() {
t._spansToImgs(ed.getBody());
});
ed.onPreProcess.add(function(ed, o) {
var dom = ed.dom;
if (o.set) {
t._spansToImgs(o.node);
each(dom.select('IMG', o.node), function(n) {
var p;
if (isMediaElm(n)) {
p = t._parse(n.title);
dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100));
dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100));
}
});
}
if (o.get) {
each(dom.select('IMG', o.node), function(n) {
var ci, cb, mt;
if (ed.getParam('media_use_script')) {
if (isMediaElm(n))
n.className = n.className.replace(/mceItem/g, 'mceTemp');
return;
}
switch (n.className) {
case 'mceItemFlash':
ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
mt = 'application/x-shockwave-flash';
break;
case 'mceItemShockWave':
ci = '166b1bca-3f9c-11cf-8075-444553540000';
cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
mt = 'application/x-director';
break;
case 'mceItemWindowsMedia':
ci = ed.getParam('media_wmp6_compatible') ? '05589fa1-c356-11ce-bf01-00aa0055595a' : '6bf52a52-394a-11d3-b153-00c04f79faa6';
cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
mt = 'application/x-mplayer2';
break;
case 'mceItemQuickTime':
ci = '02bf25d5-8c17-4b23-bc80-d3488abddc6b';
cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
mt = 'video/quicktime';
break;
case 'mceItemRealMedia':
ci = 'cfcdaa03-8be4-11cf-b84b-0020afbbccfa';
cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
mt = 'audio/x-pn-realaudio-plugin';
break;
}
if (ci) {
dom.replace(t._buildObj({
classid : ci,
codebase : cb,
type : mt
}, n), n);
}
});
}
});
ed.onPostProcess.add(function(ed, o) {
o.content = o.content.replace(/_value=/g, 'value=');
});
if (ed.getParam('media_use_script')) {
function getAttr(s, n) {
n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
return n ? ed.dom.decode(n[1]) : '';
};
ed.onPostProcess.add(function(ed, o) {
o.content = o.content.replace(/<img[^>]+>/g, function(im) {
var cl = getAttr(im, 'class');
if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) {
at = t._parse(getAttr(im, 'title'));
at.width = getAttr(im, 'width');
at.height = getAttr(im, 'height');
im = '<script type="text/javascript">write' + cl.substring(7) + '({' + t._serialize(at) + '});</script>';
}
return im;
});
});
}
},
getInfo : function() {
return {
longname : 'Media',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
// Private methods
_buildObj : function(o, n) {
var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title);
p.width = o.width = dom.getAttrib(n, 'width') || 100;
p.height = o.height = dom.getAttrib(n, 'height') || 100;
ob = dom.create('span', {
mce_name : 'object',
classid : "clsid:" + o.classid,
codebase : o.codebase,
width : o.width,
height : o.height
});
if (p.src)
p.src = ed.convertURL(p.src, 'src', n);
each (p, function(v, k) {
if (!/^(width|height|codebase|classid)$/.test(k)) {
// Use url instead of src in IE for Windows media
if (o.type == 'application/x-mplayer2' && k == 'src')
k = 'url';
dom.add(ob, 'span', {mce_name : 'param', name : k, '_value' : v});
}
});
dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p));
return ob;
},
_spansToImgs : function(p) {
var t = this, dom = t.editor.dom, im, ci;
each(dom.select('span', p), function(n) {
// Convert object into image
if (dom.getAttrib(n, 'class') == 'mceItemObject') {
ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, '');
switch (ci) {
case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
dom.replace(t._createImg('mceItemFlash', n), n);
break;
case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
dom.replace(t._createImg('mceItemShockWave', n), n);
break;
case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
dom.replace(t._createImg('mceItemWindowsMedia', n), n);
break;
case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
dom.replace(t._createImg('mceItemQuickTime', n), n);
break;
case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
dom.replace(t._createImg('mceItemRealMedia', n), n);
break;
default:
dom.replace(t._createImg('mceItemFlash', n), n);
}
return;
}
// Convert embed into image
if (dom.getAttrib(n, 'class') == 'mceItemEmbed') {
switch (dom.getAttrib(n, 'type')) {
case 'application/x-shockwave-flash':
dom.replace(t._createImg('mceItemFlash', n), n);
break;
case 'application/x-director':
dom.replace(t._createImg('mceItemShockWave', n), n);
break;
case 'application/x-mplayer2':
dom.replace(t._createImg('mceItemWindowsMedia', n), n);
break;
case 'video/quicktime':
dom.replace(t._createImg('mceItemQuickTime', n), n);
break;
case 'audio/x-pn-realaudio-plugin':
dom.replace(t._createImg('mceItemRealMedia', n), n);
break;
default:
dom.replace(t._createImg('mceItemFlash', n), n);
}
}
});
},
_createImg : function(cl, n) {
var im, dom = this.editor.dom, pa = {}, ti = '';
// Create image
im = dom.create('img', {
src : this.url + '/img/trans.gif',
width : dom.getAttrib(n, 'width') || 100,
height : dom.getAttrib(n, 'height') || 100,
'class' : cl
});
// Setup base parameters
each(['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode'], function(na) {
var v = dom.getAttrib(n, na);
if (v)
pa[na] = v;
});
// Add optional parameters
each(dom.select('span', n), function(n) {
if (dom.hasClass(n, 'mceItemParam'))
pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_value');
});
// Use src not movie
if (pa.movie) {
pa.src = pa.movie;
delete pa.movie;
}
delete pa.width;
delete pa.height;
im.title = this._serialize(pa);
return im;
},
_parse : function(s) {
return tinymce.util.JSON.parse('{' + s + '}');
},
_serialize : function(o) {
return tinymce.util.JSON.serialize(o).replace(/[{}]/g, '');
}
});
// Register plugin
tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
/**
* $Id: editor_plugin_src.js 880 2008-06-19 10:14:14Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
(function() {
var each = tinymce.each;
tinymce.create('tinymce.plugins.MediaPlugin', {
init : function(ed, url) {
var t = this;
t.editor = ed;
t.url = url;
function isMediaElm(n) {
return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);
};
ed.onPreInit.add(function() {
// Force in _value parameter this extra parameter is required for older Opera versions
ed.serializer.addRules('param[name|value|_value]');
});
// Register commands
ed.addCommand('mceMedia', function() {
ed.windowManager.open({
file : url + '/media.htm',
width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
height : 470 + parseInt(ed.getLang('media.delta_height', 0)),
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
ed.onNodeChange.add(function(ed, cm, n) {
cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n));
});
ed.onInit.add(function() {
var lo = {
mceItemFlash : 'flash',
mceItemShockWave : 'shockwave',
mceItemWindowsMedia : 'windowsmedia',
mceItemQuickTime : 'quicktime',
mceItemRealMedia : 'realmedia'
};
if (ed.settings.content_css !== false)
ed.dom.loadCSS(url + "/css/content.css");
if (ed.theme.onResolveName) {
ed.theme.onResolveName.add(function(th, o) {
if (o.name == 'img') {
each(lo, function(v, k) {
if (ed.dom.hasClass(o.node, k)) {
o.name = v;
o.title = ed.dom.getAttrib(o.node, 'title');
return false;
}
});
}
});
}
if (ed && ed.plugins.contextmenu) {
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) {
m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
}
});
}
});
ed.onBeforeSetContent.add(function(ed, o) {
var h = o.content;
h = h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) {
var o = t._parse(c);
return '<img class="mceItem' + b + '" title="' + ed.dom.encode(c) + '" src="' + url + '/img/trans.gif" width="' + o.width + '" height="' + o.height + '" />'
});
h = h.replace(/<object([^>]*)>/gi, '<span class="mceItemObject" $1>');
h = h.replace(/<embed([^>]*)\/?>/gi, '<span class="mceItemEmbed" $1></span>');
h = h.replace(/<embed([^>]*)>/gi, '<span class="mceItemEmbed" $1>');
h = h.replace(/<\/(object)([^>]*)>/gi, '</span>');
h = h.replace(/<\/embed>/gi, '');
h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<span ' + b.replace(/value=/gi, '_value=') + ' class="mceItemParam"></span>'});
h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam"></span>');
o.content = h;
});
ed.onSetContent.add(function() {
t._spansToImgs(ed.getBody());
});
ed.onPreProcess.add(function(ed, o) {
var dom = ed.dom;
if (o.set) {
t._spansToImgs(o.node);
each(dom.select('IMG', o.node), function(n) {
var p;
if (isMediaElm(n)) {
p = t._parse(n.title);
dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100));
dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100));
}
});
}
if (o.get) {
each(dom.select('IMG', o.node), function(n) {
var ci, cb, mt;
if (ed.getParam('media_use_script')) {
if (isMediaElm(n))
n.className = n.className.replace(/mceItem/g, 'mceTemp');
return;
}
switch (n.className) {
case 'mceItemFlash':
ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
mt = 'application/x-shockwave-flash';
break;
case 'mceItemShockWave':
ci = '166b1bca-3f9c-11cf-8075-444553540000';
cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
mt = 'application/x-director';
break;
case 'mceItemWindowsMedia':
ci = ed.getParam('media_wmp6_compatible') ? '05589fa1-c356-11ce-bf01-00aa0055595a' : '6bf52a52-394a-11d3-b153-00c04f79faa6';
cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
mt = 'application/x-mplayer2';
break;
case 'mceItemQuickTime':
ci = '02bf25d5-8c17-4b23-bc80-d3488abddc6b';
cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
mt = 'video/quicktime';
break;
case 'mceItemRealMedia':
ci = 'cfcdaa03-8be4-11cf-b84b-0020afbbccfa';
cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
mt = 'audio/x-pn-realaudio-plugin';
break;
}
if (ci) {
dom.replace(t._buildObj({
classid : ci,
codebase : cb,
type : mt
}, n), n);
}
});
}
});
ed.onPostProcess.add(function(ed, o) {
o.content = o.content.replace(/_value=/g, 'value=');
});
if (ed.getParam('media_use_script')) {
function getAttr(s, n) {
n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
return n ? ed.dom.decode(n[1]) : '';
};
ed.onPostProcess.add(function(ed, o) {
o.content = o.content.replace(/<img[^>]+>/g, function(im) {
var cl = getAttr(im, 'class');
if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) {
at = t._parse(getAttr(im, 'title'));
at.width = getAttr(im, 'width');
at.height = getAttr(im, 'height');
im = '<script type="text/javascript">write' + cl.substring(7) + '({' + t._serialize(at) + '});</script>';
}
return im;
});
});
}
},
getInfo : function() {
return {
longname : 'Media',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
// Private methods
_buildObj : function(o, n) {
var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title);
p.width = o.width = dom.getAttrib(n, 'width') || 100;
p.height = o.height = dom.getAttrib(n, 'height') || 100;
ob = dom.create('span', {
mce_name : 'object',
classid : "clsid:" + o.classid,
codebase : o.codebase,
width : o.width,
height : o.height
});
if (p.src)
p.src = ed.convertURL(p.src, 'src', n);
each (p, function(v, k) {
if (!/^(width|height|codebase|classid)$/.test(k)) {
// Use url instead of src in IE for Windows media
if (o.type == 'application/x-mplayer2' && k == 'src')
k = 'url';
dom.add(ob, 'span', {mce_name : 'param', name : k, '_value' : v});
}
});
dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p));
return ob;
},
_spansToImgs : function(p) {
var t = this, dom = t.editor.dom, im, ci;
each(dom.select('span', p), function(n) {
// Convert object into image
if (dom.getAttrib(n, 'class') == 'mceItemObject') {
ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, '');
switch (ci) {
case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
dom.replace(t._createImg('mceItemFlash', n), n);
break;
case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
dom.replace(t._createImg('mceItemShockWave', n), n);
break;
case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
dom.replace(t._createImg('mceItemWindowsMedia', n), n);
break;
case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
dom.replace(t._createImg('mceItemQuickTime', n), n);
break;
case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
dom.replace(t._createImg('mceItemRealMedia', n), n);
break;
default:
dom.replace(t._createImg('mceItemFlash', n), n);
}
return;
}
// Convert embed into image
if (dom.getAttrib(n, 'class') == 'mceItemEmbed') {
switch (dom.getAttrib(n, 'type')) {
case 'application/x-shockwave-flash':
dom.replace(t._createImg('mceItemFlash', n), n);
break;
case 'application/x-director':
dom.replace(t._createImg('mceItemShockWave', n), n);
break;
case 'application/x-mplayer2':
dom.replace(t._createImg('mceItemWindowsMedia', n), n);
break;
case 'video/quicktime':
dom.replace(t._createImg('mceItemQuickTime', n), n);
break;
case 'audio/x-pn-realaudio-plugin':
dom.replace(t._createImg('mceItemRealMedia', n), n);
break;
default:
dom.replace(t._createImg('mceItemFlash', n), n);
}
}
});
},
_createImg : function(cl, n) {
var im, dom = this.editor.dom, pa = {}, ti = '';
// Create image
im = dom.create('img', {
src : this.url + '/img/trans.gif',
width : dom.getAttrib(n, 'width') || 100,
height : dom.getAttrib(n, 'height') || 100,
'class' : cl
});
// Setup base parameters
each(['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode'], function(na) {
var v = dom.getAttrib(n, na);
if (v)
pa[na] = v;
});
// Add optional parameters
each(dom.select('span', n), function(n) {
if (dom.hasClass(n, 'mceItemParam'))
pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_value');
});
// Use src not movie
if (pa.movie) {
pa.src = pa.movie;
delete pa.movie;
}
delete pa.width;
delete pa.height;
im.title = this._serialize(pa);
return im;
},
_parse : function(s) {
return tinymce.util.JSON.parse('{' + s + '}');
},
_serialize : function(o) {
return tinymce.util.JSON.serialize(o).replace(/[{}]/g, '');
}
});
// Register plugin
tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
})();

View file

@ -1,73 +1,73 @@
/**
* This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
*/
function writeFlash(p) {
writeEmbed(
'D27CDB6E-AE6D-11cf-96B8-444553540000',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
'application/x-shockwave-flash',
p
);
}
function writeShockWave(p) {
writeEmbed(
'166B1BCA-3F9C-11CF-8075-444553540000',
'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
'application/x-director',
p
);
}
function writeQuickTime(p) {
writeEmbed(
'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
'video/quicktime',
p
);
}
function writeRealMedia(p) {
writeEmbed(
'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
'audio/x-pn-realaudio-plugin',
p
);
}
function writeWindowsMedia(p) {
p.url = p.src;
writeEmbed(
'6BF52A52-394A-11D3-B153-00C04F79FAA6',
'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
'application/x-mplayer2',
p
);
}
function writeEmbed(cls, cb, mt, p) {
var h = '', n;
h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
h += '>';
for (n in p)
h += '<param name="' + n + '" value="' + p[n] + '">';
h += '<embed type="' + mt + '"';
for (n in p)
h += n + '="' + p[n] + '" ';
h += '></embed></object>';
document.write(h);
}
/**
* This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
*/
function writeFlash(p) {
writeEmbed(
'D27CDB6E-AE6D-11cf-96B8-444553540000',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
'application/x-shockwave-flash',
p
);
}
function writeShockWave(p) {
writeEmbed(
'166B1BCA-3F9C-11CF-8075-444553540000',
'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
'application/x-director',
p
);
}
function writeQuickTime(p) {
writeEmbed(
'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
'video/quicktime',
p
);
}
function writeRealMedia(p) {
writeEmbed(
'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
'audio/x-pn-realaudio-plugin',
p
);
}
function writeWindowsMedia(p) {
p.url = p.src;
writeEmbed(
'6BF52A52-394A-11D3-B153-00C04F79FAA6',
'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
'application/x-mplayer2',
p
);
}
function writeEmbed(cls, cb, mt, p) {
var h = '', n;
h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
h += '>';
for (n in p)
h += '<param name="' + n + '" value="' + p[n] + '">';
h += '<embed type="' + mt + '"';
for (n in p)
h += n + '="' + p[n] + '" ';
h += '></embed></object>';
document.write(h);
}

File diff suppressed because it is too large Load diff

View file

@ -1,103 +1,103 @@
tinyMCE.addI18n('en.media_dlg',{
title:"Insert / edit embedded media",
general:"General",
advanced:"Advanced",
file:"File/URL",
list:"List",
size:"Dimensions",
preview:"Preview",
constrain_proportions:"Constrain proportions",
type:"Type",
id:"Id",
name:"Name",
class_name:"Class",
vspace:"V-Space",
hspace:"H-Space",
play:"Auto play",
loop:"Loop",
menu:"Show menu",
quality:"Quality",
scale:"Scale",
align:"Align",
salign:"SAlign",
wmode:"WMode",
bgcolor:"Background",
base:"Base",
flashvars:"Flashvars",
liveconnect:"SWLiveConnect",
autohref:"AutoHREF",
cache:"Cache",
hidden:"Hidden",
controller:"Controller",
kioskmode:"Kiosk mode",
playeveryframe:"Play every frame",
targetcache:"Target cache",
correction:"No correction",
enablejavascript:"Enable JavaScript",
starttime:"Start time",
endtime:"End time",
href:"Href",
qtsrcchokespeed:"Choke speed",
target:"Target",
volume:"Volume",
autostart:"Auto start",
enabled:"Enabled",
fullscreen:"Fullscreen",
invokeurls:"Invoke URLs",
mute:"Mute",
stretchtofit:"Stretch to fit",
windowlessvideo:"Windowless video",
balance:"Balance",
baseurl:"Base URL",
captioningid:"Captioning id",
currentmarker:"Current marker",
currentposition:"Current position",
defaultframe:"Default frame",
playcount:"Play count",
rate:"Rate",
uimode:"UI Mode",
flash_options:"Flash options",
qt_options:"Quicktime options",
wmp_options:"Windows media player options",
rmp_options:"Real media player options",
shockwave_options:"Shockwave options",
autogotourl:"Auto goto URL",
center:"Center",
imagestatus:"Image status",
maintainaspect:"Maintain aspect",
nojava:"No java",
prefetch:"Prefetch",
shuffle:"Shuffle",
console:"Console",
numloop:"Num loops",
controls:"Controls",
scriptcallbacks:"Script callbacks",
swstretchstyle:"Stretch style",
swstretchhalign:"Stretch H-Align",
swstretchvalign:"Stretch V-Align",
sound:"Sound",
progress:"Progress",
qtsrc:"QT Src",
qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",
align_top:"Top",
align_right:"Right",
align_bottom:"Bottom",
align_left:"Left",
align_center:"Center",
align_top_left:"Top left",
align_top_right:"Top right",
align_bottom_left:"Bottom left",
align_bottom_right:"Bottom right",
flv_options:"Flash video options",
flv_scalemode:"Scale mode",
flv_buffer:"Buffer",
flv_startimage:"Start image",
flv_starttime:"Start time",
flv_defaultvolume:"Default volumne",
flv_hiddengui:"Hidden GUI",
flv_autostart:"Auto start",
flv_loop:"Loop",
flv_showscalemodes:"Show scale modes",
flv_smoothvideo:"Smooth video",
flv_jscallback:"JS Callback"
tinyMCE.addI18n('en.media_dlg',{
title:"Insert / edit embedded media",
general:"General",
advanced:"Advanced",
file:"File/URL",
list:"List",
size:"Dimensions",
preview:"Preview",
constrain_proportions:"Constrain proportions",
type:"Type",
id:"Id",
name:"Name",
class_name:"Class",
vspace:"V-Space",
hspace:"H-Space",
play:"Auto play",
loop:"Loop",
menu:"Show menu",
quality:"Quality",
scale:"Scale",
align:"Align",
salign:"SAlign",
wmode:"WMode",
bgcolor:"Background",
base:"Base",
flashvars:"Flashvars",
liveconnect:"SWLiveConnect",
autohref:"AutoHREF",
cache:"Cache",
hidden:"Hidden",
controller:"Controller",
kioskmode:"Kiosk mode",
playeveryframe:"Play every frame",
targetcache:"Target cache",
correction:"No correction",
enablejavascript:"Enable JavaScript",
starttime:"Start time",
endtime:"End time",
href:"Href",
qtsrcchokespeed:"Choke speed",
target:"Target",
volume:"Volume",
autostart:"Auto start",
enabled:"Enabled",
fullscreen:"Fullscreen",
invokeurls:"Invoke URLs",
mute:"Mute",
stretchtofit:"Stretch to fit",
windowlessvideo:"Windowless video",
balance:"Balance",
baseurl:"Base URL",
captioningid:"Captioning id",
currentmarker:"Current marker",
currentposition:"Current position",
defaultframe:"Default frame",
playcount:"Play count",
rate:"Rate",
uimode:"UI Mode",
flash_options:"Flash options",
qt_options:"Quicktime options",
wmp_options:"Windows media player options",
rmp_options:"Real media player options",
shockwave_options:"Shockwave options",
autogotourl:"Auto goto URL",
center:"Center",
imagestatus:"Image status",
maintainaspect:"Maintain aspect",
nojava:"No java",
prefetch:"Prefetch",
shuffle:"Shuffle",
console:"Console",
numloop:"Num loops",
controls:"Controls",
scriptcallbacks:"Script callbacks",
swstretchstyle:"Stretch style",
swstretchhalign:"Stretch H-Align",
swstretchvalign:"Stretch V-Align",
sound:"Sound",
progress:"Progress",
qtsrc:"QT Src",
qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",
align_top:"Top",
align_right:"Right",
align_bottom:"Bottom",
align_left:"Left",
align_center:"Center",
align_top_left:"Top left",
align_top_right:"Top right",
align_bottom_left:"Bottom left",
align_bottom_right:"Bottom right",
flv_options:"Flash video options",
flv_scalemode:"Scale mode",
flv_buffer:"Buffer",
flv_startimage:"Start image",
flv_starttime:"Start time",
flv_defaultvolume:"Default volumne",
flv_hiddengui:"Hidden GUI",
flv_autostart:"Auto start",
flv_loop:"Loop",
flv_showscalemodes:"Show scale modes",
flv_smoothvideo:"Smooth video",
flv_jscallback:"JS Callback"
});

File diff suppressed because it is too large Load diff