diff options
author | Piotr Dabrowski <p.dabrowski2@samsung.com> | 2013-10-10 08:46:57 +0200 |
---|---|---|
committer | Piotr Dabrowski <p.dabrowski2@samsung.com> | 2013-10-10 08:46:57 +0200 |
commit | a331e88205b18073c5c473a64b56a5aa570a1b0a (patch) | |
tree | ce8f61661b8f80613fcc9ee5d693f1b75eca14c2 | |
parent | 7ee30fc1632126aa7ef661aa771dfa2e1532d945 (diff) | |
download | EventManager-a331e88205b18073c5c473a64b56a5aa570a1b0a.tar.gz EventManager-a331e88205b18073c5c473a64b56a5aa570a1b0a.tar.bz2 EventManager-a331e88205b18073c5c473a64b56a5aa570a1b0a.zip |
[EventManager] updated EventManager sources
Change-Id: I3f1034b10048d371d5bce3e503f069fb97a9c08c
-rw-r--r-- | css/style.css | 13 | ||||
-rw-r--r-- | js/app.ui.js | 24 | ||||
-rw-r--r-- | templates/alarm.tpl | 2 | ||||
-rw-r--r-- | templates/home.tpl | 6 |
4 files changed, 33 insertions, 12 deletions
diff --git a/css/style.css b/css/style.css index 276c09f..991996e 100644 --- a/css/style.css +++ b/css/style.css @@ -4,6 +4,7 @@ html.ui-mobile, html { body { overflow: hidden; + -webkit-user-select: none; } #new_event label { @@ -123,3 +124,15 @@ input.ui-input-text.customDuration { #events_list > ul { margin-top: 0; } + +#homeDateFilterContainer { + background-color: white; + padding-bottom: 8px; +} + +#homeDateFilterContainer .ui-btn-box-s.ui-btn-up-s { + background: -webkit-linear-gradient(top, #F7F5ED, #ECEAE2) !important; + border: 1px #85837E solid !important; + box-shadow: .5px 1px 1px #85837E !important; +} + diff --git a/js/app.ui.js b/js/app.ui.js index 9afa699..aed5796 100644 --- a/js/app.ui.js +++ b/js/app.ui.js @@ -123,8 +123,10 @@ function Ui() { }); $( window ).resize(function (event) { - var content = $("#new_alarm [data-role=content]"); - content.scrollview('scrollTo', 100, -1 * content.height(), 0); + var content = $("#new_alarm [data-role=content]"), + customDuration = $("#customDuration"), + size = customDuration.position().top + customDuration.outerHeight(); + content.scrollview('scrollTo', 0, -1 * size, 0); }); document.addEventListener('webkitvisibilitychange', function (event) { @@ -713,8 +715,10 @@ function Ui() { if (this.startDate > this.getDateFromPicker(this.end)) { this.setDateValue(this.end, this.endDate) this.showWarning( - 'End date cannot be earlier than initial date', - function () {$("#demo-date-2").datetimepicker()} + 'End date cannot be earlier than initial date.', + function () { + $("#demo-date-2").datetimepicker(); + } ); } else { this.setEndDate(); @@ -727,13 +731,13 @@ function Ui() { }, showWarning: function (text, successCallback) { + if (successCallback instanceof Function) { + $("#popup").one('popupafterclose', successCallback) + } this.lockTabKey(); app.ui.popup(text, { 'OK': function () { $("#popup").popup('close'); - if (successCallback instanceof Function) { - successCallback(); - } } }); this.popup.one("popupafterclose", function () { @@ -855,7 +859,7 @@ function Ui() { }; Ui.prototype.popup = function (text, buttons) { - var i, popup = $("#popup"); + var i, popup = $("#popup"), popupNumber = Object.keys(buttons).length; if(!popup.hasClass('ui-popup')) { popup.popup(); @@ -866,6 +870,10 @@ function Ui() { } $(".ui-popup-button-bg", popup).empty(); + + popup[0].className = popup[0].className.replace(/\bcenter_basic.*?\b/g, ''); + popup.addClass("center_basic_"+popupNumber+"btn"); + for (i in buttons) { if (buttons.hasOwnProperty(i)) { if (buttons[i]) { diff --git a/templates/alarm.tpl b/templates/alarm.tpl index d6ed429..0875219 100644 --- a/templates/alarm.tpl +++ b/templates/alarm.tpl @@ -33,7 +33,7 @@ <input type="radio" class="customDuration" name="radio-choice" id="yes_1" value="Yes" > <label for="yes_1">custom time:</label> <span class="customDetails"> - <input placeholder="0" class="customDuration" type="number" name="radio-choice" min="0" id="customDuration"/> + <input placeholder="0" class="customDuration" type="number" name="radio-choice" min="0" max="9007199254740991" id="customDuration"/> minutes before </span> </div><!-- /content --> diff --git a/templates/home.tpl b/templates/home.tpl index 96b5ac4..cd4dd4a 100644 --- a/templates/home.tpl +++ b/templates/home.tpl @@ -2,9 +2,9 @@ <div data-role="page" id="home" data-add-back-btn="false"> <div data-role="header"> <h1>Event manager</h1> - </div> - <div id="homeDateFilterContainer"> - <input type="date" id="homeDateFilter"/> + <div id="homeDateFilterContainer" data-position="fixed"> + <input type="date" id="homeDateFilter"/> + </div> </div> <div data-role="content"> |