Disable editor on smartphones

<=767px according to bootstrap responsive classes

bzr revid: ddm@openerp.com-20130822124013-br8ccw8hb26dr060
This commit is contained in:
ddm 2013-08-22 14:40:13 +02:00
parent b9f2e796ca
commit f820c074a1
2 changed files with 10 additions and 12 deletions

View File

@ -198,10 +198,8 @@
},
mobilePreview: function () {
$('body').addClass('oe_stop_scrolling');
// Firefox hack: document.getElementById("mobile-viewport").src = window.location.href + "?";
// TODO: disable scrollbar in iframe instead of forbidding scrolling
var iframeBody = $("#mobile-viewport").contents().find("body");
//iframeBody.css("overflow-y", "hidden");
document.getElementById("mobile-viewport").src = window.location.href + "?mobile-preview=true";
},
});
@ -679,7 +677,7 @@
dom_ready.then(function () {
website.is_editable = $('html').attr('data-editable') === '1';
if (website.is_editable) {
if (website.is_editable && $('body')[0].clientWidth >= 767) {
website.ready().then(website.init_editor);
}

View File

@ -45,7 +45,7 @@
</div>
<div class="modal-body">
<div class="oe_mobile_preview">
<iframe id="mobile-viewport" class="oe_mobile_viewport" src="?mobile-preview=true"></iframe>
<iframe id="mobile-viewport" class="oe_mobile_viewport" src="#"></iframe>
</div>
</div>
</div>