diff --git a/public/res-min/img/logo-ipad-retina.png b/public/res-min/img/logo-ipad-retina.png deleted file mode 100644 index 2eb386f7..00000000 Binary files a/public/res-min/img/logo-ipad-retina.png and /dev/null differ diff --git a/public/res/extensions/buttonHtmlCode.js b/public/res/extensions/buttonHtmlCode.js index 0e18b464..157e87a7 100644 --- a/public/res/extensions/buttonHtmlCode.js +++ b/public/res/extensions/buttonHtmlCode.js @@ -7,7 +7,7 @@ define([ "text!html/buttonHtmlCodeSettingsBlock.html" ], function($, _, utils, Extension, buttonHtmlCodeHTML, buttonHtmlCodeSettingsBlockHTML) { - var buttonHtmlCode = new Extension("buttonHtmlCode", 'Button "HTML code"', true, true); + var buttonHtmlCode = new Extension("buttonHtmlCode", 'Button "HTML code"', true); buttonHtmlCode.settingsBlock = buttonHtmlCodeSettingsBlockHTML; buttonHtmlCode.defaultConfig = { template: "<%= documentHTML %>" diff --git a/public/res/extensions/buttonStat.js b/public/res/extensions/buttonStat.js index ba3cb9e0..5a09d3c5 100644 --- a/public/res/extensions/buttonStat.js +++ b/public/res/extensions/buttonStat.js @@ -7,7 +7,7 @@ define([ "text!html/buttonStatSettingsBlock.html" ], function($, _, utils, Extension, buttonStatHTML, buttonStatSettingsBlockHTML) { - var buttonStat = new Extension("buttonStat", 'Button "Statistics"', true, true); + var buttonStat = new Extension("buttonStat", 'Button "Statistics"', true); buttonStat.settingsBlock = buttonStatSettingsBlockHTML; buttonStat.defaultConfig = { name1: "Characters", diff --git a/public/res/extensions/dialogManageSharing.js b/public/res/extensions/dialogManageSharing.js index 96dddeee..917cb612 100644 --- a/public/res/extensions/dialogManageSharing.js +++ b/public/res/extensions/dialogManageSharing.js @@ -18,29 +18,40 @@ define([ }; var fileDesc; - var shareListElt; - var $msgShareListElt; - var $msgNoShareElt; + var shareEditorListElt; + var shareViewerListElt; + var $msgNoShareEditorElt; + var $msgNoShareViewerElt; var refreshDocumentSharing = function(fileDescParameter) { if(fileDescParameter !== undefined && fileDescParameter !== fileDesc) { return; } - var linkListHtml = _.reduce(fileDesc.publishLocations, function(result, attributes) { - var params = sharing.getViewerParams(attributes); + var editorLinkListHtml = _.reduce(fileDesc.syncLocations, function(result, attributes) { + var params = sharing.getEditorParams(attributes); if(params) { - var link = constants.MAIN_URL + 'viewer?' + $.param(params); + var link = constants.MAIN_URL + 'editor#!' + $.param(params); result += _.template(dialogManageSharingLocationHTML, { - link: link, - title: fileDesc.title + link: link }); } return result; }, ''); - shareListElt.innerHTML = linkListHtml; + shareEditorListElt.innerHTML = editorLinkListHtml; + $msgNoShareEditorElt.toggleClass('hide', editorLinkListHtml.length !== 0); - $msgShareListElt.toggleClass('hide', linkListHtml.length === 0); - $msgNoShareElt.toggleClass('hide', linkListHtml.length !== 0); + var viewerLinkListHtml = _.reduce(fileDesc.publishLocations, function(result, attributes) { + var params = sharing.getViewerParams(attributes); + if(params) { + var link = constants.MAIN_URL + 'viewer#!' + $.param(params); + result += _.template(dialogManageSharingLocationHTML, { + link: link + }); + } + return result; + }, ''); + shareViewerListElt.innerHTML = viewerLinkListHtml; + $msgNoShareViewerElt.toggleClass('hide', viewerLinkListHtml.length !== 0); }; dialogManageSharing.onFileSelected = function(fileDescParameter) { @@ -48,21 +59,22 @@ define([ refreshDocumentSharing(fileDescParameter); }; - dialogManageSharing.onNewPublishSuccess = function(fileDescParameter, publishAttributes) { - refreshDocumentSharing(fileDescParameter); - if(sharing.getViewerParams(publishAttributes)) { - $('.modal').modal('hide'); - $('.modal-manage-sharing').modal('show'); - } - }; - + dialogManageSharing.onSyncExportSuccess = refreshDocumentSharing; + dialogManageSharing.onSyncRemoved = refreshDocumentSharing; + dialogManageSharing.onNewPublishSuccess = refreshDocumentSharing; dialogManageSharing.onPublishRemoved = refreshDocumentSharing; dialogManageSharing.onReady = function() { var modalElt = document.querySelector('.modal-manage-sharing'); - shareListElt = modalElt.querySelector('.share-list'); - $msgShareListElt = $(modalElt.querySelectorAll('.msg-share-list')); - $msgNoShareElt = $(modalElt.querySelectorAll('.msg-no-share')); + shareEditorListElt = modalElt.querySelector('.share-editor-list'); + shareViewerListElt = modalElt.querySelector('.share-viewer-list'); + $msgNoShareEditorElt = $(modalElt.querySelectorAll('.msg-no-share-editor')); + $msgNoShareViewerElt = $(modalElt.querySelectorAll('.msg-no-share-viewer')); + $(modalElt).on('show.bs.modal', function() { + $(modalElt.querySelector('input')).each(function() { + this.value = $(this).data('value'); + }); + }); }; return dialogManageSharing; diff --git a/public/res/extensions/userCustom.js b/public/res/extensions/userCustom.js index 71570aba..c0e36b31 100644 --- a/public/res/extensions/userCustom.js +++ b/public/res/extensions/userCustom.js @@ -33,6 +33,9 @@ define([ var eventMgr; userCustom.onEventMgrCreated = function(eventMgrParameter) { eventMgr = eventMgrParameter; + eventMgr.addListener('onReady', function() { + utils.createTooltip(".tooltip-usercustom-extension", tooltipUserCustomExtensionHTML); + }); }; userCustom.onLoadSettings = function() { @@ -62,9 +65,5 @@ define([ } }; - userCustom.onReady = function() { - utils.createTooltip(".tooltip-usercustom-extension", tooltipUserCustomExtensionHTML); - }; - return userCustom; }); \ No newline at end of file diff --git a/public/res/helpers/googleHelper.js b/public/res/helpers/googleHelper.js index 79241441..0641c22b 100644 --- a/public/res/helpers/googleHelper.js +++ b/public/res/helpers/googleHelper.js @@ -49,6 +49,14 @@ define([ this.getUserId = function() { return userId; }; + var authUser = parseInt(storage[accountId + '.authUser'] || 0); + this.setAuthUser = function(value) { + authUser = value; + storage[accountId + '.authUser'] = authUser; + }; + this.getAuthUser = function() { + return authUser; + }; } var googleHelper = {}; @@ -190,7 +198,7 @@ define([ } else { // Success but we need to check the user id - authorizationMgr.authuser = authuser; + authorizationMgr.setAuthUser(authuser); immediate === true && authuser++; task.chain(getTokenInfo); } diff --git a/public/res/html/bodyEditor.html b/public/res/html/bodyEditor.html index d5c619bd..038d3e7c 100644 --- a/public/res/html/bodyEditor.html +++ b/public/res/html/bodyEditor.html @@ -382,7 +382,7 @@ Are you sure you want to delete ""?
- Note: It won't delete the file on synchronized locations. +Note: It won't delete the file on synchronized locations.
Collaborate on "" using the following link(s):
+ +- Tip: You can open any URL within StackEdit using Note: To collaborate on this document, just save it on CouchDB. + To collaborate via Google Drive or Dropbox, you have to share the file manually from Google Drive/Dropbox websites. ++
Share a read-only version of "" using the following link(s):
+ + +++Note: To share a read-only version of this document, just publish it as a Gist in + Markdown format.
+
+Tip: You can open any markdown URL within StackEdit Viewer using
viewer#!url=
. + title="Sharing example">viewer#!url=
.