forked from meteor/meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Meteor packages used by this project, one per line. | ||
# | ||
# 'meteor add' and 'meteor remove' will edit this file for you, | ||
# but you can also edit it by hand. | ||
|
||
autopublish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
var SPEW = function(str) { | ||
SPEW.lines.push(str); | ||
// use counter to signal invalidation | ||
Session.set("SPEW_V", (Session.get("SPEW_V") || 0)+1); | ||
}; | ||
SPEW.lines = []; | ||
|
||
Template.radios.events = { | ||
'change input': function(event) { | ||
//SPEW("change "+event.target.value); | ||
if (event.target.checked) { | ||
Session.set("current_band", event.target.value); | ||
} | ||
} | ||
}; | ||
|
||
Template.radios.current_band = function() { | ||
return Session.get("current_band"); | ||
}; | ||
|
||
Template.radios.band_checked = function(b) { | ||
return Session.equals("current_band", b) ? | ||
'checked="checked"' : ''; | ||
}; | ||
|
||
Template.checkboxes.events = { | ||
'change input': function(event) { | ||
Session.set("dst", event.target.checked); | ||
} | ||
}; | ||
|
||
Template.checkboxes.dst_checked = function() { | ||
return Session.get("dst") ? 'checked="checked"' : ''; | ||
}; | ||
|
||
Template.checkboxes.dst = function() { | ||
return Session.get("dst") ? 'Yes' : 'No'; | ||
}; | ||
|
||
Template.spew.lines = function() { | ||
Session.get("SPEW_V"); | ||
return SPEW.lines; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* CSS declarations go here */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<head> | ||
<title>controls</title> | ||
</head> | ||
|
||
<body> | ||
{{> radios}} | ||
{{> checkboxes}} | ||
{{> spew}} | ||
</body> | ||
|
||
<template name="radios"> | ||
<div> | ||
Band: | ||
<input type="radio" name="bands" value="AM" {{band_checked "AM"}}/> | ||
<input type="radio" name="bands" value="FM" {{band_checked "FM"}}/> | ||
<input type="radio" name="bands" value="XM" {{band_checked "XM"}}/> | ||
{{current_band}} | ||
</div> | ||
</template> | ||
|
||
<template name="checkboxes"> | ||
<div> | ||
Daylight Savings Time: | ||
<input type="checkbox" name="dst" value="yes" {{dst_checked}}/> | ||
{{dst}} | ||
</div> | ||
</template> | ||
|
||
<template name="spew"> | ||
<div> | ||
{{#each lines}} | ||
<br>{{this}} | ||
{{/each}} | ||
</div> | ||
</template> |