Skip to content

Commit 2642570

Browse files
committed
Clean up indentation, spacing, whitespace
1 parent 62cc208 commit 2642570

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

widget-customizer-preview.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ var WidgetCustomizerPreview = (function ($) {
1313
});
1414
});
1515

16-
$('.widget').click(function() {
17-
var widgetId = '#customize-control-widget_'+jQuery(this).attr('id');
16+
$('.widget').click(function () {
17+
var widgetId = '#customize-control-widget_' + $(this).attr('id');
1818
var widget = parent.jQuery(widgetId).children('div.widget');
1919
var inside = widget.children('.widget-inside');
2020

2121
if ( inside.is(':hidden') ) {
2222
inside.slideDown('fast');
2323
} else {
24-
inside.slideUp('fast', function() {
24+
inside.slideUp('fast', function () {
2525
widget.css({'width':'', margin:''});
2626
});
2727
}
2828
});
2929

3030
return self;
31-
}( jQuery ));
31+
}( jQuery ));

widget-customizer.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ var WidgetCustomizer = (function ($) {
2727
control.container.removeClass( 'previewer-loading' );
2828
});
2929

30-
3130
control.setupControlToggle();
3231

3332
control.setupWidgetTitle();
@@ -120,34 +119,35 @@ var WidgetCustomizer = (function ($) {
120119
editingEffects: function() {
121120
var control = this;
122121
var widgetId;
123-
124-
/*On control hover*/
125-
$(control.container).hover( function () {
126-
var toRemove = 'customize-control-widget_';
127-
widgetId = '#'+$(this).attr('id').replace( toRemove, '' );
128-
129-
$('iframe').contents().find(widgetId).css({
130-
'border-radius' : '2px',
131-
'outline' : 'none',
132-
'box-shadow' : '0 0 3px #CE0000'
133-
});
134-
135-
},
136-
function(){
137-
$('iframe').contents().find(widgetId).css({ 'box-shadow' : 'none' });
138-
});
139-
140-
/*On control input click*/
122+
123+
/* On control hover */
124+
$(control.container).hover(
125+
function () {
126+
var toRemove = 'customize-control-widget_';
127+
widgetId = '#' + $(this).attr('id').replace( toRemove, '' );
128+
129+
$('iframe').contents().find(widgetId).css({
130+
'border-radius' : '2px',
131+
'outline' : 'none',
132+
'box-shadow' : '0 0 3px #CE0000'
133+
});
134+
},
135+
function () {
136+
$('iframe').contents().find(widgetId).css({ 'box-shadow' : 'none' });
137+
}
138+
);
139+
140+
/* On control input click */
141141
$(control.container).find('input').click( function () {
142-
var toRemove = 'customize-control-widget_';
143-
widgetId = '#'+$(this).closest(control.container).attr('id').replace( toRemove, '' );
144-
145-
$('iframe').contents().find('body, html').animate({
142+
var toRemove = 'customize-control-widget_';
143+
widgetId = '#' + $(this).closest(control.container).attr('id').replace( toRemove, '' );
144+
145+
$('iframe').contents().find('body, html').animate({
146146
scrollTop: $('iframe').contents().find(widgetId).offset().top-20
147147
}, 1000);
148-
148+
149149
});
150-
}
150+
}
151151
});
152152

153153
// Note that 'widget_form' must match the Widget_Form_WP_Customize_Control::$type

0 commit comments

Comments
 (0)