mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Refactor notes for "purchase order"
This commit is contained in:
@ -239,7 +239,7 @@ function setupNotesField(element, url, options={}) {
|
||||
});
|
||||
|
||||
var toolbar_icons = [
|
||||
'preview',
|
||||
'preview', '|',
|
||||
];
|
||||
|
||||
if (editable) {
|
||||
@ -266,14 +266,14 @@ function setupNotesField(element, url, options={}) {
|
||||
shortcuts: [],
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Hide the toolbar
|
||||
$(`#${element}`).next('.EasyMDEContainer').find('.editor-toolbar').hide();
|
||||
|
||||
if (!editable) {
|
||||
// Set readonly
|
||||
mde.codemirror.setOption('readOnly', true);
|
||||
|
||||
// Hide the toolbar
|
||||
$(`#${element}`).next('.EasyMDEContainer').find('.editor-toolbar').hide();
|
||||
|
||||
|
||||
// Hide the "edit" and "save" buttons
|
||||
$('#edit-notes').hide();
|
||||
$('#save-notes').hide();
|
||||
@ -286,6 +286,9 @@ function setupNotesField(element, url, options={}) {
|
||||
$('#edit-notes').hide();
|
||||
$('#save-notes').show();
|
||||
|
||||
// Show the toolbar
|
||||
$(`#${element}`).next('.EasyMDEContainer').find('.editor-toolbar').show();
|
||||
|
||||
mde.togglePreview();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user