mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
More jQuery to native (including bootstrap.js)
This commit is contained in:
parent
bdb36ec128
commit
69fcc240e9
39 changed files with 496 additions and 344 deletions
|
|
@ -6,8 +6,7 @@ import {
|
|||
pInt,
|
||||
pString,
|
||||
plainToHtml,
|
||||
findEmailAndLinks,
|
||||
htmlToElement
|
||||
findEmailAndLinks
|
||||
} from 'Common/Utils';
|
||||
|
||||
import {
|
||||
|
|
@ -45,7 +44,7 @@ import { getApp } from 'Helper/Apps/User';
|
|||
import Remote from 'Remote/User/Ajax';
|
||||
|
||||
const
|
||||
hcont = htmlToElement('<div area="hidden" style="position:absolute;left:-5000px"></div>'),
|
||||
hcont = Element.fromHTML('<div area="hidden" style="position:absolute;left:-5000px"></div>'),
|
||||
getRealHeight = el => {
|
||||
hcont.innerHTML = el.outerHTML;
|
||||
const result = hcont.clientHeight;
|
||||
|
|
@ -428,7 +427,7 @@ class MessageUserStore {
|
|||
if (node.textContent.trim() && !node.parentNode.closest('blockquote')) {
|
||||
let h = node.clientHeight || getRealHeight(node);
|
||||
if (0 === h || 100 < h) {
|
||||
const el = htmlToElement('<span class="rlBlockquoteSwitcher">•••</span>');
|
||||
const el = Element.fromHTML('<span class="rlBlockquoteSwitcher">•••</span>');
|
||||
node.classList.add('rl-bq-switcher','hidden-bq');
|
||||
node.before(el);
|
||||
el.addEventListener('click', () => node.classList.toggle('hidden-bq'));
|
||||
|
|
@ -539,7 +538,7 @@ class MessageUserStore {
|
|||
|
||||
iMessageBodyCacheCount += 1;
|
||||
|
||||
body = htmlToElement('<div id="' + id + '" hidden="" class="rl-cache-class b-text-part '
|
||||
body = Element.fromHTML('<div id="' + id + '" hidden="" class="rl-cache-class b-text-part '
|
||||
+ (isHtml ? 'html' : 'plain') + '">'
|
||||
+ findEmailAndLinks(resultHtml)
|
||||
+ '</div>');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { isNonEmptyArray, pString, htmlToElement } from 'Common/Utils';
|
||||
import { isNonEmptyArray, pString } from 'Common/Utils';
|
||||
|
||||
import AccountStore from 'Stores/User/Account';
|
||||
|
||||
|
|
@ -349,7 +349,7 @@ class PgpUserStore {
|
|||
if (encrypted || signed) {
|
||||
const domText = dom.textContent;
|
||||
|
||||
verControl = htmlToElement('<div class="b-openpgp-control"><i class="icon-lock"></i></div>'); // 🔒
|
||||
verControl = Element.fromHTML('<div class="b-openpgp-control"><i class="icon-lock"></i></div>'); // 🔒
|
||||
if (encrypted) {
|
||||
verControl.title = i18n('MESSAGE/PGP_ENCRYPTED_MESSAGE_DESC');
|
||||
verControl.addEventHandler('click', domControlEncryptedClickHelper(this, dom, domText, recipients));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue