[ExercisePlanner]update ExercisePlanner(tizen_2.1)
authorji.ji <ji.ji@samsung.com>
Thu, 23 May 2013 06:54:54 +0000 (15:54 +0900)
committerji.ji <ji.ji@samsung.com>
Thu, 23 May 2013 06:54:54 +0000 (15:54 +0900)
Change-Id: I10e714f6bb19f9252f351115ffc57e0e55630a4e

icon.png
js/UI.js

index 33fbb63..9765b1b 100644 (file)
Binary files a/icon.png and b/icon.png differ
index 41cab09..aac29b5 100644 (file)
--- a/js/UI.js
+++ b/js/UI.js
@@ -47,6 +47,10 @@ function UI() {
                });
        };
 
+       UI.prototype.clearTabbars = function () {
+               $('[data-role = "tabbar"] li > a').removeClass('ui-focus, ui-btn-active');
+       };
+
        UI.prototype.fillTimesRanges = function (timesData) {
                var self = this, len, i;
 
@@ -149,6 +153,7 @@ function UI() {
 
        UI.prototype.addExercise = function () {
                var trimmedName = $("#newExerciseName").val().trim();
+               trimmedName = $('<span>').text(trimmedName).html();
                if (trimmedName !== '') {
                        if (this.app.addExercise(trimmedName)) {
                                $("#newExerciseName").trigger('blur');
@@ -283,6 +288,10 @@ function UI() {
                $('#wait').on('tap', self.app.wait.bind(self.app));
                $('#todayOffAll').on('tap', self.app.todayOffAll.bind(self.app));
 
+               $('[data-role = "tabbar"] li > a').on('click', function () {
+                       self.clearTabbars();
+               });
+
                $('#startStop').on('tap', function () {
                        self.app.appStartStop();
                });
@@ -366,7 +375,7 @@ function UI() {
                });
 
                $('#customExercises').on('pageinit', function (page, options) {
-                       $('#btnNewExercise').on('click', self.addExercise.bind(self));
+                       $('#btnNewExercise').on('tap', self.addExercise.bind(self));
                });
 
                $('#customExercises').on('pageshow', function (page, options) {