Last active
August 29, 2015 14:03
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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