Commit Graph

43 Commits

Author SHA1 Message Date
Martin Raifer
eec5032251 fix labeling of "reverse" button 2021-11-30 16:22:13 +01:00
Martin Raifer
9f3f8e1366 rename method 2021-11-29 19:26:18 +01:00
Martin Raifer
d78c357588 replace raw html injection of localized texts
by using d3 to insert the localized text spans directly into the DOM
2021-11-26 18:51:45 +01:00
Quincy Morgan
cb7f1c2b3c Update to id-tagging-schema v3.0.0
Add UI for translatable combo fields
2020-12-08 15:23:51 -05:00
Quincy Morgan
baabd81987 Unbundle id-tagging-schema data and translations
Update for id-tagging-schema 2.0.0
2020-12-01 11:14:14 -05:00
Quincy Morgan
154c6ed0ed Fix issue where clicking some buttons would clear the URL hash 2020-10-27 09:56:05 -04:00
Quincy Morgan
21a49bbec8 Initial support for D3 v6.2.0 2020-10-06 15:08:39 -04:00
Quincy Morgan
4600ab596f Add lang attribute to more display labels (re: #7963) 2020-09-23 10:10:24 -04:00
Quincy Morgan
5435082d9c Revert t function to returning the plain string by default
Add `t.html` function for getting the string with the `lang` attribute
2020-09-22 12:03:29 -04:00
Quincy Morgan
a3549f9a76 Merge branch 'develop' into lang-attributes
# Conflicts:
#	modules/ui/commit_warnings.js
#	modules/ui/field.js
#	modules/ui/fields/wikidata.js
#	modules/ui/fields/wikipedia.js
#	modules/ui/full_screen.js
#	modules/ui/panels/history.js
#	modules/ui/sections/entity_issues.js
#	modules/ui/sections/map_features.js
#	modules/ui/sections/raw_member_editor.js
#	modules/ui/sections/validation_rules.js
#	modules/ui/tag_reference.js
2020-09-22 10:55:07 -04:00
Quincy Morgan
79688ce2d9 Show count and use plural forms for more operation strings (re: #8014) 2020-09-22 09:10:49 -04:00
Quincy Morgan
7157feba20 Don't make button text bold by default
Make the oneway field reverser a button instead of a link
2020-09-18 13:14:01 -04:00
Quincy Morgan
32f8274929 Make t function return a span element with a lang attribute unless html: false is specified in the options (re: #7963)
Update `text` functions to `html` to support inserting the `span` elements
Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
2020-09-15 21:56:22 -04:00
Quincy Morgan
42efdf29f1 More progress on #7965 2020-09-10 15:03:18 -04:00
Quincy Morgan
a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
Quincy Morgan
0931459dba Reduce use of global selection (re: #7445) 2020-03-24 13:02:06 -07:00
Quincy Morgan
4872b06a28 Randomize form field ids to thwart browser memory and help with embedding iD (close #6444) 2020-03-21 13:16:40 -07:00
Quincy Morgan
1b331bb678 Add mechanism for fields to support editing during multiselection (re: #7276)
Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
2020-01-30 13:53:29 -05:00
Quincy Morgan
38ebef10d2 Revalidate after reversing ways via the One Way field 2019-12-06 11:04:16 -05:00
Quincy Morgan
d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Bryan Housel
958d7fac4f wip changing all fields to use flexbox everywhere 2018-11-28 18:15:38 -05:00
Bryan Housel
4533603a88 preset-input-wrap -> form-field-input-wrap
This better describes what it does.
Also, took this opportunity to update a bunch of the uifield code
(no multi line variable declarations, prefix state variables with _,
eliminate unnecessray lodash, etc)
2018-11-27 10:54:03 -05:00
Bryan Housel
470835b38f Extract all graphics from iD sprite, reassemble with svg-sprite
All iD sprite graphics are now prefixed with `iD-`
Also includes support for sending the preset logos to taginfo
2018-06-08 16:06:46 -04:00
Bryan Housel
7bf544c28a Don't click cycle through alternating or reversible oneway states
(closes #4970)

They are still supported as translated strings, and user can still enter these
values in the raw tag editor, but they should not toggle with clicks in the
checkbox field.  This is because novice users are confused by what they mean.
2018-04-09 10:48:21 -04:00
Bryan Housel
4a71aa6146 Use safer field ids in classes, element ids, css selectors
Fixes issue with nested/namespaced fields, such as `maxspeed/advisory`,
in situations where would try to use a css selector or element id.
Can't use characters like '/' in a css selector.
2018-03-15 00:57:41 -04:00
Bryan Housel
b2eb982044 Add support for oneway alternating/reversible to oneway check fields
Also allow checkbox field to display non-standard values
(i.e. not 'yes' or 'no) in the field label
2018-01-04 13:41:35 -05:00
Bryan Housel
6d65a1c89a Convert lodah-es and d3 to named imports for ui/fields 2017-09-26 00:17:13 -04:00
Bryan Housel
1486c3db28 Make sure reverserSetText only called for onewayCheck field 2017-03-25 22:48:40 -04:00
Bryan Housel
1ecb456a3c Support 1 and -1 in onewayCheck field
(closes #3910)
2017-03-20 22:23:52 -04:00
Bryan Housel
2b50d96f38 Remove unused variable - eslint warning 2017-03-10 22:48:21 -05:00
Bryan Housel
b1b47760ac Adjust reverser button styling, make it work on tag change 2017-03-03 17:00:24 -05:00
Bryan Housel
74155a9286 Add reverser button to onewayCheck field 2017-03-03 11:58:02 -05:00
Bryan Housel
6a85e5483c Standard camel case for defaultCheck field (not used anywhere) 2017-03-03 10:28:40 -05:00
Bryan Housel
a3de3534c3 Don't reuse click handler in enter selection, set on update
(closes #3638)
2016-12-08 11:08:21 -05:00
Bryan Housel
07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel
c5a8bcc3a6 More fixes to fields 2016-09-18 12:57:23 -04:00
Bryan Housel
a86f34b4ef Pacify eslint, get build and tests running again 2016-08-26 01:15:07 -04:00
Tom MacWright
cdb533fa84 Begin d3 v4 update 2016-08-21 15:19:27 -04:00
Tom MacWright
af776501d3 Require locale, second pass (#3259)
* Require locale, second pass

* Remove t global, remove t where it isn't needed
2016-07-21 16:20:13 -04:00
Bryan Housel
cb71e90384 Module for iD.Detect() (#3243)
* convert iD.Detect() iife to a module

* iD.Detect() should return loaded locale (except for 'en')

(The previous code was a hack to replace the detected locale with the loaded
locale.  Now that Detect is a module, we can not replace the detected locale
from external code, but we can have Detect() return the locale we really want)
2016-07-13 09:15:47 -04:00
Kushan Joshi
780960c711 interim 2016-07-06 00:34:35 +05:30
Kushan Joshi
7188065a6c disband ui/core 2016-07-02 19:04:51 +05:30