plugin updates

This commit is contained in:
Tony Volpe
2024-07-16 13:57:46 +00:00
parent 41f50eacc4
commit 8f93917880
1529 changed files with 259452 additions and 25451 deletions

View File

@@ -0,0 +1,726 @@
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab:hover:before, .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active:not(.expanded):before, .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab:hover:before, .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab.active:before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #fff;
opacity: .12;
pointer-events: none
}
.ju-notice-success, .ju-notice-error {
padding: 10px;
margin: 20px 20px 20px 0;
background-color: #fff;
border-left: 5px solid #000;
-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3)
}
.clearfix:after, .clearfix:before {
content: '';
display: block;
clear: both
}
.no-display {
display: none
}
.hidden-item {
visibility: hidden
}
.tabs {
display: flex;
position: relative;
overflow: hidden;
margin: 0 auto;
white-space: nowrap;
width: 100%;
background-color: #fff
}
.tabs .tab {
flex-grow: 1;
display: block;
text-align: center;
padding: 0;
margin: 0;
float: left;
text-transform: uppercase;
text-overflow: ellipsis;
overflow: hidden;
letter-spacing: .8px;
min-width: 80px;
background-color: #2196f3
}
.tabs .tab a {
text-decoration: none;
color: #fff;
background-color: #2196f3;
display: block;
width: 100%;
height: 100%;
text-overflow: ellipsis;
overflow: hidden;
-webkit-transition: color .3s ease;
-moz-transition: color .3s ease;
-ms-transition: color .3s ease;
-o-transition: color .3s ease;
transition: color .3s ease
}
.tabs .tab.disabled a {
cursor: default;
opacity: .6
}
.tabs .indicator {
position: absolute;
bottom: 0;
height: 3px;
will-change: left, right;
background-color: #ff8726
}
.ju-button {
background-color: transparent;
color: #000;
padding: 10px 15px;
min-width: 180px;
border: 1px solid #9fabba;
text-transform: uppercase;
display: inline-block;
text-decoration: none;
cursor: pointer;
text-align: center;
letter-spacing: 2px;
transition: all ease .5s;
vertical-align: middle;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
border-radius: 40px
}
.ju-button:focus {
outline: 0
}
.ju-button:hover {
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
}
.ju-button.orange-button {
background-color: #ff8726;
color: #fff;
border-color: #ff8726
}
.ju-button.orange-outline-button {
background-color: #fff;
color: #ff8726;
border-color: #fff
}
.ju-rect-button {
background-color: #fff;
border: 1px solid #ff8726;
color: #ff8726;
cursor: pointer;
padding: 10px 15px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
.ju-material-button {
border: 0;
outline: 0;
padding: 10px 20px;
text-transform: uppercase;
cursor: pointer;
font-size: 14px;
background-color: #2196f3;
color: #fff
}
.ju-material-button:hover {
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
}
input.ju-input {
padding: 15px;
border: 1px solid #ddd;
background-color: #fff;
height: auto;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
input.ju-input:focus {
border-color: #ff8726;
box-shadow: none;
outline: 0
}
input.ju-input.minicolors {
padding-left: 55px
}
input.ju-input.minicolors + .minicolors-swatch {
height: 48px;
width: 48px;
top: 2px;
left: 2px;
border: 0
}
input.ju-input.minicolors + .minicolors-swatch .minicolors-swatch-color {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
input.ju-input.minicolors .minicolors-grid .minicolors-picker {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box
}
input.ju-input.minicolors .minicolors-grid .minicolors-picker > div {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box
}
select.ju-select {
padding: 0 25px 0 15px;
height: 50px;
vertical-align: middle;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
select.ju-select:focus {
border: 1px solid #ff8726;
box-shadow: none;
outline: 0
}
input.ju-checkbox:checked {
background-color: #49bf88;
border: 1px solid #49bf88
}
input.ju-checkbox:checked:before {
color: #fff
}
input.ju-radiobox {
border-color: #7d8a9a;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
input.ju-radiobox:checked {
border-color: #49bf88
}
input.ju-radiobox:checked:before {
width: 10px;
height: 10px;
margin: 2px;
background-color: #49bf88
}
input.ju-radiobox:focus {
border-color: #49bf88;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-notice-success {
border-left-color: #46b450
}
.ju-notice-error {
border-left-color: #c00
}
.ju-notice-close {
float: right;
color: #aaa
}
.ju-notice-close:hover {
color: #c00;
cursor: pointer
}
.ju-switch-button {
float: right;
margin-left: 10px;
margin-right: 30px
}
.ju-switch-button .switch {
position: relative;
display: inline-block;
width: 50px;
height: 30px;
margin: 10px
}
.ju-switch-button .switch input {
display: none
}
.ju-switch-button .switch .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
-moz-transition: .4s;
-ms-transition: .4s;
-o-transition: .4s;
transition: .4s;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
border-radius: 40px
}
.ju-switch-button .switch .slider:before {
position: absolute;
content: '';
height: 27px;
width: 27px;
left: 2px;
bottom: 2px;
background-color: #fff;
-webkit-transition: .4s;
-moz-transition: .4s;
-ms-transition: .4s;
-o-transition: .4s;
transition: .4s;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%
}
.ju-switch-button .switch input:checked + .slider {
background-color: #5dca70
}
.ju-switch-button .switch input:checked + .slider:before {
-webkit-transform: translateX(20px) !important;
-moz-transform: translateX(20px) !important;
-ms-transform: translateX(20px) !important;
-o-transform: translateX(20px) !important;
transform: translateX(20px) !important;
}
.settings-list {
display: flex;
flex-wrap: wrap;
flex: auto
}
.ju-settings-option {
width: calc(50% - 10px);
margin-bottom: 20px;
margin-right: 2%;
background-color: #fff;
-webkit-box-shadow: 0 10px 30px 0 rgba(160, 166, 190, 0.08);
-moz-box-shadow: 0 10px 30px 0 rgba(160, 166, 190, 0.08);
box-shadow: 0 10px 30px 0 rgba(160, 166, 190, 0.08);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
.ju-settings-option.settings-separator {
background-color: transparent;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-settings-option.full-width, .ju-settings-option.settings-separator {
width: 98%
}
.ju-settings-option.settings-separator .settings-separator-title {
display: block;
font-size: 20px;
font-weight: bold
}
.ju-setting-label {
float: left;
display: inline-block;
min-width: 150px;
max-width: calc(100% - 150px);
overflow: hidden;
white-space: nowrap;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
margin: 0;
line-height: 50px;
cursor: pointer
}
.ju-main-wrapper {
margin-left: -20px;
font-family: 'Roboto', sans-serif
}
.ju-main-wrapper * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
.ju-main-wrapper img {
max-width: 100%
}
.ju-main-wrapper .ju-left-panel {
width: 300px;
height: 100%;
padding: 20px 0;
background-image: linear-gradient(to bottom, #6465e2, #60c3ef);
position: fixed;
overflow: auto;
z-index: 15;
-webkit-box-shadow: 10px 20px 20px 0 rgba(186, 192, 213, 0.1);
-moz-box-shadow: 10px 20px 20px 0 rgba(186, 192, 213, 0.1);
box-shadow: 10px 20px 20px 0 rgba(186, 192, 213, 0.1)
}
.ju-main-wrapper .ju-left-panel .ju-logo a {
display: block;
width: 230px;
height: 90px;
margin: auto
}
.ju-main-wrapper .ju-left-panel .ju-menu-search {
margin: 20px 10px;
padding: 10px 5px;
border: 0;
border-bottom: 1px solid #6294e9
}
.ju-main-wrapper .ju-left-panel .ju-menu-search .ju-menu-search-icon {
font-size: 20px;
color: #fff;
vertical-align: text-bottom
}
.ju-main-wrapper .ju-left-panel .ju-menu-search .ju-menu-search-input {
background: transparent;
color: #fff;
border: 0;
outline: 0;
padding: 5px;
font-size: 18px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-main-wrapper .ju-left-panel .ju-menu-search .ju-menu-search-input::placeholder {
color: #fff;
opacity: .5
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs {
display: block;
background-color: transparent;
height: auto;
margin: 20px 0
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab {
float: none;
width: auto;
height: auto;
text-align: left;
position: relative;
line-height: normal;
background-color: transparent
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab {
padding: 20px;
opacity: .7;
background-color: transparent
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab:focus {
outline: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab:after {
font-family: 'Material Icons';
font-size: 24px;
vertical-align: text-bottom;
position: absolute;
right: 15px
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.with-submenus:not(.expanded):after {
content: '\e313'
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active {
opacity: 1;
background-color: #4c79ca
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active.with-submenus.expanded:after {
content: '\e316'
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active.with-submenus.expanded + .ju-submenu-tabs {
max-height: 500px
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active:not(.expanded) {
background-color: transparent
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs {
display: block;
max-height: 0;
background-color: #4c79ca;
-webkit-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
-moz-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
-ms-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
-o-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab {
padding: 20px;
cursor: pointer;
color: #fff;
margin-left: 32px;
font-size: 16px;
opacity: .7
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab.active {
opacity: 1
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .menu-tab-icon {
font-size: 22px;
vertical-align: sub
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .tab-title {
font-size: 16px;
margin-left: 5px;
display: inline-block;
max-width: 75%;
overflow: hidden;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
vertical-align: text-bottom
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs .indicator {
display: none
}
.ju-main-wrapper .ju-right-panel {
width: calc(100% - 300px);
padding: 0 20px;
font-size: 14px;
margin-left: 300px;
background-color: #f3f6fa
}
.ju-main-wrapper .ju-right-panel:before {
content: '';
display: block;
clear: both;
padding: 1px 0 0 0
}
.ju-main-wrapper .ju-right-panel .ju-top-tabs-wrapper {
background-color: #fff;
margin: auto -20px
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs {
width: fit-content !important
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab {
text-transform: capitalize;
min-width: 200px;
background-color: #fff
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab {
color: #ff8726;
background-color: #fff;
font-weight: bold;
padding: 20px
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab.active:before {
content: '\f147';
font-family: 'dashicons';
font-size: 20px;
vertical-align: middle
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab:focus {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs .indicator {
background-color: #ff8726;
z-index: 10
}
.ju-main-wrapper .ju-left-panel-toggle {
display: none;
position: fixed;
top: 120px;
left: 35px;
cursor: pointer;
background-color: #fff;
width: auto;
height: auto;
padding: 25px 5px;
border: 1px solid #ddd;
opacity: .5;
z-index: 15;
-webkit-border-radius: 0 25px 25px 0;
-moz-border-radius: 0 25px 25px 0;
border-radius: 0 25px 25px 0
}
.ju-main-wrapper .ju-left-panel-toggle:hover, .ju-main-wrapper .ju-left-panel-toggle:focus {
opacity: 1
}
.ju-main-wrapper .ju-left-panel-toggle .ju-left-panel-toggle-icon {
color: #ff8726
}
.search-result {
outline: 1px solid #ff8726;
-webkit-box-shadow: 1px 1px 12px #ccc;
-moz-box-shadow: 1px 1px 12px #ccc;
box-shadow: 1px 1px 12px #ccc
}
.rtl .ju-main-wrapper {
margin-left: 0;
margin-right: -20px
}
.rtl .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab {
text-align: inherit
}
.rtl .ju-main-wrapper .ju-right-panel {
margin-left: 0;
margin-right: 300px
}
.rtl .ju-main-wrapper .ju-left-panel-toggle {
left: unset;
right: 35px;
-webkit-border-radius: 25px 0 0 25px;
-moz-border-radius: 25px 0 0 25px;
border-radius: 25px 0 0 25px
}
.rtl .ju-setting-label {
float: right
}
.rtl .ju-switch-button {
float: left
}
@media screen and (max-width: 1060px) and (min-width: 960px) {
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab {
min-width: 152px;
}
}
@media screen and (max-width: 960px) {
.ju-main-wrapper .ju-left-panel {
display: none
}
.ju-main-wrapper .ju-right-panel {
width: 100%;
margin-left: 0
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs {
width: 100% !important;
flex-wrap: wrap
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab {
flex: 0 0 100%
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab.active {
background-color: #ff8726;
color: #fff
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab.active:before {
display: none
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs .indicator {
display: none
}
.ju-main-wrapper .ju-left-panel-toggle {
display: block
}
.rtl .ju-main-wrapper .ju-right-panel {
margin-right: 0
}
}
@media screen and (max-width: 782px) {
.ju-main-wrapper .ju-left-panel-toggle {
left: 0
}
.ju-settings-option {
width: 98%
}
.rtl .ju-main-wrapper .ju-left-panel-toggle {
right: 0
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,719 @@
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab:hover:before, .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active:not(.expanded):before, .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab:hover:before, .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab.active:before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #fff;
opacity: .12;
pointer-events: none
}
.ju-notice-success, .ju-notice-error {
padding: 10px;
margin: 20px 20px 20px 0;
background-color: #fff;
border-left: 5px solid #000;
-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.3)
}
.clearfix:after, .clearfix:before {
content: '';
display: block;
clear: both
}
.no-display {
display: none
}
.hidden-item {
visibility: hidden
}
.tabs {
display: flex;
position: relative;
overflow: hidden;
margin: 0 auto;
white-space: nowrap;
width: 100%;
background-color: #fff
}
.tabs .tab {
flex-grow: 1;
display: block;
text-align: center;
padding: 0;
margin: 0;
float: left;
text-transform: uppercase;
text-overflow: ellipsis;
overflow: hidden;
letter-spacing: .8px;
min-width: 80px;
background-color: #2196f3
}
.tabs .tab a {
text-decoration: none;
color: #fff;
background-color: #2196f3;
display: block;
width: 100%;
height: 100%;
text-overflow: ellipsis;
overflow: hidden;
-webkit-transition: color .3s ease;
-moz-transition: color .3s ease;
-ms-transition: color .3s ease;
-o-transition: color .3s ease;
transition: color .3s ease
}
.tabs .tab.disabled a {
cursor: default;
opacity: .6
}
.tabs .indicator {
position: absolute;
bottom: 0;
height: 3px;
will-change: left, right;
background-color: #ff8726
}
.ju-button {
background-color: transparent;
color: #000;
padding: 10px 15px;
min-width: 180px;
border: 1px solid #9fabba;
text-transform: uppercase;
display: inline-block;
text-decoration: none;
cursor: pointer;
text-align: center;
letter-spacing: 2px;
transition: all ease .5s;
vertical-align: middle;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
border-radius: 40px
}
.ju-button:focus {
outline: 0
}
.ju-button:hover {
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
}
.ju-button.orange-button {
background-color: #ff8726;
color: #fff;
border-color: #ff8726
}
.ju-button.orange-outline-button {
background-color: #fff;
color: #ff8726;
border-color: #fff
}
.ju-rect-button {
background-color: #fff;
border: 1px solid #ff8726;
color: #ff8726;
cursor: pointer;
padding: 10px 15px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
.ju-material-button {
border: 0;
outline: 0;
padding: 10px 20px;
text-transform: uppercase;
cursor: pointer;
font-size: 14px;
background-color: #2196f3;
color: #fff
}
.ju-material-button:hover {
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
}
input.ju-input {
padding: 15px;
border: 1px solid #ddd;
background-color: #fff;
height: auto;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
input.ju-input:focus {
border-color: #ff8726;
box-shadow: none;
outline: 0
}
input.ju-input.minicolors {
padding-left: 55px
}
input.ju-input.minicolors + .minicolors-swatch {
height: 48px;
width: 48px;
top: 2px;
left: 2px;
border: 0
}
input.ju-input.minicolors + .minicolors-swatch .minicolors-swatch-color {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
input.ju-input.minicolors .minicolors-grid .minicolors-picker {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box
}
input.ju-input.minicolors .minicolors-grid .minicolors-picker > div {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box
}
select.ju-select {
padding: 0 15px;
height: 50px;
vertical-align: middle;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
select.ju-select:focus {
border: 1px solid #ff8726;
box-shadow: none;
outline: 0
}
input.ju-checkbox:checked {
background-color: #49bf88;
border: 1px solid #49bf88
}
input.ju-checkbox:checked:before {
color: #fff
}
input.ju-radiobox {
border-color: #7d8a9a;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
input.ju-radiobox:checked {
border-color: #49bf88
}
input.ju-radiobox:checked:before {
width: 10px;
height: 10px;
margin: 2px;
background-color: #49bf88
}
input.ju-radiobox:focus {
border-color: #49bf88;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-notice-success {
border-left-color: #46b450
}
.ju-notice-error {
border-left-color: #c00
}
.ju-notice-close {
float: right;
color: #aaa
}
.ju-notice-close:hover {
color: #c00;
cursor: pointer
}
.ju-switch-button {
float: right;
margin-left: 10px;
margin-right: 30px
}
.ju-switch-button .switch {
position: relative;
display: inline-block;
width: 50px;
height: 30px;
margin: 10px
}
.ju-switch-button .switch input {
display: none
}
.ju-switch-button .switch .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
-moz-transition: .4s;
-ms-transition: .4s;
-o-transition: .4s;
transition: .4s;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
border-radius: 40px
}
.ju-switch-button .switch .slider:before {
position: absolute;
content: '';
height: 27px;
width: 27px;
left: 2px;
bottom: 2px;
background-color: #fff;
-webkit-transition: .4s;
-moz-transition: .4s;
-ms-transition: .4s;
-o-transition: .4s;
transition: .4s;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
}
.ju-switch-button .switch input:checked + .slider {
background-color: #5dca70
}
.ju-switch-button .switch input:checked + .slider:before {
-webkit-transform: translateX(20px) !important;
-moz-transform: translateX(20px) !important;
-ms-transform: translateX(20px) !important;
-o-transform: translateX(20px) !important;
transform: translateX(20px) !important;
}
.settings-list {
display: flex;
flex-wrap: wrap;
flex: auto
}
.ju-settings-option {
width: 48%;
margin-bottom: 20px;
margin-right: 2%;
background-color: #fff;
-webkit-box-shadow: 0 10px 30px 0 rgba(160, 166, 190, 0.08);
-moz-box-shadow: 0 10px 30px 0 rgba(160, 166, 190, 0.08);
box-shadow: 0 10px 30px 0 rgba(160, 166, 190, 0.08);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px
}
.ju-settings-option.settings-separator {
background-color: transparent;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-settings-option.full-width, .ju-settings-option.settings-separator {
width: 98%
}
.ju-settings-option.settings-separator .settings-separator-title {
display: block;
font-size: 20px;
font-weight: bold
}
.ju-setting-label {
float: left;
display: inline-block;
min-width: 150px;
max-width: calc(100% - 150px);
overflow: hidden;
white-space: nowrap;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
margin: 0;
line-height: 50px;
cursor: pointer
}
.ju-main-wrapper {
margin-left: -20px;
font-family: 'Roboto', sans-serif
}
.ju-main-wrapper * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
.ju-main-wrapper img {
max-width: 100%
}
.ju-main-wrapper .ju-left-panel {
width: 300px;
height: 100%;
padding: 20px 0;
background-image: linear-gradient(to bottom, #6465e2, #60c3ef);
position: fixed;
overflow: auto;
z-index: 15;
-webkit-box-shadow: 10px 20px 20px 0 rgba(186, 192, 213, 0.1);
-moz-box-shadow: 10px 20px 20px 0 rgba(186, 192, 213, 0.1);
box-shadow: 10px 20px 20px 0 rgba(186, 192, 213, 0.1)
}
.ju-main-wrapper .ju-left-panel .ju-logo a {
display: block;
width: 230px;
height: 90px;
margin: auto
}
.ju-main-wrapper .ju-left-panel .ju-menu-search {
margin: 20px 10px;
padding: 10px 5px;
border: 0;
border-bottom: 1px solid #6294e9
}
.ju-main-wrapper .ju-left-panel .ju-menu-search .ju-menu-search-icon {
font-size: 20px;
color: #fff;
vertical-align: text-bottom
}
.ju-main-wrapper .ju-left-panel .ju-menu-search .ju-menu-search-input {
background: transparent;
color: #fff;
border: 0;
outline: 0;
padding: 5px;
font-size: 18px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-main-wrapper .ju-left-panel .ju-menu-search .ju-menu-search-input::placeholder {
color: #fff;
opacity: .5
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs {
display: block;
background-color: transparent;
height: auto;
margin: 20px 0
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab {
float: none;
width: auto;
height: auto;
text-align: left;
position: relative;
line-height: normal;
background-color: transparent
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab {
padding: 20px;
opacity: .7;
background-color: transparent
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab:focus {
outline: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab:after {
font-family: 'Material Icons';
font-size: 24px;
vertical-align: text-bottom;
position: absolute;
right: 15px
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.with-submenus:not(.expanded):after {
content: '\e313'
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active {
opacity: 1;
background-color: #4c79ca
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active.with-submenus.expanded:after {
content: '\e316'
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active.with-submenus.expanded + .ju-submenu-tabs {
max-height: 500px
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab a.link-tab.active:not(.expanded) {
background-color: transparent
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs {
display: block;
max-height: 0;
background-color: #4c79ca;
-webkit-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
-moz-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
-ms-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
-o-transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s;
transition: max-height cubic-bezier(0.3, 1.1, 0.3, 1.1) 1s
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab {
padding: 20px;
cursor: pointer;
color: #fff;
margin-left: 32px;
font-size: 16px;
opacity: .7
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .ju-submenu-tabs div.link-tab.active {
opacity: 1
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .menu-tab-icon {
font-size: 22px;
vertical-align: sub
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab .tab-title {
font-size: 16px;
margin-left: 5px;
display: inline-block;
max-width: 75%;
overflow: hidden;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
vertical-align: text-bottom
}
.ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs .indicator {
display: none
}
.ju-main-wrapper .ju-right-panel {
width: calc(100% - 300px);
padding: 0 20px;
font-size: 14px;
margin-left: 300px;
background-color: #f3f6fa
}
.ju-main-wrapper .ju-right-panel:before {
content: '';
display: block;
clear: both;
padding: 1px 0 0 0
}
.ju-main-wrapper .ju-right-panel .ju-top-tabs-wrapper {
background-color: #fff;
margin: auto -20px
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs {
width: fit-content !important
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab {
text-transform: capitalize;
min-width: 200px;
background-color: #fff
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab {
color: #ff8726;
background-color: #fff;
font-weight: bold;
padding: 20px
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab.active:before {
content: '\f147';
font-family: 'dashicons';
font-size: 20px;
vertical-align: middle
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab:focus {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs .indicator {
background-color: #ff8726;
z-index: 10
}
.ju-main-wrapper .ju-left-panel-toggle {
display: none;
position: fixed;
top: 120px;
left: 35px;
cursor: pointer;
background-color: #fff;
width: auto;
height: auto;
padding: 25px 5px;
border: 1px solid #ddd;
opacity: .5;
z-index: 15;
-webkit-border-radius: 0 25px 25px 0;
-moz-border-radius: 0 25px 25px 0;
border-radius: 0 25px 25px 0
}
.ju-main-wrapper .ju-left-panel-toggle:hover, .ju-main-wrapper .ju-left-panel-toggle:focus {
opacity: 1
}
.ju-main-wrapper .ju-left-panel-toggle .ju-left-panel-toggle-icon {
color: #ff8726
}
.search-result {
outline: 1px solid #ff8726;
-webkit-box-shadow: 1px 1px 12px #ccc;
-moz-box-shadow: 1px 1px 12px #ccc;
box-shadow: 1px 1px 12px #ccc
}
.rtl .ju-main-wrapper {
margin-left: 0;
margin-right: -20px
}
.rtl .ju-main-wrapper .ju-left-panel .tabs.ju-menu-tabs li.tab {
text-align: inherit
}
.rtl .ju-main-wrapper .ju-right-panel {
margin-left: 0;
margin-right: 300px
}
.rtl .ju-main-wrapper .ju-left-panel-toggle {
left: unset;
right: 35px;
-webkit-border-radius: 25px 0 0 25px;
-moz-border-radius: 25px 0 0 25px;
border-radius: 25px 0 0 25px
}
.rtl .ju-setting-label {
float: right
}
.rtl .ju-switch-button {
float: left
}
@media screen and (max-width: 960px) {
.ju-main-wrapper .ju-left-panel {
display: none
}
.ju-main-wrapper .ju-right-panel {
width: 100%;
margin-left: 0
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs {
width: 100% !important;
flex-wrap: wrap
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab {
flex: 0 0 100%
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab.active {
background-color: #ff8726;
color: #fff
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab.active:before {
display: none
}
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs .indicator {
display: none
}
.ju-main-wrapper .ju-left-panel-toggle {
display: block
}
.rtl .ju-main-wrapper .ju-right-panel {
margin-right: 0
}
}
@media screen and (max-width: 782px) {
.ju-main-wrapper .ju-left-panel-toggle {
left: 0
}
.ju-settings-option {
width: 98%
}
.rtl .ju-main-wrapper .ju-left-panel-toggle {
right: 0
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,162 @@
(function ( $ ) {
// Pseudo contains case insensitive
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
return function( elem ) {
return $(elem).text().toLowerCase().indexOf(arg.toLowerCase()) >= 0;
};
});
$(document).ready(function ( $ ) {
$('.ju-main-wrapper').show();
// Toggle left panel on small screen
$('.ju-left-panel-toggle').unbind('click').click(function () {
var leftPanel = $('.ju-left-panel');
var wpLeftPanel = $('#adminmenuwrap');
var rtl = $('body').hasClass('rtl');
if (leftPanel.is(':visible')) {
if (wpLeftPanel.is(':visible')) {
if (!rtl) {
$(this).css('left', 35);
} else {
$(this).css('right', 35);
}
} else {
if (!rtl) {
$(this).css('left', 0);
} else {
$(this).css('right', 0);
}
}
} else {
if (wpLeftPanel.is(':visible')) {
if (!rtl) {
$(this).css('left', 335);
} else {
$(this).css('right', 335);
}
} else {
if (!rtl) {
$(this).css('left', 290);
} else {
$(this).css('right', 290);
}
}
}
leftPanel.toggle()
});
// Function for searching menus
$('.ju-menu-search-input').on('input', function () {
$('.ju-right-panel .ju-settings-option').removeClass('search-result');
$('.ju-menu-tabs .tab').show();
var searchKey = $(this).val().trim().toLowerCase();
if (searchKey === '') {
$('.ju-menu-tabs .tab').show();
return false;
}
var searchResult = $('.ju-right-panel .ju-settings-option label:contains("'+searchKey+'")').closest('.ju-settings-option');
var searchParent = searchResult.closest('.ju-content-wrapper');
var searchSub = searchResult.closest('.tab-content');
var tabID = [], subID = [];
searchResult.addClass('search-result');
searchParent.each(function () {
tabID.push($(this).attr('id'));
});
searchSub.each(function () {
subID.push($(this).attr('id'));
});
$('.ju-menu-tabs .tab .link-tab').each(function () {
var href = $(this).attr('href');
var text = $(this).text().trim().toLowerCase();
var dataHref = $(this).data('href');
if (href !== undefined) {
href = href.replace(/#/g, '');
}
if (dataHref !== undefined) {
dataHref = dataHref.replace(/#/, '');
}
if (tabID.indexOf(href) < 0 && text.indexOf(searchKey) < 0 && subID.indexOf(dataHref) < 0) {
$(this).closest('li.tab').hide();
} else {
if ($(this).closest('.ju-submenu-tabs').length > 0) {
$(this).closest('.ju-submenu-tabs').closest('li.tab').show();
}
}
});
});
// Add submenus
$('.ju-top-tabs').each(function () {
var topTab = $(this);
var tabClone = $(this).clone();
var parentHref = $(this).closest('.ju-content-wrapper').attr('id');
tabClone.removeClass('ju-top-tabs').removeClass('tabs').addClass('ju-submenu-tabs');
tabClone.find('li.tab').each(function () {
var currentSubMenu = $(this).closest('.ju-submenu-tabs');
var currentTab = $(this).find('a.link-tab').removeClass('waves-effect');
var tabClass = currentTab.attr('class');
var tabHref = currentTab.attr('href');
$(this).html('<div class="'+ tabClass +'" data-href="'+ tabHref +'">'+ $(this).text() +'</div>');
$(this).find('div.link-tab').click(function () {
topTab.find('li.tab a[href="'+ tabHref +'"]').click();
currentSubMenu.find('li.tab div.link-tab').removeClass('active');
$(this).addClass('active');
})
});
$('.ju-menu-tabs .tab a.link-tab[href="#'+ parentHref +'"]').closest('.tab').append(tabClone);
});
// Top tab click also navigate submenu tabs
$('.ju-top-tabs li.tab').click(function () {
var parentHref = $(this).closest('.ju-content-wrapper').attr('id');
var tabHref = $(this).find('a.link-tab').attr('href');
var subMenu = $('.ju-menu-tabs .tab a.link-tab[href="#'+ parentHref +'"]').closest('li.tab').find('.ju-submenu-tabs');
subMenu.find('div.link-tab').removeClass('active');
subMenu.find('div.link-tab[data-href="'+ tabHref +'"]').addClass('active');
});
// Collapsed the menu when clicking if it opened
$('.ju-menu-tabs li.tab a.link-tab').click(function () {
if (!$(this).hasClass('active')) {
$(this).closest('.ju-menu-tabs').find('li.tab a.link-tab').removeClass('expanded');
}
if ($(this).closest('li.tab').find('.ju-submenu-tabs').length > 0) {
$(this).toggleClass('expanded');
}
});
// Not show expand icon if this tab has no sub menus
$('.ju-menu-tabs li.tab').each(function () {
if ($(this).find('.ju-submenu-tabs').length < 1) {
$(this).find('a.link-tab').addClass('no-submenus');
} else {
var linkTab = $(this).find('a.link-tab');
if (linkTab.hasClass('active')) {
linkTab.addClass('expanded');
}
}
});
// Close notice message
$('.ju-notice-close').click(function () {
$(this).closest('.ju-notice-msg').slideUp();
});
})
})(jQuery);

View File

@@ -0,0 +1,159 @@
(function ($) {
var methods = {
init: function () {
return this.each(function () {
// For each set of tabs, we want to keep track of
// which tab is active and its associated content
var $this = $(this),
window_width = $(window).width();
$this.width('100%');
var $active, $content, $links = $this.find('li.tab a'),
$tabs_width = $this.width(),
$tab_width = $this.find('li').first().outerWidth(),
$index = 0;
// If the location.hash matches one of the links, use that as the active tab.
$active = $($links.filter('[href="' + location.hash + '"]'));
// If no match is found, use the first link or any with class 'active' as the initial active tab.
if ($active.length === 0) {
$active = $(this).find('li.tab a.active').first();
}
if ($active.length === 0) {
$active = $(this).find('li.tab a').first();
}
$active.addClass('active');
$index = $links.index($active);
if ($index < 0) {
$index = 0;
}
$content = $($active[0].hash);
$($content).show();
// append indicator then set indicator width to tab width
$this.append('<div class="indicator"></div>');
var $indicator = $this.find('.indicator');
if ($this.is(":visible")) {
$indicator.css({"right": $tabs_width - (($index + 1) * $tab_width)});
$indicator.css({"left": $index * $tab_width});
}
$(window).resize(function () {
$tabs_width = $this.width();
$tab_width = $this.find('li').first().outerWidth();
if ($index < 0) {
$index = 0;
}
if ($tab_width !== 0 && $tabs_width !== 0) {
$indicator.css({"right": $tabs_width - (($index + 1) * $tab_width)});
$indicator.css({"left": $index * $tab_width});
}
});
// Hide the remaining content
$links.not($active).each(function () {
$(this.hash).hide();
});
// Bind the click event handler
$this.on('click', 'a', function (e) {
if ($(this).parent().hasClass('disabled')) {
e.preventDefault();
return;
}
$tabs_width = $this.width();
$tab_width = $this.find('li').first().outerWidth();
// Make the old tab inactive.
$active.removeClass('active');
$content.hide();
// Update the variables with the new link and content
$active = $(this);
$content = $(this.hash);
$links = $this.find('li.tab a');
// Make the tab active.
$active.addClass('active');
var $prev_index = $index;
$index = $links.index($(this));
if ($index < 0) {
$index = 0;
}
// Change url to current tab
window.location.hash = $active.attr('href');
$content.show();
// Update indicator
if (($index - $prev_index) >= 0) {
$indicator.velocity({"right": $tabs_width - (($index + 1) * $tab_width)}, {
duration: 300,
queue: false,
easing: 'easeOutQuad'
});
$indicator.velocity({"left": $index * $tab_width}, {
duration: 300,
queue: false,
easing: 'easeOutQuad',
delay: 90
});
}
else {
$indicator.velocity({"left": $index * $tab_width}, {
duration: 300,
queue: false,
easing: 'easeOutQuad'
});
$indicator.velocity({"right": $tabs_width - (($index + 1) * $tab_width)}, {
duration: 300,
queue: false,
easing: 'easeOutQuad',
delay: 90
});
}
// Prevent the anchor's default click action
e.preventDefault();
});
});
},
select_tab: function (id) {
this.find('a[href="#' + id + '"]').trigger('click');
}
};
$.fn.itabs = function (methodOrOptions) {
if (methods[methodOrOptions]) {
return methods[methodOrOptions].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof methodOrOptions === 'object' || !methodOrOptions) {
// Default to "init"
var h = window.location.hash;
if (h !== '') {
if ($(h).hasClass('tab-content')) {
var hs = $(h).closest('.ju-content-wrapper').attr('id');
if (typeof hs !== "undefined") {
$('.ju-content-wrapper').hide();
$('.ju-menu-tabs .link-tab').removeClass('expanded active');
$('.ju-menu-tabs .link-tab[data-href="' + h + '"]').click();
$('.ju-menu-tabs .link-tab[href="#' + hs + '"]').addClass('expanded active');
$('#' + hs).show();
}
}
}
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + methodOrOptions + ' does not exist on jQuery.tooltip');
}
};
$(document).ready(function () {
$('ul.tabs').itabs();
});
}(jQuery));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,343 @@
/*!
* Waves v0.6.4
* http://fian.my.id/Waves
*
* Copyright 2014 Alfiana E. Sibuea and other contributors
* Released under the MIT license
* https://github.com/fians/Waves/blob/master/LICENSE
*/
;(function(window) {
'use strict';
var Waves = Waves || {};
var $$ = document.querySelectorAll.bind(document);
// Find exact position of element
function isWindow(obj) {
return obj !== null && obj === obj.window;
}
function getWindow(elem) {
return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
}
function offset(elem) {
var docElem, win,
box = {top: 0, left: 0},
doc = elem && elem.ownerDocument;
docElem = doc.documentElement;
if (typeof elem.getBoundingClientRect !== typeof undefined) {
box = elem.getBoundingClientRect();
}
win = getWindow(doc);
return {
top: box.top + win.pageYOffset - docElem.clientTop,
left: box.left + win.pageXOffset - docElem.clientLeft
};
}
function convertStyle(obj) {
var style = '';
for (var a in obj) {
if (obj.hasOwnProperty(a)) {
style += (a + ':' + obj[a] + ';');
}
}
return style;
}
var Effect = {
// Effect delay
duration: 750,
show: function(e, element) {
// Disable right click
if (e.button === 2) {
return false;
}
var el = element || this;
// Create ripple
var ripple = document.createElement('div');
ripple.className = 'waves-ripple';
el.appendChild(ripple);
// Get click coordinate and element witdh
var pos = offset(el);
var relativeY = (e.pageY - pos.top);
var relativeX = (e.pageX - pos.left);
var scale = 'scale('+((el.clientWidth / 100) * 10)+')';
// Support for touch devices
if ('touches' in e) {
relativeY = (e.touches[0].pageY - pos.top);
relativeX = (e.touches[0].pageX - pos.left);
}
// Attach data to element
ripple.setAttribute('data-hold', Date.now());
ripple.setAttribute('data-scale', scale);
ripple.setAttribute('data-x', relativeX);
ripple.setAttribute('data-y', relativeY);
// Set ripple position
var rippleStyle = {
'top': relativeY+'px',
'left': relativeX+'px'
};
ripple.className = ripple.className + ' waves-notransition';
ripple.setAttribute('style', convertStyle(rippleStyle));
ripple.className = ripple.className.replace('waves-notransition', '');
// Scale the ripple
rippleStyle['-webkit-transform'] = scale;
rippleStyle['-moz-transform'] = scale;
rippleStyle['-ms-transform'] = scale;
rippleStyle['-o-transform'] = scale;
rippleStyle.transform = scale;
rippleStyle.opacity = '1';
rippleStyle['-webkit-transition-duration'] = Effect.duration + 'ms';
rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';
rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';
rippleStyle['transition-duration'] = Effect.duration + 'ms';
rippleStyle['-webkit-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
ripple.setAttribute('style', convertStyle(rippleStyle));
},
hide: function(e) {
TouchHandler.touchup(e);
var el = this;
var width = el.clientWidth * 1.4;
// Get first ripple
var ripple = null;
var ripples = el.getElementsByClassName('waves-ripple');
if (ripples.length > 0) {
ripple = ripples[ripples.length - 1];
} else {
return false;
}
var relativeX = ripple.getAttribute('data-x');
var relativeY = ripple.getAttribute('data-y');
var scale = ripple.getAttribute('data-scale');
// Get delay beetween mousedown and mouse leave
var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
var delay = 350 - diff;
if (delay < 0) {
delay = 0;
}
// Fade out ripple after delay
setTimeout(function() {
var style = {
'top': relativeY+'px',
'left': relativeX+'px',
'opacity': '0',
// Duration
'-webkit-transition-duration': Effect.duration + 'ms',
'-moz-transition-duration': Effect.duration + 'ms',
'-o-transition-duration': Effect.duration + 'ms',
'transition-duration': Effect.duration + 'ms',
'-webkit-transform': scale,
'-moz-transform': scale,
'-ms-transform': scale,
'-o-transform': scale,
'transform': scale,
};
ripple.setAttribute('style', convertStyle(style));
setTimeout(function() {
try {
el.removeChild(ripple);
} catch(e) {
return false;
}
}, Effect.duration);
}, delay);
},
// Little hack to make <input> can perform waves effect
wrapInput: function(elements) {
for (var a = 0; a < elements.length; a++) {
var el = elements[a];
if (el.tagName.toLowerCase() === 'input') {
var parent = el.parentNode;
// If input already have parent just pass through
if (parent.tagName.toLowerCase() === 'i' && parent.className.indexOf('waves-effect') !== -1) {
continue;
}
// Put element class and style to the specified parent
var wrapper = document.createElement('i');
wrapper.className = el.className + ' waves-input-wrapper';
var elementStyle = el.getAttribute('style');
if (!elementStyle) {
elementStyle = '';
}
wrapper.setAttribute('style', elementStyle);
el.className = 'waves-button-input';
el.removeAttribute('style');
// Put element as child
parent.replaceChild(wrapper, el);
wrapper.appendChild(el);
}
}
}
};
/**
* Disable mousedown event for 500ms during and after touch
*/
var TouchHandler = {
/* uses an integer rather than bool so there's no issues with
* needing to clear timeouts if another touch event occurred
* within the 500ms. Cannot mouseup between touchstart and
* touchend, nor in the 500ms after touchend. */
touches: 0,
allowEvent: function(e) {
var allow = true;
if (e.type === 'touchstart') {
TouchHandler.touches += 1; //push
} else if (e.type === 'touchend' || e.type === 'touchcancel') {
setTimeout(function() {
if (TouchHandler.touches > 0) {
TouchHandler.touches -= 1; //pop after 500ms
}
}, 500);
} else if (e.type === 'mousedown' && TouchHandler.touches > 0) {
allow = false;
}
return allow;
},
touchup: function(e) {
TouchHandler.allowEvent(e);
}
};
/**
* Delegated click handler for .waves-effect element.
* returns null when .waves-effect element not in "click tree"
*/
function getWavesEffectElement(e) {
if (TouchHandler.allowEvent(e) === false) {
return null;
}
var element = null;
var target = e.target || e.srcElement;
while (target.parentElement !== null) {
if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {
element = target;
break;
} else if (target.classList.contains('waves-effect')) {
element = target;
break;
}
target = target.parentElement;
}
return element;
}
/**
* Bubble the click and show effect if .waves-effect elem was found
*/
function showEffect(e) {
var element = getWavesEffectElement(e);
if (element !== null) {
setTimeout(function () {
Effect.show(e, element);
},100);
if ('ontouchstart' in window) {
element.addEventListener('touchend', Effect.hide, false);
element.addEventListener('touchcancel', Effect.hide, false);
}
element.addEventListener('mouseup', Effect.hide, false);
element.addEventListener('mouseleave', Effect.hide, false);
}
}
Waves.displayEffect = function(options) {
options = options || {};
if ('duration' in options) {
Effect.duration = options.duration;
}
//Wrap input inside <i> tag
Effect.wrapInput($$('.waves-effect'));
if ('ontouchstart' in window) {
document.body.addEventListener('touchstart', showEffect, false);
}
document.body.addEventListener('mousedown', showEffect, false);
};
/**
* Attach Waves to an input element (or any element which doesn't
* bubble mouseup/mousedown events).
* Intended to be used with dynamically loaded forms/inputs, or
* where the user doesn't want a delegated click handler.
*/
Waves.attach = function(element) {
//FUTURE: automatically add waves classes and allow users
// to specify them with an options param? Eg. light/classic/button
if (element.tagName.toLowerCase() === 'input') {
Effect.wrapInput([element]);
element = element.parentElement;
}
if ('ontouchstart' in window) {
element.addEventListener('touchstart', showEffect, false);
}
element.addEventListener('mousedown', showEffect, false);
};
if (typeof window.Waves === "undefined") {
window.Waves = Waves;
document.addEventListener('DOMContentLoaded', function() {
Waves.displayEffect();
}, false);
}
})(window);