From a65e89cf1cee5515fadfee029e930f05c1a2eb4a Mon Sep 17 00:00:00 2001 From: Olivier Louvignes Date: Fri, 30 May 2014 20:06:17 +0200 Subject: [PATCH] chore(release): cut the v2.0.3 release --- bower.json | 2 +- dist/angular-strap.js | 1330 +++++++++++++------------ dist/angular-strap.min.js | 6 +- dist/angular-strap.min.js.map | 8 - dist/angular-strap.tpl.js | 12 +- dist/angular-strap.tpl.min.js | 4 +- dist/angular-strap.tpl.min.js.map | 8 - dist/modules/affix.js | 2 +- dist/modules/affix.min.js | 2 +- dist/modules/affix.min.js.map | 8 - dist/modules/alert.js | 11 +- dist/modules/alert.min.js | 4 +- dist/modules/alert.min.js.map | 8 - dist/modules/alert.tpl.js | 4 +- dist/modules/alert.tpl.min.js | 4 +- dist/modules/aside.js | 2 +- dist/modules/aside.min.js | 2 +- dist/modules/aside.min.js.map | 8 - dist/modules/aside.tpl.js | 2 +- dist/modules/aside.tpl.min.js | 2 +- dist/modules/button.js | 2 +- dist/modules/button.min.js | 2 +- dist/modules/button.min.js.map | 8 - dist/modules/date-parser.js | 10 +- dist/modules/date-parser.min.js | 4 +- dist/modules/date-parser.min.js.map | 8 - dist/modules/datepicker.js | 20 +- dist/modules/datepicker.min.js | 4 +- dist/modules/datepicker.min.js.map | 8 - dist/modules/datepicker.tpl.js | 4 +- dist/modules/datepicker.tpl.min.js | 4 +- dist/modules/debounce.js | 2 +- dist/modules/debounce.min.js | 2 +- dist/modules/debounce.min.js.map | 8 - dist/modules/dimensions.js | 8 +- dist/modules/dimensions.min.js | 4 +- dist/modules/dimensions.min.js.map | 8 - dist/modules/dropdown.js | 2 +- dist/modules/dropdown.min.js | 2 +- dist/modules/dropdown.min.js.map | 8 - dist/modules/dropdown.tpl.js | 4 +- dist/modules/dropdown.tpl.min.js | 4 +- dist/modules/modal.js | 6 +- dist/modules/modal.min.js | 4 +- dist/modules/modal.min.js.map | 8 - dist/modules/modal.tpl.js | 2 +- dist/modules/modal.tpl.min.js | 2 +- dist/modules/navbar.js | 2 +- dist/modules/navbar.min.js | 2 +- dist/modules/navbar.min.js.map | 8 - dist/modules/parse-options.js | 2 +- dist/modules/parse-options.min.js | 2 +- dist/modules/parse-options.min.js.map | 8 - dist/modules/popover.js | 8 +- dist/modules/popover.min.js | 4 +- dist/modules/popover.min.js.map | 8 - dist/modules/popover.tpl.js | 2 +- dist/modules/popover.tpl.min.js | 2 +- dist/modules/raf.js | 2 +- dist/modules/raf.min.js | 2 +- dist/modules/raf.min.js.map | 8 - dist/modules/scrollspy.js | 2 +- dist/modules/scrollspy.min.js | 2 +- dist/modules/scrollspy.min.js.map | 8 - dist/modules/select.js | 35 +- dist/modules/select.min.js | 4 +- dist/modules/select.min.js.map | 8 - dist/modules/select.tpl.js | 4 +- dist/modules/select.tpl.min.js | 4 +- dist/modules/tab.js | 2 +- dist/modules/tab.min.js | 2 +- dist/modules/tab.min.js.map | 8 - dist/modules/tab.tpl.js | 2 +- dist/modules/tab.tpl.min.js | 2 +- dist/modules/timepicker.js | 23 +- dist/modules/timepicker.min.js | 4 +- dist/modules/timepicker.min.js.map | 8 - dist/modules/timepicker.tpl.js | 4 +- dist/modules/timepicker.tpl.min.js | 4 +- dist/modules/tooltip.js | 25 +- dist/modules/tooltip.min.js | 4 +- dist/modules/tooltip.min.js.map | 8 - dist/modules/tooltip.tpl.js | 2 +- dist/modules/tooltip.tpl.min.js | 2 +- dist/modules/typeahead.js | 4 +- dist/modules/typeahead.min.js | 4 +- dist/modules/typeahead.min.js.map | 8 - dist/modules/typeahead.tpl.js | 2 +- dist/modules/typeahead.tpl.min.js | 2 +- package.json | 2 +- 90 files changed, 855 insertions(+), 971 deletions(-) delete mode 100644 dist/angular-strap.min.js.map delete mode 100644 dist/angular-strap.tpl.min.js.map delete mode 100644 dist/modules/affix.min.js.map delete mode 100644 dist/modules/alert.min.js.map delete mode 100644 dist/modules/aside.min.js.map delete mode 100644 dist/modules/button.min.js.map delete mode 100644 dist/modules/date-parser.min.js.map delete mode 100644 dist/modules/datepicker.min.js.map delete mode 100644 dist/modules/debounce.min.js.map delete mode 100644 dist/modules/dimensions.min.js.map delete mode 100644 dist/modules/dropdown.min.js.map delete mode 100644 dist/modules/modal.min.js.map delete mode 100644 dist/modules/navbar.min.js.map delete mode 100644 dist/modules/parse-options.min.js.map delete mode 100644 dist/modules/popover.min.js.map delete mode 100644 dist/modules/raf.min.js.map delete mode 100644 dist/modules/scrollspy.min.js.map delete mode 100644 dist/modules/select.min.js.map delete mode 100644 dist/modules/tab.min.js.map delete mode 100644 dist/modules/timepicker.min.js.map delete mode 100644 dist/modules/tooltip.min.js.map delete mode 100644 dist/modules/typeahead.min.js.map diff --git a/bower.json b/bower.json index 1217bc6d9..3f685bc72 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "angular-strap", "description": "AngularStrap - AngularJS directives for Bootstrap", - "version": "2.0.2", + "version": "2.0.3", "keywords": [ "angular", "bootstrap" diff --git a/dist/angular-strap.js b/dist/angular-strap.js index c30eff9fe..3ec27f70c 100644 --- a/dist/angular-strap.js +++ b/dist/angular-strap.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -227,7 +227,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler keyboard: true, show: true, duration: false, - type: false + type: false, + dismissable: true }; this.$get = [ '$modal', @@ -238,7 +239,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler // Common vars var options = angular.extend({}, defaults, config); $alert = $modal(options); - // Support scope as string options [/*title, content, */type] + // Support scope as string options [/*title, content, */ type, dismissable] + $alert.$scope.dismissable = !!options.dismissable; if (options.type) { $alert.$scope.type = options.type; } @@ -281,7 +283,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler 'html', 'container', 'animation', - 'duration' + 'duration', + 'dismissable' ], function (key) { if (angular.isDefined(attr[key])) options[key] = attr[key]; @@ -319,95 +322,6 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler } ]); -// Source: aside.js -angular.module('mgcrea.ngStrap.aside', ['mgcrea.ngStrap.modal']).provider('$aside', function () { - var defaults = this.defaults = { - animation: 'am-fade-and-slide-right', - prefixClass: 'aside', - placement: 'right', - template: 'aside/aside.tpl.html', - contentTemplate: false, - container: false, - element: null, - backdrop: true, - keyboard: true, - html: false, - show: true - }; - this.$get = [ - '$modal', - function ($modal) { - function AsideFactory(config) { - var $aside = {}; - // Common vars - var options = angular.extend({}, defaults, config); - $aside = $modal(options); - return $aside; - } - return AsideFactory; - } - ]; -}).directive('bsAside', [ - '$window', - '$sce', - '$aside', - function ($window, $sce, $aside) { - var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout; - return { - restrict: 'EAC', - scope: true, - link: function postLink(scope, element, attr, transclusion) { - // Directive options - var options = { - scope: scope, - element: element, - show: false - }; - angular.forEach([ - 'template', - 'contentTemplate', - 'placement', - 'backdrop', - 'keyboard', - 'html', - 'container', - 'animation' - ], function (key) { - if (angular.isDefined(attr[key])) - options[key] = attr[key]; - }); - // Support scope as data-attrs - angular.forEach([ - 'title', - 'content' - ], function (key) { - attr[key] && attr.$observe(key, function (newValue, oldValue) { - scope[key] = $sce.trustAsHtml(newValue); - }); - }); - // Support scope as an object - attr.bsAside && scope.$watch(attr.bsAside, function (newValue, oldValue) { - if (angular.isObject(newValue)) { - angular.extend(scope, newValue); - } else { - scope.content = newValue; - } - }, true); - // Initialize aside - var aside = $aside(options); - // Trigger - element.on(attr.trigger || 'click', aside.toggle); - // Garbage collection - scope.$on('$destroy', function () { - aside.destroy(); - options = null; - aside = null; - }); - } - }; - } -]); - // Source: button.js angular.module('mgcrea.ngStrap.button', []).provider('$button', function () { var defaults = this.defaults = { @@ -543,6 +457,95 @@ angular.module('mgcrea.ngStrap.button', []).provider('$button', function () { } ]); +// Source: aside.js +angular.module('mgcrea.ngStrap.aside', ['mgcrea.ngStrap.modal']).provider('$aside', function () { + var defaults = this.defaults = { + animation: 'am-fade-and-slide-right', + prefixClass: 'aside', + placement: 'right', + template: 'aside/aside.tpl.html', + contentTemplate: false, + container: false, + element: null, + backdrop: true, + keyboard: true, + html: false, + show: true + }; + this.$get = [ + '$modal', + function ($modal) { + function AsideFactory(config) { + var $aside = {}; + // Common vars + var options = angular.extend({}, defaults, config); + $aside = $modal(options); + return $aside; + } + return AsideFactory; + } + ]; +}).directive('bsAside', [ + '$window', + '$sce', + '$aside', + function ($window, $sce, $aside) { + var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout; + return { + restrict: 'EAC', + scope: true, + link: function postLink(scope, element, attr, transclusion) { + // Directive options + var options = { + scope: scope, + element: element, + show: false + }; + angular.forEach([ + 'template', + 'contentTemplate', + 'placement', + 'backdrop', + 'keyboard', + 'html', + 'container', + 'animation' + ], function (key) { + if (angular.isDefined(attr[key])) + options[key] = attr[key]; + }); + // Support scope as data-attrs + angular.forEach([ + 'title', + 'content' + ], function (key) { + attr[key] && attr.$observe(key, function (newValue, oldValue) { + scope[key] = $sce.trustAsHtml(newValue); + }); + }); + // Support scope as an object + attr.bsAside && scope.$watch(attr.bsAside, function (newValue, oldValue) { + if (angular.isObject(newValue)) { + angular.extend(scope, newValue); + } else { + scope.content = newValue; + } + }, true); + // Initialize aside + var aside = $aside(options); + // Trigger + element.on(attr.trigger || 'click', aside.toggle); + // Garbage collection + scope.$on('$destroy', function () { + aside.destroy(); + options = null; + aside = null; + }); + } + }; + } +]); + // Source: datepicker.js angular.module('mgcrea.ngStrap.datepicker', [ 'mgcrea.ngStrap.helpers.dateParser', @@ -561,6 +564,7 @@ angular.module('mgcrea.ngStrap.datepicker', [ useNative: false, dateType: 'date', dateFormat: 'shortDate', + modelDateFormat: null, dayFormat: 'dd', strictFormat: false, autoclose: false, @@ -568,7 +572,9 @@ angular.module('mgcrea.ngStrap.datepicker', [ maxDate: +Infinity, startView: 0, minView: 0, - startWeek: 0 + startWeek: 0, + iconLeft: 'glyphicon glyphicon-chevron-left', + iconRight: 'glyphicon glyphicon-chevron-right' }; this.$get = [ '$window', @@ -597,6 +603,8 @@ angular.module('mgcrea.ngStrap.datepicker', [ $datepicker.$views = pickerViews.views; var viewDate = pickerViews.viewDate; scope.$mode = options.startView; + scope.$iconLeft = options.iconLeft; + scope.$iconRight = options.iconRight; var $picker = $datepicker.$views[scope.$mode]; // Scope methods scope.$select = function (date) { @@ -791,6 +799,7 @@ angular.module('mgcrea.ngStrap.datepicker', [ 'autoclose', 'dateType', 'dateFormat', + 'modelDateFormat', 'dayFormat', 'strictFormat', 'startWeek', @@ -852,14 +861,18 @@ angular.module('mgcrea.ngStrap.datepicker', [ controller.$setValidity('date', false); return; } else { - var isValid = (isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate) && (isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate); + var isMinValid = isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate; + var isMaxValid = isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate; + var isValid = isMinValid && isMaxValid; controller.$setValidity('date', isValid); + controller.$setValidity('min', isMinValid); + controller.$setValidity('max', isMaxValid); // Only update the model when we have a valid date if (isValid) controller.$dateValue = parsedDate; } if (options.dateType === 'string') { - return dateFilter(viewValue, options.dateFormat); + return dateFilter(parsedDate, options.modelDateFormat || options.dateFormat); } else if (options.dateType === 'number') { return controller.$dateValue.getTime(); } else if (options.dateType === 'iso') { @@ -877,7 +890,7 @@ angular.module('mgcrea.ngStrap.datepicker', [ } else if (angular.isDate(modelValue)) { date = modelValue; } else if (options.dateType === 'string') { - date = dateParser.parse(modelValue); + date = dateParser.parse(modelValue, null, options.modelDateFormat); } else { date = new Date(modelValue); } @@ -1131,124 +1144,6 @@ angular.module('mgcrea.ngStrap.datepicker', [ ]; }); -// Source: dropdown.js -angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip']).provider('$dropdown', function () { - var defaults = this.defaults = { - animation: 'am-fade', - prefixClass: 'dropdown', - placement: 'bottom-left', - template: 'dropdown/dropdown.tpl.html', - trigger: 'click', - container: false, - keyboard: true, - html: false, - delay: 0 - }; - this.$get = [ - '$window', - '$rootScope', - '$tooltip', - function ($window, $rootScope, $tooltip) { - var bodyEl = angular.element($window.document.body); - var matchesSelector = Element.prototype.matchesSelector || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector; - function DropdownFactory(element, config) { - var $dropdown = {}; - // Common vars - var options = angular.extend({}, defaults, config); - var scope = $dropdown.$scope = options.scope && options.scope.$new() || $rootScope.$new(); - $dropdown = $tooltip(element, options); - // Protected methods - $dropdown.$onKeyDown = function (evt) { - if (!/(38|40)/.test(evt.keyCode)) - return; - evt.preventDefault(); - evt.stopPropagation(); - // Retrieve focused index - var items = angular.element($dropdown.$element[0].querySelectorAll('li:not(.divider) a')); - if (!items.length) - return; - var index; - angular.forEach(items, function (el, i) { - if (matchesSelector && matchesSelector.call(el, ':focus')) - index = i; - }); - // Navigate with keyboard - if (evt.keyCode === 38 && index > 0) - index--; - else if (evt.keyCode === 40 && index < items.length - 1) - index++; - else if (angular.isUndefined(index)) - index = 0; - items.eq(index)[0].focus(); - }; - // Overrides - var show = $dropdown.show; - $dropdown.show = function () { - show(); - setTimeout(function () { - options.keyboard && $dropdown.$element.on('keydown', $dropdown.$onKeyDown); - bodyEl.on('click', onBodyClick); - }); - }; - var hide = $dropdown.hide; - $dropdown.hide = function () { - options.keyboard && $dropdown.$element.off('keydown', $dropdown.$onKeyDown); - bodyEl.off('click', onBodyClick); - hide(); - }; - // Private functions - function onBodyClick(evt) { - if (evt.target === element[0]) - return; - return evt.target !== element[0] && $dropdown.hide(); - } - return $dropdown; - } - return DropdownFactory; - } - ]; -}).directive('bsDropdown', [ - '$window', - '$location', - '$sce', - '$dropdown', - function ($window, $location, $sce, $dropdown) { - return { - restrict: 'EAC', - scope: true, - link: function postLink(scope, element, attr, transclusion) { - // Directive options - var options = { scope: scope }; - angular.forEach([ - 'placement', - 'container', - 'delay', - 'trigger', - 'keyboard', - 'html', - 'animation', - 'template' - ], function (key) { - if (angular.isDefined(attr[key])) - options[key] = attr[key]; - }); - // Support scope as an object - attr.bsDropdown && scope.$watch(attr.bsDropdown, function (newValue, oldValue) { - scope.content = newValue; - }, true); - // Initialize dropdown - var dropdown = $dropdown(element, options); - // Garbage collection - scope.$on('$destroy', function () { - dropdown.destroy(); - options = null; - dropdown = null; - }); - } - }; - } -]); - // Source: date-parser.js angular.module('mgcrea.ngStrap.helpers.dateParser', []).provider('$dateParser', [ '$localeProvider', @@ -1335,15 +1230,17 @@ angular.module('mgcrea.ngStrap.helpers.dateParser', []).provider('$dateParser', return !isNaN(date.getTime()); return regex.test(date); }; - $dateParser.parse = function (value, baseDate) { + $dateParser.parse = function (value, baseDate, format) { + var formatRegex = format ? regExpForFormat(format) : regex; + var formatSetMap = format ? setMapForFormat(format) : setMap; if (angular.isDate(value)) return value; - var matches = regex.exec(value); + var matches = formatRegex.exec(value); if (!matches) return false; var date = baseDate || new Date(0, 0, 1); for (var i = 0; i < matches.length - 1; i++) { - setMap[i] && setMap[i].call(date, matches[i + 1]); + formatSetMap[i] && formatSetMap[i].call(date, matches[i + 1]); } return date; }; @@ -1490,8 +1387,8 @@ angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [ var boxRect = element.getBoundingClientRect(); var docElement = element.ownerDocument; return { - width: element.offsetWidth, - height: element.offsetHeight, + width: boxRect.width || element.offsetWidth, + height: boxRect.height || element.offsetHeight, top: boxRect.top + (window.pageYOffset || docElement.documentElement.scrollTop) - (docElement.documentElement.clientTop || 0), left: boxRect.left + (window.pageXOffset || docElement.documentElement.scrollLeft) - (docElement.documentElement.clientLeft || 0) }; @@ -1564,7 +1461,7 @@ angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [ return value; }; /** - * Provides equivalent of jQuery's height function + * Provides equivalent of jQuery's width function * @required-by bootstrap-affix * @url http://api.jquery.com/width/ * @param element @@ -1667,6 +1564,124 @@ angular.version.minor < 3 && angular.version.dot < 14 && angular.module('ng').fa // }; // }); +// Source: dropdown.js +angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip']).provider('$dropdown', function () { + var defaults = this.defaults = { + animation: 'am-fade', + prefixClass: 'dropdown', + placement: 'bottom-left', + template: 'dropdown/dropdown.tpl.html', + trigger: 'click', + container: false, + keyboard: true, + html: false, + delay: 0 + }; + this.$get = [ + '$window', + '$rootScope', + '$tooltip', + function ($window, $rootScope, $tooltip) { + var bodyEl = angular.element($window.document.body); + var matchesSelector = Element.prototype.matchesSelector || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector; + function DropdownFactory(element, config) { + var $dropdown = {}; + // Common vars + var options = angular.extend({}, defaults, config); + var scope = $dropdown.$scope = options.scope && options.scope.$new() || $rootScope.$new(); + $dropdown = $tooltip(element, options); + // Protected methods + $dropdown.$onKeyDown = function (evt) { + if (!/(38|40)/.test(evt.keyCode)) + return; + evt.preventDefault(); + evt.stopPropagation(); + // Retrieve focused index + var items = angular.element($dropdown.$element[0].querySelectorAll('li:not(.divider) a')); + if (!items.length) + return; + var index; + angular.forEach(items, function (el, i) { + if (matchesSelector && matchesSelector.call(el, ':focus')) + index = i; + }); + // Navigate with keyboard + if (evt.keyCode === 38 && index > 0) + index--; + else if (evt.keyCode === 40 && index < items.length - 1) + index++; + else if (angular.isUndefined(index)) + index = 0; + items.eq(index)[0].focus(); + }; + // Overrides + var show = $dropdown.show; + $dropdown.show = function () { + show(); + setTimeout(function () { + options.keyboard && $dropdown.$element.on('keydown', $dropdown.$onKeyDown); + bodyEl.on('click', onBodyClick); + }); + }; + var hide = $dropdown.hide; + $dropdown.hide = function () { + options.keyboard && $dropdown.$element.off('keydown', $dropdown.$onKeyDown); + bodyEl.off('click', onBodyClick); + hide(); + }; + // Private functions + function onBodyClick(evt) { + if (evt.target === element[0]) + return; + return evt.target !== element[0] && $dropdown.hide(); + } + return $dropdown; + } + return DropdownFactory; + } + ]; +}).directive('bsDropdown', [ + '$window', + '$location', + '$sce', + '$dropdown', + function ($window, $location, $sce, $dropdown) { + return { + restrict: 'EAC', + scope: true, + link: function postLink(scope, element, attr, transclusion) { + // Directive options + var options = { scope: scope }; + angular.forEach([ + 'placement', + 'container', + 'delay', + 'trigger', + 'keyboard', + 'html', + 'animation', + 'template' + ], function (key) { + if (angular.isDefined(attr[key])) + options[key] = attr[key]; + }); + // Support scope as an object + attr.bsDropdown && scope.$watch(attr.bsDropdown, function (newValue, oldValue) { + scope.content = newValue; + }, true); + // Initialize dropdown + var dropdown = $dropdown(element, options); + // Garbage collection + scope.$on('$destroy', function () { + dropdown.destroy(); + options = null; + dropdown = null; + }); + } + }; + } +]); + // Source: modal.js angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).provider('$modal', function () { var defaults = this.defaults = { @@ -1804,7 +1819,7 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).pr scope.$emit(options.prefixEvent + '.show', $modal); }); scope.$isShown = true; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); // Focus once the enter-animation has started // Weird PhantomJS bug hack var el = modalElement[0]; @@ -1838,7 +1853,7 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).pr }); } scope.$isShown = false; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); // Unbind events if (options.backdrop) { modalElement.off('click', hideOnBackdropClick); @@ -1992,275 +2007,223 @@ angular.module('mgcrea.ngStrap.navbar', []).provider('$navbar', function () { } ]); -// Source: select.js -angular.module('mgcrea.ngStrap.select', [ - 'mgcrea.ngStrap.tooltip', - 'mgcrea.ngStrap.helpers.parseOptions' -]).provider('$select', function () { +// Source: scrollspy.js +angular.module('mgcrea.ngStrap.scrollspy', [ + 'mgcrea.ngStrap.helpers.debounce', + 'mgcrea.ngStrap.helpers.dimensions' +]).provider('$scrollspy', function () { + // Pool of registered spies + var spies = this.$$spies = {}; var defaults = this.defaults = { - animation: 'am-fade', - prefixClass: 'select', - placement: 'bottom-left', - template: 'select/select.tpl.html', - trigger: 'focus', - container: false, - keyboard: true, - html: false, - delay: 0, - multiple: false, - sort: true, - caretHtml: ' ', - placeholder: 'Choose among the following...', - maxLength: 3, - maxLengthHtml: 'selected' + debounce: 150, + throttle: 100, + offset: 100 }; this.$get = [ '$window', '$document', '$rootScope', - '$tooltip', - function ($window, $document, $rootScope, $tooltip) { + 'dimensions', + 'debounce', + 'throttle', + function ($window, $document, $rootScope, dimensions, debounce, throttle) { + var windowEl = angular.element($window); + var docEl = angular.element($document.prop('documentElement')); var bodyEl = angular.element($window.document.body); - var isTouch = 'createTouch' in $window.document; - function SelectFactory(element, controller, config) { - var $select = {}; + // Helper functions + function nodeName(element, name) { + return element[0].nodeName && element[0].nodeName.toLowerCase() === name.toLowerCase(); + } + function ScrollSpyFactory(config) { // Common vars var options = angular.extend({}, defaults, config); - $select = $tooltip(element, options); - var parentScope = config.scope; - var scope = $select.$scope; - scope.$matches = []; - scope.$activeIndex = 0; - scope.$isMultiple = options.multiple; - scope.$activate = function (index) { - scope.$$postDigest(function () { - $select.activate(index); - }); + if (!options.element) + options.element = bodyEl; + var isWindowSpy = nodeName(options.element, 'body'); + var scrollEl = isWindowSpy ? windowEl : options.element; + var scrollId = isWindowSpy ? 'window' : options.id; + // Use existing spy + if (spies[scrollId]) { + spies[scrollId].$$count++; + return spies[scrollId]; + } + var $scrollspy = {}; + // Private vars + var unbindViewContentLoaded, unbindIncludeContentLoaded; + var trackedElements = $scrollspy.$trackedElements = []; + var sortedElements = []; + var activeTarget; + var debouncedCheckPosition; + var throttledCheckPosition; + var debouncedCheckOffsets; + var viewportHeight; + var scrollTop; + $scrollspy.init = function () { + // Setup internal ref counter + this.$$count = 1; + // Bind events + debouncedCheckPosition = debounce(this.checkPosition, options.debounce); + throttledCheckPosition = throttle(this.checkPosition, options.throttle); + scrollEl.on('click', this.checkPositionWithEventLoop); + windowEl.on('resize', debouncedCheckPosition); + scrollEl.on('scroll', throttledCheckPosition); + debouncedCheckOffsets = debounce(this.checkOffsets, options.debounce); + unbindViewContentLoaded = $rootScope.$on('$viewContentLoaded', debouncedCheckOffsets); + unbindIncludeContentLoaded = $rootScope.$on('$includeContentLoaded', debouncedCheckOffsets); + debouncedCheckOffsets(); + // Register spy for reuse + if (scrollId) { + spies[scrollId] = $scrollspy; + } }; - scope.$select = function (index, evt) { - scope.$$postDigest(function () { - $select.select(index); - }); - }; - scope.$isVisible = function () { - return $select.$isVisible(); - }; - scope.$isActive = function (index) { - return $select.$isActive(index); - }; - // Public methods - $select.update = function (matches) { - scope.$matches = matches; - $select.$updateActiveIndex(); - }; - $select.activate = function (index) { - if (options.multiple) { - scope.$activeIndex.sort(); - $select.$isActive(index) ? scope.$activeIndex.splice(scope.$activeIndex.indexOf(index), 1) : scope.$activeIndex.push(index); - if (options.sort) - scope.$activeIndex.sort(); - } else { - scope.$activeIndex = index; + $scrollspy.destroy = function () { + // Check internal ref counter + this.$$count--; + if (this.$$count > 0) { + return; + } + // Unbind events + scrollEl.off('click', this.checkPositionWithEventLoop); + windowEl.off('resize', debouncedCheckPosition); + scrollEl.off('scroll', debouncedCheckPosition); + unbindViewContentLoaded(); + unbindIncludeContentLoaded(); + if (scrollId) { + delete spies[scrollId]; } - return scope.$activeIndex; }; - $select.select = function (index) { - var value = scope.$matches[index].value; - $select.activate(index); - if (options.multiple) { - controller.$setViewValue(scope.$activeIndex.map(function (index) { - return scope.$matches[index].value; - })); - } else { - controller.$setViewValue(value); + $scrollspy.checkPosition = function () { + // Not ready yet + if (!sortedElements.length) + return; + // Calculate the scroll position + scrollTop = (isWindowSpy ? $window.pageYOffset : scrollEl.prop('scrollTop')) || 0; + // Calculate the viewport height for use by the components + viewportHeight = Math.max($window.innerHeight, docEl.prop('clientHeight')); + // Activate first element if scroll is smaller + if (scrollTop < sortedElements[0].offsetTop && activeTarget !== sortedElements[0].target) { + return $scrollspy.$activateElement(sortedElements[0]); } - controller.$render(); - if (parentScope) - parentScope.$digest(); - // Hide if single select - if (!options.multiple) { - $select.hide(); + // Activate proper element + for (var i = sortedElements.length; i--;) { + if (angular.isUndefined(sortedElements[i].offsetTop) || sortedElements[i].offsetTop === null) + continue; + if (activeTarget === sortedElements[i].target) + continue; + if (scrollTop < sortedElements[i].offsetTop) + continue; + if (sortedElements[i + 1] && scrollTop > sortedElements[i + 1].offsetTop) + continue; + return $scrollspy.$activateElement(sortedElements[i]); } - // Emit event - scope.$emit('$select.select', value, index); + }; + $scrollspy.checkPositionWithEventLoop = function () { + setTimeout(this.checkPosition, 1); }; // Protected methods - $select.$updateActiveIndex = function () { - if (controller.$modelValue && scope.$matches.length) { - if (options.multiple && angular.isArray(controller.$modelValue)) { - scope.$activeIndex = controller.$modelValue.map(function (value) { - return $select.$getIndex(value); - }); - } else { - scope.$activeIndex = $select.$getIndex(controller.$modelValue); + $scrollspy.$activateElement = function (element) { + if (activeTarget) { + var activeElement = $scrollspy.$getTrackedElement(activeTarget); + if (activeElement) { + activeElement.source.removeClass('active'); + if (nodeName(activeElement.source, 'li') && nodeName(activeElement.source.parent().parent(), 'li')) { + activeElement.source.parent().parent().removeClass('active'); + } } - } else if (scope.$activeIndex >= scope.$matches.length) { - scope.$activeIndex = options.multiple ? [] : 0; - } - }; - $select.$isVisible = function () { - if (!options.minLength || !controller) { - return scope.$matches.length; - } - // minLength support - return scope.$matches.length && controller.$viewValue.length >= options.minLength; - }; - $select.$isActive = function (index) { - if (options.multiple) { - return scope.$activeIndex.indexOf(index) !== -1; - } else { - return scope.$activeIndex === index; } - }; - $select.$getIndex = function (value) { - var l = scope.$matches.length, i = l; - if (!l) - return; - for (i = l; i--;) { - if (scope.$matches[i].value === value) - break; + activeTarget = element.target; + element.source.addClass('active'); + if (nodeName(element.source, 'li') && nodeName(element.source.parent().parent(), 'li')) { + element.source.parent().parent().addClass('active'); } - if (i < 0) - return; - return i; }; - $select.$onMouseDown = function (evt) { - // Prevent blur on mousedown on .dropdown-menu - evt.preventDefault(); - evt.stopPropagation(); - // Emulate click for mobile devices - if (isTouch) { - var targetEl = angular.element(evt.target); - targetEl.triggerHandler('click'); - } + $scrollspy.$getTrackedElement = function (target) { + return trackedElements.filter(function (obj) { + return obj.target === target; + })[0]; }; - $select.$onKeyDown = function (evt) { - if (!/(9|13|38|40)/.test(evt.keyCode)) - return; - evt.preventDefault(); - evt.stopPropagation(); - // Select with enter - if (!options.multiple && (evt.keyCode === 13 || evt.keyCode === 9)) { - return $select.select(scope.$activeIndex); - } - // Navigate with keyboard - if (evt.keyCode === 38 && scope.$activeIndex > 0) - scope.$activeIndex--; - else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) - scope.$activeIndex++; - else if (angular.isUndefined(scope.$activeIndex)) - scope.$activeIndex = 0; - scope.$digest(); + // Track offsets behavior + $scrollspy.checkOffsets = function () { + angular.forEach(trackedElements, function (trackedElement) { + var targetElement = document.querySelector(trackedElement.target); + trackedElement.offsetTop = targetElement ? dimensions.offset(targetElement).top : null; + if (options.offset && trackedElement.offsetTop !== null) + trackedElement.offsetTop -= options.offset * 1; + }); + sortedElements = trackedElements.filter(function (el) { + return el.offsetTop !== null; + }).sort(function (a, b) { + return a.offsetTop - b.offsetTop; + }); + debouncedCheckPosition(); }; - // Overrides - var _show = $select.show; - $select.show = function () { - _show(); - if (options.multiple) { - $select.$element.addClass('select-multiple'); - } - setTimeout(function () { - $select.$element.on(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); - if (options.keyboard) { - element.on('keydown', $select.$onKeyDown); - } + $scrollspy.trackElement = function (target, source) { + trackedElements.push({ + target: target, + source: source }); }; - var _hide = $select.hide; - $select.hide = function () { - $select.$element.off(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); - if (options.keyboard) { - element.off('keydown', $select.$onKeyDown); + $scrollspy.untrackElement = function (target, source) { + var toDelete; + for (var i = trackedElements.length; i--;) { + if (trackedElements[i].target === target && trackedElements[i].source === source) { + toDelete = i; + break; + } } - _hide(true); + trackedElements = trackedElements.splice(toDelete, 1); }; - return $select; + $scrollspy.activate = function (i) { + trackedElements[i].addClass('active'); + }; + // Initialize plugin + $scrollspy.init(); + return $scrollspy; } - SelectFactory.defaults = defaults; - return SelectFactory; + return ScrollSpyFactory; } ]; -}).directive('bsSelect', [ - '$window', - '$parse', - '$q', - '$select', - '$parseOptions', - function ($window, $parse, $q, $select, $parseOptions) { - var defaults = $select.defaults; +}).directive('bsScrollspy', [ + '$rootScope', + 'debounce', + 'dimensions', + '$scrollspy', + function ($rootScope, debounce, dimensions, $scrollspy) { return { restrict: 'EAC', - require: 'ngModel', - link: function postLink(scope, element, attr, controller) { - // Directive options + link: function postLink(scope, element, attr) { var options = { scope: scope }; angular.forEach([ - 'placement', - 'container', - 'delay', - 'trigger', - 'keyboard', - 'html', - 'animation', - 'template', - 'placeholder', - 'multiple', - 'maxLength', - 'maxLengthHtml' + 'offset', + 'target' ], function (key) { if (angular.isDefined(attr[key])) options[key] = attr[key]; }); - // Add support for select markup - if (element[0].nodeName.toLowerCase() === 'select') { - var inputEl = element; - inputEl.css('display', 'none'); - element = angular.element(''); - inputEl.after(element); - } - // Build proper ngOptions - var parsedOptions = $parseOptions(attr.ngOptions); - // Initialize select - var select = $select(element, controller, options); - // Watch ngOptions values before filtering for changes - var watchedOptions = parsedOptions.$match[7].replace(/\|.+/, '').trim(); - scope.$watch(watchedOptions, function (newValue, oldValue) { - // console.warn('scope.$watch(%s)', watchedOptions, newValue, oldValue); - parsedOptions.valuesFn(scope, controller).then(function (values) { - select.update(values); - controller.$render(); - }); - }, true); - // Watch model for changes - scope.$watch(attr.ngModel, function (newValue, oldValue) { - // console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue); - select.$updateActiveIndex(); - }, true); - // Model rendering in view - controller.$render = function () { - // console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue); - var selected, index; - if (options.multiple && angular.isArray(controller.$modelValue)) { - selected = controller.$modelValue.map(function (value) { - index = select.$getIndex(value); - return angular.isDefined(index) ? select.$scope.$matches[index].label : false; - }).filter(angular.isDefined); - if (selected.length > (options.maxLength || defaults.maxLength)) { - selected = selected.length + ' ' + (options.maxLengthHtml || defaults.maxLengthHtml); - } else { - selected = selected.join(', '); - } - } else { - index = select.$getIndex(controller.$modelValue); - selected = angular.isDefined(index) ? select.$scope.$matches[index].label : false; - } - element.html((selected ? selected : attr.placeholder || defaults.placeholder) + defaults.caretHtml); - }; - // Garbage collection + var scrollspy = $scrollspy(options); + scrollspy.trackElement(options.target, element); scope.$on('$destroy', function () { - select.destroy(); + scrollspy.untrackElement(options.target, element); + scrollspy.destroy(); options = null; - select = null; + scrollspy = null; + }); + } + }; + } +]).directive('bsScrollspyList', [ + '$rootScope', + 'debounce', + 'dimensions', + '$scrollspy', + function ($rootScope, debounce, dimensions, $scrollspy) { + return { + restrict: 'A', + compile: function postLink(element, attr) { + var children = element[0].querySelectorAll('li > a[href]'); + angular.forEach(children, function (child) { + var childEl = angular.element(child); + childEl.parent().attr('bs-scrollspy', '').attr('data-target', childEl.attr('href')); }); } }; @@ -2271,6 +2234,8 @@ angular.module('mgcrea.ngStrap.select', [ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$popover', function () { var defaults = this.defaults = { animation: 'am-fade', + container: false, + target: false, placement: 'right', template: 'popover/popover.tpl.html', contentTemplate: false, @@ -2279,8 +2244,7 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$ html: false, title: '', content: '', - delay: 0, - container: false + delay: 0 }; this.$get = [ '$tooltip', @@ -2316,6 +2280,7 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$ 'contentTemplate', 'placement', 'container', + 'target', 'delay', 'trigger', 'keyboard', @@ -2361,223 +2326,274 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$ } ]); -// Source: scrollspy.js -angular.module('mgcrea.ngStrap.scrollspy', [ - 'mgcrea.ngStrap.helpers.debounce', - 'mgcrea.ngStrap.helpers.dimensions' -]).provider('$scrollspy', function () { - // Pool of registered spies - var spies = this.$$spies = {}; +// Source: select.js +angular.module('mgcrea.ngStrap.select', [ + 'mgcrea.ngStrap.tooltip', + 'mgcrea.ngStrap.helpers.parseOptions' +]).provider('$select', function () { var defaults = this.defaults = { - debounce: 150, - throttle: 100, - offset: 100 + animation: 'am-fade', + prefixClass: 'select', + placement: 'bottom-left', + template: 'select/select.tpl.html', + trigger: 'focus', + container: false, + keyboard: true, + html: false, + delay: 0, + multiple: false, + sort: true, + caretHtml: ' ', + placeholder: 'Choose among the following...', + maxLength: 3, + maxLengthHtml: 'selected', + iconCheckmark: 'glyphicon glyphicon-ok' }; this.$get = [ '$window', '$document', '$rootScope', - 'dimensions', - 'debounce', - 'throttle', - function ($window, $document, $rootScope, dimensions, debounce, throttle) { - var windowEl = angular.element($window); - var docEl = angular.element($document.prop('documentElement')); + '$tooltip', + function ($window, $document, $rootScope, $tooltip) { var bodyEl = angular.element($window.document.body); - // Helper functions - function nodeName(element, name) { - return element[0].nodeName && element[0].nodeName.toLowerCase() === name.toLowerCase(); - } - function ScrollSpyFactory(config) { + var isTouch = 'createTouch' in $window.document; + function SelectFactory(element, controller, config) { + var $select = {}; // Common vars var options = angular.extend({}, defaults, config); - if (!options.element) - options.element = bodyEl; - var isWindowSpy = nodeName(options.element, 'body'); - var scrollEl = isWindowSpy ? windowEl : options.element; - var scrollId = isWindowSpy ? 'window' : options.id; - // Use existing spy - if (spies[scrollId]) { - spies[scrollId].$$count++; - return spies[scrollId]; - } - var $scrollspy = {}; - // Private vars - var unbindViewContentLoaded, unbindIncludeContentLoaded; - var trackedElements = $scrollspy.$trackedElements = []; - var sortedElements = []; - var activeTarget; - var debouncedCheckPosition; - var throttledCheckPosition; - var debouncedCheckOffsets; - var viewportHeight; - var scrollTop; - $scrollspy.init = function () { - // Setup internal ref counter - this.$$count = 1; - // Bind events - debouncedCheckPosition = debounce(this.checkPosition, options.debounce); - throttledCheckPosition = throttle(this.checkPosition, options.throttle); - scrollEl.on('click', this.checkPositionWithEventLoop); - windowEl.on('resize', debouncedCheckPosition); - scrollEl.on('scroll', throttledCheckPosition); - debouncedCheckOffsets = debounce(this.checkOffsets, options.debounce); - unbindViewContentLoaded = $rootScope.$on('$viewContentLoaded', debouncedCheckOffsets); - unbindIncludeContentLoaded = $rootScope.$on('$includeContentLoaded', debouncedCheckOffsets); - debouncedCheckOffsets(); - // Register spy for reuse - if (scrollId) { - spies[scrollId] = $scrollspy; - } + $select = $tooltip(element, options); + var scope = $select.$scope; + scope.$matches = []; + scope.$activeIndex = 0; + scope.$isMultiple = options.multiple; + scope.$iconCheckmark = options.iconCheckmark; + scope.$activate = function (index) { + scope.$$postDigest(function () { + $select.activate(index); + }); }; - $scrollspy.destroy = function () { - // Check internal ref counter - this.$$count--; - if (this.$$count > 0) { - return; - } - // Unbind events - scrollEl.off('click', this.checkPositionWithEventLoop); - windowEl.off('resize', debouncedCheckPosition); - scrollEl.off('scroll', debouncedCheckPosition); - unbindViewContentLoaded(); - unbindIncludeContentLoaded(); - if (scrollId) { - delete spies[scrollId]; - } + scope.$select = function (index, evt) { + scope.$$postDigest(function () { + $select.select(index); + }); }; - $scrollspy.checkPosition = function () { - // Not ready yet - if (!sortedElements.length) - return; - // Calculate the scroll position - scrollTop = (isWindowSpy ? $window.pageYOffset : scrollEl.prop('scrollTop')) || 0; - // Calculate the viewport height for use by the components - viewportHeight = Math.max($window.innerHeight, docEl.prop('clientHeight')); - // Activate first element if scroll is smaller - if (scrollTop < sortedElements[0].offsetTop && activeTarget !== sortedElements[0].target) { - return $scrollspy.$activateElement(sortedElements[0]); - } - // Activate proper element - for (var i = sortedElements.length; i--;) { - if (angular.isUndefined(sortedElements[i].offsetTop) || sortedElements[i].offsetTop === null) - continue; - if (activeTarget === sortedElements[i].target) - continue; - if (scrollTop < sortedElements[i].offsetTop) - continue; - if (sortedElements[i + 1] && scrollTop > sortedElements[i + 1].offsetTop) - continue; - return $scrollspy.$activateElement(sortedElements[i]); + scope.$isVisible = function () { + return $select.$isVisible(); + }; + scope.$isActive = function (index) { + return $select.$isActive(index); + }; + // Public methods + $select.update = function (matches) { + scope.$matches = matches; + $select.$updateActiveIndex(); + }; + $select.activate = function (index) { + if (options.multiple) { + scope.$activeIndex.sort(); + $select.$isActive(index) ? scope.$activeIndex.splice(scope.$activeIndex.indexOf(index), 1) : scope.$activeIndex.push(index); + if (options.sort) + scope.$activeIndex.sort(); + } else { + scope.$activeIndex = index; } + return scope.$activeIndex; }; - $scrollspy.checkPositionWithEventLoop = function () { - setTimeout(this.checkPosition, 1); + $select.select = function (index) { + var value = scope.$matches[index].value; + scope.$apply(function () { + $select.activate(index); + if (options.multiple) { + controller.$setViewValue(scope.$activeIndex.map(function (index) { + return scope.$matches[index].value; + })); + } else { + controller.$setViewValue(value); + // Hide if single select + $select.hide(); + } + }); + // Emit event + scope.$emit('$select.select', value, index); }; // Protected methods - $scrollspy.$activateElement = function (element) { - if (activeTarget) { - var activeElement = $scrollspy.$getTrackedElement(activeTarget); - if (activeElement) { - activeElement.source.removeClass('active'); - if (nodeName(activeElement.source, 'li') && nodeName(activeElement.source.parent().parent(), 'li')) { - activeElement.source.parent().parent().removeClass('active'); - } + $select.$updateActiveIndex = function () { + if (controller.$modelValue && scope.$matches.length) { + if (options.multiple && angular.isArray(controller.$modelValue)) { + scope.$activeIndex = controller.$modelValue.map(function (value) { + return $select.$getIndex(value); + }); + } else { + scope.$activeIndex = $select.$getIndex(controller.$modelValue); } + } else if (scope.$activeIndex >= scope.$matches.length) { + scope.$activeIndex = options.multiple ? [] : 0; } - activeTarget = element.target; - element.source.addClass('active'); - if (nodeName(element.source, 'li') && nodeName(element.source.parent().parent(), 'li')) { - element.source.parent().parent().addClass('active'); + }; + $select.$isVisible = function () { + if (!options.minLength || !controller) { + return scope.$matches.length; } + // minLength support + return scope.$matches.length && controller.$viewValue.length >= options.minLength; }; - $scrollspy.$getTrackedElement = function (target) { - return trackedElements.filter(function (obj) { - return obj.target === target; - })[0]; + $select.$isActive = function (index) { + if (options.multiple) { + return scope.$activeIndex.indexOf(index) !== -1; + } else { + return scope.$activeIndex === index; + } }; - // Track offsets behavior - $scrollspy.checkOffsets = function () { - angular.forEach(trackedElements, function (trackedElement) { - var targetElement = document.querySelector(trackedElement.target); - trackedElement.offsetTop = targetElement ? dimensions.offset(targetElement).top : null; - if (options.offset && trackedElement.offsetTop !== null) - trackedElement.offsetTop -= options.offset * 1; - }); - sortedElements = trackedElements.filter(function (el) { - return el.offsetTop !== null; - }).sort(function (a, b) { - return a.offsetTop - b.offsetTop; - }); - debouncedCheckPosition(); + $select.$getIndex = function (value) { + var l = scope.$matches.length, i = l; + if (!l) + return; + for (i = l; i--;) { + if (scope.$matches[i].value === value) + break; + } + if (i < 0) + return; + return i; }; - $scrollspy.trackElement = function (target, source) { - trackedElements.push({ - target: target, - source: source - }); + $select.$onMouseDown = function (evt) { + // Prevent blur on mousedown on .dropdown-menu + evt.preventDefault(); + evt.stopPropagation(); + // Emulate click for mobile devices + if (isTouch) { + var targetEl = angular.element(evt.target); + targetEl.triggerHandler('click'); + } }; - $scrollspy.untrackElement = function (target, source) { - var toDelete; - for (var i = trackedElements.length; i--;) { - if (trackedElements[i].target === target && trackedElements[i].source === source) { - toDelete = i; - break; - } + $select.$onKeyDown = function (evt) { + if (!/(9|13|38|40)/.test(evt.keyCode)) + return; + evt.preventDefault(); + evt.stopPropagation(); + // Select with enter + if (!options.multiple && (evt.keyCode === 13 || evt.keyCode === 9)) { + return $select.select(scope.$activeIndex); } - trackedElements = trackedElements.splice(toDelete, 1); + // Navigate with keyboard + if (evt.keyCode === 38 && scope.$activeIndex > 0) + scope.$activeIndex--; + else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) + scope.$activeIndex++; + else if (angular.isUndefined(scope.$activeIndex)) + scope.$activeIndex = 0; + scope.$digest(); }; - $scrollspy.activate = function (i) { - trackedElements[i].addClass('active'); + // Overrides + var _show = $select.show; + $select.show = function () { + _show(); + if (options.multiple) { + $select.$element.addClass('select-multiple'); + } + setTimeout(function () { + $select.$element.on(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); + if (options.keyboard) { + element.on('keydown', $select.$onKeyDown); + } + }); }; - // Initialize plugin - $scrollspy.init(); - return $scrollspy; + var _hide = $select.hide; + $select.hide = function () { + $select.$element.off(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown); + if (options.keyboard) { + element.off('keydown', $select.$onKeyDown); + } + _hide(true); + }; + return $select; } - return ScrollSpyFactory; + SelectFactory.defaults = defaults; + return SelectFactory; } ]; -}).directive('bsScrollspy', [ - '$rootScope', - 'debounce', - 'dimensions', - '$scrollspy', - function ($rootScope, debounce, dimensions, $scrollspy) { +}).directive('bsSelect', [ + '$window', + '$parse', + '$q', + '$select', + '$parseOptions', + function ($window, $parse, $q, $select, $parseOptions) { + var defaults = $select.defaults; return { restrict: 'EAC', - link: function postLink(scope, element, attr) { + require: 'ngModel', + link: function postLink(scope, element, attr, controller) { + // Directive options var options = { scope: scope }; angular.forEach([ - 'offset', - 'target' + 'placement', + 'container', + 'delay', + 'trigger', + 'keyboard', + 'html', + 'animation', + 'template', + 'placeholder', + 'multiple', + 'maxLength', + 'maxLengthHtml' ], function (key) { if (angular.isDefined(attr[key])) options[key] = attr[key]; }); - var scrollspy = $scrollspy(options); - scrollspy.trackElement(options.target, element); + // Add support for select markup + if (element[0].nodeName.toLowerCase() === 'select') { + var inputEl = element; + inputEl.css('display', 'none'); + element = angular.element(''); + inputEl.after(element); + } + // Build proper ngOptions + var parsedOptions = $parseOptions(attr.ngOptions); + // Initialize select + var select = $select(element, controller, options); + // Watch ngOptions values before filtering for changes + var watchedOptions = parsedOptions.$match[7].replace(/\|.+/, '').trim(); + scope.$watch(watchedOptions, function (newValue, oldValue) { + // console.warn('scope.$watch(%s)', watchedOptions, newValue, oldValue); + parsedOptions.valuesFn(scope, controller).then(function (values) { + select.update(values); + controller.$render(); + }); + }, true); + // Watch model for changes + scope.$watch(attr.ngModel, function (newValue, oldValue) { + // console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue); + select.$updateActiveIndex(); + controller.$render(); + }, true); + // Model rendering in view + controller.$render = function () { + // console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue); + var selected, index; + if (options.multiple && angular.isArray(controller.$modelValue)) { + selected = controller.$modelValue.map(function (value) { + index = select.$getIndex(value); + return angular.isDefined(index) ? select.$scope.$matches[index].label : false; + }).filter(angular.isDefined); + if (selected.length > (options.maxLength || defaults.maxLength)) { + selected = selected.length + ' ' + (options.maxLengthHtml || defaults.maxLengthHtml); + } else { + selected = selected.join(', '); + } + } else { + index = select.$getIndex(controller.$modelValue); + selected = angular.isDefined(index) ? select.$scope.$matches[index].label : false; + } + element.html((selected ? selected : attr.placeholder || defaults.placeholder) + defaults.caretHtml); + }; + // Garbage collection scope.$on('$destroy', function () { - scrollspy.untrackElement(options.target, element); - scrollspy.destroy(); + select.destroy(); options = null; - scrollspy = null; - }); - } - }; - } -]).directive('bsScrollspyList', [ - '$rootScope', - 'debounce', - 'dimensions', - '$scrollspy', - function ($rootScope, debounce, dimensions, $scrollspy) { - return { - restrict: 'A', - compile: function postLink(element, attr) { - var children = element[0].querySelectorAll('li > a[href]'); - angular.forEach(children, function (child) { - var childEl = angular.element(child); - childEl.parent().attr('bs-scrollspy', '').attr('data-target', childEl.attr('href')); + select = null; }); } }; @@ -2665,12 +2681,15 @@ angular.module('mgcrea.ngStrap.timepicker', [ useNative: true, timeType: 'date', timeFormat: 'shortTime', + modelTimeFormat: null, autoclose: false, minTime: -Infinity, maxTime: +Infinity, length: 5, hourStep: 1, - minuteStep: 5 + minuteStep: 5, + iconUp: 'glyphicon glyphicon-chevron-up', + iconDown: 'glyphicon glyphicon-chevron-down' }; this.$get = [ '$window', @@ -2702,7 +2721,9 @@ angular.module('mgcrea.ngStrap.timepicker', [ millisecond: startDate.getMilliseconds() }; var format = $locale.DATETIME_FORMATS[options.timeFormat] || options.timeFormat; - var formats = /(h+)[:]?(m+)[ ]?(a?)/i.exec(format).slice(1); + var formats = /(h+)([:\.])?(m+)[ ]?(a?)/i.exec(format).slice(1); + scope.$iconUp = options.iconUp; + scope.$iconDown = options.iconDown; // Scope methods scope.$select = function (date, index) { $timepicker.select(date, index); @@ -2770,7 +2791,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ minute = new Date(1970, 0, 1, 0, viewDate.minute - (midIndex - i) * options.minuteStep); minutes.push({ date: minute, - label: dateFilter(minute, formats[1]), + label: dateFilter(minute, formats[2]), selected: $timepicker.$date && $timepicker.$isSelected(minute, 1), disabled: $timepicker.$isDisabled(minute, 1) }); @@ -2783,8 +2804,9 @@ angular.module('mgcrea.ngStrap.timepicker', [ ]); } scope.rows = rows; - scope.showAM = !!formats[2]; + scope.showAM = !!formats[3]; scope.isAM = ($timepicker.$date || hours[midIndex].date).getHours() < 12; + scope.timeSeparator = formats[1]; $timepicker.$isBuilt = true; }; $timepicker.$isSelected = function (date, index) { @@ -2843,7 +2865,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ var hours = newDate.getHours(), hoursLength = dateFilter(newDate, 'h').length; var minutes = newDate.getMinutes(), minutesLength = dateFilter(newDate, 'mm').length; var lateralMove = /(37|39)/.test(evt.keyCode); - var count = 2 + !!formats[2] * 1; + var count = 2 + !!formats[3] * 1; // Navigate indexes (left, right) if (lateralMove) { if (evt.keyCode === 37) @@ -2983,6 +3005,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ 'autoclose', 'timeType', 'timeFormat', + 'modelTimeFormat', 'useNative', 'hourStep', 'minuteStep', @@ -3042,7 +3065,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ controller.$dateValue = parsedTime; } if (options.timeType === 'string') { - return dateFilter(viewValue, options.timeFormat); + return dateFilter(parsedTime, options.modelTimeFormat || options.timeFormat); } else if (options.timeType === 'number') { return controller.$dateValue.getTime(); } else if (options.timeType === 'iso') { @@ -3060,7 +3083,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ } else if (angular.isDate(modelValue)) { date = modelValue; } else if (options.timeType === 'string') { - date = dateParser.parse(modelValue); + date = dateParser.parse(modelValue, null, options.modelTimeFormat); } else { date = new Date(modelValue); } @@ -3092,6 +3115,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). prefixClass: 'tooltip', prefixEvent: 'tooltip', container: false, + target: false, placement: 'top', template: 'tooltip/tooltip.tpl.html', contentTemplate: false, @@ -3111,10 +3135,9 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). '$templateCache', '$http', '$animate', - '$timeout', 'dimensions', '$$rAF', - function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, $timeout, dimensions, $$rAF) { + function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, dimensions, $$rAF) { var trim = String.prototype.trim; var isTouch = 'createTouch' in $window.document; var htmlReplaceRegExp = /ng-bind="/gi; @@ -3205,6 +3228,10 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). nodeName === 'button' && trigger !== 'hover' && element.on(isTouch ? 'touchstart' : 'mousedown', $tooltip.$onFocusElementMouseDown); } }); + // Options: target + if (options.target) { + options.target = angular.isElement(options.target) ? options.target : findElement(options.target)[0]; + } // Options: show if (options.show) { scope.$$postDigest(function () { @@ -3230,6 +3257,8 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). tipElement.remove(); tipElement = null; } + // Cancel pending callbacks + clearTimeout(timeout); // Destroy scope scope.$destroy(); }; @@ -3256,8 +3285,8 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). }); // Set the initial positioning. tipElement.css({ - top: '0px', - left: '0px', + top: '-9999px', + left: '-9999px', display: 'block' }).addClass(options.placement); // Options: animation @@ -3270,7 +3299,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). scope.$emit(options.prefixEvent + '.show', $tooltip); }); $tooltip.$isShown = scope.$isShown = true; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); $$rAF($tooltip.$applyPlacement); // var a = bodyEl.offsetWidth + 1; ? // Bind events @@ -3303,7 +3332,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). scope.$emit(options.prefixEvent + '.hide', $tooltip); }); $tooltip.$isShown = scope.$isShown = false; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); // Unbind events if (options.keyboard && tipElement !== null) { tipElement.off('keyup', $tooltip.$onKeyUp); @@ -3349,9 +3378,9 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). // Private methods function getPosition() { if (options.container === 'body') { - return dimensions.offset(element[0]); + return dimensions.offset(options.target || element[0]); } else { - return dimensions.position(element[0]); + return dimensions.position(options.target || element[0]); } } function getCalculatedOffset(placement, position, actualWidth, actualHeight) { @@ -3442,6 +3471,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). 'contentTemplate', 'placement', 'container', + 'target', 'delay', 'trigger', 'keyboard', @@ -3548,8 +3578,8 @@ angular.module('mgcrea.ngStrap.typeahead', [ $typeahead.select = function (index) { var value = scope.$matches[index].value; controller.$setViewValue(value); - scope.$resetMatches(); controller.$render(); + scope.$resetMatches(); if (parentScope) parentScope.$digest(); // Emit event diff --git a/dist/angular-strap.min.js b/dist/angular-strap.min.js index 1b03a21ce..943b4291c 100644 --- a/dist/angular-strap.min.js +++ b/dist/angular-strap.min.js @@ -1,9 +1,9 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(e,t){"use strict";angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab"]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto"};this.$get=["$window","debounce","dimensions",function(t,n,a){function o(o,l){function s(e,t,n){var a=u(),o=c();return h>=a?"top":null!==e&&a+e<=t.top?"middle":null!==v&&t.top+n+g>=o-v?"bottom":"middle"}function u(){return p[0]===t?t.pageYOffset:p[0]===t}function c(){return p[0]===t?t.document.body.scrollHeight:p[0].scrollHeight}var d={},f=angular.extend({},e,l),p=f.target,m="affix affix-top affix-bottom",g=0,$=0,h=0,v=0,y=null,w=null,b=o.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var k=0;k<1*f.offsetParent-1;k++)b=b.parent();else b=angular.element(f.offsetParent);return d.init=function(){d.$parseOffsets(),$=a.offset(o[0]).top+g,p.on("scroll",d.checkPosition),p.on("click",d.checkPositionWithEventLoop),r.on("resize",d.$debouncedOnResize),d.checkPosition(),d.checkPositionWithEventLoop()},d.destroy=function(){p.off("scroll",d.checkPosition),p.off("click",d.checkPositionWithEventLoop),r.off("resize",d.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=u(),t=a.offset(o[0]),n=a.height(o[0]),r=s(w,t,n);y!==r&&(y=r,o.removeClass(m).addClass("affix"+("middle"!==r?"-"+r:"")),"top"===r?(w=null,o.css("position",f.offsetParent?"":"relative"),o.css("top","")):"bottom"===r?(w=f.offsetUnpin?-(1*f.offsetUnpin):t.top-e,o.css("position",f.offsetParent?"":"relative"),o.css("top",f.offsetParent?"":i[0].offsetHeight-v-n-$+"px")):(w=null,o.css("position","fixed"),o.css("top",g+"px")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){o.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(g=1*-f.offsetTop,h=f.offsetParent?a.offset(b[0]).top+1*f.offsetTop:a.offset(o[0]).top-a.css(o[0],"marginTop",!0)+1*f.offsetTop):h=1*f.offsetTop),f.offsetBottom&&(v=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?c()-(a.offset(b[0]).top+a.height(b[0]))+1*f.offsetBottom+1:1*f.offsetBottom)},d.init(),d}var i=angular.element(t.document.body),r=angular.element(t);return o}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,a,o,i){var r={scope:n,offsetTop:"auto",target:i?i.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin"],function(e){angular.isDefined(o[e])&&(r[e]=o[e])});var l=e(a,r);n.$on("$destroy",function(){r=null,l=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1};this.$get=["$modal","$timeout",function(t,n){function a(a){var o={},i=angular.extend({},e,a);o=t(i),i.type&&(o.$scope.type=i.type);var r=o.show;return i.duration&&(o.show=function(){r(),n(function(){o.hide()},1e3*i.duration)}),o}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(e,t,n,a){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content","type"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsAlert&&e.$watch(o.bsAlert,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",placement:"right",template:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var a={},o=angular.extend({},e,n);return a=t(o)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsAside&&e.$watch(o.bsAside,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=angular.isDefined(i.trueValue)?i.trueValue:!0;a.test(i.trueValue)&&(c=e.$eval(i.trueValue));var d=angular.isDefined(i.falseValue)?i.falseValue:!1;a.test(i.falseValue)&&(d=e.$eval(i.falseValue));var f="boolean"!=typeof c||"boolean"!=typeof d;f&&(r.$parsers.push(function(e){return e?c:d}),e.$watch(i.ngModel,function(){r.$render()})),r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){s||r.$setViewValue(!u.hasClass("active")),f||r.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=a.test(i.value)?e.$eval(i.value):i.value;r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){r.$setViewValue(c),r.$render()})})}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,n,a,o,i,r,l,s){function u(t,n,a){function o(e){e.selected=r.$isSelected(e.date)}function i(){t[0].focus()}var r=s(t,angular.extend({},e,a)),u=a.scope,f=r.$options,p=r.$scope;f.startView&&(f.startView-=f.minView);var m=l(r);r.$views=m.views;var g=m.viewDate;p.$mode=f.startView;var $=r.$views[p.$mode];p.$select=function(e){r.select(e)},p.$selectPane=function(e){r.$selectPane(e)},p.$toggleMode=function(){r.setMode((p.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,$.update.call($,e)),r.$build(!0)},r.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),n.$dateValue.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),!p.$mode||t?(n.$setViewValue(n.$dateValue),n.$render(),f.autoclose&&!t&&r.hide(!0)):(angular.extend(g,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode(p.$mode-1),r.$build())},r.setMode=function(e){p.$mode=e,$=r.$views[p.$mode],r.$build()},r.$build=function(e){e===!0&&$.built||(e!==!1||$.built)&&$.build.call($)},r.$updateSelected=function(){for(var e=0,t=p.rows.length;t>e;e++)angular.forEach(p.rows[e],o)},r.$isSelected=function(e){return $.isSelected(e)},r.$selectPane=function(e){var t=$.steps,n=new Date(Date.UTC(g.year+(t.year||0)*e,g.month+(t.month||0)*e,g.date+(t.day||0)*e));angular.extend(g,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),c){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return p.$mode?p.$apply(function(){r.setMode(p.$mode-1)}):r.hide(!0);$.onKeyDown(e),u.$digest()}};var h=r.init;r.init=function(){return d&&f.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(c&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",i)),void h())};var v=r.destroy;r.destroy=function(){d&&f.useNative&&t.off("click",i),v()};var y=r.show;r.show=function(){y(),setTimeout(function(){r.$element.on(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var c=(angular.element(t.document.body),"createTouch"in t.document),d=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),u.defaults=e,u}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){var l=(i.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),s=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","dayFormat","strictFormat","startWeek","useNative","lang","startView","minView"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),l&&u.useNative&&(u.dateFormat="yyyy-MM-dd");var c=i(t,a,u);u=c.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){if("today"===t){var n=new Date;c.$options[e]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else c.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):s(t)?+new Date(parseInt(t,10)):+new Date(t);!isNaN(c.$options[e])&&c.$build(!1)})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0);var d=r({format:u.dateFormat,lang:u.lang,strict:u.strictFormat});a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))return void a.$setValidity("date",!1);var n=(isNaN(c.$options.minDate)||t.getTime()>=c.$options.minDate)&&(isNaN(c.$options.maxDate)||t.getTime()<=c.$options.maxDate);return a.$setValidity("date",n),n&&(a.$dateValue=t),"string"===u.dateType?o(e,u.dateFormat):"number"===u.dateType?a.$dateValue.getTime():"iso"===u.dateType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.dateType?d.parse(e):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.dateFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(n,a,o){return function(i){var r=i.$scope,l=i.$options,s=n.DATETIME_FORMATS.SHORTDAY,u=s.slice(l.startWeek).concat(s.slice(0,l.startWeek)),c=a.trustAsHtml(''+u.join('')+""),d=i.$date||new Date,f={year:d.getFullYear(),month:d.getMonth(),date:d.getDate()},p=(6e4*d.getTimezoneOffset(),[{format:l.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==f.year||e.getMonth()!==f.month?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getDate()!==f.date&&(f.date=i.$date.getDate(),i.$updateSelected())},build:function(){var n=new Date(f.year,f.month,1),a=n.getTimezoneOffset(),s=new Date(+n-864e5*t(n.getDay()-l.startWeek,7)),u=s.getTimezoneOffset();u!==a&&(s=new Date(+s+6e4*(u-a)));for(var d,p=[],m=0;42>m;m++)d=new Date(s.getFullYear(),s.getMonth(),s.getDate()+m),p.push({date:d,label:o(d,this.format),selected:i.$date&&this.isSelected(d),muted:d.getMonth()!==f.month,disabled:this.isDisabled(d)});r.title=o(n,"MMMM yyyy"),r.showLabels=!0,r.labels=c,r.rows=e(p,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()&&e.getDate()===i.$date.getDate()},isDisabled:function(e){return e.getTime()l.maxDate},onKeyDown:function(e){var t,n=i.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||i.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===f.year?e.getMonth()!==f.month&&(angular.extend(f,{month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected()):(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build())},build:function(){for(var t,n=(new Date(f.year,0,1),[]),a=0;12>a;a++)t=new Date(f.year,a,1),n.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=o(t,"yyyy"),r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getMonth(),n=new Date(i.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||i.select(n,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(f.year/20,10)?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getFullYear()!==f.year&&(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected())},build:function(){for(var t,n=f.year-f.year%(3*this.split),a=[],l=0;12>l;l++)t=new Date(n+l,0,1),a.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=a[0].label+"-"+a[a.length-1].label,r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getFullYear(),n=new Date(i.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||i.select(n,!0)}}]);return{views:l.minView?Array.prototype.slice.call(p,l.minView):p,viewDate:f}}}]}),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,o){function l(e){return e.target!==t[0]?e.target!==t[0]&&s.hide():void 0}{var s={},u=angular.extend({},e,o);s.$scope=u.scope&&u.scope.$new()||n.$new()}s=a(t,u),s.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(s.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){r&&r.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n1){var r=i.search(n[t]);e=e.split(n[t]).join(""),f[n[t]]&&(a[r]=f[n[t]])}return angular.forEach(a,function(e){o.push(e)}),o}function i(e){return e.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function r(e){var t,n=Object.keys(d),a=e;for(t=0;tu?a=setTimeout(s,t-u):(a=null,n||(l=e.apply(i,o)))},u=n&&!a;return a||(a=setTimeout(s,t)),u&&(l=e.apply(i,o)),l}}).constant("throttle",function(e,t,n){var a,o,i,r=null,l=0;n||(n={});var s=function(){l=n.leading===!1?0:new Date,r=null,i=e.apply(a,o)};return function(){var u=new Date;l||n.leading!==!1||(l=u);var c=t-(u-l);return a=this,o=arguments,0>=c?(clearTimeout(r),r=null,l=u,i=e.apply(a,o)):r||n.trailing===!1||(r=setTimeout(s,c)),i}}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),n=t.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};t.css=function(t,n,a){var o;return o=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],a===!0?parseFloat(o)||0:o},t.offset=function(t){var n=t.getBoundingClientRect(),a=t.ownerDocument;return{width:t.offsetWidth,height:t.offsetHeight,top:n.top+(e.pageYOffset||a.documentElement.scrollTop)-(a.documentElement.clientTop||0),left:n.left+(e.pageXOffset||a.documentElement.scrollLeft)-(a.documentElement.clientLeft||0)}},t.position=function(e){var o,i,r={top:0,left:0};return"fixed"===t.css(e,"position")?i=e.getBoundingClientRect():(o=a(e),i=t.offset(e),i=t.offset(e),n(o,"html")||(r=t.offset(o)),r.top+=t.css(o,"borderTopWidth",!0),r.left+=t.css(o,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:i.top-r.top-t.css(e,"marginTop",!0),left:i.left-r.left-t.css(e,"marginLeft",!0)}};var a=function(e){var a=e.ownerDocument,o=e.offsetParent||a;if(n(o,"#document"))return a.documentElement;for(;o&&!n(o,"html")&&"static"===t.css(o,"position");)o=o.offsetParent;return o||a.documentElement};return t.height=function(e,n){var a=e.offsetHeight;return n?a+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):a-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),a},t.width=function(e,n){var a=e.offsetWidth;return n?a+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):a-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),a},t}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function a(a,o){function i(e,t){return e.map(function(e,n){var a,o,i={};return i[c]=e,a=u(t,i),o=p(t,i)||n,{label:a,value:o}})}var r={},l=angular.extend({},e,o);r.$values=[];var s,u,c,d,f,p,m;return r.init=function(){r.$match=s=a.match(l.regexp),u=t(s[2]||s[1]),c=s[4]||s[6],d=s[5],f=t(s[3]||""),p=t(s[2]?s[1]:c),m=t(s[7])},r.valuesFn=function(e,t){return n.when(m(e,t)).then(function(t){return r.$values=t?i(t,e):{},r.$values})},r.init(),r}return a}]}),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,a=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,o=!!n,i=o?function(e){var t=n(e);return function(){a(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return i.supported=o,i}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var e=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(n,a,o,i,r,l,s,u,c){function d(t){function n(e){e.target===e.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},e,t);i.$promise=p(r.template);var l=i.$scope=r.scope&&r.scope.$new()||a.$new();r.element||r.container||(r.container="body"),m(["title","content"],function(e){r[e]&&(l[e]=c.trustAsHtml(r[e]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(e){var n=angular.element(e);return p(r.contentTemplate).then(function(e){var a=f('[ng-bind="content"]',n[0]).removeAttr("ng-bind").html(e);return t.template||a.next().remove(),n[0].outerHTML})}));var u,d,y=angular.element('
');return i.$promise.then(function(e){angular.isObject(e)&&(e=e.data),r.html&&(e=e.replace(v,'ng-bind-html="')),e=g.apply(e),u=o(e),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){d&&(d.remove(),d=null),y&&(y.remove(),y=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var e=r.container?f(r.container):null,t=r.container?null:r.element;d=i.$element=u(l,function(){}),d.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&y.addClass(r.backdropAnimation),d.addClass(r.animation)),r.backdrop&&s.enter(y,h,null,function(){}),s.enter(d,e,t,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root.$$phase||l.$digest();var a=d[0];$(function(){a.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(d.on("click",n),y.on("click",n)),r.keyboard&&d.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),s.leave(d,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&s.leave(y,function(){}),l.$isShown=!1,l.$$phase||l.$root.$$phase||l.$digest(),r.backdrop&&(d.off("click",n),y.off("click",n)),r.keyboard&&d.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){d[0].focus()},i.$onKeyUp=function(e){27===e.which&&i.hide()},i}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function p(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var m=angular.forEach,g=String.prototype.trim,$=n.requestAnimationFrame||n.setTimeout,h=angular.element(n.document.body),v=/ng-bind="/gi;return d}]}).directive("bsModal",["$window","$location","$sce","$modal",function(e,t,n,a){return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsModal&&e.$watch(o.bsModal,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var a=n.defaults;return{restrict:"A",link:function(e,n,o){var i=angular.copy(a);angular.forEach(Object.keys(a),function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),e.$watch(function(){return t.path()},function(e){var t=n[0].querySelectorAll("li["+i.routeAttr+"]");angular.forEach(t,function(t){var n=angular.element(t),a=n.attr(i.routeAttr).replace("/","\\/");i.strict&&(a="^"+a+"$");var o=new RegExp(a,["i"]);o.test(e)?n.addClass(i.activeClass):n.removeClass(i.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,o){function i(t,n,a){var i={},l=angular.extend({},e,a);i=o(t,l);var s=a.scope,u=i.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=l.multiple,u.$activate=function(e){u.$$postDigest(function(){i.activate(e)})},u.$select=function(e){u.$$postDigest(function(){i.select(e)})},u.$isVisible=function(){return i.$isVisible()},u.$isActive=function(e){return i.$isActive(e)},i.update=function(e){u.$matches=e,i.$updateActiveIndex()},i.activate=function(e){return l.multiple?(u.$activeIndex.sort(),i.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),l.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},i.select=function(e){var t=u.$matches[e].value;i.activate(e),n.$setViewValue(l.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),s&&s.$digest(),l.multiple||i.hide(),u.$emit("$select.select",t,e)},i.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=l.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return i.$getIndex(e)}):i.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=l.multiple?[]:0)},i.$isVisible=function(){return l.minLength&&n?u.$matches.length&&n.$viewValue.length>=l.minLength:u.$matches.length},i.$isActive=function(e){return l.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},i.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),r){var t=angular.element(e.target);t.triggerHandler("click")}},i.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!l.multiple&&(13===e.keyCode||9===e.keyCode))return i.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex'),s.after(t)}var u=o(n.ngOptions),c=a(t,r,l),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,r).then(function(e){c.update(e),r.$render()})},!0),e.$watch(n.ngModel,function(){c.$updateActiveIndex()},!0),r.$render=function(){var e,a;l.multiple&&angular.isArray(r.$modelValue)?(e=r.$modelValue.map(function(e){return a=c.$getIndex(e),angular.isDefined(a)?c.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(l.maxLength||i.maxLength)?e.length+" "+(l.maxLengthHtml||i.maxLengthHtml):e.join(", ")):(a=c.$getIndex(r.$modelValue),e=angular.isDefined(a)?c.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||i.placeholder)+i.caretHtml)},e.$on("$destroy",function(){c.destroy(),l=null,c=null})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,container:!1};this.$get=["$tooltip",function(t){function n(n,a){var o=angular.extend({},e,a),i=t(n,o);return o.content&&(i.$scope.content=o.content),i}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(e,t,n,a){var o=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title","content"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsPopover&&e.$watch(i.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(a,o,i,r,l,s){function u(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function c(o){var c=angular.extend({},n,o);c.element||(c.element=p);var m=u(c.element,"body"),g=m?d:c.element,$=m?"window":c.id;if(e[$])return e[$].$$count++,e[$];var h,v,y,w,b,k,D,T,x={},S=x.$trackedElements=[],M=[];return x.init=function(){this.$$count=1,w=l(this.checkPosition,c.debounce),b=s(this.checkPosition,c.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",w),g.on("scroll",b),k=l(this.checkOffsets,c.debounce),h=i.$on("$viewContentLoaded",k),v=i.$on("$includeContentLoaded",k),k(),$&&(e[$]=x)},x.destroy=function(){this.$$count--,this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",w),g.off("scroll",w),h(),v(),$&&delete e[$])},x.checkPosition=function(){if(M.length){if(T=(m?a.pageYOffset:g.prop("scrollTop"))||0,D=Math.max(a.innerHeight,f.prop("clientHeight")),TM[e+1].offsetTop))return x.$activateElement(M[e])}},x.checkPositionWithEventLoop=function(){setTimeout(this.checkPosition,1)},x.$activateElement=function(e){if(y){var t=x.$getTrackedElement(y);t&&(t.source.removeClass("active"),u(t.source,"li")&&u(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),u(e.source,"li")&&u(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},x.$getTrackedElement=function(e){return S.filter(function(t){return t.target===e})[0]},x.checkOffsets=function(){angular.forEach(S,function(e){var n=t.querySelector(e.target);e.offsetTop=n?r.offset(n).top:null,c.offset&&null!==e.offsetTop&&(e.offsetTop-=1*c.offset)}),M=S.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),w()},x.trackElement=function(e,t){S.push({target:e,source:t})},x.untrackElement=function(e,t){for(var n,a=S.length;a--;)if(S[a].target===e&&S[a].source===t){n=a;break}S=S.splice(n,1)},x.activate=function(e){S[e].addClass("active")},x.init(),x}var d=angular.element(a),f=angular.element(o.prop("documentElement")),p=angular.element(a.document.body);return c}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,a){return{restrict:"EAC",link:function(e,t,n){var o={scope:e};angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(o[e]=n[e])});var i=a(o);i.trackElement(o.target,t),e.$on("$destroy",function(){i.untrackElement(o.target,t),i.destroy(),o=null,i=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(){return{restrict:"A",compile:function(e){var t=e[0].querySelectorAll("li > a[href]");angular.forEach(t,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.tab",[]).run(["$templateCache",function(e){e.put("$pane","{{pane.content}}")}]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html"};this.$get=function(){return{defaults:e}}}).directive("bsTabs",["$window","$animate","$tab",function(e,t,n){var a=n.defaults;return{restrict:"EAC",scope:!0,require:"?ngModel",templateUrl:function(e,t){return t.template||a.template},link:function(e,t,n,o){var i=a;angular.forEach(["animation"],function(e){angular.isDefined(n[e])&&(i[e]=n[e])}),n.bsTabs&&e.$watch(n.bsTabs,function(t){e.panes=t},!0),t.addClass("tabs"),i.animation&&t.addClass(i.animation),e.active=e.activePane=0,e.setActive=function(t){e.active=t,o&&o.$setViewValue(t)},o&&(o.$render=function(){e.active=1*o.$modelValue})}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,n,a,o,i,r,l){function s(t,n,a){function o(e,n){if(t[0].createTextRange){var a=t[0].createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",n),a.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function s(){t[0].focus()}var d=l(t,angular.extend({},e,a)),f=a.scope,p=d.$options,m=d.$scope,g=0,$=n.$dateValue||new Date,h={hour:$.getHours(),meridian:$.getHours()<12,minute:$.getMinutes(),second:$.getSeconds(),millisecond:$.getMilliseconds()},v=i.DATETIME_FORMATS[p.timeFormat]||p.timeFormat,y=/(h+)[:]?(m+)[ ]?(a?)/i.exec(v).slice(1);m.$select=function(e,t){d.select(e,t)},m.$moveIndex=function(e,t){d.$moveIndex(e,t)},m.$switchMeridian=function(e){d.switchMeridian(e)},d.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(d.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),d.$build()):d.$isBuilt||d.$build()},d.select=function(e,t,a){(!n.$dateValue||isNaN(n.$dateValue.getTime()))&&(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),p.autoclose&&!a&&d.hide(!0)},d.switchMeridian=function(e){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(12>t?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()},d.$build=function(){var e,t,n=m.midIndex=parseInt(p.length/2,10),a=[];for(e=0;e1*p.maxTime},d.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,h.hour+e*p.length,h.minute),angular.extend(h,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,h.hour,h.minute+e*p.length*p.minuteStep),angular.extend(h,{minute:n.getMinutes()})),d.$build()},d.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},d.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return d.hide(!0);var t=new Date(d.$date),n=t.getHours(),a=r(t,"h").length,i=t.getMinutes(),l=r(t,"mm").length,s=/(37|39)/.test(e.keyCode),u=2+1*!!y[2];s&&(37===e.keyCode?g=1>g?u-1:g-1:39===e.keyCode&&(g=u-1>g?g+1:0));var c=[0,a];0===g?(38===e.keyCode?t.setHours(n-parseInt(p.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(p.hourStep,10)),c=[0,a]):1===g?(38===e.keyCode?t.setMinutes(i-parseInt(p.minuteStep,10)):40===e.keyCode&&t.setMinutes(i+parseInt(p.minuteStep,10)),c=[a+1,a+1+l]):2===g&&(s||d.switchMeridian(),c=[a+1+l+1,a+1+l+3]),d.select(t,g,!0),o(c[0],c[1]),f.$digest()}};var w=d.init;d.init=function(){return c&&p.useNative?(t.prop("type","time"),void t.css("-webkit-appearance","textfield")):(u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",s)),void w())};var b=d.destroy;d.destroy=function(){c&&p.useNative&&t.off("click",s),b()};var k=d.show;d.show=function(){k(),setTimeout(function(){d.$element.on(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.on("keydown",d.$onKeyDown)})};var D=d.hide;return d.hide=function(e){d.$element.off(u?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.off("keydown",d.$onKeyDown),D(e)},d}var u=(angular.element(t.document.body),"createTouch"in t.document),c=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),s.defaults=e,s}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){{var l=i.defaults,s=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","useNative","hourStep","minuteStep","length"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),s&&(u.useNative||l.useNative)&&(u.timeFormat="HH:mm");var c=i(t,a,u);u=c.$options;var d=r({format:u.timeFormat,lang:u.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){c.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):d.parse(t,new Date(1970,0,1,0)),!isNaN(c.$options[e])&&c.$build()})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0),a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))a.$setValidity("date",!1);else{var n=t.getTime()>=u.minTime&&t.getTime()<=u.maxTime;a.$setValidity("date",n),n&&(a.$dateValue=t)}return"string"===u.timeType?o(e,u.timeFormat):"number"===u.timeType?a.$dateValue.getTime():"iso"===u.timeType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.timeType?d.parse(e):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.timeFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","dimensions","$$rAF",function(n,a,o,i,r,l,s,u,c,d){function f(t,n){function i(){return"body"===f.container?c.offset(t[0]):c.position(t[0])}function r(e,t,n,a){var o,i=e.split("-");switch(i[0]){case"right":o={top:t.top+t.height/2-a/2,left:t.left+t.width};break;case"bottom":o={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":o={top:t.top+t.height/2-a/2,left:t.left-n};break;default:o={top:t.top-a,left:t.left+t.width/2-n/2}}if(!i[1])return o;if("top"===i[0]||"bottom"===i[0])switch(i[1]){case"left":o.left=t.left;break;case"right":o.left=t.left+t.width-n}else if("left"===i[0]||"right"===i[0])switch(i[1]){case"top":o.top=t.top-a;break;case"bottom":o.top=t.top+t.height}return o}var l={},u=t[0].nodeName.toLowerCase(),f=l.$options=angular.extend({},e,n);l.$promise=m(f.template);var v=l.$scope=f.scope&&f.scope.$new()||a.$new();f.delay&&angular.isString(f.delay)&&(f.delay=parseFloat(f.delay)),f.title&&(l.$scope.title=f.title),v.$hide=function(){v.$$postDigest(function(){l.hide()})},v.$show=function(){v.$$postDigest(function(){l.show()})},v.$toggle=function(){v.$$postDigest(function(){l.toggle()})},l.$isShown=v.$isShown=!1;var y,w;f.contentTemplate&&(l.$promise=l.$promise.then(function(e){var t=angular.element(e);return m(f.contentTemplate).then(function(e){var n=p('[ng-bind="content"]',t[0]);return n.length||(n=p('[ng-bind="title"]',t[0])),n.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,k,D,T;return l.$promise.then(function(e){angular.isObject(e)&&(e=e.data),f.html&&(e=e.replace(h,'ng-bind-html="')),e=g.apply(e),D=e,b=o(e),l.init()}),l.init=function(){f.delay&&angular.isNumber(f.delay)&&(f.delay={show:f.delay,hide:f.delay}),"self"===f.container?T=t:f.container&&(T=p(f.container));var e=f.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",l.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",l.enter),t.on("hover"===e?"mouseleave":"blur",l.leave),"button"===u&&"hover"!==e&&t.on($?"touchstart":"mousedown",l.$onFocusElementMouseDown))}),f.show&&v.$$postDigest(function(){"focus"===f.trigger?t[0].focus():l.show()})},l.destroy=function(){for(var e=f.trigger.split(" "),n=e.length;n--;){var a=e[n];"click"===a?t.off("click",l.toggle):"manual"!==a&&(t.off("hover"===a?"mouseenter":"focus",l.enter),t.off("hover"===a?"mouseleave":"blur",l.leave),"button"===u&&"hover"!==a&&t.off($?"touchstart":"mousedown",l.$onFocusElementMouseDown))}k&&(k.remove(),k=null),v.$destroy()},l.enter=function(){return clearTimeout(y),w="in",f.delay&&f.delay.show?void(y=setTimeout(function(){"in"===w&&l.show()},f.delay.show)):l.show()},l.show=function(){v.$emit(f.prefixEvent+".show.before",l);var e=f.container?T:null,n=f.container?null:t;k&&k.remove(),k=l.$element=b(v,function(){}),k.css({top:"0px",left:"0px",display:"block"}).addClass(f.placement),f.animation&&k.addClass(f.animation),f.type&&k.addClass(f.prefixClass+"-"+f.type),s.enter(k,e,n,function(){v.$emit(f.prefixEvent+".show",l)}),l.$isShown=v.$isShown=!0,v.$$phase||v.$root.$$phase||v.$digest(),d(l.$applyPlacement),f.keyboard&&("focus"!==f.trigger?(l.focus(),k.on("keyup",l.$onKeyUp)):t.on("keyup",l.$onFocusKeyUp))},l.leave=function(){return clearTimeout(y),w="out",f.delay&&f.delay.hide?void(y=setTimeout(function(){"out"===w&&l.hide()},f.delay.hide)):l.hide()},l.hide=function(e){return l.$isShown?(v.$emit(f.prefixEvent+".hide.before",l),s.leave(k,function(){v.$emit(f.prefixEvent+".hide",l)}),l.$isShown=v.$isShown=!1,v.$$phase||v.$root.$$phase||v.$digest(),f.keyboard&&null!==k&&k.off("keyup",l.$onKeyUp),e&&"focus"===f.trigger?t[0].blur():void 0):void 0},l.toggle=function(){l.$isShown?l.leave():l.enter()},l.focus=function(){k[0].focus()},l.$applyPlacement=function(){if(k){var e=i(),t=k.prop("offsetWidth"),n=k.prop("offsetHeight"),a=r(f.placement,e,t,n);a.top+="px",a.left+="px",k.css(a)}},l.$onKeyUp=function(e){27===e.which&&l.hide()},l.$onFocusKeyUp=function(e){27===e.which&&t[0].blur()},l.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),l.$isShown?t[0].blur():t[0].focus()},l}function p(e,n){return angular.element((n||t).querySelectorAll(e))}function m(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var g=String.prototype.trim,$="createTouch"in n.document,h=/ng-bind="/gi;return f}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,a,o){return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation","type"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsTooltip&&e.$watch(i.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,n,o){var i={},r=angular.extend({},e,o);i=a(t,r);var l=o.scope,s=i.$scope;s.$resetMatches=function(){s.$matches=[],s.$activeIndex=0},s.$resetMatches(),s.$activate=function(e){s.$$postDigest(function(){i.activate(e)})},s.$select=function(e){s.$$postDigest(function(){i.select(e)})},s.$isVisible=function(){return i.$isVisible()},i.update=function(e){s.$matches=e,s.$activeIndex>=e.length&&(s.$activeIndex=0)},i.activate=function(e){s.$activeIndex=e},i.select=function(e){var t=s.$matches[e].value;n.$setViewValue(t),s.$resetMatches(),n.$render(),l&&l.$digest(),s.$emit("$typeahead.select",t,e)},i.$isVisible=function(){return r.minLength&&n?s.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!s.$matches.length},i.$getIndex=function(e){var t=s.$matches.length,n=t;if(t){for(n=t;n--&&s.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},i.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&s.$matches.length?i.select(s.$activeIndex):38===e.keyCode&&s.$activeIndex>0?s.$activeIndex--:40===e.keyCode&&s.$activeIndexu&&(e=e.slice(0,u)),(1!==e.length||e[0].value!==t)&&(f.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=f.$getIndex(r.$modelValue),n=angular.isDefined(e)?f.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){f.destroy(),l=null,f=null})}}}])}(window,document); \ No newline at end of file +!function(e,t){"use strict";angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab"]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto"};this.$get=["$window","debounce","dimensions",function(t,n,a){function o(o,l){function s(e,t,n){var a=u(),o=c();return h>=a?"top":null!==e&&a+e<=t.top?"middle":null!==v&&t.top+n+g>=o-v?"bottom":"middle"}function u(){return m[0]===t?t.pageYOffset:m[0]===t}function c(){return m[0]===t?t.document.body.scrollHeight:m[0].scrollHeight}var d={},f=angular.extend({},e,l),m=f.target,p="affix affix-top affix-bottom",g=0,$=0,h=0,v=0,y=null,w=null,b=o.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var k=0;k<1*f.offsetParent-1;k++)b=b.parent();else b=angular.element(f.offsetParent);return d.init=function(){d.$parseOffsets(),$=a.offset(o[0]).top+g,m.on("scroll",d.checkPosition),m.on("click",d.checkPositionWithEventLoop),r.on("resize",d.$debouncedOnResize),d.checkPosition(),d.checkPositionWithEventLoop()},d.destroy=function(){m.off("scroll",d.checkPosition),m.off("click",d.checkPositionWithEventLoop),r.off("resize",d.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=u(),t=a.offset(o[0]),n=a.height(o[0]),r=s(w,t,n);y!==r&&(y=r,o.removeClass(p).addClass("affix"+("middle"!==r?"-"+r:"")),"top"===r?(w=null,o.css("position",f.offsetParent?"":"relative"),o.css("top","")):"bottom"===r?(w=f.offsetUnpin?-(1*f.offsetUnpin):t.top-e,o.css("position",f.offsetParent?"":"relative"),o.css("top",f.offsetParent?"":i[0].offsetHeight-v-n-$+"px")):(w=null,o.css("position","fixed"),o.css("top",g+"px")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){o.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(g=1*-f.offsetTop,h=f.offsetParent?a.offset(b[0]).top+1*f.offsetTop:a.offset(o[0]).top-a.css(o[0],"marginTop",!0)+1*f.offsetTop):h=1*f.offsetTop),f.offsetBottom&&(v=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?c()-(a.offset(b[0]).top+a.height(b[0]))+1*f.offsetBottom+1:1*f.offsetBottom)},d.init(),d}var i=angular.element(t.document.body),r=angular.element(t);return o}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,a,o,i){var r={scope:n,offsetTop:"auto",target:i?i.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin"],function(e){angular.isDefined(o[e])&&(r[e]=o[e])});var l=e(a,r);n.$on("$destroy",function(){r=null,l=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(t,n){function a(a){var o={},i=angular.extend({},e,a);o=t(i),o.$scope.dismissable=!!i.dismissable,i.type&&(o.$scope.type=i.type);var r=o.show;return i.duration&&(o.show=function(){r(),n(function(){o.hide()},1e3*i.duration)}),o}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(e,t,n,a){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration","dismissable"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content","type"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsAlert&&e.$watch(o.bsAlert,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=angular.isDefined(i.trueValue)?i.trueValue:!0;a.test(i.trueValue)&&(c=e.$eval(i.trueValue));var d=angular.isDefined(i.falseValue)?i.falseValue:!1;a.test(i.falseValue)&&(d=e.$eval(i.falseValue));var f="boolean"!=typeof c||"boolean"!=typeof d;f&&(r.$parsers.push(function(e){return e?c:d}),e.$watch(i.ngModel,function(){r.$render()})),r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){s||r.$setViewValue(!u.hasClass("active")),f||r.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var l=n,s="INPUT"===o[0].nodeName,u=s?o.parent():o,c=a.test(i.value)?e.$eval(i.value):i.value;r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){s&&(o[0].checked=e),u.toggleClass(l.activeClass,e)})},o.bind(l.toggleEvent,function(){e.$apply(function(){r.$setViewValue(c),r.$render()})})}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",placement:"right",template:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var a={},o=angular.extend({},e,n);return a=t(o)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsAside&&e.$watch(o.bsAside,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",modelDateFormat:null,dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0,iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,n,a,o,i,r,l,s){function u(t,n,a){function o(e){e.selected=r.$isSelected(e.date)}function i(){t[0].focus()}var r=s(t,angular.extend({},e,a)),u=a.scope,f=r.$options,m=r.$scope;f.startView&&(f.startView-=f.minView);var p=l(r);r.$views=p.views;var g=p.viewDate;m.$mode=f.startView,m.$iconLeft=f.iconLeft,m.$iconRight=f.iconRight;var $=r.$views[m.$mode];m.$select=function(e){r.select(e)},m.$selectPane=function(e){r.$selectPane(e)},m.$toggleMode=function(){r.setMode((m.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,$.update.call($,e)),r.$build(!0)},r.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),n.$dateValue.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),!m.$mode||t?(n.$setViewValue(n.$dateValue),n.$render(),f.autoclose&&!t&&r.hide(!0)):(angular.extend(g,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode(m.$mode-1),r.$build())},r.setMode=function(e){m.$mode=e,$=r.$views[m.$mode],r.$build()},r.$build=function(e){e===!0&&$.built||(e!==!1||$.built)&&$.build.call($)},r.$updateSelected=function(){for(var e=0,t=m.rows.length;t>e;e++)angular.forEach(m.rows[e],o)},r.$isSelected=function(e){return $.isSelected(e)},r.$selectPane=function(e){var t=$.steps,n=new Date(Date.UTC(g.year+(t.year||0)*e,g.month+(t.month||0)*e,g.date+(t.day||0)*e));angular.extend(g,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),c){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return m.$mode?m.$apply(function(){r.setMode(m.$mode-1)}):r.hide(!0);$.onKeyDown(e),u.$digest()}};var h=r.init;r.init=function(){return d&&f.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(c&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",i)),void h())};var v=r.destroy;r.destroy=function(){d&&f.useNative&&t.off("click",i),v()};var y=r.show;r.show=function(){y(),setTimeout(function(){r.$element.on(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(c?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var c=(angular.element(t.document.body),"createTouch"in t.document),d=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),u.defaults=e,u}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){var l=(i.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),s=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","modelDateFormat","dayFormat","strictFormat","startWeek","useNative","lang","startView","minView"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),l&&u.useNative&&(u.dateFormat="yyyy-MM-dd");var c=i(t,a,u);u=c.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){if("today"===t){var n=new Date;c.$options[e]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else c.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):s(t)?+new Date(parseInt(t,10)):+new Date(t);!isNaN(c.$options[e])&&c.$build(!1)})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0);var d=r({format:u.dateFormat,lang:u.lang,strict:u.strictFormat});a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))return void a.$setValidity("date",!1);var n=isNaN(c.$options.minDate)||t.getTime()>=c.$options.minDate,i=isNaN(c.$options.maxDate)||t.getTime()<=c.$options.maxDate,r=n&&i;return a.$setValidity("date",r),a.$setValidity("min",n),a.$setValidity("max",i),r&&(a.$dateValue=t),"string"===u.dateType?o(t,u.modelDateFormat||u.dateFormat):"number"===u.dateType?a.$dateValue.getTime():"iso"===u.dateType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.dateType?d.parse(e,null,u.modelDateFormat):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.dateFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(n,a,o){return function(i){var r=i.$scope,l=i.$options,s=n.DATETIME_FORMATS.SHORTDAY,u=s.slice(l.startWeek).concat(s.slice(0,l.startWeek)),c=a.trustAsHtml(''+u.join('')+""),d=i.$date||new Date,f={year:d.getFullYear(),month:d.getMonth(),date:d.getDate()},m=(6e4*d.getTimezoneOffset(),[{format:l.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==f.year||e.getMonth()!==f.month?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getDate()!==f.date&&(f.date=i.$date.getDate(),i.$updateSelected())},build:function(){var n=new Date(f.year,f.month,1),a=n.getTimezoneOffset(),s=new Date(+n-864e5*t(n.getDay()-l.startWeek,7)),u=s.getTimezoneOffset();u!==a&&(s=new Date(+s+6e4*(u-a)));for(var d,m=[],p=0;42>p;p++)d=new Date(s.getFullYear(),s.getMonth(),s.getDate()+p),m.push({date:d,label:o(d,this.format),selected:i.$date&&this.isSelected(d),muted:d.getMonth()!==f.month,disabled:this.isDisabled(d)});r.title=o(n,"MMMM yyyy"),r.showLabels=!0,r.labels=c,r.rows=e(m,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()&&e.getDate()===i.$date.getDate()},isDisabled:function(e){return e.getTime()l.maxDate},onKeyDown:function(e){var t,n=i.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||i.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===f.year?e.getMonth()!==f.month&&(angular.extend(f,{month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected()):(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build())},build:function(){for(var t,n=(new Date(f.year,0,1),[]),a=0;12>a;a++)t=new Date(f.year,a,1),n.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=o(t,"yyyy"),r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getMonth(),n=new Date(i.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||i.select(n,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(f.year/20,10)?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getFullYear()!==f.year&&(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected())},build:function(){for(var t,n=f.year-f.year%(3*this.split),a=[],l=0;12>l;l++)t=new Date(n+l,0,1),a.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=a[0].label+"-"+a[a.length-1].label,r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return tl.maxDate},onKeyDown:function(e){var t=i.$date.getFullYear(),n=new Date(i.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||i.select(n,!0)}}]);return{views:l.minView?Array.prototype.slice.call(m,l.minView):m,viewDate:f}}}]}),angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(){var e=Date.prototype,t=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale",function(n){var a=function(a){function o(e){var t,n=Object.keys(f),a=[],o=[],i=e;for(t=0;t1){var r=i.search(n[t]);e=e.split(n[t]).join(""),f[n[t]]&&(a[r]=f[n[t]])}return angular.forEach(a,function(e){o.push(e)}),o}function i(e){return e.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function r(e){var t,n=Object.keys(d),a=e;for(t=0;tu?a=setTimeout(s,t-u):(a=null,n||(l=e.apply(i,o)))},u=n&&!a;return a||(a=setTimeout(s,t)),u&&(l=e.apply(i,o)),l}}).constant("throttle",function(e,t,n){var a,o,i,r=null,l=0;n||(n={});var s=function(){l=n.leading===!1?0:new Date,r=null,i=e.apply(a,o)};return function(){var u=new Date;l||n.leading!==!1||(l=u);var c=t-(u-l);return a=this,o=arguments,0>=c?(clearTimeout(r),r=null,l=u,i=e.apply(a,o)):r||n.trailing===!1||(r=setTimeout(s,c)),i}}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),n=t.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};t.css=function(t,n,a){var o;return o=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],a===!0?parseFloat(o)||0:o},t.offset=function(t){var n=t.getBoundingClientRect(),a=t.ownerDocument;return{width:n.width||t.offsetWidth,height:n.height||t.offsetHeight,top:n.top+(e.pageYOffset||a.documentElement.scrollTop)-(a.documentElement.clientTop||0),left:n.left+(e.pageXOffset||a.documentElement.scrollLeft)-(a.documentElement.clientLeft||0)}},t.position=function(e){var o,i,r={top:0,left:0};return"fixed"===t.css(e,"position")?i=e.getBoundingClientRect():(o=a(e),i=t.offset(e),i=t.offset(e),n(o,"html")||(r=t.offset(o)),r.top+=t.css(o,"borderTopWidth",!0),r.left+=t.css(o,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:i.top-r.top-t.css(e,"marginTop",!0),left:i.left-r.left-t.css(e,"marginLeft",!0)}};var a=function(e){var a=e.ownerDocument,o=e.offsetParent||a;if(n(o,"#document"))return a.documentElement;for(;o&&!n(o,"html")&&"static"===t.css(o,"position");)o=o.offsetParent;return o||a.documentElement};return t.height=function(e,n){var a=e.offsetHeight;return n?a+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):a-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),a},t.width=function(e,n){var a=e.offsetWidth;return n?a+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):a-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),a},t}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function a(a,o){function i(e,t){return e.map(function(e,n){var a,o,i={};return i[c]=e,a=u(t,i),o=m(t,i)||n,{label:a,value:o}})}var r={},l=angular.extend({},e,o);r.$values=[];var s,u,c,d,f,m,p;return r.init=function(){r.$match=s=a.match(l.regexp),u=t(s[2]||s[1]),c=s[4]||s[6],d=s[5],f=t(s[3]||""),m=t(s[2]?s[1]:c),p=t(s[7])},r.valuesFn=function(e,t){return n.when(p(e,t)).then(function(t){return r.$values=t?i(t,e):{},r.$values})},r.init(),r}return a}]}),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,a=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,o=!!n,i=o?function(e){var t=n(e);return function(){a(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return i.supported=o,i}]),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,o){function l(e){return e.target!==t[0]?e.target!==t[0]&&s.hide():void 0}{var s={},u=angular.extend({},e,o);s.$scope=u.scope&&u.scope.$new()||n.$new()}s=a(t,u),s.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(s.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){r&&r.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n');return i.$promise.then(function(e){angular.isObject(e)&&(e=e.data),r.html&&(e=e.replace(v,'ng-bind-html="')),e=g.apply(e),u=o(e),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){d&&(d.remove(),d=null),y&&(y.remove(),y=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var e=r.container?f(r.container):null,t=r.container?null:r.element;d=i.$element=u(l,function(){}),d.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&y.addClass(r.backdropAnimation),d.addClass(r.animation)),r.backdrop&&s.enter(y,h,null,function(){}),s.enter(d,e,t,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root&&l.$root.$$phase||l.$digest();var a=d[0];$(function(){a.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(d.on("click",n),y.on("click",n)),r.keyboard&&d.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),s.leave(d,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&s.leave(y,function(){}),l.$isShown=!1,l.$$phase||l.$root&&l.$root.$$phase||l.$digest(),r.backdrop&&(d.off("click",n),y.off("click",n)),r.keyboard&&d.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){d[0].focus()},i.$onKeyUp=function(e){27===e.which&&i.hide()},i}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function m(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var p=angular.forEach,g=String.prototype.trim,$=n.requestAnimationFrame||n.setTimeout,h=angular.element(n.document.body),v=/ng-bind="/gi;return d}]}).directive("bsModal",["$window","$location","$sce","$modal",function(e,t,n,a){return{restrict:"EAC",scope:!0,link:function(e,t,o){var i={scope:e,element:t,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(t){o[t]&&o.$observe(t,function(a){e[t]=n.trustAsHtml(a)})}),o.bsModal&&e.$watch(o.bsModal,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=a(i);t.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var a=n.defaults;return{restrict:"A",link:function(e,n,o){var i=angular.copy(a);angular.forEach(Object.keys(a),function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),e.$watch(function(){return t.path()},function(e){var t=n[0].querySelectorAll("li["+i.routeAttr+"]");angular.forEach(t,function(t){var n=angular.element(t),a=n.attr(i.routeAttr).replace("/","\\/");i.strict&&(a="^"+a+"$");var o=new RegExp(a,["i"]);o.test(e)?n.addClass(i.activeClass):n.removeClass(i.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(a,o,i,r,l,s){function u(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function c(o){var c=angular.extend({},n,o);c.element||(c.element=m);var p=u(c.element,"body"),g=p?d:c.element,$=p?"window":c.id;if(e[$])return e[$].$$count++,e[$];var h,v,y,w,b,k,D,T,x={},S=x.$trackedElements=[],M=[];return x.init=function(){this.$$count=1,w=l(this.checkPosition,c.debounce),b=s(this.checkPosition,c.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",w),g.on("scroll",b),k=l(this.checkOffsets,c.debounce),h=i.$on("$viewContentLoaded",k),v=i.$on("$includeContentLoaded",k),k(),$&&(e[$]=x)},x.destroy=function(){this.$$count--,this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",w),g.off("scroll",w),h(),v(),$&&delete e[$])},x.checkPosition=function(){if(M.length){if(T=(p?a.pageYOffset:g.prop("scrollTop"))||0,D=Math.max(a.innerHeight,f.prop("clientHeight")),TM[e+1].offsetTop))return x.$activateElement(M[e])}},x.checkPositionWithEventLoop=function(){setTimeout(this.checkPosition,1)},x.$activateElement=function(e){if(y){var t=x.$getTrackedElement(y);t&&(t.source.removeClass("active"),u(t.source,"li")&&u(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),u(e.source,"li")&&u(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},x.$getTrackedElement=function(e){return S.filter(function(t){return t.target===e})[0]},x.checkOffsets=function(){angular.forEach(S,function(e){var n=t.querySelector(e.target);e.offsetTop=n?r.offset(n).top:null,c.offset&&null!==e.offsetTop&&(e.offsetTop-=1*c.offset)}),M=S.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),w() +},x.trackElement=function(e,t){S.push({target:e,source:t})},x.untrackElement=function(e,t){for(var n,a=S.length;a--;)if(S[a].target===e&&S[a].source===t){n=a;break}S=S.splice(n,1)},x.activate=function(e){S[e].addClass("active")},x.init(),x}var d=angular.element(a),f=angular.element(o.prop("documentElement")),m=angular.element(a.document.body);return c}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,a){return{restrict:"EAC",link:function(e,t,n){var o={scope:e};angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(o[e]=n[e])});var i=a(o);i.trackElement(o.target,t),e.$on("$destroy",function(){i.untrackElement(o.target,t),i.destroy(),o=null,i=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(){return{restrict:"A",compile:function(e){var t=e[0].querySelectorAll("li > a[href]");angular.forEach(t,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",container:!1,target:!1,placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0};this.$get=["$tooltip",function(t){function n(n,a){var o=angular.extend({},e,a),i=t(n,o);return o.content&&(i.$scope.content=o.content),i}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(e,t,n,a){var o=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title","content"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsPopover&&e.$watch(i.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,o){function i(t,n,a){var i={},l=angular.extend({},e,a);i=o(t,l);var s=i.$scope;s.$matches=[],s.$activeIndex=0,s.$isMultiple=l.multiple,s.$iconCheckmark=l.iconCheckmark,s.$activate=function(e){s.$$postDigest(function(){i.activate(e)})},s.$select=function(e){s.$$postDigest(function(){i.select(e)})},s.$isVisible=function(){return i.$isVisible()},s.$isActive=function(e){return i.$isActive(e)},i.update=function(e){s.$matches=e,i.$updateActiveIndex()},i.activate=function(e){return l.multiple?(s.$activeIndex.sort(),i.$isActive(e)?s.$activeIndex.splice(s.$activeIndex.indexOf(e),1):s.$activeIndex.push(e),l.sort&&s.$activeIndex.sort()):s.$activeIndex=e,s.$activeIndex},i.select=function(e){var t=s.$matches[e].value;s.$apply(function(){i.activate(e),l.multiple?n.$setViewValue(s.$activeIndex.map(function(e){return s.$matches[e].value})):(n.$setViewValue(t),i.hide())}),s.$emit("$select.select",t,e)},i.$updateActiveIndex=function(){n.$modelValue&&s.$matches.length?s.$activeIndex=l.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return i.$getIndex(e)}):i.$getIndex(n.$modelValue):s.$activeIndex>=s.$matches.length&&(s.$activeIndex=l.multiple?[]:0)},i.$isVisible=function(){return l.minLength&&n?s.$matches.length&&n.$viewValue.length>=l.minLength:s.$matches.length},i.$isActive=function(e){return l.multiple?-1!==s.$activeIndex.indexOf(e):s.$activeIndex===e},i.$getIndex=function(e){var t=s.$matches.length,n=t;if(t){for(n=t;n--&&s.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),r){var t=angular.element(e.target);t.triggerHandler("click")}},i.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!l.multiple&&(13===e.keyCode||9===e.keyCode))return i.select(s.$activeIndex);38===e.keyCode&&s.$activeIndex>0?s.$activeIndex--:40===e.keyCode&&s.$activeIndex'),s.after(t)}var u=o(n.ngOptions),c=a(t,r,l),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,r).then(function(e){c.update(e),r.$render()})},!0),e.$watch(n.ngModel,function(){c.$updateActiveIndex(),r.$render()},!0),r.$render=function(){var e,a;l.multiple&&angular.isArray(r.$modelValue)?(e=r.$modelValue.map(function(e){return a=c.$getIndex(e),angular.isDefined(a)?c.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(l.maxLength||i.maxLength)?e.length+" "+(l.maxLengthHtml||i.maxLengthHtml):e.join(", ")):(a=c.$getIndex(r.$modelValue),e=angular.isDefined(a)?c.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||i.placeholder)+i.caretHtml)},e.$on("$destroy",function(){c.destroy(),l=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tab",[]).run(["$templateCache",function(e){e.put("$pane","{{pane.content}}")}]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html"};this.$get=function(){return{defaults:e}}}).directive("bsTabs",["$window","$animate","$tab",function(e,t,n){var a=n.defaults;return{restrict:"EAC",scope:!0,require:"?ngModel",templateUrl:function(e,t){return t.template||a.template},link:function(e,t,n,o){var i=a;angular.forEach(["animation"],function(e){angular.isDefined(n[e])&&(i[e]=n[e])}),n.bsTabs&&e.$watch(n.bsTabs,function(t){e.panes=t},!0),t.addClass("tabs"),i.animation&&t.addClass(i.animation),e.active=e.activePane=0,e.setActive=function(t){e.active=t,o&&o.$setViewValue(t)},o&&(o.$render=function(){e.active=1*o.$modelValue})}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",modelTimeFormat:null,autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5,iconUp:"glyphicon glyphicon-chevron-up",iconDown:"glyphicon glyphicon-chevron-down"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,n,a,o,i,r,l){function s(t,n,a){function o(e,n){if(t[0].createTextRange){var a=t[0].createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",n),a.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function s(){t[0].focus()}var d=l(t,angular.extend({},e,a)),f=a.scope,m=d.$options,p=d.$scope,g=0,$=n.$dateValue||new Date,h={hour:$.getHours(),meridian:$.getHours()<12,minute:$.getMinutes(),second:$.getSeconds(),millisecond:$.getMilliseconds()},v=i.DATETIME_FORMATS[m.timeFormat]||m.timeFormat,y=/(h+)([:\.])?(m+)[ ]?(a?)/i.exec(v).slice(1);p.$iconUp=m.iconUp,p.$iconDown=m.iconDown,p.$select=function(e,t){d.select(e,t)},p.$moveIndex=function(e,t){d.$moveIndex(e,t)},p.$switchMeridian=function(e){d.switchMeridian(e)},d.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(d.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),d.$build()):d.$isBuilt||d.$build()},d.select=function(e,t,a){(!n.$dateValue||isNaN(n.$dateValue.getTime()))&&(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),m.autoclose&&!a&&d.hide(!0)},d.switchMeridian=function(e){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(12>t?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()},d.$build=function(){var e,t,n=p.midIndex=parseInt(m.length/2,10),a=[];for(e=0;e1*m.maxTime},d.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,h.hour+e*m.length,h.minute),angular.extend(h,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,h.hour,h.minute+e*m.length*m.minuteStep),angular.extend(h,{minute:n.getMinutes()})),d.$build()},d.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},d.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return d.hide(!0);var t=new Date(d.$date),n=t.getHours(),a=r(t,"h").length,i=t.getMinutes(),l=r(t,"mm").length,s=/(37|39)/.test(e.keyCode),u=2+1*!!y[3];s&&(37===e.keyCode?g=1>g?u-1:g-1:39===e.keyCode&&(g=u-1>g?g+1:0));var c=[0,a];0===g?(38===e.keyCode?t.setHours(n-parseInt(m.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(m.hourStep,10)),c=[0,a]):1===g?(38===e.keyCode?t.setMinutes(i-parseInt(m.minuteStep,10)):40===e.keyCode&&t.setMinutes(i+parseInt(m.minuteStep,10)),c=[a+1,a+1+l]):2===g&&(s||d.switchMeridian(),c=[a+1+l+1,a+1+l+3]),d.select(t,g,!0),o(c[0],c[1]),f.$digest()}};var w=d.init;d.init=function(){return c&&m.useNative?(t.prop("type","time"),void t.css("-webkit-appearance","textfield")):(u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",s)),void w())};var b=d.destroy;d.destroy=function(){c&&m.useNative&&t.off("click",s),b()};var k=d.show;d.show=function(){k(),setTimeout(function(){d.$element.on(u?"touchstart":"mousedown",d.$onMouseDown),m.keyboard&&t.on("keydown",d.$onKeyDown)})};var D=d.hide;return d.hide=function(e){d.$element.off(u?"touchstart":"mousedown",d.$onMouseDown),m.keyboard&&t.off("keydown",d.$onKeyDown),D(e)},d}var u=(angular.element(t.document.body),"createTouch"in t.document),c=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=i.id),s.defaults=e,s}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){{var l=i.defaults,s=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","modelTimeFormat","useNative","hourStep","minuteStep","length"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),s&&(u.useNative||l.useNative)&&(u.timeFormat="HH:mm");var c=i(t,a,u);u=c.$options;var d=r({format:u.timeFormat,lang:u.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){c.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):d.parse(t,new Date(1970,0,1,0)),!isNaN(c.$options[e])&&c.$build()})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0),a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))a.$setValidity("date",!1);else{var n=t.getTime()>=u.minTime&&t.getTime()<=u.maxTime;a.$setValidity("date",n),n&&(a.$dateValue=t)}return"string"===u.timeType?o(t,u.modelTimeFormat||u.timeFormat):"number"===u.timeType?a.$dateValue.getTime():"iso"===u.timeType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.timeType?d.parse(e,null,u.modelTimeFormat):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.timeFormat))},e.$on("$destroy",function(){c.destroy(),u=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,target:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","dimensions","$$rAF",function(n,a,o,i,r,l,s,u,c){function d(t,n){function i(){return"body"===h.container?u.offset(h.target||t[0]):u.position(h.target||t[0])}function r(e,t,n,a){var o,i=e.split("-");switch(i[0]){case"right":o={top:t.top+t.height/2-a/2,left:t.left+t.width};break;case"bottom":o={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":o={top:t.top+t.height/2-a/2,left:t.left-n};break;default:o={top:t.top-a,left:t.left+t.width/2-n/2}}if(!i[1])return o;if("top"===i[0]||"bottom"===i[0])switch(i[1]){case"left":o.left=t.left;break;case"right":o.left=t.left+t.width-n}else if("left"===i[0]||"right"===i[0])switch(i[1]){case"top":o.top=t.top-a;break;case"bottom":o.top=t.top+t.height}return o}var l={},d=t[0].nodeName.toLowerCase(),h=l.$options=angular.extend({},e,n);l.$promise=m(h.template);var v=l.$scope=h.scope&&h.scope.$new()||a.$new();h.delay&&angular.isString(h.delay)&&(h.delay=parseFloat(h.delay)),h.title&&(l.$scope.title=h.title),v.$hide=function(){v.$$postDigest(function(){l.hide()})},v.$show=function(){v.$$postDigest(function(){l.show()})},v.$toggle=function(){v.$$postDigest(function(){l.toggle()})},l.$isShown=v.$isShown=!1;var y,w;h.contentTemplate&&(l.$promise=l.$promise.then(function(e){var t=angular.element(e);return m(h.contentTemplate).then(function(e){var n=f('[ng-bind="content"]',t[0]);return n.length||(n=f('[ng-bind="title"]',t[0])),n.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,k,D,T;return l.$promise.then(function(e){angular.isObject(e)&&(e=e.data),h.html&&(e=e.replace($,'ng-bind-html="')),e=p.apply(e),D=e,b=o(e),l.init()}),l.init=function(){h.delay&&angular.isNumber(h.delay)&&(h.delay={show:h.delay,hide:h.delay}),"self"===h.container?T=t:h.container&&(T=f(h.container));var e=h.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",l.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",l.enter),t.on("hover"===e?"mouseleave":"blur",l.leave),"button"===d&&"hover"!==e&&t.on(g?"touchstart":"mousedown",l.$onFocusElementMouseDown))}),h.target&&(h.target=angular.isElement(h.target)?h.target:f(h.target)[0]),h.show&&v.$$postDigest(function(){"focus"===h.trigger?t[0].focus():l.show()})},l.destroy=function(){for(var e=h.trigger.split(" "),n=e.length;n--;){var a=e[n];"click"===a?t.off("click",l.toggle):"manual"!==a&&(t.off("hover"===a?"mouseenter":"focus",l.enter),t.off("hover"===a?"mouseleave":"blur",l.leave),"button"===d&&"hover"!==a&&t.off(g?"touchstart":"mousedown",l.$onFocusElementMouseDown))}k&&(k.remove(),k=null),clearTimeout(y),v.$destroy()},l.enter=function(){return clearTimeout(y),w="in",h.delay&&h.delay.show?void(y=setTimeout(function(){"in"===w&&l.show()},h.delay.show)):l.show()},l.show=function(){v.$emit(h.prefixEvent+".show.before",l);var e=h.container?T:null,n=h.container?null:t;k&&k.remove(),k=l.$element=b(v,function(){}),k.css({top:"-9999px",left:"-9999px",display:"block"}).addClass(h.placement),h.animation&&k.addClass(h.animation),h.type&&k.addClass(h.prefixClass+"-"+h.type),s.enter(k,e,n,function(){v.$emit(h.prefixEvent+".show",l)}),l.$isShown=v.$isShown=!0,v.$$phase||v.$root&&v.$root.$$phase||v.$digest(),c(l.$applyPlacement),h.keyboard&&("focus"!==h.trigger?(l.focus(),k.on("keyup",l.$onKeyUp)):t.on("keyup",l.$onFocusKeyUp))},l.leave=function(){return clearTimeout(y),w="out",h.delay&&h.delay.hide?void(y=setTimeout(function(){"out"===w&&l.hide()},h.delay.hide)):l.hide()},l.hide=function(e){return l.$isShown?(v.$emit(h.prefixEvent+".hide.before",l),s.leave(k,function(){v.$emit(h.prefixEvent+".hide",l)}),l.$isShown=v.$isShown=!1,v.$$phase||v.$root&&v.$root.$$phase||v.$digest(),h.keyboard&&null!==k&&k.off("keyup",l.$onKeyUp),e&&"focus"===h.trigger?t[0].blur():void 0):void 0},l.toggle=function(){l.$isShown?l.leave():l.enter()},l.focus=function(){k[0].focus()},l.$applyPlacement=function(){if(k){var e=i(),t=k.prop("offsetWidth"),n=k.prop("offsetHeight"),a=r(h.placement,e,t,n);a.top+="px",a.left+="px",k.css(a)}},l.$onKeyUp=function(e){27===e.which&&l.hide()},l.$onFocusKeyUp=function(e){27===e.which&&t[0].blur()},l.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),l.$isShown?t[0].blur():t[0].focus()},l}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function m(e){return i.when(r.get(e)||l.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var p=String.prototype.trim,g="createTouch"in n.document,$=/ng-bind="/gi;return d}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,a,o){return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","type"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title"],function(t){i[t]&&i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){l&&l.$applyPlacement()})})}),i.bsTooltip&&e.$watch(i.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&o(function(){l&&l.$applyPlacement()})},!0);var l=a(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,n,o){var i={},r=angular.extend({},e,o);i=a(t,r);var l=o.scope,s=i.$scope;s.$resetMatches=function(){s.$matches=[],s.$activeIndex=0},s.$resetMatches(),s.$activate=function(e){s.$$postDigest(function(){i.activate(e)})},s.$select=function(e){s.$$postDigest(function(){i.select(e)})},s.$isVisible=function(){return i.$isVisible()},i.update=function(e){s.$matches=e,s.$activeIndex>=e.length&&(s.$activeIndex=0)},i.activate=function(e){s.$activeIndex=e},i.select=function(e){var t=s.$matches[e].value;n.$setViewValue(t),n.$render(),s.$resetMatches(),l&&l.$digest(),s.$emit("$typeahead.select",t,e)},i.$isVisible=function(){return r.minLength&&n?s.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!s.$matches.length},i.$getIndex=function(e){var t=s.$matches.length,n=t;if(t){for(n=t;n--&&s.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},i.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&s.$matches.length?i.select(s.$activeIndex):38===e.keyCode&&s.$activeIndex>0?s.$activeIndex--:40===e.keyCode&&s.$activeIndexu&&(e=e.slice(0,u)),(1!==e.length||e[0].value!==t)&&(f.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=f.$getIndex(r.$modelValue),n=angular.isDefined(e)?f.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){f.destroy(),l=null,f=null})}}}])}(window,document); \ No newline at end of file diff --git a/dist/angular-strap.min.js.map b/dist/angular-strap.min.js.map deleted file mode 100644 index 5b415746d..000000000 --- a/dist/angular-strap.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"angular-strap.min.js.map","sources":["angular-strap.min.js"],"names":["window","document","angular","module","provider","defaults","this","offsetTop","$get","$window","debounce","dimensions","AffixFactory","element","config","getRequiredAffixClass","unpin","position","elementHeight","scrollTop","getScrollTop","scrollHeight","getScrollHeight","top","offsetBottom","initialAffixTop","targetEl","pageYOffset","body","$affix","options","extend","target","reset","initialOffsetTop","affixed","parent","offsetParent","match","i","init","$parseOffsets","offset","on","checkPosition","checkPositionWithEventLoop","windowEl","$debouncedOnResize","destroy","off","setTimeout","height","affix","removeClass","addClass","css","offsetUnpin","bodyEl","offsetHeight","$onResize","directive","restrict","require","link","scope","attr","affixTarget","$element","forEach","key","isDefined","$on","controller","animation","prefixClass","placement","template","container","backdrop","keyboard","show","duration","type","$modal","$timeout","AlertFactory","$alert","$scope","hide","$location","$sce","requestAnimationFrame","$observe","newValue","trustAsHtml","bsAlert","$watch","isObject","content","alert","trigger","toggle","contentTemplate","html","AsideFactory","$aside","bsAside","aside","activeClass","toggleEvent","compile","removeAttr","children","querySelectorAll","child","childEl","ngModel","$button","$$rAF","constantValueRegExp","isInput","nodeName","activeElement","trueValue","test","$eval","falseValue","hasExoticValues","$parsers","push","viewValue","$render","isActive","equals","$modelValue","checked","toggleClass","bind","$apply","$setViewValue","hasClass","value","delay","useNative","dateType","dateFormat","dayFormat","strictFormat","autoclose","minDate","Infinity","maxDate","startView","minView","startWeek","$document","$rootScope","$locale","dateFilter","datepickerViews","$tooltip","DatepickerFactory","updateSelected","el","selected","$datepicker","$isSelected","date","focusElement","focus","parentScope","$options","pickerViews","$views","views","viewDate","$mode","$picker","$select","select","$selectPane","$toggleMode","setMode","length","update","isDate","isNaN","getTime","$date","call","$build","keep","$dateValue","Date","setFullYear","getFullYear","getMonth","getDate","year","month","mode","pristine","built","build","$updateSelected","l","rows","isSelected","steps","targetDate","UTC","day","getUTCFullYear","getUTCMonth","getUTCDate","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","toLowerCase","triggerHandler","$onKeyDown","keyCode","shiftKey","altKey","onKeyDown","$digest","_init","isNative","prop","_destroy","_show","_hide","blur","navigator","userAgent","lang","id","$parse","$q","$dateParser","isNumeric","n","parseFloat","isFinite","datepicker","today","isString","substr","parseInt","dateParser","format","strict","unshift","$setValidity","parsedDate","parse","isValid","toISOString","$formatters","modelValue","isUndefined","NaN","val","split","arr","size","arrays","splice","mod","m","daySplit","picker","weekDaysMin","DATETIME_FORMATS","SHORTDAY","weekDaysLabels","slice","concat","weekDaysLabelsHtml","join","startDate","getTimezoneOffset","force","firstDayOfMonth","firstDayOfMonthOffset","firstDate","getDay","firstDateOffset","days","label","muted","disabled","isDisabled","title","showLabels","labels","newDate","actualTime","name","months","lastDate","actualMonth","setMonth","firstYear","years","actualYear","setYear","Array","prototype","DropdownFactory","onBodyClick","$dropdown","$new","items","index","matchesSelector","eq","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","bsDropdown","dropdown","proto","DateParserFactory","setMapForFormat","keys","Object","setFnMap","map","sortedMap","clonedFormat","search","v","escapeReservedSymbols","text","replace","regExpForFormat","regExpMap","re","RegExp","regex","setMap","sss","ss","s","mm","HH","H","hh","h","a","EEEE","DAY","EEE","dd","d","MMMM","MONTH","MMM","SHORTMONTH","MM","M","yyyy","yy","y","setMilliseconds","setSeconds","setMinutes","setHours","setDate","hours","getHours","indexOf","$format","baseDate","matches","exec","constant","func","wait","immediate","timeout","args","context","timestamp","result","arguments","later","last","apply","callNow","previous","leading","now","remaining","clearTimeout","trailing","factory","fn","extra","currentStyle","getComputedStyle","style","boxRect","getBoundingClientRect","docElement","ownerDocument","width","offsetWidth","documentElement","clientTop","left","pageXOffset","scrollLeft","clientLeft","offsetParentElement","offsetParentRect","outer","regexp","ParseOptionsFactory","parseValues","values","locals","valueName","displayFn","valueFn","$parseOptions","$values","keyName","groupByFn","valuesFn","$match","when","then","version","minor","dot","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","cancel","supported","backdropAnimation","prefixEvent","$compile","$templateCache","$http","$animate","ModalFactory","hideOnBackdropClick","currentTarget","$promise","fetchTemplate","$hide","$$postDigest","$show","$toggle","templateEl","contentEl","findElement","next","remove","outerHTML","modalLinker","modalElement","backdropElement","data","htmlReplaceRegExp","trim","$destroy","$emit","after","display","enter","bodyElement","$isShown","$$phase","$root","$onKeyUp","leave","which","query","get","res","put","String","bsModal","modal","routeAttr","$navbar","copy","path","liElements","li","liElement","pattern","multiple","sort","caretHtml","placeholder","maxLength","maxLengthHtml","SelectFactory","$matches","$activeIndex","$isMultiple","$activate","activate","$isVisible","$isActive","$updateActiveIndex","isArray","$getIndex","minLength","$viewValue","inputEl","parsedOptions","ngOptions","watchedOptions","filter","PopoverFactory","$popover","oldValue","popover","$applyPlacement","bsPopover","spies","$$spies","throttle","ScrollSpyFactory","isWindowSpy","scrollEl","scrollId","$$count","unbindViewContentLoaded","unbindIncludeContentLoaded","activeTarget","debouncedCheckPosition","throttledCheckPosition","debouncedCheckOffsets","viewportHeight","$scrollspy","trackedElements","$trackedElements","sortedElements","checkOffsets","Math","max","innerHeight","docEl","$activateElement","$getTrackedElement","source","obj","trackedElement","targetElement","querySelector","b","trackElement","untrackElement","toDelete","scrollspy","run","$tab","templateUrl","bsTabs","panes","active","activePane","setActive","timeType","timeFormat","minTime","maxTime","hourStep","minuteStep","timepickerFactory","createSelection","start","end","createTextRange","selRange","collapse","moveStart","moveEnd","setSelectionRange","selectionStart","selectionEnd","$timepicker","selectedIndex","hour","meridian","minute","getMinutes","second","getSeconds","millisecond","getMilliseconds","formats","$moveIndex","$switchMeridian","switchMeridian","$isBuilt","midIndex","$isDisabled","minutes","showAM","isAM","selectedTime","hoursLength","minutesLength","lateralMove","count","selectRange","timepicker","parsedTime","TooltipFactory","getPosition","getCalculatedOffset","actualWidth","actualHeight","hoverState","tipLinker","tipElement","tipTemplate","tipContainer","isNumber","triggers","$onFocusElementMouseDown","$onFocusKeyUp","elementPosition","tipWidth","tipHeight","tipPosition","tooltip","bsTooltip","limit","TypeaheadFactory","$typeahead","$resetMatches","typeahead","$isEmpty"],"mappings":"CAOA,SAAUA,EAAQC,GAClB,YAEAC,SAAQC,OAAO,kBACb,uBACA,uBACA,uBACA,wBACA,wBACA,4BACA,4BACA,wBACA,yBACA,yBACA,0BACA,2BACA,2BACA,uBACA,uBAIFD,QAAQC,OAAO,wBACb,oCACA,oCACCC,SAAS,SAAU,WACpB,GAAIC,GAAWC,KAAKD,UAAaE,UAAW,OAC5CD,MAAKE,MACH,UACA,WAC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P,EAAO,GAAG5R,QAAUhD,KAE/C6iB,EAAUld,OAAOiP,GAEjBjW,EAAW2D,eAIf3D,EAAW2D,QAAU,WAEnB,GAAI3D,EAAWmkB,SAASnkB,EAAWoc,YACjC,MAAO/f,GAAQ2P,IAAI,GACrB,IAAIoD,GAAQ8U,EAAUhI,UAAUlc,EAAW8D,aACvC8B,EAAWlK,QAAQoE,UAAUsP,GAAS8U,EAAUnjB,OAAO0a,SAASrM,GAAOzB,MAAQ3N,EAAWoc,UAC9FxW,GAAWlK,QAAQ+F,SAASmE,GAAYA,EAAS+H,MAAQ/H,EACzDvJ,EAAQ2P,IAAIpG,EAAS+K,QAAQ,iBAAkB,IAAI2I,SAGrD9Z,EAAMO,IAAI,WAAY,WACpBmkB,EAAU1lB,UACVlB,EAAU,KACV4mB,EAAY,aAOnB1oB,OAAQC"} \ No newline at end of file diff --git a/dist/angular-strap.tpl.js b/dist/angular-strap.tpl.js index 43246fa15..699802539 100644 --- a/dist/angular-strap.tpl.js +++ b/dist/angular-strap.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -12,7 +12,7 @@ angular.module('mgcrea.ngStrap.alert').run([ '$templateCache', function ($templateCache) { - $templateCache.put('alert/alert.tpl.html', '
 
'); + $templateCache.put('alert/alert.tpl.html', '
 
'); } ]); @@ -28,7 +28,7 @@ angular.module('mgcrea.ngStrap.aside').run([ angular.module('mgcrea.ngStrap.datepicker').run([ '$templateCache', function ($templateCache) { - $templateCache.put('datepicker/datepicker.tpl.html', ''); + $templateCache.put('datepicker/datepicker.tpl.html', ''); } ]); @@ -36,7 +36,7 @@ angular.module('mgcrea.ngStrap.datepicker').run([ angular.module('mgcrea.ngStrap.dropdown').run([ '$templateCache', function ($templateCache) { - $templateCache.put('dropdown/dropdown.tpl.html', ''); + $templateCache.put('dropdown/dropdown.tpl.html', ''); } ]); @@ -60,7 +60,7 @@ angular.module('mgcrea.ngStrap.popover').run([ angular.module('mgcrea.ngStrap.select').run([ '$templateCache', function ($templateCache) { - $templateCache.put('select/select.tpl.html', ''); + $templateCache.put('select/select.tpl.html', ''); } ]); @@ -76,7 +76,7 @@ angular.module('mgcrea.ngStrap.tab').run([ angular.module('mgcrea.ngStrap.timepicker').run([ '$templateCache', function ($templateCache) { - $templateCache.put('timepicker/timepicker.tpl.html', ''); + $templateCache.put('timepicker/timepicker.tpl.html', ''); } ]); diff --git a/dist/angular-strap.tpl.min.js b/dist/angular-strap.tpl.min.js index fc0d0959c..9cfc791c4 100644 --- a/dist/angular-strap.tpl.min.js +++ b/dist/angular-strap.tpl.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(){"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'
 
')}]),angular.module("mgcrea.ngStrap.aside").run(["$templateCache",function(t){t.put("aside/aside.tpl.html",'')}]),angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(t){t.put("datepicker/datepicker.tpl.html",'')}]),angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(t){t.put("dropdown/dropdown.tpl.html",'')}]),angular.module("mgcrea.ngStrap.modal").run(["$templateCache",function(t){t.put("modal/modal.tpl.html",'')}]),angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function(t){t.put("popover/popover.tpl.html",'

')}]),angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(t){t.put("select/select.tpl.html",'')}]),angular.module("mgcrea.ngStrap.tab").run(["$templateCache",function(t){t.put("tab/tab.tpl.html",'
')}]),angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'')}]),angular.module("mgcrea.ngStrap.tooltip").run(["$templateCache",function(t){t.put("tooltip/tooltip.tpl.html",'
')}]),angular.module("mgcrea.ngStrap.typeahead").run(["$templateCache",function(t){t.put("typeahead/typeahead.tpl.html",'')}])}(window,document); \ No newline at end of file +!function(){"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'
 
')}]),angular.module("mgcrea.ngStrap.aside").run(["$templateCache",function(t){t.put("aside/aside.tpl.html",'')}]),angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(t){t.put("datepicker/datepicker.tpl.html",'')}]),angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(t){t.put("dropdown/dropdown.tpl.html",'')}]),angular.module("mgcrea.ngStrap.modal").run(["$templateCache",function(t){t.put("modal/modal.tpl.html",'')}]),angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function(t){t.put("popover/popover.tpl.html",'

')}]),angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(t){t.put("select/select.tpl.html",'')}]),angular.module("mgcrea.ngStrap.tab").run(["$templateCache",function(t){t.put("tab/tab.tpl.html",'
')}]),angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'')}]),angular.module("mgcrea.ngStrap.tooltip").run(["$templateCache",function(t){t.put("tooltip/tooltip.tpl.html",'
')}]),angular.module("mgcrea.ngStrap.typeahead").run(["$templateCache",function(t){t.put("typeahead/typeahead.tpl.html",'')}])}(window,document); \ No newline at end of file diff --git a/dist/angular-strap.tpl.min.js.map b/dist/angular-strap.tpl.min.js.map deleted file mode 100644 index 3697dff67..000000000 --- a/dist/angular-strap.tpl.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"angular-strap.tpl.min.js.map","sources":["angular-strap.tpl.min.js"],"names":["angular","module","run","$templateCache","put","window","document"],"mappings":"CAOA,WACA,YAGAA,SAAQC,OAAO,wBAAwBC,KACrC,iBACA,SAAUC,GACRA,EAAeC,IAAI,uBAAwB,gQAK/CJ,QAAQC,OAAO,wBAAwBC,KACrC,iBACA,SAAUC,GACRA,EAAeC,IAAI,uBAAwB,gcAK/CJ,QAAQC,OAAO,6BAA6BC,KAC1C,iBACA,SAAUC,GACRA,EAAeC,IAAI,iCAAkC,otCAKzDJ,QAAQC,OAAO,2BAA2BC,KACxC,iBACA,SAAUC,GACRA,EAAeC,IAAI,6BAA8B,6aAKrDJ,QAAQC,OAAO,wBAAwBC,KACrC,iBACA,SAAUC,GACRA,EAAeC,IAAI,uBAAwB,gcAK/CJ,QAAQC,OAAO,0BAA0BC,KACvC,iBACA,SAAUC,GACRA,EAAeC,IAAI,2BAA4B,+KAKnDJ,QAAQC,OAAO,yBAAyBC,KACtC,iBACA,SAAUC,GACRA,EAAeC,IAAI,yBAA0B,gaAKjDJ,QAAQC,OAAO,sBAAsBC,KACnC,iBACA,SAAUC,GACRA,EAAeC,IAAI,mBAAoB,6YAK3CJ,QAAQC,OAAO,6BAA6BC,KAC1C,iBACA,SAAUC,GACRA,EAAeC,IAAI,iCAAkC,olEAKzDJ,QAAQC,OAAO,0BAA0BC,KACvC,iBACA,SAAUC,GACRA,EAAeC,IAAI,2BAA4B,uIAKnDJ,QAAQC,OAAO,4BAA4BC,KACzC,iBACA,SAAUC,GACRA,EAAeC,IAAI,+BAAgC,ySAKpDC,OAAQC"} \ No newline at end of file diff --git a/dist/modules/affix.js b/dist/modules/affix.js index 91ef0398e..61d1675b9 100644 --- a/dist/modules/affix.js +++ b/dist/modules/affix.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/affix.min.js b/dist/modules/affix.min.js index e4c3a03cb..2912a237c 100644 --- a/dist/modules/affix.min.js +++ b/dist/modules/affix.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/affix.min.js.map b/dist/modules/affix.min.js.map deleted file mode 100644 index 3cd72b96d..000000000 --- a/dist/modules/affix.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"affix.min.js.map","sources":["affix.min.js"],"names":["angular","module","provider","defaults","this","offsetTop","$get","$window","debounce","dimensions","AffixFactory","element","config","getRequiredAffixClass","unpin","position","elementHeight","scrollTop","getScrollTop","scrollHeight","getScrollHeight","top","offsetBottom","initialAffixTop","targetEl","pageYOffset","document","body","$affix","options","extend","target","reset","initialOffsetTop","affixed","parent","offsetParent","match","i","init","$parseOffsets","offset","on","checkPosition","checkPositionWithEventLoop","windowEl","$debouncedOnResize","destroy","off","setTimeout","height","affix","removeClass","addClass","css","offsetUnpin","bodyEl","offsetHeight","$onResize","directive","restrict","require","link","scope","attr","affixTarget","$element","forEach","key","isDefined","$on","controller"],"mappings":"AAOA,YACAA,SAAQC,OAAO,wBACb,oCACA,oCACCC,SAAS,SAAU,WACpB,GAAIC,GAAWC,KAAKD,UAAaE,UAAW,OAC5CD,MAAKE,MACH,UACA,WACA,aACA,SAAUC,EAASC,EAAUC,GAG3B,QAASC,GAAaC,EAASC,GA0G7B,QAASC,GAAsBC,EAAOC,EAAUC,GAC9C,GAAIC,GAAY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WgC,OAAON,EAAO,IAAId,IAAMZ,EAAWyC,OAAOf,EAAO,KAA8B,EAAvBN,EAAQP,aAAmB,EAE5F,EAAvBO,EAAQP,eAwB7BM,EAAOW,OACAX,EAhIT,GAAI4B,GAASxD,QAAQW,QAAQJ,EAAQmB,SAASC,MAC1CkB,EAAW7C,QAAQW,QAAQJ,EAiI/B,OAAOG,OAGViD,UAAU,WACX,SACA,UACA,SAAU/B,EAAQrB,GAChB,OACEqD,SAAU,MACVC,QAAS,kBACTC,KAAM,SAAkBC,EAAOpD,EAASqD,EAAMC,GAC5C,GAAIpC,IACAkC,MAAOA,EACP1D,UAAW,OACX0B,OAAQkC,EAAcA,EAAYC,SAAWlE,QAAQW,QAAQJ,GAEjEP,SAAQmE,SACN,YACA,eACA,eACA,eACC,SAAUC,GACPpE,QAAQqE,UAAUL,EAAKI,MACzBvC,EAAQuC,GAAOJ,EAAKI,KAExB,IAAIjB,GAAQvB,EAAOjB,EAASkB,EAC5BkC,GAAMO,IAAI,WAAY,WACpBzC,EAAU,KACVsB,EAAQ,YAKfQ,UAAU,gBAAiB,WAC5B,OACEY,YACE,WACA,SAAUL,GACR9D,KAAK8D,SAAWA"} \ No newline at end of file diff --git a/dist/modules/alert.js b/dist/modules/alert.js index e55c8ab2b..25a98e775 100644 --- a/dist/modules/alert.js +++ b/dist/modules/alert.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -21,7 +21,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler keyboard: true, show: true, duration: false, - type: false + type: false, + dismissable: true }; this.$get = [ '$modal', @@ -32,7 +33,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler // Common vars var options = angular.extend({}, defaults, config); $alert = $modal(options); - // Support scope as string options [/*title, content, */type] + // Support scope as string options [/*title, content, */ type, dismissable] + $alert.$scope.dismissable = !!options.dismissable; if (options.type) { $alert.$scope.type = options.type; } @@ -75,7 +77,8 @@ angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$aler 'html', 'container', 'animation', - 'duration' + 'duration', + 'dismissable' ], function (key) { if (angular.isDefined(attr[key])) options[key] = attr[key]; diff --git a/dist/modules/alert.min.js b/dist/modules/alert.min.js index 9411f2b50..31ec1a231 100644 --- a/dist/modules/alert.min.js +++ b/dist/modules/alert.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var t=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1};this.$get=["$modal","$timeout",function(e,n){function a(a){var r={},o=angular.extend({},t,a);r=e(o),o.type&&(r.$scope.type=o.type);var i=r.show;return o.duration&&(r.show=function(){i(),n(function(){r.hide()},1e3*o.duration)}),r}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(t,e,n,a){t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var o={scope:t,element:e,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration"],function(t){angular.isDefined(r[t])&&(o[t]=r[t])}),angular.forEach(["title","content","type"],function(e){r[e]&&r.$observe(e,function(a){t[e]=n.trustAsHtml(a)})}),r.bsAlert&&t.$watch(r.bsAlert,function(e){angular.isObject(e)?angular.extend(t,e):t.content=e},!0);var i=a(o);e.on(r.trigger||"click",i.toggle),t.$on("$destroy",function(){i.destroy(),o=null,i=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var t=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(e,n){function a(a){var r={},i=angular.extend({},t,a);r=e(i),r.$scope.dismissable=!!i.dismissable,i.type&&(r.$scope.type=i.type);var o=r.show;return i.duration&&(r.show=function(){o(),n(function(){r.hide()},1e3*i.duration)}),r}return a}]}).directive("bsAlert",["$window","$location","$sce","$alert",function(t,e,n,a){t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var i={scope:t,element:e,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration","dismissable"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content","type"],function(e){r[e]&&r.$observe(e,function(a){t[e]=n.trustAsHtml(a)})}),r.bsAlert&&t.$watch(r.bsAlert,function(e){angular.isObject(e)?angular.extend(t,e):t.content=e},!0);var o=a(i);e.on(r.trigger||"click",o.toggle),t.$on("$destroy",function(){o.destroy(),i=null,o=null})}}}]); \ No newline at end of file diff --git a/dist/modules/alert.min.js.map b/dist/modules/alert.min.js.map deleted file mode 100644 index a8c5194b2..000000000 --- a/dist/modules/alert.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"alert.min.js.map","sources":["alert.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","container","element","backdrop","keyboard","show","duration","type","$get","$modal","$timeout","AlertFactory","config","$alert","options","extend","$scope","hide","directive","$window","$location","$sce","requestAnimationFrame","setTimeout","restrict","scope","link","attr","forEach","key","isDefined","$observe","newValue","trustAsHtml","bsAlert","$watch","isObject","content","alert","on","trigger","toggle","$on","destroy"],"mappings":"AAOA,YAIAA,SAAQC,OAAO,wBAAyB,yBAAyBC,SAAS,SAAU,WAClF,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,QACbC,UAAW,KACXC,SAAU,uBACVC,WAAW,EACXC,QAAS,KACTC,UAAU,EACVC,UAAU,EACVC,MAAM,EACNC,UAAU,EACVC,MAAM,EAEVX,MAAKY,MACH,SACA,WACA,SAAUC,EAAQC,GAChB,QAASC,GAAaC,GACpB,GAAIC,MAEAC,EAAUtB,QAAQuB,UAAWpB,EAAUiB,EAC3CC,GAASJ,EAAOK,GAEZA,EAAQP,OACVM,EAAOG,OAAOT,KAAOO,EAAQP,KAG/B,IAAIF,GAAOQ,EAAOR,IASlB,OARIS,GAAQR,WACVO,EAAOR,KAAO,WACZA,IACAK,EAAS,WACPG,EAAOI,QACa,IAAnBH,EAAQR,YAGRO,EAET,MAAOF,OAGVO,UAAU,WACX,UACA,YACA,OACA,SACA,SAAUC,EAASC,EAAWC,EAAMR,GACNM,EAAQG,uBAAyBH,EAAQI,UACrE,QACEC,SAAU,MACVC,OAAO,EACPC,KAAM,SAAkBD,EAAOvB,EAASyB,GAEtC,GAAIb,IACAW,MAAOA,EACPvB,QAASA,EACTG,MAAM,EAEVb,SAAQoC,SACN,WACA,YACA,WACA,OACA,YACA,YACA,YACC,SAAUC,GACPrC,QAAQsC,UAAUH,EAAKE,MACzBf,EAAQe,GAAOF,EAAKE,MAGxBrC,QAAQoC,SACN,QACA,UACA,QACC,SAAUC,GACXF,EAAKE,IAAQF,EAAKI,SAASF,EAAK,SAAUG,GACxCP,EAAMI,GAAOR,EAAKY,YAAYD,OAIlCL,EAAKO,SAAWT,EAAMU,OAAOR,EAAKO,QAAS,SAAUF,GAC/CxC,QAAQ4C,SAASJ,GACnBxC,QAAQuB,OAAOU,EAAOO,GAEtBP,EAAMY,QAAUL,IAEjB,EAEH,IAAIM,GAAQzB,EAAOC,EAEnBZ,GAAQqC,GAAGZ,EAAKa,SAAW,QAASF,EAAMG,QAE1ChB,EAAMiB,IAAI,WAAY,WACpBJ,EAAMK,UACN7B,EAAU,KACVwB,EAAQ"} \ No newline at end of file diff --git a/dist/modules/alert.tpl.js b/dist/modules/alert.tpl.js index f6ec9b6ef..01097abe5 100644 --- a/dist/modules/alert.tpl.js +++ b/dist/modules/alert.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,6 @@ angular.module('mgcrea.ngStrap.alert').run([ '$templateCache', function ($templateCache) { - $templateCache.put('alert/alert.tpl.html', '
 
'); + $templateCache.put('alert/alert.tpl.html', '
 
'); } ]); \ No newline at end of file diff --git a/dist/modules/alert.tpl.min.js b/dist/modules/alert.tpl.min.js index f6ae6925e..c5057ed92 100644 --- a/dist/modules/alert.tpl.min.js +++ b/dist/modules/alert.tpl.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'
 
')}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'
 
')}]); \ No newline at end of file diff --git a/dist/modules/aside.js b/dist/modules/aside.js index bc1c90cd7..c6ce50585 100644 --- a/dist/modules/aside.js +++ b/dist/modules/aside.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/aside.min.js b/dist/modules/aside.min.js index 431cf5b02..dc8f1b535 100644 --- a/dist/modules/aside.min.js +++ b/dist/modules/aside.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/aside.min.js.map b/dist/modules/aside.min.js.map deleted file mode 100644 index ba924766e..000000000 --- a/dist/modules/aside.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"aside.min.js.map","sources":["aside.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","contentTemplate","container","element","backdrop","keyboard","html","show","$get","$modal","AsideFactory","config","$aside","options","extend","directive","$window","$sce","requestAnimationFrame","setTimeout","restrict","scope","link","attr","forEach","key","isDefined","$observe","newValue","trustAsHtml","bsAside","$watch","isObject","content","aside","on","trigger","toggle","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,wBAAyB,yBAAyBC,SAAS,SAAU,WAClF,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,0BACXC,YAAa,QACbC,UAAW,QACXC,SAAU,uBACVC,iBAAiB,EACjBC,WAAW,EACXC,QAAS,KACTC,UAAU,EACVC,UAAU,EACVC,MAAM,EACNC,MAAM,EAEVX,MAAKY,MACH,SACA,SAAUC,GACR,QAASC,GAAaC,GACpB,GAAIC,MAEAC,EAAUrB,QAAQsB,UAAWnB,EAAUgB,EAE3C,OADAC,GAASH,EAAOI,GAGlB,MAAOH,OAGVK,UAAU,WACX,UACA,OACA,SACA,SAAUC,EAASC,EAAML,GACKI,EAAQE,uBAAyBF,EAAQG,UACrE,QACEC,SAAU,MACVC,OAAO,EACPC,KAAM,SAAkBD,EAAOlB,EAASoB,GAEtC,GAAIV,IACAQ,MAAOA,EACPlB,QAASA,EACTI,MAAM,EAEVf,SAAQgC,SACN,WACA,kBACA,YACA,WACA,WACA,OACA,YACA,aACC,SAAUC,GACPjC,QAAQkC,UAAUH,EAAKE,MACzBZ,EAAQY,GAAOF,EAAKE,MAGxBjC,QAAQgC,SACN,QACA,WACC,SAAUC,GACXF,EAAKE,IAAQF,EAAKI,SAASF,EAAK,SAAUG,GACxCP,EAAMI,GAAOR,EAAKY,YAAYD,OAIlCL,EAAKO,SAAWT,EAAMU,OAAOR,EAAKO,QAAS,SAAUF,GAC/CpC,QAAQwC,SAASJ,GACnBpC,QAAQsB,OAAOO,EAAOO,GAEtBP,EAAMY,QAAUL,IAEjB,EAEH,IAAIM,GAAQtB,EAAOC,EAEnBV,GAAQgC,GAAGZ,EAAKa,SAAW,QAASF,EAAMG,QAE1ChB,EAAMiB,IAAI,WAAY,WACpBJ,EAAMK,UACN1B,EAAU,KACVqB,EAAQ"} \ No newline at end of file diff --git a/dist/modules/aside.tpl.js b/dist/modules/aside.tpl.js index 0d45e06d7..9cd2eaea8 100644 --- a/dist/modules/aside.tpl.js +++ b/dist/modules/aside.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/aside.tpl.min.js b/dist/modules/aside.tpl.min.js index abc039139..25c775f27 100644 --- a/dist/modules/aside.tpl.min.js +++ b/dist/modules/aside.tpl.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/button.js b/dist/modules/button.js index e933e85a9..2efb20dc4 100644 --- a/dist/modules/button.js +++ b/dist/modules/button.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/button.min.js b/dist/modules/button.min.js index bbfca1394..a7c68a459 100644 --- a/dist/modules/button.min.js +++ b/dist/modules/button.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/button.min.js.map b/dist/modules/button.min.js.map deleted file mode 100644 index 8d34a8556..000000000 --- a/dist/modules/button.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"button.min.js.map","sources":["button.min.js"],"names":["angular","module","provider","defaults","this","activeClass","toggleEvent","$get","directive","restrict","require","compile","element","attr","removeAttr","children","querySelectorAll","forEach","child","childEl","ngModel","$button","$$rAF","constantValueRegExp","link","scope","controller","options","isInput","nodeName","activeElement","parent","trueValue","isDefined","test","$eval","falseValue","hasExoticValues","$parsers","push","viewValue","$watch","$render","isActive","equals","$modelValue","checked","toggleClass","bind","$apply","$setViewValue","hasClass","value"],"mappings":"AAOA,YACAA,SAAQC,OAAO,4BAA6BC,SAAS,UAAW,WAC9D,GAAIC,GAAWC,KAAKD,UAChBE,YAAa,SACbC,YAAa,QAEjBF,M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AAQtB,YAAasC,MAInD/B,EAAQoC,KAAKrB,EAAQrB,YAAa,WAChCmB,EAAMwB,OAAO,WAENrB,GACHF,EAAWwB,eAAepB,EAAcqB,SAAS,WAE9Cd,GACHX,EAAWgB,mBAOtBlC,UAAU,eAAgB,WAC3B,OACEC,SAAU,IACVC,QAAS,UACTC,QAAS,SAAkBC,EAASC,GAClCD,EAAQC,KAAK,cAAe,WAC5BD,EAAQE,WAAW,WACnB,IAAIC,GAAWH,EAAQ,GAAGI,iBAAiB,sBAC3ChB,SAAQiB,QAAQF,EAAU,SAAUG,GAClClB,QAAQY,QAAQM,GAAOL,KAAK,WAAY,IACxCb,QAAQY,QAAQM,GAAOL,KAAK,WAAYA,EAAKO,eAIlDZ,UAAU,WACX,UACA,QACA,SAAUa,EAASC,GACjB,GAAInB,GAAWkB,EAAQlB,SACnBoB,EAAsB,oBAC1B,QACEd,SAAU,IACVC,QAAS,UACTc,KAAM,SAAkBC,EAAOb,EAASC,EAAMa,GAC5C,GAAIC,GAAUxB,EAEVyB,EAAkC,UAAxBhB,EAAQ,GAAGiB,SACrBC,EAAgBF,EAAUhB,EAAQmB,SAAWnB,EAC7CwC,EAAQ7B,EAAoBW,KAAKrB,EAAKuC,OAAS3B,EAAMU,MAAMtB,EAAKuC,OAASvC,EAAKuC,KAElF1B,GAAWgB,QAAU,WAEnB,GAAIC,GAAW3C,QAAQ4C,OAAOlB,EAAWmB,YAAaO,EACtD9B,GAAM,WACAM,IACFhB,EAAQ,GAAGkC,QAAUH,GACvBb,EAAciB,YAAYpB,EAAQtB,YAAasC,MAInD/B,EAAQoC,KAAKrB,EAAQrB,YAAa,WAChCmB,EAAMwB,OAAO,WAEXvB,EAAWwB,cAAcE,GACzB1B,EAAWgB"} \ No newline at end of file diff --git a/dist/modules/date-parser.js b/dist/modules/date-parser.js index 9dd9908f0..11c3d08ec 100644 --- a/dist/modules/date-parser.js +++ b/dist/modules/date-parser.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -91,15 +91,17 @@ angular.module('mgcrea.ngStrap.helpers.dateParser', []).provider('$dateParser', return !isNaN(date.getTime()); return regex.test(date); }; - $dateParser.parse = function (value, baseDate) { + $dateParser.parse = function (value, baseDate, format) { + var formatRegex = format ? regExpForFormat(format) : regex; + var formatSetMap = format ? setMapForFormat(format) : setMap; if (angular.isDate(value)) return value; - var matches = regex.exec(value); + var matches = formatRegex.exec(value); if (!matches) return false; var date = baseDate || new Date(0, 0, 1); for (var i = 0; i < matches.length - 1; i++) { - setMap[i] && setMap[i].call(date, matches[i + 1]); + formatSetMap[i] && formatSetMap[i].call(date, matches[i + 1]); } return date; }; diff --git a/dist/modules/date-parser.min.js b/dist/modules/date-parser.min.js index 0c8607a41..baa2fecf7 100644 --- a/dist/modules/date-parser.min.js +++ b/dist/modules/date-parser.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(){var t=Date.prototype,e=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale",function(r){var s=function(s){function n(t){var e,r=Object.keys(f),s=[],n=[],i=t;for(e=0;e1){var a=i.search(r[e]);t=t.split(r[e]).join(""),f[r[e]]&&(s[a]=f[r[e]])}return angular.forEach(s,function(t){n.push(t)}),n}function i(t){return t.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function a(t){var e,r=Object.keys(l),s=t;for(e=0;e1){var a=i.search(r[e]);t=t.split(r[e]).join(""),f[r[e]]&&(s[a]=f[r[e]])}return angular.forEach(s,function(t){n.push(t)}),n}function i(t){return t.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function a(t){var e,r=Object.keys(l),s=t;for(e=0;e= datepicker.$options.minDate) && (isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate); + var isMinValid = isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate; + var isMaxValid = isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate; + var isValid = isMinValid && isMaxValid; controller.$setValidity('date', isValid); + controller.$setValidity('min', isMinValid); + controller.$setValidity('max', isMaxValid); // Only update the model when we have a valid date if (isValid) controller.$dateValue = parsedDate; } if (options.dateType === 'string') { - return dateFilter(viewValue, options.dateFormat); + return dateFilter(parsedDate, options.modelDateFormat || options.dateFormat); } else if (options.dateType === 'number') { return controller.$dateValue.getTime(); } else if (options.dateType === 'iso') { @@ -339,7 +349,7 @@ angular.module('mgcrea.ngStrap.datepicker', [ } else if (angular.isDate(modelValue)) { date = modelValue; } else if (options.dateType === 'string') { - date = dateParser.parse(modelValue); + date = dateParser.parse(modelValue, null, options.modelDateFormat); } else { date = new Date(modelValue); } diff --git a/dist/modules/datepicker.min.js b/dist/modules/datepicker.min.js index b38f22dc4..3f62cafc9 100644 --- a/dist/modules/datepicker.min.js +++ b/dist/modules/datepicker.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,a,n,i,o,r,d,l){function s(t,a,n){function i(e){e.selected=r.$isSelected(e.date)}function o(){t[0].focus()}var r=l(t,angular.extend({},e,n)),s=n.scope,g=r.$options,$=r.$scope;g.startView&&(g.startView-=g.minView);var m=d(r);r.$views=m.views;var f=m.viewDate;$.$mode=g.startView;var h=r.$views[$.$mode];$.$select=function(e){r.select(e)},$.$selectPane=function(e){r.$selectPane(e)},$.$toggleMode=function(){r.setMode(($.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,h.update.call(h,e)),r.$build(!0)},r.select=function(e,t){angular.isDate(a.$dateValue)||(a.$dateValue=new Date(e)),a.$dateValue.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),!$.$mode||t?(a.$setViewValue(a.$dateValue),a.$render(),g.autoclose&&!t&&r.hide(!0)):(angular.extend(f,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode($.$mode-1),r.$build())},r.setMode=function(e){$.$mode=e,h=r.$views[$.$mode],r.$build()},r.$build=function(e){e===!0&&h.built||(e!==!1||h.built)&&h.build.call(h)},r.$updateSelected=function(){for(var e=0,t=$.rows.length;t>e;e++)angular.forEach($.rows[e],i)},r.$isSelected=function(e){return h.isSelected(e)},r.$selectPane=function(e){var t=h.steps,a=new Date(Date.UTC(f.year+(t.year||0)*e,f.month+(t.month||0)*e,f.date+(t.day||0)*e));angular.extend(f,{year:a.getUTCFullYear(),month:a.getUTCMonth(),date:a.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return $.$mode?$.$apply(function(){r.setMode($.$mode-1)}):r.hide(!0);h.onKeyDown(e),s.$digest()}};var p=r.init;r.init=function(){return c&&g.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",o)),void p())};var y=r.destroy;r.destroy=function(){c&&g.useNative&&t.off("click",o),y()};var D=r.show;r.show=function(){D(),setTimeout(function(){r.$element.on(u?"touchstart":"mousedown",r.$onMouseDown),g.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(u?"touchstart":"mousedown",r.$onMouseDown),g.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var u=(angular.element(t.document.body),"createTouch"in t.document),c=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=o.id),s.defaults=e,s}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,a,n,i,o,r){var d=(o.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),l=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,a,n){var s={scope:e,controller:n};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","dayFormat","strictFormat","startWeek","useNative","lang","startView","minView"],function(e){angular.isDefined(a[e])&&(s[e]=a[e])}),d&&s.useNative&&(s.dateFormat="yyyy-MM-dd");var u=o(t,n,s);s=u.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(a[e])&&a.$observe(e,function(t){if("today"===t){var a=new Date;u.$options[e]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else u.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):l(t)?+new Date(parseInt(t,10)):+new Date(t);!isNaN(u.$options[e])&&u.$build(!1)})}),e.$watch(a.ngModel,function(){u.update(n.$dateValue)},!0);var c=r({format:s.dateFormat,lang:s.lang,strict:s.strictFormat});n.$parsers.unshift(function(e){if(!e)return void n.$setValidity("date",!0);var t=c.parse(e,n.$dateValue);if(!t||isNaN(t.getTime()))return void n.$setValidity("date",!1);var a=(isNaN(u.$options.minDate)||t.getTime()>=u.$options.minDate)&&(isNaN(u.$options.maxDate)||t.getTime()<=u.$options.maxDate);return n.$setValidity("date",a),a&&(n.$dateValue=t),"string"===s.dateType?i(e,s.dateFormat):"number"===s.dateType?n.$dateValue.getTime():"iso"===s.dateType?n.$dateValue.toISOString():new Date(n.$dateValue)}),n.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===s.dateType?c.parse(e):new Date(e),n.$dateValue=t,n.$dateValue}),n.$render=function(){t.val(!n.$dateValue||isNaN(n.$dateValue.getTime())?"":i(n.$dateValue,s.dateFormat))},e.$on("$destroy",function(){u.destroy(),s=null,u=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var a=[];e.length>0;)a.push(e.splice(0,t));return a}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(a,n,i){return function(o){var r=o.$scope,d=o.$options,l=a.DATETIME_FORMATS.SHORTDAY,s=l.slice(d.startWeek).concat(l.slice(0,d.startWeek)),u=n.trustAsHtml(''+s.join('')+""),c=o.$date||new Date,g={year:c.getFullYear(),month:c.getMonth(),date:c.getDate()},$=(6e4*c.getTimezoneOffset(),[{format:d.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==g.year||e.getMonth()!==g.month?(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getDate()!==g.date&&(g.date=o.$date.getDate(),o.$updateSelected())},build:function(){var a=new Date(g.year,g.month,1),n=a.getTimezoneOffset(),l=new Date(+a-864e5*t(a.getDay()-d.startWeek,7)),s=l.getTimezoneOffset();s!==n&&(l=new Date(+l+6e4*(s-n)));for(var c,$=[],m=0;42>m;m++)c=new Date(l.getFullYear(),l.getMonth(),l.getDate()+m),$.push({date:c,label:i(c,this.format),selected:o.$date&&this.isSelected(c),muted:c.getMonth()!==g.month,disabled:this.isDisabled(c)});r.title=i(a,"MMMM yyyy"),r.showLabels=!0,r.labels=u,r.rows=e($,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()&&e.getDate()===o.$date.getDate()},isDisabled:function(e){return e.getTime()d.maxDate},onKeyDown:function(e){var t,a=o.$date.getTime();37===e.keyCode?t=new Date(a-864e5):38===e.keyCode?t=new Date(a-6048e5):39===e.keyCode?t=new Date(a+864e5):40===e.keyCode&&(t=new Date(a+6048e5)),this.isDisabled(t)||o.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===g.year?e.getMonth()!==g.month&&(angular.extend(g,{month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected()):(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build())},build:function(){for(var t,a=(new Date(g.year,0,1),[]),n=0;12>n;n++)t=new Date(g.year,n,1),a.push({date:t,label:i(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});r.title=i(t,"yyyy"),r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return td.maxDate},onKeyDown:function(e){var t=o.$date.getMonth(),a=new Date(o.$date);37===e.keyCode?a.setMonth(t-1):38===e.keyCode?a.setMonth(t-4):39===e.keyCode?a.setMonth(t+1):40===e.keyCode&&a.setMonth(t+4),this.isDisabled(a)||o.select(a,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(g.year/20,10)?(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getFullYear()!==g.year&&(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected())},build:function(){for(var t,a=g.year-g.year%(3*this.split),n=[],d=0;12>d;d++)t=new Date(a+d,0,1),n.push({date:t,label:i(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});r.title=n[0].label+"-"+n[n.length-1].label,r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return td.maxDate},onKeyDown:function(e){var t=o.$date.getFullYear(),a=new Date(o.$date);37===e.keyCode?a.setYear(t-1):38===e.keyCode?a.setYear(t-4):39===e.keyCode?a.setYear(t+1):40===e.keyCode&&a.setYear(t+4),this.isDisabled(a)||o.select(a,!0)}}]);return{views:d.minView?Array.prototype.slice.call($,d.minView):$,viewDate:g}}}]}); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",modelDateFormat:null,dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0,iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,a,n,i,o,r,l,d){function s(t,a,n){function i(e){e.selected=r.$isSelected(e.date)}function o(){t[0].focus()}var r=d(t,angular.extend({},e,n)),s=n.scope,g=r.$options,$=r.$scope;g.startView&&(g.startView-=g.minView);var m=l(r);r.$views=m.views;var h=m.viewDate;$.$mode=g.startView,$.$iconLeft=g.iconLeft,$.$iconRight=g.iconRight;var f=r.$views[$.$mode];$.$select=function(e){r.select(e)},$.$selectPane=function(e){r.$selectPane(e)},$.$toggleMode=function(){r.setMode(($.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,f.update.call(f,e)),r.$build(!0)},r.select=function(e,t){angular.isDate(a.$dateValue)||(a.$dateValue=new Date(e)),a.$dateValue.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),!$.$mode||t?(a.$setViewValue(a.$dateValue),a.$render(),g.autoclose&&!t&&r.hide(!0)):(angular.extend(h,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode($.$mode-1),r.$build())},r.setMode=function(e){$.$mode=e,f=r.$views[$.$mode],r.$build()},r.$build=function(e){e===!0&&f.built||(e!==!1||f.built)&&f.build.call(f)},r.$updateSelected=function(){for(var e=0,t=$.rows.length;t>e;e++)angular.forEach($.rows[e],i)},r.$isSelected=function(e){return f.isSelected(e)},r.$selectPane=function(e){var t=f.steps,a=new Date(Date.UTC(h.year+(t.year||0)*e,h.month+(t.month||0)*e,h.date+(t.day||0)*e));angular.extend(h,{year:a.getUTCFullYear(),month:a.getUTCMonth(),date:a.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),u){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return $.$mode?$.$apply(function(){r.setMode($.$mode-1)}):r.hide(!0);f.onKeyDown(e),s.$digest()}};var p=r.init;r.init=function(){return c&&g.useNative?(t.prop("type","date"),void t.css("-webkit-appearance","textfield")):(u&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",o)),void p())};var y=r.destroy;r.destroy=function(){c&&g.useNative&&t.off("click",o),y()};var D=r.show;r.show=function(){D(),setTimeout(function(){r.$element.on(u?"touchstart":"mousedown",r.$onMouseDown),g.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(u?"touchstart":"mousedown",r.$onMouseDown),g.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var u=(angular.element(t.document.body),"createTouch"in t.document),c=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=o.id),s.defaults=e,s}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,a,n,i,o,r){var l=(o.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),d=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,a,n){var s={scope:e,controller:n};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","modelDateFormat","dayFormat","strictFormat","startWeek","useNative","lang","startView","minView"],function(e){angular.isDefined(a[e])&&(s[e]=a[e])}),l&&s.useNative&&(s.dateFormat="yyyy-MM-dd");var u=o(t,n,s);s=u.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(a[e])&&a.$observe(e,function(t){if("today"===t){var a=new Date;u.$options[e]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else u.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):d(t)?+new Date(parseInt(t,10)):+new Date(t);!isNaN(u.$options[e])&&u.$build(!1)})}),e.$watch(a.ngModel,function(){u.update(n.$dateValue)},!0);var c=r({format:s.dateFormat,lang:s.lang,strict:s.strictFormat});n.$parsers.unshift(function(e){if(!e)return void n.$setValidity("date",!0);var t=c.parse(e,n.$dateValue);if(!t||isNaN(t.getTime()))return void n.$setValidity("date",!1);var a=isNaN(u.$options.minDate)||t.getTime()>=u.$options.minDate,o=isNaN(u.$options.maxDate)||t.getTime()<=u.$options.maxDate,r=a&&o;return n.$setValidity("date",r),n.$setValidity("min",a),n.$setValidity("max",o),r&&(n.$dateValue=t),"string"===s.dateType?i(t,s.modelDateFormat||s.dateFormat):"number"===s.dateType?n.$dateValue.getTime():"iso"===s.dateType?n.$dateValue.toISOString():new Date(n.$dateValue)}),n.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===s.dateType?c.parse(e,null,s.modelDateFormat):new Date(e),n.$dateValue=t,n.$dateValue}),n.$render=function(){t.val(!n.$dateValue||isNaN(n.$dateValue.getTime())?"":i(n.$dateValue,s.dateFormat))},e.$on("$destroy",function(){u.destroy(),s=null,u=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var a=[];e.length>0;)a.push(e.splice(0,t));return a}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(a,n,i){return function(o){var r=o.$scope,l=o.$options,d=a.DATETIME_FORMATS.SHORTDAY,s=d.slice(l.startWeek).concat(d.slice(0,l.startWeek)),u=n.trustAsHtml(''+s.join('')+""),c=o.$date||new Date,g={year:c.getFullYear(),month:c.getMonth(),date:c.getDate()},$=(6e4*c.getTimezoneOffset(),[{format:l.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==g.year||e.getMonth()!==g.month?(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getDate()!==g.date&&(g.date=o.$date.getDate(),o.$updateSelected())},build:function(){var a=new Date(g.year,g.month,1),n=a.getTimezoneOffset(),d=new Date(+a-864e5*t(a.getDay()-l.startWeek,7)),s=d.getTimezoneOffset();s!==n&&(d=new Date(+d+6e4*(s-n)));for(var c,$=[],m=0;42>m;m++)c=new Date(d.getFullYear(),d.getMonth(),d.getDate()+m),$.push({date:c,label:i(c,this.format),selected:o.$date&&this.isSelected(c),muted:c.getMonth()!==g.month,disabled:this.isDisabled(c)});r.title=i(a,"MMMM yyyy"),r.showLabels=!0,r.labels=u,r.rows=e($,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()&&e.getDate()===o.$date.getDate()},isDisabled:function(e){return e.getTime()l.maxDate},onKeyDown:function(e){var t,a=o.$date.getTime();37===e.keyCode?t=new Date(a-864e5):38===e.keyCode?t=new Date(a-6048e5):39===e.keyCode?t=new Date(a+864e5):40===e.keyCode&&(t=new Date(a+6048e5)),this.isDisabled(t)||o.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===g.year?e.getMonth()!==g.month&&(angular.extend(g,{month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected()):(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build())},build:function(){for(var t,a=(new Date(g.year,0,1),[]),n=0;12>n;n++)t=new Date(g.year,n,1),a.push({date:t,label:i(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});r.title=i(t,"yyyy"),r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()&&e.getMonth()===o.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return tl.maxDate},onKeyDown:function(e){var t=o.$date.getMonth(),a=new Date(o.$date);37===e.keyCode?a.setMonth(t-1):38===e.keyCode?a.setMonth(t-4):39===e.keyCode?a.setMonth(t+1):40===e.keyCode&&a.setMonth(t+4),this.isDisabled(a)||o.select(a,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(g.year/20,10)?(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$build()):e.getFullYear()!==g.year&&(angular.extend(g,{year:o.$date.getFullYear(),month:o.$date.getMonth(),date:o.$date.getDate()}),o.$updateSelected())},build:function(){for(var t,a=g.year-g.year%(3*this.split),n=[],l=0;12>l;l++)t=new Date(a+l,0,1),n.push({date:t,label:i(t,this.format),selected:o.$isSelected(t),disabled:this.isDisabled(t)});r.title=n[0].label+"-"+n[n.length-1].label,r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return o.$date&&e.getFullYear()===o.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return tl.maxDate},onKeyDown:function(e){var t=o.$date.getFullYear(),a=new Date(o.$date);37===e.keyCode?a.setYear(t-1):38===e.keyCode?a.setYear(t-4):39===e.keyCode?a.setYear(t+1):40===e.keyCode&&a.setYear(t+4),this.isDisabled(a)||o.select(a,!0)}}]);return{views:l.minView?Array.prototype.slice.call($,l.minView):$,viewDate:g}}}]}); \ No newline at end of file diff --git a/dist/modules/datepicker.min.js.map b/dist/modules/datepicker.min.js.map deleted file mode 100644 index e0636ea68..000000000 --- a/dist/modules/datepicker.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"datepicker.min.js.map","sources":["datepicker.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","useNative","dateType","dateFormat","dayFormat","strictFormat","autoclose","minDate","Infinity","maxDate","startView","minView","startWeek","$get","$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip","DatepickerFactory","element","controller","config","updateSelected","el","selected","$datepicker","$isSelected","date","focusElement","focus","extend","parentScope","scope","options","$options","$scope","pickerViews","$views","views","viewDate","$mode","$picker","$select","select","$selectPane","value","$toggleMode","setMode","length","update","isDate","isNaN","getTime","$date","call","$build","keep","$dateValue","Date","setFullYear","getFullYear","getMonth","getDate","$setViewValue","$render","hide","year","month","mode","pristine","built","build","$updateSelected","i","l","rows","forEach","isSelected","steps","targetDate","UTC","day","getUTCFullYear","getUTCMonth","getUTCDate","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","targetEl","target","nodeName","toLowerCase","parent","triggerHandler","$onKeyDown","test","keyCode","shiftKey","altKey","$apply","onKeyDown","$digest","_init","init","isNative","prop","css","attr","on","_destroy","destroy","off","_show","show","setTimeout","$element","_hide","blur","document","body","navigator","userAgent","lang","id","directive","$parse","$q","$dateParser","isNumeric","n","parseFloat","isFinite","restrict","require","link","key","isDefined","datepicker","$observe","newValue","today","isString","match","substr","parseInt","$watch","ngModel","dateParser","format","strict","$parsers","unshift","viewValue","$setValidity","parsedDate","parse","isValid","toISOString","$formatters","push","modelValue","isUndefined","NaN","val","$on","split","arr","size","arrays","splice","mod","m","daySplit","picker","weekDaysMin","DATETIME_FORMATS","SHORTDAY","weekDaysLabels","slice","concat","weekDaysLabelsHtml","trustAsHtml","join","startDate","getTimezoneOffset","force","firstDayOfMonth","firstDayOfMonthOffset","firstDate","getDay","firstDateOffset","days","label","muted","disabled","isDisabled","title","showLabels","labels","newDate","actualTime","name","months","lastDate","actualMonth","setMonth","firstYear","years","actualYear","setYear","Array","prototype"],"mappings":"AAOA,YACAA,SAAQC,OAAO,6BACb,oCACA,2BACCC,SAAS,cAAe,WACzB,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,aACbC,UAAW,cACXC,SAAU,iCACVC,QAAS,QACTC,WAAW,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icker.tpl.js index 7ef6b6435..88aeb6b1e 100644 --- a/dist/modules/datepicker.tpl.js +++ b/dist/modules/datepicker.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,6 @@ angular.module('mgcrea.ngStrap.datepicker').run([ '$templateCache', function ($templateCache) { - $templateCache.put('datepicker/datepicker.tpl.html', ''); + $templateCache.put('datepicker/datepicker.tpl.html', ''); } ]); \ No newline at end of file diff --git a/dist/modules/datepicker.tpl.min.js b/dist/modules/datepicker.tpl.min.js index b5fde0deb..da4812864 100644 --- a/dist/modules/datepicker.tpl.min.js +++ b/dist/modules/datepicker.tpl.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(t){t.put("datepicker/datepicker.tpl.html",'')}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(t){t.put("datepicker/datepicker.tpl.html",'')}]); \ No newline at end of file diff --git a/dist/modules/debounce.js b/dist/modules/debounce.js index f24ec75b4..9c2746c0b 100644 --- a/dist/modules/debounce.js +++ b/dist/modules/debounce.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/debounce.min.js b/dist/modules/debounce.min.js index 535652cec..bbedd7a2b 100644 --- a/dist/modules/debounce.min.js +++ b/dist/modules/debounce.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/debounce.min.js.map b/dist/modules/debounce.min.js.map deleted file mode 100644 index f1156cf2b..000000000 --- a/dist/modules/debounce.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"debounce.min.js.map","sources":["debounce.min.js"],"names":["angular","module","constant","func","wait","immediate","timeout","args","context","timestamp","result","this","arguments","Date","later","last","setTimeout","apply","callNow","options","previous","leading","now","remaining","clearTimeout","trailing"],"mappings":"AAOA,YACAA,SAAQC,OAAO,sCAAuCC,SAAS,WAAY,SAAUC,EAAMC,EAAMC,GAC/F,GAAIC,GAASC,EAAMC,EAASC,EAAWC,CACvC,OAAO,YACLF,EAAUG,KACVJ,EAAOK,UACPH,EAAY,GAAII,KAChB,IAAIC,GAAQ,WACV,GAAIC,GAAO,GAAIF,MAASJ,CACbL,GAAPW,EACFT,EAAUU,WAAWF,EAAOV,EAAOW,IAEnCT,EAAU,KACLD,IACHK,EAASP,EAAKc,MAAMT,EAASD,MAG/BW,EAAUb,IAAcC,CAM5B,OALKA,KACHA,EAAUU,WAAWF,EAAOV,IAE1Bc,IACFR,EAASP,EAAKc,MAAMT,EAASD,IACxBG,KAERR,SAAS,WAAY,SAAUC,EAAMC,EAAMe,GAC5C,GAAIX,GAASD,EAAMG,EACfJ,EAAU,KACVc,EAAW,CACfD,KAAYA,KACZ,IAAIL,GAAQ,WACVM,EAAWD,EAAQE,WAAY,EAAQ,EAAI,GAAIR,MAC/CP,EAAU,KACVI,EAASP,EAAKc,MAAMT,EAASD,GAE/B,OAAO,YACL,GAAIe,GAAM,GAAIT,KACTO,IAAYD,EAAQE,WAAY,IACnCD,EAAWE,EACb,IAAIC,GAAYnB,GAAQkB,EAAMF,EAW9B,OAVAZ,GAAUG,KACVJ,EAAOK,UACU,GAAbW,GACFC,aAAalB,GACbA,EAAU,KACVc,EAAWE,EACXZ,EAASP,EAAKc,MAAMT,EAASD,IACnBD,GAAWa,EAAQM,YAAa,IAC1CnB,EAAUU,WAAWF,EAAOS,IAEvBb"} \ No newline at end of file diff --git a/dist/modules/dimensions.js b/dist/modules/dimensions.js index 802babdc7..6547d1e8e 100644 --- a/dist/modules/dimensions.js +++ b/dist/modules/dimensions.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -48,8 +48,8 @@ angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [ var boxRect = element.getBoundingClientRect(); var docElement = element.ownerDocument; return { - width: element.offsetWidth, - height: element.offsetHeight, + width: boxRect.width || element.offsetWidth, + height: boxRect.height || element.offsetHeight, top: boxRect.top + (window.pageYOffset || docElement.documentElement.scrollTop) - (docElement.documentElement.clientTop || 0), left: boxRect.left + (window.pageXOffset || docElement.documentElement.scrollLeft) - (docElement.documentElement.clientLeft || 0) }; @@ -122,7 +122,7 @@ angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [ return value; }; /** - * Provides equivalent of jQuery's height function + * Provides equivalent of jQuery's width function * @required-by bootstrap-affix * @url http://api.jquery.com/width/ * @param element diff --git a/dist/modules/dimensions.min.js b/dist/modules/dimensions.min.js index a4ee03126..edd0bd450 100644 --- a/dist/modules/dimensions.min.js +++ b/dist/modules/dimensions.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),e=t.nodeName=function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()};t.css=function(t,e,o){var n;return n=t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t)[e]:t.style[e],o===!0?parseFloat(n)||0:n},t.offset=function(t){var e=t.getBoundingClientRect(),o=t.ownerDocument;return{width:t.offsetWidth,height:t.offsetHeight,top:e.top+(window.pageYOffset||o.documentElement.scrollTop)-(o.documentElement.clientTop||0),left:e.left+(window.pageXOffset||o.documentElement.scrollLeft)-(o.documentElement.clientLeft||0)}},t.position=function(n){var s,r,i={top:0,left:0};return"fixed"===t.css(n,"position")?r=n.getBoundingClientRect():(s=o(n),r=t.offset(n),r=t.offset(n),e(s,"html")||(i=t.offset(s)),i.top+=t.css(s,"borderTopWidth",!0),i.left+=t.css(s,"borderLeftWidth",!0)),{width:n.offsetWidth,height:n.offsetHeight,top:r.top-i.top-t.css(n,"marginTop",!0),left:r.left-i.left-t.css(n,"marginLeft",!0)}};var o=function(o){var n=o.ownerDocument,s=o.offsetParent||n;if(e(s,"#document"))return n.documentElement;for(;s&&!e(s,"html")&&"static"===t.css(s,"position");)s=s.offsetParent;return s||n.documentElement};return t.height=function(e,o){var n=e.offsetHeight;return o?n+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):n-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),n},t.width=function(e,o){var n=e.offsetWidth;return o?n+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):n-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),n},t}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),e=t.nodeName=function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()};t.css=function(t,e,o){var n;return n=t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t)[e]:t.style[e],o===!0?parseFloat(n)||0:n},t.offset=function(t){var e=t.getBoundingClientRect(),o=t.ownerDocument;return{width:e.width||t.offsetWidth,height:e.height||t.offsetHeight,top:e.top+(window.pageYOffset||o.documentElement.scrollTop)-(o.documentElement.clientTop||0),left:e.left+(window.pageXOffset||o.documentElement.scrollLeft)-(o.documentElement.clientLeft||0)}},t.position=function(n){var s,i,r={top:0,left:0};return"fixed"===t.css(n,"position")?i=n.getBoundingClientRect():(s=o(n),i=t.offset(n),i=t.offset(n),e(s,"html")||(r=t.offset(s)),r.top+=t.css(s,"borderTopWidth",!0),r.left+=t.css(s,"borderLeftWidth",!0)),{width:n.offsetWidth,height:n.offsetHeight,top:i.top-r.top-t.css(n,"marginTop",!0),left:i.left-r.left-t.css(n,"marginLeft",!0)}};var o=function(o){var n=o.ownerDocument,s=o.offsetParent||n;if(e(s,"#document"))return n.documentElement;for(;s&&!e(s,"html")&&"static"===t.css(s,"position");)s=s.offsetParent;return s||n.documentElement};return t.height=function(e,o){var n=e.offsetHeight;return o?n+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):n-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),n},t.width=function(e,o){var n=e.offsetWidth;return o?n+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):n-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),n},t}]); \ No newline at end of file diff --git a/dist/modules/dimensions.min.js.map b/dist/modules/dimensions.min.js.map deleted file mode 100644 index c584bb62b..000000000 --- a/dist/modules/dimensions.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"dimensions.min.js.map","sources":["dimensions.min.js"],"names":["angular","module","factory","fn","element","nodeName","name","toLowerCase","css","prop","extra","value","currentStyle","window","getComputedStyle","style","parseFloat","offset","boxRect","getBoundingClientRect","docElement","ownerDocument","width","offsetWidth","height","offsetHeight","top","pageYOffset","documentElement","scrollTop","clientTop","left","pageXOffset","scrollLeft","clientLeft","position","offsetParentElement","offsetParentRect","offsetParent","outer"],"mappings":"AAOA,YACAA,SAAQC,OAAO,wCAAyCC,QAAQ,cAC9D,YACA,UACA,WACE,GACIC,IADSH,QAAQI,YAOjBC,EAAWF,EAAGE,SAAW,SAAUD,EAASE,GAC5C,MAAOF,GAAQC,UAAYD,EAAQC,SAASE,gBAAkBD,EAAKC,cAQvEJ,GAAGK,IAAM,SAAUJ,EAASK,EAAMC,GAChC,GAAIC,EASJ,OANEA,GAFEP,EAAQQ,aAEFR,EAAQQ,aAAaH,GACpBI,OAAOC,iBACRD,OAAOC,iBAAiBV,GAASK,GAEjCL,EAAQW,MAAMN,GAEjBC,KAAU,EAAOM,WAAWL,IAAU,EAAIA,GAQnDR,EAAGc,OAAS,SAAUb,GACpB,GAAIc,GAAUd,EAAQe,wBAClBC,EAAahB,EAAQiB,aACzB,QACEC,MAAOlB,EAAQmB,YACfC,OAAQpB,EAAQqB,aAChBC,IAAKR,EAAQQ,KAAOb,OAAOc,aAAeP,EAAWQ,gBAAgBC,YAAcT,EAAWQ,gBAAgBE,WAAa,GAC3HC,KAAMb,EAAQa,MAAQlB,OAAOmB,aAAeZ,EAAWQ,gBAAgBK,aAAeb,EAAWQ,gBAAgBM,YAAc,KASnI/B,EAAGgC,SAAW,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B,GAAI5B,GAAQP,EAAQmB,WAMpB,OALIgB,GACF5B,GAASR,EAAGK,IAAIJ,EAAS,cAAc,GAAQD,EAAGK,IAAIJ,EAAS,eAAe,GAE9EO,GAASR,EAAGK,IAAIJ,EAAS,eAAe,GAAQD,EAAGK,IAAIJ,EAAS,gBAAgB,GAAQD,EAAGK,IAAIJ,EAAS,mBAAmB,GAAQD,EAAGK,IAAIJ,EAAS,oBAAoB,GAElKO,GAEFR"} \ No newline at end of file diff --git a/dist/modules/dropdown.js b/dist/modules/dropdown.js index e16e1dee1..a280a65b2 100644 --- a/dist/modules/dropdown.js +++ b/dist/modules/dropdown.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/dropdown.min.js b/dist/modules/dropdown.min.js index aeb7eab90..0312fc93e 100644 --- a/dist/modules/dropdown.min.js +++ b/dist/modules/dropdown.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/dropdown.min.js.map b/dist/modules/dropdown.min.js.map deleted file mode 100644 index 19c38c609..000000000 --- a/dist/modules/dropdown.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"dropdown.min.js.map","sources":["dropdown.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","$get","$window","$rootScope","$tooltip","DropdownFactory","element","config","onBodyClick","evt","target","$dropdown","hide","options","extend","$scope","scope","$new","$onKeyDown","test","keyCode","preventDefault","stopPropagation","items","$element","querySelectorAll","length","index","forEach","el","i","matchesSelector","call","isUndefined","eq","focus","show","setTimeout","on","bodyEl","off","document","body","Element","prototype","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","directive","$location","$sce","restrict","link","attr","key","isDefined","bsDropdown","$watch","newValue","content","dropdown","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,2BAA4B,2BAA2BC,SAAS,YAAa,WAC1F,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,WACbC,UAAW,cACXC,SAAU,6BACVC,QAAS,QACTC,WAAW,EACXC,UAAU,EACVC,MAAM,EACNC,MAAO,EAEXT,MAAKU,MACH,UACA,aACA,WACA,SAAUC,EAASC,EAAYC,GAG7B,QAASC,GAAgBC,EAASC,GA8ChC,QAASC,GAAYC,GACnB,MAAIA,GAAIC,SAAWJ,EAAQ,GAEpBG,EAAIC,SAAWJ,EAAQ,IAAMK,EAAUC,OAF9C,OA9CF,CAAA,GAAID,MAEAE,EAAU1B,QAAQ2B,UAAWxB,EAAUiB,EAC/BI,GAAUI,OAASF,EAAQG,OAASH,EAAQG,MAAMC,QAAUd,EAAWc,OACnFN,EAAYP,EAASE,EAASO,GAE9BF,EAAUO,WAAa,SAAUT,GAC/B,GAAK,UAAUU,KAAKV,EAAIW,SAAxB,CAEAX,EAAIY,iBACJZ,EAAIa,iBAEJ,IAAIC,GAAQpC,QAAQmB,QAAQK,EAAUa,SAAS,GAAGC,iBAAiB,sBACnE,IAAKF,EAAMG,OAAX,CAEA,GAAIC,EACJxC,SAAQyC,QAAQL,EAAO,SAAUM,EAAIC,GAC/BC,GAAmBA,EAAgBC,KAAKH,EAAI,YAC9CF,EAAQG,KAGQ,KAAhBrB,EAAIW,SAAkBO,EAAQ,EAChCA,IACuB,KAAhBlB,EAAIW,SAAkBO,EAAQJ,EAAMG,OAAS,EACpDC,IACOxC,QAAQ8C,YAAYN,KAC3BA,EAAQ,GACVJ,EAAMW,GAAGP,GAAO,GAAGQ,UAGrB,IAAIC,GAAOzB,EAAUyB,IACrBzB,GAAUyB,KAAO,WACfA,IACAC,WAAW,WACTxB,EAAQf,UAAYa,EAAUa,SAASc,GAAG,UAAW3B,EAAUO,YAC/DqB,EAAOD,GAAG,QAAS9B,KAGvB,IAAII,GAAOD,EAAUC,IAYrB,OAXAD,GAAUC,KAAO,WACfC,EAAQf,UAAYa,EAAUa,SAASgB,IAAI,UAAW7B,EAAUO,YAChEqB,EAAOC,IAAI,QAAShC,GACpBI,KAQKD,EArDT,GAAI4B,GAASpD,QAAQmB,QAAQJ,EAAQuC,SAASC,MAC1CX,EAAkBY,QAAQC,UAAUb,iBAAmBY,QAAQC,UAAUC,uBAAyBF,QAAQC,UAAUE,oBAAsBH,QAAQC,UAAUG,mBAAqBJ,QAAQC,UAAUI,gBAsDvM,OAAO3C,OAGV4C,UAAU,cACX,UACA,YACA,OACA,YACA,SAAU/C,EAASgD,EAAWC,EAAMxC,GAClC,OACEyC,SAAU,MACVpC,OAAO,EACPqC,KAAM,SAAkBrC,EAAOV,EAASgD,GAEtC,GAAIzC,IAAYG,MAAOA,EACvB7B,SAAQyC,SACN,YACA,YACA,QACA,UACA,WACA,OACA,YACA,YACC,SAAU2B,GACPpE,QAAQqE,UAAUF,EAAKC,MACzB1C,EAAQ0C,GAAOD,EAAKC,MAGxBD,EAAKG,YAAczC,EAAM0C,OAAOJ,EAAKG,WAAY,SAAUE,GACzD3C,EAAM4C,QAAUD,IACf,EAEH,IAAIE,GAAWlD,EAAUL,EAASO,EAElCG,GAAM8C,IAAI,WAAY,WACpBD,EAASE,UACTlD,EAAU,KACVgD,EAAW"} \ No newline at end of file diff --git a/dist/modules/dropdown.tpl.js b/dist/modules/dropdown.tpl.js index 0c7685337..5bcdb365c 100644 --- a/dist/modules/dropdown.tpl.js +++ b/dist/modules/dropdown.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,6 @@ angular.module('mgcrea.ngStrap.dropdown').run([ '$templateCache', function ($templateCache) { - $templateCache.put('dropdown/dropdown.tpl.html', ''); + $templateCache.put('dropdown/dropdown.tpl.html', ''); } ]); \ No newline at end of file diff --git a/dist/modules/dropdown.tpl.min.js b/dist/modules/dropdown.tpl.min.js index 40f873350..3adb29da5 100644 --- a/dist/modules/dropdown.tpl.min.js +++ b/dist/modules/dropdown.tpl.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(e){e.put("dropdown/dropdown.tpl.html",'')}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(e){e.put("dropdown/dropdown.tpl.html",'')}]); \ No newline at end of file diff --git a/dist/modules/modal.js b/dist/modules/modal.js index 5b3df000c..754c90204 100644 --- a/dist/modules/modal.js +++ b/dist/modules/modal.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -142,7 +142,7 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).pr scope.$emit(options.prefixEvent + '.show', $modal); }); scope.$isShown = true; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); // Focus once the enter-animation has started // Weird PhantomJS bug hack var el = modalElement[0]; @@ -176,7 +176,7 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).pr }); } scope.$isShown = false; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); // Unbind events if (options.backdrop) { modalElement.off('click', hideOnBackdropClick); diff --git a/dist/modules/modal.min.js b/dist/modules/modal.min.js index c3ee890d5..4fcd31e88 100644 --- a/dist/modules/modal.min.js +++ b/dist/modules/modal.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var n=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(e,t,o,a,i,r,c,l,s){function u(e){function a(n){n.target===n.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},n,e);i.$promise=m(r.template);var l=i.$scope=r.scope&&r.scope.$new()||t.$new();r.element||r.container||(r.container="body"),p(["title","content"],function(n){r[n]&&(l[n]=s.trustAsHtml(r[n]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(n){var t=angular.element(n);return m(r.contentTemplate).then(function(n){var o=d('[ng-bind="content"]',t[0]).removeAttr("ng-bind").html(n);return e.template||o.next().remove(),t[0].outerHTML})}));var u,b,v=angular.element('
');return i.$promise.then(function(n){angular.isObject(n)&&(n=n.data),r.html&&(n=n.replace(g,'ng-bind-html="')),n=f.apply(n),u=o(n),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){b&&(b.remove(),b=null),v&&(v.remove(),v=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var n=r.container?d(r.container):null,e=r.container?null:r.element;b=i.$element=u(l,function(){}),b.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&v.addClass(r.backdropAnimation),b.addClass(r.animation)),r.backdrop&&c.enter(v,h,null,function(){}),c.enter(b,n,e,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root.$$phase||l.$digest();var t=b[0];$(function(){t.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(b.on("click",a),v.on("click",a)),r.keyboard&&b.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),c.leave(b,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&c.leave(v,function(){}),l.$isShown=!1,l.$$phase||l.$root.$$phase||l.$digest(),r.backdrop&&(b.off("click",a),v.off("click",a)),r.keyboard&&b.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){b[0].focus()},i.$onKeyUp=function(n){27===n.which&&i.hide()},i}function d(n,e){return angular.element((e||document).querySelectorAll(n))}function m(n){return a.when(i.get(n)||r.get(n)).then(function(e){return angular.isObject(e)?(i.put(n,e.data),e.data):e})}var p=angular.forEach,f=String.prototype.trim,$=e.requestAnimationFrame||e.setTimeout,h=angular.element(e.document.body),g=/ng-bind="/gi;return u}]}).directive("bsModal",["$window","$location","$sce","$modal",function(n,e,t,o){return{restrict:"EAC",scope:!0,link:function(n,e,a){var i={scope:n,element:e,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(n){angular.isDefined(a[n])&&(i[n]=a[n])}),angular.forEach(["title","content"],function(e){a[e]&&a.$observe(e,function(o){n[e]=t.trustAsHtml(o)})}),a.bsModal&&n.$watch(a.bsModal,function(e){angular.isObject(e)?angular.extend(n,e):n.content=e},!0);var r=o(i);e.on(a.trigger||"click",r.toggle),n.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var n=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(e,t,o,a,i,r,c,l,s){function u(e){function a(n){n.target===n.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},n,e);i.$promise=m(r.template);var l=i.$scope=r.scope&&r.scope.$new()||t.$new();r.element||r.container||(r.container="body"),p(["title","content"],function(n){r[n]&&(l[n]=s.trustAsHtml(r[n]))}),l.$hide=function(){l.$$postDigest(function(){i.hide()})},l.$show=function(){l.$$postDigest(function(){i.show()})},l.$toggle=function(){l.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(n){var t=angular.element(n);return m(r.contentTemplate).then(function(n){var o=d('[ng-bind="content"]',t[0]).removeAttr("ng-bind").html(n);return e.template||o.next().remove(),t[0].outerHTML})}));var u,b,v=angular.element('
');return i.$promise.then(function(n){angular.isObject(n)&&(n=n.data),r.html&&(n=n.replace(g,'ng-bind-html="')),n=f.apply(n),u=o(n),i.init()}),i.init=function(){r.show&&l.$$postDigest(function(){i.show()})},i.destroy=function(){b&&(b.remove(),b=null),v&&(v.remove(),v=null),l.$destroy()},i.show=function(){l.$emit(r.prefixEvent+".show.before",i);var n=r.container?d(r.container):null,e=r.container?null:r.element;b=i.$element=u(l,function(){}),b.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&v.addClass(r.backdropAnimation),b.addClass(r.animation)),r.backdrop&&c.enter(v,h,null,function(){}),c.enter(b,n,e,function(){l.$emit(r.prefixEvent+".show",i)}),l.$isShown=!0,l.$$phase||l.$root&&l.$root.$$phase||l.$digest();var t=b[0];$(function(){t.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(b.on("click",a),v.on("click",a)),r.keyboard&&b.on("keyup",i.$onKeyUp)},i.hide=function(){l.$emit(r.prefixEvent+".hide.before",i),c.leave(b,function(){l.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&c.leave(v,function(){}),l.$isShown=!1,l.$$phase||l.$root&&l.$root.$$phase||l.$digest(),r.backdrop&&(b.off("click",a),v.off("click",a)),r.keyboard&&b.off("keyup",i.$onKeyUp)},i.toggle=function(){l.$isShown?i.hide():i.show()},i.focus=function(){b[0].focus()},i.$onKeyUp=function(n){27===n.which&&i.hide()},i}function d(n,e){return angular.element((e||document).querySelectorAll(n))}function m(n){return a.when(i.get(n)||r.get(n)).then(function(e){return angular.isObject(e)?(i.put(n,e.data),e.data):e})}var p=angular.forEach,f=String.prototype.trim,$=e.requestAnimationFrame||e.setTimeout,h=angular.element(e.document.body),g=/ng-bind="/gi;return u}]}).directive("bsModal",["$window","$location","$sce","$modal",function(n,e,t,o){return{restrict:"EAC",scope:!0,link:function(n,e,a){var i={scope:n,element:e,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(n){angular.isDefined(a[n])&&(i[n]=a[n])}),angular.forEach(["title","content"],function(e){a[e]&&a.$observe(e,function(o){n[e]=t.trustAsHtml(o)})}),a.bsModal&&n.$watch(a.bsModal,function(e){angular.isObject(e)?angular.extend(n,e):n.content=e},!0);var r=o(i);e.on(a.trigger||"click",r.toggle),n.$on("$destroy",function(){r.destroy(),i=null,r=null})}}}]); \ No newline at end of file diff --git a/dist/modules/modal.min.js.map b/dist/modules/modal.min.js.map deleted file mode 100644 index cd0852c0b..000000000 --- a/dist/modules/modal.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"modal.min.js.map","sources":["modal.min.js"],"names":["angular","module","provider","defaults","this","animation","backdropAnimation","prefixClass","prefixEvent","placement","template","contentTemplate","container","element","backdrop","keyboard","html","show","$get","$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","ModalFactory","config","hideOnBackdropClick","evt","target","currentTarget","options","$modal","focus","hide","$options","extend","$promise","fetchTemplate","scope","$scope","$new","forEach","key","trustAsHtml","$hide","$$postDigest","$show","$toggle","toggle","then","templateEl","contentEl","findElement","removeAttr","next","remove","outerHTML","modalLinker","modalElement","backdropElement","isObject","data","replace","htmlReplaceRegExp","trim","apply","init","destroy","$destroy","$emit","parent","after","$element","css","display","addClass","enter","bodyElement","$isShown","$$phase","$root","$digest","el","requestAnimationFrame","on","$onKeyUp","leave","removeClass","off","which","query","document","querySelectorAll","when","get","res","put","String","prototype","setTimeout","body","directive","$location","restrict","link","attr","isDefined","$observe","newValue","bsModal","$watch","content","modal","trigger","$on"],"mappings":"AAOA,YACAA,SAAQC,OAAO,wBAAyB,sCAAsCC,SAAS,SAAU,WAC/F,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,kBAAmB,UACnBC,YAAa,QACbC,YAAa,QACbC,UAAW,MACXC,SAAU,uBACVC,iBAAiB,EACjBC,W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,QAAQM,EAAQ4E,SAASS,MAC/CrC,EAAoB,aAmLxB,OAAOvC,OAGV6E,UAAU,WACX,UACA,YACA,OACA,SACA,SAAUtF,EAASuF,EAAW/E,EAAMQ,GAClC,OACEwE,SAAU,MACVjE,OAAO,EACPkE,KAAM,SAAkBlE,EAAO7B,EAASgG,GAEtC,GAAI3E,IACAQ,MAAOA,EACP7B,QAASA,EACTI,MAAM,EAEVjB,SAAQ6C,SACN,WACA,kBACA,YACA,WACA,WACA,OACA,YACA,aACC,SAAUC,GACP9C,QAAQ8G,UAAUD,EAAK/D,MACzBZ,EAAQY,GAAO+D,EAAK/D,MAGxB9C,QAAQ6C,SACN,QACA,WACC,SAAUC,GACX+D,EAAK/D,IAAQ+D,EAAKE,SAASjE,EAAK,SAAUkE,GACxCtE,EAAMI,GAAOnB,EAAKoB,YAAYiE,OAIlCH,EAAKI,SAAWvE,EAAMwE,OAAOL,EAAKI,QAAS,SAAUD,GAC/ChH,QAAQgE,SAASgD,GACnBhH,QAAQuC,OAAOG,EAAOsE,GAEtBtE,EAAMyE,QAAUH,IAEjB,EAEH,IAAII,GAAQjF,EAAOD,EAEnBrB,GAAQ2E,GAAGqB,EAAKQ,SAAW,QAASD,EAAMhE,QAE1CV,EAAM4E,IAAI,WAAY,WACpBF,EAAM7C,UACNrC,EAAU,KACVkF,EAAQ"} \ No newline at end of file diff --git a/dist/modules/modal.tpl.js b/dist/modules/modal.tpl.js index e009a8779..6a3eb9795 100644 --- a/dist/modules/modal.tpl.js +++ b/dist/modules/modal.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/modal.tpl.min.js b/dist/modules/modal.tpl.min.js index 5025eac2d..354824a73 100644 --- a/dist/modules/modal.tpl.min.js +++ b/dist/modules/modal.tpl.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/navbar.js b/dist/modules/navbar.js index 7a41d24c4..695b264ca 100644 --- a/dist/modules/navbar.js +++ b/dist/modules/navbar.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/navbar.min.js b/dist/modules/navbar.min.js index 6a44b019f..1448920ad 100644 --- a/dist/modules/navbar.min.js +++ b/dist/modules/navbar.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/navbar.min.js.map b/dist/modules/navbar.min.js.map deleted file mode 100644 index 90406599d..000000000 --- a/dist/modules/navbar.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"navbar.min.js.map","sources":["navbar.min.js"],"names":["angular","module","provider","defaults","this","activeClass","routeAttr","strict","$get","directive","$window","$location","$navbar","restrict","link","scope","element","attr","options","copy","forEach","Object","keys","key","isDefined","$watch","path","newValue","liElements","querySelectorAll","li","liElement","pattern","replace","regexp","RegExp","test","addClass","removeClass"],"mappings":"AAOA,YACAA,SAAQC,OAAO,4BAA6BC,SAAS,UAAW,WAC9D,GAAIC,GAAWC,KAAKD,UAChBE,YAAa,SACbC,UAAW,mBACXC,QAAQ,EAEZH,MAAKI,KAAO,WACV,OAASL,SAAUA,MAEpBM,UAAU,YACX,UACA,YACA,UACA,SAAUC,EAASC,EAAWC,GAC5B,GAAIT,GAAWS,EAAQT,QACvB,QACEU,SAAU,IACVC,KAAM,SAAkBC,EAAOC,EAASC,GAEtC,GAAIC,GAAUlB,QAAQmB,KAAKhB,EAC3BH,SAAQoB,QAAQC,OAAOC,KAAKnB,GAAW,SAAUoB,GAC3CvB,QAAQwB,UAAUP,EAAKM,MACzBL,EAAQK,GAAON,EAAKM,MAGxBR,EAAMU,OAAO,WACX,MAAOd,GAAUe,QAChB,SAAUC,GACX,GAAIC,GAAaZ,EAAQ,GAAGa,iBAAiB,MAAQX,EAAQZ,UAAY,IACzEN,SAAQoB,QAAQQ,EAAY,SAAUE,GACpC,GAAIC,GAAY/B,QAAQgB,QAAQc,GAC5BE,EAAUD,EAAUd,KAAKC,EAAQZ,WAAW2B,QAAQ,IAAK,MACzDf,GAAQX,SACVyB,EAAU,IAAMA,EAAU,IAE5B,IAAIE,GAAS,GAAIC,QAAOH,GAAU,KAC9BE,GAAOE,KAAKT,GACdI,EAAUM,SAASnB,EAAQb,aAE3B0B,EAAUO,YAAYpB,EAAQb"} \ No newline at end of file diff --git a/dist/modules/parse-options.js b/dist/modules/parse-options.js index c200811e0..fa6c8af37 100644 --- a/dist/modules/parse-options.js +++ b/dist/modules/parse-options.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/parse-options.min.js b/dist/modules/parse-options.min.js index d8e95f5d1..1cf8e73ca 100644 --- a/dist/modules/parse-options.min.js +++ b/dist/modules/parse-options.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/parse-options.min.js.map b/dist/modules/parse-options.min.js.map deleted file mode 100644 index eb72b9a34..000000000 --- a/dist/modules/parse-options.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"parse-options.min.js.map","sources":["parse-options.min.js"],"names":["angular","module","provider","defaults","this","regexp","$get","$parse","$q","ParseOptionsFactory","attr","config","parseValues","values","scope","map","match","index","label","value","locals","valueName","displayFn","valueFn","$parseOptions","options","extend","$values","keyName","groupByFn","valuesFn","init","$match","controller","when","then"],"mappings":"AAOA,YACAA,SAAQC,OAAO,0CAA2CC,SAAS,gBAAiB,WAClF,GAAIC,GAAWC,KAAKD,UAAaE,OAAQ,+KACzCD,MAAKE,MACH,SACA,KACA,SAAUC,EAAQC,GAChB,QAASC,GAAoBC,EAAMC,GAkBjC,QAASC,GAAYC,EAAQC,GAC3B,MAAOD,GAAOE,IAAI,SAAUC,EAAOC,GACjC,GAAiBC,GAAOC,EAApBC,IAIJ,OAHAA,GAAOC,GAAaL,EACpBE,EAAQI,EAAUR,EAAOM,GACzBD,EAAQI,EAAQT,EAAOM,IAAWH,GAEhCC,MAAOA,EACPC,MAAOA,KAzBb,GAAIK,MAEAC,EAAUzB,QAAQ0B,UAAWvB,EAAUQ,EAC3Ca,GAAcG,UAEd,IAAIX,GAAOM,EAAWD,EAAWO,EAASC,EAAWN,EAASO,CAyB9D,OAxBAN,GAAcO,KAAO,WACnBP,EAAcQ,OAAShB,EAAQN,EAAKM,MAAMS,EAAQpB,QAClDiB,EAAYf,EAAOS,EAAM,IAAMA,EAAM,IAAKK,EAAYL,EAAM,IAAMA,EAAM,GAAIY,EAAUZ,EAAM,GAAIa,EAAYtB,EAAOS,EAAM,IAAM,IAAKO,EAAUhB,EAAOS,EAAM,GAAKA,EAAM,GAAKK,GAAYS,EAAWvB,EAAOS,EAAM,KAEjNQ,EAAcM,SAAW,SAAUhB,EAAOmB,GACxC,MAAOzB,GAAG0B,KAAKJ,EAAShB,EAAOmB,IAAaE,KAAK,SAAUtB,GAEzD,MADAW,GAAcG,QAAUd,EAASD,EAAYC,EAAQC,MAC9CU,EAAcG,WAgBzBH,EAAcO,OACPP,EAET,MAAOf"} \ No newline at end of file diff --git a/dist/modules/popover.js b/dist/modules/popover.js index a34278721..04af85cab 100644 --- a/dist/modules/popover.js +++ b/dist/modules/popover.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,8 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$popover', function () { var defaults = this.defaults = { animation: 'am-fade', + container: false, + target: false, placement: 'right', template: 'popover/popover.tpl.html', contentTemplate: false, @@ -17,8 +19,7 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$ html: false, title: '', content: '', - delay: 0, - container: false + delay: 0 }; this.$get = [ '$tooltip', @@ -54,6 +55,7 @@ angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$ 'contentTemplate', 'placement', 'container', + 'target', 'delay', 'trigger', 'keyboard', diff --git a/dist/modules/popover.min.js b/dist/modules/popover.min.js index 824011d5d..c96c95ec0 100644 --- a/dist/modules/popover.min.js +++ b/dist/modules/popover.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var t=this.defaults={animation:"am-fade",placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,container:!1};this.$get=["$tooltip",function(e){function n(n,o){var a=angular.extend({},t,o),r=e(n,a);return a.content&&(r.$scope.content=a.content),r}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(t,e,n,o){var a=t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var i={scope:t};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content"],function(e){r[e]&&r.$observe(e,function(o,r){t[e]=n.trustAsHtml(o),angular.isDefined(r)&&a(function(){c&&c.$applyPlacement()})})}),r.bsPopover&&t.$watch(r.bsPopover,function(e,n){angular.isObject(e)?angular.extend(t,e):t.content=e,angular.isDefined(n)&&a(function(){c&&c.$applyPlacement()})},!0);var c=o(e,i);t.$on("$destroy",function(){c.destroy(),i=null,c=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var t=this.defaults={animation:"am-fade",container:!1,target:!1,placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0};this.$get=["$tooltip",function(e){function n(n,o){var a=angular.extend({},t,o),r=e(n,a);return a.content&&(r.$scope.content=a.content),r}return n}]}).directive("bsPopover",["$window","$location","$sce","$popover",function(t,e,n,o){var a=t.requestAnimationFrame||t.setTimeout;return{restrict:"EAC",scope:!0,link:function(t,e,r){var i={scope:t};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation"],function(t){angular.isDefined(r[t])&&(i[t]=r[t])}),angular.forEach(["title","content"],function(e){r[e]&&r.$observe(e,function(o,r){t[e]=n.trustAsHtml(o),angular.isDefined(r)&&a(function(){c&&c.$applyPlacement()})})}),r.bsPopover&&t.$watch(r.bsPopover,function(e,n){angular.isObject(e)?angular.extend(t,e):t.content=e,angular.isDefined(n)&&a(function(){c&&c.$applyPlacement()})},!0);var c=o(e,i);t.$on("$destroy",function(){c.destroy(),i=null,c=null})}}}]); \ No newline at end of file diff --git a/dist/modules/popover.min.js.map b/dist/modules/popover.min.js.map deleted file mode 100644 index 1eb9c5e0a..000000000 --- a/dist/modules/popover.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"popover.min.js.map","sources":["popover.min.js"],"names":["angular","module","provider","defaults","this","animation","placement","template","contentTemplate","trigger","keyboard","html","title","content","delay","container","$get","$tooltip","PopoverFactory","element","config","options","extend","$popover","$scope","directive","$window","$location","$sce","requestAnimationFrame","setTimeout","restrict","scope","link","attr","forEach","key","isDefined","$observe","newValue","oldValue","trustAsHtml","popover","$applyPlacement","bsPopover","$watch","isObject","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,0BAA2B,2BAA2BC,SAAS,WAAY,WACxF,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,UAAW,QACXC,SAAU,2BACVC,iBAAiB,EACjBC,QAAS,QACTC,UAAU,EACVC,MAAM,EACNC,MAAO,GACPC,QAAS,GACTC,MAAO,EACPC,WAAW,EAEfX,MAAKY,MACH,WACA,SAAUC,GACR,QAASC,GAAeC,EAASC,GAE/B,GAAIC,GAAUrB,QAAQsB,UAAWnB,EAAUiB,GACvCG,EAAWN,EAASE,EAASE,EAKjC,OAHIA,GAAQR,UACVU,EAASC,OAAOX,QAAUQ,EAAQR,SAE7BU,EAET,MAAOL,OAGVO,UAAU,aACX,UACA,YACA,OACA,WACA,SAAUC,EAASC,EAAWC,EAAML,GAClC,GAAIM,GAAwBH,EAAQG,uBAAyBH,EAAQI,UACrE,QACEC,SAAU,MACVC,OAAO,EACPC,KAAM,SAAkBD,EAAOb,EAASe,GAEtC,GAAIb,IAAYW,MAAOA,EACvBhC,SAAQmC,SACN,WACA,kBACA,YACA,YACA,QACA,UACA,WACA,OACA,aACC,SAAUC,GACPpC,QAAQqC,UAAUH,EAAKE,MACzBf,EAAQe,GAAOF,EAAKE,MAGxBpC,QAAQmC,SACN,QACA,WACC,SAAUC,GACXF,EAAKE,IAAQF,EAAKI,SAASF,EAAK,SAAUG,EAAUC,GAClDR,EAAMI,GAAOR,EAAKa,YAAYF,GAC9BvC,QAAQqC,UAAUG,IAAaX,EAAsB,WACnDa,GAAWA,EAAQC,wBAKzBT,EAAKU,WAAaZ,EAAMa,OAAOX,EAAKU,UAAW,SAAUL,EAAUC,GAC7DxC,QAAQ8C,SAASP,GACnBvC,QAAQsB,OAAOU,EAAOO,GAEtBP,EAAMnB,QAAU0B,EAElBvC,QAAQqC,UAAUG,IAAaX,EAAsB,WACnDa,GAAWA,EAAQC,sBAEpB,EAEH,IAAID,GAAUnB,EAASJ,EAASE,EAEhCW,GAAMe,IAAI,WAAY,WACpBL,EAAQM,UACR3B,EAAU,KACVqB,EAAU"} \ No newline at end of file diff --git a/dist/modules/popover.tpl.js b/dist/modules/popover.tpl.js index ab6547290..82718cb2e 100644 --- a/dist/modules/popover.tpl.js +++ b/dist/modules/popover.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/popover.tpl.min.js b/dist/modules/popover.tpl.min.js index 22ab402d6..655e3cb42 100644 --- a/dist/modules/popover.tpl.min.js +++ b/dist/modules/popover.tpl.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/raf.js b/dist/modules/raf.js index 3ed588971..d8d3c7e78 100644 --- a/dist/modules/raf.js +++ b/dist/modules/raf.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/raf.min.js b/dist/modules/raf.min.js index 66969eeb6..73dccef5e 100644 --- a/dist/modules/raf.min.js +++ b/dist/modules/raf.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/raf.min.js.map b/dist/modules/raf.min.js.map deleted file mode 100644 index 3c1d07992..000000000 --- a/dist/modules/raf.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"raf.min.js.map","sources":["raf.min.js"],"names":["angular","version","minor","dot","module","factory","$window","$timeout","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","fn","id","timer","cancel","supported"],"mappings":"AAOA,YACAA,SAAQC,QAAQC,MAAQ,GAAKF,QAAQC,QAAQE,IAAM,IAAMH,QAAQI,OAAO,MAAMC,QAAQ,SACpF,UACA,WACA,SAAUC,EAASC,GACjB,GAAIC,GAAwBF,EAAQE,uBAAyBF,EAAQG,6BAA+BH,EAAQI,yBACxGC,EAAuBL,EAAQK,sBAAwBL,EAAQM,4BAA8BN,EAAQO,yBAA2BP,EAAQQ,kCACxIC,IAAiBP,EACjBQ,EAAMD,EAAe,SAAUE,GAC/B,GAAIC,GAAKV,EAAsBS,EAC/B,OAAO,YACLN,EAAqBO,KAErB,SAAUD,GACZ,GAAIE,GAAQZ,EAASU,EAAI,OAAO,EAEhC,OAAO,YACLV,EAASa,OAAOD,IAItB,OADAH,GAAIK,UAAYN,EACTC"} \ No newline at end of file diff --git a/dist/modules/scrollspy.js b/dist/modules/scrollspy.js index b49428924..4f3aaf806 100644 --- a/dist/modules/scrollspy.js +++ b/dist/modules/scrollspy.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/scrollspy.min.js b/dist/modules/scrollspy.min.js index 6ac7a67d2..433cdf8a1 100644 --- a/dist/modules/scrollspy.min.js +++ b/dist/modules/scrollspy.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/scrollspy.min.js.map b/dist/modules/scrollspy.min.js.map deleted file mode 100644 index a55879e27..000000000 --- a/dist/modules/scrollspy.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"scrollspy.min.js.map","sources":["scrollspy.min.js"],"names":["angular","module","provider","spies","this","$$spies","defaults","debounce","throttle","offset","$get","$window","$document","$rootScope","dimensions","nodeName","element","name","toLowerCase","ScrollSpyFactory","config","options","extend","bodyEl","isWindowSpy","scrollEl","windowEl","scrollId","id","$$count","unbindViewContentLoaded","unbindIncludeContentLoaded","activeTarget","debouncedCheckPosition","throttledCheckPosition","debouncedCheckOffsets","viewportHeight","scrollTop","$scrollspy","trackedElements","$trackedElements","sortedElements","init","checkPosition","on","checkPositionWithEventLoop","checkOffsets","$on","destroy","off","length","pageYOffset","prop","Math","max","innerHeight","docEl","offsetTop","target","$activateElement","i","isUndefined","setTimeout","activeElement","$getTrackedElement","source","removeClass","parent","addClass","filter","obj","forEach","trackedElement","targetElement","document","querySelector","top","el","sort","a","b","trackElement","push","untrackElement","toDelete","splice","activate","body","directive","restrict","link","scope","attr","key","isDefined","scrollspy","compile","children","querySelectorAll","child","childEl"],"mappings":"AAOA,YACAA,SAAQC,OAAO,4BACb,kCACA,sCACCC,SAAS,aAAc,WAExB,GAAIC,GAAQC,KAAKC,WACbC,EAAWF,KAAKE,UAChBC,SAAU,IACVC,SAAU,IACVC,OAAQ,IAEZL,MAAKM,MACH,UACA,YACA,aACA,aACA,WACA,WACA,SAAUC,EAASC,EAAWC,EAAYC,EAAYP,EAAUC,GAK9D,QAASO,GAASC,EAASC,GACzB,MAAOD,GAAQ,GAAGD,UAAYC,EAAQ,GAAGD,SAASG,gBAAkBD,EAAKC,cAE3E,QAASC,GAAiBC,GAExB,GAAIC,GAAUrB,QAAQsB,UAAWhB,EAAUc,EACtCC,GAAQL,UACXK,EAAQL,QAAUO,EACpB,IAAIC,GAAcT,EAASM,EAAQL,QAAS,QACxCS,EAAWD,EAAcE,EAAWL,EAAQL,QAC5CW,EAAWH,EAAc,SAAWH,EAAQO,EAEhD,IAAIzB,EAAMwB,GAER,MADAxB,GAAMwB,GAAUE,UACT1B,EAAMwB,EA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AAWA,GAAUnB,EAAgBqB,GAAGK,SAAWA,EAAQ,CAChFmB,EAAWxB,CACX,OAGJrB,EAAkBA,EAAgB8C,OAAOD,EAAU,IAErD9C,EAAWgD,SAAW,SAAU1B,GAC9BrB,EAAgBqB,GAAGQ,SAAS,WAG9B9B,EAAWI,OACJJ,EAvJT,GAAIZ,GAAW1B,QAAQgB,QAAQL,GAC3B6C,EAAQxD,QAAQgB,QAAQJ,EAAUwC,KAAK,oBACvC7B,EAASvB,QAAQgB,QAAQL,EAAQ+D,SAASa,KAuJ9C,OAAOpE,OAGVqE,UAAU,eACX,aACA,WACA,aACA,aACA,SAAU3E,EAAYN,EAAUO,EAAYwB,GAC1C,OACEmD,SAAU,MACVC,KAAM,SAAkBC,EAAO3E,EAAS4E,GACtC,GAAIvE,IAAYsE,MAAOA,EACvB3F,SAAQuE,SACN,SACA,UACC,SAAUsB,GACP7F,QAAQ8F,UAAUF,EAAKC,MACzBxE,EAAQwE,GAAOD,EAAKC,KAExB,IAAIE,GAAYzD,EAAWjB,EAC3B0E,GAAUd,aAAa5D,EAAQqC,OAAQ1C,GACvC2E,EAAM5C,IAAI,WAAY,WACpBgD,EAAUZ,eAAe9D,EAAQqC,OAAQ1C,GACzC+E,EAAU/C,UACV3B,EAAU,KACV0E,EAAY,YAKnBP,UAAU,mBACX,aACA,WACA,aACA,aACA,WACE,OACEC,SAAU,IACVO,QAAS,SAAkBhF,GACzB,GAAIiF,GAAWjF,EAAQ,GAAGkF,iBAAiB,eAC3ClG,SAAQuE,QAAQ0B,EAAU,SAAUE,GAClC,GAAIC,GAAUpG,QAAQgB,QAAQmF,EAC9BC,GAAQjC,SAASyB,KAAK,eAAgB,IAAIA,KAAK,cAAeQ,EAAQR,KAAK"} \ No newline at end of file diff --git a/dist/modules/select.js b/dist/modules/select.js index 7669ddfbb..6d8c54559 100644 --- a/dist/modules/select.js +++ b/dist/modules/select.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -25,7 +25,8 @@ angular.module('mgcrea.ngStrap.select', [ caretHtml: ' ', placeholder: 'Choose among the following...', maxLength: 3, - maxLengthHtml: 'selected' + maxLengthHtml: 'selected', + iconCheckmark: 'glyphicon glyphicon-ok' }; this.$get = [ '$window', @@ -40,11 +41,11 @@ angular.module('mgcrea.ngStrap.select', [ // Common vars var options = angular.extend({}, defaults, config); $select = $tooltip(element, options); - var parentScope = config.scope; var scope = $select.$scope; scope.$matches = []; scope.$activeIndex = 0; scope.$isMultiple = options.multiple; + scope.$iconCheckmark = options.iconCheckmark; scope.$activate = function (index) { scope.$$postDigest(function () { $select.activate(index); @@ -79,21 +80,18 @@ angular.module('mgcrea.ngStrap.select', [ }; $select.select = function (index) { var value = scope.$matches[index].value; - $select.activate(index); - if (options.multiple) { - controller.$setViewValue(scope.$activeIndex.map(function (index) { - return scope.$matches[index].value; - })); - } else { - controller.$setViewValue(value); - } - controller.$render(); - if (parentScope) - parentScope.$digest(); - // Hide if single select - if (!options.multiple) { - $select.hide(); - } + scope.$apply(function () { + $select.activate(index); + if (options.multiple) { + controller.$setViewValue(scope.$activeIndex.map(function (index) { + return scope.$matches[index].value; + })); + } else { + controller.$setViewValue(value); + // Hide if single select + $select.hide(); + } + }); // Emit event scope.$emit('$select.select', value, index); }; @@ -248,6 +246,7 @@ angular.module('mgcrea.ngStrap.select', [ scope.$watch(attr.ngModel, function (newValue, oldValue) { // console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue); select.$updateActiveIndex(); + controller.$render(); }, true); // Model rendering in view controller.$render = function () { diff --git a/dist/modules/select.min.js b/dist/modules/select.min.js index 06c6f9bab..58034868c 100644 --- a/dist/modules/select.min.js +++ b/dist/modules/select.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,i){function l(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var r=a.scope,u=l.$scope;u.$matches=[],u.$activeIndex=0,u.$isMultiple=c.multiple,u.$activate=function(e){u.$$postDigest(function(){l.activate(e)})},u.$select=function(e){u.$$postDigest(function(){l.select(e)})},u.$isVisible=function(){return l.$isVisible()},u.$isActive=function(e){return l.$isActive(e)},l.update=function(e){u.$matches=e,l.$updateActiveIndex()},l.activate=function(e){return c.multiple?(u.$activeIndex.sort(),l.$isActive(e)?u.$activeIndex.splice(u.$activeIndex.indexOf(e),1):u.$activeIndex.push(e),c.sort&&u.$activeIndex.sort()):u.$activeIndex=e,u.$activeIndex},l.select=function(e){var t=u.$matches[e].value;l.activate(e),n.$setViewValue(c.multiple?u.$activeIndex.map(function(e){return u.$matches[e].value}):t),n.$render(),r&&r.$digest(),c.multiple||l.hide(),u.$emit("$select.select",t,e)},l.$updateActiveIndex=function(){n.$modelValue&&u.$matches.length?u.$activeIndex=c.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return l.$getIndex(e)}):l.$getIndex(n.$modelValue):u.$activeIndex>=u.$matches.length&&(u.$activeIndex=c.multiple?[]:0)},l.$isVisible=function(){return c.minLength&&n?u.$matches.length&&n.$viewValue.length>=c.minLength:u.$matches.length},l.$isActive=function(e){return c.multiple?-1!==u.$activeIndex.indexOf(e):u.$activeIndex===e},l.$getIndex=function(e){var t=u.$matches.length,n=t;if(t){for(n=t;n--&&u.$matches[n].value!==e;);if(!(0>n))return n}},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),o){var t=angular.element(e.target);t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!c.multiple&&(13===e.keyCode||9===e.keyCode))return l.select(u.$activeIndex);38===e.keyCode&&u.$activeIndex>0?u.$activeIndex--:40===e.keyCode&&u.$activeIndex'),r.after(t)}var u=i(n.ngOptions),s=a(t,o,c),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,o).then(function(e){s.update(e),o.$render()})},!0),e.$watch(n.ngModel,function(){s.$updateActiveIndex()},!0),o.$render=function(){var e,a;c.multiple&&angular.isArray(o.$modelValue)?(e=o.$modelValue.map(function(e){return a=s.$getIndex(e),angular.isDefined(a)?s.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(c.maxLength||l.maxLength)?e.length+" "+(c.maxLengthHtml||l.maxLengthHtml):e.join(", ")):(a=s.$getIndex(o.$modelValue),e=angular.isDefined(a)?s.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||l.placeholder)+l.caretHtml)},e.$on("$destroy",function(){s.destroy(),c=null,s=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,sort:!0,caretHtml:' ',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,i){function l(t,n,a){var l={},c=angular.extend({},e,a);l=i(t,c);var r=l.$scope;r.$matches=[],r.$activeIndex=0,r.$isMultiple=c.multiple,r.$iconCheckmark=c.iconCheckmark,r.$activate=function(e){r.$$postDigest(function(){l.activate(e)})},r.$select=function(e){r.$$postDigest(function(){l.select(e)})},r.$isVisible=function(){return l.$isVisible()},r.$isActive=function(e){return l.$isActive(e)},l.update=function(e){r.$matches=e,l.$updateActiveIndex()},l.activate=function(e){return c.multiple?(r.$activeIndex.sort(),l.$isActive(e)?r.$activeIndex.splice(r.$activeIndex.indexOf(e),1):r.$activeIndex.push(e),c.sort&&r.$activeIndex.sort()):r.$activeIndex=e,r.$activeIndex},l.select=function(e){var t=r.$matches[e].value;r.$apply(function(){l.activate(e),c.multiple?n.$setViewValue(r.$activeIndex.map(function(e){return r.$matches[e].value})):(n.$setViewValue(t),l.hide())}),r.$emit("$select.select",t,e)},l.$updateActiveIndex=function(){n.$modelValue&&r.$matches.length?r.$activeIndex=c.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return l.$getIndex(e)}):l.$getIndex(n.$modelValue):r.$activeIndex>=r.$matches.length&&(r.$activeIndex=c.multiple?[]:0)},l.$isVisible=function(){return c.minLength&&n?r.$matches.length&&n.$viewValue.length>=c.minLength:r.$matches.length},l.$isActive=function(e){return c.multiple?-1!==r.$activeIndex.indexOf(e):r.$activeIndex===e},l.$getIndex=function(e){var t=r.$matches.length,n=t;if(t){for(n=t;n--&&r.$matches[n].value!==e;);if(!(0>n))return n}},l.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),o){var t=angular.element(e.target);t.triggerHandler("click")}},l.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!c.multiple&&(13===e.keyCode||9===e.keyCode))return l.select(r.$activeIndex);38===e.keyCode&&r.$activeIndex>0?r.$activeIndex--:40===e.keyCode&&r.$activeIndex'),r.after(t)}var u=i(n.ngOptions),s=a(t,o,c),$=u.$match[7].replace(/\|.+/,"").trim();e.$watch($,function(){u.valuesFn(e,o).then(function(e){s.update(e),o.$render()})},!0),e.$watch(n.ngModel,function(){s.$updateActiveIndex(),o.$render()},!0),o.$render=function(){var e,a;c.multiple&&angular.isArray(o.$modelValue)?(e=o.$modelValue.map(function(e){return a=s.$getIndex(e),angular.isDefined(a)?s.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(c.maxLength||l.maxLength)?e.length+" "+(c.maxLengthHtml||l.maxLengthHtml):e.join(", ")):(a=s.$getIndex(o.$modelValue),e=angular.isDefined(a)?s.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||l.placeholder)+l.caretHtml)},e.$on("$destroy",function(){s.destroy(),c=null,s=null})}}}]); \ No newline at end of file diff --git a/dist/modules/select.min.js.map b/dist/modules/select.min.js.map deleted file mode 100644 index 2106cf87c..000000000 --- a/dist/modules/select.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"select.min.js.map","sources":["select.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","multiple","sort","caretHtml","placeholder","maxLength","maxLengthHtml","$get","$window","$document","$rootScope","$tooltip","SelectFactory","element","controller","config","$select","options","extend","parentScope","scope","$scope","$matches","$activeIndex","$isMultiple","$activate","index","$$postDigest","activate","select","$isVisible","$isActive","update","matches","$updateActiveIndex","splice","indexOf","push","value","$setViewValue","map","$render","$digest","hide","$emit","$modelValue","length","isArray","$getIndex","minLength","$viewValue","l","i","$onMouseDown","evt","preventDefault","stopPropagation","isTouch","targetEl","target","triggerHandler","$onKeyDown","test","keyCode","isUndefined","_show","show","$element","addClass","setTimeout","on","_hide","off","document","body","directive","$parse","$q","$parseOptions","restrict","require","link","attr","forEach","key","isDefined","nodeName","toLowerCase","inputEl","css","after","parsedOptions","ngOptions","watchedOptions","$match","replace","trim","$watch","valuesFn","then","values","ngModel","selected","label","filter","join","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,yBACb,yBACA,wCACCC,SAAS,UAAW,WACrB,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,SACbC,UAAW,cACXC,SAAU,yBACVC,QAAS,QACTC,WAAW,EACXC,UAAU,EACVC,MAAM,EACNC,MAAO,EACPC,UAAU,EACVC,MAAM,EACNC,UAAW,oCACXC,YAAa,gCACbC,UAAW,EACXC,cAAe,WAEnBf,MAAKgB,MACH,UACA,YACA,aACA,WACA,SAAUC,EAASC,EAAWC,EAAYC,GAGxC,QAASC,GAAcC,EAASC,EAAYC,GAC1C,GAAIC,MAEAC,EAAU9B,QAAQ+B,UAAW5B,EAAUyB,EAC3CC,GAAUL,EAASE,EAASI,EAC5B,IAAIE,GAAcJ,EAAOK,MACrBA,EAAQJ,EAAQK,MACpBD,GAAME,YACNF,EAAMG,aAAe,EACrBH,EAAMI,YAAcP,EAAQhB,SAC5BmB,EAAMK,UAAY,SAAUC,GAC1BN,EAAMO,aAAa,WACjBX,EAAQY,SAASF,MAGrBN,EAAMJ,QAAU,SAAUU,GACxBN,EAAMO,aAAa,WACjBX,EAAQa,OAAOH,MAGnBN,EAAMU,WAAa,WACjB,MAAOd,GAAQc,cAEjBV,EAAMW,UAAY,SAAUL,GAC1B,MAAOV,GAAQe,UAAUL,IAG3BV,EAAQgB,OAAS,SAAUC,GACzBb,EAAME,SAAWW,EACjBjB,EAAQkB,sBAEVlB,EAAQY,SAAW,SAAUF,GAS3B,MARIT,GAAQhB,UACVmB,EAAMG,aAAarB,OACnBc,EAAQe,UAAUL,GAASN,EAAMG,aAAaY,OAAOf,EAAMG,aAAaa,QAAQV,GAAQ,GAAKN,EAAMG,aAAac,KAAKX,GACjHT,EAAQf,MACVkB,EAAMG,aAAarB,QAErBkB,EAAMG,aAAeG,EAEhBN,EAAMG,cAEfP,EAAQa,OAAS,SAAU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/dist/modules/select.tpl.js b/dist/modules/select.tpl.js index 27a3a5dc5..0b076317c 100644 --- a/dist/modules/select.tpl.js +++ b/dist/modules/select.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,6 @@ angular.module('mgcrea.ngStrap.select').run([ '$templateCache', function ($templateCache) { - $templateCache.put('select/select.tpl.html', ''); + $templateCache.put('select/select.tpl.html', ''); } ]); \ No newline at end of file diff --git a/dist/modules/select.tpl.min.js b/dist/modules/select.tpl.min.js index 5788ed61b..4088ee9bd 100644 --- a/dist/modules/select.tpl.min.js +++ b/dist/modules/select.tpl.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(e){e.put("select/select.tpl.html",'')}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(e){e.put("select/select.tpl.html",'')}]); \ No newline at end of file diff --git a/dist/modules/tab.js b/dist/modules/tab.js index e67e18226..7c643352c 100644 --- a/dist/modules/tab.js +++ b/dist/modules/tab.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/tab.min.js b/dist/modules/tab.min.js index e2e3daceb..892f278c7 100644 --- a/dist/modules/tab.min.js +++ b/dist/modules/tab.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/tab.min.js.map b/dist/modules/tab.min.js.map deleted file mode 100644 index 49d7888d7..000000000 --- a/dist/modules/tab.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"tab.min.js.map","sources":["tab.min.js"],"names":["angular","module","run","$templateCache","put","provider","defaults","this","animation","template","$get","directive","$window","$animate","$tab","restrict","scope","require","templateUrl","element","attr","link","controller","options","forEach","key","isDefined","bsTabs","$watch","newValue","panes","addClass","active","activePane","setActive","index","$setViewValue","$render","$modelValue"],"mappings":"AAOA,YACAA,SAAQC,OAAO,yBAA0BC,KACvC,iBACA,SAAUC,GACRA,EAAeC,IAAI,QAAS,uBAE7BC,SAAS,OAAQ,WAClB,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,SAAU,mBAEdF,MAAKG,KAAO,WACV,OAASJ,SAAUA,MAEpBK,UAAU,UACX,UACA,WACA,OACA,SAAUC,EAASC,EAAUC,GAC3B,GAAIR,GAAWQ,EAAKR,QACpB,QACES,SAAU,MACVC,OAAO,EACPC,QAAS,WACTC,YAAa,SAAUC,EAASC,GAC9B,MAAOA,GAAKX,UAAYH,EAASG,UAEnCY,KAAM,SAAkBL,EAAOG,EAASC,EAAME,GAE5C,GAAIC,GAAUjB,CACdN,SAAQwB,SAAS,aAAc,SAAUC,GACnCzB,QAAQ0B,UAAUN,EAAKK,MACzBF,EAAQE,GAAOL,EAAKK,MAGxBL,EAAKO,QAAUX,EAAMY,OAAOR,EAAKO,OAAQ,SAAUE,GACjDb,EAAMc,MAAQD,IACb,GAEHV,EAAQY,SAAS,QAEbR,EAAQf,WACVW,EAAQY,SAASR,EAAQf,WAE3BQ,EAAMgB,OAAShB,EAAMiB,WAAa,EAElCjB,EAAMkB,UAAY,SAAUC,GAC1BnB,EAAMgB,OAASG,EACXb,GACFA,EAAWc,cAAcD,IAIzBb,IACFA,EAAWe,QAAU,WACnBrB,EAAMgB,OAAkC,EAAzBV,EAAWgB"} \ No newline at end of file diff --git a/dist/modules/tab.tpl.js b/dist/modules/tab.tpl.js index efa84d799..99e7c8545 100644 --- a/dist/modules/tab.tpl.js +++ b/dist/modules/tab.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/tab.tpl.min.js b/dist/modules/tab.tpl.min.js index 3315fd31b..2ba791349 100644 --- a/dist/modules/tab.tpl.min.js +++ b/dist/modules/tab.tpl.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/timepicker.js b/dist/modules/timepicker.js index e71280d65..5f57f50c8 100644 --- a/dist/modules/timepicker.js +++ b/dist/modules/timepicker.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -23,12 +23,15 @@ angular.module('mgcrea.ngStrap.timepicker', [ useNative: true, timeType: 'date', timeFormat: 'shortTime', + modelTimeFormat: null, autoclose: false, minTime: -Infinity, maxTime: +Infinity, length: 5, hourStep: 1, - minuteStep: 5 + minuteStep: 5, + iconUp: 'glyphicon glyphicon-chevron-up', + iconDown: 'glyphicon glyphicon-chevron-down' }; this.$get = [ '$window', @@ -60,7 +63,9 @@ angular.module('mgcrea.ngStrap.timepicker', [ millisecond: startDate.getMilliseconds() }; var format = $locale.DATETIME_FORMATS[options.timeFormat] || options.timeFormat; - var formats = /(h+)[:]?(m+)[ ]?(a?)/i.exec(format).slice(1); + var formats = /(h+)([:\.])?(m+)[ ]?(a?)/i.exec(format).slice(1); + scope.$iconUp = options.iconUp; + scope.$iconDown = options.iconDown; // Scope methods scope.$select = function (date, index) { $timepicker.select(date, index); @@ -128,7 +133,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ minute = new Date(1970, 0, 1, 0, viewDate.minute - (midIndex - i) * options.minuteStep); minutes.push({ date: minute, - label: dateFilter(minute, formats[1]), + label: dateFilter(minute, formats[2]), selected: $timepicker.$date && $timepicker.$isSelected(minute, 1), disabled: $timepicker.$isDisabled(minute, 1) }); @@ -141,8 +146,9 @@ angular.module('mgcrea.ngStrap.timepicker', [ ]); } scope.rows = rows; - scope.showAM = !!formats[2]; + scope.showAM = !!formats[3]; scope.isAM = ($timepicker.$date || hours[midIndex].date).getHours() < 12; + scope.timeSeparator = formats[1]; $timepicker.$isBuilt = true; }; $timepicker.$isSelected = function (date, index) { @@ -201,7 +207,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ var hours = newDate.getHours(), hoursLength = dateFilter(newDate, 'h').length; var minutes = newDate.getMinutes(), minutesLength = dateFilter(newDate, 'mm').length; var lateralMove = /(37|39)/.test(evt.keyCode); - var count = 2 + !!formats[2] * 1; + var count = 2 + !!formats[3] * 1; // Navigate indexes (left, right) if (lateralMove) { if (evt.keyCode === 37) @@ -341,6 +347,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ 'autoclose', 'timeType', 'timeFormat', + 'modelTimeFormat', 'useNative', 'hourStep', 'minuteStep', @@ -400,7 +407,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ controller.$dateValue = parsedTime; } if (options.timeType === 'string') { - return dateFilter(viewValue, options.timeFormat); + return dateFilter(parsedTime, options.modelTimeFormat || options.timeFormat); } else if (options.timeType === 'number') { return controller.$dateValue.getTime(); } else if (options.timeType === 'iso') { @@ -418,7 +425,7 @@ angular.module('mgcrea.ngStrap.timepicker', [ } else if (angular.isDate(modelValue)) { date = modelValue; } else if (options.timeType === 'string') { - date = dateParser.parse(modelValue); + date = dateParser.parse(modelValue, null, options.modelTimeFormat); } else { date = new Date(modelValue); } diff --git a/dist/modules/timepicker.min.js b/dist/modules/timepicker.min.js index bb5ed079a..a29fa315c 100644 --- a/dist/modules/timepicker.min.js +++ b/dist/modules/timepicker.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,a,n,i,o,r,u){function s(t,a,n){function i(e,a){if(t[0].createTextRange){var n=t[0].createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",a),n.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,a):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=a)}function s(){t[0].focus()}var m=u(t,angular.extend({},e,n)),c=n.scope,g=m.$options,$=m.$scope,p=0,f=a.$dateValue||new Date,h={hour:f.getHours(),meridian:f.getHours()<12,minute:f.getMinutes(),second:f.getSeconds(),millisecond:f.getMilliseconds()},v=o.DATETIME_FORMATS[g.timeFormat]||g.timeFormat,w=/(h+)[:]?(m+)[ ]?(a?)/i.exec(v).slice(1);$.$select=function(e,t){m.select(e,t)},$.$moveIndex=function(e,t){m.$moveIndex(e,t)},$.$switchMeridian=function(e){m.switchMeridian(e)},m.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(m.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),m.$build()):m.$isBuilt||m.$build()},m.select=function(e,t,n){(!a.$dateValue||isNaN(a.$dateValue.getTime()))&&(a.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?a.$dateValue.setHours(e.getHours()):1===t&&a.$dateValue.setMinutes(e.getMinutes()),a.$setViewValue(a.$dateValue),a.$render(),g.autoclose&&!n&&m.hide(!0)},m.switchMeridian=function(e){var t=(e||a.$dateValue).getHours();a.$dateValue.setHours(12>t?t+12:t-12),a.$setViewValue(a.$dateValue),a.$render()},m.$build=function(){var e,t,a=$.midIndex=parseInt(g.length/2,10),n=[];for(e=0;e1*g.maxTime},m.$moveIndex=function(e,t){var a;0===t?(a=new Date(1970,0,1,h.hour+e*g.length,h.minute),angular.extend(h,{hour:a.getHours()})):1===t&&(a=new Date(1970,0,1,h.hour,h.minute+e*g.length*g.minuteStep),angular.extend(h,{minute:a.getMinutes()})),m.$build()},m.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),l){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},m.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return m.hide(!0);var t=new Date(m.$date),a=t.getHours(),n=r(t,"h").length,o=t.getMinutes(),u=r(t,"mm").length,s=/(37|39)/.test(e.keyCode),l=2+1*!!w[2];s&&(37===e.keyCode?p=1>p?l-1:p-1:39===e.keyCode&&(p=l-1>p?p+1:0));var d=[0,n];0===p?(38===e.keyCode?t.setHours(a-parseInt(g.hourStep,10)):40===e.keyCode&&t.setHours(a+parseInt(g.hourStep,10)),d=[0,n]):1===p?(38===e.keyCode?t.setMinutes(o-parseInt(g.minuteStep,10)):40===e.keyCode&&t.setMinutes(o+parseInt(g.minuteStep,10)),d=[n+1,n+1+u]):2===p&&(s||m.switchMeridian(),d=[n+1+u+1,n+1+u+3]),m.select(t,p,!0),i(d[0],d[1]),c.$digest()}};var y=m.init;m.init=function(){return d&&g.useNative?(t.prop("type","time"),void t.css("-webkit-appearance","textfield")):(l&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",s)),void y())};var T=m.destroy;m.destroy=function(){d&&g.useNative&&t.off("click",s),T()};var D=m.show;m.show=function(){D(),setTimeout(function(){m.$element.on(l?"touchstart":"mousedown",m.$onMouseDown),g.keyboard&&t.on("keydown",m.$onKeyDown)})};var S=m.hide;return m.hide=function(e){m.$element.off(l?"touchstart":"mousedown",m.$onMouseDown),g.keyboard&&t.off("keydown",m.$onKeyDown),S(e)},m}var l=(angular.element(t.document.body),"createTouch"in t.document),d=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=o.id),s.defaults=e,s}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,a,n,i,o,r){{var u=o.defaults,s=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,a,n){var l={scope:e,controller:n};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","useNative","hourStep","minuteStep","length"],function(e){angular.isDefined(a[e])&&(l[e]=a[e])}),s&&(l.useNative||u.useNative)&&(l.timeFormat="HH:mm");var d=o(t,n,l);l=d.$options;var m=r({format:l.timeFormat,lang:l.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(a[e])&&a.$observe(e,function(t){d.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):m.parse(t,new Date(1970,0,1,0)),!isNaN(d.$options[e])&&d.$build()})}),e.$watch(a.ngModel,function(){d.update(n.$dateValue)},!0),n.$parsers.unshift(function(e){if(!e)return void n.$setValidity("date",!0);var t=m.parse(e,n.$dateValue);if(!t||isNaN(t.getTime()))n.$setValidity("date",!1);else{var a=t.getTime()>=l.minTime&&t.getTime()<=l.maxTime;n.$setValidity("date",a),a&&(n.$dateValue=t)}return"string"===l.timeType?i(e,l.timeFormat):"number"===l.timeType?n.$dateValue.getTime():"iso"===l.timeType?n.$dateValue.toISOString():new Date(n.$dateValue)}),n.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===l.timeType?m.parse(e):new Date(e),n.$dateValue=t,n.$dateValue}),n.$render=function(){t.val(!n.$dateValue||isNaN(n.$dateValue.getTime())?"":i(n.$dateValue,l.timeFormat))},e.$on("$destroy",function(){d.destroy(),l=null,d=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",modelTimeFormat:null,autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5,iconUp:"glyphicon glyphicon-chevron-up",iconDown:"glyphicon glyphicon-chevron-down"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,n,a,i,o,r,u){function s(t,n,a){function i(e,n){if(t[0].createTextRange){var a=t[0].createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",n),a.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function s(){t[0].focus()}var m=u(t,angular.extend({},e,a)),c=a.scope,g=m.$options,$=m.$scope,p=0,f=n.$dateValue||new Date,h={hour:f.getHours(),meridian:f.getHours()<12,minute:f.getMinutes(),second:f.getSeconds(),millisecond:f.getMilliseconds()},v=o.DATETIME_FORMATS[g.timeFormat]||g.timeFormat,w=/(h+)([:\.])?(m+)[ ]?(a?)/i.exec(v).slice(1);$.$iconUp=g.iconUp,$.$iconDown=g.iconDown,$.$select=function(e,t){m.select(e,t)},$.$moveIndex=function(e,t){m.$moveIndex(e,t)},$.$switchMeridian=function(e){m.switchMeridian(e)},m.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(m.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),m.$build()):m.$isBuilt||m.$build()},m.select=function(e,t,a){(!n.$dateValue||isNaN(n.$dateValue.getTime()))&&(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),g.autoclose&&!a&&m.hide(!0)},m.switchMeridian=function(e){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(12>t?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()},m.$build=function(){var e,t,n=$.midIndex=parseInt(g.length/2,10),a=[];for(e=0;e1*g.maxTime},m.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,h.hour+e*g.length,h.minute),angular.extend(h,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,h.hour,h.minute+e*g.length*g.minuteStep),angular.extend(h,{minute:n.getMinutes()})),m.$build()},m.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),l){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},m.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return m.hide(!0);var t=new Date(m.$date),n=t.getHours(),a=r(t,"h").length,o=t.getMinutes(),u=r(t,"mm").length,s=/(37|39)/.test(e.keyCode),l=2+1*!!w[3];s&&(37===e.keyCode?p=1>p?l-1:p-1:39===e.keyCode&&(p=l-1>p?p+1:0));var d=[0,a];0===p?(38===e.keyCode?t.setHours(n-parseInt(g.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(g.hourStep,10)),d=[0,a]):1===p?(38===e.keyCode?t.setMinutes(o-parseInt(g.minuteStep,10)):40===e.keyCode&&t.setMinutes(o+parseInt(g.minuteStep,10)),d=[a+1,a+1+u]):2===p&&(s||m.switchMeridian(),d=[a+1+u+1,a+1+u+3]),m.select(t,p,!0),i(d[0],d[1]),c.$digest()}};var y=m.init;m.init=function(){return d&&g.useNative?(t.prop("type","time"),void t.css("-webkit-appearance","textfield")):(l&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",s)),void y())};var T=m.destroy;m.destroy=function(){d&&g.useNative&&t.off("click",s),T()};var D=m.show;m.show=function(){D(),setTimeout(function(){m.$element.on(l?"touchstart":"mousedown",m.$onMouseDown),g.keyboard&&t.on("keydown",m.$onKeyDown)})};var S=m.hide;return m.hide=function(e){m.$element.off(l?"touchstart":"mousedown",m.$onMouseDown),g.keyboard&&t.off("keydown",m.$onKeyDown),S(e)},m}var l=(angular.element(t.document.body),"createTouch"in t.document),d=/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent);return e.lang||(e.lang=o.id),s.defaults=e,s}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,a,i,o,r){{var u=o.defaults,s=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var l={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","modelTimeFormat","useNative","hourStep","minuteStep","length"],function(e){angular.isDefined(n[e])&&(l[e]=n[e])}),s&&(l.useNative||u.useNative)&&(l.timeFormat="HH:mm");var d=o(t,a,l);l=d.$options;var m=r({format:l.timeFormat,lang:l.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){d.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):m.parse(t,new Date(1970,0,1,0)),!isNaN(d.$options[e])&&d.$build()})}),e.$watch(n.ngModel,function(){d.update(a.$dateValue)},!0),a.$parsers.unshift(function(e){if(!e)return void a.$setValidity("date",!0);var t=m.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))a.$setValidity("date",!1);else{var n=t.getTime()>=l.minTime&&t.getTime()<=l.maxTime;a.$setValidity("date",n),n&&(a.$dateValue=t)}return"string"===l.timeType?i(t,l.modelTimeFormat||l.timeFormat):"number"===l.timeType?a.$dateValue.getTime():"iso"===l.timeType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===l.timeType?m.parse(e,null,l.modelTimeFormat):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":i(a.$dateValue,l.timeFormat))},e.$on("$destroy",function(){d.destroy(),l=null,d=null})}}}]); \ No newline at end of file diff --git a/dist/modules/timepicker.min.js.map b/dist/modules/timepicker.min.js.map deleted file mode 100644 index 56a926dc9..000000000 --- a/dist/modules/timepicker.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"timepicker.min.js.map","sources":["timepicker.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","useNative","timeType","timeFormat","autoclose","minTime","Infinity","maxTime","length","hourStep","minuteStep","$get","$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip","timepickerFactory","element","controller","config","createSelection","start","end","createTextRange","selRange","collapse","moveStart","moveEnd","select","setSelectionRange","isUndefined","selectionStart","selectionEnd","focusElement","focus","$timepicker","extend","parentScope","scope","options","$options","$scope","selectedIndex","startDate","$dateValue","Date","viewDate","hour","getHours","meridian","minute","getMinutes","second","getSeconds","millisecond","getMilliseconds","format","DATETIME_FORMATS","formats","exec","slice","$select","date","index","$moveIndex","value","$switchMeridian","switchMeridian","update","isDate","isNaN","getTime","$date","$build","$isBuilt","keep","setHours","setMinutes","$setViewValue","$render","hide","hours","i","midIndex","parseInt","push","label","selected","$isSelected","disabled","$isDisabled","minutes","rows","showAM","isAM","selectedTime","targetDate","$onMouseDown","evt","target","nodeName","toLowerCase","preventDefault","stopPropagation","isTouch","targetEl","parent","triggerHandler","$onKeyDown","test","keyCode","shiftKey","altKey","newDate","hoursLength","minutesLength","lateralMove","count","selectRange","$digest","_init","init","isNative","prop","css","attr","on","_destroy","destroy","off","_show","show","setTimeout","$element","_hide","blur","document","body","navigator","userAgent","lang","id","directive","$parse","$q","$dateParser","requestAnimationFrame","restrict","require","link","forEach","key","isDefined","timepicker","dateParser","$observe","newValue","setFullYear","isString","match","substr","parse","$watch","ngModel","$parsers","unshift","viewValue","$setValidity","parsedTime","isValid","toISOString","$formatters","modelValue","NaN","val","$on"],"mappings":"AAOA,YACAA,SAAQC,OAAO,6BACb,o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QAAU,WAEnB9D,EAAQ6J,KAAK5J,EAAW0B,YAAc0B,MAAMpD,EAAW0B,WAAW2B,WAAa,GAAKzD,EAAWI,EAAW0B,WAAYL,EAAQvC,cAGhIsC,EAAMyI,IAAI,WAAY,WACpBtB,EAAWzB,UACXzF,EAAU,KACVkH,EAAa"} \ No newline at end of file diff --git a/dist/modules/timepicker.tpl.js b/dist/modules/timepicker.tpl.js index 8930e5a00..f04b1b322 100644 --- a/dist/modules/timepicker.tpl.js +++ b/dist/modules/timepicker.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,6 @@ angular.module('mgcrea.ngStrap.timepicker').run([ '$templateCache', function ($templateCache) { - $templateCache.put('timepicker/timepicker.tpl.html', ''); + $templateCache.put('timepicker/timepicker.tpl.html', ''); } ]); \ No newline at end of file diff --git a/dist/modules/timepicker.tpl.min.js b/dist/modules/timepicker.tpl.min.js index 25aa8135c..0980b68d9 100644 --- a/dist/modules/timepicker.tpl.min.js +++ b/dist/modules/timepicker.tpl.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'')}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'')}]); \ No newline at end of file diff --git a/dist/modules/tooltip.js b/dist/modules/tooltip.js index f8b9f79a1..2fbdc244b 100644 --- a/dist/modules/tooltip.js +++ b/dist/modules/tooltip.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -12,6 +12,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). prefixClass: 'tooltip', prefixEvent: 'tooltip', container: false, + target: false, placement: 'top', template: 'tooltip/tooltip.tpl.html', contentTemplate: false, @@ -31,10 +32,9 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). '$templateCache', '$http', '$animate', - '$timeout', 'dimensions', '$$rAF', - function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, $timeout, dimensions, $$rAF) { + function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, dimensions, $$rAF) { var trim = String.prototype.trim; var isTouch = 'createTouch' in $window.document; var htmlReplaceRegExp = /ng-bind="/gi; @@ -125,6 +125,10 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). nodeName === 'button' && trigger !== 'hover' && element.on(isTouch ? 'touchstart' : 'mousedown', $tooltip.$onFocusElementMouseDown); } }); + // Options: target + if (options.target) { + options.target = angular.isElement(options.target) ? options.target : findElement(options.target)[0]; + } // Options: show if (options.show) { scope.$$postDigest(function () { @@ -150,6 +154,8 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). tipElement.remove(); tipElement = null; } + // Cancel pending callbacks + clearTimeout(timeout); // Destroy scope scope.$destroy(); }; @@ -176,8 +182,8 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). }); // Set the initial positioning. tipElement.css({ - top: '0px', - left: '0px', + top: '-9999px', + left: '-9999px', display: 'block' }).addClass(options.placement); // Options: animation @@ -190,7 +196,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). scope.$emit(options.prefixEvent + '.show', $tooltip); }); $tooltip.$isShown = scope.$isShown = true; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); $$rAF($tooltip.$applyPlacement); // var a = bodyEl.offsetWidth + 1; ? // Bind events @@ -223,7 +229,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). scope.$emit(options.prefixEvent + '.hide', $tooltip); }); $tooltip.$isShown = scope.$isShown = false; - scope.$$phase || scope.$root.$$phase || scope.$digest(); + scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest(); // Unbind events if (options.keyboard && tipElement !== null) { tipElement.off('keyup', $tooltip.$onKeyUp); @@ -269,9 +275,9 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). // Private methods function getPosition() { if (options.container === 'body') { - return dimensions.offset(element[0]); + return dimensions.offset(options.target || element[0]); } else { - return dimensions.position(element[0]); + return dimensions.position(options.target || element[0]); } } function getCalculatedOffset(placement, position, actualWidth, actualHeight) { @@ -362,6 +368,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']). 'contentTemplate', 'placement', 'container', + 'target', 'delay', 'trigger', 'keyboard', diff --git a/dist/modules/tooltip.min.js b/dist/modules/tooltip.min.js index bd138b907..b25f71c9e 100644 --- a/dist/modules/tooltip.min.js +++ b/dist/modules/tooltip.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","dimensions","$$rAF",function(t,o,n,i,a,r,l,s,u,c){function p(t,i){function a(){return"body"===g.container?u.offset(t[0]):u.position(t[0])}function r(e,t,o,n){var i,a=e.split("-");switch(a[0]){case"right":i={top:t.top+t.height/2-n/2,left:t.left+t.width};break;case"bottom":i={top:t.top+t.height,left:t.left+t.width/2-o/2};break;case"left":i={top:t.top+t.height/2-n/2,left:t.left-o};break;default:i={top:t.top-n,left:t.left+t.width/2-o/2}}if(!a[1])return i;if("top"===a[0]||"bottom"===a[0])switch(a[1]){case"left":i.left=t.left;break;case"right":i.left=t.left+t.width-o}else if("left"===a[0]||"right"===a[0])switch(a[1]){case"top":i.top=t.top-n;break;case"bottom":i.top=t.top+t.height}return i}var s={},p=t[0].nodeName.toLowerCase(),g=s.$options=angular.extend({},e,i);s.$promise=h(g.template);var v=s.$scope=g.scope&&g.scope.$new()||o.$new();g.delay&&angular.isString(g.delay)&&(g.delay=parseFloat(g.delay)),g.title&&(s.$scope.title=g.title),v.$hide=function(){v.$$postDigest(function(){s.hide()})},v.$show=function(){v.$$postDigest(function(){s.show()})},v.$toggle=function(){v.$$postDigest(function(){s.toggle()})},s.$isShown=v.$isShown=!1;var y,w;g.contentTemplate&&(s.$promise=s.$promise.then(function(e){var t=angular.element(e);return h(g.contentTemplate).then(function(e){var o=f('[ng-bind="content"]',t[0]);return o.length||(o=f('[ng-bind="title"]',t[0])),o.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,k,S,x;return s.$promise.then(function(e){angular.isObject(e)&&(e=e.data),g.html&&(e=e.replace(m,'ng-bind-html="')),e=d.apply(e),S=e,b=n(e),s.init()}),s.init=function(){g.delay&&angular.isNumber(g.delay)&&(g.delay={show:g.delay,hide:g.delay}),"self"===g.container?x=t:g.container&&(x=f(g.container));var e=g.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",s.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",s.enter),t.on("hover"===e?"mouseleave":"blur",s.leave),"button"===p&&"hover"!==e&&t.on($?"touchstart":"mousedown",s.$onFocusElementMouseDown))}),g.show&&v.$$postDigest(function(){"focus"===g.trigger?t[0].focus():s.show()})},s.destroy=function(){for(var e=g.trigger.split(" "),o=e.length;o--;){var n=e[o];"click"===n?t.off("click",s.toggle):"manual"!==n&&(t.off("hover"===n?"mouseenter":"focus",s.enter),t.off("hover"===n?"mouseleave":"blur",s.leave),"button"===p&&"hover"!==n&&t.off($?"touchstart":"mousedown",s.$onFocusElementMouseDown))}k&&(k.remove(),k=null),v.$destroy()},s.enter=function(){return clearTimeout(y),w="in",g.delay&&g.delay.show?void(y=setTimeout(function(){"in"===w&&s.show()},g.delay.show)):s.show()},s.show=function(){v.$emit(g.prefixEvent+".show.before",s);var e=g.container?x:null,o=g.container?null:t;k&&k.remove(),k=s.$element=b(v,function(){}),k.css({top:"0px",left:"0px",display:"block"}).addClass(g.placement),g.animation&&k.addClass(g.animation),g.type&&k.addClass(g.prefixClass+"-"+g.type),l.enter(k,e,o,function(){v.$emit(g.prefixEvent+".show",s)}),s.$isShown=v.$isShown=!0,v.$$phase||v.$root.$$phase||v.$digest(),c(s.$applyPlacement),g.keyboard&&("focus"!==g.trigger?(s.focus(),k.on("keyup",s.$onKeyUp)):t.on("keyup",s.$onFocusKeyUp))},s.leave=function(){return clearTimeout(y),w="out",g.delay&&g.delay.hide?void(y=setTimeout(function(){"out"===w&&s.hide()},g.delay.hide)):s.hide()},s.hide=function(e){return s.$isShown?(v.$emit(g.prefixEvent+".hide.before",s),l.leave(k,function(){v.$emit(g.prefixEvent+".hide",s)}),s.$isShown=v.$isShown=!1,v.$$phase||v.$root.$$phase||v.$digest(),g.keyboard&&null!==k&&k.off("keyup",s.$onKeyUp),e&&"focus"===g.trigger?t[0].blur():void 0):void 0},s.toggle=function(){s.$isShown?s.leave():s.enter()},s.focus=function(){k[0].focus()},s.$applyPlacement=function(){if(k){var e=a(),t=k.prop("offsetWidth"),o=k.prop("offsetHeight"),n=r(g.placement,e,t,o);n.top+="px",n.left+="px",k.css(n)}},s.$onKeyUp=function(e){27===e.which&&s.hide()},s.$onFocusKeyUp=function(e){27===e.which&&t[0].blur()},s.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),s.$isShown?t[0].blur():t[0].focus()},s}function f(e,t){return angular.element((t||document).querySelectorAll(e))}function h(e){return i.when(a.get(e)||r.get(e)).then(function(t){return angular.isObject(t)?(a.put(e,t.data),t.data):t})}var d=String.prototype.trim,$="createTouch"in t.document,m=/ng-bind="/gi;return p}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,o,n,i){return{restrict:"EAC",scope:!0,link:function(e,t,a){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","delay","trigger","keyboard","html","animation","type"],function(e){angular.isDefined(a[e])&&(r[e]=a[e])}),angular.forEach(["title"],function(t){a[t]&&a.$observe(t,function(n,a){e[t]=o.trustAsHtml(n),angular.isDefined(a)&&i(function(){l&&l.$applyPlacement()})})}),a.bsTooltip&&e.$watch(a.bsTooltip,function(t,o){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(o)&&i(function(){l&&l.$applyPlacement()})},!0);var l=n(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,target:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","dimensions","$$rAF",function(t,o,n,i,a,r,l,s,u){function c(t,i){function a(){return"body"===m.container?s.offset(m.target||t[0]):s.position(m.target||t[0])}function r(e,t,o,n){var i,a=e.split("-");switch(a[0]){case"right":i={top:t.top+t.height/2-n/2,left:t.left+t.width};break;case"bottom":i={top:t.top+t.height,left:t.left+t.width/2-o/2};break;case"left":i={top:t.top+t.height/2-n/2,left:t.left-o};break;default:i={top:t.top-n,left:t.left+t.width/2-o/2}}if(!a[1])return i;if("top"===a[0]||"bottom"===a[0])switch(a[1]){case"left":i.left=t.left;break;case"right":i.left=t.left+t.width-o}else if("left"===a[0]||"right"===a[0])switch(a[1]){case"top":i.top=t.top-n;break;case"bottom":i.top=t.top+t.height}return i}var c={},$=t[0].nodeName.toLowerCase(),m=c.$options=angular.extend({},e,i);c.$promise=f(m.template);var v=c.$scope=m.scope&&m.scope.$new()||o.$new();m.delay&&angular.isString(m.delay)&&(m.delay=parseFloat(m.delay)),m.title&&(c.$scope.title=m.title),v.$hide=function(){v.$$postDigest(function(){c.hide()})},v.$show=function(){v.$$postDigest(function(){c.show()})},v.$toggle=function(){v.$$postDigest(function(){c.toggle()})},c.$isShown=v.$isShown=!1;var y,w;m.contentTemplate&&(c.$promise=c.$promise.then(function(e){var t=angular.element(e);return f(m.contentTemplate).then(function(e){var o=p('[ng-bind="content"]',t[0]);return o.length||(o=p('[ng-bind="title"]',t[0])),o.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,k,S,T;return c.$promise.then(function(e){angular.isObject(e)&&(e=e.data),m.html&&(e=e.replace(g,'ng-bind-html="')),e=h.apply(e),S=e,b=n(e),c.init()}),c.init=function(){m.delay&&angular.isNumber(m.delay)&&(m.delay={show:m.delay,hide:m.delay}),"self"===m.container?T=t:m.container&&(T=p(m.container));var e=m.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",c.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",c.enter),t.on("hover"===e?"mouseleave":"blur",c.leave),"button"===$&&"hover"!==e&&t.on(d?"touchstart":"mousedown",c.$onFocusElementMouseDown))}),m.target&&(m.target=angular.isElement(m.target)?m.target:p(m.target)[0]),m.show&&v.$$postDigest(function(){"focus"===m.trigger?t[0].focus():c.show()})},c.destroy=function(){for(var e=m.trigger.split(" "),o=e.length;o--;){var n=e[o];"click"===n?t.off("click",c.toggle):"manual"!==n&&(t.off("hover"===n?"mouseenter":"focus",c.enter),t.off("hover"===n?"mouseleave":"blur",c.leave),"button"===$&&"hover"!==n&&t.off(d?"touchstart":"mousedown",c.$onFocusElementMouseDown))}k&&(k.remove(),k=null),clearTimeout(y),v.$destroy()},c.enter=function(){return clearTimeout(y),w="in",m.delay&&m.delay.show?void(y=setTimeout(function(){"in"===w&&c.show()},m.delay.show)):c.show()},c.show=function(){v.$emit(m.prefixEvent+".show.before",c);var e=m.container?T:null,o=m.container?null:t;k&&k.remove(),k=c.$element=b(v,function(){}),k.css({top:"-9999px",left:"-9999px",display:"block"}).addClass(m.placement),m.animation&&k.addClass(m.animation),m.type&&k.addClass(m.prefixClass+"-"+m.type),l.enter(k,e,o,function(){v.$emit(m.prefixEvent+".show",c)}),c.$isShown=v.$isShown=!0,v.$$phase||v.$root&&v.$root.$$phase||v.$digest(),u(c.$applyPlacement),m.keyboard&&("focus"!==m.trigger?(c.focus(),k.on("keyup",c.$onKeyUp)):t.on("keyup",c.$onFocusKeyUp))},c.leave=function(){return clearTimeout(y),w="out",m.delay&&m.delay.hide?void(y=setTimeout(function(){"out"===w&&c.hide()},m.delay.hide)):c.hide()},c.hide=function(e){return c.$isShown?(v.$emit(m.prefixEvent+".hide.before",c),l.leave(k,function(){v.$emit(m.prefixEvent+".hide",c)}),c.$isShown=v.$isShown=!1,v.$$phase||v.$root&&v.$root.$$phase||v.$digest(),m.keyboard&&null!==k&&k.off("keyup",c.$onKeyUp),e&&"focus"===m.trigger?t[0].blur():void 0):void 0},c.toggle=function(){c.$isShown?c.leave():c.enter()},c.focus=function(){k[0].focus()},c.$applyPlacement=function(){if(k){var e=a(),t=k.prop("offsetWidth"),o=k.prop("offsetHeight"),n=r(m.placement,e,t,o);n.top+="px",n.left+="px",k.css(n)}},c.$onKeyUp=function(e){27===e.which&&c.hide()},c.$onFocusKeyUp=function(e){27===e.which&&t[0].blur()},c.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),c.$isShown?t[0].blur():t[0].focus()},c}function p(e,t){return angular.element((t||document).querySelectorAll(e))}function f(e){return i.when(a.get(e)||r.get(e)).then(function(t){return angular.isObject(t)?(a.put(e,t.data),t.data):t})}var h=String.prototype.trim,d="createTouch"in t.document,g=/ng-bind="/gi;return c}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,o,n,i){return{restrict:"EAC",scope:!0,link:function(e,t,a){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","type"],function(e){angular.isDefined(a[e])&&(r[e]=a[e])}),angular.forEach(["title"],function(t){a[t]&&a.$observe(t,function(n,a){e[t]=o.trustAsHtml(n),angular.isDefined(a)&&i(function(){l&&l.$applyPlacement()})})}),a.bsTooltip&&e.$watch(a.bsTooltip,function(t,o){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(o)&&i(function(){l&&l.$applyPlacement()})},!0);var l=n(t,r);e.$on("$destroy",function(){l.destroy(),r=null,l=null})}}}]); \ No newline at end of file diff --git a/dist/modules/tooltip.min.js.map b/dist/modules/tooltip.min.js.map deleted file mode 100644 index db2b62270..000000000 --- a/dist/modules/tooltip.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"tooltip.min.js.map","sources":["tooltip.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","prefixEvent","container","placement","template","contentTemplate","trigger","keyboard","html","show","title","type","delay","$get","$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","dimensions","$$rAF","TooltipFactory","element","config","getPosition","options","offset","position","getCalculatedOffset","actualWidth","actualHeight","split","top","height","left","width","$tooltip","nodeName","toLowerCase","$options","extend","$promise","fetchTemplate","scope","$scope","$new","isString","parseFloat","$hide","$$postDigest","hide","$show","$toggle","toggle","$isShown","timeout","hoverState","then","templateEl","contentEl","findElement","length","removeAttr","outerHTML","tipLinker","tipElement","tipTemplate","tipContainer","isObject","data","replace","htmlReplaceRegExp","trim","apply","init","isNumber","triggers","forEach","on","enter","leave","isTouch","$onFocusElementMouseDown","focus","destroy","i","off","remove","$destroy","clearTimeout","setTimeout","$emit","parent","after","$element","css","display","addClass","$$phase","$root","$digest","$applyPlacement","$onKeyUp","$onFocusKeyUp","blur","elementPosition","tipWidth","prop","tipHeight","tipPosition","evt","which","preventDefault","stopPropagation","query","document","querySelectorAll","when","get","res","put","String","prototype","directive","$location","$sce","restrict","link","attr","key","isDefined","$observe","newValue","oldValue","trustAsHtml","tooltip","bsTooltip","$watch","$on"],"mappings":"AAOA,YACAA,SAAQC,OAAO,0BAA2B,sCAAsCC,SAAS,WAAY,WACnG,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,UACbC,YAAa,UACbC,WAAW,EACXC,UAAW,MACXC,SAAU,2BACVC,iBAAiB,EACjBC,QAAS,cACTC,UAAU,EACVC,MAAM,EACNC,MAAM,EACNC,MAAO,GACPC,KAAM,GACNC,MAAO,EAEXd,MAAKe,MACH,UACA,aACA,WACA,KACA,iBACA,QACA,WACA,WACA,aACA,QACA,SAAUC,EAASC,EAAYC,EAAUC,EAAIC,EAAgBC,EAAOC,EAAUC,EAAUC,EAAYC,GAIlG,QAASC,GAAeC,EAASC,GAqO/B,QAASC,KACP,MAA0B,SAAtBC,EAAQ1B,UACHoB,EAAWO,OAAOJ,EAAQ,IAE1BH,EAAWQ,SAASL,EAAQ,IAGvC,QAASM,GAAoB5B,EAAW2B,EAAUE,EAAaC,GAC7D,GAAIJ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QAAQsF,SAAS,SAAU,SAAUoD,GACnCD,EAAKC,IAAQD,EAAKG,SAASF,EAAK,SAAUG,EAAUC,GAClD1F,EAAMsF,GAAOJ,EAAKS,YAAYF,GAC9B7I,QAAQ2I,UAAUG,IAAajH,EAAM,WACnCmH,GAAWA,EAAQlC,wBAKzB2B,EAAKQ,WAAa7F,EAAM8F,OAAOT,EAAKQ,UAAW,SAAUJ,EAAUC,GAC7D9I,QAAQ6E,SAASgE,GACnB7I,QAAQiD,OAAOG,EAAOyF,GAEtBzF,EAAMpC,MAAQ6H,EAEhB7I,QAAQ2I,UAAUG,IAAajH,EAAM,WACnCmH,GAAWA,EAAQlC,sBAEpB,EAEH,IAAIkC,GAAUnG,EAASd,EAASG,EAEhCkB,GAAM+F,IAAI,WAAY,WACpBH,EAAQnD,UACR3D,EAAU,KACV8G,EAAU"} \ No newline at end of file diff --git a/dist/modules/tooltip.tpl.js b/dist/modules/tooltip.tpl.js index 4bd78ca83..2c614897d 100644 --- a/dist/modules/tooltip.tpl.js +++ b/dist/modules/tooltip.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/tooltip.tpl.min.js b/dist/modules/tooltip.tpl.min.js index 8fa1cf671..5cfd0d574 100644 --- a/dist/modules/tooltip.tpl.min.js +++ b/dist/modules/tooltip.tpl.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/typeahead.js b/dist/modules/typeahead.js index bff5707ff..f8edc97c6 100644 --- a/dist/modules/typeahead.js +++ b/dist/modules/typeahead.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT @@ -68,8 +68,8 @@ angular.module('mgcrea.ngStrap.typeahead', [ $typeahead.select = function (index) { var value = scope.$matches[index].value; controller.$setViewValue(value); - scope.$resetMatches(); controller.$render(); + scope.$resetMatches(); if (parentScope) parentScope.$digest(); // Emit event diff --git a/dist/modules/typeahead.min.js b/dist/modules/typeahead.min.js index 91a8f7730..161586aaf 100644 --- a/dist/modules/typeahead.min.js +++ b/dist/modules/typeahead.min.js @@ -1,8 +1,8 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function i(t,n,i){var o={},r=angular.extend({},e,i);o=a(t,r);var l=i.scope,c=o.$scope;c.$resetMatches=function(){c.$matches=[],c.$activeIndex=0},c.$resetMatches(),c.$activate=function(e){c.$$postDigest(function(){o.activate(e)})},c.$select=function(e){c.$$postDigest(function(){o.select(e)})},c.$isVisible=function(){return o.$isVisible()},o.update=function(e){c.$matches=e,c.$activeIndex>=e.length&&(c.$activeIndex=0)},o.activate=function(e){c.$activeIndex=e},o.select=function(e){var t=c.$matches[e].value;n.$setViewValue(t),c.$resetMatches(),n.$render(),l&&l.$digest(),c.$emit("$typeahead.select",t,e)},o.$isVisible=function(){return r.minLength&&n?c.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!c.$matches.length},o.$getIndex=function(e){var t=c.$matches.length,n=t;if(t){for(n=t;n--&&c.$matches[n].value!==e;);if(!(0>n))return n}},o.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},o.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&c.$matches.length?o.select(c.$activeIndex):38===e.keyCode&&c.$activeIndex>0?c.$activeIndex--:40===e.keyCode&&c.$activeIndexs&&(e=e.slice(0,s)),(1!==e.length||e[0].value!==t)&&(d.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=d.$getIndex(r.$modelValue),n=angular.isDefined(e)?d.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){d.destroy(),l=null,d=null})}}}]); \ No newline at end of file +"use strict";angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function i(t,n,i){var o={},r=angular.extend({},e,i);o=a(t,r);var l=i.scope,c=o.$scope;c.$resetMatches=function(){c.$matches=[],c.$activeIndex=0},c.$resetMatches(),c.$activate=function(e){c.$$postDigest(function(){o.activate(e)})},c.$select=function(e){c.$$postDigest(function(){o.select(e)})},c.$isVisible=function(){return o.$isVisible()},o.update=function(e){c.$matches=e,c.$activeIndex>=e.length&&(c.$activeIndex=0)},o.activate=function(e){c.$activeIndex=e},o.select=function(e){var t=c.$matches[e].value;n.$setViewValue(t),n.$render(),c.$resetMatches(),l&&l.$digest(),c.$emit("$typeahead.select",t,e)},o.$isVisible=function(){return r.minLength&&n?c.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!c.$matches.length},o.$getIndex=function(e){var t=c.$matches.length,n=t;if(t){for(n=t;n--&&c.$matches[n].value!==e;);if(!(0>n))return n}},o.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},o.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode&&c.$matches.length?o.select(c.$activeIndex):38===e.keyCode&&c.$activeIndex>0?c.$activeIndex--:40===e.keyCode&&c.$activeIndexs&&(e=e.slice(0,s)),(1!==e.length||e[0].value!==t)&&(d.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=d.$getIndex(r.$modelValue),n=angular.isDefined(e)?d.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){d.destroy(),l=null,d=null})}}}]); \ No newline at end of file diff --git a/dist/modules/typeahead.min.js.map b/dist/modules/typeahead.min.js.map deleted file mode 100644 index cc396af69..000000000 --- a/dist/modules/typeahead.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -/** - * angular-strap - * @version v2.0.2 - 2014-04-27 - * @link http://mgcrea.github.io/angular-strap - * @author Olivier Louvignes (olivier@mg-crea.com) - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -{"version":3,"file":"typeahead.min.js.map","sources":["typeahead.min.js"],"names":["angular","module","provider","defaults","this","animation","prefixClass","placement","template","trigger","container","keyboard","html","delay","minLength","filter","limit","$get","$window","$rootScope","$tooltip","TypeaheadFactory","element","controller","config","$typeahead","options","extend","parentScope","scope","$scope","$resetMatches","$matches","$activeIndex","$activate","index","$$postDigest","activate","$select","select","$isVisible","update","matches","length","value","$setViewValue","$render","$digest","$emit","isString","$viewValue","$getIndex","l","i","$onMouseDown","evt","preventDefault","stopPropagation","$onKeyDown","test","keyCode","isUndefined","show","setTimeout","$element","on","hide","off","document","body","directive","$parse","$q","$parseOptions","restrict","require","link","attr","forEach","key","isDefined","ngOptions","parsedOptions","typeahead","$watch","ngModel","newValue","$modelValue","valuesFn","then","values","slice","$isEmpty","val","selected","label","isObject","replace","trim","$on","destroy"],"mappings":"AAOA,YACAA,SAAQC,OAAO,4BACb,yBACA,wCACCC,SAAS,aAAc,WACxB,GAAIC,GAAWC,KAAKD,UAChBE,UAAW,UACXC,YAAa,YACbC,UAAW,cACXC,SAAU,+BACVC,QAAS,QACTC,WAAW,EACXC,UAAU,EACVC,MAAM,EACNC,MAAO,EACPC,UAAW,EACXC,OAAQ,SACRC,MAAO,EAEXZ,MAAKa,MACH,UACA,aACA,WACA,SAAUC,EAASC,EAAYC,GAE7B,QAASC,GAAiBC,EAASC,EAAYC,GAC7C,GAAIC,MAEAC,EAAU1B,QAAQ2B,UAAWxB,EAAUqB,EAC3CC,GAAaL,EAASE,EAASI,EAC/B,IAAIE,GAAcJ,EAAOK,MACrBA,EAAQJ,EAAWK,MACvBD,GAAME,cAAgB,WACpBF,EAAMG,YACNH,EAAMI,aAAe,GAEvBJ,EAAME,gBACNF,EAAMK,UAAY,SAAUC,GAC1BN,EAAMO,aAAa,WACjBX,EAAWY,SAASF,MAGxBN,EAAMS,QAAU,SAAUH,GACxBN,EAAMO,aAAa,WACjBX,EAAWc,OAAOJ,MAGtBN,EAAMW,WAAa,WACjB,MAAOf,GAAWe,cAGpBf,EAAWgB,OAAS,SAAUC,GAC5Bb,EAAMG,SAAWU,EACbb,EAAMI,cAAgBS,EAAQC,SAChCd,EAAMI,aAAe,IAGzBR,EAAWY,SAAW,SAAUF,GAC9BN,EAAMI,aAAeE,GAEvBV,EAAWc,OAAS,SAAUJ,GAC5B,GAAIS,GAAQf,EAAMG,SAASG,GAAOS,KAClCrB,GAAWsB,cAAcD,GACzBf,EAAME,gBACNR,EAAWuB,UACPlB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,EACzDxE,EAAQuE,IAAIC,EAASG,QAAQ,iBAAkB,IAAIC,SAGrDrE,EAAMsE,IAAI,WAAY,WACpBhB,EAAUiB,UACV1E,EAAU,KACVyD,EAAY"} \ No newline at end of file diff --git a/dist/modules/typeahead.tpl.js b/dist/modules/typeahead.tpl.js index ccea2dfd0..624e0c5c4 100644 --- a/dist/modules/typeahead.tpl.js +++ b/dist/modules/typeahead.tpl.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/modules/typeahead.tpl.min.js b/dist/modules/typeahead.tpl.min.js index 5cb06d336..2fba78370 100644 --- a/dist/modules/typeahead.tpl.min.js +++ b/dist/modules/typeahead.tpl.min.js @@ -1,6 +1,6 @@ /** * angular-strap - * @version v2.0.2 - 2014-04-27 + * @version v2.0.3 - 2014-05-30 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (olivier@mg-crea.com) * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/package.json b/package.json index af87583ed..7ac57b9f0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-strap", "description": "AngularStrap - AngularJS directives for Bootstrap", - "version": "2.0.2", + "version": "2.0.3", "keywords": [ "angular", "bootstrap"