From 1cc10e401e5d228dcbccebd5951beda898185b0d Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Thu, 3 Nov 2016 16:52:35 +0100 Subject: [PATCH 01/15] modularized documentation --- conf/client.commented.json | 10 +++++++- conf/entry.js | 25 +++++++++++++++++++ files/helptext.json.js | 39 ++++++++++++++++++++++++++++++ images/doc/search-active.png | Bin 0 -> 1698 bytes images/doc/search-inactive-de.png | Bin 0 -> 416 bytes images/doc/search-inactive-en.png | Bin 0 -> 461 bytes 6 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 files/helptext.json.js create mode 100644 images/doc/search-active.png create mode 100644 images/doc/search-inactive-de.png create mode 100644 images/doc/search-inactive-en.png diff --git a/conf/client.commented.json b/conf/client.commented.json index a043da0..9b0525f 100644 --- a/conf/client.commented.json +++ b/conf/client.commented.json @@ -46,8 +46,16 @@ "scaleLine", "zoom", "mobileControls", - "searchControl" + "searchControl", + "helpButton" ], + "helpButton": { + "float": [ + "top", + "left" + ], + "fileName": "files/helptext.json" + }, "searchControl": { "float": [ "top", diff --git a/conf/entry.js b/conf/entry.js index 3f7f613..06f1844 100644 --- a/conf/entry.js +++ b/conf/entry.js @@ -4,6 +4,31 @@ import defaultClientConf from 'guide4you-builder/mustache-eval-loader?name=conf/ import defaultLayerConf from 'guide4you-builder/mustache-eval-loader?name=conf/[name].[ext]!./layers.commented.json' import 'guide4you-builder/tojson-file-loader?name=files/[name]!../files/l10n.json.js' +import 'guide4you-builder/tojson-file-loader?name=files/[name]!../files/helptext.json.js' + +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/arrowbuttons.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/attribution-collapsed.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/attribution-expanded-de.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/attribution-expanded-en.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-area.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-documentation.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-geolocation-active.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-geolocation-inactive.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-info.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-lang-de.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-lang-en.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-line.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/button-print.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/layerselector-de.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/layerselector-en.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/overviewmap.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/overviewmap-collapsed.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/scaleline.png' +import 'file?name=images/doc/[name].[ext]!guide4you/images/doc/zoom.png' + +import 'file?name=images/doc/[name].[ext]!../images/doc/search-active.png' +import 'file?name=images/doc/[name].[ext]!../images/doc/search-inactive-de.png' +import 'file?name=images/doc/[name].[ext]!../images/doc/search-inactive-en.png' import 'file?name=files/[name].[ext]!guide4you/files/hotelsbonn.kml' import 'file?name=files/[name].[ext]!guide4you/files/restaurantsbonn.kml' diff --git a/files/helptext.json.js b/files/helptext.json.js new file mode 100644 index 0000000..afd4436 --- /dev/null +++ b/files/helptext.json.js @@ -0,0 +1,39 @@ +// As the webpack loader's exec method is broken we need to do plain ES5 here + +// As the webpack loader's exec method is broken we need to do plain ES5 here + +var merge = require('lodash/merge') + +module.exports = merge(require('guide4you/files/helptext.json.js'), { + "de": [ + { + "id": "searchControl", + "img": [ + "search-inactive-de.png", + "search-active.png" + ], + "joinWith": "
 
", + "descr": [ + "Mit diesem Element suchen Sie nach Adressen, Orten, und Ähnlichem. Tippen Sie den Such­begriff in das Such­feld ein.", + "Wählen Sie mit der Maus oder den Pfeil­tasten aus den angezeigten Vorschlägen aus oder geben Sie den Such­begriff vollständig ein. Führen Sie die Suche aus, indem Sie die Enter-Taste betätigen oder auf das Lupen­symbol klicken.", + "Die obere Abbildung zeigt die Suche im inaktiven Zustand, die untere mit Vorschlägen." + ] + } + ], + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + "en": [ + { + "id": "searchControl", + "img": [ + "search-inactive-en.png", + "search-active.png" + ], + "joinWith": "
 
", + "descr": [ + "Use this element to search for addresses, places and the like.", + "Type a search term into the search field. Choose among the suggestions using the mouse or the arrow buttons or enter the full search term. Execute the search by pressing the Enter button or clicking the magnifying glass symbol.", + "The upper image shows the search in inactive state, the lower image with suggestions being displayed." + ] + } + ] +}) \ No newline at end of file diff --git a/images/doc/search-active.png b/images/doc/search-active.png new file mode 100644 index 0000000000000000000000000000000000000000..d21d55ef296c2925cf21c11a701350920bb6810f GIT binary patch literal 1698 zcmV;T23`4yP)3_9c5Ib~Sn(DK4V#F+BXhqzpkHRUT90J)aqy;qEq7b5H_Baz|!_&LRw zDNi$?A)jXg}!L#!2c=LS0V~jEd+DO=y>lhA( zJq0?aPAM|ICVx*T?%c)Pxg)z{7sQmlpxoL_39K)^C{S+k#TM%WgDnWuTcOopgC8>( zWbgkTv^Jnz7wJ>DN3E0(-Zqlq(uQACT~K_VwNcVGpaH1s2DR=ld_8Np|zc&bBeZ+UP(!+G;3BhRoYnf zCt~|4-~96HsikQ&zoNjQnsZ7|NkM6;s_7bZ2mH+|F>(J`!DlSZlS4f^g;+`nwEl)7 zYWltmlt4C7r^w}9Iu!G{HI~x!3ZcA-C4mqXN+9W*hkhXxO+PFteL&Gp=a))A@y!?i zp+Uj(1rH=b;pMs7&r?e5RT4g11qzClvlJ+;4Npf$%?72DpjdctPTUZVwROP<3KiKV-J?KpfP=Fk1pY_ zV8Nl{Fp{dl+8-j98fF{BUSrm;f(PLrjT?4+?4MhWlyln z5W%70Fj6&;O(C!tLMfNYP5Hso%}wkwSa7H~j8ui33=bAVC?e4qbTYf2#V+G07OTTZ zHS>BCY4-9{)&a$mAwf9B;7dyv8&r{B?^xYOl>^RKD6fR?^wy8E8=3jhhmk z#L`sd@vCGzDcRCdFY~}{Erai+Hn;lNtMaH&Az>URh;8IxWfrR_w*99NrLMeG&NZ2 z&`@!{0>>j@5f^eL!S!b61-_l#*_pxgzJzVi*Ax%d2tePsgMD1$6IbU3amK$fdd4wI zy0AF@0ryNvz|o7b!cPDWVXZvcD)UY`F;&(dtN#_!;gn*@i*`q;y_CZ%>lu$$y+VT8 zKv^>LqE~VSND)!{Al{+&lL3^`8#ABI`ds|DQ-p$y6){%>1(g?4L{g9-FY$XwIr&xAGtr)TTUsDf?QL`TO)gC1)y> zVB(FJYf6tqnR;bD^89I|xFPSw>XnHA#*NaZDDxCHp>9ahD$J{hZ>;#Q0yr2oS)vqM zLyLBKc^+lXpqmf!Lb-ycB(!Mj7BNXFCQO`|Qz$<%M7Qh{61EAE3Rk53>AtAE-w{c! zlxC4Pd9l|08%WrYpCqglitNiuu{-kH?63S-Hr=lX6?cp}q!P-GxMOM*F=2v*_6Z|P zhS9GCZ{LdE$v<07elxF_nHSm2c41~yGPCs=*1S{_00000NkvXXu0mjf Ds#o2* literal 0 HcmV?d00001 From 1e10e9458c2b02016eb7ea90693057344c2684af Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Fri, 4 Nov 2016 16:10:26 +0100 Subject: [PATCH 02/15] modified .travis.yml --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index f178ec0..53e78b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,15 @@ language: node_js node_js: - 'node' +cache: + directories: + - travis_phantomjs + - node_modules +before_install: + # Upgrade PhantomJS to v2.1.1 + - "export PHANTOMJS_VERSION=2.1.1" + - "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH" + - "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi" + - "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi" + - "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi" + - "phantomjs --version" From 7d58ae7cc0c63ef693f62ac40602a5e899b05eaa Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Mon, 7 Nov 2016 09:24:06 +0000 Subject: [PATCH 03/15] helptext.json.js cleanup --- files/helptext.json.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/files/helptext.json.js b/files/helptext.json.js index afd4436..3c54b31 100644 --- a/files/helptext.json.js +++ b/files/helptext.json.js @@ -1,7 +1,5 @@ // As the webpack loader's exec method is broken we need to do plain ES5 here -// As the webpack loader's exec method is broken we need to do plain ES5 here - var merge = require('lodash/merge') module.exports = merge(require('guide4you/files/helptext.json.js'), { From 733726a3d9b0d45196718b5113219b37113a92c6 Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Mon, 7 Nov 2016 13:18:33 +0000 Subject: [PATCH 04/15] Helptext per language now an object --- files/helptext.json.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/files/helptext.json.js b/files/helptext.json.js index 3c54b31..6b43900 100644 --- a/files/helptext.json.js +++ b/files/helptext.json.js @@ -3,9 +3,8 @@ var merge = require('lodash/merge') module.exports = merge(require('guide4you/files/helptext.json.js'), { - "de": [ - { - "id": "searchControl", + "de": { + "searchControl": { "img": [ "search-inactive-de.png", "search-active.png" @@ -17,11 +16,10 @@ module.exports = merge(require('guide4you/files/helptext.json.js'), { "Die obere Abbildung zeigt die Suche im inaktiven Zustand, die untere mit Vorschlägen." ] } - ], + }, ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - "en": [ - { - "id": "searchControl", + "en": { + "searchControl": { "img": [ "search-inactive-en.png", "search-active.png" @@ -33,5 +31,5 @@ module.exports = merge(require('guide4you/files/helptext.json.js'), { "The upper image shows the search in inactive state, the lower image with suggestions being displayed." ] } - ] + } }) \ No newline at end of file From de2dd2607a891fbd21d6d35d04850f2b6d69b231 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Thu, 10 Nov 2016 02:49:46 +0100 Subject: [PATCH 05/15] chore(package): update selenium-webdriver to version 3.0.1 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..515de49 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "concurrently": "3.1.0", "esdoc": "0.4.8", "mocha": "3.1.2", - "selenium-webdriver": "2.53.3", + "selenium-webdriver": "3.0.1", "phantomjs-prebuilt": "2.1.13", "standard": "8.4.0", "wait-on": "1.5.3" From 7025b9c55e52868e78f5b9a1ded87aa836e7e5c9 Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 15 Nov 2016 19:05:07 +0100 Subject: [PATCH 06/15] animation bug fix. interoperability fixes. --- src/SearchControl.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/SearchControl.js b/src/SearchControl.js index 39ef0c6..2ac60d7 100644 --- a/src/SearchControl.js +++ b/src/SearchControl.js @@ -25,10 +25,11 @@ import '../less/searchcontrol.less' * @property {number} [amountDropdownEntries=4] number of entries shown in the dropdown * @property {number} [autocompleteStart=2] count of letters after which the autocomplete starts * @property {number} [autocompleteDelay=300] + * @property {string} [projectionOfServer=interfaceProjection] * @property {number} [slideDuration=400] time it takes for the dropdown to slide down * @property {string} [parser] name of the parser to use. At the moment 'Nominatim' is delivered within this module. * @property {StyleLike} [style] of the search results - * @property {boolean} [animated=true] affects the move to the search results. + * @property {boolean} [animated] affects the move to the search results. * @property {string} [placeholder] text to be seen in the input field if the user has made no input yet * @property {string} [ghostentry] text to be seen in the dropdown if the autocomplete or search didn't find * any matching entries @@ -61,7 +62,7 @@ export class SearchControl extends Control { * @type {boolean} * @private */ - this.useProxy_ = (options.useProxy || (!options.hasOwnProperty('useProxy') && options.proxy)) + this.useProxy_ = options.useProxy || (options.hasOwnProperty('useProxy') && options.proxy) /** * @type {string} @@ -142,12 +143,22 @@ export class SearchControl extends Control { * @type {boolean} * @private */ - this.animated_ = options.hasOwnProperty('animated') ? options.animated : false + this.animated_ = options.animated + /** + * @type {string} + * @private + */ this.deactivateMobileSearch_ = options.hasOwnProperty('deactivateMobileSearch') ? options.deactivateMobileSearch : DeactivateMobileSearch.EXACT + /** + * @type {string} + * @private + */ + this.projectionOfServer_ = options.projectionOfServer + let placeholder = (options.hasOwnProperty('placeholder')) ? this.getLocaliser().selectL10N(options.placeholder) : this.getLocaliser().localiseUsingDictionary('SearchControl placeholder') @@ -290,6 +301,7 @@ export class SearchControl extends Control { this.parser_ = new this.parsers_[this.parserType_]({ featureProjection: map.getView().getProjection(), + dataProjection: this.projectionOfServer_ || map.get('interfaceProjection'), localiser: this.getLocaliser() }) @@ -400,7 +412,8 @@ export class SearchControl extends Control { * @private */ updateDropdown_ () { - let inputContainsDropdown = (this.features_.length === 1) && (this.features_[0] === this.selectedFeature_) + let inputContainsDropdown = this.selectedFeature_ && (this.features_.length === 1) && + (this.features_[0].get('dropdowntext') === this.selectedFeature_.get('dropdowntext')) if (inputContainsDropdown || (this.features_.length === 0)) { this.dropdownActive_ = false From 852c83eea913edf420d3f4ce0499cba538f9b62d Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Wed, 16 Nov 2016 01:22:26 +0100 Subject: [PATCH 07/15] chore(package): update wait-on to version 2.0.1 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..b88fe70 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "selenium-webdriver": "2.53.3", "phantomjs-prebuilt": "2.1.13", "standard": "8.4.0", - "wait-on": "1.5.3" + "wait-on": "2.0.1" }, "scripts": { "linkRepos": "g4u-link guide4you", From 205cd057b0725addc8b5924a3bec8e0c9307c068 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Wed, 23 Nov 2016 21:43:37 +0100 Subject: [PATCH 08/15] chore(package): update standard to version 8.6.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..4b8acb1 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "mocha": "3.1.2", "selenium-webdriver": "2.53.3", "phantomjs-prebuilt": "2.1.13", - "standard": "8.4.0", + "standard": "8.6.0", "wait-on": "1.5.3" }, "scripts": { From 3053637289ba54b957b2b781060adc5158dfa5c0 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 25 Nov 2016 01:54:55 +0100 Subject: [PATCH 09/15] chore(package): update mocha to version 3.2.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..5c2b119 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "guide4you-builder": "1.1.*", "concurrently": "3.1.0", "esdoc": "0.4.8", - "mocha": "3.1.2", + "mocha": "3.2.0", "selenium-webdriver": "2.53.3", "phantomjs-prebuilt": "2.1.13", "standard": "8.4.0", From fe9debbe265d26b82c2de969e385768a3ac647f8 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 9 Dec 2016 18:45:46 +0100 Subject: [PATCH 10/15] chore(package): update phantomjs-prebuilt to version 2.1.14 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..e6cd49f 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "esdoc": "0.4.8", "mocha": "3.1.2", "selenium-webdriver": "2.53.3", - "phantomjs-prebuilt": "2.1.13", + "phantomjs-prebuilt": "2.1.14", "standard": "8.4.0", "wait-on": "1.5.3" }, From 61f198c9cb6858f6f0b6963f81a5ef1a79601e19 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Mon, 2 Jan 2017 03:17:39 +0100 Subject: [PATCH 11/15] chore(package): update esdoc to version 0.5.2 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..3c3c47f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "devDependencies": { "guide4you-builder": "1.1.*", "concurrently": "3.1.0", - "esdoc": "0.4.8", + "esdoc": "0.5.2", "mocha": "3.1.2", "selenium-webdriver": "2.53.3", "phantomjs-prebuilt": "2.1.13", From d938eab19aee1b3306d63f0661cc3ac050e26e2a Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Thu, 19 Jan 2017 13:24:07 +0100 Subject: [PATCH 12/15] chore(package): update guide4you to version 1.3.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..bf0c58e 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/KlausBenndorf/guide4you-module-search" }, "dependencies": { - "guide4you": "1.2.*", + "guide4you": "1.3.0", "guide4you-proxy": "github:KlausBenndorf/guide4you-proxy#v1.0.0" }, "devDependencies": { From 8114a4d847c30cf24907a1f2a40f2746998e8da4 Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Thu, 19 Jan 2017 14:55:10 +0000 Subject: [PATCH 13/15] depends on guide4you@1.3* now --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc9d62a..5c86f39 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/KlausBenndorf/guide4you-module-search" }, "dependencies": { - "guide4you": "1.2.*", + "guide4you": "1.3.*", "guide4you-proxy": "github:KlausBenndorf/guide4you-proxy#v1.0.0" }, "devDependencies": { From 27f0922e73b26a012c3f7026ac728b94595c95b2 Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Thu, 19 Jan 2017 15:00:55 +0000 Subject: [PATCH 14/15] added @g4u-text-color --- conf/clouds.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/clouds.less b/conf/clouds.less index e336f83..6f531c4 100644 --- a/conf/clouds.less +++ b/conf/clouds.less @@ -20,3 +20,5 @@ @g4u-active-hover-button-color: rgb( 41, 171, 226); @g4u-link-color: lighten(@g4u-medium-main-color, 10%); + +@g4u-text-color: white; From 4a56fb1f2079c8db8716736170a9a7c7a6e402cf Mon Sep 17 00:00:00 2001 From: Josef Schugt Date: Thu, 19 Jan 2017 16:01:59 +0000 Subject: [PATCH 15/15] 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5957a3..bc7f23d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "guide4you-module-search", - "version": "1.2.5", + "version": "1.3.0", "description": "A search parser module for Guide4You.", "keywords": [ "search",