mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-25 05:14:12 +01:00
Compare commits
2 Commits
develop
...
feature/N°
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29d2e5d5e7 | ||
|
|
a3386f0695 |
@@ -53,6 +53,7 @@
|
||||
"scripts": {
|
||||
"styles": "cp -r src/resources/styles/ build/styles",
|
||||
"build": "webpack --mode production && npm run styles",
|
||||
"dev": "webpack --mode development --watch && npm run styles",
|
||||
"postbuild": "tsc --declaration --declarationDir build --stripInternal --emitDeclarationOnly"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,17 +34,21 @@ export default class Maximize extends Plugin {
|
||||
|
||||
this.listenTo( oButton, 'execute', () => {
|
||||
if(oEditor.ui.element !== null){
|
||||
let CKEditorPoweredButton = document.getElementsByClassName('ck-powered-by-balloon');
|
||||
if(oButton.isOn){
|
||||
oInitialParentElement.append(oEditor.ui.element);
|
||||
oEditor.ui.element.classList.remove('cke-maximized');
|
||||
document.body.classList.remove('cke-maximized');
|
||||
oButton.icon = sMaximizeIconSVG;
|
||||
CKEditorPoweredButton.item(0)?.setAttribute('style', 'display: block');
|
||||
}
|
||||
else{
|
||||
oInitialParentElement = oEditor.ui.element.parentElement ?? oInitialParentElement;
|
||||
oEditor.ui.element.remove();
|
||||
document.body.append(oEditor.ui.element);
|
||||
document.body.classList.add('cke-maximized'); // Add class to body to prevent scrollbars
|
||||
// Same behaviour between Chrome and Firefox (Firefox has a bug with the balloon remaning visible in the middle of the screen when the editor is maximized)
|
||||
CKEditorPoweredButton.item(0)?.setAttribute('style', 'display: none');
|
||||
oEditor.ui.element.classList.add('cke-maximized');
|
||||
oButton.icon = sMinimizeIconSVG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user