X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=public%2Fbower_components%2Fangular-smart-table%2Fsmart-table.js;h=871bb9c5242b1db3d190af429cbac2b57460dfda;hb=221ba7c2ffc043570bbad1e8f0d6074fb4ff1fb0;hp=e0246d4573717b61298cac333575ad3b878d5ec7;hpb=5d92478b1cb7479f39a43973775a6f6147fba8ac;p=motion.git diff --git a/public/bower_components/angular-smart-table/smart-table.js b/public/bower_components/angular-smart-table/smart-table.js index e0246d4..871bb9c 100644 --- a/public/bower_components/angular-smart-table/smart-table.js +++ b/public/bower_components/angular-smart-table/smart-table.js @@ -1,5 +1,5 @@ /** -* @version 2.1.8 +* @version 2.1.5 * @license MIT */ (function (ng, undefined){ @@ -8,7 +8,7 @@ ng.module('smart-table', []).run(['$templateCache', function ($templateCache) { $templateCache.put('template/smart-table/pagination.html', ''); }]); @@ -31,7 +31,6 @@ ng.module('smart-table') sort: { ascentClass: 'st-sort-ascent', descentClass: 'st-sort-descent', - descendingFirst: false, skipNatural: false, delay:300 }, @@ -345,7 +344,6 @@ ng.module('smart-table') var stateClasses = [classAscent, classDescent]; var sortDefault; var skipNatural = attr.stSkipNatural !== undefined ? attr.stSkipNatural : stConfig.sort.skipNatural; - var descendingFirst = attr.stDescendingFirst !== undefined ? attr.stDescendingFirst : stConfig.sort.descendingFirst; var promise = null; var throttle = attr.stDelay || stConfig.sort.delay; @@ -355,12 +353,7 @@ ng.module('smart-table') //view --> table state function sort () { - if (descendingFirst) { - index = index === 0 ? 2 : index - 1; - } else { - index++; - } - + index++; var func; predicate = ng.isFunction(getter(scope)) || ng.isArray(getter(scope)) ? getter(scope) : attr.stSort; if (index % 3 === 0 && !!skipNatural !== true) { @@ -376,7 +369,7 @@ ng.module('smart-table') $timeout.cancel(promise); } if (throttle < 0) { - func(); + scope.$apply(func); } else { promise = $timeout(func, throttle); } @@ -384,7 +377,7 @@ ng.module('smart-table') element.bind('click', function sortClick () { if (predicate) { - scope.$apply(sort); + sort(); } });