Commit 7529b9cc authored by Yadd's avatar Yadd
Browse files

Portal js skeleton (#595)

parent 786f1c42
......@@ -186,12 +186,12 @@ MANAGERJSONDST=$(SRCMANAGERDIR)/site/static/struct.json \
# Javascript and CSS to minify
JSSRCFILES:=$(shell find $(SRCMANAGERDIR)/site/static/js $(SRCPORTALDIR)/example -type f -name '*.js' ! -name '*.min.js') \
JSSRCFILES:=$(shell find */site/static/js $(SRCPORTALDIR)/example -type f -name '*.js' ! -name '*.min.js') \
CSSSRCFILES:=$(shell find $(SRCMANAGERDIR)/site/static/css $(SRCPORTALDIR)/example -type f -name '*.css' ! -name '*.min.css')
CSSSRCFILES:=$(shell find */site/static/css $(SRCPORTALDIR)/example -type f -name '*.css' ! -name '*.min.css')
# Coffee files
COFFEESRCFILES:=$(shell find $(SRCMANAGERDIR)/site/coffee/ -type f -name '*.coffee')
COFFEESRCFILES:=$(shell find */site/coffee/ -type f -name '*.coffee')
COFFEEDSTFILES:=$(subst coffee/,static/js/,$(
# Minified files
......@@ -264,6 +264,12 @@ js: $(COFFEEDSTFILES)
$(SRCPORTALDIR)/site/static/js/%.js: $(SRCPORTALDIR)/site/coffee/
@if which coffee >/dev/null; then \
echo "Compiling $(SRCPORTALDIR)/site/coffee/$*.coffee"; \
coffee -c -o $(SRCPORTALDIR)/site/static/js/ $(SRCPORTALDIR)/site/coffee/$*.coffee; \
$(SRCMANAGERDIR)/site/static/js/%.js: $(SRCMANAGERDIR)/site/coffee/
@if which coffee >/dev/null; then \
echo "Compiling $(SRCMANAGERDIR)/site/coffee/$*.coffee"; \
window.translatePage = (lang) ->
$("[trspan]").each ->
this.text translate this.attr 'trspan'
$(document).ready ->
// Generated by CoffeeScript 1.10.0
(function() {
window.translatePage = function(lang) {
return $("[trspan]").each(function() {
return this.text(translate(this.attr('trspan')));
$(document).ready(function() {
return translatePage(lang);
(function(){window.translatePage=function(a){return $("[trspan]").each(function(){return this.text(translate(this.attr("trspan")))})};$(document).ready(function(){return translatePage(lang)})}).call(this);
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment