When creating an iEBMS configuration that requires a user to be logged in, once logged in, the user typically has a link towards the top right of the page that says:
Not Last, First?
Clicking this link will log the user out of iEBMS, and take them back to the beginning of the iEBMS configuration.
Occasionally you may want to hide this link, but within many of the iEBMS configurations there isn't an option to achieve this.
The link also doesn't have any unique 'hooks' that can be used to target the link and hide it away using Cascading Style Sheets (CSS).
However, using some JavaScript we can target this exact link, and hide it away.
Using jQuery:
- Within your iEBMS structure page, include a link to the jQuery framework within the <head> section:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
- At the bottom of your iEBMS structure page, just before the closing </body> tag, include the following code:
<script type="text/javascript"> var $162 = jQuery.noConflict(); $162(document).ready(function() { $162('table.All-ApplicationTable').find('a[class*="-GeneralLink"]:contains("Not ")').first().hide(); }); </script>
Pure JavaScript
- At the bottom of your iEBMS structure page, just before the closing </body> tag, include the following code:
<script type="text/javascript"> var links = document.links; var firstLogoutLink = undefined; for(i=0; i<links.length; i++) { if(links[i].getAttribute("class")) { if(links[i].getAttribute("class").indexOf("-GeneralLink") != -1 && links[i].text.substr(0,4) == "Not " && links[i].text.substr(-1,1) == "?") { firstLogoutLink = i; break; } } } if(typeof(firstLogoutLink) != "undefined") document.links[firstLogoutLink].style.display = "none"; </script>
Comments
0 comments
Please sign in to leave a comment.