Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pissirSmartHome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alfredo Chissotti
pissirSmartHome
Commits
84633312
Commit
84633312
authored
2 years ago
by
Alfredo Chissotti
Browse files
Options
Downloads
Patches
Plain Diff
commenti per scenari e qualche fix
parent
7b3a1c4e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
webapp/css/style.css
+3
-14
3 additions, 14 deletions
webapp/css/style.css
webapp/index.html
+19
-23
19 additions, 23 deletions
webapp/index.html
webapp/js/scenari.js
+287
-168
287 additions, 168 deletions
webapp/js/scenari.js
webapp/js/toggles.js
+3
-3
3 additions, 3 deletions
webapp/js/toggles.js
with
312 additions
and
208 deletions
webapp/css/style.css
+
3
−
14
View file @
84633312
...
...
@@ -47,18 +47,7 @@
.more-margin-top
{
border-top
:
20px
solid
transparent
;
}
/* center on the screen below any other element */
.center-on-screen
{
position
:
relative
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
/* set to the right of the screen, below any other element */
.right-on-screen
{
position
:
relative
;
top
:
50%
;
right
:
50%
;
/* transform: translate(-50%, -50%); */
/* left: 0; */
.end-10px
{
right
:
10px
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
webapp/index.html
+
19
−
23
View file @
84633312
...
...
@@ -38,7 +38,6 @@
<span>
Luci
</span>
</button>
<button
class=
"btn-12 btn btn-dark"
>
<span>
Scenari
</span>
</button>
<button
class=
"btn-12 btn btn-dark"
>
...
...
@@ -114,31 +113,22 @@
</tr> -->
</tbody>
</table>
<!-- <div> -->
<!-- class="d-flex justify-content-around" -->
<span
class=
"invisible"
>
<span
id=
"termina-registrazione-launcher"
data-bs-toggle=
"modal"
data-bs-target=
"#termina-registrazione-modal"
></span>
<span
id=
"registra-modal-launcer"
data-bs-toggle=
"modal"
data-bs-target=
"#scenari-modal"
></span>
</span>
<!-- TODO center button -->
<button
id=
"scenari-registra"
type=
"button"
class=
"btn btn-info center-on-screen"
>
Registra
</button>
<!-- TODO set to the right -->
<div
class=
"right-on-screen"
>
<span>
Antifurto:
</span>
<!-- change btn-danger to btn-success when ON -->
<button
type=
"button"
class=
"btn btn-danger"
id=
"scenari-stato-antifurto"
>
OFF
<div
class=
"position-relative"
>
<button
id=
"scenari-registra"
type=
"button"
class=
"btn btn-info position-absolute top-0 start-50 translate-middle-x"
>
Registra
</button>
<span
id=
"lancia-antifurto-modal"
data-bs-toggle=
"modal"
data-bs-target=
"#antifurto-modal"
></span>
<div
class=
"position-absolute top-0 end-10px"
>
<span>
Antifurto:
</span>
<button
type=
"button"
class=
"btn btn-danger"
id=
"scenari-stato-antifurto"
>
OFF
</button>
</div>
</div>
<!-- </div> -->
</div>
<!-- antifurto -->
<!--
TODO
antifurto -->
<div
id=
"antifurtoContainer"
class=
"invisible"
>
<div
class=
"switch-container no-box-sizing"
>
<div
class=
"toggle-button no-box-sizing"
>
...
...
@@ -192,6 +182,11 @@
</div>
</div>
<!-- scenari modal -->
<span
class=
"invisible"
>
<span
id=
"termina-registrazione-launcher"
data-bs-toggle=
"modal"
data-bs-target=
"#termina-registrazione-modal"
></span>
<span
id=
"registra-modal-launcer"
data-bs-toggle=
"modal"
data-bs-target=
"#scenari-modal"
></span>
</span>
<div
class=
"modal fade"
id=
"scenari-modal"
tabindex=
"-1"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered"
>
<div
class=
"modal-content"
>
...
...
@@ -281,6 +276,7 @@
</div>
</div>
<!-- antifurto modal -->
<span
id=
"lancia-antifurto-modal"
data-bs-toggle=
"modal"
data-bs-target=
"#antifurto-modal"
></span>
<div
class=
"modal fade"
id=
"antifurto-modal"
tabindex=
"-1"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered"
>
<div
class=
"modal-content"
>
...
...
This diff is collapsed.
Click to expand it.
webapp/js/scenari.js
+
287
−
168
View file @
84633312
This diff is collapsed.
Click to expand it.
webapp/js/toggles.js
+
3
−
3
View file @
84633312
...
...
@@ -15,11 +15,11 @@ function setToggleMovement2(toggle) {
},
false
);
}
function
scenariToggleListener
(
toggle
,
name
)
{
function
scenariToggleListener
(
toggle
,
scenarioID
)
{
toggle
.
addEventListener
(
'
click
'
,
event
=>
{
event
.
preventDefault
// select the option from the dropdown
Scenari
.
addNameHere
.
value
=
name
;
Scenari
.
addNameHere
.
value
=
scenarioID
;
// change text of the modal based on toggle state
const
modalBody
=
document
.
getElementById
(
'
attiva-scenari-modal
'
).
querySelector
(
'
.modal-body
'
);
const
children
=
modalBody
.
children
;
...
...
@@ -44,7 +44,7 @@ function scenariToggleListener(toggle, name) {
okBtn
.
innerText
=
"
Attiva
"
;
}
// launch the modal
const
modalLauncher
=
document
.
getElementById
(
'
launch-modal-
'
+
name
);
const
modalLauncher
=
document
.
getElementById
(
'
launch-modal-
'
+
scenarioID
);
modalLauncher
.
click
();
},
false
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment