Skip to content

Commit a612872

Browse files
author
Martin Hlaváč
committed
Popups confirmation changes
+ Reset button confirmation, Bulma update and a few other minor changes
1 parent 75ac0f8 commit a612872

File tree

9 files changed

+47
-25
lines changed

9 files changed

+47
-25
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Events Timer
22

3-
This is a very simple application for visual display and highlighting the events (time) countdown for speakers.
3+
This is a simple countdown application with two time dependent notifications.
4+
The main use is for speakers at events and conferences ...
45

5-
https://hlavacm.github.io/events-timer/
6+
See at: https://hlavacm.github.io/events-timer/

docs/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<title>Event Timer - 404</title>
99
<meta name="keywords" content="event,timer,countdown">
10-
<meta name="description" content="This is a very simple application for visual display and highlighting the events (time) countdown for speakers.">
10+
<meta name="description" content="This is a simple countdown application with two time dependent notifications. The main use is for speakers at events and conferences ...">
1111
<meta name="author" content="Martin Hlaváč">
1212
<meta name="robots" content="noindex,nofollow" />
1313
<meta property="og:title" content="Event Timer - Countdown">
1414
<meta property="og:image" content="images/icon.png">
15-
<meta property="og:description" content="This is a very simple application for visual display and highlighting the events (time) countdown for speakers.">
15+
<meta property="og:description" content="This is a simple countdown application with two time dependent notifications. The main use is for speakers at events and conferences ...">
1616
<link rel="icon" href="images/favicon.ico">
1717
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed">
1818
<link rel="stylesheet" type="text/css" href="styles.css">

docs/index.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<title>Event Timer - Countdown</title>
99
<meta name="keywords" content="event,timer,countdown">
10-
<meta name="description" content="This is a very simple application for visual display and highlighting the events (time) countdown for speakers.">
10+
<meta name="description" content="This is a simple countdown application with two time dependent notifications. The main use is for speakers at events and conferences ...">
1111
<meta name="author" content="Martin Hlaváč">
1212
<meta property="og:title" content="Event Timer - Countdown">
1313
<meta property="og:image" content="images/icon.png">
14-
<meta property="og:description" content="This is a very simple application for visual display and highlighting the events (time) countdown for speakers.">
14+
<meta property="og:description" content="This is a simple countdown application with two time dependent notifications. The main use is for speakers at events and conferences ...">
1515
<link rel="icon" href="images/favicon.ico">
1616
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed">
1717
<link rel="stylesheet" type="text/css" href="styles.css">
@@ -51,7 +51,7 @@
5151
<button id="settings-button" class="button is-info modal-button" data-target="#settings-modal"><span>Settings</span></button>
5252
</p>
5353
<p class="control">
54-
<button id="credits-button" class="button is-info modal-button" data-target="#credits-modal"><span>Credits</span></button>
54+
<button id="credits-button" class="button is-primary modal-button" data-target="#credits-modal"><span>Credits</span></button>
5555
</p>
5656
</div>
5757
</div>
@@ -150,6 +150,10 @@
150150
</div>
151151

152152
</section>
153+
<footer class="modal-card-foot">
154+
<a id="save-settings-button" class="button is-success">Apply</a>
155+
<a class="button close-modal-button">Close</a>
156+
</footer>
153157
</div>
154158
</div>
155159

@@ -162,7 +166,8 @@
162166
</header>
163167
<section class="modal-card-body">
164168
<div class="content">
165-
<p>This is a very simple application for visual display and highlighting the events (time) countdown for speakers.</p>
169+
<p>This is a simple countdown application with two time dependent notifications. The main use is for speakers at events
170+
and conferences ...</p>
166171
<p>Copyright &copy; <a href="http://hlavacm.net" target="_blank">Martin Hlaváč</a> 2017</p>
167172
</div>
168173
<div class="content is-small">
@@ -184,6 +189,9 @@
184189
</ul>
185190
</div>
186191
</section>
192+
<footer class="modal-card-foot">
193+
<a class="button close-modal-button">OK</a>
194+
</footer>
187195
</div>
188196
</div>
189197

docs/scripts.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "events-timer",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"author": "Martin Hlaváč",
5-
"description": "This is a very simple application for visual display and highlighting the events (time) countdown for speakers.",
5+
"description": "This is a simple countdown application with two time dependent notifications. The main use is for speakers at events and conferences ...",
66
"dependencies": {
7-
"bulma": "^0.4.3",
7+
"bulma": "^0.4.4",
88
"jquery": "^3.2.1",
99
"jquery.runner": "^2.3.0",
1010
"js-cookie": "^2.1.4"
@@ -22,4 +22,4 @@
2222
"countdown"
2323
],
2424
"license": "BSD-3-Clause"
25-
}
25+
}

src/scripts/control.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,23 @@ stopButton.click(function () {
3838
});
3939

4040
resetButton.click(function () {
41+
if (!confirm("Reset cancels countdown and restores default state. Do you really want to confirm it?")) {
42+
return;
43+
}
4144
resetState();
4245
});
4346

4447
$(".modal-button").click(function () {
4548
$($(this).data("target")).addClass("is-active");
4649
});
4750

48-
$(".close-modal,.modal-background").click(function () {
49-
if ($("#settings-modal").hasClass("is-active")) {
50-
updateSettings();
51-
}
52-
$(this).parents("div.modal").removeClass("is-active");
51+
$(".close-modal,.modal-background,.close-modal-button").click(function () {
52+
closeModal($(this));
53+
});
54+
55+
$("#save-settings-button").click(function () {
56+
updateSettings();
57+
closeModal($(this));
5358
});
5459

5560
function resetState() {
@@ -66,9 +71,13 @@ function resetState() {
6671
setDefaults();
6772
}
6873

74+
function closeModal(element) {
75+
element.parents("div.modal").removeClass("is-active");
76+
}
77+
6978
function updateSettings() {
70-
if (countdown.runner("info").running) {
71-
if (!confirm("Settings update will reset. Do you want to continue?")) {
79+
if (resetButton.prop("disabled") == false) {
80+
if (!confirm("Apply will do reset. Do you really want to confirm it?")) {
7281
return;
7382
}
7483
}

src/styles/app.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ body {
88

99
#countdownExpired {
1010
font-size: 10vw;
11+
}
12+
13+
.modal-card-foot {
14+
justify-content: space-between;
1115
}

0 commit comments

Comments
 (0)