1
0
mirror of https://github.com/tabler/tabler.git synced 2026-07-23 19:50:59 +04:00
This commit is contained in:
codecalm
2020-11-21 15:31:05 +01:00
parent 09a0ea58a2
commit 6c0d8f7b7b
+4 -2
View File
@@ -28,7 +28,7 @@
<ul class="demo-icons-list">
{% for icon in icons limit: limit %}
<li class="demo-icons-list-item">
<a href="#" class="text-reset" data-toggle-icon="{{ icon }}" data-toggle="tooltip" title="{{ icon }}" data-icon-svg="{% capture svg %}{% highlight html %}{% include ui/icon.html icon=icon %}{% endhighlight %}{% endcapture %}{{ svg | escape }}">
<a href="#" class="text-reset" data-toggle-icon="{{ icon }}" title="{{ icon }}" data-icon-svg="{% capture svg %}{% highlight html %}{% include ui/icon.html icon=icon %}{% endhighlight %}{% endcapture %}{{ svg | escape }}">
{% include ui/icon.html icon=icon %}
<div class="mt-1 text-muted text-h5">{{ icon }}</div>
</a>
@@ -60,10 +60,12 @@
elements.forEach(function (element) {
element.addEventListener('click', function(e){
var icon = this.dataset.toggleIcon,
svg = this.innerHTML,
svg = this.querySelector('svg'),
iconCode = this.dataset.iconSvg,
editor = getClosest(this, '[data-icon-preview]');
console.log('icon', icon);
console.log('icon', this.querySelector('svg'));
console.log('iconCode', iconCode);
editor.querySelectorAll('[data-icon-preview-icon]')[0].innerHTML = svg;