User:Cacycle/wikEd dev.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 854:
}
 
// preset the frame related styles to avoid browser crashes
var styleFrameWrapperPosition;
var styleFrameWrapperVisibility;
Line 867:
styleFrameWrapperVisibility = 'hidden';
styleFrameBody = 'style="display: none;" ';
}
if (wikEdFullScreenMode == true) {
wikEdInputWrapper.classNamewikEdInputWrapperClass = 'wikEdInputWrapperFull';
}
else {
wikEdInputWrapper.classNamewikEdInputWrapperClass = 'wikEdInputWrapper';
}
 
Line 874 ⟶ 880:
wikEdInputWrapper = document.createElement('div');
wikEdInputWrapper.id = 'wikEdInputWrapper';
wikEdInputWrapper.className = 'wikEdInputWrapper'wikEdInputWrapperClass;
wikEdTextarea.parentNode.insertBefore(wikEdInputWrapper, wikEdTextarea);
 
Line 1,491 ⟶ 1,497:
// fullscreen mode
if (wikEdFullScreenMode == true) {
WikEdFullScreen(wikEdFullScreenMode, true);
}
 
Line 5,086 ⟶ 5,092:
//
 
function WikEdFullScreen(fullscreen, notFrame) {
 
// get dom nodes
Line 5,133 ⟶ 5,139:
// change styles
if (fullscreen) {
if (notFrame != true) {
wikEdInputWrapper.className = 'wikEdInputWrapperFull';
wikEdInputWrapper.className = 'wikEdInputWrapperFull';
}
wikEdButtonsPreview.className = 'wikEdButtonsPreviewFull';
}
else {
if (notFrame != true) {
wikEdInputWrapper.className = 'wikEdInputWrapper';
wikEdInputWrapper.className = 'wikEdInputWrapper';
}
wikEdButtonsPreview.className = 'wikEdButtonsPreview';
}
 
// resize the frame
if (fullscreen) {
var consoleTop = WikEdGetOffsetTop(wikEdConsoleWrapper);
var consoleHeight = wikEdConsoleWrapper.offsetHeight;
var frameHeight = wikEdFrame.offsetHeight;
var windowHeight = window.innerHeight;
var windowWidth = window.innerWidth;
var frameHeightNew = frameHeight + (windowHeight - (consoleTop + consoleHeight) ) - 2;
wikEdFrame.style.height = frameHeightNew + 'px';
}
else {
wikEdFrame.style.height = wikEdTextareaHeight + 'px';
}
 
// scroll to edit-frame