Skip to content

Commit 475f713

Browse files
committed
show modal for lstart execution
1 parent 4a679de commit 475f713

3 files changed

Lines changed: 50 additions & 2 deletions

File tree

css/style.css

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,22 @@ textarea {
164164
.right-margin {
165165
right: 24px;
166166
}
167+
/*Modal*/
168+
.modal-kathara {
169+
display: inherit!important;
170+
z-index: 9999;
171+
background: rgb(189, 189, 189); /* Fall-back for browsers that don't support rgba */
172+
background: rgba(189, 189, 189, 0.5);
173+
}
174+
175+
.modal-kathara .modal-content{
176+
border-radius: 0!important;
177+
}
178+
179+
.modal-kathara .modal-footer{
180+
border: 0!important;
181+
padding-top: 0px;
182+
}
167183
/*Navbar*/
168184
.navbar-kathara {
169185
position: fixed;
@@ -177,7 +193,7 @@ textarea {
177193
box-shadow: 0 2px 2px 2px rgba(0, 0, 0, 0.35);
178194
}
179195
.navbar-kathara-primary {
180-
z-index: 9999;
196+
z-index: 9998;
181197
top: 0;
182198
}
183199
.navbar-kathara li a, .navbar-kathara li a:visited, .navbar-kathara li a:focus {
@@ -188,7 +204,7 @@ textarea {
188204
background-color: #5b8fbd;
189205
}
190206
.navbar-kathara-secondary {
191-
z-index: 9998;
207+
z-index: 9999;
192208
top: 51px;
193209
background-color: #5b8fbd;
194210
}

index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,26 @@ <h4>Bash file preview:</h4>
315315
</small>
316316
</div><!-- /.container-fluid -->
317317
</nav>
318+
319+
<!-- Lstart Modal -->
320+
<div id="lstartModal" class="modal modal-kathara ng-hide">
321+
<div class="modal-dialog">
322+
<!-- Modal content-->
323+
<div class="modal-content">
324+
<div class="modal-header">
325+
<button type="button" class="close" onclick="close_modal(event)">&times;</button>
326+
<h4 class="modal-title">Running Lstart</h4>
327+
</div>
328+
<div class="modal-body">
329+
<p>The command has been issued, please wait for its execution.</p>
330+
</div>
331+
<div class="modal-footer">
332+
<button type="button" class="btn btn-warning" onclick="close_modal(event)">Ok, I understand</button>
333+
</div>
334+
</div>
335+
</div>
336+
</div>
337+
318338
<!-- Sub-menu Download Lab -->
319339
<nav id="submenu-1" class="navbar navbar-primary navbar-kathara navbar-kathara-secondary ng-hide">
320340
<div class="container-fluid">
@@ -392,6 +412,7 @@ <h4>Bash file preview:</h4>
392412
}
393413
function executeStart(e){
394414
e.preventDefault();
415+
show_modal();
395416
const {ipcRenderer} = electron;
396417
//console.log(script);
397418
ipcRenderer.send('script:execute');

js/page.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,15 @@ function toggle_submenu(e, number, total) {
4848
function toggle_tab_and_submenu(event, elem, total_submenus) {
4949
toggle_submenu(event, -1, total_submenus);
5050
toggle_tab(event, elem);
51+
}
52+
53+
function close_modal(e){
54+
e.preventDefault();
55+
var modal = document.getElementById("lstartModal");
56+
modal.classList.add("ng-hide");
57+
}
58+
59+
function show_modal(){
60+
var modal = document.getElementById("lstartModal");
61+
modal.classList.remove("ng-hide");
5162
}

0 commit comments

Comments
 (0)