Our sample app, tizen-winset and the TizenWisnet app in web-sampleapp
git repo do not equivalent, because the TizenWinset has more code
running Tizen device API. This patch extracts that additional routine to
the separated file, and run that routine only at available environment.
Change-Id: I4dedf221bc320d2b3141e35bcfd3a2bc6a051ce3
</script>
<script src="main.js"></script>
+ <script src="webappInit.js"></script>
<link rel="stylesheet" href="custom.css" />
<title>Tizen UI</title>
</head>
<body>
- <div data-role="page" data-add-back-btn="true">
+ <div data-role="page" id="main" data-add-back-btn="true">
<div data-role="header" data-position="fixed">
<h1>Tizen Web UI</h1>
</div>
--- /dev/null
+$(document).delegate("#main", "pageinit", function() {
+ if ( tizen && tizen.application ) {
+ $("#main .ui-btn-back").bind("vclick", function() {
+ tizen.application.getCurrentApplication().exit();
+ return false;
+ });
+ }
+});
+