Commit 28d3d529 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1667466 fix static pages"

parents b6a59b2b 58cef1c5
......@@ -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