% if (commonApp.history.length > 1) { window.localStorage.setItem("session", JSON.stringify(commonApp.history)); } else { if(!_.isNull(window.localStorage.getItem("session"))) { commonApp.history = window.localStorage.getItem("session"); commonApp.history = JSON.parse(commonApp.history); } } if (commonApp.history.length > 1) { var breadCollection = commonApp.history.slice(); breadCollection = breadCollection.splice(0, breadCollection.length-1).reverse(); var newCollection = []; var i = 0; var bcString = ""; if(window.location.href.search('NESCOM') !== -1) { bcString = "NesCom"; } if(window.location.href.search('REVCOM') !== -1) { bcString = "RevCom"; } if(window.location.href.search('AUDCOM') !== -1) { bcString = "AudCom"; } _.each(breadCollection, function(bread, index) { if( i > 0) { return; } if(bread.name.indexOf(":id") == -1) { if("AudCom/NesCom/RevCom" == bread.tabName) { if(bcString != "") { bread.meetingType = bcString; } else { if(bread.name.indexOf(":type") !== -1) { bread.meetingType = bread.tabName; } } } newCollection.push(bread); i++; } else { newCollection.push(bread); } }); _.each(newCollection.reverse(), function(bread){ %>