WIP: event dashboard responses
This commit is contained in:
parent
6dc775649d
commit
ba6a56b9fc
|
@ -1269,8 +1269,12 @@ if ($change_status) {
|
|||
);
|
||||
|
||||
if ($return !== false) {
|
||||
$event_st = events_display_status($new_status);
|
||||
|
||||
echo json_encode(
|
||||
[
|
||||
'status_title' => $event_st['title'],
|
||||
'status_img' => html_print_image($event_st['img'], true, false, true),
|
||||
'status' => 'status_ok',
|
||||
'user' => db_get_value(
|
||||
'fullname',
|
||||
|
|
|
@ -5008,6 +5008,8 @@ function events_page_general($event)
|
|||
$event_st = events_display_status($event['estado']);
|
||||
|
||||
$data = [];
|
||||
|
||||
$table_general->rowid[7] = 'general_status';
|
||||
$data[0] = __('Status');
|
||||
$data[1] = $event_st['title'];
|
||||
$data[2] = html_print_image($event_st['img'], true);
|
||||
|
|
|
@ -651,7 +651,7 @@ function initialiceLayout(data) {
|
|||
url: data.url,
|
||||
data: {
|
||||
page: data.page,
|
||||
method: "drawWidget",
|
||||
method: "drawCell",
|
||||
dashboardId: data.dashboardId,
|
||||
cellId: cellId,
|
||||
newWidth: newWidth,
|
||||
|
@ -1329,6 +1329,29 @@ function dashboardShowEventDialog(settings) {
|
|||
close: function() {
|
||||
//$("#refrcounter").countdown("resume");
|
||||
//$("div.vc-countdown").countdown("resume");
|
||||
debugger;
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: settings.ajaxUrl,
|
||||
data: {
|
||||
page: "operation/dashboard/dashboard",
|
||||
method: "drawWidget",
|
||||
dashboardId: settings.dashboardId,
|
||||
cellId: settings.cellId,
|
||||
widgetId: settings.widgetId,
|
||||
redraw: 1
|
||||
},
|
||||
success: function(dataWidget) {
|
||||
// Widget empty and reload.
|
||||
$("#widget-" + settings.cellId + " .content-widget").empty();
|
||||
$("#widget-" + settings.cellId + " .content-widget").append(
|
||||
dataWidget
|
||||
);
|
||||
},
|
||||
error: function(error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
|
|
|
@ -504,7 +504,7 @@ function event_change_status(event_ids) {
|
|||
if ($("#notification_status_error").length) {
|
||||
$("#notification_status_error").hide();
|
||||
}
|
||||
|
||||
debugger;
|
||||
if (data.status == "status_ok") {
|
||||
if (typeof dt_events !== "undefined") {
|
||||
dt_events.draw(false);
|
||||
|
@ -519,6 +519,13 @@ function event_change_status(event_ids) {
|
|||
"N/A"
|
||||
);
|
||||
}
|
||||
|
||||
$("#general_status")
|
||||
.find(".general_status")
|
||||
.text(data.status_title);
|
||||
$("#general_status")
|
||||
.find("img")
|
||||
.attr("src", data.status_img);
|
||||
} else {
|
||||
$("#notification_status_error").show();
|
||||
}
|
||||
|
|
|
@ -728,6 +728,9 @@ class EventsListWidget extends Widget
|
|||
false
|
||||
),
|
||||
'result' => false,
|
||||
'dashboardId' => $this->dashboardId,
|
||||
'widgetId' => $this->widgetId,
|
||||
'cellId' => $this->cellId,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue