Skip to content

Commit

Permalink
Add schedule dialog
Browse files Browse the repository at this point in the history
[Issue] #1078
[Problem] - Schedule dialog doesn't exists
[Solution]
 - Add dialog element to Sample App
 - Connect Pages using it
 - Add application as TAU project

Signed-off-by: Kornelia Kobiela <korneliak.95@gmail.com>
  • Loading branch information
korneliakobiela authored and Kornelia Kobiela committed May 14, 2020
1 parent 3f50a77 commit 472a070
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 33 deletions.
11 changes: 11 additions & 0 deletions examples/mobile/ScheduleApp/.tproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tproject xmlns="http://www.tizen.org/tproject">
<platforms>
<platform>
<name>mobile-5.5</name>
</platform>
</platforms>
<package>
<blacklist/>
</package>
</tproject>
9 changes: 9 additions & 0 deletions examples/mobile/ScheduleApp/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/ScheduleApp" version="1.0.0" viewmodes="maximized">
<tizen:application id="lA5ez9qzjG.ScheduleApp" package="lA5ez9qzjG" required_version="3.0"/>
<content src="index.html"/>
<feature name="http://tizen.org/feature/screen.size.all"/>
<icon src="icon.png"/>
<name>ScheduleApp</name>
<tizen:profile name="mobile"/>
</widget>
3 changes: 3 additions & 0 deletions examples/mobile/ScheduleApp/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.popup-list a{
text-decoration: none;
}
Binary file added examples/mobile/ScheduleApp/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/mobile/ScheduleApp/images/tizen_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions examples/mobile/ScheduleApp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Scheduling App</title>
<link href="lib/tau/mobile/theme/default/tau.css" rel="stylesheet" />
<link rel="stylesheet" href="css/style.css" />
<script data-build-remove="false" src="lib/tau/mobile/js/tau.js">
</script>
</head>

<body>
<div class="ui-page ui-page-active" id="main">
<header>
<div class="ui-appbar-left-icons-container">
<a href="#" class="ui-btn ui-btn-icon ui-btn-icon-back" data-style="flat" data-rel="back"></a>
</div>
<div class="ui-appbar-title-container">
<span class="ui-appbar-title">Schedule</span>
</div>
<div class="ui-appbar-action-buttons-container">
<a class="ui-btn ui-btn-icon ui-btn-icon-add" data-style="flat" href="#turn-on-dialog"></a>
<button class="ui-btn ui-btn-icon ui-btn-icon-more" data-style="flat"></button>
</div>
</header>
<div class="ui-content">
<div class="ui-popup" id="turn-on-dialog">
<div class="ui-popup-header">
Add Schedule
</div>
<div class="ui-popup-content">
<ul class="ui-listview ui-popup-listview popup-list">
<li class="ui-group-index">
<div class="ui-li-text">
<a href="./create-event.html" class="ui-li-text-title">Turn device on</a>
</div>
</li>
<li class="ui-group-index">
<div class="ui-li-text">
<a href="./create-event.html" class="ui-li-text-title">Turn device off</a>
</div>
</li>
<li class="ui-group-index">
<div class="ui-li-text">
<a href="./create-event.html" class="ui-li-text-title">Turn device on and off</a>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</body>

</html>
22 changes: 22 additions & 0 deletions examples/mobile/ScheduleApp/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(function () {
window.addEventListener("tizenhwkey", function (ev) {
var activePopup = null,
page = null,
pageId = "";

if (ev.keyName === "back") {
activePopup = document.querySelector(".ui-popup-active");
page = document.getElementsByClassName("ui-page-active")[0];
pageId = page ? page.id : "";

if (pageId === "main" && !activePopup) {
try {
tizen.application.getCurrentApplication().exit();
} catch (ignore) {
}
} else {
window.history.back();
}
}
});
}());
File renamed without changes.
33 changes: 0 additions & 33 deletions examples/mobile/SchedulingApp/index.html

This file was deleted.

Empty file.

0 comments on commit 472a070

Please sign in to comment.