Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Commit 223801e

Browse files
committed
style(jshint): Mixed double and single quotes correction.
1 parent ed4cb33 commit 223801e

File tree

7 files changed

+40
-40
lines changed

7 files changed

+40
-40
lines changed

demo/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ angular.module('ui.scroll')
1010
var i, result, _i, _ref;
1111
result = [];
1212
for (i = _i = index, _ref = index + count - 1; index <= _ref ? _i <= _ref : _i >= _ref; i = index <= _ref ? ++_i : --_i) {
13-
result.push("item #" + i);
13+
result.push('item #' + i);
1414
}
1515
return success(result);
1616
}, 100);

modules/ie-shiv/ie-shiv.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
var dashed = str.replace(/([A-Z])/g, function ($1) {
3131
return " " + $1.toLowerCase();
3232
});
33-
var tokens = dashed.split(' ');
33+
var tokens = dashed.split(" ");
3434

3535
// If a token is just a single name (i.e. no namespace) then we juse define the elements the name given
3636
if (tokens.length === 1) {
@@ -41,7 +41,7 @@
4141
result.push("data-" + name);
4242
} else {
4343
var ns = tokens[0];
44-
var dirname = tokens.slice(1).join('-');
44+
var dirname = tokens.slice(1).join("-");
4545

4646
// this is finite list and it seemed senseless to create a custom method
4747
result.push(ns + ":" + dirname);

modules/mask/mask.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ angular.module('ui.mask', [])
215215
function getPlaceholderChar(i) {
216216
var placeholder = iAttrs.placeholder;
217217

218-
if (typeof placeholder !== "undefined" && placeholder[i]) {
218+
if (typeof placeholder !== 'undefined' && placeholder[i]) {
219219
return placeholder[i];
220220
} else {
221-
return "_";
221+
return '_';
222222
}
223223
}
224224

@@ -245,7 +245,7 @@ angular.module('ui.mask', [])
245245
minRequiredLength = 0;
246246

247247
var isOptional = false,
248-
splitMask = mask.split("");
248+
splitMask = mask.split('');
249249

250250
angular.forEach(splitMask, function (chr, i){
251251
if (linkOptions.maskDefinitions[chr]) {
@@ -260,7 +260,7 @@ angular.module('ui.mask', [])
260260
minRequiredLength++;
261261
}
262262
}
263-
else if (chr === "?") {
263+
else if (chr === '?') {
264264
isOptional = true;
265265
}
266266
else {

modules/scroll/ui-scroll-jqlite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ angular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [
5656
convertToPx = function(elem, value) {
5757
var core_pnum, left, result, rnumnonpx, rs, rsLeft, style;
5858
core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
59-
rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i");
59+
rnumnonpx = new RegExp('^(' + core_pnum + ')(?!px)[a-z%]+$', 'i');
6060
if (!rnumnonpx.test(value)) {
6161
return parseFloat(value);
6262
} else {

modules/scroll/ui-scroll.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
3333
var adapter, adjustBuffer, adjustRowHeight, bof, bottomVisiblePos, buffer, bufferPadding, bufferSize, clipBottom, clipTop, datasource, datasourceName, enqueueFetch, eof, eventListener, fetch, finalize, first, insert, isDatasource, isLoading, itemName, loading, match, next, pending, reload, removeFromBuffer, resizeHandler, scrollHandler, scrollHeight, shouldLoadBottom, shouldLoadTop, tempScope, topVisiblePos, viewport;
3434
match = $attr.ngScroll.match(/^\s*(\w+)\s+in\s+(\w+)\s*$/);
3535
if (!match) {
36-
throw new Error("Expected ngScroll in form of '_item_ in _datasource_' but got '" + $attr.ngScroll + "'");
36+
throw new Error('Expected ngScroll in form of "item_ in _datasource_" but got "' + $attr.ngScroll + '"');
3737
}
3838
itemName = match[1];
3939
datasourceName = match[2];
@@ -44,7 +44,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
4444
if (!isDatasource(datasource)) {
4545
datasource = $injector.get(datasourceName);
4646
if (!isDatasource(datasource)) {
47-
throw new Error("" + datasourceName + " is not a valid datasource");
47+
throw new Error(datasourceName + ' is not a valid datasource');
4848
}
4949
}
5050
bufferSize = Math.max(3, +$attr.bufferSize || 10);
@@ -59,7 +59,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
5959
var bottomPadding, createPadding, padding, repeaterType, topPadding, viewport;
6060
repeaterType = template[0].localName;
6161
if (repeaterType === 'dl') {
62-
throw new Error("ng-scroll directive does not support <" + template[0].localName + "> as a repeating tag: " + template[0].outerHTML);
62+
throw new Error('ng-scroll directive does not support <' + template[0].localName + '> as a repeating tag: ' + template[0].outerHTML);
6363
}
6464
if (repeaterType !== 'li' && repeaterType !== 'tr') {
6565
repeaterType = 'div';
@@ -81,7 +81,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
8181
};
8282
return result;
8383
default:
84-
result = angular.element("<" + repeaterType + "></" + repeaterType + ">");
84+
result = angular.element('<' + repeaterType + '></' + repeaterType + '>');
8585
result.paddingHeight = result.height;
8686
return result;
8787
}
@@ -175,7 +175,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
175175
adapter.bottomPadding(adapter.bottomPadding() + bottomHeight);
176176
removeFromBuffer(buffer.length - overage, buffer.length);
177177
next -= overage;
178-
return console.log("clipped off bottom " + overage + " bottom padding " + (adapter.bottomPadding()));
178+
return console.log('clipped off bottom ' + overage + ' bottom padding ' + (adapter.bottomPadding()));
179179
}
180180
};
181181
shouldLoadTop = function() {
@@ -200,7 +200,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
200200
adapter.topPadding(adapter.topPadding() + topHeight);
201201
removeFromBuffer(0, overage);
202202
first += overage;
203-
return console.log("clipped off top " + overage + " top padding " + (adapter.topPadding()));
203+
return console.log('clipped off top ' + overage + ' top padding ' + (adapter.topPadding()));
204204
}
205205
};
206206
enqueueFetch = function(direction, scrolling) {
@@ -260,7 +260,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
260260
adjustBuffer = function(scrolling, newItems, finalize) {
261261
var doAdjustment;
262262
doAdjustment = function() {
263-
console.log("top {actual=" + (adapter.topDataPos()) + " visible from=" + (topVisiblePos()) + " bottom {visible through=" + (bottomVisiblePos()) + " actual=" + (adapter.bottomDataPos()) + "}");
263+
console.log('top {actual=' + (adapter.topDataPos()) + ' visible from=' + (topVisiblePos()) + ' bottom {visible through=' + (bottomVisiblePos()) + ' actual=' + (adapter.bottomDataPos()) + '}');
264264
if (shouldLoadBottom()) {
265265
enqueueFetch(true, scrolling);
266266
} else {
@@ -309,14 +309,14 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
309309
if (result.length === 0) {
310310
eof = true;
311311
adapter.bottomPadding(0);
312-
console.log("appended: requested " + bufferSize + " records starting from " + next + " recieved: eof");
312+
console.log('appended: requested ' + bufferSize + ' records starting from ' + next + ' recieved: eof');
313313
} else {
314314
clipTop();
315315
for (_i = 0, _len = result.length; _i < _len; _i++) {
316316
item = result[_i];
317317
newItems.push(insert(++next, item));
318318
}
319-
console.log("appended: requested " + bufferSize + " received " + result.length + " buffer size " + buffer.length + " first " + first + " next " + next);
319+
console.log('appended: requested ' + bufferSize + ' received ' + result.length + ' buffer size ' + buffer.length + ' first ' + first + ' next ' + next);
320320
}
321321
return finalize(scrolling, newItems);
322322
});
@@ -331,13 +331,13 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
331331
if (result.length === 0) {
332332
bof = true;
333333
adapter.topPadding(0);
334-
console.log("prepended: requested " + bufferSize + " records starting from " + (first - bufferSize) + " recieved: bof");
334+
console.log('prepended: requested ' + bufferSize + ' records starting from ' + (first - bufferSize) + ' recieved: bof');
335335
} else {
336336
clipBottom();
337337
for (i = _i = _ref = result.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
338338
newItems.unshift(insert(--first, result[i]));
339339
}
340-
console.log("prepended: requested " + bufferSize + " received " + result.length + " buffer size " + buffer.length + " first " + first + " next " + next);
340+
console.log('prepended: requested ' + bufferSize + ' received ' + result.length + ' buffer size ' + buffer.length + ' first ' + first + ' next ' + next);
341341
}
342342
return finalize(scrolling, newItems);
343343
});
@@ -371,7 +371,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
371371
viewport.unbind('resize', resizeHandler);
372372
return viewport.unbind('scroll', scrollHandler);
373373
});
374-
eventListener.$on("update.items", function(event, locator, newItem) {
374+
eventListener.$on('update.items', function(event, locator, newItem) {
375375
var wrapper, _fn, _i, _len, _ref;
376376
if (angular.isFunction(locator)) {
377377
_fn = function(wrapper) {
@@ -388,7 +388,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
388388
}
389389
return null;
390390
});
391-
eventListener.$on("delete.items", function(event, locator) {
391+
eventListener.$on('delete.items', function(event, locator) {
392392
var i, item, temp, wrapper, _fn, _i, _j, _k, _len, _len1, _len2, _ref;
393393
if (angular.isFunction(locator)) {
394394
temp = [];
@@ -418,7 +418,7 @@ angular.module('ui.scroll', []).directive('ngScrollViewport', [
418418
}
419419
return adjustBuffer(false);
420420
});
421-
return eventListener.$on("insert.item", function(event, locator, item) {
421+
return eventListener.$on('insert.item', function(event, locator, item) {
422422
var i, inserted, temp, wrapper, _fn, _i, _j, _k, _len, _len1, _len2, _ref;
423423
inserted = [];
424424
if (angular.isFunction(locator)) {

modules/scrollfix/scrollfix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ angular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function
2929
if (angular.isDefined($window.pageYOffset)) {
3030
offset = $window.pageYOffset;
3131
} else {
32-
var iebody = (document.compatMode && document.compatMode !== "BackCompat") ? document.documentElement : document.body;
32+
var iebody = (document.compatMode && document.compatMode !== 'BackCompat') ? document.documentElement : document.body;
3333
offset = iebody.scrollTop;
3434
}
3535
if (!elm.hasClass('ui-scrollfix') && offset > attrs.uiScrollfix) {

modules/utils.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
angular.module('ui.utils', [
2-
"ui.event",
3-
"ui.format",
4-
"ui.highlight",
5-
"ui.include",
6-
"ui.indeterminate",
7-
"ui.inflector",
8-
"ui.jq",
9-
"ui.keypress",
10-
"ui.mask",
11-
"ui.reset",
12-
"ui.route",
13-
"ui.scrollfix",
14-
"ui.scroll",
15-
"ui.scroll.jqlite",
16-
"ui.showhide",
17-
"ui.unique",
18-
"ui.validate"
2+
'ui.event',
3+
'ui.format',
4+
'ui.highlight',
5+
'ui.include',
6+
'ui.indeterminate',
7+
'ui.inflector',
8+
'ui.jq',
9+
'ui.keypress',
10+
'ui.mask',
11+
'ui.reset',
12+
'ui.route',
13+
'ui.scrollfix',
14+
'ui.scroll',
15+
'ui.scroll.jqlite',
16+
'ui.showhide',
17+
'ui.unique',
18+
'ui.validate'
1919
]);

0 commit comments

Comments
 (0)