1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-21 07:06:39 +02:00

html => empty

This commit is contained in:
antelle 2020-05-09 20:15:46 +02:00
parent 3b05f6267e
commit 3cd9bf6505
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
8 changed files with 9 additions and 8 deletions

View File

@ -129,7 +129,7 @@ class DetailsHistoryView extends View {
.find('.details__history-timeline-item[data-id="' + ix + '"]')
.addClass('details__history-timeline-item--active');
this.removeFieldViews();
this.bodyEl.html('');
this.bodyEl.empty();
const colorCls = this.record.color ? this.record.color + '-color' : '';
this.fieldViews.push(
new FieldViewReadOnly({ name: 'Rev', title: Locale.detHistoryVersion, value: ix + 1 })

View File

@ -61,7 +61,7 @@ class FieldViewCustom extends FieldViewText {
startEditTitle(emptyTitle) {
const text = emptyTitle ? '' : this.model.title || '';
this.labelInput = $('<input/>');
this.labelEl.html('').append(this.labelInput);
this.labelEl.empty().append(this.labelInput);
this.labelInput
.attr({ autocomplete: 'off', spellcheck: 'false' })
.val(text)

View File

@ -44,7 +44,7 @@ class FieldViewText extends FieldView {
const isProtected = !!(this.value && this.value.isProtected);
this.$el.toggleClass('details__field--protected', isProtected);
this.input = $(document.createElement(this.model.multiline ? 'textarea' : 'input'));
this.valueEl.html('').append(this.input);
this.valueEl.empty().append(this.input);
this.input
.attr({ autocomplete: 'off', spellcheck: 'false' })
.val(text)

View File

@ -264,7 +264,7 @@ class FieldView extends View {
revealValue() {
const revealedEl = PasswordPresenter.asDOM(this.value);
this.valueEl.addClass('details__field-value--revealed').html('');
this.valueEl.addClass('details__field-value--revealed').empty();
this.valueEl.append(revealedEl);
}

View File

@ -66,7 +66,7 @@ class KeyChangeView extends View {
if (this.keyFileName) {
this.keyFileName = null;
this.keyFile = null;
this.$el.find('.key-change__keyfile-name').html('');
this.$el.find('.key-change__keyfile-name').empty();
}
this.$el
.find('.key-change__file')
@ -89,7 +89,7 @@ class KeyChangeView extends View {
};
reader.readAsArrayBuffer(file);
} else {
this.$el.find('.key-change__keyfile-name').html('');
this.$el.find('.key-change__keyfile-name').empty();
}
this.inputEl.focus();
}

View File

@ -64,6 +64,7 @@ class OpenView extends View {
constructor(model) {
super(model);
window.$ = $;
this.resetParams();
this.passwordInput = new SecureInput();
this.onKey(Keys.DOM_VK_Z, this.undoKeyPress, KeyHandler.SHORTCUT_ACTION, 'open');

View File

@ -137,7 +137,7 @@ class SettingsFileView extends View {
const oldKeyFileName = this.model.oldKeyFileName;
const keyFileChanged = this.model.keyFileChanged;
const sel = this.$el.find('#settings__file-key-file');
sel.html('');
sel.empty();
if (keyFileName && keyFileChanged) {
const text =
keyFileName !== 'Generated'

View File

@ -137,7 +137,7 @@ class SettingsPluginsView extends View {
const installBtn = this.$el.find('.settings_plugins-install-btn');
const urlTextBox = this.$el.find('#settings__plugins-install-url');
const errorBox = this.$el.find('.settings__plugins-install-error');
errorBox.html('');
errorBox.empty();
const url = urlTextBox.val().trim();
if (!url) {
return;