[ExercisePlanner]update ExercisePlanner(tizen_2.1)
authorji.ji <ji.ji@samsung.com>
Tue, 4 Jun 2013 07:10:32 +0000 (16:10 +0900)
committerji.ji <ji.ji@samsung.com>
Tue, 4 Jun 2013 07:10:32 +0000 (16:10 +0900)
Change-Id: I40cb1a3fa1e3b6089316556df839e191e1944b9e

config.xml
icon.png
js/UI.js

index bcd530b..7ae0917 100644 (file)
@@ -1,16 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets"
-       id="http://sample-web-application.tizen.org/ExercisePlanner" version="2.1.0"
-       viewmodes="maximized">
-       <tizen:application id="zED1oRD3Hv.ExercisePlanner"
-               package="zED1oRD3Hv" required_version="2.1" />
-       <content src="index.html" />
-       <icon src="icon.png" />
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://sample-web-application.tizen.org/ExercisePlanner" version="2.1.0" viewmodes="maximized">
+       <tizen:application id="zED1oRD3Hv.ExercisePlanner" package="zED1oRD3Hv" required_version="2.1"/>
+       <content src="index.html"/>
+       <icon src="icon.png"/>
        <name>ExercisePlanner</name>
-       <tizen:privilege name="http://tizen.org/privilege/alarm" />
-       <tizen:privilege name="http://tizen.org/privilege/application.launch" />
-       <tizen:privilege name="http://tizen.org/privilege/time" />
-       <tizen:setting screen-orientation="portrait"
-               context-menu="disable" background-support="disable" encryption="disable"
-               install-location="auto" />
+       <tizen:privilege name="http://tizen.org/privilege/alarm"/>
+       <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
+       <tizen:privilege name="http://tizen.org/privilege/time"/>
+       <tizen:setting screen-orientation="portrait" context-menu="disable" background-support="disable" encryption="disable" install-location="auto"/>
 </widget>
index 9765b1b..5934757 100644 (file)
Binary files a/icon.png and b/icon.png differ
index aac29b5..530f0df 100644 (file)
--- a/js/UI.js
+++ b/js/UI.js
@@ -64,13 +64,21 @@ function UI() {
                $('#availableTime').trigger('create');
                $('#availableTime').listview().listview('refresh');
                $('#availableTime :jqmData(name=edit)').on('tap', function (e) {
-                       e.preventDefault();
-                       e.stopPropagation();
-                       self.editTimeRange($(this).data('val'));
+                       if (self.app.config.trainingEnabled) {
+                               alert('You should stop the training first');
+                       } else {
+                               e.preventDefault();
+                               e.stopPropagation();
+                               self.editTimeRange($(this).data('val'));
+                       }
                });
                $('#availableTime :jqmData(name=disable)').on('tap', function (e) {
-                       e.stopPropagation();
-                       self.app.disableTimeRange($(this).data('val'));
+                       if (self.app.config.trainingEnabled) {
+                               alert('You should stop the training first');
+                       } else {
+                               e.stopPropagation();
+                               self.app.disableTimeRange($(this).data('val'));
+                       }
                });
                $('#availableTime :jqmData(name=delete)').on('tap', function (e) {
                        e.stopPropagation();