Merge branch 'master' into master
This commit is contained in:
commit
29778541ee
|
|
@ -42,6 +42,30 @@
|
||||||
/*outline: 2px solid #cb3333;*/
|
/*outline: 2px solid #cb3333;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Better scroll management
|
||||||
|
*/
|
||||||
|
div#tarteaucitronMainLineOffset {
|
||||||
|
margin-top: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#tarteaucitronServices {
|
||||||
|
margin-top: 21px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tarteaucitronServices::-webkit-scrollbar {
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tarteaucitronServices::-webkit-scrollbar-track {
|
||||||
|
-webkit-box-shadow: inset 0 0 0 rgba(0,0,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#tarteaucitronServices::-webkit-scrollbar-thumb {
|
||||||
|
background-color: #ddd;
|
||||||
|
outline: 0px solid slategrey;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Responsive layout for the control panel
|
* Responsive layout for the control panel
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'),
|
||||||
|
|
||||||
|
|
||||||
var tarteaucitron = {
|
var tarteaucitron = {
|
||||||
"version": 20180910,
|
"version": 20180911002,
|
||||||
"cdn": cdn,
|
"cdn": cdn,
|
||||||
"user": {},
|
"user": {},
|
||||||
"lang": {},
|
"lang": {},
|
||||||
|
|
@ -289,7 +289,7 @@ var tarteaucitron = {
|
||||||
html += ' </button>';
|
html += ' </button>';
|
||||||
html += ' </div>';
|
html += ' </div>';
|
||||||
html += ' </div>';
|
html += ' </div>';
|
||||||
html += ' <div class="tarteaucitronBorder" id="tarteaucitronScrollbarParent">';
|
html += ' <div class="tarteaucitronBorder">';
|
||||||
html += ' <div class="clear"></div><ul>';
|
html += ' <div class="clear"></div><ul>';
|
||||||
for (i = 0; i < cat.length; i += 1) {
|
for (i = 0; i < cat.length; i += 1) {
|
||||||
html += ' <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
|
html += ' <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
|
||||||
|
|
@ -696,13 +696,15 @@ var tarteaucitron = {
|
||||||
|
|
||||||
if (nbDenied === 0 && nbPending === 0) {
|
if (nbDenied === 0 && nbPending === 0) {
|
||||||
tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark);
|
tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark);
|
||||||
tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray);
|
tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '0.4');
|
||||||
|
tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1');
|
||||||
} else if (nbAllowed === 0 && nbPending === 0) {
|
} else if (nbAllowed === 0 && nbPending === 0) {
|
||||||
tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray);
|
tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '0.4');
|
||||||
|
tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1');
|
||||||
tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark);
|
tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark);
|
||||||
} else {
|
} else {
|
||||||
tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray);
|
tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1');
|
||||||
tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray);
|
tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
// close the alert if all service have been reviewed
|
// close the alert if all service have been reviewed
|
||||||
|
|
@ -877,8 +879,10 @@ var tarteaucitron = {
|
||||||
allDivs = main.childNodes;
|
allDivs = main.childNodes;
|
||||||
|
|
||||||
if (typeof Array.prototype.map === 'function') {
|
if (typeof Array.prototype.map === 'function') {
|
||||||
|
|
||||||
var mainChildren = Array.from(main.children);
|
var mainChildren = Array.from(main.children);
|
||||||
mainChildren.sort(function (a, b) {
|
mainChildren.sort(function (a, b) {
|
||||||
|
|
||||||
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
|
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
|
||||||
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
|
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -933,20 +937,20 @@ var tarteaucitron = {
|
||||||
if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
|
if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
|
||||||
|
|
||||||
// reset
|
// reset
|
||||||
tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', 'auto');
|
tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto');
|
||||||
|
|
||||||
// calculate
|
// calculate
|
||||||
mainHeight = document.getElementById('tarteaucitron').offsetHeight;
|
mainHeight = document.getElementById('tarteaucitron').offsetHeight;
|
||||||
closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
|
closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
|
||||||
headerHeight = document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
|
|
||||||
|
|
||||||
// apply
|
// apply
|
||||||
servicesHeight = (mainHeight - closeButtonHeight - headerHeight + 1);
|
servicesHeight = (mainHeight - closeButtonHeight + 2);
|
||||||
tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', servicesHeight + 'px');
|
tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px');
|
||||||
|
tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto');
|
||||||
}
|
}
|
||||||
|
|
||||||
// align the main allow/deny button depending on scrollbar width
|
// align the main allow/deny button depending on scrollbar width
|
||||||
if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
|
if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
|
||||||
|
|
||||||
// media query
|
// media query
|
||||||
if (e[a + 'Width'] <= 479) {
|
if (e[a + 'Width'] <= 479) {
|
||||||
|
|
@ -955,7 +959,7 @@ var tarteaucitron = {
|
||||||
scrollbarMarginRight = 12;
|
scrollbarMarginRight = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth;
|
scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth;
|
||||||
scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
|
scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
|
||||||
tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
|
tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue