Permalink
Browse files

Small changes from home

  • Loading branch information...
1 parent 1b748b5 commit 64f27589de8449b6ceacd4385301323069a8487a @kvj committed Apr 30, 2012
View
@@ -22,7 +22,9 @@ var _showError = function(message) {//Shows error
};
var _disableUI = function () {
- $('#error_dialog_background').show();
+ setTimeout(function () {
+ $('#error_dialog_background').show();
+ }, 1);
}
var _enableUI = function () {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1701,7 +1701,7 @@ DataManager.prototype.selectNotes = function(tags, handler, parse, extra) {//Sel
};
}
};
- log('Select', tags, values, extra);
+ // log('Select', tags, values, extra);
this.db.storage.select('notes', values, _.bind(function (err, data) {
if (err) {
return handler(null, err);
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -1008,12 +1008,12 @@ Sheet.prototype.editNote = function(note, div) {
this.areaPanel.detach().insertAfter(div);
this.areaPanel.show();
this.editing = true;
- this.area.val(note.text || '');
- this.updated();
- setTimeout(_.bind(function () {
- this.area.focus();
- }, this), 10);
this.scrollTo(this.areaPanel);
+ this.area.val(note.text || '').focus();
+ this.updated();
+ // setTimeout(_.bind(function () {
+ // this.area.focus();
+ // }, this), 10);
};
Sheet.prototype.enableTagDrop = function(div, handler, id) {//Called when tag dropped
@@ -1744,15 +1744,15 @@ Sheet.prototype.startTextEdit = function(id, note, field, value, handler) {//Sho
this.textPanel.detach().insertAfter(note);
this.textEditHandler = handler || null;
this.textPanel.show();
- this.text.val(value || '');
+ this.scrollTo(this.textPanel);
+ this.text.val(value || '').focus();
this.editID = id;
this.editField = field;
this.editValue = value;
this.updated();
- setTimeout(_.bind(function () {
- this.text.focus();
- }, this), 10);
- this.scrollTo(this.textPanel);
+ // setTimeout(_.bind(function () {
+ // this.text.focus();
+ // }, this), 10);
};
Sheet.prototype.newNote = function(tags, ignoreAutoTags) {//Starts new note
@@ -1761,13 +1761,13 @@ Sheet.prototype.newNote = function(tags, ignoreAutoTags) {//Starts new note
this.ignoreAutoTags = ignoreAutoTags;
this.root.prepend(this.areaPanel.detach());
this.areaPanel.show();
- this.area.val('');
+ this.scrollTo(this.areaPanel);
+ this.area.val('').focus();
this.editID = null;
this.updated();
- setTimeout(_.bind(function () {
- this.area.focus();
- }, this), 10);
- this.scrollTo(this.areaPanel);
+ // setTimeout(_.bind(function () {
+ // this.area.focus();
+ // }, this), 10);
};
Sheet.prototype.updated = function() {//Empty
View
@@ -488,8 +488,8 @@ TopManager.prototype.startManager = function(handler) {//Run sync/creates manage
this.manager = null;
this.syncManager.open(_.bind(function(err) {//local DB opened
if (!err) {//
+ this.syncManager.sync_timeout = CURRENT_PLATFORM_MOBILE? 10: 90;
this.manager = new DataManager(this.syncManager);
- this.manager.sync_timeout = CURRENT_PLATFORM_MOBILE? 10: 90;
this.nav.handler = _.bind(function (index) {
if (index == 0) {
this.sync();
@@ -500,7 +500,7 @@ TopManager.prototype.startManager = function(handler) {//Run sync/creates manage
return;
};
var item = this.nav.data[index-2];
- log('Show tag:', item.item);
+ // log('Show tag:', item.item);
openTag(item.item, null, this.manager);
}, this);
this.manager.loadTagConfig(_.bind(function() {
@@ -666,12 +666,6 @@ var SheetsManager = function(panel, datamanager) {
this.reload();
}, this);
this.panel.keypress = _.bind(function (e) {
- log('key', e.keyCode);
- if (e.keyCode == 82 && !e.ctrlKey) { // Reload - r
- this.group = null;
- this.reload();
- return false;
- };
return this.sheetList.keypress(e);
}, this)
manager.show(this.panel, panel);

0 comments on commit 64f2758

Please sign in to comment.