Menu_wev8.js
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
Copyright (c) 2004-2005, 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.require("dojo.widget.Menu");
dojo.provide("dojo.widget.html.Menu");
/* HtmlMenu
***********/
dojo.widget.html.Menu = function(){
dojo.widget.html.Menu.superclass.constructor.call(this);
this.items = [];
}
dojo.inherits(dojo.widget.html.Menu, dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.Menu, {
widgetType: "Menu",
isContainer: true,
// copy children widgets output directly to parent (this node), to avoid
// errors trying to insert an <li> under a <div>
snarfChildDomOutput: true,
templateString: '<ul></ul>',
templateCssPath: dojo.uri.dojoUri("src/widget/templates/Menu_wev8.css"),
fillInTemplate: function (args, frag){
//dojo.widget.HtmlMenu.superclass.fillInTemplate.apply(this, arguments);
this.domNode.className = "dojoMenu";
},
_register: function (item ) {
dojo.event.connect(item, "onSelect", this, "onSelect");
this.items.push(item);
},
push: function (item) {
this.domNode.appendChild(item.domNode);
this._register(item);
}
});