Skip to content

Commit

Permalink
Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kabel committed Dec 23, 2015
1 parent be146ab commit 4326586
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions wdn/templates_4.1/scripts/wdn-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ define(['jquery'], function($) {
$(element).attr('checked', false);
});
};

return {
initialize : function () {

if (initd) {
//Don't initialize multiple times
return;
}

this.setUpDropDownWidget('.wdn-dropdown-widget-toggle');

//Close search on escape
Expand All @@ -34,18 +34,18 @@ define(['jquery'], function($) {
//listen for clicks on the document and close dropdowns if they don't come from a dropdown
$(document).on('click', function(e) {
var $target = $(e.target);

//dont close this way if the control was clicked
if ($target.filter('.wdn-dropdown-widget-toggle, .wdn-dropdown-widget-label').length) {
return;
}

//close all dropdown widgets
if (!$('.wdn-dropdown-widget-content').find(e.target).length) {
closeDropDown('.wdn-dropdown-widget-toggle');
}
});

initd = true;
},

Expand All @@ -65,15 +65,15 @@ define(['jquery'], function($) {
//Get the dropdown-container for this control.
var container_id = $element.attr('aria-controls');
var $container = $('#'+container_id);

//Mark it as hidden
$container.attr('aria-hidden', true);

//Add a helper class to labels
var $label = $('label[for="'+$element.attr('id')+'"]');
$label.addClass('wdn-dropdown-widget-label');
});

$(selector).change(function() {
var $control = $(this);
if ($control.is(':checked')) {
Expand Down

0 comments on commit 4326586

Please sign in to comment.