-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Footer update #671
Footer update #671
Conversation
* Update package.json (#1) Fixes origo-map#576 * possibility of having sldStyle in index.json style section * empty string for style instead of undefined * changing variable names from sldStyle to wmsStyle
* Update package.json (#1) Fixes origo-map#576 * adding support for extendedLegend * a more informative comment * removing unused variable
* Fixes origo-map#402 * update after PR origo-map#603 comments * updates css to use global colors PR#603
* Removed redundant conf folder * Delete controlinitialiser.js
Adds s to http for Västerås Stad samlingskarta.
* Update package.json (#1) Fixes origo-map#576 * sharemap creates file on the server with all the necessary info * Extended sharemap working now * Fixed linter errors + cleanup * Removed comments, wrapped error message
* add 0 margin top @ flex column * Ignore first commit
* Update package.json (#1) Fixes origo-map#576 * styleSettings caused the whole application to crash if no style is provided in the index.json
swapped a and img
What about removing the urlText and just have text? If combined with a url then its a link, otherwise not. In your code you need to use urlText if you want image and text combined even if you have no url, which is not really obvious. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for update
@@ -9,10 +9,18 @@ export default function Footer(options = {}) { | |||
return Component({ | |||
render: function render() { | |||
let middleContent = ''; | |||
if (data.img) { | |||
if (data.img && !data.url && !data.urlText) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is the same as original could be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
} else if (data.img && !data.url && data.urlText) { | ||
middleContent = `<img src="${data.img}">${data.urlText}`; | ||
} else if (data.img && data.url && data.urlText) { | ||
middleContent = `<img src="${data.img}"><a href="${data.url}">${data.urlText}</a>`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the image be a link as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, why not 👍
middleContent = `<img src="${data.img}">`; | ||
} else if (data.url && data.urlText) { | ||
middleContent = `<a href="${data.url}">${data.urlText}</a>">`; | ||
middleContent = `<a href="${data.url}">${data.urlText}</a>`; | ||
} else if (data.text) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about replacing text with urlText (or better the other way around)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah for sure urlText, although I think this was text is from the original code so not sure if it was intended to be supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However in case you have no url the urlText is a bit misleading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jupp looking at the docs, that is true. Maybe update docs with an statement that urlText is depended that the url for a link is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and that you cannot combine text with other elements. If you want image and text, you must use urlText.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jupp!
I will referense this conversion in an issue on the api-docs repo.
@daRasmussen I am unable to test this due to some local git issue preventing me from viewing external branches. However, I agree with @jokd that the name urlText is a bit misleading. I would like to suggest that we use three parameters - img, url and text. I can come up with six different scenarios, off the top of my head:
I think I got them all, right? This will probably screw things up with old config files, but I think it's worth it because it makes things more intuitive. |
Closing this since #695 solves the issue |
* updates PR origo-map#601 * Fixes Issue origo-map#623 * rewrote it again * removed interactionhandler * linter errors * removes jquery from agstile, issue origo-map#634 * remove jquery from geojson Issue origo-map#636 * Removed redundant conf folder (origo-map#616) * Removed redundant conf folder * Delete controlinitialiser.js * Replaces last extend * removes jquery fixes issue origo-map#644 * removes jquery fixes issue origo-map#646 * removes jquery from import fixes issue origo-map#646 * removes jquery from vectortile fixes issue origo-map#648 * removes jquery from wfs fixes issue origo-map#650 * removes jquery from wms fixes issue origo-map#652 * remove jquery from wmts layer type and fixes issue origo-map#654 * removes jquery from xyz fixes issue origo-map#656 * Update README.md Adds s to http for Västerås Stad samlingskarta. * Extended sharemap (origo-map#618) * Update package.json (#1) Fixes origo-map#576 * sharemap creates file on the server with all the necessary info * Extended sharemap working now * Fixed linter errors + cleanup * Removed comments, wrapped error message * lefthandtools-marginfix, Fix for issue origo-map#587 (origo-map#633) * add 0 margin top @ flex column * Ignore first commit * Fixed default style for points (origo-map#595) Fixes origo-map#588 * Wms style object fix (origo-map#639) * Update package.json (#1) Fixes origo-map#576 * styleSettings caused the whole application to crash if no style is provided in the index.json * Fixes origo-map#589 (origo-map#594) * Update README.md * Update README.md * Extended legend zoom (origo-map#664) * Added zoom capability * Fixed issue with large graphics on small screens * Fixes origo-map#614, null values in editor (origo-map#630) * added time as input type (origo-map#629) Fixes origo-map#626 * added time as input type * swedefied the placeholders * Autotoggle subgroups (origo-map#674) Fixes origo-map#245 * Added the ability to add style to modal. * Fixes origo-map#628 (origo-map#632) Fixes issue with rotation and formats other than jpeg. * Exposed ol/interaction (origo-map#680) * Fix for cluster and share map issue (origo-map#593) Fixes origo-map#590 * Changed Slack link * Fixes bug for infoclick and editor (origo-map#683) Fixes a bug where infoclick and editor were both active. * Update featureinfo.js (origo-map#689) * Fix for footer (origo-map#695) Fixes origo-map#670 Different appraoch than origo-map#671 * Opens link in new window * Implements 'turn-off-all-layers'-functionality * Moves (all) logic from turnofflayers.js to legend.js and exempts group:none layers * Fixed @center coordinate transformation bug (origo-map#698) * Added 'map' as arg to searchAndReplace function * Removed unused 'viewer' import * Added plugins folder to igore. * Added a link to shortcut icon for Origo exemple * Fixes origo-map#693 (origo-map#697) * Fixes origo-map#693 * Added groupName * Create group when adding layer * Removes empty groups * Updates getattributes.js (origo-map#548) * Updates getattributes.js fixes origo-map#547 * Update getattributes.js Fixes origo-map#547 * Added UI dropdown component (origo-map#702) * Adding dropdown component * scss and class fixes * Cleanup * Added default direction, cleanup * Added flex to footer * Added number and hidden as input types (origo-map#696) * Added number and hidden as input types * Hide from popup * readonly option Added readonly option for attributes in the editor * Adds close button (origo-map#704) * Adds close button Fixes origo-map#703 * Some style fixes * Fixes origo-map#127, layer transparency (origo-map#708) * Fixes origo-map#127, layer transparency * Some css * No shadow * Fix for origo-map#709 (origo-map#710) * Fixes origo-map#709 * update without formating * Changes in spacing (origo-map#711) * Round icons (origo-map#714) * Image as attribute (origo-map#682) * Image as attribute Fixes issues with images as attributes. Now (img: {attributename}) will work the same way as (type:image, name:{attributename}) to work in form as well as popup. * Fixed image bug * Linting * Events * Spotted a bug * Enterkey returns false * OpenLayers 6 (origo-map#716) * zoom.js Reworked zoom.js since there are changes in 6.0 * Fix for carousel * Renamed functions and removed invalid options * Moves the eye to the wished for position * Origo ol6 transparency (origo-map#722) * Layer transparency in OL6 Opacity value has to be number in OL6 * valueAsNumber * Makes room for the LM & Turnofflayers buttons together and distinguishes the root group via parameter and own css rule * Added Scalepicker control (origo-map#725) * Added scalepicker control * Added scss, reworked dropdown component * Reworked dropdown, cleanup * Added animation * Bump webpack-bundle-analyzer from 3.0.3 to 3.3.2 (origo-map#729) Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 3.0.3 to 3.3.2. - [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases) - [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/webpack-bundle-analyzer@v3.0.3...v3.3.2) Signed-off-by: dependabot[bot] <support@github.com> * Bump mixin-deep from 1.3.1 to 1.3.2 (origo-map#730) Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2) Signed-off-by: dependabot[bot] <support@github.com> * Bump js-yaml from 3.11.0 to 3.13.1 (origo-map#731) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.11.0 to 3.13.1. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@3.11.0...3.13.1) Signed-off-by: dependabot[bot] <support@github.com> * Bump lodash from 4.17.10 to 4.17.15 (origo-map#732) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.10 to 4.17.15. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.10...4.17.15) Signed-off-by: dependabot[bot] <support@github.com> * Added class in popup (origo-map#726) Fix for click-through svgs * Replaces form element with a div * Obey naming convention * Makes it possible to add new attribute types (origo-map#719) * Origo changes for elevation-profile plugin * ESLint * Update viewer.js * Sidebar * Moved functions * Refactored getattributes to use templates * Update origo.js * Makes the background group draw the separator line between it and the toolbar group or the layers overlay and alters it slightly to fit the close button * Added class (origo-map#736) * Added class * Update legend.js * Fix for background maps and measure icons (origo-map#739) * OL 6.1.0 (origo-map#728) * Added tooltips to buttons (origo-map#737) * Added tooltips to buttons * externalurl * Update Origo init * Validate form input * Syntax correction * Updates regex for url * Edits the search filter per Markus' prior PR so that no-hit search terms do not present search hits * Removes group title separator line from expanded groups, including subgroups * Guaranteed return makes ESLint happier * Use of html5 input types * Adds projection option for wfs and geojson (origo-map#743) * Adds projection option for wfs and geojson * Removed console.log * Overrides ol css (origo-map#750) * Added active option (origo-map#748) * Adds startExtent option (origo-map#742) * Adds startExtent option * Added check for mapStateId * Linter * Renames shadowing variable * Vertical resize input * Deletes support text * Fix for multiple type * Missed a return statement * panTo option for geoposition control (origo-map#753) * Enables the constrainResolution option for an Origo map * changed to advanced print control (origo-map#761) * adds validate to more types * Additional small fixes * No keyboard * Repairs input button * Round up edit button * Fix for searchwindow style * Removed width in scalepicker (origo-map#781) * Removed width * Changed to min-width * Syntax for source (origo-map#779) * Modal iframe (origo-map#777) * Open links in modal * newTab * Added resize * Linter errors * url as title * V2.1.0 (origo-map#791) * package.json version numbers * Update index.json * Check type oc content Fixes origo-map#786 * Fix for search in IE11 Fixes origo-map#789 * Added scale parameter Print quality quickfix * Fix for measure icons * Layer transparency in IE11 * Shrinks the search field Fixes origo-map#790 * index.json * v2.1.0 build Co-authored-by: tonnyandersson <tonnyandersson@users.noreply.github.com> * Exposed utils, dropdown. Added icons. (origo-map#793) * Fixes bugs in the zoom to feature function (origo-map#799) Fixes origo-map#794 and origo-map#795 * Makes editor pen button initial state reflect index.json isActive property * Replaced Jquery in src/dropdown.js (origo-map#802) * Removed collapse button (origo-map#800) * Removed collapse button Fixes origo-map#772 Removed the button and collapse function from the header since we now have a close button. * Made header slimmer * Update overlays.js * Bump OL to 6.2.0 (origo-map#813) * Bump OL to 6.2.0 * Update package.json * Update _ol.scss * Added PLUGINS.md (origo-map#816) * Update intern.json * Delete saveconfig.js * Delete editor.html * Delete origoControls.js * Delete origoConfig.js * Update package-lock.json * Update layertype.js * Update .eslintrc.json * Update _ol.scss * Update _button.scss * Update _dropdown.scss * Update _card.scss * Update _position.scss * Delete _geolocation.scss * Delete _legend.scss * Update _measure.scss * Update index.json * Update _viewer.scss * Update _icon.scss * Update _editor.scss * Update _popup.scss * Delete _splash.scss * Update _variables.scss * Update _awesomplete.theme.scss * Update origo.scss * Update intern.json * Update webpack.copy.js * Update editorlayers.js * Update editortemplate.js * Update editortoolbar.js * Update transactionhandler.js * Update print-component.js (origo-map#817) Fixes origo-map#784 * Remove IE 10 support text * Update getattributes.js * Update intern.json * Added geometryType check and alert (origo-map#820) * Added geometryType check and alert * Changed alert message * getNeastedAttr * Update skapa.json * Tagit bort möjlighet att rita område * Added elevation data tool (origo-map#824) * Added elevation button, icon * Added elevation data tool * Update index.json * Replaced elevationResponseType with elevationAttribute * Fixes Outdated dependencies ISSUE origo-map#825 * Fixes Issue Custom Scrollbar#828 * Update download.js * Embedded map interaction (origo-map#814) * added mapinteractions * Linter fix * Update _ol.scss * Update webpack.prod.js * Update package.json * Update mapinteractions.js * Update webpack.prod.js * Added overflow: true to polygon labels (origo-map#830) * Update agstransaction.js (origo-map#822) * Expose methods in viewer for lmsearch-plugin * Rounded search bar (origo-map#833) * Added rotation by attribute (origo-map#834) * Clear features when closing popup (origo-map#835) * Clear features when closing popup * Forgot the sidebar * Links update * Renaming links * adds-link * updates link * Adds travis config to origo * Added WMTS style option (origo-map#838) * Added WMTS style option * Removed lingering console.log * Adds before script and updates supported node versions * Adds branches to travis config * Adds background layer info (origo-map#842) * Hide mapmenu on mapclick (origo-map#843) * Added close on map click for mapmenu * Added autoHide option to legend control * Makes it possible to use static urls as attributes (origo-map#844) * Makes it possible to use static urls as attributes * Update getattributes.js * Adds tooltip text (origo-map#845) * Update editor.js with tooltip text * Update fullscreen.js with tooltip text * Update geoposition.js with tooltip text * Update home.js with tooltip text * Update legend.js with tooltip text * Update zoom.js with tooltip text * Small change of text * Updates travis config and updates README to display status * Fixes bug when panning in Chrome (origo-map#847) * Background maps tooltip (origo-map#849) * Copy of plugins folder to build folder * Update Readme.md Fixes url * Update index.json * create CODE_OF_CONDUCT.md * Update issue templates This would be a nice addition to Origo. * updates packages * Update .travis.yml Update before_script * Overflow fix (origo-map#857) Fixes Issue origo-map#856 * Update origo.scss (origo-map#867) Removed touch-action * Require contents in list items to add them to the feature info popup DOM (origo-map#865) Fixes origo-map#864. Another condition was added for featureinfo popup list elements to be added to the DOM, requiring that the list item has contents. Co-authored-by: Mattias Spångmyr <mattias.spangmyr@haninge.se> * Update featurelayer.js (origo-map#871) Added zIndex * Fixed missing function call (origo-map#873) * Origin/npm updates (origo-map#877) * Adds travis config * updates npm packages * Enable config of logo in print control. * Fixed linter errors. * PR for Infowindow and selection manager (origo-map#861) * copying over needed files for the PR * adding SelectedIten file and changes in viewer.js * Adding changes to featureinfo.js * Adding changes to getfeatureinfo * removing dead code * adding css for infowindow * adding style types for multi slection * hiding infowindow when close is clicked * removing dead code * Squashing 15 commits in on commit for PR modified: src/viewer.js * Changing the behaviour of click on an element. Style fix for export buttons. Adding package-lock.json file * Removing console.log * Fixing Linter errors * Removing geometry property dynamically, fixing Linter problems. * Fixing Linter issues in files featurinfo.js and getfeatureinfo.js Co-authored-by: Iman Tahriri <iman.tahriri@decerno.se> * Updates documentation build * Expose Openlayers format through Origo for the draw-plugin. * Updates npm packages (origo-map#895) * Adds travis config * updates npm packages * New `groupSuggestions` option, and group titles same as in feature info popups (origo-map#869) * `groupSuggestions` option to active suggestion groups, with title same as popups The `groupSuggestions` option is added for the Search control and replaces `layerNameAttribute` in controlling whether or not to group suggestions. The title for suggestion group is fetched the same way as the title for feature info popups, providing more consistency and flexibility (like the possibility to add suggestion group titles for single layer searches or searches without defined map layers. * Refactored ternary assignment into if-else A ternary assignment against AirBnB rules 15.6 and 15.7 was refactored into an if-else block instead. * Fix reassignment of `typeTitle` variable Changed the declaration of the `typeTitle` variable to `let` instead of `const` to allow reassignment. * Update search.js (origo-map#894) Fixes Issue origo-map#893 * Makes the mapgrid available again * getGroupLayers Co-authored-by: daRasmussen <daniel.rasmussen@vasteras.se> Co-authored-by: Jonas <jonas.kumlin@karlstad.se> Co-authored-by: Daniel Rasmussen <33061427+daRasmussen@users.noreply.github.com> Co-authored-by: tonnyandersson <tonnyandersson@users.noreply.github.com> Co-authored-by: mulfvik <ulfvik.mikael@outlook.com> Co-authored-by: Iman Tahriri <iman_tahriri@yahoo.com> Co-authored-by: Johnny Blästa <johnny.blasta@sundsvall.se> Co-authored-by: Johnny Blästa <48793206+johnnyblasta@users.noreply.github.com> Co-authored-by: Flodkvist <31692548+Flodkvist@users.noreply.github.com> Co-authored-by: Grammostola <perssond9@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andreas Fogelberg <andreas20@gmail.com> Co-authored-by: hallstaelin <elin.jansson@hallstahammar.se> Co-authored-by: Mattias Spångmyr <mattias.spangmyr@gmail.com> Co-authored-by: Mattias Spångmyr <mattias.spangmyr@haninge.se> Co-authored-by: Iman Tahriri <iman.tahriri@decerno.se>
fixes issue 670 and updates footer param logic.