mirror of https://github.com/keeweb/keeweb
simplified new entry creation
parent
4ec6d8cc9a
commit
aed45a5b70
|
@ -154,6 +154,7 @@ var AppModel = Backbone.Model.extend({
|
|||
}
|
||||
var entry = EntryModel.newEntry(group, file);
|
||||
group.addEntry(entry);
|
||||
entry.isNew = true;
|
||||
return entry;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -236,6 +236,9 @@ var DetailsView = Backbone.View.extend({
|
|||
showEntry: function(entry) {
|
||||
this.model = entry;
|
||||
this.render();
|
||||
if (!entry.title && entry.isNew) {
|
||||
this.editTitle();
|
||||
}
|
||||
},
|
||||
|
||||
copyKeyPress: function() { // TODO: fix this in Safari
|
||||
|
|
|
@ -27,7 +27,7 @@ var FieldView = Backbone.View.extend({
|
|||
update: function() {
|
||||
if (typeof this.model.value === 'function') {
|
||||
var newVal = this.model.value();
|
||||
if (!_.isEqual(newVal, this.value)) {
|
||||
if (!_.isEqual(newVal, this.value) || (this.value && newVal && this.value.toString() !== newVal.toString())) {
|
||||
this.render();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue