Skip to content
This repository was archived by the owner on Sep 14, 2021. It is now read-only.

Commit 02bee82

Browse files
committed
bugfixes
1 parent 59fb489 commit 02bee82

File tree

10 files changed

+19
-18
lines changed

10 files changed

+19
-18
lines changed

js/color.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ kirki.control.color = {
3232
}, 20 );
3333
}
3434
} );
35-
}
35+
},
36+
3637
/**
3738
* The HTML Template for 'color' controls.
3839
*

js/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kirki.control.date = {
1010
jQuery( selector ).datepicker();
1111

1212
// Save the changes
13-
this.container.on( 'change keyup paste', 'input.datepicker', function() {
13+
control.container.on( 'change keyup paste', 'input.datepicker', function() {
1414
control.setting.set( jQuery( this ).val() );
1515
} );
1616
},

js/dimension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ kirki.control.dimension = {
77
kirki.control.dimension.notifications( control );
88

99
// Save the value
10-
this.container.on( 'change keyup paste', 'input', function() {
10+
control.container.on( 'change keyup paste', 'input', function() {
1111
control.setting.set( jQuery( this ).val() );
1212
} );
1313
},

js/fontawesome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ wp.customize.controlConstructor['kirki-fontawesome'] = wp.customize.kirkiDynamic
5757

5858
control.container.html( kirki.control.fontawesome.template( control ) );
5959

60-
element = this.container.find( 'select' ),
60+
element = control.container.find( 'select' ),
6161

6262
_.each( icons.icons, function( icon ) {
6363
select2Options.data.push( {

js/generic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ wp.customize.controlConstructor['kirki-generic'] = wp.customize.kirkiDynamicCont
7777
control.container.html( kirki.control.generic.template( control ) );
7878

7979
// Save the value
80-
this.container.on( 'change keyup paste click', element, function() {
80+
control.container.on( 'change keyup paste click', element, function() {
8181
control.setting.set( jQuery( this ).val() );
8282
} );
8383
}

js/kirki.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ var kirki = {
243243
var control = this;
244244

245245
// Save the value
246-
this.container.on( 'change keyup paste click', 'input', function() {
246+
control.container.on( 'change keyup paste click', 'input', function() {
247247
control.setting.set( jQuery( this ).val() );
248248
} );
249249

js/number.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ wp.customize.controlConstructor['kirki-number'] = wp.customize.kirkiDynamicContr
5050

5151
control.container.html( kirki.control.number.template( control ) );
5252

53-
element = this.container.find( 'input' );
53+
element = control.container.find( 'input' );
5454

5555
// Set step value.
5656
if ( ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.step ) ) {
@@ -61,7 +61,7 @@ wp.customize.controlConstructor['kirki-number'] = wp.customize.kirkiDynamicContr
6161
jQuery( element ).spinner( control.params.choices );
6262

6363
// On change
64-
this.container.on( 'change click keyup paste', 'input', function() {
64+
control.container.on( 'change click keyup paste', 'input', function() {
6565
control.setting.set( jQuery( this ).val() );
6666
} );
6767

js/preset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ wp.customize.controlConstructor['kirki-preset'] = wp.customize.kirkiDynamicContr
1111
selectValue;
1212

1313
// Trigger a change
14-
this.container.on( 'change', 'select', function() {
14+
control.container.on( 'change', 'select', function() {
1515

1616
// Get the control's value
1717
selectValue = jQuery( this ).val();

js/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ wp.customize.controlConstructor['kirki-select'] = wp.customize.kirkiDynamicContr
7878

7979
control.container.html( kirki.control.select.template( control ) );
8080

81-
element = this.container.find( 'select' );
81+
element = control.container.find( 'select' );
8282
multiple = parseInt( element.data( 'multiple' ), 10 );
8383

8484
if ( 1 < multiple ) {

js/typography.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,38 +215,38 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
215215
control.renderSubsetSelector();
216216

217217
// Font-size.
218-
this.container.on( 'change keyup paste', '.font-size input', function() {
218+
control.container.on( 'change keyup paste', '.font-size input', function() {
219219
control.saveValue( 'font-size', jQuery( this ).val() );
220220
} );
221221

222222
// Line-height.
223-
this.container.on( 'change keyup paste', '.line-height input', function() {
223+
control.container.on( 'change keyup paste', '.line-height input', function() {
224224
control.saveValue( 'line-height', jQuery( this ).val() );
225225
} );
226226

227227
// Margin-top.
228-
this.container.on( 'change keyup paste', '.margin-top input', function() {
228+
control.container.on( 'change keyup paste', '.margin-top input', function() {
229229
control.saveValue( 'margin-top', jQuery( this ).val() );
230230
} );
231231

232232
// Margin-bottom.
233-
this.container.on( 'change keyup paste', '.margin-bottom input', function() {
233+
control.container.on( 'change keyup paste', '.margin-bottom input', function() {
234234
control.saveValue( 'margin-bottom', jQuery( this ).val() );
235235
} );
236236

237237
// Letter-spacing.
238238
value['letter-spacing'] = ( jQuery.isNumeric( value['letter-spacing'] ) ) ? value['letter-spacing'] + 'px' : value['letter-spacing'];
239-
this.container.on( 'change keyup paste', '.letter-spacing input', function() {
239+
control.container.on( 'change keyup paste', '.letter-spacing input', function() {
240240
value['letter-spacing'] = ( jQuery.isNumeric( jQuery( this ).val() ) ) ? jQuery( this ).val() + 'px' : jQuery( this ).val();
241241
control.saveValue( 'letter-spacing', value['letter-spacing'] );
242242
} );
243243

244244
// Word-spacing.
245-
this.container.on( 'change keyup paste', '.word-spacing input', function() {
245+
control.container.on( 'change keyup paste', '.word-spacing input', function() {
246246
control.saveValue( 'word-spacing', jQuery( this ).val() );
247247
} );
248248

249-
this.container.on( 'change', '.text-align input', function() {
249+
control.container.on( 'change', '.text-align input', function() {
250250
control.saveValue( 'text-align', jQuery( this ).val() );
251251
} );
252252

@@ -255,7 +255,7 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
255255
control.saveValue( 'text-transform', jQuery( this ).val() );
256256
} );
257257

258-
picker = this.container.find( '.kirki-color-control' );
258+
picker = control.container.find( '.kirki-color-control' );
259259

260260
// Change color
261261
picker.wpColorPicker( {

0 commit comments

Comments
 (0)