Clean up spaces, tabs, indentation, and bracket formatting
This commit is contained in:
@@ -60,18 +60,18 @@ p.sportspress-actions a.button-primary:focus {
|
||||
|
||||
.sportspress-steps:before,
|
||||
.sportspress-steps:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.sportspress-steps:after {
|
||||
clear: both;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.sportspress-steps {
|
||||
*zoom: 1;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.sportspress-steps .welcome-icon i:before {
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,8 +318,8 @@ table.widefat.sp-data-table input[type="text"],
|
||||
table.widefat.sp-data-table input[type="number"] {
|
||||
min-width: 1.25em;
|
||||
width: 100%;
|
||||
margin: 1px;
|
||||
padding: 3px 5px;
|
||||
margin: 1px;
|
||||
padding: 3px 5px;
|
||||
}
|
||||
|
||||
table.widefat.sp-data-table input[type="text"]::placeholder,
|
||||
@@ -681,28 +681,28 @@ table.widefat.sp-sortable-table tbody tr .icon {
|
||||
|
||||
.sp-toggle-switch + label:before,
|
||||
.sp-toggle-switch + label:after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.sp-toggle-switch + label:before {
|
||||
right: 1px;
|
||||
background-color: #e4e4e4;
|
||||
border-radius: 16px;
|
||||
transition: background 0.4s;
|
||||
right: 1px;
|
||||
background-color: #e4e4e4;
|
||||
border-radius: 16px;
|
||||
transition: background 0.4s;
|
||||
}
|
||||
|
||||
.sp-toggle-switch + label:after {
|
||||
width: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 100%;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
transition: margin 0.4s;
|
||||
width: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 100%;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
transition: margin 0.4s;
|
||||
}
|
||||
|
||||
.sp-toggle-switch:checked + label:before {
|
||||
@@ -735,7 +735,7 @@ table.widefat.sp-sortable-table tbody tr .icon {
|
||||
clear: both;
|
||||
max-width: 382px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sp-sortable-list .sp-item-float + .sp-item-float {
|
||||
@@ -743,49 +743,49 @@ table.widefat.sp-sortable-table tbody tr .icon {
|
||||
}
|
||||
|
||||
.sp-item-bar {
|
||||
clear: both;
|
||||
line-height: 1.5em;
|
||||
position: relative;
|
||||
margin: 9px 0 0;
|
||||
clear: both;
|
||||
line-height: 1.5em;
|
||||
position: relative;
|
||||
margin: 9px 0 0;
|
||||
}
|
||||
|
||||
.sp-item-bar .sp-item-handle {
|
||||
background: #fafafa;
|
||||
color: #23282d;
|
||||
border: 1px solid #dfdfdf;
|
||||
position: relative;
|
||||
padding: 10px 15px;
|
||||
height: auto;
|
||||
min-height: 20px;
|
||||
line-height: 30px;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
border: 1px solid #dfdfdf;
|
||||
position: relative;
|
||||
padding: 10px 15px;
|
||||
height: auto;
|
||||
min-height: 20px;
|
||||
line-height: 30px;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.sp-item-bar .sp-item-handle:hover {
|
||||
border-color: #999;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.1);
|
||||
border-color: #999;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
.sp-item-bar .sp-item-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
margin-right: 13em;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
margin-right: 13em;
|
||||
}
|
||||
|
||||
.sp-item-settings {
|
||||
display: block;
|
||||
padding: 10px 0 10px 15px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-top: none;
|
||||
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
||||
display: block;
|
||||
padding: 10px 0 10px 15px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-top: none;
|
||||
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
||||
}
|
||||
|
||||
.js .sp-item-handle {
|
||||
@@ -793,9 +793,9 @@ table.widefat.sp-sortable-table tbody tr .icon {
|
||||
}
|
||||
|
||||
.sp-sortable-list .sp-item-placeholder {
|
||||
border: 1px dashed #b4b9be;
|
||||
margin: 9px auto 6px;
|
||||
height: 42px;
|
||||
border: 1px dashed #b4b9be;
|
||||
margin: 9px auto 6px;
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
/* Logo */
|
||||
@@ -1225,7 +1225,7 @@ table.sp-status-table td mark.yes {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
|
||||
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-sp_format,
|
||||
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-sp_icon,
|
||||
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-sp_number {
|
||||
@@ -1241,7 +1241,7 @@ table.sp-status-table td mark.yes {
|
||||
margin-right: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
|
||||
.about-sportspress-wrap .sp-badge {
|
||||
float: none;
|
||||
margin: 20px auto 10px;
|
||||
|
||||
@@ -427,9 +427,9 @@ This file is generated by `grunt build`, do not edit it by hand.
|
||||
.chosen-container-multi .chosen-choices .search-choice .search-choice-close,
|
||||
.chosen-container .chosen-results-scroll-down span,
|
||||
.chosen-container .chosen-results-scroll-up span {
|
||||
background-image: url('../images/chosen/chosen-sprite@2x.png') !important;
|
||||
background-size: 52px 37px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-image: url('../images/chosen/chosen-sprite@2x.png') !important;
|
||||
background-size: 52px 37px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
}
|
||||
/* @end */
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
}
|
||||
#available-widgets [class*=sp_countdown] .widget-title:before {
|
||||
content: "\f469";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,4 +73,4 @@
|
||||
|
||||
.sp-equation-formula .button .remove:hover {
|
||||
color: #d00;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.leaflet-marker-shadow {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
/* Prevents IE11 from highlighting tiles in blue */
|
||||
@@ -86,7 +86,7 @@
|
||||
width: 0;
|
||||
height: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
z-index: 800;
|
||||
}
|
||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||||
@@ -173,15 +173,15 @@
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||||
opacity: 1;
|
||||
}
|
||||
.leaflet-zoom-animated {
|
||||
-webkit-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
will-change: transform;
|
||||
@@ -189,13 +189,13 @@
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-tile,
|
||||
.leaflet-pan-anim .leaflet-tile {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||||
@@ -435,7 +435,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
@@ -498,8 +498,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
||||
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.leaflet-popup-content-wrapper,
|
||||
.leaflet-popup-tip {
|
||||
|
||||
@@ -371,4 +371,4 @@ i.mce-i-sp_shortcodes_button:before, span.mce_sp_shortcodes_button:before {
|
||||
text-align: center;
|
||||
content: "\f111";
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,421 +1,421 @@
|
||||
.sp-setup-content p,
|
||||
.sp-setup-content table {
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
color: #666;
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 100px auto 24px;
|
||||
box-shadow: none;
|
||||
background: #f1f1f1;
|
||||
padding: 0;
|
||||
margin: 100px auto 24px;
|
||||
box-shadow: none;
|
||||
background: #f1f1f1;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#sp-logo {
|
||||
border: 0;
|
||||
margin: 24px 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
border: 0;
|
||||
margin: 24px 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sp-logo img {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 50px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 50px;
|
||||
}
|
||||
|
||||
.sp-setup-content {
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .13);
|
||||
padding: 24px 24px 0;
|
||||
background: #fff;
|
||||
zoom: 1;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .13);
|
||||
padding: 24px 24px 0;
|
||||
background: #fff;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.sp-setup-content:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.sp-setup-content h1,
|
||||
.sp-setup-content h2,
|
||||
.sp-setup-content h3,
|
||||
.sp-setup-content table {
|
||||
margin: 0 0 24px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
clear: none;
|
||||
margin: 0 0 24px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
clear: none;
|
||||
}
|
||||
|
||||
.sp-setup-content p {
|
||||
margin: 0 0 24px;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
|
||||
.sp-setup-content a {
|
||||
color: #00a69c;
|
||||
color: #00a69c;
|
||||
}
|
||||
|
||||
.sp-setup-content a:focus,
|
||||
.sp-setup-content a:hover {
|
||||
color: #111;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table {
|
||||
width: 100%;
|
||||
border-top: 1px solid #eee;
|
||||
width: 100%;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table th {
|
||||
width: 30%;
|
||||
vertical-align: top;
|
||||
font-weight: 700;
|
||||
width: 30%;
|
||||
vertical-align: top;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td {
|
||||
vertical-align: top;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td input,
|
||||
.sp-setup-content .form-table td select {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td input[size] {
|
||||
width: auto;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td ol,
|
||||
.sp-setup-content .form-table td ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td ul {
|
||||
list-style: none;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td li {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td li:last-child {
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td .description {
|
||||
line-height: 1.5em;
|
||||
display: block;
|
||||
margin: .25em 0 0;
|
||||
color: #999;
|
||||
font-style: italic;
|
||||
line-height: 1.5em;
|
||||
display: block;
|
||||
margin: .25em 0 0;
|
||||
color: #999;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td .input-checkbox,
|
||||
.sp-setup-content .form-table td .input-radio {
|
||||
width: auto;
|
||||
box-sizing: inherit;
|
||||
padding: inherit;
|
||||
margin: 0 .5em 0 0;
|
||||
box-shadow: none;
|
||||
width: auto;
|
||||
box-sizing: inherit;
|
||||
padding: inherit;
|
||||
margin: 0 .5em 0 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table .section_title td {
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table .section_title td h2,
|
||||
.sp-setup-content .form-table .section_title td p {
|
||||
margin: 12px 0 0;
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td,
|
||||
.sp-setup-content .form-table th {
|
||||
padding: 14px 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 14px 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td:first-child,
|
||||
.sp-setup-content .form-table th:first-child {
|
||||
padding-right: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table th .sp-desc-tip {
|
||||
line-height: 1.4;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table .sp-chosen-container {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table .sp-location-picker {
|
||||
width: 100%;
|
||||
height: 320px;
|
||||
margin: 0.5em 0 0;
|
||||
width: 100%;
|
||||
height: 320px;
|
||||
margin: 0.5em 0 0;
|
||||
}
|
||||
|
||||
.sp-setup-content .twitter-share-button {
|
||||
float: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-banner {
|
||||
margin: 0 -24px 24px;
|
||||
margin: 0 -24px 24px;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-banner img {
|
||||
display: block;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps {
|
||||
overflow: hidden;
|
||||
margin: 0 0 24px;
|
||||
overflow: hidden;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps h2 {
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps .sp-setup-next-steps-first {
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps .sp-setup-next-steps-last {
|
||||
float: right;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
float: right;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul {
|
||||
padding: 0 2em 0 0;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 2em 0 0;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul li .button {
|
||||
display: block;
|
||||
padding: 0 0 .75em;
|
||||
display: block;
|
||||
padding: 0 0 .75em;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul li .button-first-event {
|
||||
background-color: #3bbab3;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
text-shadow: 0 -1px 1px #15a29a, 1px 0 1px #15a29a, 0 1px 1px #15a29a, -1px 0 1px #15a29a;
|
||||
font-size: 1em;
|
||||
height: auto;
|
||||
line-height: 1.75em;
|
||||
margin: 0 0 .75em;
|
||||
opacity: 1;
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
background-color: #3bbab3;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
text-shadow: 0 -1px 1px #15a29a, 1px 0 1px #15a29a, 0 1px 1px #15a29a, -1px 0 1px #15a29a;
|
||||
font-size: 1em;
|
||||
height: auto;
|
||||
line-height: 1.75em;
|
||||
margin: 0 0 .75em;
|
||||
opacity: 1;
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul li .button-first-event:active,
|
||||
.sp-setup-content .sp-setup-next-steps ul li .button-first-event:focus,
|
||||
.sp-setup-content .sp-setup-next-steps ul li .button-first-event:hover {
|
||||
background: #15a29a;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
background: #15a29a;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul li a:before {
|
||||
color: #82878c;
|
||||
font: 400 20px/1 dashicons;
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
padding: 0 10px 0 0;
|
||||
top: 1px;
|
||||
position: relative;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-decoration: none!important;
|
||||
vertical-align: top;
|
||||
color: #82878c;
|
||||
font: 400 20px/1 dashicons;
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
padding: 0 10px 0 0;
|
||||
top: 1px;
|
||||
position: relative;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-decoration: none!important;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul .learn-more a:before {
|
||||
content: "\f105";
|
||||
content: "\f105";
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul .video-walkthrough a:before {
|
||||
content: "\f126";
|
||||
content: "\f126";
|
||||
}
|
||||
|
||||
.sp-setup-content .sp-setup-next-steps ul .newsletter a:before {
|
||||
content: "\f465";
|
||||
content: "\f465";
|
||||
}
|
||||
|
||||
.sp-setup-content .updated {
|
||||
padding: 24px 24px 0;
|
||||
margin: 0 0 24px;
|
||||
overflow: hidden;
|
||||
background: #f5f5f5;
|
||||
padding: 24px 24px 0;
|
||||
margin: 0 0 24px;
|
||||
overflow: hidden;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.sp-setup-content .updated p {
|
||||
padding: 0;
|
||||
margin: 0 0 12px;
|
||||
padding: 0;
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.sp-setup-content .updated p:last-child {
|
||||
margin: 0 0 24px;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
|
||||
.sp-setup-steps {
|
||||
padding: 0 0 24px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
color: #ccc;
|
||||
width: 100%;
|
||||
display: -webkit-inline-flex;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
padding: 0 0 24px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
color: #ccc;
|
||||
width: 100%;
|
||||
display: -webkit-inline-flex;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.sp-setup-steps li {
|
||||
width: 20%;
|
||||
float: left;
|
||||
padding: 0 0 .8em;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
border-bottom: 4px solid #ccc;
|
||||
line-height: 1.4em;
|
||||
width: 20%;
|
||||
float: left;
|
||||
padding: 0 0 .8em;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
border-bottom: 4px solid #ccc;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
.sp-setup-steps li:before {
|
||||
content: "";
|
||||
border: 4px solid #ccc;
|
||||
border-radius: 100%;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -8px;
|
||||
background: #fff;
|
||||
content: "";
|
||||
border: 4px solid #ccc;
|
||||
border-radius: 100%;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
margin-bottom: -8px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.sp-setup-steps li.active {
|
||||
border-color: #00a69c;
|
||||
color: #00a69c;
|
||||
border-color: #00a69c;
|
||||
color: #00a69c;
|
||||
}
|
||||
|
||||
.sp-setup-steps li.active:before {
|
||||
border-color: #00a69c;
|
||||
border-color: #00a69c;
|
||||
}
|
||||
|
||||
.sp-setup-steps li.done {
|
||||
border-color: #00a69c;
|
||||
color: #00a69c;
|
||||
border-color: #00a69c;
|
||||
color: #00a69c;
|
||||
}
|
||||
|
||||
.sp-setup-steps li.done:before {
|
||||
border-color: #00a69c;
|
||||
background: #00a69c;
|
||||
border-color: #00a69c;
|
||||
background: #00a69c;
|
||||
}
|
||||
|
||||
.sp-setup .sp-setup-actions:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.sp-setup .sp-setup-actions .button {
|
||||
float: right;
|
||||
font-size: 1.25em;
|
||||
padding: .5em 1em;
|
||||
line-height: 1em;
|
||||
margin-right: .5em;
|
||||
margin-bottom: 2px;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
float: right;
|
||||
font-size: 1.25em;
|
||||
padding: .5em 1em;
|
||||
line-height: 1em;
|
||||
margin-right: .5em;
|
||||
margin-bottom: 2px;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sp-setup .sp-setup-actions .button-primary {
|
||||
background-color: #3bbab3;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
text-shadow: 0 -1px 1px #15a29a, 1px 0 1px #15a29a, 0 1px 1px #15a29a, -1px 0 1px #15a29a;
|
||||
float: right;
|
||||
margin: 0 0 0 1em;
|
||||
opacity: 1;
|
||||
background-color: #3bbab3;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
text-shadow: 0 -1px 1px #15a29a, 1px 0 1px #15a29a, 0 1px 1px #15a29a, -1px 0 1px #15a29a;
|
||||
float: right;
|
||||
margin: 0 0 0 1em;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.sp-setup .sp-setup-actions .button-primary:active,
|
||||
.sp-setup .sp-setup-actions .button-primary:focus,
|
||||
.sp-setup .sp-setup-actions .button-primary:hover {
|
||||
background: #15a29a;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
background: #15a29a;
|
||||
border-color: #15a29a;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 #15a29a;
|
||||
}
|
||||
|
||||
.sp-setup .sp-setup-actions .button-muted {
|
||||
border: none;
|
||||
background: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
margin: .55em 0.05em 0.65em;
|
||||
color: #ccc;
|
||||
border: none;
|
||||
background: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
margin: .55em 0.05em 0.65em;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.sp-setup .sp-setup-actions .button-muted:hover {
|
||||
color: #999;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.sp-return-to-dashboard {
|
||||
font-size: .85em;
|
||||
margin: 1.18em 0;
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: .85em;
|
||||
margin: 1.18em 0;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sp-return-to-dashboard a {
|
||||
color: #b5b5b5;
|
||||
color: #b5b5b5;
|
||||
}
|
||||
|
||||
.sp-return-to-dashboard a:hover {
|
||||
color: #888;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
/* Media Queries */
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.sp-setup-content .form-table tbody th {
|
||||
width: auto
|
||||
};
|
||||
.sp-setup-content .form-table tbody th {
|
||||
width: auto
|
||||
};
|
||||
}
|
||||
|
||||
@media screen and (min-width: 783px) {
|
||||
.sp-setup-content .form-table td li input {
|
||||
width: 40%;
|
||||
}
|
||||
.sp-setup-content .form-table td li input {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td .player input {
|
||||
width: 40%;
|
||||
}
|
||||
.sp-setup-content .form-table td .player input {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td .player .player-number {
|
||||
width: 11%;
|
||||
}
|
||||
.sp-setup-content .form-table td .player .player-number {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.sp-setup-content .form-table td .staff .staff-name {
|
||||
width: 52%;
|
||||
}
|
||||
}
|
||||
.sp-setup-content .form-table td .staff .staff-name {
|
||||
width: 52%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,4 +240,4 @@ table, .sp-sitemap caption, .sp-sitemap tbody, .sp-sitemap tfoot, .sp-sitemap th
|
||||
.sp-sitemap .sp-utility {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,28 +6,28 @@
|
||||
*/
|
||||
|
||||
.sp-tournament-bracket .sp-team .sp-team-name:before {
|
||||
border-left-color: #e5e5e5 !important;
|
||||
border-right-color: #e5e5e5 !important;
|
||||
left: -10px !important;
|
||||
border-left-color: #e5e5e5 !important;
|
||||
border-right-color: #e5e5e5 !important;
|
||||
left: -10px !important;
|
||||
}
|
||||
|
||||
.sp-tournament-bracket .sp-team-flip .sp-team-name:before {
|
||||
left: auto !important;
|
||||
right: -10px !important;
|
||||
left: auto !important;
|
||||
right: -10px !important;
|
||||
}
|
||||
|
||||
.sp-tournament-bracket .sp-team.sp-first-round .sp-team-name {
|
||||
margin-left: -1px !important;
|
||||
margin-left: -1px !important;
|
||||
}
|
||||
|
||||
.sp-tournament-bracket .sp-team.sp-last-round .sp-team-name {
|
||||
margin-right: -1px !important;
|
||||
margin-right: -1px !important;
|
||||
}
|
||||
|
||||
.sp-template-event-performance-icons .sp-performance-icons {
|
||||
text-align: right !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.sp-data-table .data-name {
|
||||
text-align: left !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
@@ -6,28 +6,28 @@
|
||||
*/
|
||||
|
||||
.sp-tournament-bracket .sp-team .sp-team-name:before {
|
||||
border-right-color: #e5e5e5 !important;
|
||||
border-left-color: #e5e5e5 !important;
|
||||
right: -10px !important;
|
||||
border-right-color: #e5e5e5 !important;
|
||||
border-left-color: #e5e5e5 !important;
|
||||
right: -10px !important;
|
||||
}
|
||||
|
||||
.sp-tournament-bracket .sp-team-flip .sp-team-name:before {
|
||||
right: auto !important;
|
||||
left: -10px !important;
|
||||
right: auto !important;
|
||||
left: -10px !important;
|
||||
}
|
||||
|
||||
.sp-tournament-bracket .sp-team.sp-first-round .sp-team-name {
|
||||
margin-right: -1px !important;
|
||||
margin-right: -1px !important;
|
||||
}
|
||||
|
||||
.sp-tournament-bracket .sp-team.sp-last-round .sp-team-name {
|
||||
margin-left: -1px !important;
|
||||
margin-left: -1px !important;
|
||||
}
|
||||
|
||||
.sp-template-event-performance-icons .sp-performance-icons {
|
||||
text-align: left !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.sp-data-table .data-name {
|
||||
text-align: right !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -61,10 +61,10 @@
|
||||
margin: 0 10px;
|
||||
color: inherit;
|
||||
opacity: 0.5;
|
||||
transition: all .3s;
|
||||
transition: all .3s;
|
||||
}
|
||||
.sp-tab-menu-item a:focus {
|
||||
outline: none;
|
||||
outline: none;
|
||||
}
|
||||
.sp-tab-menu-item-active a,
|
||||
.sp-tab-menu-item a:hover {
|
||||
@@ -90,7 +90,7 @@
|
||||
.sp-data-table {
|
||||
width: 100%;
|
||||
table-layout: auto;
|
||||
border-spacing: 0;
|
||||
border-spacing: 0;
|
||||
}
|
||||
.sp-paginated-table {
|
||||
margin-bottom: 0;
|
||||
@@ -310,12 +310,12 @@
|
||||
color: #f4d014;
|
||||
}
|
||||
.sp-event-performance .sp-event-star-number {
|
||||
margin-left: -20px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
font-size: smaller;
|
||||
line-height: 20px;
|
||||
margin-left: -20px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
font-size: smaller;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
/* Event Performance (Icons) */
|
||||
@@ -335,12 +335,12 @@
|
||||
}
|
||||
|
||||
.sp-template-event-performance-icons .sp-player-position {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Event Calendar */
|
||||
.sp-event-calendar {
|
||||
border-spacing: 0;
|
||||
border-spacing: 0;
|
||||
}
|
||||
.sp-event-calendar a {
|
||||
text-decoration: none;
|
||||
@@ -635,11 +635,11 @@ span.sp_event_spec_label {
|
||||
display: inline-block;
|
||||
margin: 0 0.25em;
|
||||
}
|
||||
|
||||
|
||||
.sp-template-logo + .sp-post-content {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
|
||||
.sp-template-photo + .sp-post-content {
|
||||
clear: none;
|
||||
}
|
||||
@@ -664,15 +664,15 @@ span.sp_event_spec_label {
|
||||
text-align: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
.sp-template-event-logos-block .logo-odd img {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
.sp-template-event-logos-block .logo-even img {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
.sp-template-event-logos-block .sp-team-name {
|
||||
display: inline;
|
||||
clear: none;
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
|
||||
.sportspress-page .entry-content h4:first-child {
|
||||
margin-top: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,38 @@
|
||||
jQuery(document).ready(function($){
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
|
||||
// Color picker
|
||||
$('.colorpick').iris( {
|
||||
change: function(event, ui){
|
||||
$(this).css( { backgroundColor: ui.color.toString() } );
|
||||
},
|
||||
hide: true,
|
||||
border: true
|
||||
} ).each( function() {
|
||||
$(this).css( { backgroundColor: $(this).val() } );
|
||||
})
|
||||
.click(function(){
|
||||
$('.iris-picker').hide();
|
||||
$(this).closest('.sp-color-box, td').find('.iris-picker').show();
|
||||
});
|
||||
// Color picker
|
||||
$( '.colorpick' ).iris(
|
||||
{
|
||||
change: function(event, ui){
|
||||
$( this ).css( { backgroundColor: ui.color.toString() } );
|
||||
},
|
||||
hide: true,
|
||||
border: true
|
||||
}
|
||||
).each(
|
||||
function() {
|
||||
$( this ).css( { backgroundColor: $( this ).val() } );
|
||||
}
|
||||
)
|
||||
.click(
|
||||
function(){
|
||||
$( '.iris-picker' ).hide();
|
||||
$( this ).closest( '.sp-color-box, td' ).find( '.iris-picker' ).show();
|
||||
}
|
||||
);
|
||||
|
||||
$('body').click(function() {
|
||||
$('.iris-picker').hide();
|
||||
});
|
||||
$( 'body' ).click(
|
||||
function() {
|
||||
$( '.iris-picker' ).hide();
|
||||
}
|
||||
);
|
||||
|
||||
$('.sp-color-box, .colorpick').click(function(event){
|
||||
event.stopPropagation();
|
||||
});
|
||||
$( '.sp-color-box, .colorpick' ).click(
|
||||
function(event){
|
||||
event.stopPropagation();
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
jQuery(document).ready(function($){
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
|
||||
// Dashboard countdown
|
||||
$("#sportspress_dashboard_status .sp_status_list li.countdown").each(function() {
|
||||
var $this = $(this), finalDate = $(this).data('countdown');
|
||||
$this.countdown(finalDate, function(event) {
|
||||
$this.find('strong').html(event.strftime("%D "+localized_strings.days+" %H:%M:%S"));
|
||||
});
|
||||
});
|
||||
// Dashboard countdown
|
||||
$( "#sportspress_dashboard_status .sp_status_list li.countdown" ).each(
|
||||
function() {
|
||||
var $this = $( this ), finalDate = $( this ).data( 'countdown' );
|
||||
$this.countdown(
|
||||
finalDate,
|
||||
function(event) {
|
||||
$this.find( 'strong' ).html( event.strftime( "%D " + localized_strings.days + " %H:%M:%S" ) );
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -3,51 +3,63 @@
|
||||
$shortcodes = '';
|
||||
|
||||
$options = array(
|
||||
'event' => array(
|
||||
'details', 'results', 'performance', 'venue', 'officials', 'teams', 'full',
|
||||
),
|
||||
'team' => array(),
|
||||
'player' => array(
|
||||
'details', 'statistics'
|
||||
),
|
||||
'event' => array(
|
||||
'details',
|
||||
'results',
|
||||
'performance',
|
||||
'venue',
|
||||
'officials',
|
||||
'teams',
|
||||
'full',
|
||||
),
|
||||
'team' => array(),
|
||||
'player' => array(
|
||||
'details',
|
||||
'statistics',
|
||||
),
|
||||
);
|
||||
|
||||
$options = apply_filters( 'sportspress_shortcodes', $options );
|
||||
|
||||
foreach ( $options as $name => $group ) {
|
||||
if ( empty( $group ) ) continue;
|
||||
$shortcodes .= $name . '[' . implode( '|', $group ) . ']';
|
||||
if ( empty( $group ) ) {
|
||||
continue;
|
||||
}
|
||||
$shortcodes .= $name . '[' . implode( '|', $group ) . ']';
|
||||
}
|
||||
|
||||
$raw = apply_filters( 'sportspress_tinymce_strings', array(
|
||||
'shortcodes' => $shortcodes,
|
||||
'insert' => __( 'SportsPress Shortcodes', 'sportspress' ),
|
||||
'auto' => __( 'Auto', 'sportspress' ),
|
||||
'manual' => __( 'Manual', 'sportspress' ),
|
||||
'select' => __( 'Select...', 'sportspress' ),
|
||||
'event' => __( 'Event', 'sportspress' ),
|
||||
'details' => __( 'Details', 'sportspress' ),
|
||||
'results' => __( 'Results', 'sportspress' ),
|
||||
'countdown' => __( 'Countdown', 'sportspress' ),
|
||||
'performance' => __( 'Box Score', 'sportspress' ),
|
||||
'venue' => __( 'Venue', 'sportspress' ),
|
||||
'officials' => __( 'Officials', 'sportspress' ),
|
||||
'teams' => __( 'Teams', 'sportspress' ),
|
||||
'full' => __( 'Full Info', 'sportspress' ),
|
||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
||||
'statistics' => __( 'Statistics', 'sportspress' ),
|
||||
'team' => __( 'Team', 'sportspress' ),
|
||||
'standings' => __( 'League Table', 'sportspress' ),
|
||||
'player' => __( 'Player', 'sportspress' ),
|
||||
'list' => __( 'List', 'sportspress' ),
|
||||
'blocks' => __( 'Blocks', 'sportspress' ),
|
||||
'gallery' => __( 'Gallery', 'sportspress' ),
|
||||
));
|
||||
$raw = apply_filters(
|
||||
'sportspress_tinymce_strings',
|
||||
array(
|
||||
'shortcodes' => $shortcodes,
|
||||
'insert' => __( 'SportsPress Shortcodes', 'sportspress' ),
|
||||
'auto' => __( 'Auto', 'sportspress' ),
|
||||
'manual' => __( 'Manual', 'sportspress' ),
|
||||
'select' => __( 'Select...', 'sportspress' ),
|
||||
'event' => __( 'Event', 'sportspress' ),
|
||||
'details' => __( 'Details', 'sportspress' ),
|
||||
'results' => __( 'Results', 'sportspress' ),
|
||||
'countdown' => __( 'Countdown', 'sportspress' ),
|
||||
'performance' => __( 'Box Score', 'sportspress' ),
|
||||
'venue' => __( 'Venue', 'sportspress' ),
|
||||
'officials' => __( 'Officials', 'sportspress' ),
|
||||
'teams' => __( 'Teams', 'sportspress' ),
|
||||
'full' => __( 'Full Info', 'sportspress' ),
|
||||
'calendar' => __( 'Calendar', 'sportspress' ),
|
||||
'statistics' => __( 'Statistics', 'sportspress' ),
|
||||
'team' => __( 'Team', 'sportspress' ),
|
||||
'standings' => __( 'League Table', 'sportspress' ),
|
||||
'player' => __( 'Player', 'sportspress' ),
|
||||
'list' => __( 'List', 'sportspress' ),
|
||||
'blocks' => __( 'Blocks', 'sportspress' ),
|
||||
'gallery' => __( 'Gallery', 'sportspress' ),
|
||||
)
|
||||
);
|
||||
|
||||
$formatted = array();
|
||||
|
||||
foreach ( $raw as $key => $value ) {
|
||||
$formatted[] = $key . ': "' . esc_js( $value ) . '"';
|
||||
$formatted[] = $key . ': "' . esc_js( $value ) . '"';
|
||||
}
|
||||
|
||||
$strings = 'tinyMCE.addI18n({' . _WP_Editors::$mce_locale . ':{
|
||||
|
||||
@@ -1,42 +1,58 @@
|
||||
/* global tinymce */
|
||||
( function () {
|
||||
tinymce.PluginManager.add( 'sp_shortcodes_button', function( editor, url ) {
|
||||
var ed = tinymce.activeEditor;
|
||||
tinymce.PluginManager.add(
|
||||
'sp_shortcodes_button',
|
||||
function( editor, url ) {
|
||||
var ed = tinymce.activeEditor;
|
||||
|
||||
var groups = ed.getLang( 'sportspress.shortcodes' ).split("]");
|
||||
var menu = new Array();
|
||||
var groups = ed.getLang( 'sportspress.shortcodes' ).split( "]" );
|
||||
var menu = new Array();
|
||||
|
||||
groups.forEach(function(g) {
|
||||
if ( "" == g ) return;
|
||||
var p = g.split("[");
|
||||
var label = p.shift();
|
||||
var variations = p.shift();
|
||||
var shortcodes = typeof variations!== 'undefined' ? variations.split("|") : [];
|
||||
var submenu = new Array();
|
||||
shortcodes.forEach(function(s) {
|
||||
submenu.push({
|
||||
text: ed.getLang( 'sportspress.' + s ),
|
||||
onclick: function() {
|
||||
// triggers the thickbox
|
||||
var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
|
||||
W = W - 80;
|
||||
H = H - 84;
|
||||
tb_show( ed.getLang( 'sportspress.' + label ) + ' - ' + ed.getLang( 'sportspress.' + s ), 'admin-ajax.php?action=sportspress_' + label + '_' + s + '_shortcode&width=' + W + '&height=' + H );
|
||||
groups.forEach(
|
||||
function(g) {
|
||||
if ( "" == g ) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
menu.push({
|
||||
text: ed.getLang( 'sportspress.' + label ),
|
||||
menu: submenu
|
||||
});
|
||||
});
|
||||
var p = g.split( "[" );
|
||||
var label = p.shift();
|
||||
var variations = p.shift();
|
||||
var shortcodes = typeof variations !== 'undefined' ? variations.split( "|" ) : [];
|
||||
var submenu = new Array();
|
||||
shortcodes.forEach(
|
||||
function(s) {
|
||||
submenu.push(
|
||||
{
|
||||
text: ed.getLang( 'sportspress.' + s ),
|
||||
onclick: function() {
|
||||
// triggers the thickbox
|
||||
var width = jQuery( window ).width(), H = jQuery( window ).height(), W = ( 720 < width ) ? 720 : width;
|
||||
W = W - 80;
|
||||
H = H - 84;
|
||||
tb_show( ed.getLang( 'sportspress.' + label ) + ' - ' + ed.getLang( 'sportspress.' + s ), 'admin-ajax.php?action=sportspress_' + label + '_' + s + '_shortcode&width=' + W + '&height=' + H );
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
menu.push(
|
||||
{
|
||||
text: ed.getLang( 'sportspress.' + label ),
|
||||
menu: submenu
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
editor.addButton( 'sp_shortcodes_button', {
|
||||
title: ed.getLang('sportspress.insert'),
|
||||
text: false,
|
||||
icon: false,
|
||||
type: 'menubutton',
|
||||
menu: menu
|
||||
});
|
||||
});
|
||||
editor.addButton(
|
||||
'sp_shortcodes_button',
|
||||
{
|
||||
title: ed.getLang( 'sportspress.insert' ),
|
||||
text: false,
|
||||
icon: false,
|
||||
type: 'menubutton',
|
||||
menu: menu
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
})();
|
||||
|
||||
@@ -1,37 +1,55 @@
|
||||
jQuery(document).ready(function($){
|
||||
$("#title").keyup(function() {
|
||||
val = $(this).val();
|
||||
if ( val == '' ) val = 'f(x)';
|
||||
$(".sp-equation-variable").text( val + ' =' );
|
||||
});
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
$( "#title" ).keyup(
|
||||
function() {
|
||||
val = $( this ).val();
|
||||
if ( val == '' ) {
|
||||
val = 'f(x)';
|
||||
}
|
||||
$( ".sp-equation-variable" ).text( val + ' =' );
|
||||
}
|
||||
);
|
||||
|
||||
$(".sp-equation-parts .button").draggable({
|
||||
appendTo: "body",
|
||||
helper: "clone",
|
||||
cursor: "move",
|
||||
distance: 10,
|
||||
containment: "#sp_equationdiv",
|
||||
}).click(function() {
|
||||
$("<label class='button'></label>").text( $(this).text() ).append("<span class='remove'>×</span><input name='sp_equation[]' type='hidden' value='" + $(this).data("variable") + "'>").appendTo( $(".sp-equation-formula") );
|
||||
});
|
||||
$( ".sp-equation-parts .button" ).draggable(
|
||||
{
|
||||
appendTo: "body",
|
||||
helper: "clone",
|
||||
cursor: "move",
|
||||
distance: 10,
|
||||
containment: "#sp_equationdiv",
|
||||
}
|
||||
).click(
|
||||
function() {
|
||||
$( "<label class='button'></label>" ).text( $( this ).text() ).append( "<span class='remove'>×</span><input name='sp_equation[]' type='hidden' value='" + $( this ).data( "variable" ) + "'>" ).appendTo( $( ".sp-equation-formula" ) );
|
||||
}
|
||||
);
|
||||
|
||||
$(".sp-equation").droppable({
|
||||
activeClass: "ui-state-active",
|
||||
hoverClass: "ui-state-hover",
|
||||
accept: ".button:not(.ui-sortable-helper)",
|
||||
drop: function( event, ui ) {
|
||||
$("<label class='button'></label>").text( ui.draggable.text() ).append("<span class='remove'>×</span><input name='sp_equation[]' type='hidden' value='" + ui.draggable.data("variable") + "'>").appendTo( $(".sp-equation-formula") );
|
||||
}
|
||||
}).sortable({
|
||||
items: ".button",
|
||||
tolerance: "pointer",
|
||||
containment: "#sp_equationdiv",
|
||||
sort: function() {
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
}
|
||||
});
|
||||
$( ".sp-equation" ).droppable(
|
||||
{
|
||||
activeClass: "ui-state-active",
|
||||
hoverClass: "ui-state-hover",
|
||||
accept: ".button:not(.ui-sortable-helper)",
|
||||
drop: function( event, ui ) {
|
||||
$( "<label class='button'></label>" ).text( ui.draggable.text() ).append( "<span class='remove'>×</span><input name='sp_equation[]' type='hidden' value='" + ui.draggable.data( "variable" ) + "'>" ).appendTo( $( ".sp-equation-formula" ) );
|
||||
}
|
||||
}
|
||||
).sortable(
|
||||
{
|
||||
items: ".button",
|
||||
tolerance: "pointer",
|
||||
containment: "#sp_equationdiv",
|
||||
sort: function() {
|
||||
$( this ).removeClass( "ui-state-active" );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(".sp-equation-formula").on("click", ".button .remove", function() {
|
||||
$(this).closest(".button").remove();
|
||||
});
|
||||
});
|
||||
$( ".sp-equation-formula" ).on(
|
||||
"click",
|
||||
".button .remove",
|
||||
function() {
|
||||
$( this ).closest( ".button" ).remove();
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,37 +1,52 @@
|
||||
jQuery(document).ready(function($){
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
|
||||
// Icon picker
|
||||
$('.sp-icons input').on('change', function() {
|
||||
if ('' == $(this).val()) {
|
||||
$('.sp-custom-colors').hide();
|
||||
$('.sp-custom-thumbnail').show();
|
||||
} else {
|
||||
$('.sp-custom-thumbnail').hide();
|
||||
$('.sp-custom-colors').show();
|
||||
}
|
||||
});
|
||||
// Icon picker
|
||||
$( '.sp-icons input' ).on(
|
||||
'change',
|
||||
function() {
|
||||
if ('' == $( this ).val()) {
|
||||
$( '.sp-custom-colors' ).hide();
|
||||
$( '.sp-custom-thumbnail' ).show();
|
||||
} else {
|
||||
$( '.sp-custom-thumbnail' ).hide();
|
||||
$( '.sp-custom-colors' ).show();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Color picker
|
||||
$('.colorpick').iris( {
|
||||
change: function(event, ui){
|
||||
$(this).css( { backgroundColor: ui.color.toString() } );
|
||||
},
|
||||
hide: true,
|
||||
border: true
|
||||
} ).each( function() {
|
||||
$(this).css( { backgroundColor: $(this).val() } );
|
||||
})
|
||||
.click(function(){
|
||||
$('.iris-picker').hide();
|
||||
$(this).closest('.sp-color-box-for-icon, td').find('.iris-picker').show();
|
||||
});
|
||||
// Color picker
|
||||
$( '.colorpick' ).iris(
|
||||
{
|
||||
change: function(event, ui){
|
||||
$( this ).css( { backgroundColor: ui.color.toString() } );
|
||||
},
|
||||
hide: true,
|
||||
border: true
|
||||
}
|
||||
).each(
|
||||
function() {
|
||||
$( this ).css( { backgroundColor: $( this ).val() } );
|
||||
}
|
||||
)
|
||||
.click(
|
||||
function(){
|
||||
$( '.iris-picker' ).hide();
|
||||
$( this ).closest( '.sp-color-box-for-icon, td' ).find( '.iris-picker' ).show();
|
||||
}
|
||||
);
|
||||
|
||||
$('body').click(function() {
|
||||
$('.iris-picker').hide();
|
||||
});
|
||||
$( 'body' ).click(
|
||||
function() {
|
||||
$( '.iris-picker' ).hide();
|
||||
}
|
||||
);
|
||||
|
||||
$('.sp-color-box-for-icon, .colorpick').click(function(event){
|
||||
event.stopPropagation();
|
||||
});
|
||||
$( '.sp-color-box-for-icon, .colorpick' ).click(
|
||||
function(event){
|
||||
event.stopPropagation();
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -24,56 +24,72 @@
|
||||
var $post_row = $( '#post-' + $post_id );
|
||||
|
||||
// get the data
|
||||
var $number = $( '.column-sp_number', $post_row ).text();
|
||||
var $current_teams = String( $( '.column-sp_team', $post_row ).find( '.sp-player-teams' ).data( 'current-teams' ) ).split(',');
|
||||
var $past_teams = String( $( '.column-sp_team', $post_row ).find( '.sp-player-teams' ).data( 'past-teams' ) ).split(',');
|
||||
var $number = $( '.column-sp_number', $post_row ).text();
|
||||
var $current_teams = String( $( '.column-sp_team', $post_row ).find( '.sp-player-teams' ).data( 'current-teams' ) ).split( ',' );
|
||||
var $past_teams = String( $( '.column-sp_team', $post_row ).find( '.sp-player-teams' ).data( 'past-teams' ) ).split( ',' );
|
||||
|
||||
// populate the data
|
||||
$( ':input[name="sp_number"]', $edit_row ).val( $number );
|
||||
$( ':input[name="sp_current_team[]"]', $edit_row ).each(function() {
|
||||
$(this).prop("checked", ($.inArray($(this).val(), $current_teams ) != -1));
|
||||
});
|
||||
$( ':input[name="sp_past_team[]"]', $edit_row ).each(function() {
|
||||
$(this).prop("checked", ($.inArray($(this).val(), $past_teams ) != -1));
|
||||
});
|
||||
$( ':input[name="sp_current_team[]"]', $edit_row ).each(
|
||||
function() {
|
||||
$( this ).prop( "checked", ($.inArray( $( this ).val(), $current_teams ) != -1) );
|
||||
}
|
||||
);
|
||||
$( ':input[name="sp_past_team[]"]', $edit_row ).each(
|
||||
function() {
|
||||
$( this ).prop( "checked", ($.inArray( $( this ).val(), $past_teams ) != -1) );
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
$( document ).on( 'click', '#bulk_edit', function() {
|
||||
// define the bulk edit row
|
||||
var $bulk_row = $( '#bulk-edit' );
|
||||
$( document ).on(
|
||||
'click',
|
||||
'#bulk_edit',
|
||||
function() {
|
||||
// define the bulk edit row
|
||||
var $bulk_row = $( '#bulk-edit' );
|
||||
|
||||
// get the selected post ids that are being edited
|
||||
var $post_ids = new Array();
|
||||
$bulk_row.find( '#bulk-titles' ).children().each( function() {
|
||||
$post_ids.push( $( this ).attr( 'id' ).replace( /^(ttle)/i, '' ) );
|
||||
});
|
||||
// get the selected post ids that are being edited
|
||||
var $post_ids = new Array();
|
||||
$bulk_row.find( '#bulk-titles' ).children().each(
|
||||
function() {
|
||||
$post_ids.push( $( this ).attr( 'id' ).replace( /^(ttle)/i, '' ) );
|
||||
}
|
||||
);
|
||||
|
||||
// get the data
|
||||
var $current_teams = [];
|
||||
$bulk_row.find( 'input[name="sp_current_team[]"]:checked' ).each(function() {
|
||||
$current_teams.push( $(this).val() );
|
||||
});
|
||||
// get the data
|
||||
var $current_teams = [];
|
||||
$bulk_row.find( 'input[name="sp_current_team[]"]:checked' ).each(
|
||||
function() {
|
||||
$current_teams.push( $( this ).val() );
|
||||
}
|
||||
);
|
||||
|
||||
var $past_teams = [];
|
||||
$bulk_row.find( 'input[name="sp_past_team[]"]:checked' ).each(function() {
|
||||
$past_teams.push( $(this).val() );
|
||||
});
|
||||
var $past_teams = [];
|
||||
$bulk_row.find( 'input[name="sp_past_team[]"]:checked' ).each(
|
||||
function() {
|
||||
$past_teams.push( $( this ).val() );
|
||||
}
|
||||
);
|
||||
|
||||
// save the data
|
||||
$.ajax({
|
||||
url: ajaxurl, // this is a variable that WordPress has already defined for us
|
||||
type: 'POST',
|
||||
async: false,
|
||||
cache: false,
|
||||
data: {
|
||||
action: 'save_bulk_edit_sp_player',
|
||||
post_ids: $post_ids,
|
||||
current_teams: $current_teams,
|
||||
past_teams: $past_teams,
|
||||
nonce: $("#sp_player_edit_nonce").val()
|
||||
}
|
||||
});
|
||||
});
|
||||
// save the data
|
||||
$.ajax(
|
||||
{
|
||||
url: ajaxurl, // this is a variable that WordPress has already defined for us
|
||||
type: 'POST',
|
||||
async: false,
|
||||
cache: false,
|
||||
data: {
|
||||
action: 'save_bulk_edit_sp_player',
|
||||
post_ids: $post_ids,
|
||||
current_teams: $current_teams,
|
||||
past_teams: $past_teams,
|
||||
nonce: $( "#sp_player_edit_nonce" ).val()
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
})(jQuery);
|
||||
})( jQuery );
|
||||
|
||||
@@ -1,64 +1,92 @@
|
||||
jQuery(document).ready(function($){
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
|
||||
// Display custom sport name field as needed
|
||||
$("body.toplevel_page_sportspress #sportspress_sport").change(function() {
|
||||
$target = $("#sportspress_custom_sport_name");
|
||||
if ( $(this).val() == "custom" )
|
||||
$target.show();
|
||||
else
|
||||
$target.hide();
|
||||
});
|
||||
// Display custom sport name field as needed
|
||||
$( "body.toplevel_page_sportspress #sportspress_sport" ).change(
|
||||
function() {
|
||||
$target = $( "#sportspress_custom_sport_name" );
|
||||
if ( $( this ).val() == "custom" ) {
|
||||
$target.show();
|
||||
} else {
|
||||
$target.hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Color picker
|
||||
$('.colorpick').iris( {
|
||||
change: function(event, ui){
|
||||
$(this).css( { backgroundColor: ui.color.toString() } );
|
||||
},
|
||||
hide: true,
|
||||
border: true
|
||||
} ).each( function() {
|
||||
$(this).css( { backgroundColor: $(this).val() } );
|
||||
})
|
||||
.click(function(){
|
||||
$('.iris-picker').hide();
|
||||
$(this).closest('.sp-color-box, td').find('.iris-picker').show();
|
||||
});
|
||||
// Color picker
|
||||
$( '.colorpick' ).iris(
|
||||
{
|
||||
change: function(event, ui){
|
||||
$( this ).css( { backgroundColor: ui.color.toString() } );
|
||||
},
|
||||
hide: true,
|
||||
border: true
|
||||
}
|
||||
).each(
|
||||
function() {
|
||||
$( this ).css( { backgroundColor: $( this ).val() } );
|
||||
}
|
||||
)
|
||||
.click(
|
||||
function(){
|
||||
$( '.iris-picker' ).hide();
|
||||
$( this ).closest( '.sp-color-box, td' ).find( '.iris-picker' ).show();
|
||||
}
|
||||
);
|
||||
|
||||
$('body').click(function() {
|
||||
$('.iris-picker').hide();
|
||||
});
|
||||
$( 'body' ).click(
|
||||
function() {
|
||||
$( '.iris-picker' ).hide();
|
||||
}
|
||||
);
|
||||
|
||||
$('.sp-color-box, .colorpick').click(function(event){
|
||||
event.stopPropagation();
|
||||
});
|
||||
$( '.sp-color-box, .colorpick' ).click(
|
||||
function(event){
|
||||
event.stopPropagation();
|
||||
}
|
||||
);
|
||||
|
||||
// Chosen select
|
||||
$(".chosen-select").chosen({
|
||||
allow_single_deselect: true,
|
||||
single_backstroke_delete: false,
|
||||
placeholder_text_multiple: localized_strings.none
|
||||
});
|
||||
// Chosen select
|
||||
$( ".chosen-select" ).chosen(
|
||||
{
|
||||
allow_single_deselect: true,
|
||||
single_backstroke_delete: false,
|
||||
placeholder_text_multiple: localized_strings.none
|
||||
}
|
||||
);
|
||||
|
||||
// Preset field modifier
|
||||
$(".sp-custom-input-wrapper .preset").click(function() {
|
||||
val = $(this).val();
|
||||
if(val == "\\c\\u\\s\\t\\o\\m") return true;
|
||||
example = $(this).attr("data-example");
|
||||
$(this).closest(".sp-custom-input-wrapper").find(".value").val(val).siblings(".example").html(example);
|
||||
});
|
||||
// Preset field modifier
|
||||
$( ".sp-custom-input-wrapper .preset" ).click(
|
||||
function() {
|
||||
val = $( this ).val();
|
||||
if (val == "\\c\\u\\s\\t\\o\\m") {
|
||||
return true;
|
||||
}
|
||||
example = $( this ).attr( "data-example" );
|
||||
$( this ).closest( ".sp-custom-input-wrapper" ).find( ".value" ).val( val ).siblings( ".example" ).html( example );
|
||||
}
|
||||
);
|
||||
|
||||
// Select custom preset when field is brought to focus
|
||||
$(".sp-custom-input-wrapper .value").focus(function() {
|
||||
$(this).siblings("label").find(".preset").prop("checked", true);
|
||||
});
|
||||
// Select custom preset when field is brought to focus
|
||||
$( ".sp-custom-input-wrapper .value" ).focus(
|
||||
function() {
|
||||
$( this ).siblings( "label" ).find( ".preset" ).prop( "checked", true );
|
||||
}
|
||||
);
|
||||
|
||||
// Adjust example field when custom preset is entered
|
||||
$(".sp-custom-input-wrapper .value").on("keyup", function() {
|
||||
val = $(this).val();
|
||||
if ( val === undefined ) return true;
|
||||
format = $(this).attr("data-example-format");
|
||||
example = format.replace(/__val__/g, val);
|
||||
$(this).siblings(".example").html(example);
|
||||
});
|
||||
// Adjust example field when custom preset is entered
|
||||
$( ".sp-custom-input-wrapper .value" ).on(
|
||||
"keyup",
|
||||
function() {
|
||||
val = $( this ).val();
|
||||
if ( val === undefined ) {
|
||||
return true;
|
||||
}
|
||||
format = $( this ).attr( "data-example-format" );
|
||||
example = format.replace( /__val__/g, val );
|
||||
$( this ).siblings( ".example" ).html( example );
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,54 +1,76 @@
|
||||
//Get variables form input values
|
||||
latitude = document.getElementById('term_meta[sp_latitude]').value;
|
||||
longitude = document.getElementById('term_meta[sp_longitude]').value;
|
||||
|
||||
//Initialize the map and add the Search control box
|
||||
var map = L.map('sp-location-picker').setView([latitude, longitude], 15),
|
||||
// Get variables form input values
|
||||
latitude = document.getElementById( 'term_meta[sp_latitude]' ).value;
|
||||
longitude = document.getElementById( 'term_meta[sp_longitude]' ).value;
|
||||
|
||||
// Initialize the map and add the Search control box
|
||||
var map = L.map( 'sp-location-picker' ).setView( [latitude, longitude], 15 ),
|
||||
geocoder = L.Control.Geocoder.nominatim(),
|
||||
control = L.Control.geocoder({
|
||||
geocoder: geocoder,
|
||||
collapsed: false,
|
||||
defaultMarkGeocode: false
|
||||
}).addTo(map),
|
||||
//Add a marker to use from the begining
|
||||
marker = L.marker([latitude, longitude],{draggable: true, autoPan: true}).addTo(map);
|
||||
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
//Pass the values to the fields after dragging
|
||||
marker.on('dragend', function (e) {
|
||||
document.getElementById('term_meta[sp_latitude]').value = marker.getLatLng().lat;
|
||||
document.getElementById('term_meta[sp_longitude]').value = marker.getLatLng().lng;
|
||||
geocoder.reverse(marker.getLatLng(), map.options.crs.scale(map.getZoom()), function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById('term_meta[sp_address]').value = r.name;
|
||||
control = L.Control.geocoder(
|
||||
{
|
||||
geocoder: geocoder,
|
||||
collapsed: false,
|
||||
defaultMarkGeocode: false
|
||||
}
|
||||
})
|
||||
});
|
||||
).addTo( map ),
|
||||
// Add a marker to use from the begining
|
||||
marker = L.marker( [latitude, longitude],{draggable: true, autoPan: true} ).addTo( map );
|
||||
|
||||
//After searching
|
||||
control.on('markgeocode', function(e) {
|
||||
var center = e.geocode.center;
|
||||
var address = e.geocode.name;
|
||||
map.setView([center.lat, center.lng], 15); //Center map to the new place
|
||||
map.removeLayer(marker); //Remove previous marker
|
||||
marker = L.marker([center.lat, center.lng],{draggable: true, autoPan: true}).addTo(map); //Add new marker to use
|
||||
//Pass the values to the fields after searching
|
||||
document.getElementById('term_meta[sp_latitude]').value = center.lat;
|
||||
document.getElementById('term_meta[sp_longitude]').value = center.lng;
|
||||
document.getElementById('term_meta[sp_address]').value = address;
|
||||
//Pass the values to the fields after dragging
|
||||
marker.on('dragend', function (e) {
|
||||
document.getElementById('term_meta[sp_latitude]').value = marker.getLatLng().lat;
|
||||
document.getElementById('term_meta[sp_longitude]').value = marker.getLatLng().lng;
|
||||
geocoder.reverse(marker.getLatLng(), map.options.crs.scale(map.getZoom()), function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById('term_meta[sp_address]').value = r.name;
|
||||
L.tileLayer(
|
||||
'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
|
||||
{
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}
|
||||
).addTo( map );
|
||||
|
||||
// Pass the values to the fields after dragging
|
||||
marker.on(
|
||||
'dragend',
|
||||
function (e) {
|
||||
document.getElementById( 'term_meta[sp_latitude]' ).value = marker.getLatLng().lat;
|
||||
document.getElementById( 'term_meta[sp_longitude]' ).value = marker.getLatLng().lng;
|
||||
geocoder.reverse(
|
||||
marker.getLatLng(),
|
||||
map.options.crs.scale( map.getZoom() ),
|
||||
function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById( 'term_meta[sp_address]' ).value = r.name;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}).addTo(map);
|
||||
)
|
||||
}
|
||||
);
|
||||
|
||||
// After searching
|
||||
control.on(
|
||||
'markgeocode',
|
||||
function(e) {
|
||||
var center = e.geocode.center;
|
||||
var address = e.geocode.name;
|
||||
map.setView( [center.lat, center.lng], 15 ); // Center map to the new place
|
||||
map.removeLayer( marker ); // Remove previous marker
|
||||
marker = L.marker( [center.lat, center.lng],{draggable: true, autoPan: true} ).addTo( map ); // Add new marker to use
|
||||
// Pass the values to the fields after searching
|
||||
document.getElementById( 'term_meta[sp_latitude]' ).value = center.lat;
|
||||
document.getElementById( 'term_meta[sp_longitude]' ).value = center.lng;
|
||||
document.getElementById( 'term_meta[sp_address]' ).value = address;
|
||||
// Pass the values to the fields after dragging
|
||||
marker.on(
|
||||
'dragend',
|
||||
function (e) {
|
||||
document.getElementById( 'term_meta[sp_latitude]' ).value = marker.getLatLng().lat;
|
||||
document.getElementById( 'term_meta[sp_longitude]' ).value = marker.getLatLng().lng;
|
||||
geocoder.reverse(
|
||||
marker.getLatLng(),
|
||||
map.options.crs.scale( map.getZoom() ),
|
||||
function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById( 'term_meta[sp_address]' ).value = r.name;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
).addTo( map );
|
||||
|
||||
@@ -1,54 +1,76 @@
|
||||
//Get variables form input values
|
||||
latitude = document.getElementById('sp_latitude').value;
|
||||
longitude = document.getElementById('sp_longitude').value;
|
||||
|
||||
//Initialize the map and add the Search control box
|
||||
var map = L.map('sp-location-picker').setView([latitude, longitude], 15),
|
||||
// Get variables form input values
|
||||
latitude = document.getElementById( 'sp_latitude' ).value;
|
||||
longitude = document.getElementById( 'sp_longitude' ).value;
|
||||
|
||||
// Initialize the map and add the Search control box
|
||||
var map = L.map( 'sp-location-picker' ).setView( [latitude, longitude], 15 ),
|
||||
geocoder = L.Control.Geocoder.nominatim(),
|
||||
control = L.Control.geocoder({
|
||||
geocoder: geocoder,
|
||||
collapsed: false,
|
||||
defaultMarkGeocode: false
|
||||
}).addTo(map),
|
||||
//Add a marker to use from the begining
|
||||
marker = L.marker([latitude, longitude],{draggable: true, autoPan: true}).addTo(map);
|
||||
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
//Pass the values to the fields after dragging
|
||||
marker.on('dragend', function (e) {
|
||||
document.getElementById('sp_latitude').value = marker.getLatLng().lat;
|
||||
document.getElementById('sp_longitude').value = marker.getLatLng().lng;
|
||||
geocoder.reverse(marker.getLatLng(), map.options.crs.scale(map.getZoom()), function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById('sp_address').value = r.name;
|
||||
control = L.Control.geocoder(
|
||||
{
|
||||
geocoder: geocoder,
|
||||
collapsed: false,
|
||||
defaultMarkGeocode: false
|
||||
}
|
||||
})
|
||||
});
|
||||
).addTo( map ),
|
||||
// Add a marker to use from the begining
|
||||
marker = L.marker( [latitude, longitude],{draggable: true, autoPan: true} ).addTo( map );
|
||||
|
||||
//After searching
|
||||
control.on('markgeocode', function(e) {
|
||||
var center = e.geocode.center;
|
||||
var address = e.geocode.name;
|
||||
map.setView([center.lat, center.lng], 15); //Center map to the new place
|
||||
map.removeLayer(marker); //Remove previous marker
|
||||
marker = L.marker([center.lat, center.lng],{draggable: true, autoPan: true}).addTo(map); //Add new marker to use
|
||||
//Pass the values to the fields after searching
|
||||
document.getElementById('sp_latitude').value = center.lat;
|
||||
document.getElementById('sp_longitude').value = center.lng;
|
||||
document.getElementById('sp_address').value = address;
|
||||
//Pass the values to the fields after dragging
|
||||
marker.on('dragend', function (e) {
|
||||
document.getElementById('sp_latitude').value = marker.getLatLng().lat;
|
||||
document.getElementById('sp_longitude').value = marker.getLatLng().lng;
|
||||
geocoder.reverse(marker.getLatLng(), map.options.crs.scale(map.getZoom()), function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById('sp_address').value = r.name;
|
||||
L.tileLayer(
|
||||
'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
|
||||
{
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}
|
||||
).addTo( map );
|
||||
|
||||
// Pass the values to the fields after dragging
|
||||
marker.on(
|
||||
'dragend',
|
||||
function (e) {
|
||||
document.getElementById( 'sp_latitude' ).value = marker.getLatLng().lat;
|
||||
document.getElementById( 'sp_longitude' ).value = marker.getLatLng().lng;
|
||||
geocoder.reverse(
|
||||
marker.getLatLng(),
|
||||
map.options.crs.scale( map.getZoom() ),
|
||||
function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById( 'sp_address' ).value = r.name;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}).addTo(map);
|
||||
)
|
||||
}
|
||||
);
|
||||
|
||||
// After searching
|
||||
control.on(
|
||||
'markgeocode',
|
||||
function(e) {
|
||||
var center = e.geocode.center;
|
||||
var address = e.geocode.name;
|
||||
map.setView( [center.lat, center.lng], 15 ); // Center map to the new place
|
||||
map.removeLayer( marker ); // Remove previous marker
|
||||
marker = L.marker( [center.lat, center.lng],{draggable: true, autoPan: true} ).addTo( map ); // Add new marker to use
|
||||
// Pass the values to the fields after searching
|
||||
document.getElementById( 'sp_latitude' ).value = center.lat;
|
||||
document.getElementById( 'sp_longitude' ).value = center.lng;
|
||||
document.getElementById( 'sp_address' ).value = address;
|
||||
// Pass the values to the fields after dragging
|
||||
marker.on(
|
||||
'dragend',
|
||||
function (e) {
|
||||
document.getElementById( 'sp_latitude' ).value = marker.getLatLng().lat;
|
||||
document.getElementById( 'sp_longitude' ).value = marker.getLatLng().lng;
|
||||
geocoder.reverse(
|
||||
marker.getLatLng(),
|
||||
map.options.crs.scale( map.getZoom() ),
|
||||
function(results) {
|
||||
var r = results[0];
|
||||
if (r) {
|
||||
document.getElementById( 'sp_address' ).value = r.name;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
).addTo( map );
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +1,32 @@
|
||||
jQuery(document).ready(function($){
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
|
||||
// Tiptip
|
||||
$(".sp-tip").tipTip({
|
||||
delay: 200,
|
||||
fadeIn: 100,
|
||||
fadeOut: 100
|
||||
});
|
||||
$(".sp-desc-tip").tipTip({
|
||||
delay: 200,
|
||||
fadeIn: 100,
|
||||
fadeOut: 100,
|
||||
defaultPosition: 'right'
|
||||
});
|
||||
// Tiptip
|
||||
$( ".sp-tip" ).tipTip(
|
||||
{
|
||||
delay: 200,
|
||||
fadeIn: 100,
|
||||
fadeOut: 100
|
||||
}
|
||||
);
|
||||
$( ".sp-desc-tip" ).tipTip(
|
||||
{
|
||||
delay: 200,
|
||||
fadeIn: 100,
|
||||
fadeOut: 100,
|
||||
defaultPosition: 'right'
|
||||
}
|
||||
);
|
||||
|
||||
// Chosen select
|
||||
$(".chosen-select, #poststuff #post_author_override").chosen({
|
||||
allow_single_deselect: true,
|
||||
search_contains: true,
|
||||
single_backstroke_delete: false,
|
||||
disable_search_threshold: 10,
|
||||
placeholder_text_multiple: localized_strings.none
|
||||
});
|
||||
});
|
||||
// Chosen select
|
||||
$( ".chosen-select, #poststuff #post_author_override" ).chosen(
|
||||
{
|
||||
allow_single_deselect: true,
|
||||
search_contains: true,
|
||||
single_backstroke_delete: false,
|
||||
disable_search_threshold: 10,
|
||||
placeholder_text_multiple: localized_strings.none
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,41 +1,60 @@
|
||||
jQuery(document).ready(function($){
|
||||
jQuery( document ).ready(
|
||||
function($){
|
||||
|
||||
// Orderby affects order select in widget options
|
||||
$("body").on("change", ".sp-select-orderby", function() {
|
||||
$(this).closest(".widget-content").find(".sp-select-order").prop("disabled", $(this).val() == "default");
|
||||
});
|
||||
// Orderby affects order select in widget options
|
||||
$( "body" ).on(
|
||||
"change",
|
||||
".sp-select-orderby",
|
||||
function() {
|
||||
$( this ).closest( ".widget-content" ).find( ".sp-select-order" ).prop( "disabled", $( this ).val() == "default" );
|
||||
}
|
||||
);
|
||||
|
||||
// Calendar affects view all link checkbox in widget options
|
||||
$("body").on("change", ".sp-event-calendar-select", function() {
|
||||
$el = $(this).closest(".widget-content").find(".sp-event-calendar-show-all-toggle");
|
||||
if($(this).val() == 0)
|
||||
$el.hide();
|
||||
else
|
||||
$el.show();
|
||||
});
|
||||
// Calendar affects view all link checkbox in widget options
|
||||
$( "body" ).on(
|
||||
"change",
|
||||
".sp-event-calendar-select",
|
||||
function() {
|
||||
$el = $( this ).closest( ".widget-content" ).find( ".sp-event-calendar-show-all-toggle" );
|
||||
if ($( this ).val() == 0) {
|
||||
$el.hide();
|
||||
} else {
|
||||
$el.show();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Show or hide datepicker
|
||||
$("body").on("change", ".sp-date-selector select", function() {
|
||||
if ( $(this).val() == "range" ) {
|
||||
$(this).closest(".sp-date-selector").find(".sp-date-range").show();
|
||||
} else {
|
||||
$(this).closest(".sp-date-selector").find(".sp-date-range").hide();
|
||||
}
|
||||
});
|
||||
$(".sp-date-selector select").trigger("change");
|
||||
// Show or hide datepicker
|
||||
$( "body" ).on(
|
||||
"change",
|
||||
".sp-date-selector select",
|
||||
function() {
|
||||
if ( $( this ).val() == "range" ) {
|
||||
$( this ).closest( ".sp-date-selector" ).find( ".sp-date-range" ).show();
|
||||
} else {
|
||||
$( this ).closest( ".sp-date-selector" ).find( ".sp-date-range" ).hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
$( ".sp-date-selector select" ).trigger( "change" );
|
||||
|
||||
// Toggle date range selectors
|
||||
$("body").on("change", ".sp-date-relative input", function() {
|
||||
$relative = $(this).closest(".sp-date-relative").siblings(".sp-date-range-relative").toggle(0, $(this).attr("checked"));
|
||||
$absolute = $(this).closest(".sp-date-relative").siblings(".sp-date-range-absolute").toggle(0, $(this).attr("checked"));
|
||||
// Toggle date range selectors
|
||||
$( "body" ).on(
|
||||
"change",
|
||||
".sp-date-relative input",
|
||||
function() {
|
||||
$relative = $( this ).closest( ".sp-date-relative" ).siblings( ".sp-date-range-relative" ).toggle( 0, $( this ).attr( "checked" ) );
|
||||
$absolute = $( this ).closest( ".sp-date-relative" ).siblings( ".sp-date-range-absolute" ).toggle( 0, $( this ).attr( "checked" ) );
|
||||
|
||||
if ($(this).attr("checked")) {
|
||||
$relative.show();
|
||||
$absolute.hide();
|
||||
} else {
|
||||
$absolute.show();
|
||||
$relative.hide();
|
||||
}
|
||||
});
|
||||
$(".sp-date-selector input").trigger("change");
|
||||
});
|
||||
if ($( this ).attr( "checked" )) {
|
||||
$relative.show();
|
||||
$absolute.hide();
|
||||
} else {
|
||||
$absolute.show();
|
||||
$relative.hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
$( ".sp-date-selector input" ).trigger( "change" );
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,81 +1,88 @@
|
||||
import apiFetch from '@wordpress/api-fetch';
|
||||
console.log(wp.api.collections.Posts());
|
||||
console.log( wp.api.collections.Posts() );
|
||||
|
||||
wp.blocks.registerBlockType('sportspress/event-calendar', {
|
||||
title: strings.event_calendar,
|
||||
icon: 'calendar',
|
||||
category: 'sportspress',
|
||||
attributes: {
|
||||
title: {
|
||||
type: 'string'
|
||||
},
|
||||
id: {
|
||||
type: 'number'
|
||||
},
|
||||
status: {
|
||||
type: 'string'
|
||||
},
|
||||
date: {
|
||||
type: 'string'
|
||||
},
|
||||
date_from: {
|
||||
type: 'string'
|
||||
},
|
||||
date_to: {
|
||||
type: 'string'
|
||||
},
|
||||
date_past: {
|
||||
type: 'number'
|
||||
},
|
||||
date_future: {
|
||||
type: 'number'
|
||||
},
|
||||
date_relative: {
|
||||
type: 'number'
|
||||
},
|
||||
day: {
|
||||
type: 'string'
|
||||
},
|
||||
show_all_events_link: {
|
||||
type: 'number'
|
||||
},
|
||||
wp.blocks.registerBlockType(
|
||||
'sportspress/event-calendar',
|
||||
{
|
||||
title: strings.event_calendar,
|
||||
icon: 'calendar',
|
||||
category: 'sportspress',
|
||||
attributes: {
|
||||
title: {
|
||||
type: 'string'
|
||||
},
|
||||
id: {
|
||||
type: 'number'
|
||||
},
|
||||
status: {
|
||||
type: 'string'
|
||||
},
|
||||
date: {
|
||||
type: 'string'
|
||||
},
|
||||
date_from: {
|
||||
type: 'string'
|
||||
},
|
||||
date_to: {
|
||||
type: 'string'
|
||||
},
|
||||
date_past: {
|
||||
type: 'number'
|
||||
},
|
||||
date_future: {
|
||||
type: 'number'
|
||||
},
|
||||
date_relative: {
|
||||
type: 'number'
|
||||
},
|
||||
day: {
|
||||
type: 'string'
|
||||
},
|
||||
show_all_events_link: {
|
||||
type: 'number'
|
||||
},
|
||||
|
||||
content: {type: 'string'},
|
||||
color: {type: 'string'}
|
||||
},
|
||||
|
||||
edit: function(props) {
|
||||
function updateContent(event) {
|
||||
props.setAttributes({content: event.target.value})
|
||||
}
|
||||
function updateColor(value) {
|
||||
props.setAttributes({color: value.hex})
|
||||
}
|
||||
return React.createElement(
|
||||
wp.components.Panel,
|
||||
{header: strings.event_calendar},
|
||||
React.createElement(
|
||||
wp.components.PanelBody,
|
||||
{title: strings.properties},
|
||||
React.createElement(
|
||||
wp.components.TextControl,
|
||||
{label: strings.title, type: "text", value: props.attributes.title}
|
||||
),
|
||||
React.createElement(
|
||||
wp.components.SelectControl,
|
||||
{label: strings.select_calendar, options: [{label: strings.all, value: 0}].concat(posts.events.map(post => {
|
||||
return {label: post.post_title, value: post.ID}
|
||||
}))}
|
||||
)
|
||||
)
|
||||
);
|
||||
},
|
||||
content: {type: 'string'},
|
||||
color: {type: 'string'}
|
||||
},
|
||||
|
||||
save: function(props) {
|
||||
return wp.element.createElement(
|
||||
"h3",
|
||||
{ style: { border: "3px solid " + props.attributes.color } },
|
||||
props.attributes.content
|
||||
);
|
||||
}
|
||||
})
|
||||
edit: function(props) {
|
||||
function updateContent(event) {
|
||||
props.setAttributes( {content: event.target.value} )
|
||||
}
|
||||
function updateColor(value) {
|
||||
props.setAttributes( {color: value.hex} )
|
||||
}
|
||||
return React.createElement(
|
||||
wp.components.Panel,
|
||||
{header: strings.event_calendar},
|
||||
React.createElement(
|
||||
wp.components.PanelBody,
|
||||
{title: strings.properties},
|
||||
React.createElement(
|
||||
wp.components.TextControl,
|
||||
{label: strings.title, type: "text", value: props.attributes.title}
|
||||
),
|
||||
React.createElement(
|
||||
wp.components.SelectControl,
|
||||
{label: strings.select_calendar, options: [{label: strings.all, value: 0}].concat(
|
||||
posts.events.map(
|
||||
post => {
|
||||
return {label: post.post_title, value: post.ID}
|
||||
}
|
||||
)
|
||||
)}
|
||||
)
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
save: function(props) {
|
||||
return wp.element.createElement(
|
||||
"h3",
|
||||
{ style: { border: "3px solid " + props.attributes.color } },
|
||||
props.attributes.content
|
||||
);
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -11,73 +11,77 @@
|
||||
|
||||
(function( $ ){
|
||||
|
||||
'use strict';
|
||||
'use strict';
|
||||
|
||||
$.fn.fitVids = function( options ) {
|
||||
var settings = {
|
||||
customSelector: null,
|
||||
ignore: null
|
||||
};
|
||||
$.fn.fitVids = function( options ) {
|
||||
var settings = {
|
||||
customSelector: null,
|
||||
ignore: null
|
||||
};
|
||||
|
||||
if(!document.getElementById('fit-vids-style')) {
|
||||
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
||||
var head = document.head || document.getElementsByTagName('head')[0];
|
||||
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
|
||||
head.appendChild(div.childNodes[1]);
|
||||
}
|
||||
if ( ! document.getElementById( 'fit-vids-style' )) {
|
||||
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
||||
var head = document.head || document.getElementsByTagName( 'head' )[0];
|
||||
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
|
||||
var div = document.createElement( "div" );
|
||||
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
|
||||
head.appendChild( div.childNodes[1] );
|
||||
}
|
||||
|
||||
if ( options ) {
|
||||
$.extend( settings, options );
|
||||
}
|
||||
if ( options ) {
|
||||
$.extend( settings, options );
|
||||
}
|
||||
|
||||
return this.each(function(){
|
||||
var selectors = [
|
||||
'iframe[src*="player.vimeo.com"]',
|
||||
'iframe[src*="youtube.com"]',
|
||||
'iframe[src*="youtube-nocookie.com"]',
|
||||
'iframe[src*="kickstarter.com"][src*="video.html"]',
|
||||
'object',
|
||||
'embed'
|
||||
];
|
||||
return this.each(
|
||||
function(){
|
||||
var selectors = [
|
||||
'iframe[src*="player.vimeo.com"]',
|
||||
'iframe[src*="youtube.com"]',
|
||||
'iframe[src*="youtube-nocookie.com"]',
|
||||
'iframe[src*="kickstarter.com"][src*="video.html"]',
|
||||
'object',
|
||||
'embed'
|
||||
];
|
||||
|
||||
if (settings.customSelector) {
|
||||
selectors.push(settings.customSelector);
|
||||
}
|
||||
if (settings.customSelector) {
|
||||
selectors.push( settings.customSelector );
|
||||
}
|
||||
|
||||
var ignoreList = '.fitvidsignore';
|
||||
var ignoreList = '.fitvidsignore';
|
||||
|
||||
if(settings.ignore) {
|
||||
ignoreList = ignoreList + ', ' + settings.ignore;
|
||||
}
|
||||
if (settings.ignore) {
|
||||
ignoreList = ignoreList + ', ' + settings.ignore;
|
||||
}
|
||||
|
||||
var $allVideos = $(this).find(selectors.join(','));
|
||||
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
|
||||
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
|
||||
var $allVideos = $( this ).find( selectors.join( ',' ) );
|
||||
$allVideos = $allVideos.not( 'object object' ); // SwfObj conflict patch
|
||||
$allVideos = $allVideos.not( ignoreList ); // Disable FitVids on this video.
|
||||
|
||||
$allVideos.each(function(){
|
||||
var $this = $(this);
|
||||
if($this.parents(ignoreList).length > 0) {
|
||||
return; // Disable FitVids on this video.
|
||||
}
|
||||
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
|
||||
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
|
||||
{
|
||||
$this.attr('height', 9);
|
||||
$this.attr('width', 16);
|
||||
}
|
||||
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
|
||||
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
|
||||
aspectRatio = height / width;
|
||||
if(!$this.attr('id')){
|
||||
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
|
||||
$this.attr('id', videoID);
|
||||
}
|
||||
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
|
||||
$this.removeAttr('height').removeAttr('width');
|
||||
});
|
||||
});
|
||||
};
|
||||
// Works with either jQuery or Zepto
|
||||
$allVideos.each(
|
||||
function(){
|
||||
var $this = $( this );
|
||||
if ($this.parents( ignoreList ).length > 0) {
|
||||
return; // Disable FitVids on this video.
|
||||
}
|
||||
if (this.tagName.toLowerCase() === 'embed' && $this.parent( 'object' ).length || $this.parent( '.fluid-width-video-wrapper' ).length) {
|
||||
return; }
|
||||
if (( ! $this.css( 'height' ) && ! $this.css( 'width' )) && (isNaN( $this.attr( 'height' ) ) || isNaN( $this.attr( 'width' ) ))) {
|
||||
$this.attr( 'height', 9 );
|
||||
$this.attr( 'width', 16 );
|
||||
}
|
||||
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr( 'height' ) && ! isNaN( parseInt( $this.attr( 'height' ), 10 ) )) ) ? parseInt( $this.attr( 'height' ), 10 ) : $this.height(),
|
||||
width = ! isNaN( parseInt( $this.attr( 'width' ), 10 ) ) ? parseInt( $this.attr( 'width' ), 10 ) : $this.width(),
|
||||
aspectRatio = height / width;
|
||||
if ( ! $this.attr( 'id' )) {
|
||||
var videoID = 'fitvid' + Math.floor( Math.random() * 999999 );
|
||||
$this.attr( 'id', videoID );
|
||||
}
|
||||
$this.wrap( '<div class="fluid-width-video-wrapper"></div>' ).parent( '.fluid-width-video-wrapper' ).css( 'padding-top', (aspectRatio * 100) + '%' );
|
||||
$this.removeAttr( 'height' ).removeAttr( 'width' );
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
};
|
||||
// Works with either jQuery or Zepto
|
||||
})( window.jQuery || window.Zepto );
|
||||
|
||||
@@ -1,119 +1,138 @@
|
||||
function sp_viewport() {
|
||||
var e = window, a = 'inner';
|
||||
if (!('innerWidth' in window )) {
|
||||
a = 'client';
|
||||
e = document.documentElement || document.body;
|
||||
}
|
||||
return { width : e[ a+'Width' ] , height : e[ a+'Height' ] };
|
||||
var e = window, a = 'inner';
|
||||
if ( ! ('innerWidth' in window )) {
|
||||
a = 'client';
|
||||
e = document.documentElement || document.body;
|
||||
}
|
||||
return { width : e[ a + 'Width' ] , height : e[ a + 'Height' ] };
|
||||
}
|
||||
|
||||
(function($) {
|
||||
|
||||
/* Header */
|
||||
if ( ! $('.sp-header').length ) {
|
||||
$('body').prepend( '<div class="sp-header sp-header-loaded"></div>' );
|
||||
if ( ! $( '.sp-header' ).length ) {
|
||||
$( 'body' ).prepend( '<div class="sp-header sp-header-loaded"></div>' );
|
||||
}
|
||||
|
||||
/* Countdown */
|
||||
$("[data-countdown]").each(function() {
|
||||
var $this = $(this);
|
||||
// Get countdown time
|
||||
var countDownDate = new Date($(this).data('countdown')).getTime();
|
||||
// Iterate every second
|
||||
var x = setInterval(function() {
|
||||
|
||||
// Get todays date and time
|
||||
var now = new Date();
|
||||
|
||||
// Convert curent date and time to UTC
|
||||
var tzDifference = now.getTimezoneOffset();
|
||||
var nowutc = new Date(now.getTime() + tzDifference * 60 * 1000);
|
||||
|
||||
// Find the distance between now and the count down date
|
||||
var distance = countDownDate - nowutc;
|
||||
if ( distance < 0 ) {
|
||||
distance = 0;
|
||||
}
|
||||
|
||||
// Time calculations for days, hours, minutes and seconds
|
||||
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
||||
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
|
||||
// Output the result
|
||||
$this.html("<span>"+(days < 10 ? '0' + days : days)+" <small>" + localized_strings.days + "</small></span> "
|
||||
+ "<span>"+('0' + hours).slice(-2)+" <small>" + localized_strings.hrs + "</small></span> "
|
||||
+ "<span>"+('0' + minutes).slice(-2)+" <small>" + localized_strings.mins + "</small></span> "
|
||||
+ "<span>"+('0' + seconds).slice(-2)+" <small>" + localized_strings.secs + "</small></span>" );
|
||||
}, 1000);
|
||||
});
|
||||
$( "[data-countdown]" ).each(
|
||||
function() {
|
||||
var $this = $( this );
|
||||
// Get countdown time
|
||||
var countDownDate = new Date( $( this ).data( 'countdown' ) ).getTime();
|
||||
// Iterate every second
|
||||
var x = setInterval(
|
||||
function() {
|
||||
|
||||
// Get todays date and time
|
||||
var now = new Date();
|
||||
|
||||
// Convert curent date and time to UTC
|
||||
var tzDifference = now.getTimezoneOffset();
|
||||
var nowutc = new Date( now.getTime() + tzDifference * 60 * 1000 );
|
||||
|
||||
// Find the distance between now and the count down date
|
||||
var distance = countDownDate - nowutc;
|
||||
if ( distance < 0 ) {
|
||||
distance = 0;
|
||||
}
|
||||
|
||||
// Time calculations for days, hours, minutes and seconds
|
||||
var days = Math.floor( distance / (1000 * 60 * 60 * 24) );
|
||||
var hours = Math.floor( (distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) );
|
||||
var minutes = Math.floor( (distance % (1000 * 60 * 60)) / (1000 * 60) );
|
||||
var seconds = Math.floor( (distance % (1000 * 60)) / 1000 );
|
||||
|
||||
// Output the result
|
||||
$this.html(
|
||||
"<span>" + (days < 10 ? '0' + days : days) + " <small>" + localized_strings.days + "</small></span> "
|
||||
+ "<span>" + ('0' + hours).slice( -2 ) + " <small>" + localized_strings.hrs + "</small></span> "
|
||||
+ "<span>" + ('0' + minutes).slice( -2 ) + " <small>" + localized_strings.mins + "</small></span> "
|
||||
+ "<span>" + ('0' + seconds).slice( -2 ) + " <small>" + localized_strings.secs + "</small></span>"
|
||||
);
|
||||
},
|
||||
1000
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
/* Scrollable Tables */
|
||||
$(".sp-scrollable-table").wrap("<div class=\"sp-scrollable-table-wrapper\"></div>");
|
||||
|
||||
$( ".sp-scrollable-table" ).wrap( "<div class=\"sp-scrollable-table-wrapper\"></div>" );
|
||||
|
||||
/* Selector Redirect */
|
||||
$(".sp-selector-redirect").change(function() {
|
||||
window.location = $(this).val();
|
||||
});
|
||||
$( ".sp-selector-redirect" ).change(
|
||||
function() {
|
||||
window.location = $( this ).val();
|
||||
}
|
||||
);
|
||||
|
||||
/* Template Tabs */
|
||||
$(".sp-tab-menu-item a").click(function() {
|
||||
$template = $(this).data("sp-tab");
|
||||
$(this).closest(".sp-tab-menu-item").addClass("sp-tab-menu-item-active").siblings(".sp-tab-menu-item").removeClass("sp-tab-menu-item-active");
|
||||
$(this).closest(".sp-tab-group").find(".sp-tab-content-"+$template).show().siblings(".sp-tab-content").hide();
|
||||
return false;
|
||||
});
|
||||
$( ".sp-tab-menu-item a" ).click(
|
||||
function() {
|
||||
$template = $( this ).data( "sp-tab" );
|
||||
$( this ).closest( ".sp-tab-menu-item" ).addClass( "sp-tab-menu-item-active" ).siblings( ".sp-tab-menu-item" ).removeClass( "sp-tab-menu-item-active" );
|
||||
$( this ).closest( ".sp-tab-group" ).find( ".sp-tab-content-" + $template ).show().siblings( ".sp-tab-content" ).hide();
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
/* API method to get paging information */
|
||||
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
|
||||
{
|
||||
return {
|
||||
"iStart": oSettings._iDisplayStart,
|
||||
"iEnd": oSettings.fnDisplayEnd(),
|
||||
"iLength": oSettings._iDisplayLength,
|
||||
"iTotal": oSettings.fnRecordsTotal(),
|
||||
"iFilteredTotal": oSettings.fnRecordsDisplay(),
|
||||
"iPage": oSettings._iDisplayLength === -1 ?
|
||||
0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
|
||||
"iTotalPages": oSettings._iDisplayLength === -1 ?
|
||||
0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
|
||||
};
|
||||
return {
|
||||
"iStart": oSettings._iDisplayStart,
|
||||
"iEnd": oSettings.fnDisplayEnd(),
|
||||
"iLength": oSettings._iDisplayLength,
|
||||
"iTotal": oSettings.fnRecordsTotal(),
|
||||
"iFilteredTotal": oSettings.fnRecordsDisplay(),
|
||||
"iPage": oSettings._iDisplayLength === -1 ?
|
||||
0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
|
||||
"iTotalPages": oSettings._iDisplayLength === -1 ?
|
||||
0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
|
||||
};
|
||||
}
|
||||
|
||||
/* Data Tables */
|
||||
$(".sp-data-table").each(function() {
|
||||
sortable = $(this).hasClass("sp-sortable-table");
|
||||
paginated = $(this).hasClass("sp-paginated-table");
|
||||
display_length = parseInt($(this).attr("data-sp-rows"));
|
||||
if ( display_length == undefined || isNaN( display_length ) ) display_length = 10;
|
||||
if ( $(this).find("tbody tr").length <= display_length ) paginated = false;
|
||||
if ( sortable || paginated ) {
|
||||
$(this).dataTable({
|
||||
"order": [],
|
||||
"autoWidth": false,
|
||||
"searching": false,
|
||||
"info": false,
|
||||
"paging": paginated,
|
||||
"lengthChange": false,
|
||||
"pagingType": "simple_numbers",
|
||||
"pageLength": display_length,
|
||||
"ordering": sortable,
|
||||
"language": {
|
||||
"aria": {
|
||||
"sortAscending": "",
|
||||
"sortDescending": ""
|
||||
},
|
||||
"paginate": {
|
||||
"previous": localized_strings.previous,
|
||||
"next": localized_strings.next,
|
||||
}
|
||||
},
|
||||
"columnDefs": [
|
||||
{ "type": "num-fmt", "targets": [ ".data-number", ".data-rank" ] },
|
||||
]
|
||||
});
|
||||
$( ".sp-data-table" ).each(
|
||||
function() {
|
||||
sortable = $( this ).hasClass( "sp-sortable-table" );
|
||||
paginated = $( this ).hasClass( "sp-paginated-table" );
|
||||
display_length = parseInt( $( this ).attr( "data-sp-rows" ) );
|
||||
if ( display_length == undefined || isNaN( display_length ) ) {
|
||||
display_length = 10;
|
||||
}
|
||||
if ( $( this ).find( "tbody tr" ).length <= display_length ) {
|
||||
paginated = false;
|
||||
}
|
||||
if ( sortable || paginated ) {
|
||||
$( this ).dataTable(
|
||||
{
|
||||
"order": [],
|
||||
"autoWidth": false,
|
||||
"searching": false,
|
||||
"info": false,
|
||||
"paging": paginated,
|
||||
"lengthChange": false,
|
||||
"pagingType": "simple_numbers",
|
||||
"pageLength": display_length,
|
||||
"ordering": sortable,
|
||||
"language": {
|
||||
"aria": {
|
||||
"sortAscending": "",
|
||||
"sortDescending": ""
|
||||
},
|
||||
"paginate": {
|
||||
"previous": localized_strings.previous,
|
||||
"next": localized_strings.next,
|
||||
}
|
||||
},
|
||||
"columnDefs": [
|
||||
{ "type": "num-fmt", "targets": [ ".data-number", ".data-rank" ] },
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
})(jQuery);
|
||||
})( jQuery );
|
||||
|
||||
Reference in New Issue
Block a user