http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/cordova.js ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/cordova.js b/tizen SDK samples/mobile-spec/cordova.js new file mode 100755 index 0000000..d657d20 --- /dev/null +++ b/tizen SDK samples/mobile-spec/cordova.js @@ -0,0 +1,14 @@ +var VERSION='2.0.0'; +var scripts = document.getElementsByTagName('script'); +var cordovaPath = scripts[scripts.length - 1].src.replace('cordova.js', 'cordova-'+VERSION+'.js'); + +document.write('<script type="text/javascript" charset="utf-8" src="' + cordovaPath + '"></script>'); + +function backHome() { + if (window.device && device.platform && device.platform.toLowerCase() == 'android') { + navigator.app.backHistory(); + } + else { + window.history.go(-1); + } +}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/crossdomain.xml ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/crossdomain.xml b/tizen SDK samples/mobile-spec/crossdomain.xml new file mode 100644 index 0000000..18d2d71 --- /dev/null +++ b/tizen SDK samples/mobile-spec/crossdomain.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> +<cross-domain-policy> + + +<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html --> + +<!-- Most restrictive policy: --> + <site-control permitted-cross-domain-policies="none"/> + + + +<!-- Least restrictive policy: --> +<!-- + <site-control permitted-cross-domain-policies="all"/> + <allow-access-from domain="*" to-ports="*" secure="false"/> + <allow-http-request-headers-from domain="*" headers="*" secure="false"/> +--> +<!-- + If you host a crossdomain.xml file with allow-access-from domain="*" + and donât understand all of the points described here, you probably + have a nasty security vulnerability. ~ simon willison +--> + +</cross-domain-policy> http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/css/style.css ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/css/style.css b/tizen SDK samples/mobile-spec/css/style.css new file mode 100644 index 0000000..0a5480f --- /dev/null +++ b/tizen SDK samples/mobile-spec/css/style.css @@ -0,0 +1,124 @@ +/* HTML5 â° Boilerplate + * ==|== normalize ========================================================== + */ + +article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } +audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } +audio:not([controls]) { display: none; } +[hidden] { display: none; } + +html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } +body { margin: 0; font-size: 13px; line-height: 1.231; } +body, button, input, select, textarea { font-family: sans-serif; color: #222; } + +::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; } +::selection { background: #fe57a1; color: #fff; text-shadow: none; } + +a { color: #00e; } +a:visited { color: #551a8b; } +a:hover { color: #06e; } +a:focus { outline: thin dotted; } +a:hover, a:active { outline: 0; } + +abbr[title] { border-bottom: 1px dotted; } +b, strong { font-weight: bold; } +blockquote { margin: 1em 40px; } +dfn { font-style: italic; } +hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } +ins { background: #ff9; color: #000; text-decoration: none; } +mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } +pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; } +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } +q { quotes: none; } +q:before, q:after { content: ""; content: none; } +small { font-size: 85%; } +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } +sup { top: -0.5em; } +sub { bottom: -0.25em; } +ul, ol { margin: 1em 0; padding: 0 0 0 40px; } +dd { margin: 0 0 0 40px; } +nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; } +img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; } +svg:not(:root) { overflow: hidden; } +figure { margin: 0; } + +form { margin: 0; } +fieldset { border: 0; margin: 0; padding: 0; } +label { cursor: pointer; } +legend { border: 0; *margin-left: -7px; padding: 0; } +button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; } +button, input { line-height: normal; *overflow: visible; } +table button, table input { *overflow: auto; } +button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; } +input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } +input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } +textarea { overflow: auto; vertical-align: top; resize: vertical; } +input:valid, textarea:valid { } +input:invalid, textarea:invalid { background-color: #f0dddd; } + +table { border-collapse: collapse; border-spacing: 0; } +td { vertical-align: top; } + + +/* ==|== primary styles ===================================================== + Author: + ========================================================================== */ + + + + + + + + + + + + + + + + +/* ==|== non-semantic helper classes ======================================== */ +.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; } +.ir br { display: none; } +.hidden { display: none !important; visibility: hidden; } +.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } +.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } +.invisible { visibility: hidden; } +.clearfix:before, .clearfix:after { content: ""; display: table; } +.clearfix:after { clear: both; } +.clearfix { zoom: 1; } + + +/* ==|== media queries ====================================================== */ + +@media only screen and (min-width: 480px) { + + +} + +@media only screen and (min-width: 768px) { + +} + + + +/* ==|== print styles ======================================================= */ + +@media print { + * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } + a, a:visited { text-decoration: underline; } + a[href]:after { content: " (" attr(href) ")"; } + abbr[title]:after { content: " (" attr(title) ")"; } + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } + pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } + thead { display: table-header-group; } + tr, img { page-break-inside: avoid; } + img { max-width: 100% !important; } + @page { margin: 0.5cm; } + p, h2, h3 { orphans: 3; widows: 3; } + h2, h3 { page-break-after: avoid; } +} http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/events/index.html ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/events/index.html b/tizen SDK samples/mobile-spec/events/index.html new file mode 100755 index 0000000..2c7e8ba --- /dev/null +++ b/tizen SDK samples/mobile-spec/events/index.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<html> + <head> + <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" /> + <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 --> + <title>Cordova Mobile Spec</title> + <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8"> + <script type="text/javascript" charset="utf-8" src="../cordova.js"></script> + + +<script type="text/javascript" charset="utf-8"> + + var deviceReady = false; + + function interceptBackbutton() { + eventOutput("Back button intercepted"); + } + function interceptMenubutton() { + eventOutput("Menu button intercepted"); + } + function interceptSearchbutton() { + eventOutput("Search button intercepted"); + } + function interceptResume() { + eventOutput("Resume event intercepted"); + } + function interceptPause() { + eventOutput("Pause event intercepted"); + } + function interceptOnline() { + eventOutput("Online event intercepted"); + } + function interceptOffline() { + eventOutput("Offline event intercepted"); + } + + var eventOutput = function(s) { + var el = document.getElementById("results"); + el.innerHTML = el.innerHTML + s + "<br>"; + }; + + + /** + * Function called when page has finished loading. + */ + function init() { + document.addEventListener("deviceready", function() { + deviceReady = true; + console.log("Device="+device.platform+" "+device.version); + eventOutput("deviceready event: "+device.platform+" "+device.version); + }, false); + window.setTimeout(function() { + if (!deviceReady) { + alert("Error: PhoneGap did not initialize. Demo will not run correctly."); + } + },1000); + } + +</script> + + </head> + <body onload="init();" id="stage" class="theme"> + + <h1>Events</h1> + <div id="info"> + <b>Results:</b><br> + <span id="results"></span> + </div> + + <h2>Action</h2> + <div class="btn large" onclick="document.addEventListener('backbutton', interceptBackbutton, false);">Intercept backbutton</div> + <div class="btn large" onclick="document.removeEventListener('backbutton', interceptBackbutton, false);">Stop intercept of backbutton</div> + <div class="btn large" onclick="document.addEventListener('menubutton', interceptMenubutton, false);">Intercept menubutton</div> + <div class="btn large" onclick="document.removeEventListener('menubutton', interceptMenubutton, false);">Stop intercept of menubutton</div> + <div class="btn large" onclick="document.addEventListener('searchbutton', interceptSearchbutton, false);">Intercept searchbutton</div> + <div class="btn large" onclick="document.removeEventListener('searchbutton', interceptSearchbutton, false);">Stop intercept of searchbutton</div> + <div class="btn large" onclick="document.addEventListener('resume', interceptResume, false);">Intercept resume</div> + <div class="btn large" onclick="document.removeEventListener('resume', interceptResume, false);">Stop intercept of resume</div> + <div class="btn large" onclick="document.addEventListener('pause', interceptPause, false);">Intercept pause</div> + <div class="btn large" onclick="document.removeEventListener('pause', interceptPause, false);">Stop intercept of pause</div> + <div class="btn large" onclick="document.addEventListener('online', interceptOnline, false);">Intercept online</div> + <div class="btn large" onclick="document.removeEventListener('online', interceptOnline, false);">Stop intercept of online</div> + <div class="btn large" onclick="document.addEventListener('offline', interceptOffline, false);">Intercept offline</div> + <div class="btn large" onclick="document.removeEventListener('offline', interceptOffline, false);">Stop intercept of offline</div> + + <h2> </h2><div class="backBtn" onclick="backHome();">Back</div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/favicon.ico ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/favicon.ico b/tizen SDK samples/mobile-spec/favicon.ico new file mode 100644 index 0000000..4ec0d29 Binary files /dev/null and b/tizen SDK samples/mobile-spec/favicon.ico differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/humans.txt ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/humans.txt b/tizen SDK samples/mobile-spec/humans.txt new file mode 100644 index 0000000..21a5b67 --- /dev/null +++ b/tizen SDK samples/mobile-spec/humans.txt @@ -0,0 +1,43 @@ +/* the humans responsible & colophon */ +/* humanstxt.org */ + + +/* TEAM */ + <your title>: <your name> + Site: + Twitter: + Location: + +/* THANKS */ + Names (& URL): + +/* SITE */ + Standards: HTML5, CSS3 + Components: Modernizr, jQuery + Software: + + + + -o/- + +oo//- + :ooo+//: + -ooooo///- + /oooooo//: + :ooooooo+//- + -+oooooooo///- + -://////////////+oooooooooo++////////////:: + :+ooooooooooooooooooooooooooooooooooooo+:::- + -/+ooooooooooooooooooooooooooooooo+/::////:- + -:+oooooooooooooooooooooooooooo/::///////:- + --/+ooooooooooooooooooooo+::://////:- + -:+ooooooooooooooooo+:://////:-- + /ooooooooooooooooo+//////:- + -ooooooooooooooooooo////- + /ooooooooo+oooooooooo//: + :ooooooo+/::/+oooooooo+//- + -oooooo/::///////+oooooo///- + /ooo+::://////:---:/+oooo//: + -o+/::///////:- -:/+o+//- + :-:///////:- -:/:// + -////:- --//: + -- -: http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/38e0ccf7/tizen SDK samples/mobile-spec/index.html ---------------------------------------------------------------------- diff --git a/tizen SDK samples/mobile-spec/index.html b/tizen SDK samples/mobile-spec/index.html new file mode 100755 index 0000000..9c6f3cb --- /dev/null +++ b/tizen SDK samples/mobile-spec/index.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> + <head> + <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0" /> + <meta http-equiv="Content-type" content="text/html; charset=utf-8"> + <title>Cordova Mobile Spec</title> + <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"> + <script type="text/javascript" charset="utf-8" src="cordova.js"></script> + <script type="text/javascript" charset="utf-8" src="main.js"></script> + + </head> + <body onload="init();" id="stage" class="theme"> + <h1>PhoneGap Tests</h1> + <div id="info"> + <h4>Platform: <span id="platform"> </span></h4> + <h4>Version: <span id="version"> </span></h4> + <h4>UUID: <span id="uuid"> </span></h4> + <h4>Name: <span id="name"> </span></h4> + <h4>Width: <span id="width"> </span>, Height: <span id="height"> + </span>, Color Depth: <span id="colorDepth"></span></h4> + </div> + <a href="autotest/index.html" class="btn large">Automatic Test</a> + <a href="accelerometer/index.html" class="btn large">Accelerometer</a> + <a href="audio/index.html" class="btn large">Audio Play/Record</a> + <a href="battery/index.html" class="btn large">Battery</a> + <a href="camera/index.html" class="btn large">Camera</a> + <a href="compass/index.html" class="btn large">Compass</a> + <a href="contacts/index.html" class="btn large">Contacts</a> + <a href="events/index.html" class="btn large">Events</a> + <a href="location/index.html" class="btn large">Location</a> + <a href="misc/index.html" class="btn large">Misc Content</a> + <a href="network/index.html" class="btn large">Network</a> + <a href="notification/index.html" class="btn large">Notification</a> + <a href="sql/index.html" class="btn large">Web SQL</a> + <a href="storage/index.html" class="btn large">Local Storage</a> + </body> +</html>