style(): jscs updates

This commit is contained in:
Adam Bradley
2015-02-06 19:03:23 -06:00
parent 40b3a6ad97
commit 958d565f1e
13 changed files with 26 additions and 25 deletions

View File

@@ -115,7 +115,7 @@ IonicModule
isDragging = true;
// overscroll according to the user's drag so far
overscroll(parseInt((deltaY - dragOffset)/3, 10));
overscroll(parseInt((deltaY - dragOffset) / 3, 10));
// update the icon accordingly
if (!activated && lastOverscroll > ptrThreshold) {

View File

@@ -74,7 +74,7 @@
return {
y1: spinnerName == 'ios' ? 17 : 12,
y2: spinnerName == 'ios' ? 29 : 20,
t: TRANSLATE32 + ' rotate(' + (30 * i + (i < 6 ? 180: -180)) + ')',
t: TRANSLATE32 + ' rotate(' + (30 * i + (i < 6 ? 180 : -180)) + ')',
a: [{
fn: function() {
return {
@@ -380,9 +380,9 @@
function easeInOutCubic(t, c) {
t /= c / 2;
if (t < 1) return 1/2*t*t*t;
if (t < 1) return 1 / 2 * t * t * t;
t -= 2;
return 1/2*(t*t*t + 2);
return 1 / 2 * (t * t * t + 2);
}
@@ -404,7 +404,7 @@
var container = document.createElement('div');
createSvgElement('svg', {
viewBox: '0 0 64 64',
g: [ spinners[spinnerName] ]
g: [spinners[spinnerName]]
}, container, spinnerName);
// Specifically for animations to work,

View File

@@ -48,7 +48,7 @@ IonicModule
function checkAsideExpose() {
var mq = $attr.exposeAsideWhen == 'large' ? '(min-width:768px)' : $attr.exposeAsideWhen;
sideMenuCtrl.exposeAside( $window.matchMedia(mq).matches );
sideMenuCtrl.exposeAside($window.matchMedia(mq).matches);
sideMenuCtrl.activeAsideResizing(false);
}
@@ -58,9 +58,7 @@ IonicModule
}
var debouncedCheck = ionic.debounce(function() {
$scope.$apply(function(){
checkAsideExpose();
});
$scope.$apply(checkAsideExpose);
}, 300, false);
checkAsideExpose();

View File

@@ -49,7 +49,7 @@ IonicModule
var keyboardHeight = e.keyboardHeight || e.detail.keyboardHeight;
element.css('bottom', keyboardHeight + "px");
scrollCtrl = element.controller('$ionicScroll');
if ( scrollCtrl ) {
if (scrollCtrl) {
scrollCtrl.scrollView.__container.style.bottom = keyboardHeight + keyboardAttachGetClientHeight(element[0]) + "px";
}
}
@@ -60,7 +60,7 @@ IonicModule
}
element.css('bottom', '');
if ( scrollCtrl ) {
if (scrollCtrl) {
scrollCtrl.scrollView.__container.style.bottom = '';
}
}

View File

@@ -8,7 +8,7 @@ IonicModule
restrict: 'E',
transclude: true,
replace: true,
controller: [function(){}],
controller: [function() {}],
template: '<div class="modal-backdrop">' +
'<div class="modal-wrapper" ng-transclude></div>' +
'</div>'

View File

@@ -15,7 +15,7 @@
* <ion-radio ng-model="choice" ng-value="'B'">Choose B</ion-radio>
* <ion-radio ng-model="choice" ng-value="'C'">Choose C</ion-radio>
* ```
*
*
* @param {string=} name The name of the radio input.
* @param {expression=} value The value of the radio input.
* @param {boolean=} disabled The state of the radio input.
@@ -40,7 +40,10 @@ IonicModule
'</label>',
compile: function(element, attr) {
if(attr.icon) element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon);
if (attr.icon) {
element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon);
}
var input = element.find('input');
forEach({
'name': attr.name,

View File

@@ -92,7 +92,7 @@ IonicModule
$ionicBody.enableClass(isAsideExposed, 'aside-open');
});
$scope.$on('$ionicView.beforeEnter', function(ev, d){
$scope.$on('$ionicView.beforeEnter', function(ev, d) {
if (d.historyId) {
$scope.$activeHistoryId = d.historyId;
}

View File

@@ -87,7 +87,7 @@ function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory) {
slider.enableSlide($scope.$eval($attrs.disableScroll) !== true);
$scope.$watch('activeSlide', function(nv) {
if(isDefined(nv)){
if (isDefined(nv)) {
slider.slide(nv);
}
});
@@ -134,7 +134,7 @@ function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory) {
link: function($scope, $element, $attr, slideBoxCtrl) {
// If the pager should show, append it to the slide box
if($scope.$eval($scope.showPager) !== false) {
if ($scope.$eval($scope.showPager) !== false) {
var childScope = $scope.$new();
var pager = jqLite('<ion-pager></ion-pager>');
$element.append(pager);
@@ -151,7 +151,7 @@ function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory) {
element.addClass('slider-slide');
return function($scope, $element, $attr) {
};
},
}
};
})
@@ -165,8 +165,8 @@ function($timeout, $compile, $ionicSlideBoxDelegate, $ionicHistory) {
var selectPage = function(index) {
var children = $element[0].children;
var length = children.length;
for(var i = 0; i < length; i++) {
if(i == index) {
for (var i = 0; i < length; i++) {
if (i == index) {
children[i].classList.add('active');
} else {
children[i].classList.remove('active');

View File

@@ -61,7 +61,7 @@ function($timeout, $ionicConfig) {
}
});
if(attr.toggleClass) {
if (attr.toggleClass) {
element[0].getElementsByTagName('label')[0].classList.add(attr.toggleClass);
}

View File

@@ -13,7 +13,7 @@ IonicModule
parentGet,
unwatch;
switch(mode) {
switch (mode) {
case '@':
if (!attrs[attrName]) {
return;

View File

@@ -155,7 +155,7 @@ function($ionicLoadingConfig, $ionicBody, $ionicTemplateLoader, $ionicBackdrop,
if (self.isShown) {
self.element.addClass('visible');
ionic.requestAnimationFrame(function() {
if(self.isShown) {
if (self.isShown) {
self.element.addClass('active');
$ionicBody.addClass('loading-active');
}

View File

@@ -99,7 +99,7 @@ IonicModule
* - If false or 0 is given, the edge drag threshold is disabled, and dragging from anywhere on the content is allowed.
* @returns {boolean} Whether the drag can start only from within the edge of screen threshold.
*/
'edgeDragThreshold',
'edgeDragThreshold'
/**
* @ngdoc method
* @name $ionicSideMenuDelegate#$getByHandle

View File

@@ -99,7 +99,7 @@ IonicModule
*/
'slidesCount',
'count',
'loop',
'loop'
/**
* @ngdoc method
* @name $ionicSlideBoxDelegate#$getByHandle