forked from lino/radar-wp
WIP New v2 plugin with widget and shortcode, and more WP friendly markup.
This commit is contained in:
parent
5fd32fb63b
commit
649f84ad8c
557 changed files with 648 additions and 98567 deletions
48
assets/squat-radar.css
Normal file
48
assets/squat-radar.css
Normal file
|
@ -0,0 +1,48 @@
|
|||
.Squat_radar li.squat-li {
|
||||
margin-bottom: 1em;
|
||||
padding-bottom: 1em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
text-align:left;
|
||||
}
|
||||
.Squat_radar li.squat-li::after {
|
||||
content: '';
|
||||
display: block;
|
||||
float: none;
|
||||
clear: both;
|
||||
}
|
||||
.Squat_radar li.squat-li:last-child {
|
||||
border-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.Squat_radar h3.squat-h3 {
|
||||
line-height: 1;
|
||||
font-size: 1.4em;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
.Squat_radar p.squat-p {
|
||||
display: none;
|
||||
text-align:left;
|
||||
margin-bottom: 0.6em;
|
||||
}
|
||||
|
||||
.Squat_radar span.squat-tijd {
|
||||
font-weight: bold;
|
||||
/* display: block;*/
|
||||
}
|
||||
|
||||
.Squat_radar a.squat-link {
|
||||
padding: .4180469716em 1.11575em;
|
||||
margin-left: 10px;
|
||||
/* margin-bottom: 10px;*/
|
||||
float: right;
|
||||
}
|
||||
.Squat_radar a.squat-link:hover {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.Squat_radar a.squat-link:focus {
|
||||
outline: 0;
|
||||
}
|
40
assets/squat-radar.js
Normal file
40
assets/squat-radar.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
jQuery(function($){
|
||||
|
||||
$(".squat-radar-widget.squat-radar-ajax").each(function(index, widget) {
|
||||
$.ajax({
|
||||
url: squat_radar_widget.ajaxurl,
|
||||
context: document.body,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: "squat_radar_events",
|
||||
instance: window[widget.id],
|
||||
},
|
||||
success: function(result){
|
||||
|
||||
if (result.is_error) {
|
||||
if (result.error) {
|
||||
$(widget).append(
|
||||
'<p>Error: ' + result.error.code + ' - ' + result.error.message + '</p>'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$(widget).append(result.html);
|
||||
// $(".squat-li a").on('click', function(e){
|
||||
|
||||
// if (this.hasAttribute("data-link")) {
|
||||
// e.preventDefault();
|
||||
// $(this).parent().find('p').show();
|
||||
// this.textContent = this.getAttribute('data-nog-meer');
|
||||
// this.setAttribute('href', this.getAttribute('data-link'));
|
||||
// this.removeAttribute('data-link');
|
||||
// }
|
||||
//
|
||||
// });
|
||||
}
|
||||
},
|
||||
error: function(res){
|
||||
console.log('AJAX error', res);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue