flymis/WebRoot/dojojs/src/widget/Editor2Plugin/ContextMenu.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.widget.Editor2Plugin.ContextMenu");
//ContextMenu plugin should be dojo.required-ed before all other plugins which
//support contextmenu, otherwise the menu for that plugin won't be shown
dojo.require("dojo.widget.Menu2");
dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad", function(editor){
var p = new dojo.widget.Editor2Plugin.ContextMenu(editor);
});
dojo.widget.Editor2Plugin.ContextMenuManager = {
menuGroups: ['Generic', 'Link', 'Anchor', 'Image', 'List', 'Table'],
_registeredGroups: {},
registerGroup: function(name, handler){
if(this._registeredGroups[name]){
alert("dojo.widget.Editor2Plugin.ContextMenuManager.registerGroup: menu group "+name+"is already registered. Ignored.");
return;
}
this._registeredGroups[name] = handler;
},
removeGroup: function(name){
delete this._registeredGroups[name];
},
getGroup: function(name, contextmenuplugin){
if(this._registeredGroups[name]){
var item = this._registeredGroups[name](name, contextmenuplugin);
if(item){
return item;
}
}
switch(name){
case 'Generic':
case 'Link':
case 'Image':
return new dojo.widget.Editor2Plugin[name+"ContextMenu"](contextmenuplugin);
//TODO
case 'Anchor':
case 'List':
}
}
};
dojo.declare("dojo.widget.Editor2Plugin.ContextMenu", null,
function(editor){
this.groups = [];
this.separators = [];
this.editor = editor;
this.editor.registerLoadedPlugin(this);
this.contextMenu = dojo.widget.createWidget("PopupMenu2", {});
dojo.body().appendChild(this.contextMenu.domNode);
后面还有 186 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。