mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Use the summernote editor for product description (closes #288)
This commit is contained in:
@@ -521,3 +521,8 @@ $(document).on("click", ".easy-link-copy-textbox", function()
|
||||
{
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
$("textarea.wysiwyg-editor").summernote({
|
||||
minHeight: "300px",
|
||||
lang: __t("summernote_locale")
|
||||
});
|
||||
|
@@ -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));
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user