summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Dabrowski <p.dabrowski2@samsung.com>2013-07-15 15:36:10 +0200
committerPiotr Dabrowski <p.dabrowski2@samsung.com>2013-07-15 15:36:10 +0200
commitfefdc1f5ad0dfdf9fde381943c882a1e95160b5a (patch)
tree335f7d7afeba7090ad6c1beb5cacd6d93fa962aa
parente902cf5e7a4c0fcbc0948b95a13b66a1a0088987 (diff)
downloadEventManager-fefdc1f5ad0dfdf9fde381943c882a1e95160b5a.tar.gz
EventManager-fefdc1f5ad0dfdf9fde381943c882a1e95160b5a.tar.bz2
EventManager-fefdc1f5ad0dfdf9fde381943c882a1e95160b5a.zip
[EventManager] updated EventManager sources
Change-Id: I2490d87122ca66fb25c39598614fb191ea483a8f
-rw-r--r--js/app.ui.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/js/app.ui.js b/js/app.ui.js
index c86b55a..230aa8f 100644
--- a/js/app.ui.js
+++ b/js/app.ui.js
@@ -87,6 +87,14 @@ function Ui() {
$("#customDuration").addClass('ui-disabled');
}
});
+
+ $('#customDuration').on('blur', function () {
+ var value = Math.abs(parseInt($(this).val()));
+ if (isNaN(value)) {
+ value = 0;
+ }
+ $(this).val(value);
+ });
});
$(".customDuration, #customDuration").on("tap change", function (e) {
$("#yes_1").attr('checked', true).checkboxradio('refresh');
@@ -490,8 +498,11 @@ function Ui() {
var value = parseInt($("#new_alarm input[type=radio]:checked").val(), 10);
if(isNaN(value))
{
- value = parseInt($("#customDuration").val(), 10);
- }else{
+ value = Math.abs(parseInt($("#customDuration").val()));
+ if (isNaN(value)) {
+ value = 0;
+ }
+ } else {
$("#customDuration").val("").addClass('ui-disabled');
}
return value;
@@ -664,6 +675,7 @@ function Ui() {
addEvent: function Ui_newEvent_addEvent(e) {
e.preventDefault();
e.stopPropagation();
+ app.switchAlarm();
var button = $('#add-event-btn');
if (!button.hasClass('disabled')) {
button.addClass('disabled');
@@ -692,4 +704,4 @@ function Ui() {
}
};
-}()); \ No newline at end of file
+}());