@@ 6876-6900 (lines=25) @@ | ||
6873 | }; |
|
6874 | }]) |
|
6875 | ||
6876 | .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) { |
|
6877 | var isSanitizePresent; |
|
6878 | isSanitizePresent = $injector.has('$sanitize'); |
|
6879 | ||
6880 | function escapeRegexp(queryToEscape) { |
|
6881 | // Regex: capture the whole query string and replace it with the string that will be used to match |
|
6882 | // the results, for example if the capture is "a" the result will be \a |
|
6883 | return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); |
|
6884 | } |
|
6885 | ||
6886 | function containsHtml(matchItem) { |
|
6887 | return /<.*>/g.test(matchItem); |
|
6888 | } |
|
6889 | ||
6890 | return function(matchItem, query) { |
|
6891 | if (!isSanitizePresent && containsHtml(matchItem)) { |
|
6892 | $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger |
|
6893 | } |
|
6894 | matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag |
|
6895 | if (!isSanitizePresent) { |
|
6896 | matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive |
|
6897 | } |
|
6898 | return matchItem; |
|
6899 | }; |
|
6900 | }]); |
|
6901 | ||
6902 | angular.module("uib/template/accordion/accordion-group.html", []).run(["$templateCache", function($templateCache) { |
|
6903 | $templateCache.put("uib/template/accordion/accordion-group.html", |
@@ 6875-6899 (lines=25) @@ | ||
6872 | }; |
|
6873 | }]) |
|
6874 | ||
6875 | .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) { |
|
6876 | var isSanitizePresent; |
|
6877 | isSanitizePresent = $injector.has('$sanitize'); |
|
6878 | ||
6879 | function escapeRegexp(queryToEscape) { |
|
6880 | // Regex: capture the whole query string and replace it with the string that will be used to match |
|
6881 | // the results, for example if the capture is "a" the result will be \a |
|
6882 | return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); |
|
6883 | } |
|
6884 | ||
6885 | function containsHtml(matchItem) { |
|
6886 | return /<.*>/g.test(matchItem); |
|
6887 | } |
|
6888 | ||
6889 | return function(matchItem, query) { |
|
6890 | if (!isSanitizePresent && containsHtml(matchItem)) { |
|
6891 | $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger |
|
6892 | } |
|
6893 | matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag |
|
6894 | if (!isSanitizePresent) { |
|
6895 | matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive |
|
6896 | } |
|
6897 | return matchItem; |
|
6898 | }; |
|
6899 | }]); |
|
6900 | angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'); angular.$$uibCarouselCss = true; }); |
|
6901 | angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'); angular.$$uibDatepickerCss = true; }); |
|
6902 | angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'); angular.$$uibPositionCss = true; }); |