Skip to content

Instantly share code, notes, and snippets.

@prb112
Created March 5, 2014 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prb112/9372304 to your computer and use it in GitHub Desktop.
Save prb112/9372304 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Demo 8: IBM SmartCloud Banner</title>
<script type="text/javascript">
/**
* updates the target to support _parent for non-mail.collabservnext.com hostnames- updateTarget
*/
window.updateTarget = function(){
var menuCandidateItems = document.getElementsByTagName("a");
for(var index in menuCandidateItems){
//var role = candidateMenuItem.getAttribute("menuitem");
var candidateMenuItem = menuCandidateItems[index];
//Gets the Menu Item
if( candidateMenuItem.getAttribute){
var role = candidateMenuItem.getAttribute("role");
if ( role == "menuitem"){
//console.log(candidateMenuItem);
var href = candidateMenuItem.getAttribute("href");
var idxOpen = href.indexOf("open_new_window");
var idxStarts = href.indexOf("javascript");
console.log("HREF " + href + " " + idxOpen + " " + idxStarts );
if(href.contains && ! href.contains("open_new_window") && !href.startsWith("javascript")){
var hostname = document.location.host;
if (!href.contains("mail.collabservnext.com")){
console.log(href);
candidateMenuItem.setAttribute("target","_parent");
}
}else{
//Chrome
if(idxOpen <= -1 && idxStarts <= -1){
var idxMail = href.indexOf("mail.collabservnext.com");
console.log(idxMail);
if (idxMail <= -1){
console.log(href);
candidateMenuItem.setAttribute("target","_parent");
}
}
}
}
}
}
};
window.addEventListener('load', window.updateTarget);
</script>
<link rel="stylesheet" href="https://apps.collabservnext.com/theming/theme/css/3" type="text/css" />
<script>
//Following Overrides the Styles
</script>
<style type="text/css">
.s-masthead-height {
height : none !important;
}
.s-toppanel {
overflow: visible;
}
.scloud3 {
font: none !important;
}
.scloud3 .scloud3 {
font-size: 1em;
}
.lotusliveui, lotusliveui30, .scloud3 {
font: none !important;
}
.scloud3 table, .scloud3_gecko input, .scloud3_gecko select, .scloud3_webkit input, .scloud3_webkit select {
font-size: 1.5em;
}
</style>
</head>
<body>
<script>
//Necessary to add the class to any lotus css information
</script>
<div class="lotusui30 lotusui30_body lotusui30_fonts scloud3">
<div id="smartcloudExt" class="scloud3" >
<script src="https://apps.collabservnext.com/navbar/banner/notes9/smartcloudExt?displayName&orgName=Demo Org&oneui=3" language="javascript"></script>
</div>
<table class="lotusTable lotusClear" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody>
<tr>
<td class="lotusFirstCell" style="width:16px"><input type="checkbox" title="Select this [item]" /></td>
<td style="width:20px">&nbsp;</td>
<td><h4 class="lotusTitle"><a href="javascript:;">IBM developerWorks: About developerWorks</a><span class="lotusIndicator">external</span></h4><div class="lotusMeta"><ul class="lotusInlinelist"><li class="lotusFirst">Bookmarked by <a href="javascript:;" class="lotusPerson">13 others</a></li><li>Today at 9:15 PM</li><li class="lotusTags">Tags: <span role="list"><span role="listitem"><a href="javascript:;">ibm</a></span></span></li></ul></div></td>
<td class="lotusAlignRight lotusLastCell"><a class="lotusAction" href="javascript:;" role="button" aria-expanded="false" aria-controls="[detailRowID]" title="Show details"><img class="lotusIcon16 lotusIconShow" src="../../css/images/blank.gif" alt="" aria-label="Show details" /><span class="lotusAltText">Show</span></a></td>
</tr>
<tr>
<td class="lotusFirstCell"><input type="checkbox" title="Select this [item]" /></td>
<td><img class="yourProductSprite yourProductSprite-iconPlaceholder16" src="../../css/images/blank.gif" alt="Web ahead" /></td>
<td><h4 class="lotusTitle"><a href="javascript:;">In2: The Innovation Initiative: Weblog</a><span class="lotusType">private</span></h4><div class="lotusMeta"><ul class="lotusInlinelist"><li class="lotusFirst">Bookmarked by <a href="javascript:;" class="lotusPerson">1 other</a></li><li>Yesterday at 1:02 PM</li><li class="lotusTags">Tags: <span role="list"><span role="listitem"><a href="javascript:;">blogs</a></span>, <span role="listitem"><a href="javascript:;">innovation</a></span>, <span role="listitem"><a href="javascript:;">web20</a></span></span></li></ul></div></td>
<td class="lotusAlignRight lotusLastCell"><a class="lotusAction" href="javascript:;" role="button" aria-expanded="false" aria-controls="[detailRowID]" title="Show details"><img class="lotusIcon16 lotusIconShow" src="../../css/images/blank.gif" alt="" aria-label="Show details" /><span class="lotusAltText">Show</span></a></td>
</tr>
<tr>
<td class="lotusFirstCell"><input type="checkbox" title="Select this [item]" /></td>
<td><img class="yourProductSprite yourProductSprite-iconPlaceholder16" src="../../css/images/blank.gif" alt="Amazon.com" /></td>
<td><h4 class="lotusTitle"><a href="javascript:;">Amazon.com Unbox Video</a></h4><div class="lotusMeta"><ul class="lotusInlinelist"><li class="lotusFirst">Bookmarked by <a href="javascript:;" class="lotusPerson">5 others</a></li><li>Today at 9:15 PM</li><li class="lotusTags">Tags: <span role="list"><span role="listitem"><a href="javascript:;">video</a></span></span></li></ul></div></td>
<td class="lotusAlignRight lotusLastCell"><a class="lotusAction" href="javascript:;" role="button" aria-expanded="true" aria-controls="detailRowID" title="Hide details"><img class="lotusIcon16 lotusIconHide" src="../../css/images/blank.gif" alt="" aria-label="Hide details" /><span class="lotusAltText">Hide</span></a></td>
</tr>
<tr id="detailRowID" class="lotusDetails" aria-hidden="false">
<td class="lotusFirstCell">&nbsp;</td>
<td>&nbsp;</td>
<td class="lotusLastCell" colspan="2">
<p>Ut caecus quis enim in ea consequat antehabeo, probo, quidem, loquor, uxor, et ea. Nutus autem ut vulputate obruo, facilisi at feugait aliquam quod quibus tristique hos eros nibh. Erat letalis conventio refoveo luptatum commodo vulputate huic esse hos consequat plaga veniam uxor imputo.</p>
<div class="lotusChunk"><ul class="lotusInlinelist lotusLeft lotusActions"><li class="lotusFirst"><a href="javascript:;" role="button">Edit</a></li><li><a href="javascript:;" onclick="MenuPopup.showMenu( 'dogEntryActionMenu', event, { focus: this } );" role="button" aria-haspopup="true" aria-owns="dogEntryActionMenu">More actions <img class="lotusArrow lotusDropDownSprite" src="../../css/images/blank.gif" alt="" /><span class="lotusAltText">&#x25bc;</span></a></li></ul></div>
</td>
</tr>
<tr>
<td class="lotusFirstCell"><input type="checkbox" title="Select this [item]" /></td>
<td><img class="yourProductSprite yourProductSprite-iconPlaceholder16" src="../../css/images/blank.gif" alt="IBM intranet" /></td>
<td><h4 class="lotusTitle"><a href="javascript:;">Techcrunch Blog Archive</a><span class="lotusType">secure</span></h4><div class="lotusMeta"><ul class="lotusInlinelist"><li class="lotusFirst">Bookmarked by <a href="javascript:;" class="lotusPerson">12 others</a></li><li>Yesterday at 7:05 PM</li><li class="lotusTags">Tags: <span role="list"><span role="listitem"><a href="javascript:;">archive</a></span>, <span role="listitem"><a href="javascript:;">blog</a></span></span></li></ul></div></td>
<td class="lotusAlignRight lotusLastCell"><a class="lotusAction" href="javascript:;" role="button" aria-expanded="false" aria-controls="[detailRowID]" title="Show details"><img class="lotusIcon16 lotusIconShow" src="../../css/images/blank.gif" alt="" aria-label="Show details" /><span class="lotusAltText">Show</span></a></td>
</tr>
</tbody></table>
</div>
<p/>
<p/>
<br/>
Copied Detailed Table Information <br/>
- http://infolib.lotus.com/resources/oneui/3.0/docPublic/components/tableSummaryDetails.htm<br/>
<br/>
OneUI 3.0 Documentation <br/>
- http://infolib.lotus.com/resources/oneui/3.0/docPublic/index.htm<br/>
<br/>
Linked CSS <br/>
- https://apps.collabservnext.com/theming/theme/css/3<br/>
<br/>
CSS Formatter <br/>
- http://www.codebeautifier.com/<br/>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment