* an AJAX call that goes through the WorPress AJAX Handler.
*
*/
-class GlmMembersAdmin_ajax_eventsCalMonthAJAX extends GlmDataEvents
+class GlmMembersAdmin_ajax_eventsCalMonthAJAX extends GlmDataEventsTimes
{
/**
$where = '';
- $where .= "T.status = " . $this->config['status_numb']['Active'] . "
- AND T.id IN (
+ $where .= "T.active = 1
+ AND T.event IN (
SELECT event
FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times AS ET
WHERE active
// var_dump($events);
foreach ($events as $e=>$val){
// $times[] = ($val['times']);
- $event_data[$e]['title'] = $val['name'];
+ $event_data[$e]['title'] = $val['event_name'];
$event_data[$e]['url'] = GLM_MEMBERS_EVENTS_SITE_BASE_URL . "event-detail/" . $val['name_slug'] . "/";
- $start = date('Y-m-d h:i:s', strtotime($val['starting_date']));
- $last = date('Y-m-d h:i:s', strtotime($val['ending_date']));
+ $start = date('Y-m-d h:i:s', strtotime($val['start_time']['datetime']));
+ $last = date('Y-m-d h:i:s', strtotime($val['end_time']['datetime']));
- $all_day = $val['all_day'];
+ $all_day = $val['all_day']['value'];
$event_data[$e]['all_day'] = ($all_day === "0" ? false : true);
$event_data[$e]['start'] = ($start);
$return = array(
'status' => false, // Assume nothing works
'events' => $event_data, // Where our events list will go
- 'message' => '',
+ 'message' => $to,
'times' => ''
);
var event_search = $(".glm-search-icon");
var main_content = $("#main-content");
- calendar.hide();
+// calendar.hide();
// event_search.on("click", function (){
//
data: dat,
cache: false,
success: function (response){
-// console.log(response);
+ console.log(response);
var buildingEvents = [];
var events_obj = jQuery.parseJSON(response);
var events = events_obj.events;
+// console.log(events);
- buildingEvents = $.map(events, function(i, val) {
+ buildingEvents = $.map(events, function(i, val) {
+ console.log(i.title);
+
return {
title: i.title,
start: i.start,
editable: true,
lazyFetching: true,
eventClick : function (event){
- location.href = event.url;
+// location.href = event.url;
},
- nextDayThreshold: '00:00:00',
eventLimit: true,
views: {
month: {