flymis/WebRoot/dojojs/src/widget/Menu2.js
(开头部分) 19KB这里只显示每个文件的开头 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.Menu2");
dojo.require("dojo.widget.PopupContainer");
// summary
// provides a menu that can be used as a context menu (typically shown by right-click),
// or as the drop down on a DropDownButton, ComboButton, etc.
dojo.widget.defineWidget(
"dojo.widget.PopupMenu2",
dojo.widget.PopupContainer,
function(){
this.targetNodeIds = []; // fill this with nodeIds upon widget creation and it becomes context menu for those nodes
this.eventNames = {
open: ""
};
},
{
snarfChildDomOutput: true,
// String
// if "default" event names are based on widget id, otherwise user must define
// TODO: write real documentation about the events
eventNaming: "default",
templateString: '<table class="dojoPopupMenu2" border=0 cellspacing=0 cellpadding=0 style="display: none;"><tbody dojoAttachPoint="containerNode"></tbody></table>',
templateCssPath: dojo.uri.dojoUri("src/widget/templates/Menu2.css"),
templateCssString: "",
// Integer
// number of milliseconds before hovering (without clicking) causes the submenu to automatically open
submenuDelay: 500,
// Integer
// a submenu usually appears to the right, but slightly overlapping, it's parent menu;
// this controls the number of pixels the two menus overlap.
submenuOverlap: 5,
// Boolean
// if true, right clicking anywhere on the window will cause this context menu to open;
// if false, must specify targetNodeIds
contextMenuForWindow: false,
// Array
// Array of dom node ids of nodes to attach to
targetNodeIds: [],
initialize: function(args, frag) {
if (this.eventNaming == "default") {
for (var eventName in this.eventNames) {
后面还有 705 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。