mirror of
https://github.com/tabler/tabler.git
synced 2026-07-23 19:50:59 +04:00
svg fix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user