File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,11 +55,18 @@ $(function () {
5555 } ) ;
5656
5757 function setThemeSettings ( ) {
58- setThemeColor ( ) ;
59- setThemeState ( ) ;
60- setThemeControlsState ( ) ;
61-
62- saveThemeSettings ( ) ;
58+ setThemeState ( )
59+ . delay ( config . delayTime )
60+ . queue ( function ( next ) {
61+
62+ setThemeColor ( ) ;
63+ setThemeControlsState ( ) ;
64+ saveThemeSettings ( ) ;
65+
66+ $ ( document ) . trigger ( "themechange" ) ;
67+
68+ next ( ) ;
69+ } ) ;
6370 }
6471
6572 /************************************************
@@ -86,6 +93,8 @@ $(function () {
8693
8794 // set footer
8895 $app . addClass ( themeSettings . sidebarPosition ) ;
96+
97+ return $app ;
8998 }
9099
91100 /************************************************
@@ -121,12 +130,8 @@ $(function () {
121130 * Update theme color
122131 *************************************************/
123132 function setThemeColor ( ) {
124- setTimeout ( function ( ) {
125- config . chart . colorPrimary = tinycolor ( $ref . find ( ".chart .color-primary" ) . css ( "color" ) ) ;
126- config . chart . colorSecondary = tinycolor ( $ref . find ( ".chart .color-secondary" ) . css ( "color" ) ) ;
127-
128- $ ( document ) . trigger ( "themechange" ) ;
129- } , 200 ) ;
133+ config . chart . colorPrimary = tinycolor ( $ref . find ( ".chart .color-primary" ) . css ( "color" ) ) ;
134+ config . chart . colorSecondary = tinycolor ( $ref . find ( ".chart .color-secondary" ) . css ( "color" ) ) ;
130135 }
131136
132137 /************************************************
Original file line number Diff line number Diff line change 1- var config = window . config = {
2- chart : { }
3- } ;
1+ var config = window . config = { } ;
42
53// Config reference element
64var $ref = $ ( "#ref" ) ;
75
8- // set primary color
9- config . chart . colorPrimary = tinycolor ( $ref . find ( ".color-primary" ) . css ( "color" ) ) ;
10-
116// Configure responsive bootstrap toolkit
127config . ResponsiveBootstrapToolkitVisibilityDivs = {
138 'xs' : $ ( '<div class="device-xs hidden-sm-up"></div>' ) ,
@@ -19,6 +14,9 @@ config.ResponsiveBootstrapToolkitVisibilityDivs = {
1914
2015ResponsiveBootstrapToolkit . use ( 'Custom' , config . ResponsiveBootstrapToolkitVisibilityDivs ) ;
2116
17+ //delay time configuration
18+ config . delayTime = 50 ;
19+
2220// chart configurations
2321config . chart = { } ;
2422
You can’t perform that action at this time.
0 commit comments