layout editor working
This commit is contained in:
parent
37d31ab83a
commit
96bfe978e8
@ -133,6 +133,7 @@ var LayoutEditor = Class.create({
|
|||||||
var myThis = this;
|
var myThis = this;
|
||||||
$w('left right').each(function(field) {
|
$w('left right').each(function(field) {
|
||||||
if (myThis.info.info[field].active) {
|
if (myThis.info.info[field].active) {
|
||||||
|
if (myThis.info.info.body > myThis.info.info[field].width) {
|
||||||
myThis.sidebar_handles[field].show();
|
myThis.sidebar_handles[field].show();
|
||||||
var fi = myThis.info.info[field];
|
var fi = myThis.info.info[field];
|
||||||
var t = myThis.section_handles[fi.start].viewportOffset()['top'] + document.viewport.getScrollOffsets()['top'];
|
var t = myThis.section_handles[fi.start].viewportOffset()['top'] + document.viewport.getScrollOffsets()['top'];
|
||||||
@ -157,6 +158,9 @@ var LayoutEditor = Class.create({
|
|||||||
} else {
|
} else {
|
||||||
myThis.sidebar_handles[field].hide();
|
myThis.sidebar_handles[field].hide();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
myThis.sidebar_handles[field].hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
myThis.info.do_sidebar_drag();
|
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() {
|
'do_sidebar_drag': function() {
|
||||||
this.onSidebarDrag();
|
this.onSidebarDrag();
|
||||||
|
Loading…
Reference in New Issue
Block a user