init import from old mailr project (http://svn.littlegreen.org/mailr/trunk)
This commit is contained in:
commit
51b79e7298
640 changed files with 34651 additions and 0 deletions
61
public/tiny_mce/plugins/advimage/editor_plugin_src.js
vendored
Normal file
61
public/tiny_mce/plugins/advimage/editor_plugin_src.js
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('advimage', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl,pt_br');
|
||||
|
||||
/**
|
||||
* Insert image template function.
|
||||
*/
|
||||
function TinyMCE_advimage_getInsertImageTemplate() {
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = '../../plugins/advimage/image.htm';
|
||||
template['width'] = 430;
|
||||
template['height'] = 380;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);
|
||||
template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
function TinyMCE_advimage_cleanup(type, content) {
|
||||
switch (type) {
|
||||
case "insert_to_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
|
||||
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseover)) != "") {
|
||||
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
|
||||
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
|
||||
}
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseout)) != "") {
|
||||
src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src);
|
||||
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "get_from_editor_dom":
|
||||
var imgs = content.getElementsByTagName("img");
|
||||
for (var i=0; i<imgs.length; i++) {
|
||||
var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover'));
|
||||
var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout'));
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseover)) != "") {
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
imgs[i].setAttribute('onmouseover', "this.src='" + src + "';");
|
||||
}
|
||||
|
||||
if ((src = tinyMCE.getImageSrc(onmouseout)) != "") {
|
||||
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
|
||||
imgs[i].setAttribute('onmouseout', "this.src='" + src + "';");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue