More selective toolbar disable in edit mode.

This commit is contained in:
Oliver Hamlet
2014-11-14 10:12:56 +00:00
parent 8dc14d8dd1
commit 830282e5be
4 changed files with 22 additions and 14 deletions
+6
View File
@@ -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;
}
-11
View File
@@ -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;
+16 -2
View File
@@ -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);
}
-1
View File
@@ -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">