Skip to content

Be ready to ship into NPM and clean all the old code #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 19, 2020
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Give HTML demo a good refresh
  • Loading branch information
williamdes committed Apr 18, 2020
commit 4c5e62462e3855e798111cbd3439d21c557ab2ee
265 changes: 191 additions & 74 deletions demo/flavorzoom.html
Original file line number Diff line number Diff line change
@@ -1,76 +1,193 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Check off the foods you want to eat today.</title>

<link href="flavorzoom_files/flavorzoom.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="flavorzoom_files/jquery.js"></script>
<script type="text/javascript" src="flavorzoom_files/my_food_plan_pick_foods.js"></script><script type="text/javascript" src="flavorzoom_files/jquery.uitablefilter.js"></script></head><body>


<div id="fz_header">
<table width="100%"><tbody><tr>
<td>
Thanks to <a href="http://www.flavorzoom.com">flavorzoom.com</a> for providing a nice example
</td>
<td>
<a href="http://www.flavorzoom.com/"><img src="http://www.flavorzoom.com/images/FZ-Logo-4c-transparent-bg.gif" alt="FlavorZoom"></a>
</td>
</tr>
</tbody></table>
</div>


<div id="mainbody">

<pre>
$(function() {
var theTable = $('table.food_planner')

theTable.find("tbody > tr").find("td:eq(1)").mousedown(function(){
$(this).prev().find(":checkbox").click()
<!DOCTYPE HTML>
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Check off the foods you want to eat today.</title>

<link href="flavorzoom_files/flavorzoom.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="flavorzoom_files/jquery.js"></script>
<script type="text/javascript" src="flavorzoom_files/my_food_plan_pick_foods.js"></script>
<script type="text/javascript" src="flavorzoom_files/jquery.uitablefilter.js"></script>
</head>

<body>


<div id="fz_header">
<table width="100%">
<tbody>
<tr>
<td>
Thanks to <a href="http://www.flavorzoom.com">flavorzoom.com</a> for providing a nice example
</td>
<td>
<a href="http://www.flavorzoom.com/"><img
src="http://www.flavorzoom.com/images/FZ-Logo-4c-transparent-bg.gif" alt="FlavorZoom"></a>
</td>
</tr>
</tbody>
</table>
</div>


<div id="mainbody">

<code>
$(function () {
var theTable = $('table.food_planner')

theTable.find("tbody > tr").find("td:eq(1)").mousedown(function () {
$(this).prev().find(":checkbox").click()
});

$("#filter").keyup(function () {
$.uiTableFilter(theTable, this.value);
})

$('#filter-form').submit(function () {
theTable.find("tbody > tr:visible > td:eq(1)").mousedown();
return false;
}).focus(); //Give focus to input field
});
</code>

<h2>Check off the foods you want to eat today.</h2>

<form id="filter-form">Filter: <input name="filter" id="filter" value="" maxlength="30" size="30" type="text">
</form><br>

<table class="food_planner">
<thead>
<tr>
<th colspan="2">Your Food List</th>
<tr>
</thead>
<tbody>
<tr style="display: table-row;">
</tr>
<tr>
<td><input name="food_id_1" value="23558" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Beef, ground, 95% lean meat / 5% fat, patty, cooked, broiled<input
name="food_source_row_1" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_2" value="18061" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Bread, rye, toasted<input name="food_source_row_2" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_3" value="11742" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Broccoli, cooked, boiled, drained, with salt<input name="food_source_row_3" value="USDA"
type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_4" value="1001" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Butter, salted<input name="food_source_row_4" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_5" value="6242" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;CAMPBELL Soup Company, CAMPBELL'S CHUNKY Microwavable Bowls, Chicken and Dumplings
Soup<input name="food_source_row_5" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_6" value="6396" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;CAMPBELL Soup Company, CAMPBELL'S CHUNKY Soups, Fajita Chicken with Rice &amp; Beans
Soup<input name="food_source_row_6" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_7" value="11960" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Carrots, baby, raw<input name="food_source_row_7" value="USDA" type="hidden"></td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_8" value="1040" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Cheese, swiss<input name="food_source_row_8" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_9" value="7933" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Chicken breast, oven-roasted, fat-free, sliced<input name="food_source_row_9"
value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_10" value="14209" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Coffee, brewed from grounds, prepared with tap water<input name="food_source_row_10"
value="USDA" type="hidden"></td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_11" value="1130" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Egg, whole, cooked, omelet<input name="food_source_row_11" value="USDA" type="hidden">
</td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_12" value="18265" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;English muffins, wheat, toasted<input name="food_source_row_12" value="USDA"
type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_13" value="15092" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Fish, sea bass, mixed species, cooked, dry heat<input name="food_source_row_13"
value="USDA" type="hidden"></td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_14" value="18640" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;HEINZ, WEIGHT WATCHER, Chocolate Eclair, frozen<input name="food_source_row_14"
value="USDA" type="hidden"></td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_15" value="42138" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Mayonnaise, reduced-calorie or diet, cholesterol-free<input name="food_source_row_15"
value="USDA" type="hidden"></td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_16" value="4053" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Oil, olive, salad or cooking<input name="food_source_row_16" value="USDA" type="hidden">
</td>
</tr>
<tr style="display: table-row;">
<td><input name="food_id_17" value="9203" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Oranges, raw, Florida<input name="food_source_row_17" value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_18" value="20047" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Rice, white, long-grain, parboiled, enriched, cooked<input name="food_source_row_18"
value="USDA" type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_19" value="18350" checked="checked" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Rolls, hamburger or hotdog, plain<input name="food_source_row_19" value="USDA"
type="hidden"></td>
</tr>
<tr>
<td><input name="food_id_20" value="14476" type="checkbox"></td>
<td>
&nbsp; &nbsp; &nbsp;Tea, ready-to-drink, LIPTON BRISK iced tea, with lemon flavor<input
name="food_source_row_20" value="USDA" type="hidden"></td>
</tr>
</tbody>
</table><br><br></form>


</div>

</body>

$("#filter").keyup(function() {
$.uiTableFilter( theTable, this.value );
})

$('#filter-form').submit(function(){
theTable.find("tbody > tr:visible > td:eq(1)").mousedown();
return false;
}).focus(); //Give focus to input field
});
</pre>

<h2>Check off the foods you want to eat today.</h2>

<form id="filter-form">Filter: <input name="filter" id="filter" value="" maxlength="30" size="30" type="text"></form><br>

<table class="food_planner"><thead><tr><th colspan="2">Your Food List</th><tr></thead>
<tbody><tr style="display: table-row;">
</tr><tr><td><input name="food_id_1" value="23558" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Beef, ground, 95% lean meat / 5% fat, patty, cooked, broiled<input name="food_source_row_1" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_2" value="18061" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Bread, rye, toasted<input name="food_source_row_2" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_3" value="11742" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Broccoli, cooked, boiled, drained, with salt<input name="food_source_row_3" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_4" value="1001" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Butter, salted<input name="food_source_row_4" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_5" value="6242" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;CAMPBELL Soup Company, CAMPBELL'S CHUNKY Microwavable Bowls, Chicken and Dumplings Soup<input name="food_source_row_5" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_6" value="6396" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;CAMPBELL Soup Company, CAMPBELL'S CHUNKY Soups, Fajita Chicken with Rice &amp; Beans Soup<input name="food_source_row_6" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_7" value="11960" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Carrots, baby, raw<input name="food_source_row_7" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_8" value="1040" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Cheese, swiss<input name="food_source_row_8" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_9" value="7933" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Chicken breast, oven-roasted, fat-free, sliced<input name="food_source_row_9" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_10" value="14209" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Coffee, brewed from grounds, prepared with tap water<input name="food_source_row_10" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_11" value="1130" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Egg, whole, cooked, omelet<input name="food_source_row_11" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_12" value="18265" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;English muffins, wheat, toasted<input name="food_source_row_12" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_13" value="15092" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Fish, sea bass, mixed species, cooked, dry heat<input name="food_source_row_13" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_14" value="18640" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;HEINZ, WEIGHT WATCHER, Chocolate Eclair, frozen<input name="food_source_row_14" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_15" value="42138" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Mayonnaise, reduced-calorie or diet, cholesterol-free<input name="food_source_row_15" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_16" value="4053" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Oil, olive, salad or cooking<input name="food_source_row_16" value="USDA" type="hidden"></td></tr><tr style="display: table-row;"><td><input name="food_id_17" value="9203" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Oranges, raw, Florida<input name="food_source_row_17" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_18" value="20047" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Rice, white, long-grain, parboiled, enriched, cooked<input name="food_source_row_18" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_19" value="18350" checked="checked" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Rolls, hamburger or hotdog, plain<input name="food_source_row_19" value="USDA" type="hidden"></td></tr><tr><td><input name="food_id_20" value="14476" id="" style="" type="checkbox"></td><td>
&nbsp; &nbsp; &nbsp;Tea, ready-to-drink, LIPTON BRISK iced tea, with lemon flavor<input name="food_source_row_20" value="USDA" type="hidden"></td></tr></tbody></table><br><br></form>


</div>

</body></html>
</html>