Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
13
gaia/shared/elements/gaia_switch/examples/example.js
Executable file
13
gaia/shared/elements/gaia_switch/examples/example.js
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
var result = document.getElementById('result');
|
||||
|
||||
var elements = document.querySelectorAll('gaia-switch');
|
||||
|
||||
[].forEach.call(elements, function(switchEl, index) {
|
||||
switchEl.addEventListener('click', function(e) {
|
||||
result.textContent = 'Switch event for: ' + (index + 1) + ' value: ' +
|
||||
e.target.checked;
|
||||
});
|
||||
|
||||
});
|
||||
52
gaia/shared/elements/gaia_switch/examples/index.html
Executable file
52
gaia/shared/elements/gaia_switch/examples/index.html
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>GaiaSwitch Demo</title>
|
||||
<meta name="description" content="Demo app for gaia-switch" />
|
||||
<style type="text/css">
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 10px;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
section {
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="../../../js/component_utils.js"></script>
|
||||
<script>window.GaiaSwitchBaseurl = '../';</script>
|
||||
<script src="../script.js"></script>
|
||||
<script defer src="example.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
document.getElementById('dir').checked = false;
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body role="application">
|
||||
<p dir="ltr">
|
||||
<label>
|
||||
<input id="dir" type="checkbox"
|
||||
onchange="document.documentElement.dir = this.checked ? 'rtl' : 'ltr'">
|
||||
RTL mode
|
||||
</label>
|
||||
</p>
|
||||
<section>
|
||||
<gaia-switch>
|
||||
<label>With a label</label>
|
||||
</gaia-switch>
|
||||
</section>
|
||||
<section>
|
||||
<gaia-switch>
|
||||
<label>With a different label</label>
|
||||
<details dir="auto">Sometimes a gaia switch can have an explanation. Sometimes a gaia switch can have an explanation. Sometimes a gaia switch can have an explanation. </details>
|
||||
</gaia-switch>
|
||||
</section>
|
||||
<div id="result"></div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue