mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
More selective toolbar disable in edit mode.
This commit is contained in:
@@ -10,9 +10,15 @@
|
||||
#gameMenu::shadow > paper-dropdown-menu {
|
||||
border-bottom-color: #f1f1f1;
|
||||
}
|
||||
#gameMenu[disabled]::shadow > paper-dropdown-menu {
|
||||
border-bottom-color: #c9c9c9;
|
||||
}
|
||||
#gameMenu::shadow > paper-dropdown-menu::shadow #label, #gameMenu::shadow > paper-dropdown-menu::shadow #arrow {
|
||||
color: white;
|
||||
}
|
||||
#gameMenu[disabled]::shadow > paper-dropdown-menu::shadow #label, #gameMenu[disabled]::shadow > paper-dropdown-menu::shadow #arrow {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
#gameMenu {
|
||||
color: black;
|
||||
}
|
||||
|
||||
@@ -182,17 +182,6 @@ td input {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.editMode core-toolbar {
|
||||
opacity: 0.7
|
||||
}
|
||||
.editMode #headerOverlay {
|
||||
z-index: 3;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
[draggable] {
|
||||
-webkit-user-select: none;
|
||||
cursor: move;
|
||||
|
||||
@@ -1049,7 +1049,14 @@ function handleEditorOpen(evt) {
|
||||
++numEditors;
|
||||
|
||||
if (numEditors == 1) {
|
||||
document.body.classList.add('editMode');
|
||||
/* Disable the toolbar elements. */
|
||||
document.getElementById('wipeUserlistButton').setAttribute('disabled', '');
|
||||
document.getElementById('copyContentButton').setAttribute('disabled', '');
|
||||
document.getElementById('refreshContentButton').setAttribute('disabled', '');
|
||||
document.getElementById('settingsButton').setAttribute('disabled', '');
|
||||
document.getElementById('gameMenu').setAttribute('disabled', '');
|
||||
document.getElementById('updateMasterlistButton').setAttribute('disabled', '');
|
||||
document.getElementById('sortButton').setAttribute('disabled', '');
|
||||
}
|
||||
document.body.setAttribute('data-editors', numEditors);
|
||||
}
|
||||
@@ -1102,7 +1109,14 @@ function handleEditorClose(evt) {
|
||||
--numEditors;
|
||||
|
||||
if (numEditors == 0) {
|
||||
document.body.classList.remove('editMode');
|
||||
/* Re-enable toolbar elements. */
|
||||
document.getElementById('wipeUserlistButton').removeAttribute('disabled');
|
||||
document.getElementById('copyContentButton').removeAttribute('disabled');
|
||||
document.getElementById('refreshContentButton').removeAttribute('disabled');
|
||||
document.getElementById('settingsButton').removeAttribute('disabled');
|
||||
document.getElementById('gameMenu').removeAttribute('disabled');
|
||||
document.getElementById('updateMasterlistButton').removeAttribute('disabled');
|
||||
document.getElementById('sortButton').removeAttribute('disabled');
|
||||
}
|
||||
document.body.setAttribute('data-editors', numEditors);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<!-- oncontextmenu attribute disables the right-click menu. -->
|
||||
<body oncontextmenu="return false" unresolved fullbleed vertical layout >
|
||||
<core-toolbar id="mainToolbar">
|
||||
<div id="headerOverlay"></div>
|
||||
<paper-menu-button>
|
||||
<paper-icon-button icon="menu"></paper-icon-button>
|
||||
<paper-dropdown class="dropdown">
|
||||
|
||||
Reference in New Issue
Block a user