3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Open the Gin toolbar by default #470

This commit is contained in:
Michael Stenta 2022-01-05 12:24:30 -05:00
commit e793db40b1
3 changed files with 17 additions and 0 deletions

View file

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- [Open the Gin toolbar by default #470](https://github.com/farmOS/farmOS/pull/470)
- [Enforce that the changelog is updated with every pull request #469](https://github.com/farmOS/farmOS/pull/469) - [Enforce that the changelog is updated with every pull request #469](https://github.com/farmOS/farmOS/pull/469)
### Fixed ### Fixed

View file

@ -30,3 +30,5 @@ toolbar:
css: css:
theme: theme:
css/toolbar.css: { } css/toolbar.css: { }
js:
js/toolbar.js: { weight: -50 }

View file

@ -0,0 +1,14 @@
(function () {
// Open the Gin toolbar by default.
var itemName = 'Drupal.gin.toolbarExpanded';
if (localStorage.getItem(itemName) === null) {
localStorage.setItem(itemName, 'true');
}
// @todo Remove this when new Gin version is released.
// Gin changed the name after 8.x-3.0-alpha37.
itemName = 'GinSidebarOpen';
if (localStorage.getItem(itemName) === null) {
localStorage.setItem(itemName, 'true');
}
}());