3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
farmOS/modules
Symbioquine 9c94dab9db Decouple FarmMap render element styling and JS instantiation #436
**Why?** It should be possible to leverage the farm_map
module's extension mechanism and default styling without
necessarily giving it full control over when the map
instance gets created.

Currently, the FarmMap render element uses the 'farm-map'
CSS class to inform the JS code in `farm_map.js` that it should
instantiate the map. This is problematic since that CSS class
is also used for styling and there's a bunch of code in the
FarmMap render element and in `farm_map.js` which should
be common to pretty much all farmOS maps.

To fix that, this change introduces a new [data attribute] which
is used instead of the CSS class to signal the JS code in `farm_map.js`
that it should actually instantiate the map.

[data attribute]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
2021-09-03 15:20:26 -04:00
..
asset Use asset names helper function to generate log names when using the group/move actions. 2021-08-30 17:55:58 -04:00
core Decouple FarmMap render element styling and JS instantiation #436 2021-09-03 15:20:26 -04:00
log Move default_quantity_type third-party setting and logic to farm_log_quantity. 2021-07-22 17:40:16 -04:00
quantity The farm_quantity_price module depends on farm_entity. 2021-07-22 17:40:16 -04:00
taxonomy Split Units vocabulary out to a separate module, depended upon by Quantity. 2021-02-05 12:23:20 -05:00
ui Set popup behavior weight to -100. 2021-09-03 15:19:03 -04:00