1; (function (ng) { 2 'use strict'; 3 4 var datetimepickerExtService = function ($q) { 5 6 var service = this, 7 triggers = {}, 8 queue = {}; 9 10 service.addTrigger = function (id, ctrl) { 11 12 triggers[id] = ctrl; 13 14 if (queue[id] != null) { 15 queue[id].resolve(ctrl).finally(function () { 16 delete queue[id]; 17 }); 18 } 19 }; 20 21 service.getTrigger = function (id) { 22 23 var defer = $q.defer(); 24 25 if (triggers[id] != null) { 26 defer.resolve(triggers[id]); 27 } else { 28 queue[id] = defer; 29 } 30 31 return defer.promise; 32 }; 33 }; 34 35 ng.module('ui.bootstrap.datetimepicker') 36 .service('datetimepickerExtService', datetimepickerExtService); 37 38 datetimepickerExtService.$inject = ['$q']; 39 40})(window.angular);
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.