mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-12 10:21:02 +00:00
re-vamped statics for converter demo. on the edit screen, clicking an existing converter should drill you to a similiar page to "add" to let you edit the row. we should start off with at least 3 presets.
This commit is contained in:
parent
e5bd32c2d9
commit
4deaa4a33a
2 changed files with 59 additions and 40 deletions
6
experiments/converter/converter.css
Normal file
6
experiments/converter/converter.css
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ul li { clear:both; }
|
||||
li p.units { padding-top:23px; font-size: 110%; font-weight:bold; }
|
||||
li p.units a:link, li p.units a:visited { padding-top:26px; font-size: 90%; }
|
||||
|
||||
li p.subtext { margin-top:2px; }
|
||||
li p.ui-li-aside { font-size:190%; }
|
||||
|
|
@ -1,18 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>jQuery Mobile Framework - Converter Demo Application</title>
|
||||
<link rel="stylesheet" href="../../themes/default" />
|
||||
<link rel="stylesheet" href="converter.css" />
|
||||
<script type="text/javascript" src="../../js/all"></script>
|
||||
<style>
|
||||
input:disabled { background:none; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div data-role="page" data-theme="c">
|
||||
<div data-role="page" id="start" data-theme="a">
|
||||
|
||||
<script type="text/javascript" src="jquery.tmpl.js"></script>
|
||||
<script type="text/javascript" src="storage.js"></script>
|
||||
|
|
@ -21,9 +18,9 @@
|
|||
.field { padding: 15px; }
|
||||
</style>
|
||||
<script id="conversion-field" type="text/x-jquery-tmpl">
|
||||
<li data-role="fieldcontain">
|
||||
<label class="ui-input-text conversion-${type}" title="From ${from} to ${to}">${$item.symbols[from]} to ${$item.symbols[to]}</label>
|
||||
<span type="text" id="${from}${to}"></span>
|
||||
<li>
|
||||
<p class="conversion-${type}">${$item.symbols[from]} to ${$item.symbols[to]}</p>
|
||||
<h2 class="ui-li-aside" id="${from}${to}">${$item.symbols[to]}</h2>
|
||||
</li>
|
||||
</script>
|
||||
<script id="conversion-edit-field" type="text/x-jquery-tmpl">
|
||||
|
|
@ -33,59 +30,75 @@
|
|||
</li>
|
||||
</script>
|
||||
|
||||
<div data-role="header" data-theme="b">
|
||||
<a href="#customize" data-rel="dialog" data-transition="pop">Edit</a>
|
||||
<h1>Converter demo</h1>
|
||||
<div data-role="header" data-theme="e">
|
||||
<a href="#customize" data-rel="dialog" data-transition="pop" data-icon="gear" class="ui-btn-right">Edit</a>
|
||||
<h1>Currency converter</h1>
|
||||
</div>
|
||||
<div class="ui-bar ui-bar-d">
|
||||
<div class="ui-bar ui-bar-a">
|
||||
<form method="get" action="" data-role="autoform" >
|
||||
<label for="term" data-role="nojs">Search:</label>
|
||||
<input type="search" name="term" id="term" placeholder="type a value..." value="1" />
|
||||
<input type="search" name="term" id="term" placeholder="Type a value..." value="1" />
|
||||
</form>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<ul id="conversions" data-role="listview" data-inset="true"></ul>
|
||||
<ul id="++conversions" data-role="listview" data-theme="a">
|
||||
<li><p class="units">$ TO €</p><p class="ui-li-aside">22.34</p></li>
|
||||
<li><p class="units">$ TO €</p><p class="ui-li-aside">22.34</p></li>
|
||||
<li><p class="units">$ TO €</p><p class="ui-li-aside">22.34</p></li>
|
||||
<li><p class="units">$ TO €</p><p class="ui-li-aside">22.34</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="page" id="customize" class="ui-body-b">
|
||||
|
||||
<div data-role="header" data-theme="b">
|
||||
<div data-role="header" data-theme="b" data-nobackbtn="true">
|
||||
<h1>Edit conversions</h1>
|
||||
<a href="#start" data-transition="fade" data-theme="b" data-icon="check" class="ui-btn-right">Done</a>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<h2>Add or remove conversions</h2>
|
||||
<a href="#add-currency-dialog" data-role="button" data-rel="dialog" data-transition="pop">Add currency conversion</a>
|
||||
<a id="restore" href="#" data-role="button">Restore default</a>
|
||||
<a id="clear" href="#" data-role="button">Delete all conversions</a>
|
||||
<div class="ui-content">
|
||||
<ul id="edit-conversions" data-role="listview" data-inset="true"></ul>
|
||||
</div>
|
||||
<ul data-role="listview" data-theme="c" data-inset="true">
|
||||
<li><p class="units"><a href="#add-currency-dialog">$ TO €</a></p><a href="remove" data-icon="delete" data-iconpos="notext">Remove</a></li>
|
||||
<li><p class="units"><a href="#add-currency-dialog">$ TO €</a></p><a href="remove" data-icon="delete" data-iconpos="notext">Remove</a></li>
|
||||
<li><p class="units"><a href="#add-currency-dialog">$ TO €</a></p><a href="remove" data-icon="delete" data-iconpos="notext">Remove</a></li>
|
||||
<li><p class="units"><a href="#add-currency-dialog">$ TO €</a></p><a href="remove" data-icon="delete" data-iconpos="notext">Remove</a></li>
|
||||
<li><a href="#add-currency-dialog"><strong>Add new conversion</strong></a><p class="subtext">Choose any two currencies to convert</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ui-body">
|
||||
<a id="restore" href="#" data-role="button" data-theme="c">Restore defaults</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="page" id="add-currency-dialog" class="ui-body-a">
|
||||
<div data-role="header" data-theme="d">
|
||||
<h1>Add currency conversion</h1>
|
||||
<a href="index.html" class="ui-back" data-icon="arrow-l">Cancel</a>
|
||||
<div data-role="page" id="add-currency-dialog" class="ui-body-b">
|
||||
<div data-role="header" data-theme="a">
|
||||
<h1>Add new</h1>
|
||||
<a href="#start" class="ui-back" data-icon="arrow-l" >Cancel</a>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<h2>Select 2 currency options and add!</h2>
|
||||
<label for="currency-options-from">From</label>
|
||||
<select name="currency-options" id="currency-options-from">
|
||||
<option value="EUR">EUR - Euro</option>
|
||||
<option value="USD">USD - US Dollar</option>
|
||||
<option value="GBP">GBP - Great Britain Pound</option>
|
||||
</select>
|
||||
<label for="currency-options-to">To</label>
|
||||
<select name="currency-options" id="currency-options-to">
|
||||
<option value="EUR">EUR - Euro</option>
|
||||
<option value="USD">USD - US Dollar</option>
|
||||
<option value="GBP">GBP - Great Britain Pound</option>
|
||||
</select>
|
||||
<a id="add" href="#add-dialog" data-role="button">Add currency conversion</a>
|
||||
<h2>Select currencies to convert:</h2>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="currency-options-from">From</label>
|
||||
<select name="currency-options" id="currency-options-from" data-theme="c">
|
||||
<option value="EUR">EUR - Euro</option>
|
||||
<option value="USD">USD - US Dollar</option>
|
||||
<option value="GBP">GBP - Great Britain Pound</option>
|
||||
</select>
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="currency-options-to">To</label>
|
||||
<select name="currency-options" id="currency-options-to" data-theme="c">
|
||||
<option value="EUR">EUR - Euro</option>
|
||||
<option value="USD">USD - US Dollar</option>
|
||||
<option value="GBP">GBP - Great Britain Pound</option>
|
||||
</select>
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<a id="add" href="#start" data-role="button" data-theme="c" data-inline="true">Cancel</a>
|
||||
<a id="add" href="#start" data-role="button" data-theme="b" data-inline="true">Add conversion</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue