[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 /* Import plugin specific language pack */ 2 tinyMCE.importPluginLanguagePack('advimage', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr,pl'); 3 4 /** 5 * Insert image template function. 6 */ 7 function TinyMCE_advimage_getInsertImageTemplate() { 8 var template = new Array(); 9 10 template['file'] = '../../plugins/advimage/image.htm'; 11 template['width'] = 430; 12 template['height'] = 380; 13 14 // Language specific width and height addons 15 template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); 16 template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); 17 18 return template; 19 } 20 21 function TinyMCE_advimage_cleanup(type, content) { 22 switch (type) { 23 case "insert_to_editor_dom": 24 var imgs = content.getElementsByTagName("img"); 25 for (var i=0; i<imgs.length; i++) { 26 var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover')); 27 var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout')); 28 29 if ((src = tinyMCE.getImageSrc(onmouseover)) != "") { 30 src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src); 31 imgs[i].setAttribute('onmouseover', "this.src='" + src + "';"); 32 } 33 34 if ((src = tinyMCE.getImageSrc(onmouseout)) != "") { 35 src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], src); 36 imgs[i].setAttribute('onmouseout', "this.src='" + src + "';"); 37 } 38 } 39 break; 40 41 case "get_from_editor_dom": 42 var imgs = content.getElementsByTagName("img"); 43 for (var i=0; i<imgs.length; i++) { 44 var onmouseover = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseover')); 45 var onmouseout = tinyMCE.cleanupEventStr(tinyMCE.getAttrib(imgs[i], 'onmouseout')); 46 47 if ((src = tinyMCE.getImageSrc(onmouseover)) != "") { 48 src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);"); 49 imgs[i].setAttribute('onmouseover', "this.src='" + src + "';"); 50 } 51 52 if ((src = tinyMCE.getImageSrc(onmouseout)) != "") { 53 src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);"); 54 imgs[i].setAttribute('onmouseout', "this.src='" + src + "';"); 55 } 56 } 57 break; 58 } 59 60 return content; 61 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |