]> _ Git - cubist_cms-back.git/commitdiff
wait #5351 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Jul 2022 12:52:34 +0000 (14:52 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Jul 2022 12:52:34 +0000 (14:52 +0200)
src/public/bunchmultiple/bunchmultiple.js

index f461a674101b500426ae695d9dacd61cfcb983ca..a322a4c6b0dc39bd242c97c153c8481c105f746d 100644 (file)
             this.updateAndChange();
         },
 
+        empty: function (update) {
+            $(this.element).find('.item:not(.sample)').remove();
+            if (update !== false) {
+                this.updateAndChange();
+            }
+        },
+
+        replaceData: function (data) {
+            console.log(data);
+            this.empty(false);
+            var $this = this;
+            $.each(data, function (k, v) {
+                console.log(v);
+                $this.initItem(v);
+            });
+            this.updateAndChange();
+        },
+
         updateAndChange: function () {
             if (!this.inited) {
                 return;