mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: record_detail: only apply patch for updates
This commit is contained in:
1 file changed
+4
@@ -31,16 +31,20 @@ export default new NamedPage('record_detail', async () => {
|
|||||||
const msg = JSON.parse(data);
|
const msg = JSON.parse(data);
|
||||||
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
|
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
|
||||||
withTransitionCallback(() => {
|
withTransitionCallback(() => {
|
||||||
|
if (msg.status_html) {
|
||||||
const newStatus = $(msg.status_html);
|
const newStatus = $(msg.status_html);
|
||||||
const oldStatus = $('#status');
|
const oldStatus = $('#status');
|
||||||
oldStatus.trigger('vjContentRemove');
|
oldStatus.trigger('vjContentRemove');
|
||||||
dd.apply(oldStatus[0], dd.diff(oldStatus[0], newStatus[0]));
|
dd.apply(oldStatus[0], dd.diff(oldStatus[0], newStatus[0]));
|
||||||
$('#status').trigger('vjContentNew');
|
$('#status').trigger('vjContentNew');
|
||||||
|
}
|
||||||
|
if (msg.summary_html) {
|
||||||
const newSummary = $(msg.summary_html);
|
const newSummary = $(msg.summary_html);
|
||||||
const oldSummary = $('#summary');
|
const oldSummary = $('#summary');
|
||||||
oldSummary.trigger('vjContentRemove');
|
oldSummary.trigger('vjContentRemove');
|
||||||
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
|
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
|
||||||
$('#summary').trigger('vjContentNew');
|
$('#summary').trigger('vjContentNew');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user