3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
13 // specify dashlets and layouts
25 name : 'Network Status'
58 $(one.f.menu.left.top).each(function(index, value) {
59 var $nav = $(".nav", "#left-top");
60 one.main.page.dashlet($nav, value);
63 $(one.f.menu.left.bottom).each(function(index, value) {
64 var $nav = $(".nav", "#left-bottom");
65 one.main.page.dashlet($nav, value);
68 $(one.f.menu.right.bottom).each(function(index, value) {
69 var $nav = $(".nav", "#right-bottom");
70 one.main.page.dashlet($nav, value);
73 one.f.populate = function($dashlet, header) {
74 var $h4 = one.lib.dashlet.header(header);
79 $('.dash .nav a', '#main').click(function() {
81 var $li = $(this).parent();
82 var $ul = $li.parent();
83 one.lib.nav.unfocus($ul);
84 $li.addClass('active');
85 // clear respective dashlet
86 var $dashlet = $ul.parent().find('.dashlet');
87 one.lib.dashlet.empty($dashlet);
88 // callback based on menu
89 var id = $(this).attr('id');
90 var menu = one.f.dashlet;
93 one.f.populate($dashlet, "Foo");
96 one.f.populate($dashlet, "Flows");
99 one.f.populate($dashlet, "Bar");
102 one.f.populate($dashlet, "Widget");
105 one.f.populate($dashlet, "Status");
110 // activate first tab on each dashlet
111 $('.dash .nav').each(function(index, value) {
112 $($(value).find('li')[0]).find('a').click();