Ext.onReady(function() { CORDA.jsD6CD422A7969280B61CDB747DDB982AD_go = function() { if (!CORDA.ensuredLoaded()) { setTimeout("CORDA.jsD6CD422A7969280B61CDB747DDB982AD_go()",10); return; } /* Top navigation */ if (!CORDA) CORDA = {}; if (!CORDA.centerview) CORDA.centerview = {}; CORDA.centerview.navStructure = [ { displayName : "", navId : "900", isContainer : false, args : "CTNAVID=900&CTPAGENUMBER=0&CTCHILD=true", url: "/corda/dashboards/trademarks/pages/page1_-CT5FCCBA293F33FD8F8242DAA9B89B3EA71C06BD2B8C.pagexml", navurl: "/corda/dashboards/trademarks/pages/page1.pagexml", pagenumber : 0 }, { displayName : "", navId : "9001", isContainer : false, args : "CTNAVID=9001&CTPAGENUMBER=1&CTCHILD=true", url: "/corda/dashboards/trademarks/pages/page3_-CT3328BA293F33FD8F82426DA9B89B3EA71C06BD5C7D.pagexml", navurl: "/corda/dashboards/trademarks/pages/page3.pagexml", pagenumber : 1 }, ]; try{ var cordaDashBookmarkedState = Ext.ux.History.getBookmarkedState( "cordaDash" ); var defaultState = Ext.ux.History.getQueryStringParameter( "cordaDash" ); //if there is no bookmarked state, assign the default state: var cordaDashInitialState = CORDA.centerview.getCTNAVID() || cordaDashBookmarkedState || defaultState || '900'; var cordaDashPreviousState = 0; function cordaDashStateChangeHandler( state ) { // Update the UI of your module according to the state parameter if (CORDA && CORDA.centerview.layoutproxy.goToNavId) { if(state !== cordaDashPreviousState && document.location.hash.indexOf('dlink') < 0) { cordaDashPreviousState = state; CORDA.centerview.layoutproxy.goToNavId(state); } } } Ext.ux.History.register( "cordaDash", cordaDashInitialState, cordaDashStateChangeHandler ); Ext.ux.History.initialize('/corda/blank'); } catch (e) {var historyDisabled=true;} /* From grid file */ // ********** // * Modify the default settings below to match your template // ********** // ********** // * MAIN // ********** // Set to the id of the div wrapping your entire page var wrapping_div_id = 'container'; // ********** // * LEVEL ONE // ********** // The id of the tag which contains the level 1 navigation var level1_surroundingDivId = 'nav-dashboard-menu'; // The class of of ul tag var level1_ulClass = ''; // The class used when an li is selected var level1_selectedTabClass = ''; // The class used when the li is unselected var level1_unselectedTabClass = ''; // Separator to use when dividing menu items var level1_menuItemSep = ''; // Set to true to surround the menu item with an HTML tag. Set // tagBegin and tagEnd to the HTML tag you want to use. var level1_surroundItemWithTag = false; var level1_tagBegin = ''; var level1_tagEnd = ''; // ********** // * Only modify below code if you know what you are doing // ********** // Each grid file must have a CORDA.centerview.layout function with an init member. CORDA.centerview.layout = function() { var currentNavId; // The following function is used to add classes to the level1 navigation // when a page loads. function highlightCurrentTab() { if (level1_selectedTabClass && level1_selectedTabClass.length > 0) { Ext.each(Ext.query('li'), function(el) { Ext.get(el).removeClass(level1_selectedTabClass); }); } var el = Ext.get('nav_' + currentNavId); if (el) { if (level1_unselectedTabClass && level1_unselectedTabClass.length > 0) { el.removeClass(level1_unselectedTabClass); } if (level1_selectedTabClass && level1_selectedTabClass.length > 0) { el.addClass(level1_selectedTabClass); } } if (level1_unselectedTabClass && level1_unselectedTabClass.length > 0) { Ext.each(Ext.query('li'), function(el) { Ext.get(el).addClass(level1_unselectedTabClass); }); } }; return { // The init function gets called once when a dashboard loads. Use it to do first time // setup of your dashboard and navigation. init : function() { // Set up page width and alignment if (wrapping_div_id && wrapping_div_id.length > 0) { Ext.get(wrapping_div_id).applyStyles({ 'styleFloat' : (CORDA.centerview.dashboardAlign === 'left' ? 'left' : ''), // For IE 'cssFloat' : (CORDA.centerview.dashboardAlign === 'left' ? 'left' : ''), // For the rest 'width': CORDA.centerview.dashboardWidth }); } // Build the level1 navigation HTML var navhtml = ' 0) { navhtml += ' class="' + level1_ulClass + '"'; } navhtml += '>'; Ext.each(CORDA.centerview.navStructure, function(item, i, all) { if (!item) { return true; } navhtml += ''; }); navhtml += ''; // Inject the level1 navigation HTML into the DOM. Ext.get(level1_surroundingDivId).update(navhtml); }, // The goToNavId function is in charge of putting the requested page in to the DOM. // By default it looks for an HTML tag with an id of 'content' and injects the requested // page in to it. goToNavId : function(navId) { var navObj = CORDA.centerview.findNavObject(navId); if (!navObj) { // Bad state so try to navigate to first page or just return. if (navId == CORDA.centerview.navStructure[0].navId) return; CORDA.centerview.layout.goToNavId(CORDA.centerview.navStructure[0].navId); } var contentDiv = Ext.get('content'); if (contentDiv) { contentDiv.set({'corda-ajaxurl' : navObj.url, 'corda-navid' : navId, 'corda-ajaxloaded' : false, 'corda-ajaxargs' : navObj.args}); CORDA.centerview.ajaxify(); currentNavId = navId; highlightCurrentTab(); } }, // Returns the div that contains our page getNavIdDiv : function(navId) { return Ext.getDom('content'); }, // returns the navid of the page we are on. getCurrentNavId : function() { return currentNavId; }, // Returns the div of the page we are on getCurrentNavIdDiv : function() { return Ext.getDom('content'); }, // Returns the div container of the object passed in locateParentNavIdContainer : function(o) { return Ext.get(o).findParentNode('div[corda-navid]'); }, // Returns the ajax container of the objects passed in locateParentAJAXContainer : function(o) { return Ext.get(o).findParentNode('div[corda-ajaxurl]'); }, // Code to run the layout changes refreshLayoutDimensions : function() { }, // Code to run the layout changes layoutResize : function() { } }; }(); // Tell CenterView about our layout and it's functions. CORDA.centerview.defineLayoutActions({ goToNavId : CORDA.centerview.layout.goToNavId, getNavIdDiv : CORDA.centerview.layout.getNavIdDiv, getCurrentNavId : CORDA.centerview.layout.getCurrentNavId, getCurrentNavIdDiv : CORDA.centerview.layout.getCurrentNavIdDiv, locateParentNavIdContainer : CORDA.centerview.layout.locateParentNavIdContainer, locateParentAJAXContainer : CORDA.centerview.layout.locateParentAJAXContainer, refreshLayoutDimensions : CORDA.centerview.layout.refreshLayoutDimensions, layoutResize : CORDA.centerview.layout.layoutResize }); /* Layout variables */ CORDA.centerview.advancedFormControls = false; CORDA.centerview.kpiToolbarShade = false; CORDA.centerview.dashboardWidth = '100%'; CORDA.centerview.dashboardAlign = 'center'; CORDA.centerview.themePath = '/corda/themes/Trademarks01/'; /* Initialize common variables */ // CORDA.jsD6CD422A7969280B61CDB747DDB982AD_go=null; }; CORDA.jsD6CD422A7969280B61CDB747DDB982AD_go(); });