if (this.core.box()[0].classList.toggle('redactorBoxFullscreen')) {
WCF.System.DisableScrolling.disable();
- this.core.editor()[0].style.setProperty('height', 'calc(100% - ' + ~~this.core.toolbar()[0].clientHeight + 'px)', '');
_active = true;
}
else {
WCF.System.DisableScrolling.enable();
- this.core.editor()[0].style.removeProperty('height');
_active = false;
}
}
this.button.setActive('html');
}
+ if (this.core.box()[0].classList.contains('redactorBoxFullscreen')) {
+ this.button.setActive('woltlabFullscreen');
+ }
+
// WoltLab modification: we know that there will be quite a few
// active button states, so we'll simply check all ancestors one
// by one instead of searching the DOM over and over again
code = code.replace(/\n\n/g, '\n');
this.core.editor().hide();
- this.button.disableAll('html');
+ this.button.disableAll(['html', 'woltlabFullscreen']);
this.source.$textarea.val(code).height(height).addClass('open').show();
this.source.$textarea.on('keyup.redactor-source', $.proxy(function () {
if (this.opts.type === 'textarea') {
disableAll: function (key) {
var $btns = this.button.toolbar().find('a.re-button');
if (typeof key !== 'undefined') {
- $btns = $btns.not('.re-' + key);
+ if (!Array.isArray(key)) {
+ key = [key];
+ }
+
+ key = key.map(function(value) {
+ return '.re-' + value
+ });
+
+ $btns = $btns.not(key.join(','));
}
$btns.addClass('redactor-button-disabled').attr('aria-disabled', true);
.redactorBoxFullscreen {
bottom: 0;
+ display: flex;
+ flex-direction: column;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 310;
- .redactor-layer {
+ .redactor-toolbar-box {
+ flex: 0 auto;
+ }
+
+ .redactor-layer,
+ .redactor-layer + textarea {
+ flex: 1 auto;
max-height: none !important;
min-height: 0 !important;
}