debian/loolwsd.cron.d | 2 dev/null |binary kit/Kit.cpp | 18 - loleaflet/.eslintignore | 2 loleaflet/Jakefile.js | 111 ---------- loleaflet/Makefile.am | 64 ++---- loleaflet/admin/adminHistory.html | 9 loleaflet/admin/build/build.js | 13 + loleaflet/admin/build/deps.js | 20 - loleaflet/admin/main-admin.js | 8 loleaflet/admin/src/AdminSocketSettings.js | 5 loleaflet/admin/src/Base.js | 24 +- loleaflet/bootstrap/LICENSE | 21 -- loleaflet/bootstrap/dashboard.css | 115 ----------- loleaflet/bootstrap/holder.min.js | 12 - loleaflet/bootstrap/ie10-viewport-bug-workaround.js | 23 -- loleaflet/build/build.js | 207 -------------------- loleaflet/debug/document/loleaflet.html | 2 loleaflet/evol.colorpicker.strings.js | 7 loleaflet/images/spritesheet-2x.png |binary loleaflet/images/spritesheet.png |binary loleaflet/node_shrinkwrap/which-1.3.1.tgz |binary loleaflet/npm-shrinkwrap.json.in | 98 --------- loleaflet/package.json | 10 loleaflet/plugins/draw-0.2.4/Jakefile.js | 48 ---- loleaflet/plugins/draw-0.2.4/build/build.js | 104 ---------- loolwsd.spec.in | 2 tools/WebSocketDump.cpp | 2 28 files changed, 96 insertions(+), 831 deletions(-)
New commits: commit 57c7e77119cfbbdd3b392009b5c565887768aee7 Author: Tor Lillqvist <t...@collabora.com> Date: Fri Jun 1 16:42:37 2018 +0300 Fix warning: private field '_isSSL' is not used [-Werror,-Wunused-private-field] Change-Id: Iddf8ac7f0afa85559b03b980a558d9a4fd058473 (cherry picked from commit b7de2865dcb14704c285baf8d33ea793d3840399) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/tools/WebSocketDump.cpp b/tools/WebSocketDump.cpp index 777a2c82e..f76ef302e 100644 --- a/tools/WebSocketDump.cpp +++ b/tools/WebSocketDump.cpp @@ -206,6 +206,8 @@ public: #if ENABLE_SSL if (_isSSL) return StreamSocket::create<SslStreamSocket>(physicalFd, false, std::make_shared<ClientRequestDispatcher>()); +#else + (void) _isSSL; #endif return StreamSocket::create<StreamSocket>(physicalFd, false, std::make_shared<ClientRequestDispatcher>()); } commit 1192f68b4011689078c9eb00e20ede180e2a87be Author: Jan Holesovsky <ke...@collabora.com> Date: Wed May 30 20:03:21 2018 +0200 Cleanup all old files in the cache, not just png's. Change-Id: I61c7016d0e318742d733da72d97572215ba46a36 (cherry picked from commit 57f3bae9d9cd8c462a12a424d2bd838ba0c4cece) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/debian/loolwsd.cron.d b/debian/loolwsd.cron.d index 85a3afcae..761029b92 100644 --- a/debian/loolwsd.cron.d +++ b/debian/loolwsd.cron.d @@ -1 +1 @@ -0 0 */1 * * root find /var/cache/loolwsd -name "*.png" -a -atime +10 -exec rm {} \; +0 0 */1 * * root find /var/cache/loolwsd -type f -a -atime +10 -exec rm {} \; diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 681ca8762..b1d2df5fb 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -88,7 +88,7 @@ install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates %endif mkdir -p %{buildroot}/etc/cron.d echo "#Remove old tiles once every 10 days at midnight" > %{buildroot}/etc/cron.d/loolwsd.cron -echo "0 0 */1 * * root find /var/cache/loolwsd -name \"*.png\" -a -atime +10 -exec rm {} \;" >> %{buildroot}/etc/cron.d/loolwsd.cron +echo "0 0 */1 * * root find /var/cache/loolwsd -type f -a -atime +10 -exec rm {} \;" >> %{buildroot}/etc/cron.d/loolwsd.cron mkdir -p %{buildroot}/etc/pam.d echo "auth required pam_unix.so" > %{buildroot}/etc/pam.d/loolwsd echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd commit 331b3545dfac4f8c46f2c60e372559ea2f4bb93f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon May 28 09:11:06 2018 +0200 kit: let alphaBlend() take an std::vector<char> instead of raw pointer So that it's more obvious that the two for loops don't read past the end of the vector. Change-Id: I49752c1bc316b6d73568ab334b07727ef60bdce5 (cherry picked from commit d718b1c0545fe77b0552269057bff707f8bee347) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 25b03f2af..8ef9840bd 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -600,19 +600,19 @@ public: offsetX += (tileWidth - maxX) / 2; offsetY += (tileHeight - maxY) / 2; - alphaBlend(pixmap->data(), _width, _height, offsetX, offsetY, tilePixmap, tilesPixmapWidth, tilesPixmapHeight); + alphaBlend(*pixmap, _width, _height, offsetX, offsetY, tilePixmap, tilesPixmapWidth, tilesPixmapHeight); } } private: /// Alpha blend pixels from 'from' over the 'to'. - void alphaBlend(const unsigned char* from, int from_width, int from_height, int from_offset_x, int from_offset_y, + void alphaBlend(const std::vector<unsigned char>& from, int from_width, int from_height, int from_offset_x, int from_offset_y, unsigned char* to, int to_width, int to_height) { for (int to_y = from_offset_y, from_y = 0; (to_y < to_height) && (from_y < from_height) ; ++to_y, ++from_y) for (int to_x = from_offset_x, from_x = 0; (to_x < to_width) && (from_x < from_width); ++to_x, ++from_x) { - const unsigned char* f = from + 4 * (from_y * from_width + from_x); + const unsigned char* f = from.data() + 4 * (from_y * from_width + from_x); double src_r = f[0]; double src_g = f[1]; double src_b = f[2]; @@ -657,14 +657,19 @@ private: // are always set to 0 (black) and the alpha level is 0 everywhere // except on the text area; the alpha level take into account of // performing anti-aliasing over the text edges. - unsigned char* text = _loKitDoc->renderFont(_font.c_str(), _text.c_str(), &_width, &_height); + unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), _text.c_str(), &_width, &_height); - if (!text) + if (!textPixels) { LOG_ERR("Watermark: rendering failed."); } const unsigned int pixel_count = width * height * 4; + + std::vector<unsigned char> text(textPixels, textPixels + pixel_count); + // No longer needed. + std::free(textPixels); + _pixmap.reserve(pixel_count); // Create the white blurred background @@ -703,9 +708,6 @@ private: // Now copy the (black) text over the (white) blur alphaBlend(text, _width, _height, 0, 0, _pixmap.data(), _width, _height); - // No longer needed. - std::free(text); - // Make the resulting pixmap semi-transparent for (unsigned char* p = _pixmap.data(); p < _pixmap.data() + pixel_count; p++) { commit 921524a4a7415d137b7c5972c7ef9634f5af21f6 Author: Henry Castro <hcas...@collabora.com> Date: Sun May 27 09:32:47 2018 -0400 loleaflet: fix "set property 'value' of null" Change-Id: I5afec52b74937c7620edcebc9d678bb94af27109 (cherry picked from commit 3bea290370824b042a31b29e296bdf35236d0682) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/admin/src/AdminSocketSettings.js b/loleaflet/admin/src/AdminSocketSettings.js index 71e6bf9de..6a5950bca 100644 --- a/loleaflet/admin/src/AdminSocketSettings.js +++ b/loleaflet/admin/src/AdminSocketSettings.js @@ -64,7 +64,10 @@ var AdminSocketSettings = AdminSocketBase.extend({ var setting = settings[i].split('='); var settingKey = setting[0]; var settingVal = setting[1]; - document.getElementById(settingKey).value = settingVal; + var elem = document.getElementById(settingKey); + if (elem) { + elem.value = settingVal; + } } } else if (textMsg.startsWith('loolserver ')) { commit a6bdb24b0ee624f2b953e80949f8d279bb0c3326 Author: Henry Castro <hcas...@collabora.com> Date: Sun May 27 09:16:52 2018 -0400 loleaflet: remove the script tags that they already were bundled them Change-Id: I791c6c6850b39d5327c5c3c521138531f3a6f148 (cherry picked from commit 9f456079e128272fffa37ea82f2bf548a07a93de) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 331e9ebad..3b15d68ca 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -183,7 +183,7 @@ $(builddir)/dist/bundle.js: $(NODE_MODULES_JS_SRC) \ --source-map --output $@ endif -$(builddir)/dist/loleaflet.html: $(srcdir)/loleaflet.html.m4 $(LOLEAFLET_HTML_DST) \ +$(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HTML_DST) \ $(builddir)/dist/bundle.css $(builddir)/dist/bundle.js @echo "Generating loleaflet.html..." @m4 -E -DDEBUG=$(ENABLE_DEBUG) \ @@ -192,7 +192,7 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/loleaflet.html.m4 $(LOLEAFLET_HTML_DS $(call LOLEAFLET_JS,$(srcdir)/build/build.js) \ $(patsubst %.js,plugins/draw-$(DRAW_VERSION)/%.js,$(call LOLEAFLET_JS,$(srcdir)/plugins/draw-$(DRAW_VERSION)/build/build.js)) \ $(PLUGINS_JS))" \ - $(srcdir)/loleaflet.html.m4 > $@ + $(srcdir)/html/loleaflet.html.m4 > $@ node_modules: npm-shrinkwrap.json @npm install diff --git a/loleaflet/admin/adminHistory.html b/loleaflet/admin/adminHistory.html index 7245a3d04..4752f8a07 100644 --- a/loleaflet/admin/adminHistory.html +++ b/loleaflet/admin/adminHistory.html @@ -72,14 +72,5 @@ </div> </div> <!--%FOOTER%--> - - <!-- Bootstrap core JavaScript - ================================================== --> - <!-- Placed at the end of the document so the pages load faster --> - <script src="../../dist/bootstrap/js/bootstrap.min.js"></script> - <!-- Just to make our placeholder images work. Don't actually copy the next line! --> - <script src="../../dist/bootstrap/assets/js/vendor/holder.min.js"></script> - <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> - <script src="../../dist/bootstrap/assets/js/ie10-viewport-bug-workaround.js"></script> </body> </html> diff --git a/loleaflet/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4 similarity index 100% rename from loleaflet/loleaflet.html.m4 rename to loleaflet/html/loleaflet.html.m4 commit c6ad251d657b1d46c68a59e5228f16ab9050ccb2 Author: Henry Castro <hcas...@collabora.com> Date: Sun May 27 07:50:37 2018 -0400 loleaflet: update node_shrinkwrap Change-Id: Icf4683c074c6c4dc6e478412230a431137bdb7fa (cherry picked from commit 52be1723073da6fd8600972ffcd0eb9bb42e333d) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index e0a0d9d8b..331e9ebad 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -136,7 +136,7 @@ $(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL) if ENABLE_DEBUG $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST) $(LOLEAFLET_DRAW_JS_DST) - @echo "Checking loleaflet for JS errors..." + @echo "Checking for loleaflet JS errors..." @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src $(srcdir)/plugins/draw-$(DRAW_VERSION)/src $(srcdir)/js --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc @touch $@ diff --git a/loleaflet/node_shrinkwrap/ansi-styles-1.0.0.tgz b/loleaflet/node_shrinkwrap/ansi-styles-1.0.0.tgz deleted file mode 100644 index 27207f891..000000000 Binary files a/loleaflet/node_shrinkwrap/ansi-styles-1.0.0.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/async-0.9.2.tgz b/loleaflet/node_shrinkwrap/async-0.9.2.tgz deleted file mode 100644 index 93ad1a5f1..000000000 Binary files a/loleaflet/node_shrinkwrap/async-0.9.2.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/chalk-0.4.0.tgz b/loleaflet/node_shrinkwrap/chalk-0.4.0.tgz deleted file mode 100644 index 2a6cfab6b..000000000 Binary files a/loleaflet/node_shrinkwrap/chalk-0.4.0.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/evol-colorpicker-3.2.6.tgz b/loleaflet/node_shrinkwrap/evol-colorpicker-3.2.6.tgz deleted file mode 100644 index f8e24546d..000000000 Binary files a/loleaflet/node_shrinkwrap/evol-colorpicker-3.2.6.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/filelist-0.0.6.tgz b/loleaflet/node_shrinkwrap/filelist-0.0.6.tgz deleted file mode 100644 index 703e24bff..000000000 Binary files a/loleaflet/node_shrinkwrap/filelist-0.0.6.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/has-color-0.1.7.tgz b/loleaflet/node_shrinkwrap/has-color-0.1.7.tgz deleted file mode 100644 index adf244f5e..000000000 Binary files a/loleaflet/node_shrinkwrap/has-color-0.1.7.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/jake-8.0.16.tgz b/loleaflet/node_shrinkwrap/jake-8.0.16.tgz deleted file mode 100644 index cf85a8697..000000000 Binary files a/loleaflet/node_shrinkwrap/jake-8.0.16.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/strip-ansi-0.1.1.tgz b/loleaflet/node_shrinkwrap/strip-ansi-0.1.1.tgz deleted file mode 100644 index 5ffc94b25..000000000 Binary files a/loleaflet/node_shrinkwrap/strip-ansi-0.1.1.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/utilities-0.0.37.tgz b/loleaflet/node_shrinkwrap/utilities-0.0.37.tgz deleted file mode 100644 index 7d39e0ab1..000000000 Binary files a/loleaflet/node_shrinkwrap/utilities-0.0.37.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/utilities-1.0.5.tgz b/loleaflet/node_shrinkwrap/utilities-1.0.5.tgz deleted file mode 100644 index 25e8f7fe6..000000000 Binary files a/loleaflet/node_shrinkwrap/utilities-1.0.5.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/which-1.3.0.tgz b/loleaflet/node_shrinkwrap/which-1.3.0.tgz deleted file mode 100644 index 2b704d2b9..000000000 Binary files a/loleaflet/node_shrinkwrap/which-1.3.0.tgz and /dev/null differ diff --git a/loleaflet/node_shrinkwrap/which-1.3.1.tgz b/loleaflet/node_shrinkwrap/which-1.3.1.tgz new file mode 100644 index 000000000..a4966fe59 Binary files /dev/null and b/loleaflet/node_shrinkwrap/which-1.3.1.tgz differ diff --git a/loleaflet/npm-shrinkwrap.json.in b/loleaflet/npm-shrinkwrap.json.in index 0cdbb868c..d904e45ca 100644 --- a/loleaflet/npm-shrinkwrap.json.in +++ b/loleaflet/npm-shrinkwrap.json.in @@ -201,9 +201,9 @@ } }, "async": { - "version": "0.9.2", - "resolved": "file:node_shrinkwrap/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "version": "0.2.10", + "resolved": "file:node_shrinkwrap/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", "dev": true }, "autolinker": { @@ -1272,24 +1272,6 @@ "object-assign": "4.1.1" } }, - "filelist": { - "version": "0.0.6", - "resolved": "file:node_shrinkwrap/filelist-0.0.6.tgz", - "integrity": "sha1-WKZBrR9XV0on/oekQO8xiDS1Vxk=", - "dev": true, - "requires": { - "minimatch": "3.0.4", - "utilities": "0.0.37" - }, - "dependencies": { - "utilities": { - "version": "0.0.37", - "resolved": "file:node_shrinkwrap/utilities-0.0.37.tgz", - "integrity": "sha1-o0cNCn9ogULZ6KV87hEo8S4Z4ZY=", - "dev": true - } - } - }, "filename-regex": { "version": "2.0.1", "resolved": "file:node_shrinkwrap/filename-regex-2.0.1.tgz", @@ -1442,7 +1424,7 @@ "homedir-polyfill": "1.0.1", "ini": "1.3.5", "is-windows": "0.2.0", - "which": "1.3.0" + "which": "1.3.1" } }, "globals": { @@ -1511,12 +1493,6 @@ "ansi-regex": "2.1.1" } }, - "has-color": { - "version": "0.1.7", - "resolved": "file:node_shrinkwrap/has-color-0.1.7.tgz", - "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", - "dev": true - }, "hash-base": { "version": "3.0.4", "resolved": "file:node_shrinkwrap/hash-base-3.0.4.tgz", @@ -1838,44 +1814,6 @@ "isarray": "1.0.0" } }, - "jake": { - "version": "8.0.16", - "resolved": "file:node_shrinkwrap/jake-8.0.16.tgz", - "integrity": "sha512-qUTOVCKFkiz3tHgV1WMy7HTxDZgo+sO4X9GxFLAU+Mks4WsDGe9+ONHK6tPsSp8I3x6sPl0TwGbXHwTOhTyzog==", - "dev": true, - "requires": { - "async": "0.9.2", - "chalk": "0.4.0", - "filelist": "0.0.6", - "minimatch": "3.0.4", - "utilities": "1.0.5" - }, - "dependencies": { - "ansi-styles": { - "version": "1.0.0", - "resolved": "file:node_shrinkwrap/ansi-styles-1.0.0.tgz", - "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", - "dev": true - }, - "chalk": { - "version": "0.4.0", - "resolved": "file:node_shrinkwrap/chalk-0.4.0.tgz", - "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", - "dev": true, - "requires": { - "ansi-styles": "1.0.0", - "has-color": "0.1.7", - "strip-ansi": "0.1.1" - } - }, - "strip-ansi": { - "version": "0.1.1", - "resolved": "file:node_shrinkwrap/strip-ansi-0.1.1.tgz", - "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", - "dev": true - } - } - }, "jquery": { "version": "2.2.4", "resolved": "file:node_shrinkwrap/jquery-2.2.4.tgz", @@ -3046,12 +2984,6 @@ "yargs": "3.5.4" }, "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "file:node_shrinkwrap/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - }, "source-map": { "version": "0.1.34", "resolved": "file:node_shrinkwrap/source-map-0.1.34.tgz", @@ -3155,12 +3087,6 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "utilities": { - "version": "1.0.5", - "resolved": "file:node_shrinkwrap/utilities-1.0.5.tgz", - "integrity": "sha1-8rd6iPNRBzP8chW1xIalBKdaskU=", - "dev": true - }, "vex-js": { "version": "2.3.2", "resolved": "file:node_shrinkwrap/vex-js-2.3.2.tgz", @@ -3183,9 +3109,9 @@ "dev": true }, "which": { - "version": "1.3.0", - "resolved": "file:node_shrinkwrap/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "version": "1.3.1", + "resolved": "file:node_shrinkwrap/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "2.0.0" diff --git a/loleaflet/package.json b/loleaflet/package.json index 4fbb38854..359be6731 100644 --- a/loleaflet/package.json +++ b/loleaflet/package.json @@ -10,7 +10,6 @@ "d3": "3.5.17", "eslint": "3.0.0", "exorcist": "0.4.0", - "jake": "~8.0.10", "jquery": "2.2.4", "jquery-contextmenu": "2.2.3", "jquery-ui": "1.10.5", @@ -27,14 +26,6 @@ "uglifyify": "3.0.2", "vex-js": "2.3.2" }, - "browser": { - "loleaflet": "./dist/leaflet-src.js" - }, - "main": "main.js", - "style": "main.css", - "scripts": { - "test": "jake test" - }, "repository": { "type": "git", "url": "git://gerrit.libreoffice.org/online.git" commit 8e2d0d2f5e427d137a5f652928ac381a38e9c6a7 Author: Henry Castro <hcas...@collabora.com> Date: Sun May 27 00:26:59 2018 -0400 loleaflet: remove unused build code Change-Id: I43dc41ba73ed9aac20f427cb5ff81d971849f547 (cherry picked from commit 8002a4cb9b17df9578412d1eb1967164b81c8a63) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js index 9e4082269..c2cad9a05 100644 --- a/loleaflet/build/build.js +++ b/loleaflet/build/build.js @@ -1,52 +1,4 @@ -var fs = require('fs'), - UglifyJS = require('uglify-js'), - zlib = require('zlib'), - browserify = require('browserify'), - browserifyCss = require('browserify-css'), - exorcist = require('exorcist'), - builddir = process.env.builddir ? process.env.builddir + '/' : '', - deps = require('./deps.js').deps, - adminDeps = require('./adminDeps.js').adminDeps; - -// TODO: Don't hardcode leaflet-draw version here -var JSBundleFiles = [ - 'main.js', - 'dist/leaflet-src.js', - 'dist/errormessages.js', - 'unocommands.js', - 'dist/plugins/draw-0.2.4/dist/leaflet.draw.js' -]; - -var CSSBundleFiles = [ - 'main.css', - 'dist/leaflet.css', - 'dist/selectionMarkers.css', - 'dist/loleaflet.css', - 'dist/toolbar.css', - 'dist/partsPreviewControl.css', - 'dist/scrollBar.css', - 'dist/searchControl.css', - 'dist/spreadsheet.css', - 'dist/menubar.css', - 'plugins/draw-0.2.4/dist/leaflet.draw.css', -]; - -var adminBundleFiles = [ - 'main-admin.js', - builddir + 'dist/admin-src.js', - 'admin/bootstrap/ie10-viewport-bug-workaround.css', - 'admin.strings.js', - 'admin/bootstrap/holder.min.js', - 'admin/bootstrap/ie10-viewport-bug-workaround.js' -]; - -exports.getBundleFiles = function() { - return JSBundleFiles.concat(CSSBundleFiles); -}; - -exports.getAdminBundleFiles = function() { - return adminBundleFiles; -}; +var deps = require('./deps.js').deps; function getFiles(compsBase32) { var memo = {}, @@ -87,164 +39,7 @@ function getFiles(compsBase32) { return files; } -function getAdminFiles() { - var files = []; - - for (var i in adminDeps) { - for (var j = 0, len = adminDeps[i].src.length; j < len; j++) { - files.push('src/' + adminDeps[i].src[j]); - } - } - - return files; -} - exports.getFiles = getFiles; -exports.getAdminFiles = getAdminFiles; - -function getSizeDelta(newContent, oldContent, fixCRLF) { - if (!oldContent) { - return ' (new)'; - } - if (newContent === oldContent) { - return ' (unchanged)'; - } - if (fixCRLF) { - newContent = newContent.replace(/\r\n?/g, '\n'); - oldContent = oldContent.replace(/\r\n?/g, '\n'); - } - var delta = newContent.length - oldContent.length; - - return delta === 0 ? '' : ' (' + (delta > 0 ? '+' : '') + delta + ' bytes)'; -} - -function loadSilently(path) { - try { - return fs.readFileSync(path, 'utf8'); - } catch (e) { - return null; - } -} - -function combineFiles(files) { - var content = ''; - for (var i = 0, len = files.length; i < len; i++) { - content += fs.readFileSync(files[i], 'utf8') + '\n\n'; - } - return content; -} - -function bytesToKB(bytes) { - return (bytes / 1024).toFixed(2) + ' KB'; -} - -function bundle(files, destFilename, debug, minify, callback) { - var node_paths = builddir !== '' ? [builddir + 'node_modules', builddir + 'dist'] : - [process.cwd() +'/node_modules', process.cwd() + '/dist'] - var bundler = browserify(files, {debug: debug, paths:node_paths}); - bundler = bundler.transform(browserifyCss, {global:true}); - if (minify) { - console.log('uglifying'); - bundler.transform({ - global: true - }, 'uglifyify'); - } - var bundleFs = fs.createWriteStream(builddir + 'dist/' + destFilename); - var res = bundler.bundle(); - if (debug) { - res = res.pipe(exorcist(builddir + 'dist/' + destFilename + '.map')); - } - res.pipe(bundleFs); - - bundleFs.on('finish', function() { - console.log('Finish writing to dist/' + destFilename); - callback(); - }); -}; - -exports.bundle = function(debug, minify, callback) { - bundle(['main.js'], 'bundle.js', debug, minify, callback); -}; - -exports.bundleAdmin = function(debug, minify, callback) { - bundle(['main-admin.js'], 'admin-bundle.js', debug, minify, callback); -}; - -exports.build = function (callback, version, compsBase32, buildName) { - - var files = getFiles(compsBase32); - - console.log('Concatenating and compressing ' + files.length + ' files...'); - - var copy = fs.readFileSync('src/copyright.js', 'utf8').replace('{VERSION}', version), - intro = '(function (window, document, undefined) {', - outro = '}(window, document));', - newSrc = copy + intro + combineFiles(files) + outro, - - pathPart = 'dist/leaflet' + (buildName ? '-' + buildName : ''), - srcPath = pathPart + '-src.js', - - oldSrc = loadSilently(srcPath), - srcDelta = getSizeDelta(newSrc, oldSrc, true); - - console.log('\tUncompressed: ' + bytesToKB(newSrc.length) + srcDelta); - - if (newSrc !== oldSrc) { - fs.writeFileSync(srcPath, newSrc); - console.log('\tSaved to ' + srcPath); - } - - var path = pathPart + '.js', - oldCompressed = loadSilently(path), - newCompressed = copy + UglifyJS.minify(newSrc, { - warnings: true, - fromString: true - }).code, - delta = getSizeDelta(newCompressed, oldCompressed); - - console.log('\tCompressed: ' + bytesToKB(newCompressed.length) + delta); - - var newGzipped, - gzippedDelta = ''; - - function done() { - if (newCompressed !== oldCompressed) { - fs.writeFileSync(path, newCompressed); - console.log('\tSaved to ' + path); - } - console.log('\tGzipped: ' + bytesToKB(newGzipped.length) + gzippedDelta); - callback(); - } - - zlib.gzip(newCompressed, function (err, gzipped) { - if (err) { return; } - newGzipped = gzipped; - if (oldCompressed && (oldCompressed !== newCompressed)) { - zlib.gzip(oldCompressed, function (err, oldGzipped) { - if (err) { return; } - gzippedDelta = getSizeDelta(gzipped, oldGzipped); - done(); - }); - } else { - done(); - } - }); -}; - -exports.buildadmin = function(callback) { - // TODO: Also minify if admin complexity increases in future - var adminNewSrc = combineFiles(getAdminFiles()), - adminPath = builddir + 'dist/admin-src.js', - adminOldSrc = loadSilently(adminPath), - adminSrcDelta = getSizeDelta(adminNewSrc, adminOldSrc, true); - - if (adminSrcDelta !== ' (unchanged)') { - fs.writeFileSync(adminPath, adminNewSrc); - console.log('\tAdmin files saved to ' + adminPath); - } - - callback(); -}; exports.test = function(complete, fail) { var karma = require('karma'), diff --git a/loleaflet/plugins/draw-0.2.4/build/build.js b/loleaflet/plugins/draw-0.2.4/build/build.js index e72dcca1a..8a6b2f005 100644 --- a/loleaflet/plugins/draw-0.2.4/build/build.js +++ b/loleaflet/plugins/draw-0.2.4/build/build.js @@ -1,8 +1,4 @@ -var fs = require('fs'), - UglifyJS = require('uglify-js'), - zlib = require('zlib'), - builddir = process.env.builddir ? process.env.builddir + '/' : '', - deps = require('./deps.js').deps; +var deps = require('./deps.js').deps; function getFiles(compsBase32) { var memo = {}, @@ -45,104 +41,6 @@ function getFiles(compsBase32) { exports.getFiles = getFiles; -function getSizeDelta(newContent, oldContent, fixCRLF) { - if (!oldContent) { - return ' (new)'; - } - if (newContent === oldContent) { - return ' (unchanged)'; - } - if (fixCRLF) { - newContent = newContent.replace(/\r\n?/g, '\n'); - oldContent = oldContent.replace(/\r\n?/g, '\n'); - } - var delta = newContent.length - oldContent.length; - - return delta === 0 ? '' : ' (' + (delta > 0 ? '+' : '') + delta + ' bytes)'; -} - -function loadSilently(path) { - try { - return fs.readFileSync(path, 'utf8'); - } catch (e) { - return null; - } -} - -function combineFiles(files) { - var content = ''; - for (var i = 0, len = files.length; i < len; i++) { - content += fs.readFileSync(files[i], 'utf8') + '\n\n'; - } - return content; -} - -function bytesToKB(bytes) { - return (bytes / 1024).toFixed(2) + ' KB'; -} - -exports.build = function (callback, compsBase32, buildName) { - var files = getFiles(compsBase32); - - console.log('Concatenating and compressing ' + files.length + ' files...'); - - var copy = fs.readFileSync('src/copyright.js', 'utf8'), - intro = '(function (window, document, undefined) {', - outro = '}(window, document));', - newSrc = copy + intro + combineFiles(files) + outro, - - pathPart = builddir + 'dist/leaflet.draw' + (buildName ? '-' + buildName : ''), - srcPath = pathPart + '-src.js', - - oldSrc = loadSilently(srcPath), - srcDelta = getSizeDelta(newSrc, oldSrc, true); - - console.log('\tUncompressed: ' + bytesToKB(newSrc.length) + srcDelta); - - if (srcDelta === ' (unchanged)') { - return; - } - - fs.writeFileSync(srcPath, newSrc); - console.log('\tSaved to ' + srcPath); - - var path = pathPart + '.js', - oldCompressed = loadSilently(path), - newCompressed = copy + UglifyJS.minify(newSrc, { - warnings: true, - fromString: true - }).code, - delta = getSizeDelta(newCompressed, oldCompressed); - - console.log('\tCompressed: ' + bytesToKB(newCompressed.length) + delta); - - var newGzipped, - gzippedDelta = ''; - - function done() { - if (newCompressed !== oldCompressed) { - fs.writeFileSync(path, newCompressed); - console.log('\tSaved to ' + path); - } - console.log('\tGzipped: ' + bytesToKB(newGzipped.length) + gzippedDelta); - callback(); - } - - zlib.gzip(newCompressed, function (err, gzipped) { - if (err) { return; } - newGzipped = gzipped; - if (oldCompressed && (oldCompressed !== newCompressed)) { - zlib.gzip(oldCompressed, function (err, oldGzipped) { - if (err) { return; } - gzippedDelta = getSizeDelta(gzipped, oldGzipped); - done(); - }); - } else { - done(); - } - }); -}; - exports.test = function(callback) { var karma = require('karma'), testConfig = {configFile : __dirname + '/../spec/karma.conf.js'}; commit 61bcae33cb3e34a32e9e38a24a2d14909c7a6c9e Author: Henry Castro <hcas...@collabora.com> Date: Sun May 27 00:20:29 2018 -0400 loleaflet: use the recursive Makefile to avoid parallel node_modules target Change-Id: I1bc7d8bc4b228d104196dbd2355576bcd94c913d (cherry picked from commit 7d03ebcf5581f38f9b78a1b6e14ab2529c874591) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index ff47889c5..e0a0d9d8b 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -110,7 +110,9 @@ LOLEAFLET_PREFIX := $(if $(ENABLE_DEBUG),$(abs_builddir),$(abs_builddir)/build) EXTRA_DIST = $(shell find . -type f -not -path './.git/*' | sed 's/.\///') -all-local: node_modules +all-local: + @$(MAKE) node_modules + @$(MAKE) build-loleaflet build-loleaflet: | $(LOLEAFLET_L10N_DST) \ $(L10N_JSON) \ @@ -195,7 +197,6 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/loleaflet.html.m4 $(LOLEAFLET_HTML_DS node_modules: npm-shrinkwrap.json @npm install @touch node_modules - @$(MAKE) build-loleaflet $(builddir)/dist/plugins/%.js: $(srcdir)/plugins/%.js @mkdir -p $(dir $@) commit a1c0fe6597e6dd8f8967fc5d585a905a1fa5c83a Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 23:57:26 2018 -0400 loleaflet: fixed js lint errors in admin/src/Base.js Change-Id: I7d2ae94d75fe68d0973dac940a5837b9c8b93eba (cherry picked from commit fab4cbb5e9de3ee99654d21503c6b2ec064c41de) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/.eslintignore b/loleaflet/.eslintignore index 2da73fac2..bb6daf5b5 100644 --- a/loleaflet/.eslintignore +++ b/loleaflet/.eslintignore @@ -1,5 +1,3 @@ # We only directly edit toolbar.js in dist/ **/js/w2ui-1.5.rc1.js - -**/src/admin/Base.js **/src/unocommands.js diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 67fea24c8..ff47889c5 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -129,7 +129,7 @@ $(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) \ $(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL) @echo "Checking for admin JS errors..." -# @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc + @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin/src --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call LOLEAFLET_JS,$(srcdir)/admin/build/build.js)) > $@ if ENABLE_DEBUG diff --git a/loleaflet/admin/src/Base.js b/loleaflet/admin/src/Base.js index 837539930..6136f0016 100644 --- a/loleaflet/admin/src/Base.js +++ b/loleaflet/admin/src/Base.js @@ -15,9 +15,9 @@ Base.extend = function(_instance, _static) { // subclass Base._prototyping = true; var proto = new this; extend.call(proto, _instance); - proto.base = function() { - // call this method from any other method to invoke that method's ancestor - }; + proto.base = function() { + // call this method from any other method to invoke that method's ancestor + }; delete Base._prototyping; // create the wrapper for the constructor function @@ -44,11 +44,11 @@ Base.extend = function(_instance, _static) { // subclass klass.toString = this.toString; klass.valueOf = function(type) { //return (type == "object") ? klass : constructor; //-dean - return (type == "object") ? klass : constructor.valueOf(); + return (type == 'object') ? klass : constructor.valueOf(); }; extend.call(klass, _static); // class initialisation - if (typeof klass.init == "function") klass.init(); + if (typeof klass.init == 'function') klass.init(); return klass; }; @@ -56,7 +56,7 @@ Base.prototype = { extend: function(source, value) { if (arguments.length > 1) { // extending with a name/value pair var ancestor = this[source]; - if (ancestor && (typeof value == "function") && // overriding a method? + if (ancestor && (typeof value == 'function') && // overriding a method? // the valueOf() comparison is to avoid circular references (!ancestor.valueOf || ancestor.valueOf() != value.valueOf()) && /\bbase\b/.test(value)) { @@ -72,7 +72,7 @@ Base.prototype = { }; // point to the underlying method value.valueOf = function(type) { - return (type == "object") ? value : method; + return (type == 'object') ? value : method; }; value.toString = Base.toString; } @@ -80,15 +80,15 @@ Base.prototype = { } else if (source) { // extending with an object literal var extend = Base.prototype.extend; // if this object has a customised extend method then use it - if (!Base._prototyping && typeof this != "function") { + if (!Base._prototyping && typeof this != 'function') { extend = this.extend || extend; } var proto = {toSource: null}; // do the "toString" and other methods manually - var hidden = ["constructor", "toString", "valueOf"]; + var hidden = ['constructor', 'toString', 'valueOf']; // if we are prototyping then include the constructor var i = Base._prototyping ? 0 : 1; - while (key = hidden[i++]) { + while ((key = hidden[i++])) { if (source[key] != proto[key]) { extend.call(this, key, source[key]); @@ -110,7 +110,7 @@ Base = Base.extend({ } }, { ancestor: Object, - version: "1.1", + version: '1.1', forEach: function(object, block, context) { for (var key in object) { @@ -122,7 +122,7 @@ Base = Base.extend({ implement: function() { for (var i = 0; i < arguments.length; i++) { - if (typeof arguments[i] == "function") { + if (typeof arguments[i] == 'function') { // if it's a function, call it arguments[i](this.prototype); } else { commit d5c1c9b82383fc7b773f1917c23d070416fb7f07 Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 23:24:34 2018 -0400 loleaflet: isolate the admin build process Change-Id: Ib48ef2b0e6c778a65be949da1eb164cf5f87692d (cherry picked from commit 3571919a50ac91aa0fa0bb257be2cbd8be55f647) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index ad6629b52..67fea24c8 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -93,7 +93,6 @@ GLOBAL_JS =\ global.js LOLEAFLET_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}")) -ADMIN_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getAdminFiles().join(' '))} catch(e) {}")) PLUGINS_JS =\ w2ui-1.5.rc1.js \ @@ -130,8 +129,8 @@ $(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) \ $(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL) @echo "Checking for admin JS errors..." - @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc - @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call ADMIN_JS,$(srcdir)/build/build.js)) > $@ +# @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc + @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call LOLEAFLET_JS,$(srcdir)/admin/build/build.js)) > $@ if ENABLE_DEBUG $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST) $(LOLEAFLET_DRAW_JS_DST) @@ -250,12 +249,12 @@ pot: admin/admin.strings.js \ src/errormessages.js \ js/toolbar.js \ - src/admin/AdminSocketAnalytics.js \ - src/admin/AdminSocketBase.js \ - src/admin/AdminSocketOverview.js \ - src/admin/AdminSocketHistory.js \ - src/admin/AdminSocketSettings.js \ - src/admin/Util.js \ + admin/src/AdminSocketAnalytics.js \ + admin/src/AdminSocketBase.js \ + admin/src/AdminSocketOverview.js \ + admin/src/AdminSocketHistory.js \ + admin/src/AdminSocketSettings.js \ + admin/src/Util.js \ src/control/Control.AlertDialog.js \ src/control/Control.ColumnHeader.js \ src/control/Control.ContextMenu.js \ diff --git a/loleaflet/admin/build/build.js b/loleaflet/admin/build/build.js new file mode 100644 index 000000000..b90ad16fd --- /dev/null +++ b/loleaflet/admin/build/build.js @@ -0,0 +1,13 @@ +var deps = require('./deps.js').deps; + +exports.getFiles = function () { + var files = []; + + for (var i in deps) { + for (var j = 0, len = deps[i].src.length; j < len; j++) { + files.push('admin/' + deps[i].src[j]); + } + } + + return files; +}; diff --git a/loleaflet/build/adminDeps.js b/loleaflet/admin/build/deps.js similarity index 63% rename from loleaflet/build/adminDeps.js rename to loleaflet/admin/build/deps.js index f6efdad92..21356fe6c 100644 --- a/loleaflet/build/adminDeps.js +++ b/loleaflet/admin/build/deps.js @@ -1,42 +1,42 @@ -var adminDeps = { +var deps = { AdminCore: { - src: ['admin/Base.js', - 'admin/Admin.js', - 'admin/AdminSocketBase.js'], + src: ['src/Base.js', + 'src/Admin.js', + 'src/AdminSocketBase.js'], desc: 'Core admin scripts infrastructure' }, Util: { - src: ['admin/Util.js'], + src: ['src/Util.js'], desc: 'Utility class', deps: ['AdminCore'] }, AdminSocketOverview: { - src: ['admin/AdminSocketOverview.js'], + src: ['src/AdminSocketOverview.js'], desc: 'Socket to handle messages in overview page.', deps: ['AdminCore'] }, AdminSocketAnalytics: { - src: ['admin/AdminSocketAnalytics.js'], + src: ['src/AdminSocketAnalytics.js'], desc: 'Socket to handle messages in analytics page.', deps: ['AdminCore'] }, AdminSocketSettings: { - src: ['admin/AdminSocketSettings.js'], + src: ['src/AdminSocketSettings.js'], desc: 'Socket to handle settings from server', deps: ['AdminCore'] }, AdminSocketHistory: { - src: ['admin/AdminSocketHistory.js'], + src: ['src/AdminSocketHistory.js'], desc: 'Socket to query document history.', deps: ['AdminCore'] } }; if (typeof exports !== 'undefined') { - exports.adminDeps = adminDeps; + exports.deps = deps; } diff --git a/loleaflet/src/admin/Admin.js b/loleaflet/admin/src/Admin.js similarity index 100% rename from loleaflet/src/admin/Admin.js rename to loleaflet/admin/src/Admin.js diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js b/loleaflet/admin/src/AdminSocketAnalytics.js similarity index 100% rename from loleaflet/src/admin/AdminSocketAnalytics.js rename to loleaflet/admin/src/AdminSocketAnalytics.js diff --git a/loleaflet/src/admin/AdminSocketBase.js b/loleaflet/admin/src/AdminSocketBase.js similarity index 100% rename from loleaflet/src/admin/AdminSocketBase.js rename to loleaflet/admin/src/AdminSocketBase.js diff --git a/loleaflet/src/admin/AdminSocketHistory.js b/loleaflet/admin/src/AdminSocketHistory.js similarity index 100% rename from loleaflet/src/admin/AdminSocketHistory.js rename to loleaflet/admin/src/AdminSocketHistory.js diff --git a/loleaflet/src/admin/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js similarity index 100% rename from loleaflet/src/admin/AdminSocketOverview.js rename to loleaflet/admin/src/AdminSocketOverview.js diff --git a/loleaflet/src/admin/AdminSocketSettings.js b/loleaflet/admin/src/AdminSocketSettings.js similarity index 100% rename from loleaflet/src/admin/AdminSocketSettings.js rename to loleaflet/admin/src/AdminSocketSettings.js diff --git a/loleaflet/src/admin/Base.js b/loleaflet/admin/src/Base.js similarity index 100% rename from loleaflet/src/admin/Base.js rename to loleaflet/admin/src/Base.js diff --git a/loleaflet/src/admin/Util.js b/loleaflet/admin/src/Util.js similarity index 100% rename from loleaflet/src/admin/Util.js rename to loleaflet/admin/src/Util.js commit 98dd66e1e46ca2dd5d5010c07441f22f6be5af0d Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 22:02:33 2018 -0400 loleaflet: remove unused Jakefiles Change-Id: I530d625ab1dddbdc6bddd875c79f9b32d09541ea (cherry picked from commit 5c3ba5617ec24610119193a28faa1ed64d92277c) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Jakefile.js b/loleaflet/Jakefile.js deleted file mode 100644 index a0a230567..000000000 --- a/loleaflet/Jakefile.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -Leaflet building, testing and linting scripts. - -To use, install Node, then run the following commands in the project root: - - npm install -g jake - npm install - -To check the code for errors and build Leaflet from source, run "jake". -To run the tests, run "jake test". - -For a custom build, open build/build.html in the browser and follow the instructions. -*/ - -var build = require('./build/build.js'), - builddir = process.env.builddir ? process.env.builddir + '/' : '', - version = require('./src/Leaflet.js').version; - -function hint(msg, args) { - return function () { - console.log(msg); - jake.exec('node ' + builddir + 'node_modules/eslint/bin/eslint.js ' + args, - {printStdout: true}, function () { - console.log('\tCheck passed.\n'); - complete(); - }); - }; -} - -desc('Check Leaflet source for errors with ESLint'); -task('lint', {async: true}, hint('Checking for JS errors...', 'src dist --config .eslintrc')); - -desc('Check admin source for errors with ESLint'); -task('lintadmin', {async: true}, hint('Checking for admin JS errors...', 'src/admin --config .eslintrc')); - -desc('Check Leaflet specs source for errors with ESLint'); -task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites --config spec/.eslintrc')); - -desc('Create a combined leaflet file'); -file('dist/leaflet-src.js', build.getFiles(), {async: true}, function() { - var lint = jake.Task['lint']; - lint.addListener('complete', function(value) { - var v; - jake.exec('git log -1 --pretty=format:"%h"', {breakOnError: false}, function () { - console.log('Building leaflet-src.js ...'); - build.build(complete, v); - }).on('stdout', function (data) { - v = version + ' (' + data.toString() + ')'; - }).on('error', function () { - v = version; - }); - }); - lint.invoke(); -}); - -desc('Create a combined admin file'); -file(builddir +'dist/admin-src.js', build.getAdminFiles(), {async: true}, function() { - var lint = jake.Task['lintadmin']; - lint.addListener('complete', function(value) { - console.log('Building admin-src.js ...'); - build.buildadmin(complete); - }); - lint.invoke(); -}); - -desc('Create final bundled js file to be used by main lool editor'); -file('dist/bundle.js', build.getBundleFiles(), {async: true}, function() { - var debug = process.env.debug === 'true'; - var minify = process.env.minify === 'true'; - - console.log('Creating bundle.js (debug=' + debug +', minify=' + minify + ') ...'); - build.bundle(debug, minify, complete); -}); - -desc('Create final bundle js file to be used by admin console'); -file(builddir + 'dist/admin-bundle.js', build.getAdminBundleFiles(), {async: true}, function() { - var debug = process.env.debug === 'true'; - var minify = process.env.minify === 'true'; - - console.log('Creating admin-bundle.js (debug=' + debug +', minify=' + minify + ') ...'); - build.bundleAdmin(debug, minify, complete); -}); - -desc('Create final bundled JS files'); -task('build', {async: true}, function () { - // TODO: Build both admin-bundle and bundle parallely - var bundlejs = jake.Task['dist/bundle.js']; - bundlejs.addListener('complete', function(value) { - console.log('Finished building loleaflet'); - complete(); - }); - - var adminbundlejs = jake.Task['dist/admin-bundle.js']; - adminbundlejs.addListener('complete', function(value) { - console.log('Finished building admin'); - bundlejs.invoke(); - }); - - adminbundlejs.invoke(); -}); - -desc('Run PhantomJS tests'); -task('test', ['lint', 'lintspec'], {async: true}, function () { - build.test(complete); -}); - -task('default', ['test', 'build']); - -jake.addListener('complete', function () { - process.exit(); -}); diff --git a/loleaflet/plugins/draw-0.2.4/Jakefile.js b/loleaflet/plugins/draw-0.2.4/Jakefile.js deleted file mode 100644 index 596372db8..000000000 --- a/loleaflet/plugins/draw-0.2.4/Jakefile.js +++ /dev/null @@ -1,48 +0,0 @@ -/* -Leaflet.draw building and linting scripts. - -To use, install Node, then run the following commands in the project root: - - npm install -g jake - npm install - -To check the code for errors and build Leaflet from source, run "jake". -To run the tests, run "jake test". - -For a custom build, open build/build.html in the browser and follow the instructions. -*/ - -var build = require('./build/build.js'); - -function hint(msg, args) { - return function () { - console.log(msg); - jake.exec('node ../../node_modules/eslint/bin/eslint.js ' + args, - {printStdout: true}, function () { - console.log('\tCheck passed.\n'); - complete(); - }); - }; -} - -desc('Check Leaflet source for errors with ESLint'); -task('lint', {async: true}, hint('Checking for JS errors...', 'src --config .eslintrc')); - -desc('Check Leaflet specs source for errors with ESLint'); -task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites --config spec/.eslintrc')); - -desc('Combine and compress Leaflet.draw source files'); -task('build', {async: true}, function () { - build.build(complete); -}); - -desc('Run PhantomJS tests'); -task('test', ['lint', 'lintspec'], {async: true}, function () { - build.test(complete); -}); - -task('default', ['test', 'build']); - -jake.addListener('complete', function () { - process.exit(); -}); commit aecdb3817f1b0aed73df311bf1968af6fa5d58d6 Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 16:57:40 2018 -0400 loleaflet: add rule to bundle admin files Change-Id: Id3d25855d697ad607ae30ffffa1a9c6f565b6e6d (cherry picked from commit 42b46bbaa34a87700e173f82663e79714a58333c) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index f595747b1..ad6629b52 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -6,8 +6,6 @@ # Version number of the bundled 'draw' thing DRAW_VERSION=0.2.4 -MINIFY=false - L10N_PO = $(wildcard $(srcdir)/po/*.po) L10N_JSON = $(patsubst $(srcdir)/po/%.po,$(builddir)/dist/l10n/%.json,$(L10N_PO)) @@ -30,6 +28,7 @@ LOLEAFLET_HTML_SRC = $(shell find $(srcdir)/html -name '*.html') LOLEAFLET_HTML_DST = $(patsubst $(srcdir)/html/%.html,$(builddir)/dist/%.html,$(LOLEAFLET_HTML_SRC)) LOLEAFLET_ADMIN_SRC = $(shell find $(srcdir)/admin -name '*.html') +LOLEAFLET_ADMIN_ALL = $(shell find $(srcdir)/admin -name '*') LOLEAFLET_ADMIN_DST = $(patsubst $(srcdir)/admin/%,$(builddir)/dist/admin/%,$(LOLEAFLET_ADMIN_SRC)) define file_target @@ -94,6 +93,7 @@ GLOBAL_JS =\ global.js LOLEAFLET_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}")) +ADMIN_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getAdminFiles().join(' '))} catch(e) {}")) PLUGINS_JS =\ w2ui-1.5.rc1.js \ @@ -124,8 +124,14 @@ build-loleaflet: | $(LOLEAFLET_L10N_DST) \ $(builddir)/dist/loleaflet.html @echo "build loleaflet completed" -$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) - @NODE_PATH=$(abs_builddir)/node_modules jake -f $(srcdir)/Jakefile.js -C $(srcdir) $(abs_builddir)/dist/admin-bundle.js debug=$(ENABLE_DEBUG) minify=$(MINIFY) builddir=$(abs_builddir) +$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) \ + $(LOLEAFLET_PREFIX)/dist/admin-src.js + @NODE_PATH=$(abs_builddir)/node_modules:$(LOLEAFLET_PREFIX)/dist $(NODE) node_modules/browserify/bin/cmd.js -g browserify-css $(if $(ENABLE_DEBUG),--debug,-g uglifyify) -o $@ $(srcdir)/admin/main-admin.js + +$(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL) + @echo "Checking for admin JS errors..." + @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc + @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call ADMIN_JS,$(srcdir)/build/build.js)) > $@ if ENABLE_DEBUG $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST) $(LOLEAFLET_DRAW_JS_DST) @@ -146,9 +152,8 @@ $(builddir)/dist/bundle.js: $(NODE_MODULES_JS_DST) \ else $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_SRC) @mkdir -p $(dir $@) - @echo "Checking loleaflet for JS errors..." + @echo "Checking for loleaflet JS errors..." @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src $(srcdir)/plugins/draw-$(DRAW_VERSION)/src $(srcdir)/js --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc - @echo "Concatenating loleaflet files..." @(cat $(srcdir)/src/copyright.js | sed 's/{VERSION}/$(LOLEAFLET_VERSION)/' - \ && echo "(function (window, document, undefined) {" \ && awk 'FNR == 1 {print ""} 1' \ @@ -242,7 +247,7 @@ install-data-hook: pot: xgettext --from-code=UTF-8 --keyword=_ --output=po/templates/loleaflet-ui.pot \ - admin.strings.js \ + admin/admin.strings.js \ src/errormessages.js \ js/toolbar.js \ src/admin/AdminSocketAnalytics.js \ diff --git a/loleaflet/admin.strings.js b/loleaflet/admin/admin.strings.js similarity index 100% rename from loleaflet/admin.strings.js rename to loleaflet/admin/admin.strings.js diff --git a/loleaflet/main-admin.js b/loleaflet/admin/main-admin.js similarity index 74% rename from loleaflet/main-admin.js rename to loleaflet/admin/main-admin.js index 928f3ce94..984a8ab95 100644 --- a/loleaflet/main-admin.js +++ b/loleaflet/admin/main-admin.js @@ -1,7 +1,7 @@ // CSS requires require('bootstrap/dist/css/bootstrap.css'); -require('./admin/bootstrap/ie10-viewport-bug-workaround.css'); -require('./admin/bootstrap/dashboard.css'); +require('./bootstrap/ie10-viewport-bug-workaround.css'); +require('./bootstrap/dashboard.css'); require('vex-js/css/vex.css'); require('vex-js/css/vex-theme-plain.css'); @@ -24,6 +24,6 @@ global.l10nstrings = require('./admin.strings.js'); global.d3 = require('d3'); require('bootstrap/dist/js/bootstrap.js'); -require('./admin/bootstrap/holder.min.js'); -require('./admin/bootstrap/ie10-viewport-bug-workaround.js'); +require('./bootstrap/holder.min.js'); +require('./bootstrap/ie10-viewport-bug-workaround.js'); global.Admin = require('admin-src.js'); commit e9400951139740164de13564bee6b71118261a1a Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 10:54:52 2018 -0400 loleaflet: move some images from draw plugin Change-Id: If53aea32c745e62493d87ae129a7da2bdc242deb (cherry picked from commit d3a3dc7d13313d3d52722397bc812187f708c66d) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index a00568555..f595747b1 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -131,7 +131,6 @@ if ENABLE_DEBUG $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST) $(LOLEAFLET_DRAW_JS_DST) @echo "Checking loleaflet for JS errors..." @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src $(srcdir)/plugins/draw-$(DRAW_VERSION)/src $(srcdir)/js --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc - @cp -a $(srcdir)/plugins/draw-$(DRAW_VERSION)/dist/images/* $(builddir)/dist/images/ @touch $@ $(builddir)/dist/bundle.css: $(LOLEAFLET_CSS_DST) diff --git a/loleaflet/images/spritesheet-2x.png b/loleaflet/images/spritesheet-2x.png new file mode 100644 index 000000000..1525c9f69 Binary files /dev/null and b/loleaflet/images/spritesheet-2x.png differ diff --git a/loleaflet/images/spritesheet.png b/loleaflet/images/spritesheet.png new file mode 100644 index 000000000..f7035a1cb Binary files /dev/null and b/loleaflet/images/spritesheet.png differ commit 2b3af8e887689adaf350fc4f10c9e91a28916024 Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 10:39:20 2018 -0400 loleaflet: ensure set NODE_PATH environment variable Change-Id: If0a632c258f740112352e9ad6a4f250bf2e2c9d8 (cherry picked from commit 1ad2e5bd652397b34d797c8ed1c3370885b3a04b) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index bb18427cd..a00568555 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -159,7 +159,7 @@ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_SRC) $(builddir)/dist/bundle.css: $(LOLEAFLET_CSS) @echo "Uglify loleaflet css files..." - @$(NODE) node_modules/uglifycss/uglifycss $(LOLEAFLET_CSS) > $@ + @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/uglifycss/uglifycss $(LOLEAFLET_CSS) > $@ $(builddir)/dist/bundle.js: $(NODE_MODULES_JS_SRC) \ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \ @@ -168,7 +168,7 @@ $(builddir)/dist/bundle.js: $(NODE_MODULES_JS_SRC) \ $(srcdir)/js/toolbar.js \ $(srcdir)/js/main.js @echo "Uglify loleaflet js files..." - @$(NODE) node_modules/uglify-js/bin/uglifyjs \ + @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/uglify-js/bin/uglifyjs \ $(srcdir)/js/global.js \ $(NODE_MODULES_JS) \ $(srcdir)/js/w2ui-1.5.rc1.js \ commit 6f42545ca1211c7839757b930dfc17877f929cdf Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 10:26:47 2018 -0400 loleaflet: fix make -j N Change-Id: I994ff4b352c93ff910d93f5f176c4e7ced2dc21d (cherry picked from commit f838e0998e19b1b60e4efb845af5f0ac808a948e) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index dadc1b5a1..bb18427cd 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -111,8 +111,9 @@ LOLEAFLET_PREFIX := $(if $(ENABLE_DEBUG),$(abs_builddir),$(abs_builddir)/build) EXTRA_DIST = $(shell find . -type f -not -path './.git/*' | sed 's/.\///') -all-local: | node_modules \ - $(LOLEAFLET_L10N_DST) \ +all-local: node_modules + +build-loleaflet: | $(LOLEAFLET_L10N_DST) \ $(L10N_JSON) \ $(LOLEAFLET_IMAGES_DST) \ $(JQUERY_UI_DIST_IMAGES) \ @@ -189,8 +190,9 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/loleaflet.html.m4 $(LOLEAFLET_HTML_DS $(srcdir)/loleaflet.html.m4 > $@ node_modules: npm-shrinkwrap.json - npm install - touch node_modules + @npm install + @touch node_modules + @$(MAKE) build-loleaflet $(builddir)/dist/plugins/%.js: $(srcdir)/plugins/%.js @mkdir -p $(dir $@) commit 2076be8c7d988dbe356b57b8ec048dee6de816d8 Author: Henry Castro <hcas...@collabora.com> Date: Sat May 26 10:15:15 2018 -0400 loleaflet: remove unused dir Change-Id: I0b706797b691bca773a96a0b551feda5c29c246a (cherry picked from commit 940f0228eda7ea75824f3d5d32bf6aab5d3319ee) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 78bccc835..dadc1b5a1 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -32,9 +32,6 @@ LOLEAFLET_HTML_DST = $(patsubst $(srcdir)/html/%.html,$(builddir)/dist/%.html,$( LOLEAFLET_ADMIN_SRC = $(shell find $(srcdir)/admin -name '*.html') LOLEAFLET_ADMIN_DST = $(patsubst $(srcdir)/admin/%,$(builddir)/dist/admin/%,$(LOLEAFLET_ADMIN_SRC)) -BOOTSTRAP_SRC = $(shell find $(srcdir)/bootstrap -name '*.*') -BOOTSTRAP_DST = $(patsubst $(srcdir)/bootstrap/%,$(builddir)/dist/bootstrap/%,$(BOOTSTRAP_SRC)) - define file_target $(1): $(2) @cp $$< $$@ @@ -126,7 +123,7 @@ all-local: | node_modules \ $(builddir)/dist/loleaflet.html @echo "build loleaflet completed" -$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) $(BOOTSTRAP_DST) +$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) @NODE_PATH=$(abs_builddir)/node_modules jake -f $(srcdir)/Jakefile.js -C $(srcdir) $(abs_builddir)/dist/admin-bundle.js debug=$(ENABLE_DEBUG) minify=$(MINIFY) builddir=$(abs_builddir) if ENABLE_DEBUG @@ -238,10 +235,6 @@ $(builddir)/dist/admin/%: $(srcdir)/admin/% @mkdir -p $(dir $@) @cp $< $@ -$(builddir)/dist/bootstrap/%: $(srcdir)/bootstrap/% - @mkdir -p $(dir $@) - @cp $< $@ - install-data-hook: mkdir -p $(DESTDIR)$(pkgdatadir)/loleaflet; \ cp -ar dist/ $(DESTDIR)$(pkgdatadir)/loleaflet/; diff --git a/loleaflet/bootstrap/LICENSE b/loleaflet/bootstrap/LICENSE deleted file mode 100644 index f4c52d6a4..000000000 --- a/loleaflet/bootstrap/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2011-2015 Twitter, Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/loleaflet/bootstrap/dashboard.css b/loleaflet/bootstrap/dashboard.css deleted file mode 100644 index 0535a2fd1..000000000 --- a/loleaflet/bootstrap/dashboard.css +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Base structure - */ - -/* Move down content because we have a fixed navbar that is 50px tall */ -body { - padding-top: 50px; -} - - -/* - * Global add-ons - */ - -.sub-header { - padding-bottom: 10px; - border-bottom: 1px solid #eee; -} - -/* - * Top navigation - * Hide default border to remove 1px line. - */ -.navbar-fixed-top { - border: 0; -} - -/* - * Sidebar - */ - -/* Hide for mobile, show later */ -.sidebar { - display: none; -} -@media (min-width: 768px) { - .sidebar { - position: fixed; - top: 51px; - bottom: 0; - left: 0; - z-index: 1000; - display: block; - padding: 20px; - overflow-x: hidden; - overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ - background-color: #f5f5f5; - border-right: 1px solid #eee; - } -} - -/* Sidebar navigation */ -.nav-sidebar { - margin-right: -21px; /* 20px padding + 1px border */ - margin-bottom: 20px; - margin-left: -20px; -} -.nav-sidebar > li > a { - padding-right: 20px; - padding-left: 20px; -} -.nav-sidebar > .active > a, -.nav-sidebar > .active > a:hover, -.nav-sidebar > .active > a:focus { - color: #fff; - background-color: #428bca; -} - - -/* - * Main content - */ - -.main { - padding: 20px; -} -@media (min-width: 768px) { - .main { - padding-right: 40px; - padding-left: 40px; - } -} -.main .page-header { - margin-top: 0; -} - - -/* - * Placeholder dashboard ideas - */ - -.placeholders { - margin-bottom: 30px; - text-align: center; -} -.placeholders h4 { - margin-bottom: 0; -} -.placeholder { - margin-bottom: 20px; -} -.placeholder .main-data { - display: inline-block; - border-radius: 50%; - font-size: 60px; -} - -/* - * Custom - */ - -#rowContextMenu { - position: absolute; - display: none; -} diff --git a/loleaflet/bootstrap/holder.min.js b/loleaflet/bootstrap/holder.min.js deleted file mode 100644 index 83e329db4..000000000 --- a/loleaflet/bootstrap/holder.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - -Holder - client side image placeholders -Version 2.6.0+51ebp -© 2015 Ivan Malopinsky - http://imsky.co - -Site: http://holderjs.com -Issues: https://github.com/imsky/holder/issues -License: http://opensource.org/licenses/MIT - -*/ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){function d(a,b,c,d){var g=e(c.substr(c.lastIndexOf(a.domain)),a);g&&f({mode:null,el:d,flags:g,engineSettings:b})}function e(a,b){for(var c={theme:y(K.settings.themes.gray,null),stylesheets:b.stylesheets,holderURL:[]},d=!1,e=String.fromCharCode(11),f=a.replace(/([^\\])\//g,"$1"+e).split(e),g=/%[0-9a-f]{2}/gi,h=f.length,i=0;h>i;i++){var j=f[i];if(j.match(g))try{j=decodeURIComponent(j)}catch(k){j=f[i]}var l=!1;if(K.flags.dimensions.match(j))d=!0,c.dimensions=K.flags.dimensions.output(j),l=!0;else if(K.flags.fluid.match(j))d=!0,c.dimensions=K.flags.fluid .output(j),c.fluid=!0,l=!0;else if(K.flags.textmode.match(j))c.textmode=K.flags.textmode.output(j),l=!0;else if(K.flags.colors.match(j)){var m=K.flags.colors.output(j);c.theme=y(c.theme,m),l=!0}else if(b.themes[j])b.themes.hasOwnProperty(j)&&(c.theme=y(b.themes[j],null)),l=!0;else if(K.flags.font.match(j))c.font=K.flags.font.output(j),l=!0;else if(K.flags.auto.match(j))c.auto=!0,l=!0;else if(K.flags.text.match(j))c.text=K.flags.text.output(j),l=!0;else if(K.flags.size.match(j))c.size=K.flags.size.output(j),l=!0;else if(K.flags.random.match(j)){null==K.vars.cache.themeKeys&&(K.vars.cache.themeKeys=Object.keys(b.themes));var n=K.vars.cache.themeKeys[0|Math.random()*K.vars.cache.themeKeys.length];c.theme=y(b.themes[n],null),l=!0}l&&c.holderURL.push(j)}return c.holderURL.unshift(b.domain),c.holderURL=c.holderURL.join("/"),d?c:!1}function f(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,h=d.theme,i=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.te xt&&(h.text=d.text,"object"===c.nodeName.toLowerCase())){for(var l=h.text.split("\\n"),m=0;m<l.length;m++)l[m]=A(l[m]);h.text=l.join("\\n")}var n=d.holderURL,o=y(e,null);if(d.font&&(h.font=d.font,!o.noFontFallback&&"img"===c.nodeName.toLowerCase()&&K.setup.supportsCanvas&&"svg"===o.renderer&&(o=y(o,{renderer:"canvas"}))),d.font&&"canvas"==o.renderer&&(o.reRender=!0),"background"==b)null==c.getAttribute("data-background-src")&&p(c,{"data-background-src":n});else{var q={};q[K.vars.dataAttr]=n,p(c,q)}d.theme=h,c.holderData={flags:d,engineSettings:o},("image"==b||"fluid"==b)&&p(c,{alt:h.text?h.text+" ["+i+"]":i});var r={mode:b,el:c,holderSettings:{dimensions:f,theme:h,flags:d},engineSettings:o};"image"==b?("html"!=o.renderer&&d.auto||(c.style.width=f.width+"px",c.style.height=f.height+"px"),"html"==o.renderer?c.style.backgroundColor=h.background:(g(r),"exact"==d.textmode&&(c.holderData.resizeUpdate=!0,K.vars.resizableImages.push(c),j(c)))):"background"==b&&"html"!=o.renderer?g(r):"fluid "==b&&(c.holderData.resizeUpdate=!0,"%"==f.height.slice(-1)?c.style.height=f.height:null!=d.auto&&d.auto||(c.style.height=f.height+"px"),"%"==f.width.slice(-1)?c.style.width=f.width:null!=d.auto&&d.auto||(c.style.width=f.width+"px"),("inline"==c.style.display||""===c.style.display||"none"==c.style.display)&&(c.style.display="block"),k(c),"html"==o.renderer?c.style.backgroundColor=h.background:(K.vars.resizableImages.push(c),j(c)))}function g(a){function c(){var b=null;switch(i.renderer){case"canvas":b=M(k,a);break;case"svg":b=N(k,a);break;default:throw"Holder: invalid renderer: "+i.renderer}return b}var d=null,e=a.mode,f=a.holderSettings,g=a.el,i=a.engineSettings;switch(i.renderer){case"svg":if(!K.setup.supportsSVG)return;break;case"canvas":if(!K.setup.supportsCanvas)return;break;default:return}var j={width:f.dimensions.width,height:f.dimensions.height,theme:f.theme,flags:f.flags},k=h(j);if(d=c(),null==d)throw"Holder: couldn't render placeholder";"background"==e?(g.style.backgroundI mage="url("+d+")",g.style.backgroundSize=j.width+"px "+j.height+"px"):("img"===g.nodeName.toLowerCase()?p(g,{src:d}):"object"===g.nodeName.toLowerCase()&&(p(g,{data:d}),p(g,{type:"image/svg+xml"})),i.reRender&&b.setTimeout(function(){var a=c();if(null==a)throw"Holder: couldn't render placeholder";"img"===g.nodeName.toLowerCase()?p(g,{src:a}):"object"===g.nodeName.toLowerCase()&&(p(g,{data:a}),p(g,{type:"image/svg+xml"}))},100)),p(g,{"data-holder-rendered":!0})}function h(a){function b(a,b,c,d){b.width=c,b.height=d,a.width=Math.max(a.width,b.width),a.height+=b.height,a.add(b)}var c=K.defaults.size;switch(parseFloat(a.theme.size)?c=a.theme.size:parseFloat(a.flags.size)&&(c=a.flags.size),a.font={family:a.theme.font?a.theme.font:"Arial, Helvetica, Open Sans, sans-serif",size:i(a.width,a.height,c),units:a.theme.units?a.theme.units:K.defaults.units,weight:a.theme.fontweight?a.theme.fontweight:"bold"},a.text=a.theme.text?a.theme.text:Math.floor(a.width)+"x"+Math.floor(a.height),a.flags.tex tmode){case"literal":a.text=a.flags.dimensions.width+"x"+a.flags.dimensions.height;break;case"exact":if(!a.flags.exactDimensions)break;a.text=Math.floor(a.flags.exactDimensions.width)+"x"+Math.floor(a.flags.exactDimensions.height)}var d=new w({width:a.width,height:a.height}),e=d.Shape,f=new e.Rect("holderBg",{fill:a.theme.background});f.resize(a.width,a.height),d.root.add(f);var g=new e.Group("holderTextGroup",{text:a.text,align:"center",font:a.font,fill:a.theme.foreground});g.moveTo(null,null,1),d.root.add(g);var h=g.textPositionData=L(d);if(!h)throw"Holder: staging fallback not supported yet.";g.properties.leading=h.boundingBox.height;var j=null,k=null;if(h.lineCount>1){var l=0,m=0,n=a.width*K.setup.lineWrapRatio,o=0;k=new e.Group("line"+o);for(var p=0;p<h.words.length;p++){var q=h.words[p];j=new e.Text(q.text);var r="\\n"==q.text;(l+q.width>=n||r===!0)&&(b(g,k,l,g.properties.leading),l=0,m+=g.properties.leading,o+=1,k=new e.Group("line"+o),k.y=m),r!==!0&&(j.moveTo(l,0),l+=h.space Width+q.width,k.add(j))}b(g,k,l,g.properties.leading);for(var s in g.children)k=g.children[s],k.moveTo((g.width-k.width)/2,null,null);g.moveTo((a.width-g.width)/2,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else j=new e.Text(a.text),k=new e.Group("line0"),k.add(j),g.add(k),g.moveTo((a.width-h.boundingBox.width)/2,(a.height-h.boundingBox.height)/2,null);return d}function i(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*K.defaults.scale);return Math.round(Math.max(c,h))}function j(a){var b;b=null==a||null==a.nodeType?K.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,h=E(e);if(h){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var i=e.holderData.fluidConfig;switch(i.mode){case"width":h.height=h.width/i.ratio;break;case"height":h.width=h.height*i.ratio}}var j={mode:"image",holderSettings:{dimensions:h,theme:f.theme,flags:f},el:e,engineSe ttings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=h,j.holderSettings.dimensions=f.dimensions),g(j)}else n(e)}}}function k(a){if(a.holderData){var b=E(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else n(a)}}function l(){for(var a,c=[],d=Object.keys(K.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=K.vars.invisibleImages[d[e]],E(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete K.vars.invisibleImages[d[e]]);c.length&&J.run({images:c}),b.requestAnimationFrame(l)}function m(){K.vars.visibilityCheckStarted||(b.requestAnimationFrame(l),K.vars.visibilityCheckStarted=!0)}function n(a){a.holderData.in visibleId||(K.vars.invisibleId+=1,K.vars.invisibleImages["i"+K.vars.invisibleId]=a,a.holderData.invisibleId=K.vars.invisibleId)}function o(a,b){return null==b?document.createElement(a):document.createElementNS(b,a)}function p(a,b){for(var c in b)a.setAttribute(c,b[c])}function q(a,b,c){var d,e;null==a?(a=o("svg",F),d=o("defs",F),e=o("style",F),p(e,{type:"text/css"}),d.appendChild(e),a.appendChild(d)):e=a.querySelector("style"),a.webkitMatchesSelector&&a.setAttribute("xmlns",F);for(var f=0;f<a.childNodes.length;f++)a.childNodes[f].nodeType===G&&a.removeChild(a.childNodes[f]);for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);return p(a,{width:b,height:c,viewBox:"0 0 "+b+" "+c,preserveAspectRatio:"none"}),a}function r(a,c){if(b.XMLSerializer){var d=new XMLSerializer,e="",f=c.stylesheets;if(c.svgXMLStylesheet){for(var g=s(),h=f.length-1;h>=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}var j=g.createP rocessingInstruction("xml",'version="1.0" encoding="UTF-8" standalone="yes"');g.insertBefore(j,g.firstChild),g.removeChild(g.documentElement),e=d.serializeToString(g)}var k=d.serializeToString(a);return k=k.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+k}}function s(){return b.DOMParser?(new DOMParser).parseFromString("<xml />","application/xml"):void 0}function t(a){K.vars.debounceTimer||a.call(this),K.vars.debounceTimer&&b.clearTimeout(K.vars.debounceTimer),K.vars.debounceTimer=b.setTimeout(function(){K.vars.debounceTimer=null,a.call(this)},K.setup.debounce)}function u(){t(function(){j(null)})}var v=c(1),w=c(2),x=c(3),y=x.extend,z=x.cssProps,A=x.encodeHtmlEntity,B=x.decodeHtmlEntity,C=x.imageExists,D=x.getNodeArray,E=x.dimensionCheck,F="http://www.w3.org/2000/svg",G=8,H="2.6.0",I="\nCreated with Holder.js "+H+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",J={version:H,addTheme:function(a,b){return null!=a&&null!=b&&(K.settings.themes[a]=b),de lete K.vars.cache.themeKeys,this},addImage:function(a,b){var c=document.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=o("img"),g={};g[K.vars.dataAttr]=a,p(f,g),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&j(a))},run:function(a){a=a||{};var c={},g=y(K.settings,a);K.vars.preempted=!0,K.vars.dataAttr=g.dataAttr||K.vars.dataAttr,c.renderer=g.renderer?g.renderer:K.setup.renderer,-1===K.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=K.setup.supportsSVG?"svg":K.setup.supportsCanvas?"canvas":"html");var h=D(g.images),i=D(g.bgnodes),j=D(g.stylenodes),k=D(g.objects);c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=g.noFontFallback?g.noFontFallback:!1;for(var l=0;l<j.length;l++){var m=j[l];if(m.attributes.rel&&m.attributes.href&&"stylesheet"==m.attributes.rel.value){var n=m.attributes.href.value,p=o("a");p.href=n;var q=p.protocol+"//"+p.host+p.pathname+p.search;c .stylesheets.push(q)}}for(l=0;l<i.length;l++)if(b.getComputedStyle){var r=b.getComputedStyle(i[l],null).getPropertyValue("background-image"),s=i[l].getAttribute("data-background-src"),t=null;t=null==s?r:s;var u=null,v="?"+g.domain+"/";if(0===t.indexOf(v))u=t.slice(1);else if(-1!=t.indexOf(v)){var w=t.substr(t.indexOf(v)).slice(1),x=w.match(/([^\"]*)"?\)/);null!=x&&(u=x[1])}if(null!=u){var z=e(u,g);z&&f({mode:"background",el:i[l],flags:z,engineSettings:c})}}for(l=0;l<k.length;l++){var A=k[l],B={};try{B.data=A.getAttribute("data"),B.dataSrc=A.getAttribute(K.vars.dataAttr)}catch(E){}var F=null!=B.data&&0===B.data.indexOf(g.domain),G=null!=B.dataSrc&&0===B.dataSrc.indexOf(g.domain);F?d(g,c,B.data,A):G&&d(g,c,B.dataSrc,A)}for(l=0;l<h.length;l++){var H=h[l],I={};try{I.src=H.getAttribute("src"),I.dataSrc=H.getAttribute(K.vars.dataAttr),I.rendered=H.getAttribute("data-holder-rendered")}catch(E){}var J=null!=I.src,L=null!=I.dataSrc&&0===I.dataSrc.indexOf(g.domain),M=null!=I.rendered&&"true"= =I.rendered;J?0===I.src.indexOf(g.domain)?d(g,c,I.src,H):L&&(M?d(g,c,I.dataSrc,H):!function(a,b,c,e,f){C(a,function(a){a||d(b,c,e,f)})}(I.src,g,c,I.dataSrc,H)):L&&d(g,c,I.dataSrc,H)}return this}},K={settings:{domain:"holder.js",images:"img",objects:"object",bgnodes:"body .holderjs",stylenodes:"head link.holderjs",stylesheets:[],themes:{gray:{background:"#EEEEEE",foreground:"#AAAAAA"},social:{background:"#3a5a97",foreground:"#FFFFFF"},industrial:{background:"#434A52",foreground:"#C2F200"},sky:{background:"#0D8FDB",foreground:"#FFFFFF"},vine:{background:"#39DBAC",foreground:"#1E292C"},lava:{background:"#F8591A",foreground:"#1C2846"}}},defaults:{size:10,units:"pt",scale:1/16},flags:{dimensions:{regex:/^(\d+)x(\d+)$/,output:function(a){var b=this.regex.exec(a);return{width:+b[1],height:+b[2]}}},fluid:{regex:/^([0-9]+%?)x([0-9]+%?)$/,output:function(a){var b=this.regex.exec(a);return{width:b[1],height:b[2]}}},colors:{regex:/(?:#|\^)([0-9a-f]{3,})\:(?:#|\^)([0-9a-f]{3,})/i,output:function (a){var b=this.regex.exec(a);return{foreground:"#"+b[2],background:"#"+b[1]}}},text:{regex:/text\:(.*)/,output:function(a){return this.regex.exec(a)[1].replace("\\/","/")}},font:{regex:/font\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},auto:{regex:/^auto$/},textmode:{regex:/textmode\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},random:{regex:/^random$/},size:{regex:/size\:(\d+)/,output:function(a){return this.regex.exec(a)[1]}}}},L=function(){var a=null,b=null,c=null;return function(d){var e=d.root;if(K.setup.supportsSVG){var f=!1,g=function(a){return document.createTextNode(a)};(null==a||a.parentNode!==document.body)&&(f=!0),a=q(a,e.properties.width,e.properties.height),a.style.display="block",f&&(b=o("text",F),c=g(null),p(b,{x:0}),b.appendChild(c),a.appendChild(b),document.body.appendChild(a),a.style.visibility="hidden",a.style.position="absolute",a.style.top="-100%",a.style.left="-100%");var h=e.children.holderTextGroup,i=h.properties;p(b,{y:i.font.size,sty le:z({"font-weight":i.font.weight,"font-size":i.font.size+i.font.units,"font-family":i.font.family})}),c.nodeValue=i.text;var j=b.getBBox(),k=Math.ceil(j.width/(e.properties.width*K.setup.lineWrapRatio)),l=i.text.split(" "),m=i.text.match(/\\n/g);k+=null==m?0:m.length,c.nodeValue=i.text.replace(/[ ]+/g,"");var n=b.getComputedTextLength(),r=j.width-n,s=Math.round(r/Math.max(1,l.length-1)),t=[];if(k>1){c.nodeValue="";for(var u=0;u<l.length;u++)if(0!==l[u].length){c.nodeValue=B(l[u]);var v=b.getBBox();t.push({text:l[u],width:v.width})}}return a.style.display="none",{spaceWidth:s,lineCount:k,boundingBox:j,words:t}}return!1}}(),M=function(){var a=o("canvas"),b=null;return function(c){null==b&&(b=a.getContext("2d"));var d=c.root;a.width=K.dpr(d.properties.width),a.height=K.dpr(d.properties.height),b.textBaseline="middle",b.fillStyle=d.children.holderBg.properties.fill,b.fillRect(0,0,K.dpr(d.children.holderBg.width),K.dpr(d.children.holderBg.height));{var e=d.children.holderTextGroup;e.pro perties}b.font=e.properties.font.weight+" "+K.dpr(e.properties.font.size)+e.properties.font.units+" "+e.properties.font.family+", monospace",b.fillStyle=e.properties.fill;for(var f in e.children){var g=e.children[f];for(var h in g.children){var i=g.children[h],j=K.dpr(e.x+g.x+i.x),k=K.dpr(e.y+g.y+i.y+e.properties.leading/2);b.fillText(i.properties.text,j,k)}}return a.toDataURL("image/png")}}(),N=function(){if(b.XMLSerializer){var a=s(),c=q(null,0,0),d=o("rect",F);return c.appendChild(d),function(b,e){var f=b.root;q(c,f.properties.width,f.properties.height);for(var g=c.querySelectorAll("g"),h=0;h<g.length;h++)g[h].parentNode.removeChild(g[h]);var i=e.holderSettings.flags.holderURL,j="holder_"+(Number(new Date)+32768+(0|32768*Math.random())).toString(16),k=o("g",F),l=f.children.holderTextGroup,m=l.properties,n=o("g",F),s=l.textPositionData,t="#"+j+" text { "+z({fill:m.fill,"font-weight":m.font.weight,"font-family":m.font.family+", monospace","font-size":m.font.size+m.font.units})+" } ",u=a.createComment("\nSource URL: "+i+I),v=a.createCDATASection(t),w=c.querySelector("style");p(k,{id:j}),c.insertBefore(u,c.firstChild),w.appendChild(v),k.appendChild(d),k.appendChild(n),c.appendChild(k),p(d,{width:f.children.holderBg.width,height:f.children.holderBg.height,fill:f.children.holderBg.properties.fill}),l.y+=.8*s.boundingBox.height;for(var x in l.children){var y=l.children[x];for(var A in y.children){var B=y.children[A],C=l.x+y.x+B.x,D=l.y+y.y+B.y,E=o("text",F),G=document.createTextNode(null);p(E,{x:C,y:D}),G.nodeValue=B.properties.text,E.appendChild(G),n.appendChild(E)}}var H="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(r(c,e.engineSettings))));return H}}}();for(var O in K.flags)K.flags.hasOwnProperty(O)&&(K.flags[O].match=function(a){return a.match(this.regex)});K.setup={renderer:"html",debounce:100,ratio:1,supportsCanvas:!1,supportsSVG:!1,lineWrapRatio:.9,renderers:["html","canvas","svg"]},K.dpr=function(a){return a*K.setup.ratio},K.vars={preempted :!1,resizableImages:[],invisibleImages:{},invisibleId:0,visibilityCheckStarted:!1,debounceTimer:null,cache:{},dataAttr:"data-src"},function(){var a=1,c=1,d=o("canvas"),e=null;d.getContext&&-1!=d.toDataURL("image/png").indexOf("data:image/png")&&(K.setup.renderer="canvas",e=d.getContext("2d"),K.setup.supportsCanvas=!0),K.setup.supportsCanvas&&(a=b.devicePixelRatio||1,c=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),K.setup.ratio=a/c,document.createElementNS&&document.createElementNS(F,"svg").createSVGRect&&(K.setup.renderer="svg",K.setup.supportsSVG=!0)}(),m(),v&&v(function(){K.vars.preempted||J.run(),b.addEventListener?(b.addEventListener("resize",u,!1),b.addEventListener("orientationchange",u,!1)):b.attachEvent("onresize",u),"object"==typeof b.Turbolinks&&b.document.addEventListener("page:change",function(){J.run()})}),a.exports=J}).call(b,function(){return this}())},function(a){functi on b(a){function b(a){if(!v){if(!g.body)return e(b);for(v=!0;a=w.shift();)e(a)}}function c(a){(t||a.type===i||g[m]===l)&&(d(),b())}function d(){t?(g[s](q,c,j),a[s](i,c,j)):(g[o](r,c),a[o](k,c))}function e(a,b){setTimeout(a,+b>=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v}, f}a.exports="undefined"!=typeof window&&b(window)},function(a,b,c){var d=c(4),e=function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}var c=1,e=d.defclass({constructor:function(a){c++,this.parent=null,this.children={},this.id=c,this.name="n"+c,null!=a&&(this.name=a),this.x=0,this.y=0,this.z=0,this.width=0,this.height=0},resize:function(a,b){null!=a&&(this.width=a),null!=b&&(this.height=b)},moveTo:function(a,b,c){this.x=null!=a?a:this.x,this.y=null!=b?b:this.y,this.z=null!=c?c:this.z},add:function(a){var b=a.name;if(null!=this.children[b])throw"SceneGraph: child with that name already exists: "+b;this.children[b]=a,a.parent=this}}),f=d(e,function(b){this.constructor=function(){b.constructor.call(this,"root"),this.properties=a}}),g=d(e,function(a){function c(c,d){if(a.constructor.call(this,c),this.properties={fill:"#000"},null!=d)b(this.properties,d);else if(null!=c&&"string"!=typeof c)throw"SceneGraph: invalid node name"}this.Group=d.extend(this,{constructor:c,type:"group"}), this.Rect=d.extend(this,{constructor:c,type:"rect"}),this.Text=d.extend(this,{constructor:function(a){c.call(this),this.properties.text=a},type:"text"})}),h=new f;return this.Shape=g,this.root=h,this};a.exports=e},function(a,b){(function(a){b.extend=function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c},b.cssProps=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")},b.encodeHtmlEntity=function(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.on load=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1}}).call(b,function(){return this}())},function(a){var b=function(){},c=Array.prototype.slice,d=function(a,d){var e=b.prototype="function"==typeof a?a.prototype:a,f=new b,g=d.apply(f,c.call(arguments,2).concat(e));if("object"==typeof g)for(var h in g)f[h]=g[h];if(!f.hasOwnProperty("constructor"))return f;var i=f.constructor;return i.prototype=f,i};d.defclass=function(a){var b=a.constructor;return b.prototype=a,b},d.extend=function(a,b){return d(a,function(a){return this.uber=a,b})},a.exports=d}])}); \ No newline at end of file diff --git a/loleaflet/bootstrap/ie10-viewport-bug-workaround.js b/loleaflet/bootstrap/ie10-viewport-bug-workaround.js deleted file mode 100644 index 479a6ebda..000000000 --- a/loleaflet/bootstrap/ie10-viewport-bug-workaround.js +++ /dev/null @@ -1,23 +0,0 @@ -/*! - * IE10 viewport hack for Surface/desktop Windows 8 bug - * Copyright 2014-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -// See the Getting Started docs for more information: -// http://getbootstrap.com/getting-started/#support-ie10-width - -(function () { - 'use strict'; - - if (navigator.userAgent.match(/IEMobile\/10\.0/)) { - var msViewportStyle = document.createElement('style') - msViewportStyle.appendChild( - document.createTextNode( - '@-ms-viewport{width:auto!important}' - ) - ) - document.querySelector('head').appendChild(msViewportStyle) - } - -})(); commit f4b7f6220ddb7d40eb70e00683b8d9ca38e4d31f Author: Andras Timar <andras.ti...@collabora.com> Date: Fri May 25 14:56:23 2018 +0200 remove unused evol-colorpicker Change-Id: I3eaf2040aa8cfaefb7861c33bceac7c1e5d7866a Reviewed-on: https://gerrit.libreoffice.org/54806 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Henry Castro <hcas...@collabora.com> (cherry picked from commit b1948bff68c8bbad55cc94b801df107692e92038) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index bd5fc2a0a..78bccc835 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -68,8 +68,7 @@ LOLEAFLET_CSS =\ $(builddir)/node_modules/smartmenus/dist/css/sm-core-css.css \ $(builddir)/node_modules/smartmenus/dist/css/sm-simple/sm-simple.css \ $(srcdir)/css/menubar.css \ - $(builddir)/node_modules/jquery-ui/themes/ui-lightness/jquery-ui.css \ - $(builddir)/node_modules/evol-colorpicker/css/evol-colorpicker.css + $(builddir)/node_modules/jquery-ui/themes/ui-lightness/jquery-ui.css LOLEAFLET_CSS_DST = $(foreach file,$(LOLEAFLET_CSS),$(builddir)/dist/$(notdir $(file))) LOLEAFLET_CSS_M4 = $(strip $(foreach file,$(LOLEAFLET_CSS),$(notdir $(file)))) @@ -81,7 +80,6 @@ NODE_MODULES_JS =\ node_modules/jquery-mousewheel/jquery.mousewheel.js \ node_modules/jquery-contextmenu/dist/jquery.contextMenu.js \ node_modules/jquery-ui/jquery-ui.js \ - node_modules/evol-colorpicker/js/evol-colorpicker.js \ node_modules/smartmenus/dist/jquery.smartmenus.js \ node_modules/timeago/jquery.timeago.js \ node_modules/autolinker/dist/Autolinker.js \ @@ -251,7 +249,6 @@ install-data-hook: pot: xgettext --from-code=UTF-8 --keyword=_ --output=po/templates/loleaflet-ui.pot \ admin.strings.js \ - evol.colorpicker.strings.js \ src/errormessages.js \ js/toolbar.js \ src/admin/AdminSocketAnalytics.js \ diff --git a/loleaflet/debug/document/loleaflet.html b/loleaflet/debug/document/loleaflet.html index 429da430e..8f9d5fd9d 100644 --- a/loleaflet/debug/document/loleaflet.html +++ b/loleaflet/debug/document/loleaflet.html @@ -26,7 +26,6 @@ <link rel="stylesheet" href="/loleaflet/%VERSION%/smartmenus/sm-core-css.css" /> <link rel="stylesheet" href="/loleaflet/%VERSION%/smartmenus/sm-simple.css" /> <link rel="stylesheet" href="/loleaflet/%VERSION%/jqueryui/1.11.1/themes/ui-lightness/jquery-ui.css"> -<link rel="stylesheet" href="/loleaflet/%VERSION%/toolbar/evol.colorpicker.min.css"> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json" /> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/> @@ -52,7 +51,6 @@ <script src="/loleaflet/%VERSION%/toolbar/w2ui.min.js"></script> <script src="/loleaflet/%VERSION%/toolbar/select2.min.js"></script> <script src="/loleaflet/%VERSION%/jqueryui/1.11.1/jquery-ui.min.js"></script> - <script src="/loleaflet/%VERSION%/toolbar/evol.colorpicker.min.js"></script> <script src="/loleaflet/%VERSION%/leaflet-src.js"></script> <script src="/loleaflet/%VERSION%/plugins/draw-0.2.4/dist/leaflet.draw.js"></script> <script src="/loleaflet/%VERSION%/scrollbar/jquery.mCustomScrollbar.js"></script> diff --git a/loleaflet/evol.colorpicker.strings.js b/loleaflet/evol.colorpicker.strings.js deleted file mode 100644 index 243259799..000000000 --- a/loleaflet/evol.colorpicker.strings.js +++ /dev/null @@ -1,7 +0,0 @@ -/* Strings for l10n from evol.colorpicker */ -var themeColors = _('Theme Colors'); -var standardColors = _('Standard Colors'); -var webColors = _('Web Colors'); -var backToPalette = _('Back to Palette'); -var history = _('History'); -var noHistory = _('No history yet.'); diff --git a/loleaflet/npm-shrinkwrap.json.in b/loleaflet/npm-shrinkwrap.json.in index c7c348cda..0cdbb868c 100644 --- a/loleaflet/npm-shrinkwrap.json.in +++ b/loleaflet/npm-shrinkwrap.json.in @@ -1169,16 +1169,6 @@ "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", "dev": true }, - "evol-colorpicker": { - "version": "3.2.6", - "resolved": "file:node_shrinkwrap/evol-colorpicker-3.2.6.tgz", - "integrity": "sha1-a4Nyx+jvjMVHiCNbl+n6JdZ1Kts=", - "dev": true, - "requires": { - "jquery": "2.2.4", - "jquery-ui": "1.10.5" - } - }, "evp_bytestokey": { "version": "1.0.3", "resolved": "file:node_shrinkwrap/evp_bytestokey-1.0.3.tgz", diff --git a/loleaflet/package.json b/loleaflet/package.json index 025978dd3..4fbb38854 100644 --- a/loleaflet/package.json +++ b/loleaflet/package.json @@ -9,7 +9,6 @@ "browserify-css": "0.9.1", "d3": "3.5.17", "eslint": "3.0.0", - "evol-colorpicker": "3.2.6", "exorcist": "0.4.0", "jake": "~8.0.10", "jquery": "2.2.4", _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits