mirror of https://github.com/keeweb/keeweb.git
hide copy tip on edit
This commit is contained in:
parent
6fb745bbc3
commit
aa7a7415df
|
@ -141,13 +141,16 @@ Tip.createTips = function(container) {
|
|||
});
|
||||
};
|
||||
|
||||
Tip.createTip = function(el) {
|
||||
Tip.createTip = function(el, options) {
|
||||
if (!Tip.enabled) {
|
||||
return;
|
||||
}
|
||||
const tip = new Tip($(el));
|
||||
tip.init();
|
||||
const tip = new Tip($(el), options);
|
||||
if (!options || !options.noInit) {
|
||||
tip.init();
|
||||
}
|
||||
el._tip = tip;
|
||||
return tip;
|
||||
};
|
||||
|
||||
Tip.hideTips = function(container) {
|
||||
|
|
|
@ -544,7 +544,7 @@ const DetailsView = Backbone.View.extend({
|
|||
: Locale.detFieldCopied;
|
||||
let tip;
|
||||
if (!this.isHidden()) {
|
||||
tip = new Tip(fieldLabel, {title: msg, placement: 'right', fast: true, force: true});
|
||||
tip = Tip.createTip(fieldLabel[0], {title: msg, placement: 'right', fast: true, force: true, noInit: true});
|
||||
this.fieldCopyTip = tip;
|
||||
tip.show();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ const Keys = require('../../const/keys');
|
|||
const PasswordGenerator = require('../../util/password-generator');
|
||||
const FeatureDetector = require('../../util/feature-detector');
|
||||
const kdbxweb = require('kdbxweb');
|
||||
const Tip = require('../../util/tip');
|
||||
|
||||
const FieldViewText = FieldView.extend({
|
||||
renderValue: function(value) {
|
||||
|
@ -45,6 +46,8 @@ const FieldViewText = FieldView.extend({
|
|||
.click(this.showGeneratorClick.bind(this))
|
||||
.mousedown(this.showGenerator.bind(this));
|
||||
}
|
||||
Tip.hideTip(this.valueEl[0]);
|
||||
Tip.hideTip(this.labelEl[0]);
|
||||
},
|
||||
|
||||
createMobileControls: function() {
|
||||
|
|
|
@ -29,7 +29,7 @@ const FieldView = Backbone.View.extend({
|
|||
|
||||
remove: function() {
|
||||
if (this.tip) {
|
||||
Tip.hideTip(this.valueEl);
|
||||
Tip.hideTip(this.valueEl[0]);
|
||||
}
|
||||
Backbone.View.prototype.remove.apply(this, arguments);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue