|
@@ -49,14 +49,14 @@ pathList = [
|
|
|
"/stylesheets/ol-ieee-style.css"
|
|
"/stylesheets/ol-ieee-style.css"
|
|
|
].concat(Modules.moduleAssetFiles(jsPath))
|
|
].concat(Modules.moduleAssetFiles(jsPath))
|
|
|
|
|
|
|
|
-if !Settings.useMinifiedJs
|
|
|
|
|
|
|
+if !Settings.useMinifiedJs
|
|
|
logger.log "not using minified JS, not hashing static files"
|
|
logger.log "not using minified JS, not hashing static files"
|
|
|
else
|
|
else
|
|
|
logger.log "Generating file hashes..."
|
|
logger.log "Generating file hashes..."
|
|
|
for path in pathList
|
|
for path in pathList
|
|
|
content = getFileContent(path)
|
|
content = getFileContent(path)
|
|
|
hash = crypto.createHash("md5").update(content).digest("hex")
|
|
hash = crypto.createHash("md5").update(content).digest("hex")
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
splitPath = path.split("/")
|
|
splitPath = path.split("/")
|
|
|
filenameSplit = splitPath.pop().split(".")
|
|
filenameSplit = splitPath.pop().split(".")
|
|
|
filenameSplit.splice(filenameSplit.length-1, 0, hash)
|
|
filenameSplit.splice(filenameSplit.length-1, 0, hash)
|
|
@@ -145,7 +145,7 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
|
|
|
|
|
|
|
if opts.removeExtension == true
|
|
if opts.removeExtension == true
|
|
|
path = path.slice(0,-3)
|
|
path = path.slice(0,-3)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if qs? and qs.length > 0
|
|
if qs? and qs.length > 0
|
|
|
path = path + "?" + qs
|
|
path = path + "?" + qs
|
|
|
return path
|
|
return path
|
|
@@ -343,7 +343,7 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
|
|
|
|
|
|
|
webRouter.use (req, res, next) ->
|
|
webRouter.use (req, res, next) ->
|
|
|
isOl = (Settings.brandPrefix == 'ol-')
|
|
isOl = (Settings.brandPrefix == 'ol-')
|
|
|
- res.locals.uiConfig =
|
|
|
|
|
|
|
+ res.locals.uiConfig =
|
|
|
defaultResizerSizeOpen : if isOl then 7 else 24
|
|
defaultResizerSizeOpen : if isOl then 7 else 24
|
|
|
defaultResizerSizeClosed : if isOl then 7 else 24
|
|
defaultResizerSizeClosed : if isOl then 7 else 24
|
|
|
eastResizerCursor : if isOl then "ew-resize" else null
|
|
eastResizerCursor : if isOl then "ew-resize" else null
|
|
@@ -372,4 +372,5 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
|
|
res.locals.ExposedSettings =
|
|
res.locals.ExposedSettings =
|
|
|
isOverleaf: Settings.overleaf?
|
|
isOverleaf: Settings.overleaf?
|
|
|
appName: Settings.appName
|
|
appName: Settings.appName
|
|
|
|
|
+ siteUrl: Settings.siteUrl
|
|
|
next()
|
|
next()
|