upgrade to tinymce 2.1.1.1
This commit is contained in:
parent
f36ba1b268
commit
e75b689857
847 changed files with 34500 additions and 7692 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,14 +1,11 @@
|
|||
/**
|
||||
* $RCSfile: editor_plugin_src.js,v $
|
||||
* $Revision: 1.31 $
|
||||
* $Date: 2006/05/03 10:46:41 $
|
||||
* $Id: editor_plugin_src.js 264 2007-04-26 20:53:09Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
/* Import plugin specific language pack */
|
||||
//tinyMCE.importPluginLanguagePack('contextmenu', 'en,tr,zh_cn,cs,fa,fr_ca,fr,de,nb');
|
||||
if (!tinyMCE.settings['contextmenu_skip_plugin_css']) {
|
||||
tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/css/contextmenu.css");
|
||||
}
|
||||
|
|
@ -20,9 +17,9 @@ var TinyMCE_ContextMenuPlugin = {
|
|||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Context menus',
|
||||
author : 'Moxiecode Systems',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_contextmenu.html',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
|
||||
version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
|
||||
};
|
||||
},
|
||||
|
|
@ -76,6 +73,9 @@ var TinyMCE_ContextMenuPlugin = {
|
|||
},
|
||||
|
||||
_showContextMenu : function(e, inst) {
|
||||
if (e.ctrlKey)
|
||||
return true;
|
||||
|
||||
function getAttrib(elm, name) {
|
||||
return elm.getAttribute(name) ? elm.getAttribute(name) : "";
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ var TinyMCE_ContextMenuPlugin = {
|
|||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
|
||||
|
||||
if (sel || (elm ? (elm.nodeName == 'A') || (elm.nodeName == 'IMG') : false)) {
|
||||
if (sel || (elm ? (elm.nodeName == 'A' && tinyMCE.getAttrib(elm, 'name') == '') || (elm.nodeName == 'IMG') : false)) {
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/link.gif", "$lang_link_desc", inst.hasPlugin("advlink") ? "mceAdvLink" : "mceLink");
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/advanced/images/unlink.gif", "$lang_unlink_desc", "unlink", "", (elm ? (elm.nodeName != 'A') && (elm.nodeName != 'IMG') : true));
|
||||
|
|
@ -116,8 +116,10 @@ var TinyMCE_ContextMenuPlugin = {
|
|||
contextMenu.addSeparator();
|
||||
|
||||
// If flash
|
||||
if (tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') != -1)
|
||||
if (tinyMCE.hasPlugin('flash') && tinyMCE.getAttrib(elm, 'class').indexOf('mceItemFlash') != -1)
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
|
||||
else if (tinyMCE.hasPlugin('media') && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(elm, 'class')))
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_media_title", "mceMedia");
|
||||
else
|
||||
contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", inst.hasPlugin("advimage") ? "mceAdvImage" : "mceImage");
|
||||
break;
|
||||
|
|
@ -216,13 +218,13 @@ tinyMCE.addPlugin("contextmenu", TinyMCE_ContextMenuPlugin);
|
|||
// Context menu class
|
||||
|
||||
function TinyMCE_ContextMenu(settings) {
|
||||
var doc, self = this;
|
||||
|
||||
// Default value function
|
||||
function defParam(key, def_val) {
|
||||
settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
|
||||
|
||||
// Setup contextmenu div
|
||||
|
|
@ -302,7 +304,7 @@ TinyMCE_ContextMenu.prototype = {
|
|||
},
|
||||
|
||||
show : function(x, y) {
|
||||
var vp, width, height;
|
||||
var vp, width, height, yo;
|
||||
|
||||
if (this.html == "")
|
||||
return;
|
||||
|
|
@ -329,15 +331,17 @@ TinyMCE_ContextMenu.prototype = {
|
|||
this.pop.show(x, y, width, height);
|
||||
} else {
|
||||
vp = this.getViewPort();
|
||||
|
||||
this.contextMenuDiv.style.left = (x > vp.width - width ? vp.width - width : x) + 'px';
|
||||
this.contextMenuDiv.style.top = (y > vp.height - height ? vp.height - height : y) + 'px';
|
||||
yo = tinyMCE.isMSIE5_0 ? document.body.scrollTop : self.pageYOffset;
|
||||
this.contextMenuDiv.style.left = (x > vp.left + vp.width - width ? vp.left + vp.width - width : x) + 'px';
|
||||
this.contextMenuDiv.style.top = (y > vp.top + vp.height - height ? vp.top + vp.height - height : y) + 'px';
|
||||
this.contextMenuDiv.style.display = "block";
|
||||
}
|
||||
},
|
||||
|
||||
getViewPort : function() {
|
||||
return {
|
||||
left : self.pageXOffset || self.document.documentElement.scrollLeft || self.document.body.scrollLeft,
|
||||
top: self.pageYOffset || self.document.documentElement.scrollTop || self.document.body.scrollTop,
|
||||
width : document.documentElement.offsetWidth || document.body.offsetWidth,
|
||||
height : self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue