Refresh entry on save. Fixed Ctrl-Enter detection.
This commit is contained in:
parent
3f21f62889
commit
bb713abeed
@ -225,12 +225,14 @@ $(document).ready(function(){
|
|||||||
notes: this.$('.notes-input').val()});
|
notes: this.$('.notes-input').val()});
|
||||||
|
|
||||||
this.$('.notes-text').html(this.renderNotes(this.model.get('notes')));
|
this.$('.notes-text').html(this.renderNotes(this.model.get('notes')));
|
||||||
$(this.el).removeClass('edit-mark edit-timestamp edit-notes'); },
|
$(this.el).removeClass('edit-mark edit-timestamp edit-notes');
|
||||||
|
this.update(); },
|
||||||
|
|
||||||
/** Event handler for keypresses on entry input fields. */
|
/** Event handler for keypresses on entry input fields. */
|
||||||
saveOnEnter: function(e) { if(e.keyCode == 13) { this.save(); } },
|
saveOnEnter: function(e) { if(e.keyCode == 13) { this.save(); } },
|
||||||
|
|
||||||
saveOnCtrlEnter: function(e) { if (e.keyCode == 10) { this.save(); } },
|
saveOnCtrlEnter: function(e) {
|
||||||
|
if (e.keyCode == 13 && e.ctrlKey) { this.save(); } },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the display-able start time from the entry timestamp.
|
* Get the display-able start time from the entry timestamp.
|
||||||
@ -609,7 +611,7 @@ $(document).ready(function(){
|
|||||||
var models = this.entries.collection.models;
|
var models = this.entries.collection.models;
|
||||||
|
|
||||||
// First we check if it is a new day. If it is, we need to
|
// First we check if it is a new day. If it is, we need to
|
||||||
// re-render the chole list.
|
// re-render the whole list.
|
||||||
if (this.currentDay.getDate() != now.getDate()) {
|
if (this.currentDay.getDate() != now.getDate()) {
|
||||||
// If the user is editing any one of the models, don't rerender
|
// If the user is editing any one of the models, don't rerender
|
||||||
if (_.any(models, function(model) {
|
if (_.any(models, function(model) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user