layout editor working

This commit is contained in:
John Bintz 2009-08-30 13:02:50 -04:00
parent 37d31ab83a
commit 96bfe978e8
1 changed files with 33 additions and 20 deletions

View File

@ -133,6 +133,7 @@ var LayoutEditor = Class.create({
var myThis = this;
$w('left right').each(function(field) {
if (myThis.info.info[field].active) {
if (myThis.info.info.body > myThis.info.info[field].width) {
myThis.sidebar_handles[field].show();
var fi = myThis.info.info[field];
var t = myThis.section_handles[fi.start].viewportOffset()['top'] + document.viewport.getScrollOffsets()['top'];
@ -157,6 +158,9 @@ var LayoutEditor = Class.create({
} else {
myThis.sidebar_handles[field].hide();
}
} else {
myThis.sidebar_handles[field].hide();
}
});
myThis.info.do_sidebar_drag();
}
@ -207,6 +211,15 @@ var LayoutInfo = Class.create({
}
}
});
var body_width = target.select('#body-width').pop();
if (body_width) {
body_width.value = myThis.info.body;
body_width.observe('keyup', function(e) {
myThis.info.body = e.currentTarget.value.replace(/[^0-9]/, '');
myThis.onChange();
});
}
},
'do_sidebar_drag': function() {
this.onSidebarDrag();