Commit 7529b9cc authored by Xavier Guimard's avatar Xavier Guimard

Portal js skeleton (#595)

parent 786f1c42
......@@ -186,12 +186,12 @@ MANAGERJSONDST=$(SRCMANAGERDIR)/site/static/struct.json \
_example/conf/lmConf-1.js
# 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') \
$(SRCMANAGERDIR)/site/static/bwr/file-saver.js/FileSaver.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/,$(COFFEESRCFILES:.coffee=.js))
# Minified files
......@@ -264,6 +264,12 @@ js: $(COFFEEDSTFILES)
minify: js $(JSDSTFILES) $(CSSDSTFILES)
$(SRCPORTALDIR)/site/static/js/%.js: $(SRCPORTALDIR)/site/coffee/%.coffee
@if which coffee >/dev/null; then \
echo "Compiling $(SRCPORTALDIR)/site/coffee/$*.coffee"; \
coffee -c -o $(SRCPORTALDIR)/site/static/js/ $(SRCPORTALDIR)/site/coffee/$*.coffee; \
fi
$(SRCMANAGERDIR)/site/static/js/%.js: $(SRCMANAGERDIR)/site/coffee/%.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 ->
translatePage(lang)
// 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);
});
}).call(this);
(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
Markdown is supported
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