mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
Swap to EasyMDE
Various other fixes too
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
marked.setOptions({
|
||||
breaks: true,
|
||||
})
|
||||
|
||||
function setupItemTable(items_json) {
|
||||
objectitems = JSON.parse(items_json)
|
||||
$.each(objectitems, function (key, val) {
|
||||
@@ -37,7 +33,8 @@ function updatePrices() {
|
||||
}
|
||||
|
||||
function setupMDE(selector) {
|
||||
editor = new SimpleMDE({
|
||||
editor = new EasyMDE({
|
||||
autoDownloadFontAwesome: false,
|
||||
element: $(selector)[0],
|
||||
forceSync: true,
|
||||
toolbar: ["bold", "italic", "strikethrough", "|", "unordered-list", "ordered-list", "|", "link", "|", "preview", "guide"],
|
||||
@@ -120,7 +117,7 @@ $('body').on('submit', '#item-form', function (e) {
|
||||
// update the table
|
||||
$row = $('#item-' + pk);
|
||||
$row.find('.name').html(escapeHtml(fields.name));
|
||||
$row.find('.description').html(marked(fields.description));
|
||||
$row.find('.description').html(fields.description);
|
||||
$row.find('.cost').html(parseFloat(fields.cost).toFixed(2));
|
||||
$row.find('.quantity').html(fields.quantity);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
color: $gray-100;
|
||||
}
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:focus,
|
||||
textarea:-webkit-autofill,
|
||||
textarea:-webkit-autofill:hover,
|
||||
@@ -145,7 +145,7 @@
|
||||
.editor-toolbar > a.active {
|
||||
background: $info !important;
|
||||
}
|
||||
.cm-s-paper {
|
||||
.cm-s-easymde {
|
||||
color: white;
|
||||
background-color: $darktheme;
|
||||
border-color: #bbb;
|
||||
|
||||
Reference in New Issue
Block a user