1var app = angular.module('ivcbrasil'); 2app.directive('uiMoveMonth', function () { 3 return { 4 templateUrl: '../app/templates/_shared/moveMonthDirective.html', 5 restrict: 'E', 6 replace: true, 7 scope: { 8 idDatePicker: '@', 9 firstDay: '=', 10 lastDay: '=', 11 previousMonth: '=', 12 nextMonth: '=', 13 fnSubmitFilter: '&' 14 }, 15 controller: function ($scope, $element, $attrs) { 16 var _setNewDatePicker = function (selector, date) { 17 var obj = $(selector).data(); 18 var firstDayOfMonthMinDate = getFirstDayOfMonth(obj.datepicker.settings.minDate); 19 var lastDayOfMonthMaxDate = getLastDayOfMonth(obj.datepicker.settings.maxDate); 20 21 if (date >= firstDayOfMonthMinDate && date <= lastDayOfMonthMaxDate) { 22 $(selector).datepicker('setDate', date); 23 $(selector).datepicker('refresh'); 24 $scope.fnSubmitFilter(); 25 } else { 26 console.error('Não existe mais perÃodo!'); 27 showNotify('Ops!', 'Não existe mais perÃodo!', 'alert'); 28 } 29 }; 30 31 $scope.setPreviousDate = function () { 32 _setNewDatePicker($scope.idDatePicker, $scope.previousMonth) 33 }; 34 35 $scope.setNextDate = function () { 36 _setNewDatePicker($scope.idDatePicker, $scope.nextMonth) 37 }; 38 }, 39 }; 40});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.