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 \ ...@@ -186,12 +186,12 @@ MANAGERJSONDST=$(SRCMANAGERDIR)/site/static/struct.json \
_example/conf/lmConf-1.js _example/conf/lmConf-1.js
# Javascript and CSS to minify # 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 $(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 # 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)) COFFEEDSTFILES:=$(subst coffee/,static/js/,$(COFFEESRCFILES:.coffee=.js))
# Minified files # Minified files
...@@ -264,6 +264,12 @@ js: $(COFFEEDSTFILES) ...@@ -264,6 +264,12 @@ js: $(COFFEEDSTFILES)
minify: js $(JSDSTFILES) $(CSSDSTFILES) 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 $(SRCMANAGERDIR)/site/static/js/%.js: $(SRCMANAGERDIR)/site/coffee/%.coffee
@if which coffee >/dev/null; then \ @if which coffee >/dev/null; then \
echo "Compiling $(SRCMANAGERDIR)/site/coffee/$*.coffee"; \ 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
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