change to using names

This commit is contained in:
John Bintz 2009-08-30 13:27:31 -04:00
parent 96bfe978e8
commit 29541b94a7
2 changed files with 7 additions and 7 deletions

View File

@ -190,7 +190,7 @@ var LayoutInfo = Class.create({
var get_v = function(v) { return v; } var get_v = function(v) { return v; }
for (i in myThis.info[which]) { for (i in myThis.info[which]) {
var my_which = get_v(which); var my_which = get_v(which);
var f = target.select('#' + which + "-" + i).pop(); var f = target.select('input[name=' + which + "-" + i + "]").pop();
if (f) { if (f) {
switch (i) { switch (i) {
case 'active': case 'active':
@ -212,7 +212,7 @@ var LayoutInfo = Class.create({
} }
}); });
var body_width = target.select('#body-width').pop(); var body_width = target.select('input[name=body-width]').pop();
if (body_width) { if (body_width) {
body_width.value = myThis.info.body; body_width.value = myThis.info.body;
body_width.observe('keyup', function(e) { body_width.observe('keyup', function(e) {

View File

@ -61,15 +61,15 @@
</div> </div>
<div id="layout-editor-form"> <div id="layout-editor-form">
<fieldset> <fieldset>
<label><input type="checkbox" id="left-active" value="yes" /> Use Left Sidebar</label> <label><input type="checkbox" name="left-active" value="yes" /> Use Left Sidebar</label>
<label>Width: <input type="text" id="left-width" value="200" /></label> <label>Width: <input type="text" name="left-width" value="200" /></label>
</fieldset> </fieldset>
<fieldset> <fieldset>
<label><input type="checkbox" id="right-active" value="yes" /> Use Right Sidebar</label> <label><input type="checkbox" name="right-active" value="yes" /> Use Right Sidebar</label>
<label>Width: <input type="text" id="right-width" value="200" /></label> <label>Width: <input type="text" name="right-width" value="200" /></label>
</fieldset> </fieldset>
<fieldset> <fieldset>
<label>Body Width: <input type="text" id="body-width" value="200" /></label> <label>Body Width: <input type="text" name="body-width" value="200" /></label>
</fieldset> </fieldset>
</div> </div>
</div> </div>