Skip to content

Commit

Permalink
add select popup sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Istiaque Ahmed committed Jun 4, 2013
1 parent 56119c8 commit cfb49cb
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/chrome-apps/webview_picker_position/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<webview> + picker + transform.
47 changes: 47 additions & 0 deletions tests/chrome-apps/webview_picker_position/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
* Copyright 2013 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<head>
<script type="text/javascript" src="main.js"></script>
<style type="text/css">
.rot1 {
/* -webkit-transform: translate(200px, 0) rotate(45deg); */
/* -webkit-transform: translate(300px, 0); */
-webkit-transform: rotate(180deg);
background-color: green;
}
</style>
</head>
<body>
<div style="border: 1px solid gray; min-height: 120px;">
<div>Embedder</div>
<div><input type="color"><input type="datetime-local"></div>
<div><button id="move-button">Move</button></div>
</div>
<div style="border: 1px solid black;" class="rot1">
<webview src="http://jsbin.com/ufitir/2/" style="width: 90%;"></webview>
</div>
<!-- datetime-local -->
<!--
<webview src="http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_datetime-local" style="width: 90%;"></webview>
-->
<!-- datetime -->
<!--
<webview src="http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_datetime" style="width: 90%"></webview>
-->
<!-- color -->
<!--
<webview src="http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_color" style="width: 90%"></webview>
-->
<!-- all -->
<!--
<webview src="http://demo.agektmr.com/datalist/" style="width: 90%; min-height: 600px;"></webview>
-->
<!--
<webview src="http://davidwalsh.name/demo/datalist.php" style="width: 90%"></webview>
-->
</body>
</html>
6 changes: 6 additions & 0 deletions tests/chrome-apps/webview_picker_position/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var $ = function(id) { return document.getElementById(id); };
window.onload = function() {
$('move-button').onclick = function(e) {
window.moveTo(100, 100);
};
};
14 changes: 14 additions & 0 deletions tests/chrome-apps/webview_picker_position/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"manifest_version": 2,
"name": "webview.PICKER+xform",
"version": "1",
"minimum_chrome_version": "23",
"permissions": [
"webview"
],
"app": {
"background": {
"scripts": ["test.js"]
}
}
}
10 changes: 10 additions & 0 deletions tests/chrome-apps/webview_picker_position/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Listens for the app launching then creates the window
*
* @see http://developer.chrome.com/trunk/apps/app.runtime.html
* @see http://developer.chrome.com/trunk/apps/app.window.html
*/
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('main.html',
{id: "test-datalist"});
});

0 comments on commit cfb49cb

Please sign in to comment.