Skip to content

Commit

Permalink
Move map checkboxes into dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
kirovilya committed Mar 27, 2019
1 parent c8c8332 commit e9bc09f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 34 deletions.
8 changes: 8 additions & 0 deletions admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ function load(settings, onChange) {
resetConfirmation();
});

$('#viewconfig').click(function() {
showViewConfig();
});

sendTo(null, 'getGroups', {}, function (data) {
groups = data;
showGroups();
Expand Down Expand Up @@ -1241,3 +1245,7 @@ function resetConfirmation() {
});
});
}

function showViewConfig() {
$('#modalviewconfig').modal('open');
}
83 changes: 49 additions & 34 deletions admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
min-height: 18rem;
overflow-y: scroll;
}
#viewconfigbtn {
left: 23px;
width: 45px;
top: 120px;
}
</style>
</head>
<body>
Expand Down Expand Up @@ -103,43 +108,11 @@ <h5 class="translate center-align">Zigbee adapter</h5>
</div>
</div>
<div id="tab-map" class="col s12 page">

<div class="fixed-action-btn" style="padding-bottom: 100px">
<a id="refresh" class="btn-floating waves-effect waves-light blue tooltipped center-align hoverable translate" data-tooltip="Refresh"><i class="material-icons large">autorenew</i></a>
</div>
<div class="row">
<div class="input-field input-group col s12 m3 l3">
<div id="filterParentTgl" class="input-field col s12 admin-tooltip-icon" title="Show parent">
<label for="filterParent" style="pointer-events: auto;">
<!-- workaround input not clickable https://codepen.io/alexisdiel/pen/gxwPWj -->
<input style="pointer-events: none;" id="filterParent" type="checkbox" class="filled-in" checked="checked"/>
<span style="pointer-events: none; color:#0000ff;">Parent/Child/Unknown</span>
</label>
</div>
<div id="filterSiblTgl" class="input-field col s12 admin-tooltip-icon" title="Show siblings">
<label for="filterSibl" style="pointer-events: auto;">
<input style="pointer-events: none;" id="filterSibl" type="checkbox" class="filled-in"/>
<span style="pointer-events: none; color:#00bb00;" class="translate">Siblings</span>
</label>
</div>
</div>
<div class="input-field input-group col s12 m3 l3">
<div id="filterPrvChildTgl" class="input-field col s12 admin-tooltip-icon" title="Show previous parents">
<label for="filterPrvChild" style="pointer-events: auto;">
<input style="pointer-events: none;" id="filterPrvChild" type="checkbox" class="filled-in"/>
<span style="pointer-events: none; color:#555555;" class="translate">Previous Parents</span>
</label>
</div>
<div id="filterMeshTgl" class="input-field col s12 admin-tooltip-icon" title="Show full mesh">
<label for="filterMesh" style="pointer-events: auto;">
<input style="pointer-events: none;" id="filterMesh" type="checkbox" class="filled-in"/>
<span style="pointer-events: none;">Mesh</span>
</label>
</div>
</div>
<div class="input-field input-group col s12 m6 l6">
<p class="translate">Device map info</p>
</div>
<div id="viewconfigbtn" class="fixed-action-btn top left" style="">
<a id="viewconfig" class="btn-floating waves-effect waves-light orange tooltipped center-align hoverable translate" data-tooltip="View config"><i class="material-icons large">menu</i></a>
</div>
<div id="map" class="row">
</div>
Expand Down Expand Up @@ -453,6 +426,48 @@ <h3 class="translate">Reset confirmation</h3>
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat translate">Cancel</a>
</div>
</div>

<div id="modalviewconfig" class="modal modal-fixed-footer">
<div class="modal-content">
<h3 class="translate">Map view config</h3>
<div class="row">
<div class="input-field input-group col s12 m6 l6">
<div id="filterParentTgl" class="input-field col s12 admin-tooltip-icon" title="Show parent">
<label for="filterParent" style="pointer-events: auto;">
<!-- workaround input not clickable https://codepen.io/alexisdiel/pen/gxwPWj -->
<input style="pointer-events: none;" id="filterParent" type="checkbox" class="filled-in" checked="checked"/>
<span style="pointer-events: none; color:#0000ff;">Parent/Child/Unknown</span>
</label>
</div>
<div id="filterSiblTgl" class="input-field col s12 admin-tooltip-icon" title="Show siblings">
<label for="filterSibl" style="pointer-events: auto;">
<input style="pointer-events: none;" id="filterSibl" type="checkbox" class="filled-in"/>
<span style="pointer-events: none; color:#00bb00;" class="translate">Siblings</span>
</label>
</div>
<div id="filterPrvChildTgl" class="input-field col s12 admin-tooltip-icon" title="Show previous parents">
<label for="filterPrvChild" style="pointer-events: auto;">
<input style="pointer-events: none;" id="filterPrvChild" type="checkbox" class="filled-in"/>
<span style="pointer-events: none; color:#555555;" class="translate">Previous Parents</span>
</label>
</div>
<div id="filterMeshTgl" class="input-field col s12 admin-tooltip-icon" title="Show full mesh">
<label for="filterMesh" style="pointer-events: auto;">
<input style="pointer-events: none;" id="filterMesh" type="checkbox" class="filled-in"/>
<span style="pointer-events: none;">Mesh</span>
</label>
</div>
</div>
<div class="input-field input-group col s12 m6 l6">
<p class="translate">Device map info</p>
</div>
</div>
</div>
<div class="modal-footer">
<!-- <a name="stop" href="#!" class="modal-action modal-close waves-effect waves-red btn-flat left">Stop</a> -->
<a name="hide" href="#!" class="modal-action modal-close waves-effect waves-green btn green translate">Hide</a>
</div>
</div>
</div>
</body>

Expand Down

0 comments on commit e9bc09f

Please sign in to comment.