Skip to content

Commit

Permalink
Created USE_BRANDING and EXTRA_BRANDING flags + modified includeBrand…
Browse files Browse the repository at this point in the history
…ing() (#146)
  • Loading branch information
bogdanciobanu committed May 16, 2013
1 parent 1ee0168 commit 703392e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/includes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Include CSS and JS files utilities, with or without IE support.
*/
EXTRA_BRANDING =["/assets/custom.css"];
USE_BRANDING = false;
function includeJsFile(file) {
document.write('<script type="text/javascript" src="' +
file + '"><\/sc' + 'ript/>');
Expand Down Expand Up @@ -37,7 +39,9 @@ function getStaticUrl() {

function includeCssAndJs() {
includeStaticFilesInBundles();
includeBranding();
if (USE_BRANDING){
includeBranding(EXTRA_BRANDING);
}
includeMainEntryPoint();
includeTemplates();
}
Expand Down Expand Up @@ -102,9 +106,11 @@ function includeStaticFilesInBundles_Development() {
* Also, we cannot use includeCss because we need it to have an ID
* (#custom-css).
*/
function includeBranding() {
document.write("<link rel='stylesheet' id='custom-css' " +
"href='/assets/custom.css'/>");
function includeBranding(files) {
for(var i=0; i < files.length;i++) {
document.write("<link rel='stylesheet' id='custom-css' " +
"href= '" + files[i] + "'/>");
}
}

/*
Expand Down Expand Up @@ -180,4 +186,4 @@ function replaceReferencesFromConfigVariables() {

overrideGeneralConfigWithUserConfig();
replaceReferencesFromConfigVariables();
includeCssAndJs();
includeCssAndJs();

0 comments on commit 703392e

Please sign in to comment.