mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
ui: add view-transistions
This commit is contained in:
6 files changed
+49
-24
No files matched your search
@@ -2,7 +2,7 @@ import $ from 'jquery';
|
||||
import React from 'react';
|
||||
import { InfoDialog } from 'vj/components/dialog';
|
||||
import { NamedPage } from 'vj/misc/Page';
|
||||
import { tpl } from 'vj/utils';
|
||||
import { tpl, withTransistionCallback } from 'vj/utils';
|
||||
|
||||
export default new NamedPage('record_detail', async () => {
|
||||
if (!UiContext.socketUrl) return;
|
||||
@@ -15,13 +15,15 @@ export default new NamedPage('record_detail', async () => {
|
||||
const dd = new DiffDOM();
|
||||
sock.onmessage = (_, data) => {
|
||||
const msg = JSON.parse(data);
|
||||
const newStatus = $(msg.status_html);
|
||||
const oldStatus = $('#status');
|
||||
dd.apply(oldStatus[0], dd.diff(oldStatus[0], newStatus[0]));
|
||||
const newSummary = $(msg.summary_html);
|
||||
const oldSummary = $('#summary');
|
||||
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
|
||||
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
|
||||
withTransistionCallback(() => {
|
||||
const newStatus = $(msg.status_html);
|
||||
const oldStatus = $('#status');
|
||||
dd.apply(oldStatus[0], dd.diff(oldStatus[0], newStatus[0]));
|
||||
const newSummary = $(msg.summary_html);
|
||||
const oldSummary = $('#summary');
|
||||
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
|
||||
});
|
||||
};
|
||||
$(document).on('click', '.subtask-case', function () {
|
||||
const text = $(this).find('.message').text();
|
||||
|
||||
Reference in new issue
Block a user