Use the summernote editor for product description (closes #288)

This commit is contained in:
Bernd Bestel
2019-08-15 14:35:28 +02:00
parent 257dd644aa
commit f9036f0248
9 changed files with 20 additions and 27 deletions

View File

@@ -521,3 +521,8 @@ $(document).on("click", ".easy-link-copy-textbox", function()
{
$(this).select();
});
$("textarea.wysiwyg-editor").summernote({
minHeight: "300px",
lang: __t("summernote_locale")
});

View File

@@ -8,7 +8,7 @@ Grocy.Components.ProductCard.Refresh = function(productId)
var stockAmount = productDetails.stock_amount || '0';
var stockAmountOpened = productDetails.stock_amount_opened || '0';
$('#productcard-product-name').text(productDetails.product.name);
$('#productcard-product-description').text(productDetails.product.description);
$('#productcard-product-description').html(productDetails.product.description);
$('#productcard-product-stock-amount').text(stockAmount);
$('#productcard-product-stock-qu-name').text(__n(stockAmount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural));
$('#productcard-product-last-purchased').text((productDetails.last_purchased || __t('never')).substring(0, 10));

View File

@@ -132,12 +132,6 @@ $('#delete-current-instruction-manual-button').on('click', function (e)
$("#delete-current-instruction-manual-on-save-hint").removeClass("d-none");
$("#delete-current-instruction-manual-button").addClass("disabled");
});
$('#description').summernote({
minHeight: '300px',
lang: __t('summernote_locale')
});
ResizeResponsiveEmbeds();
Grocy.Components.UserfieldsForm.Load();

View File

@@ -344,9 +344,4 @@ $('#delete-current-recipe-picture-button').on('click', function (e)
$("#delete-current-recipe-picture-button").addClass("disabled");
});
$('#description').summernote({
minHeight: '300px',
lang: __t('summernote_locale')
});
Grocy.Components.UserfieldsForm.Load();