includes
This commit is contained in:
1 parent
5a8c5f74f1
commit
b0f62d5dbc
3 files changed
+38
-3
No files matched your search
@@ -663,4 +663,15 @@ color: #31708f;
|
||||
border-radius: 4px;
|
||||
margin: 20px 0;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.docs-hidden-include {
|
||||
color: #880db9;
|
||||
background-color: #ea6dee;
|
||||
border-color: #550483;
|
||||
padding: 15px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
margin: 20px 0;
|
||||
width: 95%;
|
||||
}
|
||||
@@ -125,7 +125,8 @@
|
||||
<li class="menu-item" onClick="window.contextMenu.toTable()">Table Style</li>
|
||||
<li class="menu-item" onClick="window.contextMenu.toGif()">Gif Style</li>
|
||||
<li class="menu-item" onClick="window.contextMenu.toPng()">Png Style</li>
|
||||
<li class="menu-item" onClick="window.contextMenu.toAnchor()">Anchor Style</li>
|
||||
<li class="menu-item" onClick="window.contextMenu.toAnchor()">Anchor</li>
|
||||
<li class="menu-item" onClick="window.contextMenu.toInclude()">Include</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -79,7 +79,8 @@ function newSuperalgosDocSpace() {
|
||||
toTable: toTable,
|
||||
toGif: toGif,
|
||||
toPng: toPng,
|
||||
toAnchor: toAnchor
|
||||
toAnchor: toAnchor,
|
||||
toInclude: toInclude
|
||||
}
|
||||
|
||||
function editParagraph() {
|
||||
@@ -250,6 +251,13 @@ function newSuperalgosDocSpace() {
|
||||
contextMenuForceOutClick()
|
||||
renderDocumentPage()
|
||||
}
|
||||
|
||||
function toInclude() {
|
||||
let docSchemaParagraph = paragraphMap.get(selectedParagraph.id)
|
||||
docSchemaParagraph.style = 'Include'
|
||||
contextMenuForceOutClick()
|
||||
renderDocumentPage()
|
||||
}
|
||||
}
|
||||
|
||||
function setUpMenuItemsMap() {
|
||||
@@ -581,6 +589,9 @@ function newSuperalgosDocSpace() {
|
||||
if (paragraphNode.id.indexOf('-anchor') >= 0) {
|
||||
selectedParagraphData = paragraphNode.innerText
|
||||
}
|
||||
if (paragraphNode.id.indexOf('-include') >= 0) {
|
||||
selectedParagraphData = paragraphNode.innerText
|
||||
}
|
||||
|
||||
selectedParagraph = paragraphNode
|
||||
selectedParagraphHeight = paragraphNode.getClientRects()[0].height
|
||||
@@ -1339,7 +1350,11 @@ function newSuperalgosDocSpace() {
|
||||
break
|
||||
}
|
||||
case 'anchor': {
|
||||
documentPoints = documentPoints + thisPhraseCount * 1
|
||||
documentPoints = documentPoints + thisPhraseCount * 0
|
||||
break
|
||||
}
|
||||
case 'include': {
|
||||
documentPoints = documentPoints + thisPhraseCount * 0
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -2595,6 +2610,14 @@ function newSuperalgosDocSpace() {
|
||||
innerHTML = paragraph.text
|
||||
break
|
||||
}
|
||||
case 'Include': {
|
||||
styleClass = 'class="docs-hidden-include"'
|
||||
prefix = ''
|
||||
role = ''
|
||||
key = key + '-include'
|
||||
innerHTML = paragraph.text
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
HTML = HTML + '<p><div id="' + key + '" ' + styleClass + ' ' + role + '>' + prefix + ' ' + innerHTML + sufix + '</div></p>'
|
||||
|
||||
Reference in new issue
Block a user