Added success and error messages when change the event owner - #4309
This commit is contained in:
parent
26c606b0d5
commit
084d1a229e
|
@ -4398,6 +4398,8 @@ function events_page_general($event)
|
|||
$data[1] = $user_owner;
|
||||
}
|
||||
|
||||
$table_general->cellclass[3][1] = 'general_owner';
|
||||
|
||||
$table_general->data[] = $data;
|
||||
|
||||
$data = [];
|
||||
|
|
|
@ -475,19 +475,18 @@ function event_change_owner() {
|
|||
var meta = $("#hidden-meta").val();
|
||||
var history = $("#hidden-history").val();
|
||||
|
||||
var params = [];
|
||||
params.push("page=include/ajax/events");
|
||||
params.push("change_owner=1");
|
||||
params.push("event_id=" + event_id);
|
||||
params.push("new_owner=" + new_owner);
|
||||
params.push("meta=" + meta);
|
||||
params.push("history=" + history);
|
||||
|
||||
$("#button-owner_button").attr("disabled", "disabled");
|
||||
$("#response_loading").show();
|
||||
|
||||
jQuery.ajax({
|
||||
data: params.join("&"),
|
||||
data: {
|
||||
page: "include/ajax/events",
|
||||
change_owner: 1,
|
||||
event_id: event_id,
|
||||
new_owner: new_owner,
|
||||
meta: meta,
|
||||
history: history
|
||||
},
|
||||
type: "POST",
|
||||
url: $("#hidden-ajax_file").val(),
|
||||
async: true,
|
||||
|
@ -496,12 +495,19 @@ function event_change_owner() {
|
|||
$("#button-owner_button").removeAttr("disabled");
|
||||
$("#response_loading").hide();
|
||||
|
||||
show_event_dialog(
|
||||
event_id,
|
||||
$("#hidden-group_rep").val(),
|
||||
"responses",
|
||||
data
|
||||
);
|
||||
if (data == "owner_ok") {
|
||||
dt_events.draw(false);
|
||||
$("#notification_owner_success").show();
|
||||
console.log(new_owner);
|
||||
if (new_owner == -1) {
|
||||
new_owner = "";
|
||||
}
|
||||
$("#extended_event_general_page table td.general_owner").text(
|
||||
new_owner
|
||||
);
|
||||
} else {
|
||||
$("#notification_owner_error").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@ ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header
|
|||
margin: 0;
|
||||
margin-bottom: -1px;
|
||||
border: none;
|
||||
border-bottom: 1px solid #a9a9a9;
|
||||
}
|
||||
|
||||
ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header
|
||||
|
@ -298,9 +299,6 @@ li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab {
|
|||
li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab.ui-tabs-active.ui-state-active {
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
div.extended_event_pages.ui-tabs-panel.ui-corner-bottom.ui-widget-content {
|
||||
border-top: 1px solid #a9a9a9;
|
||||
}
|
||||
|
||||
tr.group {
|
||||
padding: 5px;
|
||||
|
|
Loading…
Reference in New Issue