Commit 58cef1c5 authored by alexeyomelchenko's avatar alexeyomelchenko
Browse files

Bug 1667466 fix static pages

behatnotneeded: same functionality

Change-Id: I0024eb1a506f1bbbc4a8fd1def37701a6ea0060d
parent 4a9e6f29
......@@ -46,8 +46,8 @@ function updateWYSIWYGText() {
function updateSiteDefault(changed) {
changedCheckbox = (changed) ? true : false;
var editor = jQuery('#editsitepage_pagetext_container .mce-tinymce');
if (jQuery('#editsitepage_pageusedefault')[0] && $('editsitepage_pageusedefault').prop('checked') === true) {
jQuery(tinyMCE.activeEditor.getBody()).prop('contenteditable', false);
if (jQuery('#editsitepage_pageusedefault')[0] && jQuery('#editsitepage_pageusedefault').prop('checked') === true) {
tinyMCE.activeEditor.getBody().setAttribute('contenteditable', false);
jQuery('#changecheckboxdiv').css({
'display': 'block',
'zIndex': '1',
......@@ -59,12 +59,12 @@ function updateSiteDefault(changed) {
});
}
else {
jQuery(tinyMCE.activeEditor.getBody()).prop('contenteditable', true);
jQuery('#changecheckboxdiv').css({
'display': 'none',
'width': '1px',
'height': '1px'
});
tinyMCE.activeEditor.getBody().setAttribute('contenteditable', true);
jQuery('#changecheckboxdiv').css({
'display': 'none',
'width': '1px',
'height': '1px'
});
}
}
......@@ -95,7 +95,7 @@ function contentSaved(form, data) {
updateSiteDefault(false);
}
jQuery.ready(function() {
jQuery(window).load(function() {
connectElements();
// need to wait until tinyMCE editor is loaded before updating editor's text
var checkExists = setInterval(function() {
......
......@@ -127,7 +127,8 @@ var PieformManager = (function($) {
'onreply' : [] // when a response is received
};
$(document).ready(self.init);
$(window).load(self.init);
};
}(jQuery));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment