mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-05 23:17:33 +08:00
20 lines
511 B
JavaScript
20 lines
511 B
JavaScript
|
$("#content-wrapper")
|
||
|
.on(
|
||
|
"ajax:success",
|
||
|
function(e, data) {
|
||
|
if ($(e.target).is("[data-role='edit-step-form'], [data-role='new-step-form']")) {
|
||
|
// Get the updated_at URL
|
||
|
var url = $("[data-role='updated-at-label-url']").attr("data-url");
|
||
|
|
||
|
// Fetch new updated at label
|
||
|
$.ajax({
|
||
|
url: url,
|
||
|
type: "GET",
|
||
|
dataType: "json",
|
||
|
success: function (data2) {
|
||
|
$("[data-role='updated-at-refresh']").html(data2.html);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
);
|