Added image for literature and source items on right content panel.
This commit is contained in:
parent
7246f15335
commit
b0fd2b3706
3 changed files with 29 additions and 19 deletions
|
@ -3333,6 +3333,10 @@ label.switch >.collapseTextControl >img {
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
color: #8B4513;
|
color: #8B4513;
|
||||||
}
|
}
|
||||||
|
.tocElementLeafImage {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
/* -------------------------------------------------> */
|
/* -------------------------------------------------> */
|
||||||
/* FONTS --------------------------------> */
|
/* FONTS --------------------------------> */
|
||||||
/* -------------------------------------------------> */
|
/* -------------------------------------------------> */
|
||||||
|
|
3
webapp/src/main/webapp/themes/iph/images/circle-item.svg
Normal file
3
webapp/src/main/webapp/themes/iph/images/circle-item.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="7" height="7" viewBox="0 0 7 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="3.5" cy="3.5" r="3" fill="#F6F6F6" stroke="#8B4513"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 165 B |
|
@ -27,11 +27,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function addElementControls(tocElement){
|
function addElementControls(tocElement){
|
||||||
var elementChild = tocElement.querySelector('.tocElement');
|
|
||||||
if (elementChild === null){
|
|
||||||
//no controls need as no childs appear.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var nameContainer = tocElement.querySelector('.tocElementName');
|
var nameContainer = tocElement.querySelector('.tocElementName');
|
||||||
if (nameContainer === null){
|
if (nameContainer === null){
|
||||||
console.log("no nameContainer found");
|
console.log("no nameContainer found");
|
||||||
|
@ -41,15 +37,19 @@
|
||||||
console.log("no tocElement id found");
|
console.log("no tocElement id found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//var elementSwitchButton = document.createElement("button");
|
|
||||||
//elementSwitchButton.className = "tocElementSwitchButton";
|
|
||||||
|
|
||||||
var switchImage = document.createElement("img");
|
|
||||||
switchImage.onclick = function() {switchTOCElement(tocElement.id);};
|
|
||||||
switchImage.className = "tocElementSwitchImage";
|
|
||||||
nameContainer.prepend(switchImage);
|
|
||||||
//elementSwitchButton.appendChild(switchImage);
|
|
||||||
|
|
||||||
|
var elementChild = tocElement.querySelector('.tocElement');
|
||||||
|
if (elementChild === null){
|
||||||
|
var leafImage = document.createElement("img");
|
||||||
|
leafImage.className = "tocElementLeafImage";
|
||||||
|
leafImage.src = urlsBase + "/themes/iph/images/circle-item.svg";
|
||||||
|
nameContainer.prepend(leafImage);
|
||||||
|
} else {
|
||||||
|
var switchImage = document.createElement("img");
|
||||||
|
switchImage.onclick = function() {switchTOCElement(tocElement.id);};
|
||||||
|
switchImage.className = "tocElementSwitchImage";
|
||||||
|
nameContainer.prepend(switchImage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchTOCElement(id){
|
function switchTOCElement(id){
|
||||||
|
@ -72,9 +72,10 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.extend(this, urlsBase);
|
$.extend(this, urlsBase);
|
||||||
var imgElement = nameContainer.firstElementChild;
|
var imgElement = nameContainer.querySelector('.tocElementSwitchImage');
|
||||||
imgElement.src = urlsBase + "/themes/iph/images/arrow-top-small.svg";
|
if (imgElement != null){
|
||||||
|
imgElement.src = urlsBase + "/themes/iph/images/arrow-top-small.svg";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setExpandImageToElement(id){
|
function setExpandImageToElement(id){
|
||||||
|
@ -85,8 +86,10 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.extend(this, urlsBase);
|
$.extend(this, urlsBase);
|
||||||
var imgElement = nameContainer.firstElementChild;
|
var imgElement = nameContainer.querySelector('.tocElementSwitchImage');
|
||||||
imgElement.src = urlsBase + "/themes/iph/images/arrow-down-small.svg";
|
if (imgElement != null){
|
||||||
|
imgElement.src = urlsBase + "/themes/iph/images/arrow-down-small.svg";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue