Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit f2ef19b

Browse files
committed
style(jshint): make jshint happy
1 parent 30b8e9c commit f2ef19b

File tree

3 files changed

+77
-71
lines changed

3 files changed

+77
-71
lines changed

gruntFile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = function(grunt) {
24

35
grunt.loadNpmTasks('grunt-karma');
@@ -35,7 +37,7 @@ module.exports = function(grunt) {
3537
globals: {
3638
angular: false,
3739
inject: false,
38-
jQuery: false,
40+
'$': false,
3941

4042
jasmine: false,
4143
afterEach: false,

src/sortable.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
/*
24
jQuery UI Sortable plugin wrapper
35
@@ -12,7 +14,7 @@ angular.module('ui.sortable', [])
1214
link: function(scope, element, attrs, ngModel) {
1315

1416
function combineCallbacks(first,second){
15-
if( second && (typeof second === "function") ){
17+
if( second && (typeof second === 'function') ){
1618
return function(e,ui){
1719
first(e,ui);
1820
second(e,ui);
@@ -30,7 +32,7 @@ angular.module('ui.sortable', [])
3032
stop:null,
3133
update:null
3234
};
33-
35+
3436
var apply = function(e, ui) {
3537
if (ui.item.sortable.resort || ui.item.sortable.relocate) {
3638
scope.$apply();
@@ -42,7 +44,7 @@ angular.module('ui.sortable', [])
4244
if (ngModel) {
4345

4446
ngModel.$render = function() {
45-
element.sortable( "refresh" );
47+
element.sortable( 'refresh' );
4648
};
4749

4850
callbacks.start = function(e, ui) {
@@ -85,13 +87,13 @@ angular.module('ui.sortable', [])
8587
}
8688
};
8789

88-
scope.$watch(attrs.uiSortable, function(newVal, oldVal){
90+
scope.$watch(attrs.uiSortable, function(newVal){
8991
angular.forEach(newVal, function(value, key){
9092

9193
if( callbacks[key] ){
9294
// wrap the callback
9395
value = combineCallbacks( callbacks[key], value );
94-
96+
9597
if ( key === 'stop' ){
9698
// call apply after stop
9799
value = combineCallbacks( value, apply );
@@ -106,7 +108,7 @@ angular.module('ui.sortable', [])
106108

107109
opts[key] = combineCallbacks(value, opts[key]);
108110
});
109-
111+
110112
// call apply after stop
111113
opts.stop = combineCallbacks( opts.stop, apply );
112114

0 commit comments

Comments
 (0)