2019-02-14 20:56:33 +01:00
|
|
|
import noteDetailService from '../services/note_detail.js';
|
2019-06-10 22:45:03 +02:00
|
|
|
import utils from "../services/utils.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");
|
|
|
|
|
2019-08-20 21:40:47 +02:00
|
|
|
export 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();
|
|
|
|
|
2019-10-20 12:29:34 +02:00
|
|
|
const activeNote = noteDetailService.getActiveTabNote();
|
2019-02-14 20:56:33 +01:00
|
|
|
|
2019-03-14 20:21:27 +01:00
|
|
|
$noteId.text(activeNote.noteId);
|
2019-04-01 21:43:45 +02:00
|
|
|
$dateCreated.text(activeNote.dateCreated);
|
|
|
|
$dateModified.text(activeNote.dateModified);
|
2019-03-14 20:21:27 +01:00
|
|
|
$type.text(activeNote.type);
|
|
|
|
$mime.text(activeNote.mime);
|
2019-02-14 20:56:33 +01:00
|
|
|
}
|
|
|
|
|
2019-11-09 17:39:48 +01:00
|
|
|
$okButton.on('click', () => $dialog.modal('hide'));
|