incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [25/72] [abbrv] [partial] [tizen] Add samples and templates
Date Fri, 24 Aug 2012 20:29:40 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/samples/cordova-basic/css/style.css
----------------------------------------------------------------------
diff --git a/samples/cordova-basic/css/style.css b/samples/cordova-basic/css/style.css
new file mode 100644
index 0000000..3f12cd3
--- /dev/null
+++ b/samples/cordova-basic/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/samples/cordova-basic/icon.png
----------------------------------------------------------------------
diff --git a/samples/cordova-basic/icon.png b/samples/cordova-basic/icon.png
new file mode 100755
index 0000000..eef3cd9
Binary files /dev/null and b/samples/cordova-basic/icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/samples/cordova-basic/images/ic_cordova_32.png
----------------------------------------------------------------------
diff --git a/samples/cordova-basic/images/ic_cordova_32.png b/samples/cordova-basic/images/ic_cordova_32.png
new file mode 100755
index 0000000..b6fbeb8
Binary files /dev/null and b/samples/cordova-basic/images/ic_cordova_32.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/samples/cordova-basic/index.html
----------------------------------------------------------------------
diff --git a/samples/cordova-basic/index.html b/samples/cordova-basic/index.html
new file mode 100644
index 0000000..174c1b5
--- /dev/null
+++ b/samples/cordova-basic/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>&copy; 2012 Company Name. All rights reserved.</p>
+  </footer>    
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/samples/cordova-basic/js/main.js
----------------------------------------------------------------------
diff --git a/samples/cordova-basic/js/main.js b/samples/cordova-basic/js/main.js
new file mode 100644
index 0000000..eccea34
--- /dev/null
+++ b/samples/cordova-basic/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/samples/cordova-basic/sounds/beep.wav
----------------------------------------------------------------------
diff --git a/samples/cordova-basic/sounds/beep.wav b/samples/cordova-basic/sounds/beep.wav
new file mode 100644
index 0000000..1e9797c
Binary files /dev/null and b/samples/cordova-basic/sounds/beep.wav differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/samples/cordova-tizen-web-ui/.project
----------------------------------------------------------------------
diff --git a/samples/cordova-tizen-web-ui/.project b/samples/cordova-tizen-web-ui/.project
new file mode 100644
index 0000000..ace254a
--- /dev/null
+++ b/samples/cordova-tizen-web-ui/.project
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>cordova-tizen-web-ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>json.validation.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.tizen.web.jslint.nature.JSLintBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.tizen.web.project.builder.WACBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.tizen.web.css.nature.CSSBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+		<nature>json.validation.nature</nature>
+		<nature>org.tizen.web.jslint.nature.JSLintNature</nature>
+		<nature>org.tizen.web.WACnature</nature>
+		<nature>org.tizen.web.css.nature.CSSNature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+	</natures>
+</projectDescription>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/f98b376a/samples/cordova-tizen-web-ui/config.xml
----------------------------------------------------------------------
diff --git a/samples/cordova-tizen-web-ui/config.xml b/samples/cordova-tizen-web-ui/config.xml
new file mode 100644
index 0000000..96cd10c
--- /dev/null
+++ b/samples/cordova-tizen-web-ui/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/cordova-tizen-web-ui">
 
+	<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-tizen-web-ui</name> 
+</widget>


Mime
View raw message