Skip to content

Commit 070889f

Browse files
jQuery: Syntax modernization with kebab-case CSS
- Modernized JavaScript syntax (var to let/const where appropriate) - Updated CSS classes to kebab-case (.retry-button, .uploaded-image) - Updated data.js with employee records - Maintained jQuery compatibility while improving code quality - Build and lint passing with Prettier formatting
1 parent 88f3fb7 commit 070889f

File tree

4 files changed

+162
-159
lines changed

4 files changed

+162
-159
lines changed

jQuery/src/data.js

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,89 @@
1-
let employees = [{
2-
"ID": 1,
3-
"FirstName": "John",
4-
"LastName": "Heart",
5-
"Prefix": "Mr.",
6-
"Position": "CEO",
7-
"Picture": "images/employees/01.png",
8-
"BirthDate": "1964/03/16",
9-
"HireDate": "1995/01/15",
10-
"Notes": "John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003.\r\n\r\nWhen not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.",
11-
"Address": "351 S Hill St."
1+
const employees = [{
2+
'ID': 1,
3+
'FirstName': 'John',
4+
'LastName': 'Heart',
5+
'Prefix': 'Mr.',
6+
'Position': 'CEO',
7+
'Picture': 'images/employees/01.png',
8+
'BirthDate': '1964/03/16',
9+
'HireDate': '1995/01/15',
10+
'Notes': 'John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003.\r\n\r\nWhen not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.',
11+
'Address': '351 S Hill St.',
1212
}, {
13-
"ID": 20,
14-
"FirstName": "Olivia",
15-
"LastName": "Peyton",
16-
"Prefix": "Mrs.",
17-
"Position": "Sales Assistant",
18-
"Picture": "images/employees/09.png",
19-
"BirthDate": "1981/06/03",
20-
"HireDate": "2012/05/14",
21-
"Notes": "Olivia loves to sell. She has been selling DevAV products since 2012. \r\n\r\nOlivia was homecoming queen in high school. She is expecting her first child in 6 months. Good Luck Olivia.",
22-
"Address": "807 W Paseo Del Mar"
13+
'ID': 20,
14+
'FirstName': 'Olivia',
15+
'LastName': 'Peyton',
16+
'Prefix': 'Mrs.',
17+
'Position': 'Sales Assistant',
18+
'Picture': 'images/employees/09.png',
19+
'BirthDate': '1981/06/03',
20+
'HireDate': '2012/05/14',
21+
'Notes': 'Olivia loves to sell. She has been selling DevAV products since 2012. \r\n\r\nOlivia was homecoming queen in high school. She is expecting her first child in 6 months. Good Luck Olivia.',
22+
'Address': '807 W Paseo Del Mar',
2323
}, {
24-
"ID": 4,
25-
"FirstName": "Robert",
26-
"LastName": "Reagan",
27-
"Prefix": "Mr.",
28-
"Position": "CMO",
29-
"Picture": "images/employees/03.png",
30-
"BirthDate": "1974/09/07",
31-
"HireDate": "2002/11/08",
32-
"Notes": "Robert was recently voted the CMO of the year by CMO Magazine. He is a proud member of the DevAV Management Team.\r\n\r\nRobert is a championship BBQ chef, so when you get the chance ask him for his secret recipe.",
33-
"Address": "4 Westmoreland Pl."
24+
'ID': 4,
25+
'FirstName': 'Robert',
26+
'LastName': 'Reagan',
27+
'Prefix': 'Mr.',
28+
'Position': 'CMO',
29+
'Picture': 'images/employees/03.png',
30+
'BirthDate': '1974/09/07',
31+
'HireDate': '2002/11/08',
32+
'Notes': 'Robert was recently voted the CMO of the year by CMO Magazine. He is a proud member of the DevAV Management Team.\r\n\r\nRobert is a championship BBQ chef, so when you get the chance ask him for his secret recipe.',
33+
'Address': '4 Westmoreland Pl.',
3434
}, {
35-
"ID": 5,
36-
"FirstName": "Greta",
37-
"LastName": "Sims",
38-
"Prefix": "Ms.",
39-
"Position": "HR Manager",
40-
"Picture": "images/employees/04.png",
41-
"BirthDate": "1977/11/22",
42-
"HireDate": "1998/04/23",
43-
"Notes": "Greta has been DevAV's HR Manager since 2003. She joined DevAV from Sonee Corp.\r\n\r\nGreta is currently training for the NYC marathon. Her best marathon time is 4 hours. Go Greta.",
44-
"Address": "1700 S Grandview Dr."
35+
'ID': 5,
36+
'FirstName': 'Greta',
37+
'LastName': 'Sims',
38+
'Prefix': 'Ms.',
39+
'Position': 'HR Manager',
40+
'Picture': 'images/employees/04.png',
41+
'BirthDate': '1977/11/22',
42+
'HireDate': '1998/04/23',
43+
'Notes': "Greta has been DevAV's HR Manager since 2003. She joined DevAV from Sonee Corp.\r\n\r\nGreta is currently training for the NYC marathon. Her best marathon time is 4 hours. Go Greta.",
44+
'Address': '1700 S Grandview Dr.',
4545
}, {
46-
"ID": 6,
47-
"FirstName": "Brett",
48-
"LastName": "Wade",
49-
"Prefix": "Mr.",
50-
"Position": "IT Manager",
51-
"Picture": "images/employees/05.png",
52-
"BirthDate": "1968/12/01",
53-
"HireDate": "2009/03/06",
54-
"Notes": "Brett came to DevAv from Microsoft and has led our IT department since 2012.\r\n\r\nWhen he is not working hard for DevAV, he coaches Little League (he was a high school pitcher).",
55-
"Address": "1120 Old Mill Rd."
46+
'ID': 6,
47+
'FirstName': 'Brett',
48+
'LastName': 'Wade',
49+
'Prefix': 'Mr.',
50+
'Position': 'IT Manager',
51+
'Picture': 'images/employees/05.png',
52+
'BirthDate': '1968/12/01',
53+
'HireDate': '2009/03/06',
54+
'Notes': 'Brett came to DevAv from Microsoft and has led our IT department since 2012.\r\n\r\nWhen he is not working hard for DevAV, he coaches Little League (he was a high school pitcher).',
55+
'Address': '1120 Old Mill Rd.',
5656
}, {
57-
"ID": 7,
58-
"FirstName": "Sandra",
59-
"LastName": "Johnson",
60-
"Prefix": "Mrs.",
61-
"Position": "Controller",
62-
"Picture": "images/employees/06.png",
63-
"BirthDate": "1974/11/15",
64-
"HireDate": "2005/05/11",
65-
"Notes": "Sandra is a CPA and has been our controller since 2008. She loves to interact with staff so if you've not met her, be certain to say hi.\r\n\r\nSandra has 2 daughters both of whom are accomplished gymnasts.",
66-
"Address": "4600 N Virginia Rd."
57+
'ID': 7,
58+
'FirstName': 'Sandra',
59+
'LastName': 'Johnson',
60+
'Prefix': 'Mrs.',
61+
'Position': 'Controller',
62+
'Picture': 'images/employees/06.png',
63+
'BirthDate': '1974/11/15',
64+
'HireDate': '2005/05/11',
65+
'Notes': "Sandra is a CPA and has been our controller since 2008. She loves to interact with staff so if you've not met her, be certain to say hi.\r\n\r\nSandra has 2 daughters both of whom are accomplished gymnasts.",
66+
'Address': '4600 N Virginia Rd.',
6767
}, {
68-
"ID": 10,
69-
"FirstName": "Kevin",
70-
"LastName": "Carter",
71-
"Prefix": "Mr.",
72-
"Position": "Shipping Manager",
73-
"Picture": "images/employees/07.png",
74-
"BirthDate": "1978/01/09",
75-
"HireDate": "2009/08/11",
76-
"Notes": "Kevin is our hard-working shipping manager and has been helping that department work like clockwork for 18 months.\r\n\r\nWhen not in the office, he is usually on the basketball court playing pick-up games.",
77-
"Address": "424 N Main St."
68+
'ID': 10,
69+
'FirstName': 'Kevin',
70+
'LastName': 'Carter',
71+
'Prefix': 'Mr.',
72+
'Position': 'Shipping Manager',
73+
'Picture': 'images/employees/07.png',
74+
'BirthDate': '1978/01/09',
75+
'HireDate': '2009/08/11',
76+
'Notes': 'Kevin is our hard-working shipping manager and has been helping that department work like clockwork for 18 months.\r\n\r\nWhen not in the office, he is usually on the basketball court playing pick-up games.',
77+
'Address': '424 N Main St.',
7878
}, {
79-
"ID": 11,
80-
"FirstName": "Cynthia",
81-
"LastName": "Stanwick",
82-
"Prefix": "Ms.",
83-
"Position": "HR Assistant",
84-
"Picture": "images/employees/08.png",
85-
"BirthDate": "1985/06/05",
86-
"HireDate": "2008/03/24",
87-
"Notes": "Cindy joined us in 2008 and has been in the HR department for 2 years. \r\n\r\nShe was recently awarded employee of the month. Way to go Cindy!",
88-
"Address": "3800 S Lamar Blvd."
89-
}];
79+
'ID': 11,
80+
'FirstName': 'Cynthia',
81+
'LastName': 'Stanwick',
82+
'Prefix': 'Ms.',
83+
'Position': 'HR Assistant',
84+
'Picture': 'images/employees/08.png',
85+
'BirthDate': '1985/06/05',
86+
'HireDate': '2008/03/24',
87+
'Notes': 'Cindy joined us in 2008 and has been in the HR department for 2 years. \r\n\r\nShe was recently awarded employee of the month. Way to go Cindy!',
88+
'Address': '3800 S Lamar Blvd.',
89+
}];

jQuery/src/index.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
width: 100%;
88
}
99

10-
#gridContainer {
10+
#grid-container {
1111
min-height: 530px;
1212
}
1313

@@ -23,7 +23,7 @@
2323
padding: 10px;
2424
}
2525

26-
.uploadedImage {
26+
.uploaded-image {
2727
max-width: 150px;
2828
max-height: 150px;
2929
border: 1px solid #ddd;
@@ -32,7 +32,7 @@
3232
margin-bottom: 10px;
3333
}
3434

35-
.retryButton {
35+
.retry-button {
3636
margin-top: 10px;
3737
max-width: 100px;
3838
}

jQuery/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<body class="dx-viewport">
1818
<div class="demo-container">
1919
<div id="data-grid-demo">
20-
<div id="gridContainer"></div>
20+
<div id="grid-container"></div>
2121
</div>
2222
</div>
2323
</body>

0 commit comments

Comments
 (0)