Portal js skeleton (#595)
This commit is contained in:
parent
786f1c4252
commit
7529b9cc1d
12
Makefile
12
Makefile
|
@ -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"; \
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
window.translatePage = (lang) ->
|
||||
$("[trspan]").each ->
|
||||
this.text translate this.attr 'trspan'
|
||||
|
||||
$(document).ready ->
|
||||
translatePage(lang)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
// 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);
|
|
@ -0,0 +1 @@
|
|||
(function(){window.translatePage=function(a){return $("[trspan]").each(function(){return this.text(translate(this.attr("trspan")))})};$(document).ready(function(){return translatePage(lang)})}).call(this);
|
Loading…
Reference in New Issue