editing bugs fixed

This commit is contained in:
Antelle 2015-10-31 22:27:31 +03:00
parent 99ca07049f
commit 1a34b0d8c5
3 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ var EntryModel = Backbone.Model.extend({
var entry = this.entry;
this.fileName = this.file.db.meta.name;
this.title = entry.fields.Title || '';
this.password = entry.fields.Password;
this.password = entry.fields.Password || kdbxweb.ProtectedValue.fromString('');
this.notes = entry.fields.Notes || '';
this.url = entry.fields.URL || '';
this.user = entry.fields.UserName || '';

View File

@ -50,6 +50,7 @@ var MenuItemView = Backbone.View.extend({
}
}, this);
}
return this;
},
insertItem: function(item) {

View File

@ -4,7 +4,7 @@
<div class="grp__field">
<label for="grp__field-title">Name:</label>
<input type="text" class="input-base" id="grp__field-title" value="<%- title %>" size="50" maxlength="1024"
required <%= readonly ? 'readonly' : '' %> />
required <%= readonly ? 'readonly' : '' %> <%= title ? '' : 'autofocus' %> />
</div>
<label>Icon:</label>
<i class="fa fa-<%- icon %> grp__icon"></i>