lightspeeddevelopment/lsx-customizer

View on GitHub
assets/js/lsx-customizer-colour-admin.min.js

Summary

Maintainability
A
0 mins
Test Coverage
!function(o){function e(){if(!n){var e,t=o("color_scheme")(),r=color_scheme[t].colors;_.each(color_scheme_keys,function(e){"function"==typeof o(e)&&(r[e]=o(e)())}),e=c(r),o.previewer.send("update-color-scheme-css",e)}}var c=wp.template("lsx-color-scheme"),n=!1;o.controlConstructor.select=o.Control.extend({ready:function(){"color_scheme"===this.id&&this.setting.bind("change",function(c){n=!0;var t=color_scheme[c].colors;_.each(t,function(e,c){"function"==typeof o(c)&&(o(c).set(e),o.control(c).container.find(".color-picker-hex").data("data-default-color",e).wpColorPicker("defaultColor",e))}),n=!1,e()})}}),_.each(color_scheme_keys,function(c){o(c,function(o){o.bind(e)})})}(wp.customize);