]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/javascript/widgets/SideBar.js
removing old opac images and css
[Evergreen.git] / Open-ILS / src / javascript / widgets / SideBar.js
1 SidebarBox.prototype                                    = new Box();
2 SidebarBox.prototype.constructor        = SidebarBox;
3 SidebarBox.baseClass                                    = Box.constructor;
4
5 function SidebarBoxItem(domItem) {
6         this.node = createAppElement("div");
7         var br = createAppElement("br");
8         add_css_class(this.node, "sibebar_item");
9         this.node.appendChild(domItem);
10         this.node.appendChild(br);
11 }
12
13 SidebarBoxItem.prototype.getNode = function() {
14         return this.node;
15 }
16
17 /* --------------------------------------------------------- */
18
19 function SidebarBox(title) {
20         this.node = createAppElement("div");
21         this.contentNode = createAppElement("div");
22         this.titleNode = createAppElement("div");
23
24         add_css_class(this.node, "sidebar_box");
25         add_css_class(this.contentNode, "sidebar_content_box");
26         add_css_class(this.titleNode, "sidebar_title_box");
27
28         /* push the title in */
29         this.titleNode.appendChild(createAppTextNode(title));
30         this.titleNode.appendChild(createAppElement("br"));
31
32         this.node.appendChild(this.titleNode);
33         this.node.appendChild(this.contentNode);
34 }
35
36 SidebarBox.prototype.addItem = function(domItem) {
37         this.contentNode.appendChild(new SidebarBoxItem(domItem).getNode());
38 }
39
40 SidebarBox.prototype.getNode = function() {
41         return this.node;
42 }
43
44
45 /* --------------------------------------------------------- */
46
47 Sidebar.prototype                                       = new Box();
48 Sidebar.prototype.constructor   = Sidebar;
49 Sidebar.baseClass                                       = Box.constructor;
50
51 function Sidebar() {
52         this.boxinit();
53 }
54
55 Sidebar.prototype.addItem = function(sidebarBox) {
56         this.node.appendChild(sidebarBox.getNode());    
57         this.node.innerHTML += "<br/>";
58 }
59
60 Sidebar.prototype.getNode = function() {
61         return this.node;
62 }