diff --git a/dev/External/SquireUI.js b/dev/External/SquireUI.js index 3d1a7d170..c81a12927 100644 --- a/dev/External/SquireUI.js +++ b/dev/External/SquireUI.js @@ -26,28 +26,10 @@ const SquireDefaultConfig = { /* blockTag: 'P', - blockAttributes: null, - tagAttributes: { - blockquote: null, - ul: null, - ol: null, - li: null, - a: null - }, - classNames: { - colour: 'colour', - fontFamily: 'font', - fontSize: 'size', - highlight: 'highlight' - }, - leafNodeNames: leafNodeNames, undo: { documentSizeThreshold: -1, // -1 means no threshold undoLimit: -1 // -1 means no limit }, - isInsertedHTMLSanitized: true, - isSetHTMLSanitized: true, - willCutCopy: null, addLinks: true // allow_smart_html_links */ sanitizeToDOMFragment: (html, isPaste/*, squire*/) => { @@ -179,22 +161,22 @@ class SquireUI Georgia: "'URW Palladio L', Georgia, Times, serif" } }, - cmd: s => squire.setFontFace(s.value) + cmd: s => squire.setStyle({ fontFamily: s.value }) }, fontSize: { select: ['11px','13px','16px','20px','24px','30px'], - cmd: s => squire.setFontSize(s.value) + cmd: s => squire.setStyle({ fontSize: s.value }) } }, colors: { textColor: { html: 'A', - cmd: doClr('setTextColour'), + cmd: doClr('setTextColor'), hint: 'Text color' }, backgroundColor: { html: '🎨', /* ▧ */ - cmd: doClr('setHighlightColour'), + cmd: doClr('setBackgroundColor'), hint: 'Background color' }, }, @@ -215,37 +197,37 @@ class SquireUI inline: { bold: { html: 'B', - cmd: () => this.doAction('bold','B'), + cmd: () => this.doAction('bold'), key: 'B', hint: 'Bold' }, italic: { html: 'I', - cmd: () => this.doAction('italic','I'), + cmd: () => this.doAction('italic'), key: 'I', hint: 'Italic' }, underline: { html: 'U', - cmd: () => this.doAction('underline','U'), + cmd: () => this.doAction('underline'), key: 'U', hint: 'Underline' }, strike: { html: 'S', - cmd: () => this.doAction('strikethrough','S'), + cmd: () => this.doAction('strikethrough'), key: 'Shift + 7', hint: 'Strikethrough' }, sub: { html: 'Xₙ', - cmd: () => this.doAction('subscript','SUB'), + cmd: () => this.doAction('subscript'), key: 'Shift + 5', hint: 'Subscript' }, sup: { html: 'Xⁿ', - cmd: () => this.doAction('superscript','SUP'), + cmd: () => this.doAction('superscript'), key: 'Shift + 6', hint: 'Superscript' } @@ -470,11 +452,9 @@ class SquireUI }; } - doAction(name, tag) { - if (this.testPresenceinSelection(tag, new RegExp('>'+tag+'\\b'))) { - name = 'remove' + (name.toUpperCase()[0]) + name.substr(1); - } + doAction(name) { this.squire[name](); + this.squire.focus(); } getParentNodeName(selector) { diff --git a/dev/View/Popup/Contacts.js b/dev/View/Popup/Contacts.js index 11c2ed86c..023f1f8a4 100644 --- a/dev/View/Popup/Contacts.js +++ b/dev/View/Popup/Contacts.js @@ -72,22 +72,6 @@ class ContactsPopupView extends AbstractViewPopup { this.viewProperties = ko.observableArray(); -/* - // Somehow this is broken now when calling addNewProperty - const fFastClearEmptyListHelper = list => { - if (list && list.length) { - this.viewProperties.removeAll(list); - delegateRunOnDestroy(list); - } - }; - this.addSubscribables({ - viewPropertiesEmailsEmptyAndOnFocused: fFastClearEmptyListHelper, - viewPropertiesPhonesEmptyAndOnFocused: fFastClearEmptyListHelper, - viewPropertiesWebEmptyAndOnFocused: fFastClearEmptyListHelper, - viewPropertiesOtherEmptyAndOnFocused: fFastClearEmptyListHelper - }); -*/ - this.useCheckboxesInList = SettingsStore.useCheckboxesInList; this.selector = new Selector( @@ -135,12 +119,7 @@ class ContactsPopupView extends AbstractViewPopup { viewPropertiesPhones: () => this.viewProperties.filter(property => property.isType(ContactPropertyType.Phone)), contactHasValidName: () => !!this.viewProperties.find(prop => propertyIsName(prop) && prop.isValid()), -/* - viewPropertiesEmailsEmptyAndOnFocused: () => this.viewPropertiesEmails().filter(propertyFocused), - viewPropertiesPhonesEmptyAndOnFocused: () => this.viewPropertiesPhones().filter(propertyFocused), - viewPropertiesWebEmptyAndOnFocused: () => this.viewPropertiesWeb().filter(propertyFocused), - viewPropertiesOtherEmptyAndOnFocused: () => this.viewPropertiesOther().filter(propertyFocused), -*/ + contactsCheckedOrSelected: () => { const checked = this.contacts.filter(item => item.checked && item.checked()), selected = this.currentContact(); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php index 622af6070..2ea43f5f4 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Service.php @@ -226,20 +226,15 @@ class Service $LoadingDescription = $oConfig->Get('webmail', 'loading_description', 'SnappyMail'); $aTemplateParameters = array( - '{{BaseAppHeadScriptLink}}' => '', - '{{BaseAppBodyScript}}' => '', '{{BaseAppFaviconPngLinkTag}}' => $sFaviconPngLink ? '' : '', '{{BaseAppFaviconTouchLinkTag}}' => $sAppleTouchLink ? '' : '', '{{BaseAppMainCssLink}}' => $this->staticPath('css/'.($bAdmin ? 'admin' : 'app').($bAppCssDebug ? '' : '.min').'.css'), '{{BaseAppThemeCssLink}}' => $this->oActions->ThemeLink($sTheme, $bAdmin), - '{{BaseAppPolyfillsScriptLink}}' => '', '{{BaseAppBootScriptLink}}' => $this->staticPath('js/'.($bAppJsDebug ? '' : 'min/').'boot'.($bAppJsDebug ? '' : '.min').'.js'), '{{BaseAppBootScript}}' => \file_get_contents(APP_VERSION_ROOT_PATH.'static/js/min/boot.min.js'), - '{{BaseContentSecurityPolicy}}' => '', '{{BaseDir}}' => false && \in_array($sLanguage, array('ar', 'he', 'ur')) ? 'rtl' : 'ltr', '{{BaseAppManifestLink}}' => $this->staticPath('manifest.json'), '{{BaseAppBootCss}}' => \file_get_contents(APP_VERSION_ROOT_PATH.'static/css/boot.min.css'), - '{{BaseCssClass}}' => '', '{{LoadingDescriptionEsc}}' => \htmlspecialchars($LoadingDescription, ENT_QUOTES|ENT_IGNORE, 'UTF-8'), '{{BaseAppAdmin}}' => $bAdmin ? 1 : 0 ); diff --git a/snappymail/v/0.0.0/app/templates/Index.html b/snappymail/v/0.0.0/app/templates/Index.html index 6d149b0c0..864f675cc 100644 --- a/snappymail/v/0.0.0/app/templates/Index.html +++ b/snappymail/v/0.0.0/app/templates/Index.html @@ -3,21 +3,21 @@ - + - - - + + + + + + + + {{BaseAppFaviconPngLinkTag}} {{BaseAppFaviconTouchLinkTag}} - - - - - @@ -30,7 +30,7 @@
- +