Skip to content

Instantly share code, notes, and snippets.

@stephengodbold
Last active August 29, 2015 14:03
Show Gist options
  • Save stephengodbold/bcd89a192c4e8263f506 to your computer and use it in GitHub Desktop.
Save stephengodbold/bcd89a192c4e8263f506 to your computer and use it in GitHub Desktop.
A TFS Web Extension to drop a custom footer onto the home pages for a project collection, and a team project.
<WebAccess version="12.0">
<plugin name="TFS Branding Footer" vendor="SteveGodbold" moreinfo="http://stevegodbold.com/" version="12.0.0.0" >
<modules >
<module namespace="SteveGodbold.TFS.Branding" loadAfter="TFS.Host"/>
</modules>
</plugin>
</WebAccess>
TFS.module("SteveGodbold.TFS.Branding", ["TFS.Host","TFS.Admin"], function(){
function buildFooter() {
return '<div id="page-footer"><p>YOUR CONTENT HERE</p></div>';
}
function setFooter(footer) {
$('.content-section').after(footer)
$('#page-footer').css({
"display" : "block",
"position" : "absolute",
"height" : "200px",
"bottom" : "-100px",
"width" : "100%",
"font-size" : "large",
"text-align" : "center"
});
}
function getController() {
var tfsContext = TFS.Host.TfsContext.getDefault();
return (tfsContext.navigation.currentController || "" );
}
if (getController() === "home") {
var footer = buildFooter();
setFooter(footer);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment