Commit ecac364e authored by Xavier Guimard's avatar Xavier Guimard

Add `USEEXTERNALLIBS` option

parent 15e6ae48
......@@ -6,6 +6,7 @@ DESTDIR=
# Flag for optimizations
USEDEBIANLIBS=no
PROD=$(USEDEBIANLIBS)
USEEXTERNALLIBS=no
# Compression
JSCOMPRESS=$(PROD)
......@@ -139,6 +140,8 @@ PORTALLIBSTOREMOVEFORDEBIAN=$(RPORTALSKINSDIR)/bootstrap/fonts \
$(RPORTALSKINSDIR)/bootstrap/js/bootstrap* \
$(RPORTALSKINSDIR)/common/js/jquery-* \
$(RPORTALSKINSDIR)/common/js/jquery.cookie*
MANAGEREXTERNALLIBS=$(RMANAGERSTATICDIR)/bwr/
PORTALEXTERNALLIBS=$(PORTALLIBSTOREMOVEFORDEBIAN) $(RPORTALSKINSDIR)/common/js/jquery*
# GENERATED SRC FILESlemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm
MANAGERJSONSRC= scripts/jsongenerator.pl \
......@@ -447,10 +450,16 @@ install_manager_site: install_conf_dir
$(RMANAGERTEMPLATESDIR)
@cp -pR $(SRCMANAGERDIR)/site/static/* $(RMANAGERSTATICDIR)
@for f in $(SRCMANAGERDIR)/site/templates/*.tpl; do \
./scripts/transform-templates usedebianlibs $(USEDEBIANLIBS) jsminified $(JSCOMPRESS) cssminified $(CSSCOMPRESS) <$$f \
./scripts/transform-templates \
usedebianlibs $(USEDEBIANLIBS) \
useexternallibs $(USEEXTERNALLIBS) \
jsminified $(JSCOMPRESS) \
cssminified $(CSSCOMPRESS) <$$f \
> $(RMANAGERTEMPLATESDIR)/`basename $$f`; \
done
@if test "$(USEDEBIANLIBS)" = "yes"; then \
@if test "$(USEEXTERNALLIBS)" = "yes"; then \
rm -rvf $(MANAGEREXTERNALLIBS) \
elif test "$(USEDEBIANLIBS)" = "yes"; then \
rm -rvf $(MANAGERLIBSTOREMOVEFORDEBIAN); \
fi
@cp -pR $(SRCMANAGERDIR)/eg/* $(RMANAGERPSGIDIR)
......@@ -480,7 +489,9 @@ install_portal_site: install_conf_dir
./scripts/transform-templates usedebianlibs $(USEDEBIANLIBS) jsminified $(JSCOMPRESS) cssminified $(CSSCOMPRESS) <$$f >$$f.tmp; \
mv -f $$f.tmp $$f; \
done
@if test "$(USEDEBIANLIBS)" = "yes"; then \
@if test "$(USEEXTERNALLIBS)" = "yes"; then \
rm -rvf $(PORTALEXTERNALLIBS) \
elif test "$(USEDEBIANLIBS)" = "yes"; then \
rm -rvf $(PORTALLIBSTOREMOVEFORDEBIAN); \
fi
@if [ "$(PORTALDIR)/skins/" != "$(PORTALSKINSDIR)/" ]; then \
......
......@@ -11,6 +11,10 @@
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="css/manager.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"></script>
<link rel="stylesheet" type="text/css" href="css/manager.min.css" />
//elsif:cssminified
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/css/bootstrap-theme.min.css" />
......
......@@ -39,6 +39,16 @@
<script type="text/javascript" src="/javascript/angular.js/angular-animate.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/llApp.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.4.1/es5-shim.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-cookies.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-tree/2.13.0/angular-ui-tree.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-animate.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.0/ui-bootstrap-tpls.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/llApp.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/es5-shim/es5-shim.min.js"></script>
......
......@@ -10,16 +10,20 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
</TMPL_IF>
<!-- //if:usedebianlibs
<link href="/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/javascript/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.min.css" />
//elsif:useexternallibs
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"></script>
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.min.css" />
//elsif:cssminified
<link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap.min.css" rel="stylesheet">
<link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.min.css" />
//else -->
<link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap.css" rel="stylesheet">
<link href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap-theme.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/bootstrap-theme.css">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="SKIN_PATH">/<TMPL_VAR NAME="SKIN">/css/styles.css" />
<!-- //endif -->
<TMPL_INCLUDE NAME="../common/background.tpl">
......
......@@ -4,6 +4,11 @@
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery.base64.min.js"></script>
<script type="text/javascript" src="/javascript/jquery-cookie/jquery.cookie.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="https://javascriptbase64.googlecode.com/files/base64.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="SKIN_PATH">/common/js/jquery-ui-1.10.3.custom.min.js"></script>
......
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