[IMP] set_content_full_screen code, avoid duplications

bzr revid: xmo@openerp.com-20130125100547-ujawyg4ohnrofl3u
This commit is contained in:
Xavier Morel
2013-01-25 11:05:47 +01:00
parent ac550e4239
commit 4c46187ebf
+3 -7
View File
@@ -1370,13 +1370,9 @@ instance.web.WebClient = instance.web.Client.extend({
});
},
set_content_full_screen: function(fullscreen) {
if (fullscreen) {
$(".oe_webclient", this.$el).addClass("oe_content_full_screen");
$("body").css({'overflow-y':'hidden'});
} else {
$(".oe_webclient", this.$el).removeClass("oe_content_full_screen");
$("body").css({'overflow-y':'scroll'});
}
$(document.body).css('overflow-y', fullscreen ? 'hidden' : 'scroll');
this.$('.oe_webclient').toggleClass(
'oe_content_full_screen', fullscreen);
},
has_uncommitted_changes: function() {
var $e = $.Event('clear_uncommitted_changes');