Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Moved clearMedia function to admin theme js

givanz8b5f80fd1502
diff --git a/public/js/admin/functions.js b/public/js/admin/functions.js
index d984034..f109acd 100644
--- a/public/js/admin/functions.js
+++ b/public/js/admin/functions.js
@@ -44,13 +44,7 @@ function removeRow(element, elementName = false) {
return row.remove();
}
-
-function clearMedia(id = "featured-image") {
- document.getElementById(id + "-input").value = "";
- document.getElementById(id + "-thumb").setAttribute("src","img/placeholder.svg");
-}
-
-const slugify = (str) => {
+function slugify(str) {
if (str) {
return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '') // Remove accents
.replace(/([^\w]+|\s+)/g, '-') // Replace space and other characters by hyphen