smartstore / Smartstore

A modular, scalable and ultra-fast open-source all-in-one eCommerce platform built on ASP.NET Core 7
http://www.smartstore.com/
GNU Affero General Public License v3.0
1.16k stars 427 forks source link

Menu item icon color not showing #1003

Closed suatsuphi closed 6 months ago

suatsuphi commented 7 months ago

Hi,

When I open select icon color not showing

image

image

Michael-Herzog commented 7 months ago

Can't be reproduced

suatsuphi commented 6 months ago

Can't be reproduced

what do you mean ? I downloaded the project from github and installed it, but the color boxes do not appear.

Michael-Herzog commented 6 months ago

Thanks for being persistent on this issue! I've tested the current branch as well as the latest stable release branch here on my local machine and could not reproduce the problem. Now I found out this has something to do with a PageBuilder script, which always ran on my machine and made the problem unreproducable for me. We're on it. Should be fixed with the next release.

suatsuphi commented 6 months ago

thanks its working now

https://github.com/smartstore/Smartstore/commit/e59152aa9e3309b0bb976443582b8a6369a55169

suatsuphi commented 6 months ago

option.trigger('change.select2');

the color didn't show up when we opened the existing recording.

<script sm-target-zone="scripts" data-origin="menu-item-create-or-update">
    $(function () {
        // Icon colors.
        const colorVars = Smartstore.Admin.getThemeColorVars();
        $('.icon-color-chooser > option').each(function () {
            var option = $(this);
            option.data("color", colorVars['--' + this.value]);
            option.trigger('change.select2');
        });
    });
</script>