2019-06-10 22:45:03 +02:00
|
|
|
import utils from "../services/utils.js";
|
2020-01-21 20:54:00 +01:00
|
|
|
import appContext from "../services/app_context.js";
|
2019-02-14 20:56:33 +01:00
|
|
|
|
|
|
|
const $dialog = $("#note-info-dialog");
|
|
|
|
const $noteId = $("#note-info-note-id");
|
2019-04-01 21:43:45 +02:00
|
|
|
const $dateCreated = $("#note-info-date-created");
|
|
|
|
const $dateModified = $("#note-info-date-modified");
|
2019-02-14 20:56:33 +01:00
|
|
|
const $type = $("#note-info-type");
|
|
|
|
const $mime = $("#note-info-mime");
|
|
|
|
const $okButton = $("#note-info-ok-button");
|
|
|
|
|
2020-02-01 11:33:31 +01:00
|
|
|
export async function showDialog() {
|
2019-06-10 22:45:03 +02:00
|
|
|
utils.closeActiveDialog();
|
|
|
|
|
2019-02-14 20:56:33 +01:00
|
|
|
glob.activeDialog = $dialog;
|
|
|
|
|
|
|
|
$dialog.modal();
|
|
|
|
|
2020-02-01 11:33:31 +01:00
|
|
|
const activeTabContext = appContext.getActiveTabContext();
|
|
|
|
const {note} = activeTabContext;
|
|
|
|
const noteComplement = await activeTabContext.getNoteComplement();
|
2019-02-14 20:56:33 +01:00
|
|
|
|
2020-01-25 14:37:12 +01:00
|
|
|
$noteId.text(note.noteId);
|
2020-02-01 11:15:58 +01:00
|
|
|
$dateCreated.text(noteComplement.dateCreated);
|
|
|
|
$dateModified.text(noteComplement.dateModified);
|
2020-01-25 14:37:12 +01:00
|
|
|
$type.text(note.type);
|
|
|
|
$mime.text(note.mime);
|
2019-02-14 20:56:33 +01:00
|
|
|
}
|
|
|
|
|
2019-11-09 17:39:48 +01:00
|
|
|
$okButton.on('click', () => $dialog.modal('hide'));
|