[FIX] Proper editor sizing

bzr revid: ddm@openerp.com-20130910100127-98zjbitry2xhqld2
This commit is contained in:
ddm
2013-09-10 12:01:27 +02:00
parent 9b1b1f3de0
commit a109098cb7
4 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -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;
}
+2 -1
View File
@@ -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
+4 -3
View File
@@ -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>');
}
);
});