mirror of https://github.com/keeweb/keeweb.git
fix #89: disallow protected fields value selection
This commit is contained in:
parent
3599c72db4
commit
5eec337e75
|
@ -15,7 +15,7 @@ var FieldView = Backbone.View.extend({
|
||||||
render: function () {
|
render: function () {
|
||||||
this.value = typeof this.model.value === 'function' ? this.model.value() : this.model.value;
|
this.value = typeof this.model.value === 'function' ? this.model.value() : this.model.value;
|
||||||
this.renderTemplate({ editable: !this.readonly, multiline: this.model.multiline, title: this.model.title,
|
this.renderTemplate({ editable: !this.readonly, multiline: this.model.multiline, title: this.model.title,
|
||||||
canEditTitle: this.model.newField });
|
canEditTitle: this.model.newField, protect: this.value && this.value.isProtected });
|
||||||
this.valueEl = this.$el.find('.details__field-value');
|
this.valueEl = this.$el.find('.details__field-value');
|
||||||
this.valueEl.html(this.renderValue(this.value));
|
this.valueEl.html(this.renderValue(this.value));
|
||||||
this.labelEl = this.$el.find('.details__field-label');
|
this.labelEl = this.$el.find('.details__field-label');
|
||||||
|
|
|
@ -213,6 +213,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.details__field--protect & {
|
||||||
|
@include user-select(none);
|
||||||
|
}
|
||||||
.details__field--multiline & {
|
.details__field--multiline & {
|
||||||
width: 0;
|
width: 0;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{{~#if editable}} details__field--editable{{/if~}}
|
{{~#if editable}} details__field--editable{{/if~}}
|
||||||
{{~#if multiline}} details__field--multiline{{/if~}}
|
{{~#if multiline}} details__field--multiline{{/if~}}
|
||||||
{{~#if canEditTitle}} details__field--can-edit-title{{/if~}}
|
{{~#if canEditTitle}} details__field--can-edit-title{{/if~}}
|
||||||
|
{{~#if protect}} details__field--protect{{/if~}}
|
||||||
">
|
">
|
||||||
<div class="details__field-label">{{title}}</div>
|
<div class="details__field-label">{{title}}</div>
|
||||||
<div class="details__field-value">
|
<div class="details__field-value">
|
||||||
|
|
|
@ -31,6 +31,7 @@ Storage providers, one-time passwords, usability improvements
|
||||||
`-` fix capslock indicator
|
`-` fix capslock indicator
|
||||||
`-` fix file settings input behavior
|
`-` fix file settings input behavior
|
||||||
`-` fix favicon download
|
`-` fix favicon download
|
||||||
|
`-` fix protected fields copy-paste
|
||||||
|
|
||||||
##### v1.0.4 (2016-02-25)
|
##### v1.0.4 (2016-02-25)
|
||||||
Workaround for Chrome bug
|
Workaround for Chrome bug
|
||||||
|
|
Loading…
Reference in New Issue