Skip to content

Commit

Permalink
Ticket #173: Fixed margins messed up in previous commit + Fixed displ…
Browse files Browse the repository at this point in the history
…ay save hint layer messed 4 days ago.
  • Loading branch information
frodeheg committed May 9, 2023
1 parent 764c1f0 commit 1e1d6d3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
10 changes: 5 additions & 5 deletions settings/index.html
Expand Up @@ -838,7 +838,7 @@
</head>


<body>
<body class="noMargin">
<!--
<h1 data-i18n="settings.title">.title</h1>
<p data-i18n="settings.subtitle">.subtitle</p>
Expand Down Expand Up @@ -900,7 +900,7 @@ <h1 data-i18n="settings.title">.title</h1>

<!-- Welcome page -->
<div id="welcomePage" class="tabcontent">
<fieldset class="withMargin">
<fieldset>
<legend data-i18n="settings.mode.powerSettings">mode.powerSettings</legend>
<table class="settings_table">
<tr>
Expand Down Expand Up @@ -1733,7 +1733,7 @@ <h1 data-i18n="settings.title">.title</h1>

<!-- Mode specific page -->
<div id="priorityPage" class="tabcontent">
<fieldset class="withMargin">
<fieldset>
<legend><div class="blockHeader" data-i18n="settings.mode.operatingMode">mode.operatingMode</div></legend>
<table class="settings_table">
<tr>
Expand Down Expand Up @@ -1797,7 +1797,7 @@ <h1 data-i18n="settings.title">.title</h1>
</div>
<!-- Mode specific page end -->

<div class="right" style="display:none;" id="saveOuter">
<div class="right withMargin" style="display:none;" id="saveOuter">
<button id="save" class="homey-button-primary-full" data-i18n="settings.saveButton">.saveButton</button>
</div>

Expand Down Expand Up @@ -3041,7 +3041,7 @@ <h1 data-i18n="settings.title">.title</h1>
//resizeIframe('schedulePage', message.w, message.h);
} else if (message.id === 'wizAction') {
runActionQueue(message.actionQueue);
document.getElementById('main_menu').style.zIndex = (message.actionQueue[0].action === UI_SHOW_OVERLAY) ? 1 : 12;
document.getElementById('main_menu').style.zIndex = (message.actionQueue[0].action === UI_SHOW_OVERLAY) ? 1 : 15;
}
};

Expand Down
18 changes: 11 additions & 7 deletions settings/style.css
@@ -1,8 +1,12 @@
.noMargin {
margin: 0px !important;
padding: 0px !important;
}

body {
font-size: 100%;
background-color: powderblue;
overflow: auto;
margin: 0px;
font-size: 100%;
background-color: powderblue;
overflow: auto;
}

img {
Expand Down Expand Up @@ -31,7 +35,7 @@ p {
}

.withMargin {
margin: 6px;
padding: 20px;
}

.small {
Expand Down Expand Up @@ -259,7 +263,7 @@ p {
border: 1px solid rgba(0,0,0,0.5);
border-radius: 8px;
box-shadow: 2px 2px 10px gray;
z-index: 15;
z-index: 12;
}

#loadingText {
Expand Down Expand Up @@ -296,7 +300,7 @@ p {
cursor: pointer;
border-collapse: collapse;
border: 0px solid black;
z-index: 12;
z-index: 15;
}

.menuitem .dropdown{
Expand Down
6 changes: 5 additions & 1 deletion settings/subpages/schedule.html
Expand Up @@ -1171,7 +1171,10 @@ <h3>Time Schedule Preview</h3>
const dragTemp = document.getElementById('dragTemp');
let cpos = canvas.getBoundingClientRect();
let dpos = dragTemp.getBoundingClientRect();
let pos = {x: Math.max(event.clientX - cpos.left - dpos.width - 40, -cpos.left), y: Math.max(event.clientY - cpos.top - dpos.height - 20, -cpos.top)};
let pos = {
x: Math.max(event.clientX - cpos.left - dpos.width - 40, 0),
y: Math.max(event.clientY - cpos.top - dpos.height - 20, 0)
};
dragTemp.style.top = `${pos.y}px`;
dragTemp.style.left = `${pos.x}px`;
dragTemp.innerHTML = `${newTemp}`;
Expand All @@ -1196,6 +1199,7 @@ <h3>Time Schedule Preview</h3>

function abortDragThermo(canvas, event) {
if (thermoIsDragging) {
displaySaveHint();
draggingThermo(canvas, event);
document.getElementById('dragTemp').style.display = 'none';
thermoIsDragging = false;
Expand Down

0 comments on commit 1e1d6d3

Please sign in to comment.