You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/08/24 22:29:41 UTC
[58/72] [abbrv] [partial] [tizen] Add samples and templates
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/project/css/style.css
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/project/css/style.css b/templates/CordovaBasicTemplate/project/css/style.css
new file mode 100644
index 0000000..3f12cd3
--- /dev/null
+++ b/templates/CordovaBasicTemplate/project/css/style.css
@@ -0,0 +1,120 @@
+* {
+ font-family: Lucida Sans, Arial, Helvetica, sans-serif;
+}
+
+body {
+ margin: 0px auto;
+}
+
+header h1 {
+ font-size: 36px;
+ margin: 0px;
+}
+
+header h2 {
+ font-size: 18px;
+ margin: 0px;
+ color: #888;
+ font-style: italic;
+}
+
+nav ul {
+ list-style: none;
+ padding: 0px;
+ display: block;
+ clear: right;
+ background-color: #666;
+ padding-left: 4px;
+ height: 24px;
+}
+
+nav ul li {
+ display: inline;
+ padding: 0px 20px 5px 10px;
+ height: 24px;
+ border-right: 1px solid #ccc;
+}
+
+nav ul li a {
+ color: #EFD3D3;
+ text-decoration: none;
+ font-size: 13px;
+ font-weight: bold;
+}
+
+nav ul li a:hover {
+ color: #fff;
+}
+
+article > header h1 {
+ font-size: 20px;
+ margin-left: 14px;
+}
+
+article > header h1 a {
+ color: #993333;
+}
+
+article > header h1 img {
+ vertical-align:middle;
+}
+
+article > section header h1 {
+ font-size: 16px;
+}
+
+article p {
+ clear: both;
+}
+
+article > section video {
+ width: 480px;
+ height: 200px;
+}
+
+article > section div.no-html5-video,
+article > section div#no-canvas {
+ width: 480px;
+ height: 40px;
+ border: 1px solid #993333;
+ text-align: center;
+ color: #993333;
+ font-size: 13px;
+ font-style: italic;
+ background-color: #F7E9E9;
+}
+
+article > section div#no-canvas {
+ display: none;
+}
+
+article > section form {
+ border: 1px solid #888;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+ -moz-box-shadow: 10px 10px 5px #888;
+ -webkit-box-shadow: 10px 10px 5px #888;
+ box-shadow: 10px 10px 5px #888;
+ background-color: #eee;
+ padding: 10px;
+ margin-bottom: 30px;
+}
+
+article > section label {
+ font-weight: bold;
+ font-size: 13px;
+}
+
+article > section input {
+ margin-bottom: 3px;
+ font-size: 13px;
+}
+
+footer p {
+ text-align: center;
+ font-size: 12px;
+ color: #888;
+ margin-top: 24px;
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/project/icon.png
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/project/icon.png b/templates/CordovaBasicTemplate/project/icon.png
new file mode 100755
index 0000000..eef3cd9
Binary files /dev/null and b/templates/CordovaBasicTemplate/project/icon.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/project/images/ic_cordova_32.png
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/project/images/ic_cordova_32.png b/templates/CordovaBasicTemplate/project/images/ic_cordova_32.png
new file mode 100755
index 0000000..b6fbeb8
Binary files /dev/null and b/templates/CordovaBasicTemplate/project/images/ic_cordova_32.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/project/index.html
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/project/index.html b/templates/CordovaBasicTemplate/project/index.html
new file mode 100644
index 0000000..4f47a15
--- /dev/null
+++ b/templates/CordovaBasicTemplate/project/index.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densityDpi=device-dpi">
+ <meta name="description" content="Cordova Tizen basic template generated by Tizen Web IDE"/>
+
+ <title>Tizen Web IDE - Tizen - Tizen basic Application</title>
+
+ <script type="text/javascript" src="cordova-2.0.0.js"></script>
+
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>
+ <script src="js/main.js"></script>
+</head>
+
+<body>
+ <header>
+ <hgroup>
+ <h1>Tizen Cordova Application</h1>
+ <h2>An empty template of a Cordova Tizen application</h2>
+ </hgroup>
+ </header>
+
+ <nav>
+ <ul>
+ <li><a href="#">Home</a></li>
+ <li><a href="#">About Us</a></li>
+ <li><a href="#">Contact Us</a></li>
+ </ul>
+ </nav>
+
+ <article>
+ <header>
+ <h1>
+ <img src="images/ic_cordova_32.png" /> Application Name
+ </h1>
+ </header>
+ <p>This is an empty template of a Cordova Tizen Web Application. Tizen will support multiple device categories:
+ <ul>
+ <li>smartphones, tablets and smart TVs
+ <li>netbooks, in-vehicle infotainment devices
+ </ul>
+ </p>
+ <section>
+ <p>This is a basic section of a document.</p>
+ <p>The following button displays live battery info by using the Cordova JavaScript API.</p>
+ <div id="divbutton1">
+ <button onclick="startBatteryInfoMonitoring();">Battery Info</button>
+ </div>
+ </section>
+ </article>
+
+ <footer>
+ <p>© 2012 Company Name. All rights reserved.</p>
+ </footer>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/project/js/main.js
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/project/js/main.js b/templates/CordovaBasicTemplate/project/js/main.js
new file mode 100644
index 0000000..eccea34
--- /dev/null
+++ b/templates/CordovaBasicTemplate/project/js/main.js
@@ -0,0 +1,25 @@
+var deviceReady = false;
+
+function startBatteryInfoMonitoring() {
+ window.addEventListener("batterystatus", function (info) {
+ var batteryInfoStr = "Level = " + info.level + "%, Status: " + ((info.isPlugged) ? "Plugged" : "Unplugged");
+ document.getElementById('divbutton1').innerHTML = batteryInfoStr;
+ }, false);
+}
+
+// Initialize function called when page loading is finished
+var init = function () {
+ console.log("init() called");
+ document.addEventListener("deviceready", function() {
+ deviceReady = true;
+ console.log("Device = " + device.platform + ", Version = " + device.version);
+ }, false);
+
+ window.setTimeout(function() {
+ if (!deviceReady) {
+ alert("Cordova initialization failed !!!");
+ }
+ }, 1000);
+};
+
+window.onload = init;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/project/sounds/beep.wav
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/project/sounds/beep.wav b/templates/CordovaBasicTemplate/project/sounds/beep.wav
new file mode 100644
index 0000000..1e9797c
Binary files /dev/null and b/templates/CordovaBasicTemplate/project/sounds/beep.wav differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/snapshot.png
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/snapshot.png b/templates/CordovaBasicTemplate/snapshot.png
new file mode 100644
index 0000000..cdaa756
Binary files /dev/null and b/templates/CordovaBasicTemplate/snapshot.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaBasicTemplate/tizen-app-template.xml
----------------------------------------------------------------------
diff --git a/templates/CordovaBasicTemplate/tizen-app-template.xml b/templates/CordovaBasicTemplate/tizen-app-template.xml
new file mode 100644
index 0000000..8400029
--- /dev/null
+++ b/templates/CordovaBasicTemplate/tizen-app-template.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tizen-app-template xmlns="http://www.s-core.com/tizen-app-template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.s-core.com/tizen-app-template tizen-app-template.xsd "
+sdk-version="1.0 beta" template-version="0.2"
+icon64="ic_cordova_64.png" icon32="ic_cordova_32.png">
+ <template-name>CordovaBasicTemplate</template-name>
+ <widget-type>TIZEN</widget-type>
+ <description-file-name>description.xml</description-file-name>
+</tizen-app-template>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaTizenWebUIFrameworkTemplate/description.xml
----------------------------------------------------------------------
diff --git a/templates/CordovaTizenWebUIFrameworkTemplate/description.xml b/templates/CordovaTizenWebUIFrameworkTemplate/description.xml
new file mode 100644
index 0000000..d165a84
--- /dev/null
+++ b/templates/CordovaTizenWebUIFrameworkTemplate/description.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="../description.xsl"?>
+<Overview version="0.2">
+ <SampleName>Cordova Tizen Web UI Framework Application</SampleName>
+ <SampleVersion></SampleVersion>
+ <Preview>snapshot.png</Preview>
+ <Description>
+ Cordova Single-Page Application based on Tizen Web UI Framework.
+ </Description>
+</Overview>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_32.png
----------------------------------------------------------------------
diff --git a/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_32.png b/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_32.png
new file mode 100755
index 0000000..b6fbeb8
Binary files /dev/null and b/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_32.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_64.png
----------------------------------------------------------------------
diff --git a/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_64.png b/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_64.png
new file mode 100755
index 0000000..eef3cd9
Binary files /dev/null and b/templates/CordovaTizenWebUIFrameworkTemplate/ic_cordova_64.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/templates/CordovaTizenWebUIFrameworkTemplate/project/config.xml
----------------------------------------------------------------------
diff --git a/templates/CordovaTizenWebUIFrameworkTemplate/project/config.xml b/templates/CordovaTizenWebUIFrameworkTemplate/project/config.xml
new file mode 100644
index 0000000..ea5b13f
--- /dev/null
+++ b/templates/CordovaTizenWebUIFrameworkTemplate/project/config.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version="2.0 Beta" viewmodes="fullscreen" id="http://YourDomain.com/cordova-web-ui-template">
+ <icon src="icon.png"/>
+ <content src="index.html"/>
+ <feature name="http://tizen.org/api/application" required="true"/>
+ <feature name="http://tizen.org/api/application.kill" required="true"/>
+ <feature name="http://tizen.org/api/application.launch" required="true"/>
+ <feature name="http://tizen.org/api/application.read" required="true"/>
+ <feature name="http://tizen.org/api/contact" required="true"/>
+ <feature name="http://tizen.org/api/contact.read" required="true"/>
+ <feature name="http://tizen.org/api/contact.write" required="true"/>
+ <feature name="http://tizen.org/api/systeminfo" required="true"/>
+ <feature name="http://tizen.org/api/time" required="true"/>
+ <feature name="http://tizen.org/api/time.read" required="true"/>
+ <feature name="http://tizen.org/api/time.write" required="true"/>
+ <feature name="http://tizen.org/api/tizen" required="true"/>
+ <name>cordova-web-ui-template</name>
+</widget>