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:
commit
e793db40b1
3 changed files with 17 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -30,3 +30,5 @@ toolbar:
|
||||||
css:
|
css:
|
||||||
theme:
|
theme:
|
||||||
css/toolbar.css: { }
|
css/toolbar.css: { }
|
||||||
|
js:
|
||||||
|
js/toolbar.js: { weight: -50 }
|
||||||
|
|
14
modules/core/ui/theme/js/toolbar.js
Normal file
14
modules/core/ui/theme/js/toolbar.js
Normal 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');
|
||||||
|
}
|
||||||
|
}());
|
Loading…
Reference in a new issue