New entry field auto-focusses. Bugfix.

This commit is contained in:
Jonathan Bernard 2015-01-13 11:55:10 -06:00
parent 7ae584bec9
commit 12bae10384

View File

@ -394,7 +394,9 @@ $(document).ready(function(){
var entry = this.collection.at(i); var entry = this.collection.at(i);
var nextEntry = (i + 1 < len ? this.collection.at(i + 1) : null); var nextEntry = (i + 1 < len ? this.collection.at(i + 1) : null);
this.renderOne(entry, nextEntry); } }, this.renderOne(entry, nextEntry); }
$("#new-entry-input").focus() },
formatDaySeparator: function(today, labelDay) { formatDaySeparator: function(today, labelDay) {
@ -591,7 +593,7 @@ $(document).ready(function(){
if (false) { // (Modernizr.websockets) if (false) { // (Modernizr.websockets)
TS.updateConnection = new WebSocket('wss://' + TS.updateConnection = new WebSocket('wss://' +
window.location.hostname + window.location.hostname +
(window.location.port ? ":" window.location.port : "") + (window.location.port ? ":" + window.location.port : "") +
'/ts_api/update_service?user_id=' + '/ts_api/update_service?user_id=' +
this.user.model.get("id")); this.user.model.get("id"));
TS.updateConnection.onopen = this.syncConnected; TS.updateConnection.onopen = this.syncConnected;
@ -669,7 +671,7 @@ $(document).ready(function(){
syncConnected: function() { }, syncConnected: function() { },
syncDisconnected: function() {err) { syncDisconnected: function(err) {
// TODO: reconnect. Possibly display a button for the user to // TODO: reconnect. Possibly display a button for the user to
// manually reconnect if we've already tried and failed too many // manually reconnect if we've already tried and failed too many
// times. // times.