This commit is contained in:
2024-05-20 15:37:46 +03:00
commit 00b7dbd0b7
10404 changed files with 3285853 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,338 @@
#ez-toc-sticky-container {
background: transparent;
border: 1px solid #AAAAAA;
border-radius: 4px;
/* -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); */
display: table;
margin-bottom: 1em;
padding: 10px;
position: relative;
width: auto;
}
div.ez-toc-sticky-widget-container {
padding: 0;
position: relative;
}
#ez-toc-sticky-container.ez-toc-sticky-light-blue {
background: #EDF6FF;
}
#ez-toc-sticky-container.ez-toc-sticky-white {
background: #FFFFFF;
}
#ez-toc-sticky-container.ez-toc-sticky-black {
background: #000000;
}
#ez-toc-sticky-container.ez-toc-sticky-transparent {
background: none transparent;
}
div.ez-toc-sticky-widget-container ul {
display: block;
}
div.ez-toc-sticky-widget-container li {
border: none;
padding: 0;
}
div.ez-toc-sticky-widget-container ul.ez-toc-sticky-list {
padding: 10px;
}
#ez-toc-sticky-container ul ul,
.ez-toc div.ez-toc-sticky-widget-container ul ul {
margin-left: 1.5em;
}
#ez-toc-sticky-container ul,
#ez-toc-sticky-container li {
margin: 0;
padding: 0;
}
#ez-toc-sticky-container ul,
#ez-toc-sticky-container li,
#ez-toc-sticky-container ul li,
div.ez-toc-sticky-widget-container,
div.ez-toc-sticky-widget-container li {
background: none;
list-style: none none;
line-height: 1.6;
margin: 0;
overflow: hidden;
z-index: 1;
}
#ez-toc-sticky-container p.ez-toc-sticky-title {
text-align: left;
line-height: 1.45;
margin: 0;
padding: 0;
}
.ez-toc-sticky-title-container {
display: table;
width: 100%;
}
.ez-toc-sticky-title,
.ez-toc-sticky-title-toggle {
display: table-cell;
text-align: left;
vertical-align: middle;
}
#ez-toc-sticky-container.ez-toc-sticky-black p.ez-toc-sticky-title {
color: #FFF;
}
#ez-toc-sticky-container div.ez-toc-sticky-title-container + ul.ez-toc-sticky-list {
margin-top: 1em;
}
.ez-toc-sticky-wrap-left {
float: left;
margin-right: 10px;
}
.ez-toc-sticky-wrap-right {
float: right;
margin-left: 10px;
}
.ez-toc-sticky-wrap-center {
margin: 0 auto;
}
#ez-toc-sticky-container a {
color: #444444;
box-shadow: none;
text-decoration: none;
text-shadow: none;
display: inline-flex;
align-items: stretch;
flex-wrap: nowrap;
}
#ez-toc-sticky-container a:visited {
color: #9f9f9f;
}
#ez-toc-sticky-container a:hover {
text-decoration: underline;
}
#ez-toc-sticky-container.ez-toc-sticky-black a {
color: #FFF;
}
#ez-toc-sticky-container.ez-toc-sticky-black a:visited {
color: #FFF;
}
#ez-toc-sticky-container a.ez-toc-sticky-toggle {
color: #444444;
}
.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li::before {
content: ' ';
position: absolute;
left: 0;
right: 0;
height: 30px;
line-height: 30px;
z-index: -1;
}
.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li.active {
background-color: #EDEDED;
}
.ez-toc-sticky-widget-container li.active > a {
font-weight: 900;
}
.ez-toc-sticky-btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none
}
.ez-toc-sticky-btn:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px
}
.ez-toc-sticky-btn:hover, .ez-toc-sticky-btn:focus {
color: #333;
text-decoration: none
}
.ez-toc-sticky-btn:active, .ez-toc-sticky-btn.active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
}
.ez-toc-sticky-btn-default {
color: #333;
background-color: #fff;
border-color: #ccc
}
.ez-toc-sticky-btn-default:hover, .ez-toc-sticky-btn-default:focus, .ez-toc-sticky-btn-default:active, .ez-toc-sticky-btn-default.active {
color: #333;
background-color: #ebebeb;
border-color: #adadad
}
.ez-toc-sticky-btn-default:active, .ez-toc-sticky-btn-default.active {
background-image: none
}
.ez-toc-sticky-btn-sm, .ez-toc-sticky-btn-xs {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px
}
.ez-toc-sticky-btn-xs {
padding: 1px 5px
}
.ez-toc-sticky-btn-default {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075)
}
.ez-toc-sticky-btn-default:active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
}
.ez-toc-sticky-btn:active, .btn.active {
background-image: none
}
.ez-toc-sticky-btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-gradient(linear, left 0, left 100%, from(#fff), to(#e0e0e0));
background-image: -webkit-linear-gradient(top, #fff 0, #e0e0e0 100%);
background-image: -moz-linear-gradient(top, #fff 0, #e0e0e0 100%);
background-image: linear-gradient(to bottom, #fff 0, #e0e0e0 100%);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
}
.ez-toc-sticky-btn-default:hover, .ez-toc-sticky-btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px
}
.ez-toc-sticky-btn-default:active, .ez-toc-sticky-btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb
}
.ez-toc-sticky-pull-right {
float: right !important;
margin-left: 10px;
}
.ez-toc-sticky-glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
-webkit-font-smoothing: antialiased;
font-style: normal;
font-weight: normal;
line-height: 1;
-moz-osx-font-smoothing: grayscale
}
.ez-toc-sticky-glyphicon:empty {
width: 1em
}
.ez-toc-sticky-toggle i.ez-toc-sticky-glyphicon {
font-size: 16px;
margin-left: 2px;
}
#ez-toc-sticky-container input {
position: absolute;
left: -999em;
}
#ez-toc-sticky-container input[type="checkbox"]:checked + nav {
opacity: 0;
max-height: 0;
border: none;
display: none;
}
#ez-toc-sticky-container label {
float: right;
position: relative;
left: 10px;
font-size: 16px;
background: #f9efef;
padding: 0px 4px 0px 5px;
border: 1px solid #999191;
border-radius: 5px;
cursor: pointer;
}
div#ez-toc-sticky-container p.ez-toc-sticky-title {
display: contents;
}
div#ez-toc-sticky-container {
padding-right: 20px;
}
label.cssicon .ez-toc-sticky-glyphicon:empty {
font-size: 16px;
margin-left: 2px;
}
label.cssiconcheckbox {
display: none;
}
.ez-toc-sticky-widget-container ul li a {
padding-left: 10px;
}
.ez-toc-sticky-widget-container ul.ez-toc-sticky-list li.active {
height: auto !important;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,53 @@
/**
* ------EZ TOC Widget CSS Admin-------
* Ez Toc Widget Sticky css for admin panel to setup widget content
* @plugin easy-table-of-contents
* @since 2.0.41
*
*/
#ez-toc-widget-options-container{
display: none;
}
.ez-toc-widget-appearance-title, .ez-toc-widget-advanced-title {
margin-bottom: 12px;
}
.ez-toc-widget-appearance-title label, .ez-toc-widget-advanced-title label {
vertical-align: top;
}
input.ez_toc_widget_appearance_options:checked ~ #ez-toc-widget-options-container, input.ez_toc_widget_advanced_options:checked ~ #ez-toc-widget-options-container {
display: flex;
flex-wrap: wrap;
text-align: left;
justify-content: flex-start;
align-items: baseline;
}
#ez-toc-widget-options-container .ez-toc-widget-form-group {
display: flex;
align-items: baseline;
flex-wrap: nowrap;
flex-basis: 100%;
justify-content: flex-start;
margin-top: 15px;
}
.ez-toc-widget-form-group label {
flex-basis: 55%;
}
#ez-toc-widget-options-container .ez-toc-widget-form-data {
display: flex;
justify-content: center;
}
.ez-toc-widget-appearance-options-container .ez-toc-widget-form-group {
margin-bottom: 0;
}
#ez-toc-widget-options-container .ez-toc-widget-form-group input[type=text], #ez-toc-widget-options-container .ez-toc-widget-form-group input[type=number] {
width: 53px;
margin-left: 8px;
}
#ez-toc-widget-options-container .ez-toc-widget-form-group select {
width: 53px;
margin-left: 8px;
}
#ez-toc-widget-options-container .ez-toc-widget-form-group input[type=checkbox] {
margin-left: 8px;
}

View File

@ -0,0 +1 @@
#ez-toc-widget-options-container{display:none}.ez-toc-widget-advanced-title,.ez-toc-widget-appearance-title{margin-bottom:12px}.ez-toc-widget-advanced-title label,.ez-toc-widget-appearance-title label{vertical-align:top}input.ez_toc_widget_advanced_options:checked~#ez-toc-widget-options-container,input.ez_toc_widget_appearance_options:checked~#ez-toc-widget-options-container{display:flex;flex-wrap:wrap;text-align:left;justify-content:flex-start;align-items:baseline}#ez-toc-widget-options-container .ez-toc-widget-form-group{display:flex;align-items:baseline;flex-wrap:nowrap;flex-basis:100%;justify-content:flex-start;margin-top:15px}.ez-toc-widget-form-group label{flex-basis:55%}#ez-toc-widget-options-container .ez-toc-widget-form-data{display:flex;justify-content:center}.ez-toc-widget-appearance-options-container .ez-toc-widget-form-group{margin-bottom:0}#ez-toc-widget-options-container .ez-toc-widget-form-group input[type=number],#ez-toc-widget-options-container .ez-toc-widget-form-group input[type=text],#ez-toc-widget-options-container .ez-toc-widget-form-group select{width:53px;margin-left:8px}#ez-toc-widget-options-container .ez-toc-widget-form-group input[type=checkbox]{margin-left:8px}

View File

@ -0,0 +1,269 @@
div.ez-toc-widget-sticky-container {
padding: 0;
position: relative;
}
div.ez-toc-widget-sticky-container ul {
display: block;
}
div.ez-toc-widget-sticky-container li {
border: none;
padding: 0;
}
div.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list {
padding: 10px;
}
#ez-toc-widget-sticky-container ul ul,
.ez-toc div.ez-toc-widget-sticky-container ul ul {
margin-left: 1.5em;
}
div.ez-toc-widget-sticky-container,
div.ez-toc-widget-sticky-container li {
background: none;
list-style: none none;
line-height: 1.6;
margin: 0;
overflow: hidden;
z-index: 1;
}
.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li::before {
content: ' ';
position: absolute;
left: 0;
right: 0;
height: 30px;
line-height: 30px;
z-index: -1;
}
.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li.active {
background-color: #EDEDED;
}
.ez-toc-widget-sticky-container li.active > a {
font-weight: 900;
}
#ez-toc-widget-sticky-container label.cssicon {
height: 30px;
}
#ez-toc-widget-sticky-container input[type="checkbox"]:checked + nav {
opacity: 0;
max-height: 0;
border: none;
display: none;
}
#ez-toc-widget-sticky-container nav ul.eztoc-widget-sticky-visibility-hide-by-default {
display: none;
}
#ez-toc-widget-sticky-container label.cssicon {
float: right;
position: relative;
font-size: 16px;
padding: 0;
border: 1px solid #999191;
border-radius: 5px;
cursor: pointer;
left: 10px;
width: 35px;
}
.ez-toc-widget-sticky-container ul li a {
padding-left: 10px;
display: inline-flex;
align-items: stretch;
flex-wrap: nowrap;
}
.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li.active {
height: auto !important;
}
.ez-toc-title,
.ez-toc-widget-sticky-title-toggle {
display: inline;
text-align: left;
vertical-align: middle;
}
.ez-toc-widget-sticky-wrap-left {
float: left;
margin-right: 10px;
}
.ez-toc-widget-sticky-wrap-right {
float: right;
margin-left: 10px;
}
.ez-toc-widget-sticky-btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none
}
.ez-toc-widget-sticky-btn:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px
}
.ez-toc-widget-sticky-btn:hover,
.ez-toc-widget-sticky-btn:focus {
color: #333;
text-decoration: none
}
.ez-toc-widget-sticky-btn:active,
.ez-toc-widget-sticky-btn.active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
}
.ez-toc-widget-sticky-btn-default {
color: #333;
background-color: #fff;
border-color: #ccc
}
.ez-toc-widget-sticky-btn-default:hover,
.ez-toc-widget-sticky-btn-default:focus,
.ez-toc-widget-sticky-btn-default:active,
.ez-toc-widget-sticky-btn-default.active {
color: #333;
background-color: #ebebeb;
border-color: #adadad
}
.ez-toc-widget-sticky-btn-default:active,
.ez-toc-widget-sticky-btn-default.active {
background-image: none
}
.ez-toc-widget-sticky-btn-sm,
.ez-toc-widget-sticky-btn-xs {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px
}
.ez-toc-widget-sticky-btn-xs {
padding: 1px 5px
}
.ez-toc-widget-sticky-btn-default {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075)
}
.ez-toc-widget-sticky-btn-default:active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
}
.ez-toc-widget-sticky-btn:active,
.btn.active {
background-image: none
}
.ez-toc-widget-sticky-btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-gradient(linear, left 0, left 100%, from(#fff), to(#e0e0e0));
background-image: -webkit-linear-gradient(top, #fff 0, #e0e0e0 100%);
background-image: -moz-linear-gradient(top, #fff 0, #e0e0e0 100%);
background-image: linear-gradient(to bottom, #fff 0, #e0e0e0 100%);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
}
.ez-toc-widget-sticky-btn-default:hover,
.ez-toc-widget-sticky-btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px
}
.ez-toc-widget-sticky-btn-default:active,
.ez-toc-widget-sticky-btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb
}
.ez-toc-widget-sticky-pull-right {
float: right !important;
margin-left: 10px;
}
.ez-toc-widget-sticky-glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
-webkit-font-smoothing: antialiased;
font-style: normal;
font-weight: normal;
line-height: 1;
-moz-osx-font-smoothing: grayscale
}
.ez-toc-widget-sticky-glyphicon:empty {
width: 1em
}
.ez-toc-widget-sticky-toggle i.ez-toc-widget-sticky-glyphicon {
font-size: 16px;
margin-left: 2px;
}
.ez-toc-widget-sticky-wrap-center {
margin: 0 auto;
}
.ez-toc-widget-sticky-toggle #item {
position: absolute;
left: -999em;
}
label.cssicon .ez-toc-widget-sticky-glyphicon:empty {
font-size: 16px;
margin-left: 2px;
}
label.cssiconcheckbox {
display: none;
}

View File

@ -0,0 +1 @@
div.ez-toc-widget-sticky-container{padding:0;position:relative}div.ez-toc-widget-sticky-container ul{display:block}div.ez-toc-widget-sticky-container li{border:none;padding:0}div.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list{padding:10px}#ez-toc-widget-sticky-container ul ul,.ez-toc div.ez-toc-widget-sticky-container ul ul{margin-left:1.5em}div.ez-toc-widget-sticky-container,div.ez-toc-widget-sticky-container li{background:0 0;list-style:none;line-height:1.6;margin:0;overflow:hidden;z-index:1}.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li::before{content:' ';position:absolute;left:0;right:0;height:30px;line-height:30px;z-index:-1}.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li.active{background-color:#ededed;height:auto!important}.ez-toc-widget-sticky-container li.active>a{font-weight:900}#ez-toc-widget-sticky-container input[type=checkbox]:checked+nav{opacity:0;max-height:0;border:none;display:none}#ez-toc-widget-sticky-container nav ul.eztoc-widget-sticky-visibility-hide-by-default,label.cssiconcheckbox{display:none}#ez-toc-widget-sticky-container label.cssicon{height:30px;float:right;position:relative;font-size:16px;padding:0;border:1px solid #999191;border-radius:5px;cursor:pointer;left:10px;width:35px}.ez-toc-widget-sticky-container ul li a{padding-left:10px;display:inline-flex;align-items:stretch;flex-wrap:nowrap}.ez-toc-title,.ez-toc-widget-sticky-title-toggle{display:inline;text-align:left;vertical-align:middle}.ez-toc-widget-sticky-wrap-left{float:left;margin-right:10px}.ez-toc-widget-sticky-wrap-right{float:right;margin-left:10px}.ez-toc-widget-sticky-btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.ez-toc-widget-sticky-btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.ez-toc-widget-sticky-btn:focus,.ez-toc-widget-sticky-btn:hover{color:#333;text-decoration:none}.ez-toc-widget-sticky-btn.active,.ez-toc-widget-sticky-btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.ez-toc-widget-sticky-btn-default{color:#333;background-color:#fff;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);text-shadow:0 1px 0 #fff;background-image:-webkit-gradient(linear,left 0,left 100%,from(#fff),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-moz-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);background-repeat:repeat-x;border-color:#ccc}.ez-toc-widget-sticky-btn-default.active,.ez-toc-widget-sticky-btn-default:active,.ez-toc-widget-sticky-btn-default:focus,.ez-toc-widget-sticky-btn-default:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.ez-toc-widget-sticky-btn-default.active,.ez-toc-widget-sticky-btn-default:active{background-image:none;background-color:#e0e0e0;border-color:#dbdbdb}.ez-toc-widget-sticky-btn-sm,.ez-toc-widget-sticky-btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.ez-toc-widget-sticky-btn-xs{padding:1px 5px}.ez-toc-widget-sticky-btn-default:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.active,.ez-toc-widget-sticky-btn:active{background-image:none}.ez-toc-widget-sticky-btn-default:focus,.ez-toc-widget-sticky-btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.ez-toc-widget-sticky-pull-right{float:right!important;margin-left:10px}.ez-toc-widget-sticky-glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;line-height:1;-moz-osx-font-smoothing:grayscale}.ez-toc-widget-sticky-glyphicon:empty{width:1em}.ez-toc-widget-sticky-toggle i.ez-toc-widget-sticky-glyphicon,label.cssicon .ez-toc-widget-sticky-glyphicon:empty{font-size:16px;margin-left:2px}.ez-toc-widget-sticky-wrap-center{margin:0 auto}.ez-toc-widget-sticky-toggle #item{position:absolute;left:-999em}

View File

@ -0,0 +1,411 @@
#ez-toc-container {
background: #F9F9F9;
border: 1px solid #AAAAAA;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
display: table;
margin-bottom: 1em;
padding-top: 10px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 10px;
position: relative;
width: auto;
}
div.ez-toc-widget-container {
padding: 0;
position: relative;
}
#ez-toc-container.ez-toc-light-blue {
background: #EDF6FF;
}
#ez-toc-container.ez-toc-white {
background: #FFFFFF;
}
#ez-toc-container.ez-toc-black {
background: #000000;
}
#ez-toc-container.ez-toc-transparent {
background: none transparent;
}
div.ez-toc-widget-container ul {
display: block;
}
div.ez-toc-widget-container li {
border: none;
padding: 0;
}
div.ez-toc-widget-container ul.ez-toc-list {
padding: 10px;
}
#ez-toc-container ul ul,
.ez-toc div.ez-toc-widget-container ul ul {
margin-left: 1.5em;
}
#ez-toc-container ul,
#ez-toc-container li {
margin: 0;
padding: 0;
}
#ez-toc-container ul,
#ez-toc-container li,
#ez-toc-container ul li,
div.ez-toc-widget-container,
div.ez-toc-widget-container li {
background: none;
list-style: none none;
line-height: 1.6;
margin: 0;
overflow: hidden;
z-index: 1;
}
#ez-toc-container .ez-toc-title {
text-align: left;
line-height: 1.45;
margin: 0;
padding: 0;
}
.ez-toc-title-container {
display: table;
width: 100%;
}
.ez-toc-title,
.ez-toc-title-toggle {
display: inline;
text-align: left;
vertical-align: middle;
}
#ez-toc-container.ez-toc-black p.ez-toc-title {
color: #FFF;
}
#ez-toc-container div.ez-toc-title-container + ul.ez-toc-list {
margin-top: 1em;
}
.ez-toc-wrap-left {
margin: 0px auto 1em 0px !important;
}
.ez-toc-wrap-left-text {
float: left;
}
.ez-toc-wrap-right {
margin: 0px 0px 1em auto !important;
}
.ez-toc-wrap-right-text {
float: right;
}
#ez-toc-container a {
color: #444444;
box-shadow: none;
text-decoration: none;
text-shadow: none;
display: inline-flex;
align-items: stretch;
flex-wrap: nowrap;
}
#ez-toc-container a:visited {
color: #9f9f9f;
}
#ez-toc-container a:hover {
text-decoration: underline;
}
#ez-toc-container.ez-toc-black a {
color: #FFF;
}
#ez-toc-container.ez-toc-black a:visited {
color: #FFF;
}
#ez-toc-container a.ez-toc-toggle {
display: flex;
align-items: center;
color: #444444;
}
.ez-toc-widget-container ul.ez-toc-list li::before {
content: ' ';
position: absolute;
left: 0;
right: 0;
height: 30px;
line-height: 30px;
z-index: -1;
}
.ez-toc-widget-container ul.ez-toc-list li.active {
background-color: #EDEDED;
}
.ez-toc-widget-container li.active > a {
font-weight: 900;
}
.ez-toc-btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none
}
.ez-toc-btn:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px
}
.ez-toc-btn:hover,
.ez-toc-btn:focus {
color: #333;
text-decoration: none
}
.ez-toc-btn:active,
.ez-toc-btn.active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
}
.ez-toc-btn-default {
color: #333;
background-color: #fff;
border-color: #ccc
}
.ez-toc-btn-default:hover,
.ez-toc-btn-default:focus,
.ez-toc-btn-default:active,
.ez-toc-btn-default.active {
color: #333;
background-color: #ebebeb;
border-color: #adadad
}
.ez-toc-btn-default:active,
.ez-toc-btn-default.active {
background-image: none
}
.ez-toc-btn-sm,
.ez-toc-btn-xs {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px
}
.ez-toc-btn-xs {
padding: 1px 5px
}
.ez-toc-btn-default {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075)
}
.ez-toc-btn-default:active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
}
.ez-toc-btn:active,
.btn.active {
background-image: none
}
.ez-toc-btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-gradient(linear, left 0, left 100%, from(#fff), to(#e0e0e0));
background-image: -webkit-linear-gradient(top, #fff 0, #e0e0e0 100%);
background-image: -moz-linear-gradient(top, #fff 0, #e0e0e0 100%);
background-image: linear-gradient(to bottom, #fff 0, #e0e0e0 100%);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false)
}
.ez-toc-btn-default:hover,
.ez-toc-btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px
}
.ez-toc-btn-default:active,
.ez-toc-btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb
}
.ez-toc-pull-right {
float: right !important;
margin-left: 10px;
}
#ez-toc-container label.cssicon, #ez-toc-widget-container label.cssicon {
height: 30px;
}
.ez-toc-glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
-webkit-font-smoothing: antialiased;
font-style: normal;
font-weight: normal;
line-height: 1;
-moz-osx-font-smoothing: grayscale
}
.ez-toc-glyphicon:empty {
width: 1em
}
.ez-toc-toggle i.ez-toc-glyphicon {
font-size: 16px;
margin-left: 2px;
}
#ez-toc-container input {
position: absolute;
left: -999em;
}
#ez-toc-container input[type="checkbox"]:checked + nav, #ez-toc-widget-container input[type="checkbox"]:checked + nav {
opacity: 0;
max-height: 0;
border: none;
display: none;
}
#ez-toc-container label {
position: relative;
cursor: pointer;
display: initial;
}
#ez-toc-container .ez-toc-js-icon-con{
position: relative;
cursor: pointer;
display: initial;
}
#ez-toc-container .ez-toc-toggle label {
float: right;
position: relative;
font-size: 16px;
padding: 0;
border: 1px solid #999191;
border-radius: 5px;
cursor: pointer;
left: 10px;
width: 35px;
}
#ez-toc-container .ez-toc-js-icon-con {
float: right;
position: relative;
font-size: 16px;
padding: 0;
border: 1px solid #999191;
border-radius: 5px;
cursor: pointer;
left: 10px;
width: 35px;
}
div#ez-toc-container .ez-toc-title {
display: initial;
}
.ez-toc-wrap-center {
margin: 0 auto 1em auto !important;
}
#ez-toc-container a.ez-toc-toggle {
color: #444444;
background: inherit;
border: inherit;
}
.ez-toc-toggle #item {
position: absolute;
left: -999em;
}
label.cssicon .ez-toc-glyphicon:empty {
font-size: 16px;
margin-left: 2px;
}
label.cssiconcheckbox {
display: none;
}
.ez-toc-widget-container ul li a {
padding-left: 10px;
display: inline-flex;
align-items: stretch;
flex-wrap: nowrap;
}
.ez-toc-widget-container ul.ez-toc-list li {
height: auto !important;
}
.ez-toc-cssicon{
float: right;
position: relative;
font-size: 16px;
padding: 0;
border: 1px solid #999191;
border-radius: 5px;
cursor: pointer;
left: 10px;
width: 35px;
}
.ez-toc-icon-toggle-span {
display: flex;
align-items: center;
width: 35px;
height: 30px;
justify-content: center;
direction:ltr;
}
#ez-toc-container .eztoc-toggle-hide-by-default{
display:none;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,364 @@
jQuery(document).ready(function ($) {
var ez_toc_color_picker = $('.ez-toc-color-picker');
if (ez_toc_color_picker.length) {
ez_toc_color_picker.wpColorPicker();
}
var ezTocSettingsWidth = document.getElementById('ez-toc-settings[width]');
var ezTocSettingsCustomWidth = document.getElementById('ez-toc-settings[width_custom]');
if(ezTocSettingsCustomWidth) {
if(ezTocSettingsWidth.value != 'custom')
ezTocSettingsCustomWidth.parentNode.parentNode.style.display = "none";
ezTocSettingsWidth.addEventListener('change', function () {
if (document.getElementById('ez-toc-settings[width]').value == 'custom') {
ezTocSettingsCustomWidth.parentNode.parentNode.style.display = "revert";
} else {
ezTocSettingsCustomWidth.parentNode.parentNode.style.display = "none";
}
});
}
$("#reset-options-to-default-button").click(function() {
let text = "Do you want reset settings to default options?";
if (confirm(text) == true) {
$.post(ajaxurl, { action: 'eztoc_reset_options_to_default', eztoc_security_nonce: cn_toc_admin_data.eztoc_security_nonce },
function (data) {
alert('Default Options Reset Now!');
window.location.reload();
}
);
}
});
$("#subscribe-newsletter-form").on('submit', function (e) {
e.preventDefault();
var $form = $("#subscribe-newsletter-form");
var name = $form.find('input[name="name"]').val();
var email = $form.find('input[name="email"]').val();
var website = $form.find('input[name="company"]').val();
$.post(ajaxurl, {action: 'eztoc_subscribe_newsletter', name: name, email: email, website: website, eztoc_security_nonce: cn_toc_admin_data.eztoc_security_nonce},
function (data) {
if(data === 'security_nonce_not_verified' ){
alert('Security nonce not verified');
return false;
}
}
);
});
let position = $('#eztoc-general').find("select[name='ez-toc-settings[position]']");
let customParaNumber = $('#eztoc-general').find("input[name='ez-toc-settings[custom_para_number]']");
let customImgNumber = $('#eztoc-general').find("input[name='ez-toc-settings[custom_img_number]']");
let blockQCheckB = $('#eztoc-general').find("input[name='ez-toc-settings[blockqoute_checkbox]']");
if($(position).val() == 'aftercustompara'){
$(customParaNumber).parents('tr').show();
}else{
$(customParaNumber).parents('tr').hide();
}
if($(position).val() == 'afterpara' || $(position).val() == 'aftercustompara'){
$(blockQCheckB).parents('tr').show();
}else{
$(blockQCheckB).parents('tr').hide();
}
if($(position).val() == 'aftercustomimg'){
$(customImgNumber).parents('tr').show();
}else{
$(customImgNumber).parents('tr').hide();
}
$(document).on("change", "select[name='ez-toc-settings[position]']", function() {
if($(this).val() == 'aftercustompara'){
$(customParaNumber).parents('tr').show(500);
}else{
$(customParaNumber).parents('tr').hide(500);
}
if($(this).val() == 'afterpara' || $(this).val() == 'aftercustompara'){
$(blockQCheckB).parents('tr').show(500);
}else{
$(blockQCheckB).parents('tr').hide(500);
}
if($(this).val() == 'aftercustomimg'){
$(customImgNumber).parents('tr').show(500);
}else{
$(customImgNumber).parents('tr').hide(500);
}
});
let check_method = $('#eztoc-general').find("select[name='ez-toc-settings[toc_loading]']");
let smoothCheck = $('#eztoc-general').find("input[name='ez-toc-settings[smooth_scroll]']");
let anchsJump = $('#eztoc-general').find("input[name='ez-toc-settings[avoid_anch_jump]']");
let js_where = $('#eztoc-advanced').find("select[name='ez-toc-settings[load_js_in]']");
if($(check_method).val() == 'js'){
$(smoothCheck).parents('tr').show();
$(anchsJump).parents('tr').show();
$(js_where).parents('tr').show();
}else{
$(smoothCheck).parents('tr').hide();
$(anchsJump).parents('tr').hide();
$(js_where).parents('tr').hide();
}
$(document).on("change", "select[name='ez-toc-settings[toc_loading]']", function() {
if($(this).val() == 'js'){
$(smoothCheck).parents('tr').show(500);
$(anchsJump).parents('tr').show(500);
$(js_where).parents('tr').show(500);
}else{
$(smoothCheck).parents('tr').hide(500);
$(anchsJump).parents('tr').hide(500);
$(js_where).parents('tr').hide(500);
}
});
let stickyHighlight = $('#eztoc-sticky').find("input[name='ez-toc-settings[sticky_highlight_heading]']");
let stickyHighlightBg = $('#eztoc-sticky').find("input[name='ez-toc-settings[sticky_highlight_bg_colour]']");
let stickyHighlightTitle = $('#eztoc-sticky').find("input[name='ez-toc-settings[sticky_highlight_title_colour]']");
if($(stickyHighlight).prop('checked') == true){
$(stickyHighlightBg).parents('tr').show();
$(stickyHighlightTitle).parents('tr').show();
}else{
$(stickyHighlightBg).parents('tr').hide();
$(stickyHighlightTitle).parents('tr').hide();
}
$(document).on("change", "input[name='ez-toc-settings[sticky_highlight_heading]']", function() {
if($(this).prop('checked') == true){
$(stickyHighlightBg).parents('tr').show(500);
$(stickyHighlightTitle).parents('tr').show(500);
}else{
$(stickyHighlightBg).parents('tr').hide(500);
$(stickyHighlightTitle).parents('tr').hide(500);
}
});
});
/**
* DisableScrolling Function
* @since 2.0.33
*/
function disableScrolling() {
var x=window.scrollX;
var y=window.scrollY;
window.onscroll=function(){window.scrollTo(x, y);};
}
/**
* EnableScrolling Function
* @since 2.0.33
*/
function enableScrolling(){
ezTocSettingsTabsFixed();
}
/**
* unsecuredCopyToClipboard Function
* Clipboard JS
* @since 2.0.33
*/
const unsecuredCopyToClipboard = (text) => {
const textArea = document.createElement("textarea");
textArea.value = text;
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
try {
document.execCommand('copy')
} catch (err) {
console.error('Unable to copy to clipboard', err)
}
document.body.removeChild(textArea)
};
/**
* ez_toc_clipboard Function
* Clipboard JS
* @since 2.0.33
*/
function ez_toc_clipboard(id, tooltipId, $this, event) {
event.preventDefault();
disableScrolling();
var copyText = $this.parentNode.parentNode.querySelectorAll("#" + id)[0];
copyText.select();
copyText.setSelectionRange(0, 99999);
unsecuredCopyToClipboard(copyText.value);
var tooltip = $this.querySelectorAll('span.' + tooltipId)[0];
tooltip.innerHTML = "Copied: " + copyText.value;
}
/**
* ez_toc_outFunc Function
* Clipboard JS
* @since 2.0.33
*/
function ez_toc_outFunc(tooltipId, $this, event) {
event.preventDefault();
var tooltip = $this.querySelectorAll('span.' + tooltipId)[0];
tooltip.innerHTML = "Copy to clipboard";
enableScrolling();
}
/**
* ezTocSettingsTabsFixed Function
* Apply Fixed CSS & JS for General Settings Tabs
* @since 2.0.38
*/
function ezTocSettingsTabsFixed() {
var ezTocProSettingsContainer = '<span class="general-pro-settings-container"> | <a href="#eztoc-prosettings" id="eztoc-link-prosettings">Pro Settings</a></span>';
var ezTocGeneralTabs = document.querySelector("#general #eztoc-tabs");
var ezTocGeneralForm = document.querySelector("#general form");
if(ezTocGeneralTabs !== null) {
window.onscroll = function () {
var y = window.scrollY;
var ez_toc_pro_settings_link_paid = document.getElementsByClassName('ez-toc-pro-settings-link-paid');
var ezTocElementProSettingsContainer = document.getElementsByClassName("general-pro-settings-container");
var ezTocGeneralTabsLinkGeneral = document.querySelector("#general #eztoc-tabs #eztoc-link-general");
var ezTocGeneralTabsLinkAppearance = document.querySelector("#general #eztoc-tabs #eztoc-link-appearance");
var ezTocGeneralTabsLinkAdvanced = document.querySelector("#general #eztoc-tabs #eztoc-link-advanced");
var ezTocGeneralTabsLinkShortcode = document.querySelector("#general #eztoc-tabs #eztoc-link-shortcode");
var ezTocGeneralTabsLinkSticky = document.querySelector("#general #eztoc-tabs #eztoc-link-sticky");
var ezTocGeneralTabsLinkCompatibility = document.querySelector("#general #eztoc-tabs #eztoc-link-compatibility");
var ezTocGeneralTabsLinkIeSettings = document.querySelector("#general #eztoc-tabs #eztoc-link-iesettings");
var ezTocGeneralTabsLinkProSettings = document.querySelector("#general #eztoc-tabs #eztoc-link-prosettings");
var minusOffsetTop = 100;
var ezTocGeneralContainerGeneral = document.querySelector("#general div#eztoc-general").offsetTop - minusOffsetTop;
var ezTocGeneralContainerAppearance = document.querySelector("#general div#eztoc-appearance").offsetTop - minusOffsetTop;
var ezTocGeneralContainerAdvanced = document.querySelector("#general div#eztoc-advanced").offsetTop - minusOffsetTop;
var ezTocGeneralContainerShortcode = document.querySelector("#general div#eztoc-shortcode").offsetTop - minusOffsetTop;
var ezTocGeneralContainerCompatibility = document.querySelector("#general div#eztoc-compatibility").offsetTop - minusOffsetTop;
var ezTocGeneralContainerIeSettings = document.querySelector("#general div#eztoc-iesettings").offsetTop - minusOffsetTop;
var ezTocGeneralContainerSticky = document.querySelector("#eztoc-sticky").offsetTop - minusOffsetTop;
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0) {
var ezTocGeneralContainerProSettings = document.querySelector("#general div#eztoc-prosettings").offsetTop - minusOffsetTop - 150;
} else {
ezTocGeneralContainerCompatibility -= 150;
ezTocGeneralContainerIeSettings -= 150;
}
ezTocGeneralTabsLinkGeneral.classList.add('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if (ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
if (y >= 100) {
ezTocGeneralTabs.classList.remove('stay');
ezTocGeneralTabs.classList.add('moving');
ezTocGeneralForm.classList.add('moving');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length == 0)
ezTocGeneralTabs.innerHTML += ezTocProSettingsContainer;
} else {
ezTocGeneralTabs.classList.remove('moving');
ezTocGeneralTabs.classList.add('stay');
ezTocGeneralForm.classList.remove('moving');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0)
document.querySelector(".general-pro-settings-container").remove();
}
if (y >= ezTocGeneralContainerGeneral) {
ezTocGeneralTabsLinkGeneral.classList.add('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (y >= ezTocGeneralContainerAppearance) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.add('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (y >= ezTocGeneralContainerAdvanced) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.add('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (y >= ezTocGeneralContainerShortcode) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.add('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (y >= ezTocGeneralContainerSticky) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.add('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (y >= ezTocGeneralContainerCompatibility) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.add('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (y >= ezTocGeneralContainerIeSettings) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.add('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.remove('active');
}
if (ezTocElementProSettingsContainer.length > 0 && y >= ezTocGeneralContainerProSettings) {
ezTocGeneralTabsLinkGeneral.classList.remove('active');
ezTocGeneralTabsLinkAppearance.classList.remove('active');
ezTocGeneralTabsLinkAdvanced.classList.remove('active');
ezTocGeneralTabsLinkShortcode.classList.remove('active');
ezTocGeneralTabsLinkCompatibility.classList.remove('active');
ezTocGeneralTabsLinkIeSettings.classList.remove('active');
ezTocGeneralTabsLinkSticky.classList.remove('active');
if(ez_toc_pro_settings_link_paid !== null && ez_toc_pro_settings_link_paid.length > 0 && ezTocElementProSettingsContainer.length > 0 && ezTocGeneralTabsLinkProSettings !== null)
ezTocGeneralTabsLinkProSettings.classList.add('active');
}
};
} else {
window.onscroll = function () {}
}
}
ezTocSettingsTabsFixed();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,163 @@
jQuery(function ($) {
// ======================================
// Set active heading in ez-toc-widget list
// ======================================
var ezTOCWidgetStickyheadings = $('span.ez-toc-section').toArray();
var ezTOCWidgetStickyheadingToListElementLinkMap = ezTOCWidgetStickygetHeadingToListElementLinkMap(ezTOCWidgetStickyheadings);
var ezTOCWidgetStickylistElementLinks = $.map(ezTOCWidgetStickyheadingToListElementLinkMap, function (value, key) {
return value
});
var ezTOCWidgetStickyscrollOffset = ezTOCWidgetStickygetScrollOffset();
ezTOCWidgetStickyactivateSetActiveEzTocListElement();
function ezTOCWidgetStickysetActiveEzTocListElement() {
var ezTOCWidgetStickyactiveHeading = ezTOCWidgetStickygetActiveHeading(ezTOCWidgetStickyscrollOffset, ezTOCWidgetStickyheadings);
if (ezTOCWidgetStickyactiveHeading) {
var ezTOCWidgetStickyactiveListElementLink = ezTOCWidgetStickyheadingToListElementLinkMap[ ezTOCWidgetStickyactiveHeading.id ];
ezTOCWidgetStickyremoveStyleFromNonActiveListElement(ezTOCWidgetStickyactiveListElementLink, ezTOCWidgetStickylistElementLinks);
ezTOCWidgetStickysetStyleForActiveListElementElement(ezTOCWidgetStickyactiveListElementLink);
}
}
function ezTOCWidgetStickyactivateSetActiveEzTocListElement() {
if (ezTOCWidgetStickyheadings.length > 0 && $('.ez-toc-widget-sticky-container').length) {
$(window).on('load resize scroll', ezTOCWidgetStickysetActiveEzTocListElement);
}
}
function ezTOCWidgetStickydeactivateSetActiveEzTocListElement() {
$(window).off('load resize scroll', ezTOCWidgetStickysetActiveEzTocListElement);
}
function ezTOCWidgetStickygetEzTocListElementLinkByHeading(ezTOCWidgetStickyheading) {
return $('.ez-toc-widget-sticky-container .ez-toc-widget-sticky-list a[href="#' + $(ezTOCWidgetStickyheading).attr('id') + '"]');
}
function ezTOCWidgetStickygetHeadingToListElementLinkMap(ezTOCWidgetStickyheadings) {
return ezTOCWidgetStickyheadings.reduce(function (ezTOCWidgetStickymap, ezTOCWidgetStickyheading) {
ezTOCWidgetStickymap[ ezTOCWidgetStickyheading.id ] = ezTOCWidgetStickygetEzTocListElementLinkByHeading(ezTOCWidgetStickyheading);
return ezTOCWidgetStickymap;
}, {});
}
function ezTOCWidgetStickygetScrollOffset() {
var ezTOCWidgetStickyscrollOffset = 30; // so if smooth offset is off, the correct title is set as active
if (typeof ezTOC != 'undefined' && typeof ezTOC.smooth_scroll != 'undefined' && parseInt(ezTOC.smooth_scroll) === 1) {
ezTOCWidgetStickyscrollOffset = (typeof ezTOC.scroll_offset != 'undefined') ? parseInt(ezTOC.scroll_offset) : 30;
}
var adminbar = $('#wpadminbar');
if (adminbar.length) {
ezTOCWidgetStickyscrollOffset += adminbar.height();
}
return ezTOCWidgetStickyscrollOffset;
}
function ezTOCWidgetStickygetActiveHeading(ezTOCWidgetStickytopOffset, ezTOCWidgetStickyheadings) {
var ezTOCWidgetStickyscrollTop = $(window).scrollTop();
var ezTOCWidgetStickyrelevantOffset = ezTOCWidgetStickyscrollTop + ezTOCWidgetStickytopOffset + 1;
var ezTOCWidgetStickyactiveHeading = ezTOCWidgetStickyheadings[ 0 ];
var ezTOCWidgetStickyclosestHeadingAboveOffset = ezTOCWidgetStickyrelevantOffset - $(ezTOCWidgetStickyactiveHeading).offset().top;
ezTOCWidgetStickyheadings.forEach(function (ezTOCWidgetStickysection) {
var ezTOCWidgetStickytopOffset = ezTOCWidgetStickyrelevantOffset - $(ezTOCWidgetStickysection).offset().top;
if (ezTOCWidgetStickytopOffset > 0 && ezTOCWidgetStickytopOffset < ezTOCWidgetStickyclosestHeadingAboveOffset) {
ezTOCWidgetStickyclosestHeadingAboveOffset = ezTOCWidgetStickytopOffset;
ezTOCWidgetStickyactiveHeading = ezTOCWidgetStickysection;
}
});
return ezTOCWidgetStickyactiveHeading;
}
function ezTOCWidgetStickyremoveStyleFromNonActiveListElement(ezTOCWidgetStickyactiveListElementLink, ezTOCWidgetStickylistElementLinks) {
ezTOCWidgetStickylistElementLinks.forEach(function (ezTOCWidgetStickylistElementLink) {
if (ezTOCWidgetStickyactiveListElementLink !== ezTOCWidgetStickylistElementLink && ezTOCWidgetStickylistElementLink.parent().hasClass('active')) {
ezTOCWidgetStickylistElementLink.parent().removeClass('active');
}
});
}
function ezTOCWidgetStickycorrectActiveListElementBackgroundColorHeight(ezTOCWidgetStickyactiveListElement) {
var ezTOCWidgetStickylistElementHeight = ezTOCWidgetStickygetListElementHeightWithoutUlChildren(ezTOCWidgetStickyactiveListElement);
ezTOCWidgetStickyaddListElementBackgroundColorHeightStyleToHead(ezTOCWidgetStickylistElementHeight);
}
function ezTOCWidgetStickygetListElementHeightWithoutUlChildren(ezTOCWidgetStickylistElement) {
var $ezTOCWidgetStickylistElement = $(ezTOCWidgetStickylistElement);
var ezTOCWidgetStickycontent = $ezTOCWidgetStickylistElement.html();
// Adding list item with class '.active' to get the real height.
// When adding a class to an existing element and using jQuery(..).height() directly afterwards,
// the height is the 'old' height. The height might change due to text-wraps when setting the text-weight bold for example
// When adding a new item, the height is calculated correctly.
// But only when it might be visible (so display:none; is not possible...)
// But because it get's directly removed afterwards it never will be rendered by the browser
// (at least in my tests in FF, Chrome, IE11 and Edge)
$ezTOCWidgetStickylistElement.parent().append('<li id="ez-toc-widget-sticky-height-test" class="active">' + ezTOCWidgetStickycontent + '</li>');
var ezTOCWidgetStickylistItem = $('#ez-toc-widget-sticky-height-test');
var ezTOCWidgetStickyheight = ezTOCWidgetStickylistItem.height();
ezTOCWidgetStickylistItem.remove();
return ezTOCWidgetStickyheight - $ezTOCWidgetStickylistElement.children('ul').first().height();
}
function ezTOCWidgetStickyaddListElementBackgroundColorHeightStyleToHead(ezTOCWidgetStickylistElementHeight) {
// Remove existing
$('#ez-toc-widget-sticky-active-height').remove();
// jQuery(..).css(..) doesn't work, because ::before is a pseudo element and not part of the DOM
// Workaround is to add it to head
$('<style id="ez-toc-widget-sticky-active-height">' +
'.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li.active {' +
// 'line-heigh:' + listElementHeight + 'px; ' +
'height:' + ezTOCWidgetStickylistElementHeight + 'px;' +
'} </style>')
.appendTo('head');
}
function ezTOCWidgetStickysetStyleForActiveListElementElement(ezTOCWidgetStickyactiveListElementLink) {
var ezTOCWidgetStickyactiveListElement = ezTOCWidgetStickyactiveListElementLink.parent();
if (!ezTOCWidgetStickyactiveListElement.hasClass('active')) {
ezTOCWidgetStickyactiveListElement.addClass('active');
}
ezTOCWidgetStickycorrectActiveListElementBackgroundColorHeight(ezTOCWidgetStickyactiveListElement);
}
/**
* EzTOC Widget Dynamic Scrolling JS
*
* @since 2.0.41
*/
setTimeout(function () {
jQuery(window).on('load resize scroll', ezTOCWidgetStickysetScrollActiveEzTocListElement);
}, 100);
var ezTocActiveList = '';
function ezTOCWidgetStickysetScrollActiveEzTocListElement(e) {
e.preventDefault();
if (jQuery(document).width() > 980 && jQuery(window).scrollTop() >= ezTocWidgetSticky.scroll_fixed_position && (jQuery('.post,.post-content').length == 0 || jQuery('.post,.post-content').length > 0 && jQuery(window).scrollTop() <= jQuery('.post,.post-content').height())) {
jQuery('.ez-toc-widget-sticky').css({
'position': 'fixed',
'width': (ezTocWidgetSticky.sidebar_width != 'auto') ? ezTocWidgetSticky.sidebar_width + '' + ezTocWidgetSticky.sidebar_width_size_unit : $('#ez-toc-widget-sticky-container').parents('.widget-area').width(),
'top': (ezTocWidgetSticky.fixed_top_position != '30') ? ezTocWidgetSticky.fixed_top_position + '' + ezTocWidgetSticky.fixed_top_position_size_unit : '30px',
'z-index': '9999999',
'background-color': jQuery(document).find('body').css("background-color"),
});
jQuery('.ez-toc-widget-sticky nav').css({
'overflow-y': (ezTocWidgetSticky.navigation_scroll_bar == 'on') ? 'auto' : 'hidden',
'max-height': (ezTocWidgetSticky.scroll_max_height != 'auto') ? ezTocWidgetSticky.scroll_max_height + '' + ezTocWidgetSticky.scroll_max_height_size_unit : 'calc(100vh - 111px)'
});
} else {
jQuery('.ez-toc-widget-sticky,.ez-toc-widget-sticky nav').attr('style', false);
}
var ezTocHrefActive = jQuery("#ez-toc-widget-sticky-container li.active a").attr('href');
var ezTocLastChild = "#ez-toc-widget-sticky-container nav>ul>li:last-child a";
let ezTocOffsetTopDynamic = Math.round(jQuery("#ez-toc-widget-sticky-container .ez-toc-link[href='" + ezTocHrefActive + "']").position().top);
var ezTocLastChildTop = Math.round(jQuery(ezTocLastChild).position().top);
if (ezTocHrefActive != ezTocActiveList) {
jQuery('.ez-toc-widget-sticky nav').scrollTop(Math.round(jQuery('.ez-toc-widget-sticky nav').scrollTop() + ezTocOffsetTopDynamic) - 50);
}
ezTocActiveList = ezTocHrefActive;
}
});

View File

@ -0,0 +1 @@
jQuery(function(t){var i,e,o,c=t("span.ez-toc-section").toArray(),s=(i=c,i.reduce(function(i,e){var o;return i[e.id]=t('.ez-toc-widget-sticky-container .ez-toc-widget-sticky-list a[href="#'+t(o=e).attr("id")+'"]'),i},{})),n=t.map(s,function(t,i){return t}),a=(e=30,"undefined"!=typeof ezTOC&&void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(e=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30),o=t("#wpadminbar"),o.length&&(e+=o.height()),e);function r(){var i,e,o,r,l,d=(i=a,e=c,o=t(window).scrollTop()+i+1,r=e[0],l=o-t(r).offset().top,e.forEach(function(i){var e=o-t(i).offset().top;e>0&&e<l&&(l=e,r=i)}),r);if(d){var h,p,g,f,v,u,w,z,y,k=s[d.id];(function t(i,e){e.forEach(function(t){i!==t&&t.parent().hasClass("active")&&t.parent().removeClass("active")})})(k,n),(g=(h=k).parent()).hasClass("active")||g.addClass("active"),y=(f=p=g,v=t(f),u=v.html(),v.parent().append('<li id="ez-toc-widget-sticky-height-test" class="active">'+u+"</li>"),w=t("#ez-toc-widget-sticky-height-test"),z=w.height(),w.remove(),z-v.children("ul").first().height()),t("#ez-toc-widget-sticky-active-height").remove(),t('<style id="ez-toc-widget-sticky-active-height">.ez-toc-widget-sticky-container ul.ez-toc-widget-sticky-list li.active {height:'+y+"px;} </style>").appendTo("head")}}function l(){t(window).off("load resize scroll",r)}c.length>0&&t(".ez-toc-widget-sticky-container").length&&t(window).on("load resize scroll",r),setTimeout(function(){jQuery(window).on("load resize scroll",h)},100);var d="";function h(i){i.preventDefault(),jQuery(document).width()>980&&jQuery(window).scrollTop()>=ezTocWidgetSticky.scroll_fixed_position&&(0==jQuery(".post,.post-content").length||jQuery(".post,.post-content").length>0&&jQuery(window).scrollTop()<=jQuery(".post,.post-content").height())?(jQuery(".ez-toc-widget-sticky").css({position:"fixed",width:"auto"!=ezTocWidgetSticky.sidebar_width?ezTocWidgetSticky.sidebar_width+""+ezTocWidgetSticky.sidebar_width_size_unit:t("#ez-toc-widget-sticky-container").parents(".widget-area").width(),top:"30"!=ezTocWidgetSticky.fixed_top_position?ezTocWidgetSticky.fixed_top_position+""+ezTocWidgetSticky.fixed_top_position_size_unit:"30px","z-index":"9999999","background-color":jQuery(document).find("body").css("background-color")}),jQuery(".ez-toc-widget-sticky nav").css({"overflow-y":"on"==ezTocWidgetSticky.navigation_scroll_bar?"auto":"hidden","max-height":"auto"!=ezTocWidgetSticky.scroll_max_height?ezTocWidgetSticky.scroll_max_height+""+ezTocWidgetSticky.scroll_max_height_size_unit:"calc(100vh - 111px)"})):jQuery(".ez-toc-widget-sticky,.ez-toc-widget-sticky nav").attr("style",!1);var e=jQuery("#ez-toc-widget-sticky-container li.active a").attr("href");let o=Math.round(jQuery("#ez-toc-widget-sticky-container .ez-toc-link[href='"+e+"']").position().top);jQuery("#ez-toc-widget-sticky-container nav>ul>li:last-child a").position().top,e!=d&&jQuery(".ez-toc-widget-sticky nav").scrollTop(Math.round(jQuery(".ez-toc-widget-sticky nav").scrollTop()+o)-50),d=e}});

View File

@ -0,0 +1,157 @@
function ezTocTabToggle(evt, idname, tabContentClass = 'eztoc-tabcontent', tabLinksClass = 'eztoc-tablinks') {
var i, tabcontent, tablinks;
evt.preventDefault();
tabcontent = document.getElementsByClassName(tabContentClass);
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName(tabLinksClass);
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(idname).style.display = "block";
evt.target.className += " active";
}
function eztocIsEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
}
//query form send starts here
jQuery(document).ready(function ($) {
var url = window.location.href;
if (url.indexOf('#technical-support') > -1) {
$("#eztoc-technical").click();
} else if (url.indexOf('#freevspro-support') > -1) {
$("#eztoc-freevspro").click();
} else if (url.indexOf('#welcome') > -1) {
$("#eztoc-welcome").click();
} else {
$("#eztoc-default").click();
}
$(".eztoc-send-query").on("click", function (e) {
e.preventDefault();
var message = $("#eztoc_query_message").val();
var email = $("#eztoc_query_email").val();
var premium_cus = $("#saswp_query_premium_cus").val();
if ($.trim(message) != '' && $.trim(email) != '' && eztocIsEmail(email) == true) {
$.ajax({
type: "POST",
url: ajaxurl,
dataType: "json",
data: {
action: "eztoc_send_query_message",
message: message,
email: email,
eztoc_security_nonce: eztoc_admin_data.eztoc_security_nonce
},
success: function (response) {
if (response['status'] == 't') {
$(".eztoc-query-success").show();
$(".eztoc-query-error").hide();
} else {
$(".eztoc-query-success").hide();
$(".eztoc-query-error").show();
}
},
error: function (response) {
console.log(response);
}
});
} else {
if ($.trim(message) == '' && $.trim(email) == '') {
alert('Please enter the message, email and select customer type');
} else {
if ($.trim(message) == '') {
alert('Please enter the message');
}
if ($.trim(email) == '') {
alert('Please enter the email');
}
if (eztocIsEmail(email) == false) {
alert('Please enter a valid email');
}
}
}
});
$("#subscribe-newsletter-form").on('submit', function (e) {
e.preventDefault();
var $form = $("#subscribe-newsletter-form");
var name = $form.find('input[name="name"]').val();
var email = $form.find('input[name="email"]').val();
var website = $form.find('input[name="company"]').val();
$.post(ajaxurl, {action: 'eztoc_subscribe_newsletter', name: name, email: email, website: website, eztoc_security_nonce: eztoc_admin_data.eztoc_security_nonce},
function (data) {
}
);
});
let stickyToggleCheckbox = $('#eztoc-sticky').find("input[name='ez-toc-settings[sticky-toggle]']");
let stickyToggleWidth = $('#eztoc-sticky').find("select[name='ez-toc-settings[sticky-toggle-width]']");
let stickyToggleWidthCustom = $('#eztoc-sticky').find("input[name='ez-toc-settings[sticky-toggle-width-custom]']");
let stickyToggleHeight = $('#eztoc-sticky').find("select[name='ez-toc-settings[sticky-toggle-height]']");
let stickyToggleHeightCustom = $('#eztoc-sticky').find("input[name='ez-toc-settings[sticky-toggle-height-custom]']");
if($(stickyToggleCheckbox).prop('checked') == false) {
$('#eztoc-sticky').find('tr:not(:first-child)').hide(500);
}
$(document).on("change", "input[name='ez-toc-settings[sticky-toggle]']", function() {
if($(stickyToggleCheckbox).prop('checked') == true) {
$('#eztoc-sticky').find('tr:not(:first-child)').show(500);
if($(stickyToggleWidth).val() == '' || $(stickyToggleWidth).val() != 'custom'){
$(stickyToggleWidthCustom).parents('tr').hide();
}
if($(stickyToggleHeight).val() == '' || $(stickyToggleHeight).val() != 'custom'){
$(stickyToggleHeightCustom).parents('tr').hide();
}
} else {
$('#eztoc-sticky').find('tr:not(:first-child)').hide(500);
}
});
update_sticky_width_field(stickyToggleWidth.val());
update_sticky_height_field(stickyToggleHeight.val());
$(document).on("change", "select[name='ez-toc-settings[sticky-toggle-width]']", function() {
update_sticky_width_field($(this).val());
});
$(document).on("change", "select[name='ez-toc-settings[sticky-toggle-height]']", function() {
update_sticky_height_field($(this).val());
});
});
function update_sticky_width_field(width){
let stickyToggleWidthCustom = jQuery('#eztoc-sticky').find("input[name='ez-toc-settings[sticky-toggle-width-custom]']");
if(width == 'custom') {
jQuery(stickyToggleWidthCustom).parents('tr').show(500);
} else {
jQuery(stickyToggleWidthCustom).parents('tr').hide(500);
}
}
function update_sticky_height_field(height){
let stickyToggleHeightCustom = jQuery('#eztoc-sticky').find("input[name='ez-toc-settings[sticky-toggle-height-custom]']");
if(height == 'custom') {
jQuery(stickyToggleHeightCustom).parents('tr').show(500);
} else {
jQuery(stickyToggleHeightCustom).parents('tr').hide(500);
}
}

View File

@ -0,0 +1 @@
function ezTocTabToggle(e,t,c="eztoc-tabcontent",i="eztoc-tablinks"){var s,n,o;for(e.preventDefault(),n=document.getElementsByClassName(c),s=0;s<n.length;s++)n[s].style.display="none";for(o=document.getElementsByClassName(i),s=0;s<o.length;s++)o[s].className=o[s].className.replace(" active","");document.getElementById(t).style.display="block",e.target.className+=" active"}function eztocIsEmail(e){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)}function update_sticky_width_field(e){let t=jQuery("#eztoc-sticky").find("input[name='ez-toc-settings[sticky-toggle-width-custom]']");"custom"==e?jQuery(t).parents("tr").show(500):jQuery(t).parents("tr").hide(500)}function update_sticky_height_field(e){let t=jQuery("#eztoc-sticky").find("input[name='ez-toc-settings[sticky-toggle-height-custom]']");"custom"==e?jQuery(t).parents("tr").show(500):jQuery(t).parents("tr").hide(500)}jQuery(document).ready((function(e){var t=window.location.href;t.indexOf("#technical-support")>-1?e("#eztoc-technical").click():t.indexOf("#freevspro-support")>-1?e("#eztoc-freevspro").click():t.indexOf("#welcome")>-1?e("#eztoc-welcome").click():e("#eztoc-default").click(),e(".eztoc-send-query").on("click",(function(t){t.preventDefault();var c=e("#eztoc_query_message").val(),i=e("#eztoc_query_email").val();e("#saswp_query_premium_cus").val();""!=e.trim(c)&&""!=e.trim(i)&&1==eztocIsEmail(i)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"eztoc_send_query_message",message:c,email:i,eztoc_security_nonce:eztoc_admin_data.eztoc_security_nonce},success:function(t){"t"==t.status?(e(".eztoc-query-success").show(),e(".eztoc-query-error").hide()):(e(".eztoc-query-success").hide(),e(".eztoc-query-error").show())},error:function(e){console.log(e)}}):""==e.trim(c)&&""==e.trim(i)?alert("Please enter the message, email and select customer type"):(""==e.trim(c)&&alert("Please enter the message"),""==e.trim(i)&&alert("Please enter the email"),0==eztocIsEmail(i)&&alert("Please enter a valid email"))})),e("#subscribe-newsletter-form").on("submit",(function(t){t.preventDefault();var c=e("#subscribe-newsletter-form"),i=c.find('input[name="name"]').val(),s=c.find('input[name="email"]').val(),n=c.find('input[name="company"]').val();e.post(ajaxurl,{action:"eztoc_subscribe_newsletter",name:i,email:s,website:n,eztoc_security_nonce:eztoc_admin_data.eztoc_security_nonce},(function(e){}))})),e(".eztoc-set-pos-btn").hide(),e("[name='ez-toc-settings[fixedtoc]']").on("click",(function(t){e(this).is(":checked")?(e(".eztoc-set-pos-btn").show(),console.log("checkbox checked")):(e(".eztoc-set-pos-btn").hide(),console.log("checkbox unchecked"))}));let c=e("#eztoc-sticky").find("input[name='ez-toc-settings[sticky-toggle]']"),i=e("#eztoc-sticky").find("select[name='ez-toc-settings[sticky-toggle-width]']"),s=e("#eztoc-sticky").find("input[name='ez-toc-settings[sticky-toggle-width-custom]']"),n=e("#eztoc-sticky").find("select[name='ez-toc-settings[sticky-toggle-height]']"),o=e("#eztoc-sticky").find("input[name='ez-toc-settings[sticky-toggle-height-custom]']");0==e(c).prop("checked")&&e("#eztoc-sticky").find("tr:not(:first-child)").hide(500),e(document).on("change","input[name='ez-toc-settings[sticky-toggle]']",(function(){1==e(c).prop("checked")?(e("#eztoc-sticky").find("tr:not(:first-child)").show(500),""!=e(i).val()&&"custom"==e(i).val()||e(s).parents("tr").hide(),""!=e(n).val()&&"custom"==e(n).val()||e(o).parents("tr").hide()):e("#eztoc-sticky").find("tr:not(:first-child)").hide(500)})),update_sticky_width_field(i.val()),update_sticky_height_field(n.val()),e(document).on("change","select[name='ez-toc-settings[sticky-toggle-width]']",(function(){update_sticky_width_field(e(this).val())})),e(document).on("change","select[name='ez-toc-settings[sticky-toggle-height]']",(function(){update_sticky_height_field(e(this).val())}))}));

View File

@ -0,0 +1,302 @@
jQuery( function( $ ) {
/**
* @typedef ezTOC
* @type {Object} ezTOC
* @property {string} affixSelector
* @property {string} scroll_offset
* @property {string} smooth_scroll
* @property {string} visibility_hide_by_default
*/
if ( typeof ezTOC != 'undefined' ) {
/**
* Init EZ TOC.
*/
function ezTOCInit() {
var affix = $( '.ez-toc-widget-container.ez-toc-affix' );
if ( 0 !== affix.length ) {
/**
* The smooth scroll offset needs to be taken into account when defining the offset_top property.
* @link https://github.com/shazahm1/Easy-Table-of-Contents/issues/19
*
* @type {number}
*/
var affixOffset = 30;
// check offset setting
if ( typeof ezTOC.scroll_offset != 'undefined' ) {
affixOffset = parseInt( ezTOC.scroll_offset );
}
$( ezTOC.affixSelector ).stick_in_parent( {
inner_scrolling: false,
offset_top: affixOffset
} )
}
$.fn.shrinkTOCWidth = function() {
$( this ).css( {
width: 'auto',
display: 'table'
});
if ( /MSIE 7\./.test( navigator.userAgent ) )
$( this ).css( 'width', '' );
};
if ( typeof ezTOC.visibility_hide_by_default != 'undefined' ) {
// Get all toggles that have not been loaded.
var toggles = $( '.ez-toc-toggle:not(.ez-toc-loaded),.ez-toc-widget-sticky-toggle:not(.ez-toc-loaded)' );
var invert = ezTOC.visibility_hide_by_default;
$.each(toggles, function(i, obj) {
var toggle = $(this);
$(toggle).addClass('ez-toc-loaded'); // Attach loaded class.
var toc = $( toggle ).parents('#ez-toc-container,#ez-toc-widget-container,#ez-toc-widget-sticky-container').find( 'ul.ez-toc-list,ul.ez-toc-widget-sticky-list' );
if($(toc).hasClass('eztoc-toggle-hide-by-default')){
invert = 1;
}
if ( Cookies ) {
Cookies.get( 'ezTOC_hidetoc-' + i ) == 1 ? $(toggle).data( 'visible', false ) : $(toggle).data( 'visible', true );
Cookies.remove('ezTOC_hidetoc-' + i)
} else {
$(toggle).data( 'visible', true );
Cookies.remove('ezTOC_hidetoc-' + i);
}
if ( invert ) {
$(toggle).data( 'visible', false )
}
if ( ! $(toggle).data( 'visible' ) ) {
toc.hide();
}
$(toggle).on( 'click', function( event ) {
event.preventDefault();
const main = document.querySelector("#ez-toc-container");
if(main){
main.classList.toggle("toc_close");
}
else
{
const side = document.querySelector(".ez-toc-widget-container,.ez-toc-widget-sticky-container");
side.classList.toggle("toc_close");
}
if ( $( this ).data( 'visible' ) ) {
$( this ).data( 'visible', false );
if ( Cookies ) {
if ( invert )
Cookies.set( 'ezTOC_hidetoc-' + i, null, { path: '/' } );
else
Cookies.set( 'ezTOC_hidetoc-' + i, '1', { expires: 30, path: '/' } );
}
toc.hide( 'fast' );
} else {
$( this ).data( 'visible', true );
if ( Cookies ) {
if ( invert )
Cookies.set( 'ezTOC_hidetoc-' + i, '1', { expires: 30, path: '/' } );
else
Cookies.set( 'ezTOC_hidetoc-' + i, null, { path: '/' } );
}
toc.show( 'fast' );
}
} );
});
}
// ======================================
// Set active heading in ez-toc-widget list
// ======================================
var headings = $( 'span.ez-toc-section' ).toArray();
var headingToListElementLinkMap = getHeadingToListElementLinkMap( headings );
var listElementLinks = $.map( headingToListElementLinkMap, function ( value, key ) {
return value
} );
var scrollOffset = getScrollOffset();
activateSetActiveEzTocListElement();
function setActiveEzTocListElement() {
var activeHeading = getActiveHeading( scrollOffset, headings );
if ( activeHeading ) {
var activeListElementLink = headingToListElementLinkMap[ activeHeading.id ];
removeStyleFromNonActiveListElement( activeListElementLink, listElementLinks );
setStyleForActiveListElementElement( activeListElementLink );
}
}
function activateSetActiveEzTocListElement() {
if ( headings.length > 0 && $('.ez-toc-widget-container').length) {
$( window ).on( 'load resize scroll', setActiveEzTocListElement );
}
}
function deactivateSetActiveEzTocListElement() {
$( window ).off( 'load resize scroll', setActiveEzTocListElement );
}
function getEzTocListElementLinkByHeading( heading ) {
return $( '.ez-toc-widget-container .ez-toc-list a[href="#' + $( heading ).attr( 'id' ) + '"]' );
}
function getHeadingToListElementLinkMap( headings ) {
return headings.reduce( function ( map, heading ) {
map[ heading.id ] = getEzTocListElementLinkByHeading( heading );
return map;
}, {} );
}
function getScrollOffset() {
var scrollOffset = 5; // so if smooth offset is off, the correct title is set as active
if ( typeof ezTOC.smooth_scroll != 'undefined' && parseInt( ezTOC.smooth_scroll ) === 1 ) {
scrollOffset = ( typeof ezTOC.scroll_offset != 'undefined' ) ? parseInt( ezTOC.scroll_offset ) : 30;
}
var adminbar = $( '#wpadminbar' );
if ( adminbar.length ) {
scrollOffset += adminbar.height();
}
return scrollOffset;
}
function getActiveHeading( topOffset, headings ) {
var scrollTop = $( window ).scrollTop();
var relevantOffset = scrollTop + topOffset + 1;
var activeHeading = headings[ 0 ];
var closestHeadingAboveOffset = relevantOffset - $( activeHeading ).offset().top;
headings.forEach( function ( section ) {
var topOffset = relevantOffset - $( section ).offset().top;
if ( topOffset > 0 && topOffset < closestHeadingAboveOffset ) {
closestHeadingAboveOffset = topOffset;
activeHeading = section;
}
} );
return activeHeading;
}
function removeStyleFromNonActiveListElement( activeListElementLink, listElementLinks ) {
listElementLinks.forEach( function ( listElementLink ) {
if ( activeListElementLink !== listElementLink && listElementLink.parent().hasClass( 'active' ) ) {
listElementLink.parent().removeClass( 'active' );
}
} );
}
function correctActiveListElementBackgroundColorHeight( activeListElement ) {
var listElementHeight = getListElementHeightWithoutUlChildren( activeListElement );
addListElementBackgroundColorHeightStyleToHead( listElementHeight );
}
function getListElementHeightWithoutUlChildren( listElement ) {
var $listElement = $( listElement );
var content = $listElement.html();
// Adding list item with class '.active' to get the real height.
// When adding a class to an existing element and using jQuery(..).height() directly afterwards,
// the height is the 'old' height. The height might change due to text-wraps when setting the text-weight bold for example
// When adding a new item, the height is calculated correctly.
// But only when it might be visible (so display:none; is not possible...)
// But because it get's directly removed afterwards it never will be rendered by the browser
// (at least in my tests in FF, Chrome, IE11 and Edge)
$listElement.parent().append( '<li id="ez-toc-height-test" class="active">' + content + '</li>' );
var listItem = $( '#ez-toc-height-test' );
var height = listItem.height();
listItem.remove();
return height - ($listElement.children( 'ul' ).first().height() || 0);
}
function addListElementBackgroundColorHeightStyleToHead( listElementHeight ) {
// Remove existing
//$( '#ez-toc-active-height' ).remove();
// jQuery(..).css(..) doesn't work, because ::before is a pseudo element and not part of the DOM
// Workaround is to add it to head
// $( '<style id="ez-toc-active-height">.ez-toc-widget-container ul.ez-toc-list li.active {height:' + listElementHeight + 'px;' + '} </style>' ).appendTo( 'head' );
$( '.ez-toc-widget-container ul.ez-toc-list li.active' ).css( 'height',listElementHeight + 'px' );
}
function setStyleForActiveListElementElement( activeListElementLink ) {
var activeListElement = activeListElementLink.parent();
if ( !activeListElement.hasClass( 'active' ) ) {
activeListElement.addClass( 'active' );
}
correctActiveListElementBackgroundColorHeight( activeListElement );
}
}
if($( '#ez-toc-container').length){
if(!$( '#ez-toc-container .ez-toc-toggle label span').html()){
$( '#ez-toc-container .ez-toc-toggle label').html(ezTOC.fallbackIcon);
}
}
/**
* Attach global init handler to ezTOC window object.
*/
ezTOC.init = function(){
ezTOCInit();
}
// Start EZ TOC on page load.
ezTOCInit();
if ( typeof ezTOC.ajax_toggle != 'undefined' && parseInt( ezTOC.ajax_toggle ) === 1 ) {
$( document ).ajaxComplete(function() {
ezTOCInit();
});
}
}
$("#ez-toc-more-links-enabler").click(function () {
$(".ez-toc-more-link").show();
$("#ez-toc-more-links-enabler").hide();
$("#ez-toc-more-links-disabler").attr("style","display:inline-block");
});
$("#ez-toc-more-links-disabler").click(function () {
$(".ez-toc-more-link").hide();
$("#ez-toc-more-links-enabler").show();
$("#ez-toc-more-links-disabler").hide();
});
$(document).on('click', '#ez-toc-open-sub-hd', function(e) {
$(this).attr("id","ez-toc-open-sub-hd-active");
e.preventDefault();
});
$(document).on('click', '#ez-toc-open-sub-hd-active', function(e) {
$(this).attr("id","ez-toc-open-sub-hd");
e.preventDefault();
});
} );

View File

@ -0,0 +1 @@
jQuery((function(e){if("undefined"!=typeof ezTOC){function t(){if(0!==e(".ez-toc-widget-container.ez-toc-affix").length){var t=30;void 0!==ezTOC.scroll_offset&&(t=parseInt(ezTOC.scroll_offset)),e(ezTOC.affixSelector).stick_in_parent({inner_scrolling:!1,offset_top:t})}if(e.fn.shrinkTOCWidth=function(){e(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&e(this).css("width","")},void 0!==ezTOC.visibility_hide_by_default){var o=e(".ez-toc-toggle:not(.ez-toc-loaded),.ez-toc-widget-sticky-toggle:not(.ez-toc-loaded)"),i=ezTOC.visibility_hide_by_default;e.each(o,(function(t,o){var n=e(this);e(n).addClass("ez-toc-loaded");var c=e(n).parents("#ez-toc-container,#ez-toc-widget-container,#ez-toc-widget-sticky-container").find("ul.ez-toc-list,ul.ez-toc-widget-sticky-list");e(c).hasClass("eztoc-toggle-hide-by-default")&&(i=1),Cookies?(1==Cookies.get("ezTOC_hidetoc-"+t)?e(n).data("visible",!1):e(n).data("visible",!0),Cookies.remove("ezTOC_hidetoc-"+t)):(e(n).data("visible",!0),Cookies.remove("ezTOC_hidetoc-"+t)),i&&e(n).data("visible",!1),e(n).data("visible")||c.hide(),e(n).on("click",(function(o){o.preventDefault();const n=document.querySelector("#ez-toc-container");if(n)n.classList.toggle("toc_close");else{document.querySelector(".ez-toc-widget-container,.ez-toc-widget-sticky-container").classList.toggle("toc_close")}e(this).data("visible")?(e(this).data("visible",!1),Cookies&&(i?Cookies.set("ezTOC_hidetoc-"+t,null,{path:"/"}):Cookies.set("ezTOC_hidetoc-"+t,"1",{expires:30,path:"/"})),c.hide("fast")):(e(this).data("visible",!0),Cookies&&(i?Cookies.set("ezTOC_hidetoc-"+t,"1",{expires:30,path:"/"}):Cookies.set("ezTOC_hidetoc-"+t,null,{path:"/"})),c.show("fast"))}))}))}var n=e("span.ez-toc-section").toArray(),c=function(t){return t.reduce((function(t,o){return t[o.id]=function(t){return e('.ez-toc-widget-container .ez-toc-list a[href="#'+e(t).attr("id")+'"]')}(o),t}),{})}(n),a=e.map(c,(function(e,t){return e})),s=function(){var t=5;void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(t=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30);var o=e("#wpadminbar");o.length&&(t+=o.height());return t}();function l(){var t=function(t,o){var i=e(window).scrollTop()+t+1,n=o[0],c=i-e(n).offset().top;return o.forEach((function(t){var o=i-e(t).offset().top;o>0&&o<c&&(c=o,n=t)})),n}(s,n);if(t){var o=c[t.id];!function(e,t){t.forEach((function(t){e!==t&&t.parent().hasClass("active")&&t.parent().removeClass("active")}))}(o,a),function(t){var o=t.parent();o.hasClass("active")||o.addClass("active");!function(t){var o=function(t){var o=e(t),i=o.html();o.parent().append('<li id="ez-toc-height-test" class="active">'+i+"</li>");var n=e("#ez-toc-height-test"),c=n.height();return n.remove(),c-(o.children("ul").first().height()||0)}(t);!function(t){e(".ez-toc-widget-container ul.ez-toc-list li.active").css("height",t+"px")}(o)}(o)}(o)}}n.length>0&&e(".ez-toc-widget-container").length&&e(window).on("load resize scroll",l)}e("#ez-toc-container").length&&(e("#ez-toc-container .ez-toc-toggle label span").html()||e("#ez-toc-container .ez-toc-toggle label").html(ezTOC.fallbackIcon)),ezTOC.init=function(){t()},t(),void 0!==ezTOC.ajax_toggle&&1===parseInt(ezTOC.ajax_toggle)&&e(document).ajaxComplete((function(){t()}))}e("#ez-toc-more-links-enabler").click((function(){e(".ez-toc-more-link").show(),e("#ez-toc-more-links-enabler").hide(),e("#ez-toc-more-links-disabler").attr("style","display:inline-block")})),e("#ez-toc-more-links-disabler").click((function(){e(".ez-toc-more-link").hide(),e("#ez-toc-more-links-enabler").show(),e("#ez-toc-more-links-disabler").hide()})),e(document).on("click","#ez-toc-open-sub-hd",(function(t){e(this).attr("id","ez-toc-open-sub-hd-active"),t.preventDefault()})),e(document).on("click","#ez-toc-open-sub-hd-active",(function(t){e(this).attr("id","ez-toc-open-sub-hd"),t.preventDefault()}))}));

View File

@ -0,0 +1,35 @@
jQuery(document).ready((function() {
var e = !1;
void 0 !== eztoc_smooth_local.JumpJsLinks && 1 === parseInt(eztoc_smooth_local.JumpJsLinks) && (e = !0), document.querySelectorAll(".ez-toc-link").forEach((e => {
e = e.replaceWith(e.cloneNode(!0))
})), document.querySelectorAll(".ez-toc-section").forEach((e => {
e.setAttribute("ez-toc-data-id", "#" + decodeURI(e.getAttribute("id")))
})), jQuery("a.ez-toc-link").click((function() {
let dhref = jQuery(this).attr("data-href");
let ahref = jQuery(this).attr("href");
if(1 === parseInt(eztoc_smooth_local.add_request_uri)){
if(jQuery(this).attr("data-href")){
let dsplit = jQuery(this).attr("data-href").split("#");
if(dsplit && dsplit.length > 1){
dhref = `#${dsplit[1]}`;
}
}
if(jQuery(this).attr("href")){
let asplit = jQuery(this).attr("href").split("#");
if(asplit && asplit.length > 1){
ahref = `#${asplit[1]}`;
}
}
}
let t = e ? dhref : ahref,
o = jQuery("#wpadminbar"),
c = jQuery("header"),
r = 0;
if (parseInt(eztoc_smooth_local.scroll_offset) > 30 && (r = parseInt(eztoc_smooth_local.scroll_offset)), o.length && (r += o.height()), (c.length && "fixed" == c.css("position") || "sticky" == c.css("position")) && (r += c.height()), jQuery('[ez-toc-data-id="' + decodeURI(t) + '"]').length > 0 && (r = jQuery('[ez-toc-data-id="' + decodeURI(t) + '"]').offset().top - r), jQuery("html, body").animate({
scrollTop: r
}, 500), e) return !1
}))
}));

View File

@ -0,0 +1 @@
jQuery(document).ready(function(){var t=!1;void 0!==eztoc_smooth_local.JumpJsLinks&&1===parseInt(eztoc_smooth_local.JumpJsLinks)&&(t=!0),document.querySelectorAll(".ez-toc-link").forEach(t=>{t=t.replaceWith(t.cloneNode(!0))}),document.querySelectorAll(".ez-toc-section").forEach(t=>{t.setAttribute("ez-toc-data-id","#"+decodeURI(t.getAttribute("id")))}),jQuery("a.ez-toc-link").click(function(){let e=jQuery(this).attr("data-href"),i=jQuery(this).attr("href");if(1===parseInt(eztoc_smooth_local.add_request_uri)){if(jQuery(this).attr("data-href")){let r=jQuery(this).attr("data-href").split("#");r&&r.length>1&&(e=`#${r[1]}`)}if(jQuery(this).attr("href")){let a=jQuery(this).attr("href").split("#");a&&a.length>1&&(i=`#${a[1]}`)}}let l=t?e:i,o=jQuery("#wpadminbar"),s=jQuery("header"),h=0;if(parseInt(eztoc_smooth_local.scroll_offset)>30&&(h=parseInt(eztoc_smooth_local.scroll_offset)),o.length&&(h+=o.height()),(s.length&&"fixed"==s.css("position")||"sticky"==s.css("position"))&&(h+=s.height()),jQuery('[ez-toc-data-id="'+decodeURI(l)+'"]').length>0&&(h=jQuery('[ez-toc-data-id="'+decodeURI(l)+'"]').offset().top-h),jQuery("html, body").animate({scrollTop:h},500),t)return!1})});

View File

@ -0,0 +1,12 @@
(function() {
tinymce.PluginManager.add('toc_mce_button', function( editor, url ) {
editor.addButton('toc_mce_button', {
text: 'TOC',
icon: false,
onclick: function() {
// change the shortcode as per your requirement
editor.insertContent('[ez-toc]');
}
});
});
})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB