Skip to content

Commit bc578fc

Browse files
committed
Code style fixes
1 parent 67730fe commit bc578fc

File tree

5 files changed

+66
-58
lines changed

5 files changed

+66
-58
lines changed

samples/grid/master-detail/app/services/fakeServerService.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,23 @@ app.service("fakeServerService",
126126

127127
insert: function (home) {
128128

129-
if (typeof home != "object") throw new Error("A home object is required to do an insert.");
129+
if (typeof home != "object") {
130+
throw new Error("A home object is required to do an insert.");
131+
}
130132

131133
home.id = Math.uuidCompact();
132134
svc.data.unshift(home);
133135
svc.serializeData();
136+
134137
},
135138

136139
update: function (home) {
137140

138-
if (typeof home != "object") throw new Error("A home object is required to do an update.");
141+
if (typeof home != "object") {
142+
throw new Error("A home object is required to do an update.");
143+
}
139144

140-
var
141-
len = svc.data.length,
145+
var len = svc.data.length,
142146
index = 0;
143147

144148
while (len--) {
@@ -171,10 +175,11 @@ app.service("fakeServerService",
171175

172176
var lengthOfUUID = 36;
173177

174-
if (id.length != lengthOfUUID) throw new Error("A valid UUID value is required as an ID.");
178+
if (id.length != lengthOfUUID) {
179+
throw new Error("A valid UUID value is required as an ID.");
180+
}
175181

176-
var
177-
len = svc.data.length,
182+
var len = svc.data.length,
178183
index = 0;
179184

180185
while (len--) {
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
var app = angular.module('app',
4-
['ngResource',
5-
'igniteui-directives',]);
3+
var app = angular.module("app", ["ngResource", "igniteui-directives"]);
64

7-
app.constant('localStorage', window.localStorage);
5+
app.constant("localStorage", window.localStorage);

src-samples/src/grid/master-detail/app/services/fakeServerService.js

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
app.service('fakeServerService',
2-
['localStorage',
1+
app.service("fakeServerService",
2+
["localStorage",
33
function (localStorage) {
44

5-
'use strict';
5+
"use strict";
66

77
var svc = {
88
data: [],
99

10-
key: 'homes.data',
10+
key: "homes.data",
1111

1212
serializeData: function () {
1313
localStorage[svc.key] = JSON.stringify(svc.data);
@@ -74,9 +74,9 @@ app.service('fakeServerService',
7474
];
7575

7676
var cities = [
77-
'Mayberry',
78-
'Anytown',
79-
'Riverdale'
77+
"Mayberry",
78+
"Anytown",
79+
"Riverdale"
8080
];
8181

8282
var zipCodes = [
@@ -101,7 +101,7 @@ app.service('fakeServerService',
101101
streetAddress: addresses[i],
102102
city: cities[counter-1],
103103
zipCode: zipCodes[counter-1],
104-
imageName: counter + '.jpg',
104+
imageName: counter + ".jpg",
105105
price: getRandomNumber(220000, 345000),
106106
bedrooms: getRandomNumber(3, 4),
107107
bathrooms: getRandomNumber(2, 3),
@@ -126,19 +126,23 @@ app.service('fakeServerService',
126126

127127
insert: function (home) {
128128

129-
if (typeof home != 'object') throw new Error('A home object is required to do an insert.');
129+
if (typeof home != "object") {
130+
throw new Error("A home object is required to do an insert.");
131+
}
130132

131133
home.id = Math.uuidCompact();
132134
svc.data.unshift(home);
133135
svc.serializeData();
136+
134137
},
135138

136139
update: function (home) {
137140

138-
if (typeof home != 'object') throw new Error('A home object is required to do an update.');
141+
if (typeof home != "object") {
142+
throw new Error("A home object is required to do an update.");
143+
}
139144

140-
var
141-
len = svc.data.length,
145+
var len = svc.data.length,
142146
index = 0;
143147

144148
while (len--) {
@@ -167,14 +171,15 @@ app.service('fakeServerService',
167171
return returnValue;
168172
},
169173

170-
'delete': function (id) {
174+
"delete": function (id) {
171175

172176
var lengthOfUUID = 36;
173177

174-
if (id.length != lengthOfUUID) throw new Error('A valid UUID value is required as an ID.');
178+
if (id.length != lengthOfUUID) {
179+
throw new Error("A valid UUID value is required as an ID.");
180+
}
175181

176-
var
177-
len = svc.data.length,
182+
var len = svc.data.length,
178183
index = 0;
179184

180185
while (len--) {
@@ -195,27 +200,27 @@ app.service('fakeServerService',
195200
return {
196201
data: svc.data,
197202
insert: svc.insert,
198-
'delete': svc.delete,
203+
"delete": svc.delete,
199204
update: svc.update,
200205
getById: svc.getById
201206
};
202207

203208
}]);
204209

205-
app.config(['$provide',
210+
app.config(["$provide",
206211
function ($provide) {
207-
$provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
212+
$provide.decorator("$httpBackend", angular.mock.e2e.$httpBackendDecorator);
208213
}]);
209214

210215
app.run(
211-
['$httpBackend', 'fakeServerService',
216+
["$httpBackend", "fakeServerService",
212217
function ($httpBackend, fakeServerService) {
213218

214219
var apiRegex = /\/api\/homes\//;
215220

216-
$httpBackend.whenGET('/api/homes').respond(fakeServerService.data);
221+
$httpBackend.whenGET("/api/homes").respond(fakeServerService.data);
217222

218-
$httpBackend.whenPOST('/api/homes').respond(function (method, uri, data) {
223+
$httpBackend.whenPOST("/api/homes").respond(function (method, uri, data) {
219224
var home = angular.fromJson(data);
220225

221226
if (home.id === null) {

src-samples/src/js/data/candidates.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
app.factory('candidates', [function () {
1+
app.factory("candidates", [function () {
22

33
var svc = {
44
data: [
5-
{name: 'Douglas Crockford', text: 'Douglas Crockford is an American computer programmer and entrepreneur who is best known for his ongoing involvement in the development of the JavaScript language, for having popularized the data format JSON (JavaScript Object Notation), and for developing various JavaScript related tools such as JSLint and JSMin. He is currently a senior JavaScript architect at PayPal, and is also a writer and speaker on JavaScript, JSON, and related web technologies such as the Yahoo! User Interface Library (YUI).', skills: [
6-
{description: 'JavaScript'},
7-
{description: 'JSON'},
8-
{description: 'HTML'},
9-
{description: 'JSLint'}
10-
], picture: 'http://www.igniteui.com/images/samples/tile-manager/450px-Douglas_Crockford.jpg', linkedin: 'http://www.linkedin.com/groups?gid=3165057&trk=group-name'
5+
{name: "Douglas Crockford", text: "Douglas Crockford is an American computer programmer and entrepreneur who is best known for his ongoing involvement in the development of the JavaScript language, for having popularized the data format JSON (JavaScript Object Notation), and for developing various JavaScript related tools such as JSLint and JSMin. He is currently a senior JavaScript architect at PayPal, and is also a writer and speaker on JavaScript, JSON, and related web technologies such as the Yahoo! User Interface Library (YUI).", skills: [
6+
{description: "JavaScript"},
7+
{description: "JSON"},
8+
{description: "HTML"},
9+
{description: "JSLint"}
10+
], picture: "http://www.igniteui.com/images/samples/tile-manager/450px-Douglas_Crockford.jpg", linkedin: "http://www.linkedin.com/groups?gid=3165057&trk=group-name"
1111
},
12-
{name: 'John Resig', text: 'John Resig is the Dean of Computer Science at Khan Academy and the creator of the jQuery JavaScript library. He\'s also the author of the books Pro JavaScript Techniques and Secrets of the JavaScript Ninja. Currently, John is located in Brooklyn, NY and enjoys studying Ukiyo-e (Japanese Woodblock Printing) in his spare time.', skills: [
13-
{description: 'JavaScript'},
14-
{description: 'JSON'},
15-
{description: 'HTML'},
16-
{description: 'jQuery'}
17-
], picture: 'http://www.igniteui.com/images/samples/tile-manager/3450728563_69b0bd0743_m.jpg', linkedin: 'http://www.linkedin.com/groups?viewMembers=&gid=100943&sik=1360507269893&goback=%2Eanp_100943_1360507269892_1'
12+
{name: "John Resig", text: "John Resig is the Dean of Computer Science at Khan Academy and the creator of the jQuery JavaScript library. He's also the author of the books Pro JavaScript Techniques and Secrets of the JavaScript Ninja. Currently, John is located in Brooklyn, NY and enjoys studying Ukiyo-e (Japanese Woodblock Printing) in his spare time.", skills: [
13+
{description: "JavaScript"},
14+
{description: "JSON"},
15+
{description: "HTML"},
16+
{description: "jQuery"}
17+
], picture: "http://www.igniteui.com/images/samples/tile-manager/3450728563_69b0bd0743_m.jpg", linkedin: "http://www.linkedin.com/groups?viewMembers=&gid=100943&sik=1360507269893&goback=%2Eanp_100943_1360507269892_1"
1818
},
19-
{name: 'Bill Gates', text: 'William Henry "Bill" Gates III (born October 28, 1955) is an American programmer, inventor, business magnate and philanthropist. Gates is the former chief executive and current chairman of Microsoft, the world\'s largest personal-computer software company, which he co-founded with Paul Allen. He is consistently ranked among the world\'s wealthiest people and was the wealthiest overall from 1995 to 2009, excluding 2008, when he was ranked third; in 2011 he was the wealthiest American and the second wealthiest person. During his career at Microsoft, Gates held the positions of CEO and chief software architect, and remains the largest individual shareholder, with 6.4 percent of the common stock. He has also authored and co-authored several books.', skills: [
20-
{description: 'Entrepreneurship'},
21-
{description: 'VB'},
22-
{description: 'Operating Systems'},
23-
{description: 'Programming Languages'}
24-
], picture: 'http://www.igniteui.com/images/samples/tile-manager/220px-BillGates2012.jpg', linkedin: 'http://www.linkedin.com/company/8736?trk=tyah'
19+
{name: "Bill Gates", text: "William Henry 'Bill' Gates III (born October 28, 1955) is an American programmer, inventor, business magnate and philanthropist. Gates is the former chief executive and current chairman of Microsoft, the world's largest personal-computer software company, which he co-founded with Paul Allen. He is consistently ranked among the world's wealthiest people and was the wealthiest overall from 1995 to 2009, excluding 2008, when he was ranked third; in 2011 he was the wealthiest American and the second wealthiest person. During his career at Microsoft, Gates held the positions of CEO and chief software architect, and remains the largest individual shareholder, with 6.4 percent of the common stock. He has also authored and co-authored several books.", skills: [
20+
{description: "Entrepreneurship"},
21+
{description: "VB"},
22+
{description: "Operating Systems"},
23+
{description: "Programming Languages"}
24+
], picture: "http://www.igniteui.com/images/samples/tile-manager/220px-BillGates2012.jpg", linkedin: "http://www.linkedin.com/company/8736?trk=tyah"
2525
},
2626
{
27-
name: 'Jon Skeet', text: 'Author of C# in Depth. Currently a software engineer at Google, London. Usually a Microsoft MVP (C#, 2003-2010, 2011-)', skills: [
28-
{ description: 'C#' },
29-
{ description: '.NET' },
30-
{ description: 'Java' }
31-
], picture: 'http://www.igniteui.com/images/samples/tile-manager/jonskeet.jpg', linkedin: 'uk.linkedin.com/pub/jon-skeet/0/800/ba3'
27+
name: "Jon Skeet", text: "Author of C# in Depth. Currently a software engineer at Google, London. Usually a Microsoft MVP (C#, 2003-2010, 2011-)", skills: [
28+
{ description: "C#" },
29+
{ description: ".NET" },
30+
{ description: "Java" }
31+
], picture: "http://www.igniteui.com/images/samples/tile-manager/jonskeet.jpg", linkedin: "uk.linkedin.com/pub/jon-skeet/0/800/ba3"
3232
}
3333
]
3434
};

src-samples/src/sample.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ footer {
2525
}
2626

2727
.try-it-out hr {
28-
margin: 0px;
28+
margin: 0;
2929
margin-top: 4px;
3030
}
3131

0 commit comments

Comments
 (0)