From eefed04bc727887f9e425f0fc91d61dd6c747059 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Thu, 27 Nov 2014 23:16:09 +0300 Subject: [PATCH] + use strict & code style --- ng-sortable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ng-sortable.js b/ng-sortable.js index 1ed33af..e064967 100644 --- a/ng-sortable.js +++ b/ng-sortable.js @@ -5,6 +5,8 @@ angular.module('ng-sortable', []) .constant('$version', '0.1.0') .directive('ngSortable', ['$parse', '$rootScope', function ($parse, $rootScope) { + "use strict"; + var removed; function getSource(el) { @@ -72,7 +74,7 @@ angular.module('ng-sortable', []) } - var sortable = Sortable.create(el, Object.keys(options).reduce(function(opts, name) { + var sortable = Sortable.create(el, Object.keys(options).reduce(function (opts, name) { opts[name] = opts[name] || options[name]; return opts; }, { @@ -80,7 +82,7 @@ angular.module('ng-sortable', []) $rootScope.$broadcast('sortable:start', sortable); options.onStart(); }, - onEnd:function () { + onEnd: function () { $rootScope.$broadcast('sortable:end', sortable); options.onEnd(); },