diff --git a/Makefile b/Makefile index 698c0a719..069e8d701 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/lemonldap-ng-manager/site/templates/header.tpl b/lemonldap-ng-manager/site/templates/header.tpl index bb6e5b374..c36463e99 100644 --- a/lemonldap-ng-manager/site/templates/header.tpl +++ b/lemonldap-ng-manager/site/templates/header.tpl @@ -11,6 +11,10 @@ +//elsif:useexternallibs + + + //elsif:cssminified bwr/bootstrap/dist/css/bootstrap.min.css" /> bwr/bootstrap/dist/css/bootstrap-theme.min.css" /> diff --git a/lemonldap-ng-manager/site/templates/scripts.tpl b/lemonldap-ng-manager/site/templates/scripts.tpl index b08978c24..8e82a10dc 100644 --- a/lemonldap-ng-manager/site/templates/scripts.tpl +++ b/lemonldap-ng-manager/site/templates/scripts.tpl @@ -39,6 +39,16 @@ +//elsif:useexternallibs + + + + + + + + + //elsif:jsminified diff --git a/lemonldap-ng-portal/example/skins/bootstrap/header.tpl b/lemonldap-ng-portal/example/skins/bootstrap/header.tpl index 4f33866ee..72dfbd726 100644 --- a/lemonldap-ng-portal/example/skins/bootstrap/header.tpl +++ b/lemonldap-ng-portal/example/skins/bootstrap/header.tpl @@ -10,16 +10,20 @@ - //css/bootstrap.css" rel="stylesheet"> - //css/bootstrap-theme.css" rel="stylesheet"> + //css/bootstrap.css" rel="stylesheet"> + //css/bootstrap-theme.css"> //css/styles.css" /> diff --git a/lemonldap-ng-portal/example/skins/common/script.tpl b/lemonldap-ng-portal/example/skins/common/script.tpl index acb911c0d..9dcedc5ba 100644 --- a/lemonldap-ng-portal/example/skins/common/script.tpl +++ b/lemonldap-ng-portal/example/skins/common/script.tpl @@ -4,6 +4,11 @@ +//elsif:useexternallibs + + + + //elsif:jsminified