diff --git a/Models/Editor.js b/Models/Editor.js index db7c463..b75f441 100644 --- a/Models/Editor.js +++ b/Models/Editor.js @@ -12,11 +12,11 @@ jsOMS.Modules.Models.Editor.Editor.prototype.bind = function() { const editorButtons = this.editor.getElementsByClassName('editor-button'), - editorTitle = this.editor.getElementsByClassName('editor-title')[0], - editorContent = this.editor.getElementsByClassName('editor-content')[0], - editorPreview = this.editor.getElementsByClassName('editor-preview')[0], - length = editorButtons.length, - self = this; + editorTitle = this.editor.getElementsByClassName('editor-title')[0], + editorContent = this.editor.getElementsByClassName('editor-content')[0], + editorPreview = this.editor.getElementsByClassName('editor-preview')[0], + length = editorButtons.length, + self = this; for(let i = 0; i < length; i++) { editorButtons[i].addEventListener('click', function(event) { @@ -27,14 +27,13 @@ jsOMS.Modules.Models.Editor.Editor.prototype.getSelectedText = function() { - let text = ''; + let text = ''; const activeEl = document.activeElement; const activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null; - if ( - (activeElTagName === 'textarea' || activeElTagName === 'input') && - /^(?:text|search|password|tel|url)$/i.test(activeEl.type) && - (typeof activeEl.selectionStart === 'number') + if ((activeElTagName === 'textarea' || activeElTagName === 'input') + && /^(?:text|search|password|tel|url)$/i.test(activeEl.type) + && (typeof activeEl.selectionStart === 'number') ) { text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd); } else if (window.getSelection) { diff --git a/Models/PermissionState.php b/Models/PermissionState.php index e6b6ada..da9babc 100644 --- a/Models/PermissionState.php +++ b/Models/PermissionState.php @@ -27,5 +27,5 @@ use phpOMS\Stdlib\Base\Enum; abstract class PermissionState extends Enum { /* public */ const DASHBOARD = 1; - /* public */ const DOC = 2; + /* public */ const DOC = 2; }