Added user modal settings
This commit is contained in:
parent
f2a86d43ac
commit
dffc1ae402
6 changed files with 91 additions and 23 deletions
|
@ -3398,6 +3398,32 @@ label.switch >.collapseTextControl >img {
|
|||
padding-left: 4px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
/* Modal windows */
|
||||
#userSettingsModal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%; /* Full width */
|
||||
height: 100%; /* Full height */
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
}
|
||||
|
||||
/* Modal Content */
|
||||
.modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------------> */
|
||||
/* FONTS --------------------------------> */
|
||||
/* -------------------------------------------------> */
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
document.addEventListener('DOMContentLoaded', addCollapsibleOnClick(), false);
|
||||
document.addEventListener('DOMContentLoaded', applyExpandSettings(), false);
|
||||
document.addEventListener('DOMContentLoaded', hideUserSettingsModal(), false);
|
||||
|
||||
function showUserSettingsModal() {
|
||||
var modalElement = document.getElementById("userSettingsModal");
|
||||
if (modalElement != null) {
|
||||
modalElement.style.display = 'block';
|
||||
}
|
||||
}
|
||||
function hideUserSettingsModal() {
|
||||
window.onclick = function(event) {
|
||||
var modalElement = document.getElementById("userSettingsModal");
|
||||
if (event.target == modalElement) {
|
||||
modalElement.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addCollapsibleOnClick() {
|
||||
var coll = document.getElementsByClassName("collapsible");
|
||||
|
@ -95,11 +111,11 @@ function showDocumentExpandButton(inputID){
|
|||
expandTextControl.style.display = "inline";
|
||||
}
|
||||
|
||||
function switchExpandSettings() {
|
||||
var checkBox = document.getElementById("expandSettingsCB");
|
||||
function switchExpandSettings(checkboxID, settingName) {
|
||||
var checkBox = document.getElementById(checkboxID);
|
||||
if (checkBox.checked == true) {
|
||||
localStorage.setItem('switchExpand', true);
|
||||
localStorage.setItem(settingName, true);
|
||||
} else {
|
||||
localStorage.setItem('switchExpand', false);
|
||||
localStorage.setItem(settingName, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/themes/iph/js/to
|
|||
<#if editable && profilePageTypesEnabled >
|
||||
<#include "individual-profilePageTypes.ftl">
|
||||
</#if>
|
||||
<@userSettingsModal />
|
||||
<button id="print"><img onclick="javascript:printPageContent();" src="${urls.base}/themes/iph/images/print.svg"></button>
|
||||
</div>
|
||||
<@expandSwitch />
|
||||
|
|
|
@ -84,6 +84,8 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/themes/iph/js/to
|
|||
<#if editable && profilePageTypesEnabled >
|
||||
<#include "individual-profilePageTypes.ftl">
|
||||
</#if>
|
||||
<@userSettingsModal />
|
||||
|
||||
<button id="print"><img onclick="javascript:printPageContent();" src="${urls.base}/themes/iph/images/print.svg"></button>
|
||||
</div>
|
||||
<@expandSwitch />
|
||||
|
|
|
@ -84,6 +84,7 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/themes/iph/js/to
|
|||
<#if editable && profilePageTypesEnabled >
|
||||
<#include "individual-profilePageTypes.ftl">
|
||||
</#if>
|
||||
<@userSettingsModal />
|
||||
<button id="print"><img onclick="javascript:printPageContent();" src="${urls.base}/themes/iph/images/print.svg"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -234,3 +234,25 @@
|
|||
</label>
|
||||
</div>
|
||||
</#macro>
|
||||
|
||||
<#macro userSettingsModal>
|
||||
<button id="userViewSettings">
|
||||
<img onclick="javascript:showUserSettingsModal();" src="${urls.base}/themes/iph/images/print.svg">
|
||||
</button>
|
||||
<div id="userSettingsModal" class="modal" style="display:none;">
|
||||
<div class="modal-content">
|
||||
<label>
|
||||
<div>раскрывать документ</div>
|
||||
<input id="expandSettingsCB" type="checkbox" onclick="switchExpandSettings('expandSettingsCB','switchExpand');">
|
||||
</label>
|
||||
<label>
|
||||
<div>раскрывать метаданные</div>
|
||||
<input id="metadataExpandSettingsCB" type="checkbox" onclick="switchExpandSettings('metadataExpandSettingsCB','metadataExpandSetting');">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</#macro>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue