[FIX] Proper editor sizing
bzr revid: ddm@openerp.com-20130910100127-98zjbitry2xhqld2
This commit is contained in:
@@ -337,6 +337,7 @@ table.editorbar-panel td.selected {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 720px;
|
||||
}
|
||||
|
||||
.oe_ace_closed {
|
||||
@@ -345,6 +346,6 @@ table.editorbar-panel td.selected {
|
||||
}
|
||||
|
||||
.oe_ace_open {
|
||||
width: 50%;
|
||||
width: 720px;
|
||||
transition: width 0.4s ease-in;
|
||||
}
|
||||
|
||||
@@ -302,11 +302,12 @@ $remove_color: $icon_close
|
||||
right: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
width: 720px
|
||||
|
||||
.oe_ace_closed
|
||||
width: 0
|
||||
transition: width 0.4s ease-in
|
||||
|
||||
.oe_ace_open
|
||||
width: 50%
|
||||
width: 720px
|
||||
transition: width 0.4s ease-in
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
if (!editor) {
|
||||
editor = new website.ace.ViewEditor();
|
||||
editor.appendTo($(document.body));
|
||||
setTimeout(editor.show, 100);
|
||||
setTimeout(function () {
|
||||
editor.show.call(editor);
|
||||
}, 100);
|
||||
} else {
|
||||
editor.show();
|
||||
}
|
||||
@@ -55,8 +57,6 @@
|
||||
editor.setTheme("ace/theme/monokai");
|
||||
editor.getSession().setMode("ace/mode/xml");
|
||||
self.aceEditor = editor;
|
||||
self.displayView();
|
||||
self.show();
|
||||
});
|
||||
},
|
||||
displayView: function () {
|
||||
@@ -92,6 +92,7 @@
|
||||
show: function () {
|
||||
this.$el.removeClass('oe_ace_closed');
|
||||
this.$el.addClass('oe_ace_open');
|
||||
this.displayView();
|
||||
},
|
||||
destroy: function () {
|
||||
editor = null;
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
});
|
||||
// Adding Static Menus
|
||||
menu.append('<li class="divider"></li><li><a href="/page/website.themes">Change Theme</a></li>');
|
||||
menu.append('<li class="divider"></li><li><a data-action="ace" href="#">Ace</a></li>');
|
||||
menu.append('<li class="divider"></li><li><a data-action="ace" href="#">Advanced view editor</a></li>');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user