Skip to content

armgit / Vvveb

Public Imported from GitHub
0

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

VvvebJs updates

givanzbb85b7db0fa5
diff --git a/public/js/vvvebjs/components-common.js b/public/js/vvvebjs/components-common.js
index 13cbb71..44dd4b2 100755
--- a/public/js/vvvebjs/components-common.js
+++ b/public/js/vvvebjs/components-common.js
@@ -937,7 +937,7 @@ Vvveb.Components.extend("_base", "_base", {
section: style_section,
htmlAttr: "style",
col:6,
- inline:true,
+ inline:false,
inputtype: SelectInput,
data: {
options: [{
@@ -961,7 +961,7 @@ Vvveb.Components.extend("_base", "_base", {
section: style_section,
htmlAttr: "style",
col:6,
- inline:true,
+ inline:false,
inputtype: SelectInput,
data: {
options: [{
diff --git a/public/js/vvvebjs/components-elements.js b/public/js/vvvebjs/components-elements.js
index 85353b7..b68d0fc 100755
--- a/public/js/vvvebjs/components-elements.js
+++ b/public/js/vvvebjs/components-elements.js
@@ -16,6 +16,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
+ * https://github.com/givanz/Vvveb
*/
Vvveb.ComponentsGroup['Elements'] = [
@@ -24,7 +25,6 @@ Vvveb.ComponentsGroup['Elements'] = [
"elements/carousel",
"elements/gallery",
"elements/slider",
-//"elements/logo",
"elements/tabs",
"elements/accordion",
"elements/flip-box",
@@ -424,37 +424,37 @@ Vvveb.Components.add("elements/gallery", {
html: `
<div class="gallery masonry has-shadow" data-component-gallery>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/1.jpg">
</a>
</div>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/2.jpg">
</a>
</div>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/3.jpg">
</a>
</div>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/4.jpg">
</a>
</div>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/5.jpg">
</a>
</div>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/6.jpg">
</a>
</div>
<div class="item">
- <a>
+ <a href="#">
<img src="../../media/posts/7.jpg">
</a>
</div>
@@ -471,8 +471,8 @@ Vvveb.Components.add("elements/gallery", {
off: "flex"
},
setGroup: group => {
- document.querySelectorAll(".mb-3[data-group]").forEach(el => el.style.display = "none");
- document.querySelector('.mb-3[data-group="'+ group + '"]').style.display = "";
+ document.querySelectorAll(".mb-2[data-group]").forEach(el => el.style.display = "none");
+ document.querySelector('.mb-2[data-group="'+ group + '"]').style.display = "";
},
onChange : function(node, value, input) {
this.setGroup(value);
@@ -553,7 +553,7 @@ Vvveb.Components.add("elements/gallery", {
inputtype: ButtonInput,
data: {text:"Add image", icon:"la la-plus"},
onChange: function(node) {
- node.append(generateElements('<div class="item"><a><img src="../../media/posts/1.jpg"></a></div>')[0]);
+ node.append(generateElements('<div class="item"><a href="#"><img src="../../media/posts/1.jpg"></a></div>')[0]);
//render component properties again to include the new image
//Vvveb.Components.render("ellements/gallery");
@@ -563,7 +563,7 @@ Vvveb.Components.add("elements/gallery", {
}],
init(node) {
- document.querySelectorAll(".mb-3[data-group]").forEach(el => el.style.display = "none");
+ document.querySelectorAll(".mb-2[data-group]").forEach(el => el.style.display = "none");
let source = "flex";
if (node.classList.contains("masonry")) {
@@ -572,7 +572,7 @@ Vvveb.Components.add("elements/gallery", {
source = "flex";
}
- document.querySelector('.mb-3[data-group="'+ source + '"]').style.display = "";
+ document.querySelector('.mb-2[data-group="'+ source + '"]').style.display = "";
}
});
diff --git a/public/js/vvvebjs/components-html.js b/public/js/vvvebjs/components-html.js
index 9f7b6ea..662a790 100755
--- a/public/js/vvvebjs/components-html.js
+++ b/public/js/vvvebjs/components-html.js
@@ -212,7 +212,7 @@ Vvveb.Components.extend("_base", "html/image", {
className: "form-switch"
},
setGroup: value => {
- let group = document.querySelectorAll('.mb-3[data-group="link"]');
+ let group = document.querySelectorAll('.mb-2[data-group="link"]');
if (group.length) {
group.forEach(el => {
if (value) {
@@ -248,7 +248,7 @@ Vvveb.Components.extend("_base", "html/image", {
)),
init(node) {
- let group = document.querySelectorAll('.mb-3[data-group="link"]');
+ let group = document.querySelectorAll('.mb-2[data-group="link"]');
if (group.length) {
group.forEach(el => {
if (value) {
diff --git a/public/js/vvvebjs/components/content/archives.js b/public/js/vvvebjs/components/content/archives.js
index de8276b..d827039 100755
--- a/public/js/vvvebjs/components/content/archives.js
+++ b/public/js/vvvebjs/components/content/archives.js
@@ -78,8 +78,8 @@ class ArchivesComponent extends ServerComponent{
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -102,13 +102,13 @@ class ArchivesComponent extends ServerComponent{
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor/autocomplete&action=archives",
+ url: window.location.pathname + "?module=editor/autocomplete&action=archives",
},
}];
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -117,7 +117,7 @@ class ArchivesComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/calendar.js b/public/js/vvvebjs/components/content/calendar.js
index 6e014b7..ab9ddec 100755
--- a/public/js/vvvebjs/components/content/calendar.js
+++ b/public/js/vvvebjs/components/content/calendar.js
@@ -60,8 +60,8 @@ class CalendarComponent extends ServerComponent{
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -84,13 +84,13 @@ class CalendarComponent extends ServerComponent{
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor/autocomplete&action=calendar",
+ url: window.location.pathname + "?module=editor/autocomplete&action=calendar",
},
}];
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -99,7 +99,7 @@ class CalendarComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/categories.js b/public/js/vvvebjs/components/content/categories.js
index ef1ef26..e1575bd 100755
--- a/public/js/vvvebjs/components/content/categories.js
+++ b/public/js/vvvebjs/components/content/categories.js
@@ -21,8 +21,7 @@
import {ServerComponent} from '../server-component.js';
let template = `
-<div class="card categories-widget" data-v-component-content-categories data-v-type="categories">
- <div data-v-if="count > 0" class=" ">
+<div class="card categories-widget" data-v-categories data-v-type="categories">
<h6 class="card-header">Categories</h6>
<div class="card-body">
<ul data-v-cats>
@@ -54,8 +53,7 @@ let template = `
<a href="/cat/category-1" data-v-cat-url data-v-cat-name>category 1</a>
</li>
</ul>
- </div>
- </div>
+ </div>
</div>
`;
@@ -65,7 +63,7 @@ class CategoriesComponent extends ServerComponent{
super();
this.name = "Categories";
- this.attributes = ["data-v-component-content-categories"],
+ this.attributes = ["data-v-component-categories"],
this.image ="icons/categories.svg";
this.html = template;
@@ -94,8 +92,8 @@ class CategoriesComponent extends ServerComponent{
}],
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -118,14 +116,14 @@ class CategoriesComponent extends ServerComponent{
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor/autocomplete&action=categories",
+ url: window.location.pathname + "?module=editor/autocomplete&action=categories",
},
}];
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -134,7 +132,7 @@ class CategoriesComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/comments.js b/public/js/vvvebjs/components/content/comments.js
index ff2ee9e..b87861c 100755
--- a/public/js/vvvebjs/components/content/comments.js
+++ b/public/js/vvvebjs/components/content/comments.js
@@ -141,8 +141,8 @@ class CommentsComponent extends ServerComponent{
}],
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -172,7 +172,7 @@ class CommentsComponent extends ServerComponent{
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -181,7 +181,7 @@ class CommentsComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/currency.js b/public/js/vvvebjs/components/content/currency.js
index aaafeb5..2eee6f4 100755
--- a/public/js/vvvebjs/components/content/currency.js
+++ b/public/js/vvvebjs/components/content/currency.js
@@ -105,7 +105,7 @@ class CurrencyComponent extends ServerComponent{
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -114,7 +114,7 @@ class CurrencyComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/language.js b/public/js/vvvebjs/components/content/language.js
index c02b6ed..0aeeb2f 100755
--- a/public/js/vvvebjs/components/content/language.js
+++ b/public/js/vvvebjs/components/content/language.js
@@ -97,7 +97,7 @@ class LanguageComponent extends ServerComponent{
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -106,7 +106,7 @@ class LanguageComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/posts.js b/public/js/vvvebjs/components/content/posts.js
index 63b6a87..668909d 100755
--- a/public/js/vvvebjs/components/content/posts.js
+++ b/public/js/vvvebjs/components/content/posts.js
@@ -168,8 +168,8 @@ class PostsComponent extends ServerComponent{
}],
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -307,7 +307,7 @@ class PostsComponent extends ServerComponent{
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -316,7 +316,7 @@ class PostsComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/recentComments.js b/public/js/vvvebjs/components/content/recentComments.js
index c79b2ad..d03fbc8 100755
--- a/public/js/vvvebjs/components/content/recentComments.js
+++ b/public/js/vvvebjs/components/content/recentComments.js
@@ -56,8 +56,8 @@ class RecentCommentsComponent extends ServerComponent{
}],
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -80,14 +80,14 @@ class RecentCommentsComponent extends ServerComponent{
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor/autocomplete&action=recentComments",
+ url: window.location.pathname + "?module=editor/autocomplete&action=recentComments",
},
}];
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -96,7 +96,7 @@ class RecentCommentsComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/recentPosts.js b/public/js/vvvebjs/components/content/recentPosts.js
index d326d0c..ea03fd4 100755
--- a/public/js/vvvebjs/components/content/recentPosts.js
+++ b/public/js/vvvebjs/components/content/recentPosts.js
@@ -56,8 +56,8 @@ class RecentPostsComponent extends ServerComponent{
}],
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -80,14 +80,14 @@ class RecentPostsComponent extends ServerComponent{
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor/autocomplete&action=posts",
+ url: window.location.pathname + "?module=editor/autocomplete&action=posts",
},
}];
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -96,7 +96,7 @@ class RecentPostsComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/search.js b/public/js/vvvebjs/components/content/search.js
index bc947c5..6716fff 100755
--- a/public/js/vvvebjs/components/content/search.js
+++ b/public/js/vvvebjs/components/content/search.js
@@ -79,7 +79,7 @@ class SearchComponent extends ServerComponent{
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -88,7 +88,7 @@ class SearchComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/tags.js b/public/js/vvvebjs/components/content/tags.js
index 51543e7..1c6a975 100755
--- a/public/js/vvvebjs/components/content/tags.js
+++ b/public/js/vvvebjs/components/content/tags.js
@@ -80,8 +80,8 @@ class TagsComponent extends ServerComponent{
}],
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -104,14 +104,14 @@ class TagsComponent extends ServerComponent{
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor/autocomplete&action=tags",
+ url: window.location.pathname + "?module=editor/autocomplete&action=tags",
},
}];
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -120,7 +120,7 @@ class TagsComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/content/user.js b/public/js/vvvebjs/components/content/user.js
index be98419..2d7543f 100755
--- a/public/js/vvvebjs/components/content/user.js
+++ b/public/js/vvvebjs/components/content/user.js
@@ -149,7 +149,7 @@ class UserComponent extends ServerComponent{
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -158,7 +158,7 @@ class UserComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/cart.js b/public/js/vvvebjs/components/ecommerce/cart.js
index 656e62d..b9fde34 100755
--- a/public/js/vvvebjs/components/ecommerce/cart.js
+++ b/public/js/vvvebjs/components/ecommerce/cart.js
@@ -165,7 +165,7 @@ let template =
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -174,7 +174,7 @@ let template =
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/categories.js b/public/js/vvvebjs/components/ecommerce/categories.js
index dd44a42..4077435 100755
--- a/public/js/vvvebjs/components/ecommerce/categories.js
+++ b/public/js/vvvebjs/components/ecommerce/categories.js
@@ -86,7 +86,7 @@ class CategoriesComponent {
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -95,7 +95,7 @@ class CategoriesComponent {
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/checkout.js b/public/js/vvvebjs/components/ecommerce/checkout.js
index bbe03db..36a20bf 100755
--- a/public/js/vvvebjs/components/ecommerce/checkout.js
+++ b/public/js/vvvebjs/components/ecommerce/checkout.js
@@ -442,7 +442,7 @@ Place order <i class="la la-arrow-right"></i>
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -451,7 +451,7 @@ Place order <i class="la la-arrow-right"></i>
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/filters.js b/public/js/vvvebjs/components/ecommerce/filters.js
index 021e1eb..afa41e1 100755
--- a/public/js/vvvebjs/components/ecommerce/filters.js
+++ b/public/js/vvvebjs/components/ecommerce/filters.js
@@ -92,8 +92,8 @@ class FiltersComponent {
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
@@ -119,7 +119,7 @@ class FiltersComponent {
col:12,
inputtype: AutocompleteList,
data: {
- url: "/admin/?module=editor&action=filtersAutocomplete",
+ url: window.location.pathname + "?module=editor&action=filtersAutocomplete",
},
},{
name: "Nr. of filters",
@@ -188,7 +188,7 @@ class FiltersComponent {
col:12,
inputtype: TagsInput,
data: {
- url: "/admin/?module=editor&action=filtersAutocomplete",
+ url: window.location.pathname + "?module=editor&action=filtersAutocomplete",
},
},{
@@ -200,7 +200,7 @@ class FiltersComponent {
col:12,
inputtype: TagsInput,
data: {
- url: "/admin/?module=editor&action=filtersAutocomplete",
+ url: window.location.pathname + "?module=editor&action=filtersAutocomplete",
}
},{
name: "Manufacturer 2",
@@ -211,14 +211,14 @@ class FiltersComponent {
col:12,
inputtype: TagsInput,
data: {
- url: "/admin/?module=editor&action=filtersAutocomplete",
+ url: window.location.pathname + "?module=editor&action=filtersAutocomplete",
},
}];
}
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -227,7 +227,7 @@ class FiltersComponent {
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/index.js b/public/js/vvvebjs/components/ecommerce/index.js
index ee124ef..7d31559 100755
--- a/public/js/vvvebjs/components/ecommerce/index.js
+++ b/public/js/vvvebjs/components/ecommerce/index.js
@@ -42,7 +42,7 @@ Vvveb.Components.add("ecommerce/filters", filtersComponent);
Vvveb.ComponentsGroup['Ecommerce'] = ["ecommerce/products",
"ecommerce/product",
- "ecommerce/categories",
+// "ecommerce/categories",
"ecommerce/manufacturers",
"ecommerce/vendors",
"ecommerce/search",
@@ -51,6 +51,5 @@ Vvveb.ComponentsGroup['Ecommerce'] = ["ecommerce/products",
"ecommerce/cart",
"ecommerce/checkout",
"ecommerce/filters",
- "ecommerce/product",
- "ecommerce/slider"
+// "ecommerce/slider"
];
diff --git a/public/js/vvvebjs/components/ecommerce/manufacturers.js b/public/js/vvvebjs/components/ecommerce/manufacturers.js
index 5b9213f..cd1e324 100755
--- a/public/js/vvvebjs/components/ecommerce/manufacturers.js
+++ b/public/js/vvvebjs/components/ecommerce/manufacturers.js
@@ -45,7 +45,7 @@ class ManufacturersComponent {
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -54,7 +54,7 @@ class ManufacturersComponent {
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/productGallery.js b/public/js/vvvebjs/components/ecommerce/productGallery.js
index 773d96f..8947279 100755
--- a/public/js/vvvebjs/components/ecommerce/productGallery.js
+++ b/public/js/vvvebjs/components/ecommerce/productGallery.js
@@ -36,7 +36,7 @@ class ProductGalleryComponent {
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -45,7 +45,7 @@ class ProductGalleryComponent {
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/products.js b/public/js/vvvebjs/components/ecommerce/products.js
index f4c7c7f..9afb209 100755
--- a/public/js/vvvebjs/components/ecommerce/products.js
+++ b/public/js/vvvebjs/components/ecommerce/products.js
@@ -113,8 +113,8 @@ class ProductsComponent extends ServerComponent{
},
setGroup: group => {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
- document.querySelectorAll('.mb-3[data-group="'+ group + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="'+ group + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
//return element;
@@ -251,7 +251,7 @@ class ProductsComponent extends ServerComponent{
}
init(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -260,7 +260,7 @@ class ProductsComponent extends ServerComponent{
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/components/ecommerce/vendors.js b/public/js/vvvebjs/components/ecommerce/vendors.js
index 49c2216..ad7ee06 100755
--- a/public/js/vvvebjs/components/ecommerce/vendors.js
+++ b/public/js/vvvebjs/components/ecommerce/vendors.js
@@ -45,7 +45,7 @@ class VendorsComponent {
init(node)
{
- document.querySelectorAll('.mb-3[data-group]').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group]').forEach((el, i) => {
el.classList.add("d-none");
});
@@ -54,7 +54,7 @@ class VendorsComponent {
source = "automatic";
}
- document.querySelectorAll('.mb-3[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + source + '"]').forEach(e => e.classList.remove("d-none"));
}
}
diff --git a/public/js/vvvebjs/inputs.js b/public/js/vvvebjs/inputs.js
index fd56b67..ec6d0cf 100755
--- a/public/js/vvvebjs/inputs.js
+++ b/public/js/vvvebjs/inputs.js
@@ -822,6 +822,12 @@ let AutocompleteInput = { ...Input, ...{
return input.onChange.call(this, event, node, input);
},
+ setValue: function(value) {
+ if (this.element && value) {
+ let input = this.element.querySelectorAll('input').forEach(e => e.value = value);
+ }
+ },
+
init: function(data) {
this.element = this.render("textinput", data);
@@ -845,13 +851,8 @@ let AutocompleteList = { ...Input, ...{
},
setValue: function(value) {
- if (this.element[0] && value) {
- let input = this.element[0].querySelector('input');
-
- if (input) {
- input.dataset.autocompleteList.setValue(value);
-
- }
+ if (this.element && value) {
+ let input = this.element.querySelectorAll('input').forEach(e => e.value = value);
}
},
diff --git a/public/js/vvvebjs/resources.js b/public/js/vvvebjs/resources.js
index 4fed51a..8c6723f 100755
--- a/public/js/vvvebjs/resources.js
+++ b/public/js/vvvebjs/resources.js
@@ -1,3 +1,24 @@
+/**
+ * Vvveb
+ *
+ * Copyright (C) 2021 Ziadin Givan
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * https://github.com/givanz/Vvveb
+ */
+
V = {};
V.Resources = {};
@@ -7,19 +28,19 @@ V.Resources.Icons =
<path d="M 30.335938 12.546875 L 20.164063 11.472656 L 16 2.132813 L 11.835938 11.472656 L 1.664063 12.546875 L 9.261719 19.394531 L 7.140625 29.398438 L 16 24.289063 L 24.859375 29.398438 L 22.738281 19.394531 Z"/>
</svg>`,
text: "Star"
-}, {
+},{
value: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><path d="M 5 5 L 5 11 L 24 11 L 24 5 L 5 5 z M 7 7 L 22 7 L 22 9 L 7 9 L 7 7 z M 9 13 L 9 19 L 28 19 L 28 13 L 9 13 z M 11 15 L 26 15 L 26 17 L 11 17 L 11 15 z M 5 21 L 5 27 L 24 27 L 24 21 L 5 21 z M 7 23 L 22 23 L 22 25 L 7 25 L 7 23 z"/></svg>`,
text: "Sections"
-}, {
+},{
value: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><path d="M 5 5 L 5 11 L 24 11 L 24 5 L 5 5 z M 7 7 L 22 7 L 22 9 L 7 9 L 7 7 z M 9 13 L 9 19 L 28 19 L 28 13 L 9 13 z M 11 15 L 26 15 L 26 17 L 11 17 L 11 15 z M 5 21 L 5 27 L 24 27 L 24 21 L 5 21 z M 7 23 L 22 23 L 22 25 L 7 25 L 7 23 z"/></svg>`,
text: "Sections"
-}, {
+},{
value: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><path d="M 5 5 L 5 11 L 24 11 L 24 5 L 5 5 z M 7 7 L 22 7 L 22 9 L 7 9 L 7 7 z M 9 13 L 9 19 L 28 19 L 28 13 L 9 13 z M 11 15 L 26 15 L 26 17 L 11 17 L 11 15 z M 5 21 L 5 27 L 24 27 L 24 21 L 5 21 z M 7 23 L 22 23 L 22 25 L 7 25 L 7 23 z"/></svg>`,
text: "Sections"
-}, {
+},{
value: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32"><path d="M 5 5 L 5 11 L 24 11 L 24 5 L 5 5 z M 7 7 L 22 7 L 22 9 L 7 9 L 7 7 z M 9 13 L 9 19 L 28 19 L 28 13 L 9 13 z M 11 15 L 26 15 L 26 17 L 11 17 L 11 15 z M 5 21 L 5 27 L 24 27 L 24 21 L 5 21 z M 7 23 L 22 23 L 22 25 L 7 25 L 7 23 z"/></svg>`,
text: "Sections"
-}, {
+},{
value: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="32" height="32"><g fill="#fff" fill-rule="evenodd" stroke="#000" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="6"><path d="M11.397 38.115V146.23l99.475-27.451V27.845zM11.397 146.231l77.677 35.287 101.63-38.561-79.832-24.177z"/><path d="M110.872 27.845l79.832 9.045v106.067l-79.832-24.177z"/><path d="M11.397 38.115l77.677 13.2 101.63-14.425-79.832-9.045z"/><path d="M89.074 51.315v130.203l101.63-38.561V36.89z" fill="#eee" fill-opacity=".933"/><path d="M11.397 38.115l77.677 13.2v130.203L11.397 146.23z"/></g></svg>`,
text: "Flipbox"
}];
diff --git a/public/js/vvvebjs/section.js b/public/js/vvvebjs/section.js
index ae10ac4..db6cf23 100644
--- a/public/js/vvvebjs/section.js
+++ b/public/js/vvvebjs/section.js
@@ -26,10 +26,10 @@ let defaultSeparatorSvg = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://w
let section_sort = 1;
let SectionContent = [{
- name: "Title",
- key: "title",
+ name: "Label",
+ key: "label",
sort: section_sort++,
- htmlAttr: "title",
+ htmlAttr: "aria-label",
inputtype: TextInput
},{
name: "Container width",
@@ -122,12 +122,12 @@ let SectionBackground = [{
}],
},
hideGroups : function() {
- document.querySelectorAll('.mb-3[data-group="bg-image"],.mb-3[data-group="bg-video"]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group="bg-image"],.mb-2[data-group="bg-video"]').forEach(e => e.classList.add("d-none"));
},
onChange : function(node, value, input) {
this.hideGroups();
- document.querySelectorAll('.mb-3[data-group="'+ input.value + '"].d-none').forEach((el, i) => {
+ document.querySelectorAll('.mb-2[data-group="'+ input.value + '"].d-none').forEach((el, i) => {
el.classList.remove("d-none");
});
@@ -249,7 +249,7 @@ let SectionOverlay = [{
off: 'false'
},
onChange : function(node, value, input) {
- let group = document.querySelectorAll('.mb-3[data-group="overlay"]');
+ let group = document.querySelectorAll('.mb-2[data-group="overlay"]');
let overlay = node.querySelector(":scope > .overlay");
if (value == 'true') {
@@ -270,7 +270,7 @@ let SectionOverlay = [{
},
init: function(node) {
let overlay = node.querySelector(":scope > .overlay");
- let group = document.querySelectorAll('.mb-3[data-group="overlay"]');
+ let group = document.querySelectorAll('.mb-2[data-group="overlay"]');
if (overlay && overlay.offsetParent) {
group.forEach(e => e.classList.remove("d-none"));
@@ -616,7 +616,7 @@ let ComponentSectionAdvanced = [];/* [{
function componentsInit(node) {
- document.querySelectorAll('.mb-3[data-group]').forEach(e => e.classList.add("d-none"));
+ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));
let img = node.querySelector(":scope > .background-container img");
let video = node.querySelector(":scope > .background-container video");
@@ -633,7 +633,7 @@ function componentsInit(node) {
}
let showSection = function (section) {
- document.querySelectorAll('.mb-3[data-group="' + section + '"]').forEach(e => e.classList.remove("d-none"));
+ document.querySelectorAll('.mb-2[data-group="' + section + '"]').forEach(e => e.classList.remove("d-none"));
}
if (bg) {