Merge pull request #508 from Luis-Fernando-Molina/develop
Contribution: SHARE button at the footer of the Docs to share a link to an specific page
This commit is contained in:
4 files changed
+13
-2
No files matched your search
@@ -65,7 +65,7 @@
|
||||
Diego M., CarnivalBen,
|
||||
Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan
|
||||
T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.</p>
|
||||
<p>Thanks for giving a <span class="credits-red">star</span> to the project's repo at GitHub.com. That will help other devs to find it.</p>
|
||||
<p>Thanks for giving a <span class="credits-red">star</span> to the project's <span class="credits-red">repo at GitHub.com</span>. This help other devs to find it.</p>
|
||||
</div>
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
|
||||
@@ -20,6 +20,7 @@ function newSuperalgosDocSpace() {
|
||||
currentBookBeingRendered: undefined,
|
||||
paragraphMap: undefined, // Here we will store a map of paragraphs from the Docs Node, Concept, Topics, Tutorials, Reviews or Books Schema in order to find it when we need to update them.
|
||||
textArea: undefined,
|
||||
sharePage: sharePage,
|
||||
changeLanguage: changeLanguage,
|
||||
changeCurrentBranch: changeCurrentBranch,
|
||||
changeContributionsBranch: changeContributionsBranch,
|
||||
@@ -220,6 +221,11 @@ function newSuperalgosDocSpace() {
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs In ' + languageLabel)
|
||||
}
|
||||
|
||||
function sharePage() {
|
||||
let clipboard = "docs.goto " + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type
|
||||
UI.projects.superalgos.utilities.clipboard.copyTextToClipboard(clipboard)
|
||||
}
|
||||
|
||||
function onKeyDown(event) {
|
||||
/*
|
||||
When an editor is on focus we will only
|
||||
@@ -227,7 +233,7 @@ function newSuperalgosDocSpace() {
|
||||
so as to tell the editor container when the user
|
||||
would like to close the editor. ESC key exits edit mode.
|
||||
*/
|
||||
if (event.key === 'Escape') {
|
||||
if (event.key === 'Escape') {
|
||||
UI.projects.superalgos.spaces.docsSpace.exitEditMode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@ function newSuperalgosDocsFooter() {
|
||||
HTML = HTML + '</div>'
|
||||
|
||||
HTML = HTML + '<div class="docs-footer-cell style="white-space: nowrap; overflow-x: auto;" >' // white-space: nowrap; overflow-x: auto; prevents line breaks when combined with display: inline-block;" in the child elements
|
||||
|
||||
if (UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered !== undefined) {
|
||||
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.sharePage()"><button>SHARE</button></span>'
|
||||
}
|
||||
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.scrollToElement(\'docs-space-div\')"><button>TO TOP</button></span>'
|
||||
if (UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered !== undefined) {
|
||||
HTML = HTML + '<span style="float: right; display: inline-block;" onClick="UI.projects.superalgos.spaces.docsSpace.navigateTo(\'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.project + '\', \'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.category + '\', \'' + UI.projects.superalgos.spaces.docsSpace.previousDocumentBeingRendered.type + '\')"><button>BACK</button></span>'
|
||||
|
||||
@@ -53,6 +53,7 @@ function newSuperalgosDocsMainSearchPage() {
|
||||
if (event.key === "Enter" || event.keyCode === 13) {
|
||||
UI.projects.superalgos.spaces.docsSpace.exitEditMode()
|
||||
UI.projects.superalgos.spaces.docsSpace.currentBookBeingRendered = undefined
|
||||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = undefined
|
||||
UI.projects.superalgos.spaces.docsSpace.contextMenu.removeContextMenuFromScreen()
|
||||
UI.projects.superalgos.spaces.docsSpace.commandInterface.command = element.value.trim()
|
||||
UI.projects.superalgos.spaces.docsSpace.commandInterface.detectCommands()
|
||||
|
||||
Reference in new issue
Block a user