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

Commit 890ba8d

Browse files
author
Dean Sofer
committed
Merge branch 'gjungb-master'
* gjungb-master: added {} and ; to make JSHint pass added var statement for 'onStop', reordered vars changed comment from _start to _stop Conflicts: src/sortable.js
2 parents cb660bc + 3e45085 commit 890ba8d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/sortable.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,44 +67,49 @@ angular.module('ui.sortable', []).value('uiSortableConfig',{}).directive('uiSort
6767
opts.start = (function(_start){
6868
return function(e, ui) {
6969
onStart(e, ui);
70-
if (typeof _start === "function")
70+
if ( typeof _start === "function") {
7171
_start(e, ui);
72-
}
72+
}
73+
};
7374
})(opts.start);
7475

75-
// If user provided 'start' callback compose it with onStart function
76+
// If user provided 'stop' callback compose it with onStop function
7677
opts.stop = (function(_stop){
7778
return function(e, ui) {
7879
onStop(e, ui);
79-
if (typeof _stop === "function")
80+
if (typeof _stop === "function") {
8081
_stop(e, ui);
81-
}
82+
}
83+
};
8284
})(opts.stop);
8385

8486
// If user provided 'update' callback compose it with onUpdate function
8587
opts.update = (function(_update){
8688
return function(e, ui) {
8789
onUpdate(e, ui);
88-
if (typeof _update === "function")
90+
if (typeof _update === "function") {
8991
_update(e, ui);
90-
}
92+
}
93+
};
9194
})(opts.update);
9295

9396
// If user provided 'receive' callback compose it with onReceive function
9497
opts.receive = (function(_receive){
9598
return function(e, ui) {
9699
onReceive(e, ui);
97-
if (typeof _receive === "function")
100+
if (typeof _receive === "function") {
98101
_receive(e, ui);
99-
}
102+
}
103+
};
100104
})(opts.receive);
101105

102106
// If user provided 'remove' callback compose it with onRemove function
103107
opts.remove = (function(_remove){
104108
return function(e, ui) {
105109
onRemove(e, ui);
106-
if (typeof _remove === "function")
110+
if (typeof _remove === "function") {
107111
_remove(e, ui);
112+
}
108113
};
109114
})(opts.remove);
110115
}

0 commit comments

Comments
 (0)