diff --git a/js/classes/AsyncTask.js b/js/classes/AsyncTask.js index af693333..c2a152e0 100644 --- a/js/classes/AsyncTask.js +++ b/js/classes/AsyncTask.js @@ -47,7 +47,9 @@ define([ * finished. The optional callback parameter can be used to pass an * onRun callback during execution, bypassing the onRun queue. */ + var currentTaskStartTime = 0; AsyncTask.prototype.chain = function(callback) { + currentTaskStartTime = utils.currentTime; utils.logStackTrace(); if(this.finished === true) { return; @@ -94,6 +96,7 @@ define([ /** * retry() can be called in an onRun callback to restart the task */ + var currentTaskRunning = false; AsyncTask.prototype.retry = function(error, maxRetryCounter) { if(this.finished === true) { return; @@ -121,8 +124,6 @@ define([ var asyncRunning = false; var currentTask = undefined; - var currentTaskRunning = false; - var currentTaskStartTime = 0; // Determine if user is real by listening to his activity var isUserReal = false; diff --git a/js/core.js b/js/core.js index 5f74329f..34fe2f05 100644 --- a/js/core.js +++ b/js/core.js @@ -707,19 +707,22 @@ define([ }); e.stopPropagation(); }); - $(".tooltip-template").tooltip({ - html: true, - container: '.modal-settings', - placement: 'right', - trigger: 'manual', - title: settingsTemplateTooltipHTML - }).click(function(e) { - $(this).tooltip('show'); - $(document).on("click.tooltip-template", function(e) { - $(".tooltip-template").tooltip('hide'); - $(document).off("click.tooltip-template"); + _.each(document.querySelectorAll(".tooltip-template"), function(tooltipElt) { + var $tooltipElt = $(tooltipElt); + $tooltipElt.tooltip({ + html: true, + container: $tooltipElt.parents('.modal'), + placement: 'right', + trigger: 'manual', + title: settingsTemplateTooltipHTML + }).click(function(e) { + $tooltipElt.tooltip('show'); + $(document).on("click.tooltip-template", function(e) { + $(".tooltip-template").tooltip('hide'); + $(document).off("click.tooltip-template"); + }); + e.stopPropagation(); }); - e.stopPropagation(); }); // Avoid dropdown panels to close on click @@ -727,7 +730,7 @@ define([ e.stopPropagation(); }); - if (viewerMode === false) { + if(viewerMode === false) { // Load theme list var themeOptions = _.reduce(THEME_LIST, function(themeOptions, name, value) { return themeOptions + ''; diff --git a/js/extensions/documentSelector.js b/js/extensions/documentSelector.js index 6732f9e6..70544e06 100644 --- a/js/extensions/documentSelector.js +++ b/js/extensions/documentSelector.js @@ -12,7 +12,7 @@ define([ var documentSelector = new Extension("documentSelector", 'Document Selector', true, true); documentSelector.settingsBlock = documentSelectorSettingsBlockHTML; documentSelector.defaultConfig = { - orderBy: "title", + orderBy: "mru", shortcutPrevious: "Ctrl+[", shortcutNext: "Ctrl+]" }; diff --git a/js/helpers/dropboxHelper.js b/js/helpers/dropboxHelper.js index 9e5ac78f..32ae2750 100644 --- a/js/helpers/dropboxHelper.js +++ b/js/helpers/dropboxHelper.js @@ -127,10 +127,6 @@ define([ connect(task); authenticate(task); task.onRun(function() { - if(newChangeId === 0) { - // Add time for the first synchronization - task.timeout = ASYNC_TASK_LONG_TIMEOUT; - } function retrievePageOfChanges() { client.pullChanges(newChangeId, function(error, pullChanges) { if(error) { diff --git a/js/helpers/googleHelper.js b/js/helpers/googleHelper.js index a88a4dc7..f588b447 100644 --- a/js/helpers/googleHelper.js +++ b/js/helpers/googleHelper.js @@ -297,10 +297,6 @@ define([ authenticate(task); task.onRun(function() { var nextPageToken = undefined; - if(newChangeId === 0) { - // Add time for the first synchronization - task.timeout = ASYNC_TASK_LONG_TIMEOUT; - } function retrievePageOfChanges() { var request = undefined; if(nextPageToken === undefined) { diff --git a/js/html/bodyIndex.html b/js/html/bodyIndex.html index b22317d9..777b43bf 100644 --- a/js/html/bodyIndex.html +++ b/js/html/bodyIndex.html @@ -125,10 +125,10 @@
@@ -411,8 +411,10 @@This will save "" to your Google Drive - account and keep it synchronized.
++ This will save "" to your Google + Drive account and keep it synchronized. +
This will save "" to your Dropbox account - and keep it synchronized.
++ This will save "" to your Dropbox + account and keep it synchronized. +
StackEdit has stopped because another instance was running in the same browser.
-If you want to reopen - StackEdit, click on "Reload".+
If you want to reopen StackEdit, click on + "Reload".