akashacms-base
Advanced tools
Comparing version 0.4.2 to 0.4.3
89
index.js
@@ -189,17 +189,17 @@ /** | ||
function(element, next) { | ||
if (typeof config.headerScripts !== "undefined") { | ||
akasha.partial("ak_stylesheets.html.ejs", { | ||
headerScripts: config.headerScripts | ||
}, function(err, style) { | ||
if (err) { logger.error(err); next(err); } | ||
else { | ||
$(element).replaceWith(style); | ||
next(); | ||
} | ||
}); | ||
} | ||
else { | ||
$(element).remove(); | ||
next(); | ||
} | ||
var scripts; | ||
if (typeof metadata.headerStylesheetsAdd !== "undefined") { | ||
scripts = config.headerScripts.stylesheets.concat(metadata.headerStylesheetsAdd); | ||
} else { | ||
scripts = config.headerScripts.stylesheets; | ||
} | ||
akasha.partial("ak_stylesheets.html.ejs", { | ||
stylesheets: scripts | ||
}, function(err, style) { | ||
if (err) { logger.error(err); next(err); } | ||
else { | ||
$(element).replaceWith(style); | ||
next(); | ||
} | ||
}); | ||
}, | ||
@@ -250,18 +250,16 @@ function(err) { | ||
function(element, next) { | ||
if (typeof config.headerScripts !== "undefined" && typeof config.headerScripts.javaScriptTop !== "undefined") { | ||
akasha.partial("ak_javaScript.html.ejs", | ||
{ javaScripts: config.headerScripts.javaScriptTop }, | ||
function(err, html) { | ||
if (err) next(err); | ||
else { | ||
$(element).replaceWith(html); | ||
next(); | ||
} | ||
}); | ||
} | ||
else { | ||
$(element).remove(); | ||
next(); | ||
} | ||
var scripts; | ||
if (typeof metadata.headerJavaScriptAddTop !== "undefined") { | ||
scripts = config.headerScripts.javaScriptTop.concat(metadata.headerJavaScriptAddTop); | ||
} else { | ||
scripts = config.headerScripts.javaScriptTop; | ||
} | ||
akasha.partial("ak_javaScript.html.ejs", { javaScripts: scripts }, | ||
function(err, html) { | ||
if (err) next(err); | ||
else { | ||
$(element).replaceWith(html); | ||
next(); | ||
} | ||
}); | ||
}, | ||
@@ -282,17 +280,16 @@ function(err) { | ||
function(element, next) { | ||
if (typeof config.headerScripts !== "undefined" && typeof config.headerScripts.javaScriptBottom !== "undefined") | ||
akasha.partial("ak_javaScript.html.ejs", | ||
{ javaScripts: config.headerScripts.javaScriptBottom }, | ||
function(err, html) { | ||
if (err) next(err); | ||
else { | ||
$(element).replaceWith(html); | ||
next(); | ||
} | ||
}); | ||
else { | ||
$(element).remove(); | ||
next(); | ||
} | ||
var scripts; | ||
if (typeof metadata.headerJavaScriptAddBottom !== "undefined") { | ||
scripts = config.headerScripts.javaScriptBottom.concat(metadata.headerJavaScriptAddBottom); | ||
} else { | ||
scripts = config.headerScripts.javaScriptBottom; | ||
} | ||
akasha.partial("ak_javaScript.html.ejs", { javaScripts: scripts }, | ||
function(err, html) { | ||
if (err) next(err); | ||
else { | ||
$(element).replaceWith(html); | ||
next(); | ||
} | ||
}); | ||
}, | ||
@@ -299,0 +296,0 @@ function(err) { |
@@ -29,3 +29,3 @@ { | ||
}, | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"engines": { | ||
@@ -32,0 +32,0 @@ "node": ">=0.10.1" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84189
735