<?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>
$('#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();