Skip to content

armgit / Vvveb

Public Imported from GitHub
0

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

New component 'Social icons'

givanz4e1c4e0a813a
diff --git a/public/js/vvvebjs/builder.js b/public/js/vvvebjs/builder.js
index 5e4802d..81cccc1 100755
--- a/public/js/vvvebjs/builder.js
+++ b/public/js/vvvebjs/builder.js
@@ -3346,7 +3346,9 @@ Vvveb.Revisions = {
let dropdown = $(".revisions-dropdown").html("");
$(".revisions-count").html(revisions.length);
for (let i in revisions) {
- dropdown.append(tmpl('vvveb-revision-item', revisions[i]));
+ let revision = revisions[i];
+ revision['url'] = '' + revision['url'] + ".html";
+ dropdown.append(tmpl('vvveb-revision-item', revision));
}
},
diff --git a/public/js/vvvebjs/components-elements.js b/public/js/vvvebjs/components-elements.js
index bb06193..166d4ab 100755
--- a/public/js/vvvebjs/components-elements.js
+++ b/public/js/vvvebjs/components-elements.js
@@ -967,14 +967,98 @@ Vvveb.Components.add("elements/testimonial", {
});
Vvveb.Components.add("elements/social-icons", {
- nodes: [".counter"],
+ classes: ["social-icons"],
name: "Social icons",
image: "icons/social-icons.svg",
- html: `<i class="font-icon la la-star"></i>`,
- properties: [
- ]
-});
+ html: `<ul class="social-icons list-unstyled">
+ <li>
+ <a href="https://facebook.com">
+ <i class="lab la-facebook-f la-2x"></i> <span>Facebook</span>
+ </a>
+ </li>
+ <li>
+ <a href="https://linkedin.com">
+ <i class="lab la-linkedin-in la-2x"></i> <span>Linkedin</span>
+ </a>
+ </li>
+ <li>
+ <a href="https://twitter.com">
+ <i class="lab la-twitter la-2x"></i> <span>Twitter</span>
+ </a>
+ </li>
+ <li>
+ <a href="https://instagram.com">
+ <i class="lab la-instagram la-2x"></i> <span>Instagram</span>
+ </a>
+ </li>
+ <li>
+ <a href="https://github.com">
+ <i class="lab la-github la-2x"></i> <span>Github</span>
+ </a>
+ </li>
+ </ul>`,
+ properties: [{
+ //name: "List",
+ key: "list",
+ //component: "elements/tab",
+ inline:false,
+ inputtype: ListInput,
+ data: {
+ selector:"> li",
+ container:"",
+ prefix:"Item ",
+ name: "text",
+ nameElement: "span",
+ removeElement: true,
+ //"newElement": ``
+ },
+ onChange: function(node, value, input, component, event) {
+ let element = node[0];
+ if (event.action) {
+ if (event.action == "add") {
+ node.append(`<li>
+ <a href="https://twitter.com">
+ <i class="lab la-twitter la-2x"></i> <span>Twitter</span>
+ </a>
+ </li>`);
+
+ //temporary solution to better update list
+ Vvveb.Components.render("elements/social-icons");
+ }
+ if (event.action == "remove") {
+ //$("> li:eq(" + event.index + ")", node).remove();
+ } else if (event.action == "select") {
+ let el = $("> li:eq(" + event.index + ")", node);
+ //el[0].click();
+ //Vvveb.Builder.iframe.contentWindow.bootstrap.Collapse.getOrCreateInstance(el[0]).toggle();
+ }
+ }
+
+ return node;
+ },
+ }, {
+ name: "Inline",
+ key: "list-inline",
+ htmlAttr: "class",
+ validValues: ["list-inline"],
+ inputtype: ToggleInput,
+ data: {
+ on: "list-inline",
+ off: ""
+ }
+ }, {
+ name: "Unstyled",
+ key: "list-unstyled",
+ htmlAttr: "class",
+ validValues: ["list-unstyled"],
+ inputtype: ToggleInput,
+ data: {
+ on: "list-unstyled",
+ off: ""
+ }
+ }]
+});
function carouselAfterDrop(node) {
//check if swiper js is included and if not add it when drag starts to allow the script to load
diff --git a/public/js/vvvebjs/components/server-component.js b/public/js/vvvebjs/components/server-component.js
index 1ec1ea8..23fecb9 100755
--- a/public/js/vvvebjs/components/server-component.js
+++ b/public/js/vvvebjs/components/server-component.js
@@ -83,7 +83,7 @@ class ServerComponent {
}, 250);
}
- self.element.animate({opacity: 1}, 30);
+ self.element.removeAttr("style");//animate({opacity: 1}, 30);
if (callback) callback(data);
})
@@ -117,7 +117,7 @@ class ServerComponent {
this.throttle = setTimeout(function () {
clearTimeout(this.throttle);
self.ajax();
- }, 1000);
+ }, 500);
}
return element;
}