mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
style(): jscs updates
This commit is contained in:
2
js/angular/controller/refresherController.js
vendored
2
js/angular/controller/refresherController.js
vendored
@@ -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) {
|
||||
|
||||
8
js/angular/controller/spinnerController.js
vendored
8
js/angular/controller/spinnerController.js
vendored
@@ -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,
|
||||
|
||||
6
js/angular/directive/exposeAsideWhen.js
vendored
6
js/angular/directive/exposeAsideWhen.js
vendored
@@ -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();
|
||||
|
||||
4
js/angular/directive/keyboardAttach.js
vendored
4
js/angular/directive/keyboardAttach.js
vendored
@@ -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 = '';
|
||||
}
|
||||
}
|
||||
|
||||
2
js/angular/directive/modal.js
vendored
2
js/angular/directive/modal.js
vendored
@@ -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>'
|
||||
|
||||
7
js/angular/directive/radio.js
vendored
7
js/angular/directive/radio.js
vendored
@@ -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,
|
||||
|
||||
2
js/angular/directive/sideMenus.js
vendored
2
js/angular/directive/sideMenus.js
vendored
@@ -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;
|
||||
}
|
||||
|
||||
10
js/angular/directive/slideBox.js
vendored
10
js/angular/directive/slideBox.js
vendored
@@ -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');
|
||||
|
||||
2
js/angular/directive/toggle.js
vendored
2
js/angular/directive/toggle.js
vendored
@@ -61,7 +61,7 @@ function($timeout, $ionicConfig) {
|
||||
}
|
||||
});
|
||||
|
||||
if(attr.toggleClass) {
|
||||
if (attr.toggleClass) {
|
||||
element[0].getElementsByTagName('label')[0].classList.add(attr.toggleClass);
|
||||
}
|
||||
|
||||
|
||||
2
js/angular/service/bind.js
vendored
2
js/angular/service/bind.js
vendored
@@ -13,7 +13,7 @@ IonicModule
|
||||
parentGet,
|
||||
unwatch;
|
||||
|
||||
switch(mode) {
|
||||
switch (mode) {
|
||||
case '@':
|
||||
if (!attrs[attrName]) {
|
||||
return;
|
||||
|
||||
2
js/angular/service/loading.js
vendored
2
js/angular/service/loading.js
vendored
@@ -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');
|
||||
}
|
||||
|
||||
2
js/angular/service/sideMenuDelegate.js
vendored
2
js/angular/service/sideMenuDelegate.js
vendored
@@ -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
|
||||
|
||||
2
js/angular/service/slideBoxDelegate.js
vendored
2
js/angular/service/slideBoxDelegate.js
vendored
@@ -99,7 +99,7 @@ IonicModule
|
||||
*/
|
||||
'slidesCount',
|
||||
'count',
|
||||
'loop',
|
||||
'loop'
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $ionicSlideBoxDelegate#$getByHandle
|
||||
|
||||
Reference in New Issue
Block a user