Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit 4c30194

Browse files
author
Steve Calvert
committed
Fixing code style and rebuilding
1 parent 4ff5b1f commit 4c30194

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bellows",
3-
"version": "5.0.0",
3+
"version": "5.1.0",
44
"homepage": "https://github.com/mobify/bellows",
55
"authors": [
66
"Mobify <jobs@mobify.com>"

dist/bellows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
Bellows.__super__.call(this, element, options, Bellows.DEFAULTS);
3434
}
3535

36-
Bellows.VERSION = '5.0.0';
36+
Bellows.VERSION = '5.1.0';
3737

3838
Bellows.DEFAULTS = {
3939
singleItemOpen: false,
@@ -218,7 +218,7 @@
218218

219219
openAll: function() {
220220
var plugin = this;
221-
221+
222222
this.$bellows.find('.' + cssClasses.ITEM + ':not(.' + cssClasses.OPENED + ')').each(function() {
223223
plugin.open($(this));
224224
});

dist/bellows.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/bellows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218

219219
openAll: function() {
220220
var plugin = this;
221-
221+
222222
this.$bellows.find('.' + cssClasses.ITEM + ':not(.' + cssClasses.OPENED + ')').each(function() {
223223
plugin.open($(this));
224224
});

tests/unit/plugin.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ define([
9696
opened: function(e, ui) {
9797
assert.isTrue(ui.item.hasClass('bellows--is-open'));
9898
openCount++;
99-
if (openCount === 2) done();
99+
100+
if (openCount === 2) {
101+
done();
102+
}
100103
}
101104
});
102105

@@ -111,12 +114,17 @@ define([
111114
$element.bellows({
112115
opened: function(e, ui) {
113116
openCount++;
114-
if (openCount === 2) $element.bellows('closeAll');
117+
if (openCount === 2) {
118+
$element.bellows('closeAll');
119+
}
115120
},
116121
closed: function(e, ui) {
117122
assert.isFalse(ui.item.hasClass('bellows--is-open'));
118123
closeCount++;
119-
if (closeCount === 2) done();
124+
125+
if (closeCount === 2) {
126+
done();
127+
}
120128
}
121129
});
122130

@@ -134,6 +142,7 @@ define([
134142
$element.bellows('openAll');
135143
return;
136144
}
145+
137146
assert.equal($element.find('.bellows--is-open').length, 2);
138147
done();
139148
}
@@ -165,10 +174,13 @@ define([
165174
$element.bellows({
166175
opened: function(e, ui) {
167176
openCount++;
168-
if (openCount === 2) $element.bellows('toggleAll');
177+
if (openCount === 2) {
178+
$element.bellows('toggleAll');
179+
}
169180
},
170181
closed: function(e, ui) {
171182
closeCount++;
183+
172184
if (closeCount === 2) {
173185
assert.equal($element.find('.bellows__item:not(.bellows--is-open)').length, 2);
174186
done();

0 commit comments

Comments
 (0)