@@ -2097,6 +2097,29 @@ var control = (function() {
20972097 theme . render . accent . color ( ) ;
20982098 link . items ( ) ;
20992099 }
2100+ } , {
2101+ element : helper . e ( ".control-background-color-by-theme" ) ,
2102+ path : "background.color.by" ,
2103+ type : "radio" ,
2104+ func : function ( ) {
2105+ render . dependents ( ) ;
2106+ render . class ( ) ;
2107+ }
2108+ } , {
2109+ element : helper . e ( ".control-background-color-by-custom" ) ,
2110+ path : "background.color.by" ,
2111+ type : "radio" ,
2112+ func : function ( ) {
2113+ render . dependents ( ) ;
2114+ render . class ( ) ;
2115+ }
2116+ } , {
2117+ element : helper . e ( ".control-background-color-custom-current" ) ,
2118+ path : "background.color.custom" ,
2119+ type : "color" ,
2120+ func : function ( ) {
2121+ background . render . color ( ) ;
2122+ }
21002123 } , {
21012124 element : helper . e ( ".control-background-image-show" ) ,
21022125 path : "background.image.show" ,
@@ -2492,6 +2515,9 @@ var control = (function() {
24922515 } ;
24932516 } ;
24942517 var _background = function ( ) {
2518+ helper . removeClass ( html , "is-background-color-by-theme" ) ;
2519+ helper . removeClass ( html , "is-background-color-by-custom" ) ;
2520+ helper . addClass ( html , "is-background-color-by-" + state . get ( ) . background . color . by ) ;
24952521 if ( state . get ( ) . background . image . show ) {
24962522 helper . addClass ( html , "is-background-image-show" ) ;
24972523 } else {
@@ -3018,6 +3044,13 @@ var control = (function() {
30183044 _disable . input ( ".control-background-image-url" , true ) ;
30193045 _disable . element ( ".control-background-image-url-helper" , true ) ;
30203046 } ;
3047+ if ( state . get ( ) . background . color . by == "theme" ) {
3048+ _disable . input ( ".control-background-color-custom-current" , true ) ;
3049+ _disable . element ( ".control-background-color-theme-helper" , true ) ;
3050+ } else if ( state . get ( ) . background . color . by == "custom" ) {
3051+ _disable . input ( ".control-background-color-custom-current" , false ) ;
3052+ _disable . element ( ".control-background-color-theme-helper" , false ) ;
3053+ } ;
30213054 } ;
30223055 _header ( ) ;
30233056 _edit ( ) ;
0 commit comments