Skip to content

Commit 7d248af

Browse files
committed
Update app structure by jshint
1 parent 1410079 commit 7d248af

File tree

6 files changed

+605
-620
lines changed

6 files changed

+605
-620
lines changed

src/js/config.js

Lines changed: 112 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -3,130 +3,127 @@ var HandsomeTrello = {};
33
(function (HandsomeTrello) {
44
'use strict';
55

6-
HandsomeTrello = {
7-
plugins: {},
6+
HandsomeTrello.plugins = {};
87

9-
callbacks: {
10-
cardsUpdated: {},
11-
openCardViewed: {},
12-
checklistInserted: {},
13-
checkItemUpdated: {},
14-
badgeChecklistUpdated: {}
15-
},
16-
17-
settings: {
18-
locale: 'en-US',
19-
plugins: {
20-
'inheritance': true
21-
},
22-
popOver: {
23-
offset: 6,
24-
resizeTimeout: 100
25-
},
26-
reloadTimeout: 500,
27-
notification: {
28-
defaultTimeout: 10000,
29-
messages: {
30-
error: function (message) {
31-
return HandsomeTrello.helpers.jsonToDOM(['span', {}, message]);
32-
},
33-
recursionOnBoard: function (recursionCardTitle, recursionCardLink, currentCardTitle, currentCardLink) {
34-
return HandsomeTrello.helpers.jsonToDOM(['span', {},
35-
['a', {
36-
'href': recursionCardLink
37-
},
38-
recursionCardTitle
39-
],
40-
' is not a child for ',
41-
['a', {
42-
'href': currentCardLink
43-
},
44-
currentCardTitle
45-
],
46-
' anymore, due to fix for cycle Parent/Child dependency'
47-
]);
48-
},
49-
severalParentsOnCard: function (recursionCardTitle, recursionCardLink, currentCardTitle, currentCardLink) {
50-
return HandsomeTrello.helpers.jsonToDOM(['span', {},
51-
['a', {
52-
'href': recursionCardLink
53-
},
54-
recursionCardTitle
55-
],
56-
' is not a child for ',
57-
['a', {
58-
'href': currentCardLink
59-
},
60-
currentCardTitle
61-
],
62-
' anymore, due to fix for multiple Parents dependency'
63-
]);
64-
}
65-
}
66-
},
8+
HandsomeTrello.callbacks = {
9+
cardsUpdated: {},
10+
openCardViewed: {},
11+
checklistInserted: {},
12+
checkItemUpdated: {},
13+
badgeChecklistUpdated: {}
14+
};
6715

68-
options: {
69-
showArchivedCards: {
70-
title: 'Show Archived Cards',
71-
description: 'Show Archived Cards in children and related lists',
72-
type: 'boolean',
73-
value: true
74-
},
75-
showCardDueDate: {
76-
title: 'Show Card Due Date',
77-
description: 'Show Due Date in children and related lists and parent',
78-
type: 'boolean',
79-
value: false
80-
},
81-
showCardId: {
82-
title: 'Show Card IDs',
83-
description: 'Show Card IDs for Parent/Siblings/Child Cards',
84-
type: 'boolean',
85-
value: false
86-
},
87-
openChildCard: {
88-
title: 'Open Child Card when adding',
89-
description: 'Open Child Card when adding',
90-
type: 'boolean',
91-
value: true
16+
HandsomeTrello.settings = {
17+
locale: 'en-US',
18+
plugins: {
19+
'inheritance': true
20+
},
21+
popOver: {
22+
offset: 6,
23+
resizeTimeout: 100
24+
},
25+
reloadTimeout: 500,
26+
notification: {
27+
defaultTimeout: 10000,
28+
messages: {
29+
error: function (message) {
30+
return HandsomeTrello.helpers.jsonToDOM(['span', {}, message]);
9231
},
93-
descriptionPosition: {
94-
title: 'Position of Cards relative to the description',
95-
description: 'Position of Parent/Siblings/Child Cards relative to the description',
96-
type: 'select',
97-
options: [
98-
{
99-
label: 'Above',
100-
value: 'top'
32+
recursionOnBoard: function (recursionCardTitle, recursionCardLink, currentCardTitle, currentCardLink) {
33+
return HandsomeTrello.helpers.jsonToDOM(['span', {},
34+
['a', {
35+
'href': recursionCardLink
36+
},
37+
recursionCardTitle
38+
],
39+
' is not a child for ',
40+
['a', {
41+
'href': currentCardLink
10142
},
102-
{
103-
label: 'Below',
104-
value: 'bottom'
105-
}
106-
],
107-
value: 'bottom'
43+
currentCardTitle
44+
],
45+
' anymore, due to fix for cycle Parent/Child dependency'
46+
]);
10847
},
109-
orderOfBlocks: {
110-
title: 'Order of Parent/Siblings/Child blocks',
111-
description: 'Order of Parent/Siblings/Child blocks',
112-
type: 'select',
113-
options: [
114-
{
115-
label: 'Parent - Siblings - Children',
116-
value: 'parent-related-children'
48+
severalParentsOnCard: function (recursionCardTitle, recursionCardLink, currentCardTitle, currentCardLink) {
49+
return HandsomeTrello.helpers.jsonToDOM(['span', {},
50+
['a', {
51+
'href': recursionCardLink
11752
},
118-
{
119-
label: 'Parent - Children - Siblings',
120-
value: 'parent-children-related'
53+
recursionCardTitle
54+
],
55+
' is not a child for ',
56+
['a', {
57+
'href': currentCardLink
12158
},
122-
{
123-
label: 'Siblings - Parent - Children',
124-
value: 'related-parent-children'
125-
}
126-
],
127-
value: 'parent-related-children'
59+
currentCardTitle
60+
],
61+
' anymore, due to fix for multiple Parents dependency'
62+
]);
12863
}
12964
}
65+
},
66+
options: {
67+
showArchivedCards: {
68+
title: 'Show Archived Cards',
69+
description: 'Show Archived Cards in children and related lists',
70+
type: 'boolean',
71+
value: true
72+
},
73+
showCardDueDate: {
74+
title: 'Show Card Due Date',
75+
description: 'Show Due Date in children and related lists and parent',
76+
type: 'boolean',
77+
value: false
78+
},
79+
showCardId: {
80+
title: 'Show Card IDs',
81+
description: 'Show Card IDs for Parent/Siblings/Child Cards',
82+
type: 'boolean',
83+
value: false
84+
},
85+
openChildCard: {
86+
title: 'Open Child Card when adding',
87+
description: 'Open Child Card when adding',
88+
type: 'boolean',
89+
value: true
90+
},
91+
descriptionPosition: {
92+
title: 'Position of Cards relative to the description',
93+
description: 'Position of Parent/Siblings/Child Cards relative to the description',
94+
type: 'select',
95+
options: [
96+
{
97+
label: 'Above',
98+
value: 'top'
99+
},
100+
{
101+
label: 'Below',
102+
value: 'bottom'
103+
}
104+
],
105+
value: 'bottom'
106+
},
107+
orderOfBlocks: {
108+
title: 'Order of Parent/Siblings/Child blocks',
109+
description: 'Order of Parent/Siblings/Child blocks',
110+
type: 'select',
111+
options: [
112+
{
113+
label: 'Parent - Siblings - Children',
114+
value: 'parent-related-children'
115+
},
116+
{
117+
label: 'Parent - Children - Siblings',
118+
value: 'parent-children-related'
119+
},
120+
{
121+
label: 'Siblings - Parent - Children',
122+
value: 'related-parent-children'
123+
}
124+
],
125+
value: 'parent-related-children'
126+
}
130127
}
131128
};
132129

0 commit comments

Comments
 (0)