diff --git a/Gruntfile.js b/Gruntfile.js index ceac68d1e6..50a002becd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -112,7 +112,10 @@ module.exports = function(grunt) { dist: { options: { module: null, // no bundle module for all the html2js templates - base: '.' + base: '.', + rename: function(moduleName) { + return 'uib/' + moduleName; + } }, files: [{ expand: true, diff --git a/src/accordion/accordion.js b/src/accordion/accordion.js index 95d6fad2dd..e6c2e96dc9 100644 --- a/src/accordion/accordion.js +++ b/src/accordion/accordion.js @@ -48,7 +48,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse']) controllerAs: 'accordion', transclude: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/accordion/accordion.html'; + return attrs.templateUrl || 'uib/template/accordion/accordion.html'; } }; }) @@ -60,7 +60,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse']) transclude: true, // It transcludes the contents of the directive into the template replace: true, // The element containing the directive will be replaced with the template templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/accordion/accordion-group.html'; + return attrs.templateUrl || 'uib/template/accordion/accordion-group.html'; }, scope: { heading: '@', // Interpolate the heading attribute onto this scope diff --git a/src/accordion/docs/readme.md b/src/accordion/docs/readme.md index 1da9f225c2..8dec7917e9 100644 --- a/src/accordion/docs/readme.md +++ b/src/accordion/docs/readme.md @@ -33,7 +33,7 @@ The body of each accordion group is transcluded into the body of the collapsible Add ability to use Bootstrap's contextual panel classes (panel-primary, panel-success, panel-info, etc...) or your own. This must be a string. * `template-url` - _(Default: `template/accordion/accordion-group.html`)_ - + _(Default: `uib/template/accordion/accordion-group.html`)_ - Add the ability to override the template used on the component. ### Default settings `uibAccordionConfig` diff --git a/src/accordion/test/accordion.spec.js b/src/accordion/test/accordion.spec.js index d9c46b7b1d..31dd983ef5 100644 --- a/src/accordion/test/accordion.spec.js +++ b/src/accordion/test/accordion.spec.js @@ -3,8 +3,8 @@ describe('uib-accordion', function() { beforeEach(module('ui.bootstrap.accordion')); beforeEach(module('ngAnimateMock')); - beforeEach(module('template/accordion/accordion.html')); - beforeEach(module('template/accordion/accordion-group.html')); + beforeEach(module('uib/template/accordion/accordion.html')); + beforeEach(module('uib/template/accordion/accordion-group.html')); beforeEach(inject(function(_$animate_, $rootScope) { $animate = _$animate_; @@ -124,7 +124,7 @@ describe('uib-accordion', function() { })); it('should expose the controller on the view', function() { - $templateCache.put('template/accordion/accordion.html', '
{{accordion.text}}
'); + $templateCache.put('uib/template/accordion/accordion.html', '
{{accordion.text}}
'); element = $compile('')(scope); scope.$digest(); diff --git a/src/alert/alert.js b/src/alert/alert.js index dbea5c6893..0ad230be7f 100644 --- a/src/alert/alert.js +++ b/src/alert/alert.js @@ -18,7 +18,7 @@ angular.module('ui.bootstrap.alert', []) controller: 'UibAlertController', controllerAs: 'alert', templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/alert/alert.html'; + return attrs.templateUrl || 'uib/template/alert/alert.html'; }, transclude: true, replace: true, diff --git a/src/alert/docs/readme.md b/src/alert/docs/readme.md index 6d81bd43f9..88a560d237 100644 --- a/src/alert/docs/readme.md +++ b/src/alert/docs/readme.md @@ -6,7 +6,7 @@ This directive can be used both to generate alerts from static and dynamic model A callback function that gets fired when an `alert` is closed. If the attribute exists, a close button is displayed as well. * `dismiss-on-timeout` _(Default: `none`)(Optional)_ - Takes the number of milliseconds that specify the timeout duration, after which the alert will be closed. This attribute requires the presence of the `close` attribute. - * `template-url` _(Default: `template/alert/alert.html`)_ - + * `template-url` _(Default: `uib/template/alert/alert.html`)_ - Add the ability to override the template used in the component. * `type` _(Default: `warning`)_ - Defines the type of the alert. Go to [bootstrap page](http://getbootstrap.com/components/#alerts) to see the type of alerts available. diff --git a/src/alert/test/alert.spec.js b/src/alert/test/alert.spec.js index 184fd0fdee..752127ae51 100644 --- a/src/alert/test/alert.spec.js +++ b/src/alert/test/alert.spec.js @@ -2,7 +2,7 @@ describe('uib-alert', function() { var element, scope, $compile, $templateCache, $timeout; beforeEach(module('ui.bootstrap.alert')); - beforeEach(module('template/alert/alert.html')); + beforeEach(module('uib/template/alert/alert.html')); beforeEach(inject(function($rootScope, _$compile_, _$templateCache_, _$timeout_) { scope = $rootScope; @@ -39,7 +39,7 @@ describe('uib-alert', function() { } it('should expose the controller to the view', function() { - $templateCache.put('template/alert/alert.html', '
{{alert.text}}
'); + $templateCache.put('uib/template/alert/alert.html', '
{{alert.text}}
'); element = $compile('')(scope); scope.$digest(); diff --git a/src/carousel/carousel.js b/src/carousel/carousel.js index 3531f71cac..a79481d5c6 100644 --- a/src/carousel/carousel.js +++ b/src/carousel/carousel.js @@ -202,7 +202,7 @@ angular.module('ui.bootstrap.carousel', []) controller: 'UibCarouselController', controllerAs: 'carousel', templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/carousel/carousel.html'; + return attrs.templateUrl || 'uib/template/carousel/carousel.html'; }, scope: { interval: '=', @@ -219,7 +219,7 @@ angular.module('ui.bootstrap.carousel', []) transclude: true, replace: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/carousel/slide.html'; + return attrs.templateUrl || 'uib/template/carousel/slide.html'; }, scope: { active: '=?', diff --git a/src/carousel/docs/README.md b/src/carousel/docs/README.md index b147946220..faacd07dc2 100644 --- a/src/carousel/docs/README.md +++ b/src/carousel/docs/README.md @@ -23,7 +23,7 @@ Use a `` element with `` elements inside it. Whether to disable the transition animation between slides. Setting this to truthy, disables this transition. * `template-url` - _(Default: `template/carousel/carousel.html`)_ - + _(Default: `uib/template/carousel/carousel.html`)_ - Add the ability to override the template used on the component. ### uib-slide settings @@ -41,5 +41,5 @@ Use a `` element with `` elements inside it. Use this attribute to change how the slides are ordered. * `template-url` - _(Default: `template/carousel/slide.html`)_ - + _(Default: `uib/template/carousel/slide.html`)_ - Add the ability to override the template used on the component. diff --git a/src/carousel/test/carousel.spec.js b/src/carousel/test/carousel.spec.js index 8464f17af5..a56996bdbb 100644 --- a/src/carousel/test/carousel.spec.js +++ b/src/carousel/test/carousel.spec.js @@ -12,7 +12,7 @@ describe('carousel', function() { }); } })); - beforeEach(module('template/carousel/carousel.html', 'template/carousel/slide.html')); + beforeEach(module('uib/template/carousel/carousel.html', 'uib/template/carousel/slide.html')); var $rootScope, $compile, $controller, $interval, $templateCache; beforeEach(inject(function(_$rootScope_, _$compile_, _$controller_, _$interval_, _$templateCache_) { @@ -495,7 +495,7 @@ describe('carousel', function() { }); it('should be exposed in the template', inject(function($templateCache) { - $templateCache.put('template/carousel/carousel.html', '
{{carousel.text}}
'); + $templateCache.put('uib/template/carousel/carousel.html', '
{{carousel.text}}
'); var scope = $rootScope.$new(); var elm = $compile('')(scope); diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index eb51ef2312..1871ada25a 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -443,7 +443,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst return { replace: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/datepicker/datepicker.html'; + return attrs.templateUrl || 'uib/template/datepicker/datepicker.html'; }, scope: { datepickerMode: '=?', @@ -466,7 +466,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst return { replace: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/datepicker/day.html'; + return attrs.templateUrl || 'uib/template/datepicker/day.html'; }, require: ['^?uibDatepicker', 'uibDaypicker', '^?datepicker'], controller: 'UibDaypickerController', @@ -483,7 +483,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst return { replace: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/datepicker/month.html'; + return attrs.templateUrl || 'uib/template/datepicker/month.html'; }, require: ['^?uibDatepicker', 'uibMonthpicker', '^?datepicker'], controller: 'UibMonthpickerController', @@ -500,7 +500,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst return { replace: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/datepicker/year.html'; + return attrs.templateUrl || 'uib/template/datepicker/year.html'; }, require: ['^?uibDatepicker', 'uibYearpicker', '^?datepicker'], controller: 'UibYearpickerController', @@ -516,8 +516,8 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst .constant('uibDatepickerPopupConfig', { datepickerPopup: 'yyyy-MM-dd', - datepickerPopupTemplateUrl: 'template/datepicker/popup.html', - datepickerTemplateUrl: 'template/datepicker/datepicker.html', + datepickerPopupTemplateUrl: 'uib/template/datepicker/popup.html', + datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html', html5Types: { date: 'yyyy-MM-dd', 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss', @@ -888,7 +888,7 @@ function(scope, element, attrs, $compile, $parse, $document, $rootScope, $positi replace: true, transclude: true, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/datepicker/popup.html'; + return attrs.templateUrl || 'uib/template/datepicker/popup.html'; } }; }); diff --git a/src/datepicker/docs/readme.md b/src/datepicker/docs/readme.md index a806707f99..db79e099fd 100644 --- a/src/datepicker/docs/readme.md +++ b/src/datepicker/docs/readme.md @@ -86,7 +86,7 @@ All settings can be provided as attributes in the `uib-datepicker` or globally c An option to disable or enable shortcut's event propagation. * `template-url` - _(Default: 'template/datepicker/datepicker.html')_ : + _(Default: 'uib/template/datepicker/datepicker.html')_ : Allows overriding of default template of the datepicker @@ -120,11 +120,11 @@ Specific settings for the `uib-datepicker-popup`, that can globally configured t Whether to close calendar when a date is chosen. * `datepicker-popup-template-url` - _(Default: 'template/datepicker/popup.html')_ : + _(Default: 'uib/template/datepicker/popup.html')_ : Allows overriding of default template of the popup * `datepicker-template-url` - _(Default: 'template/datepicker/datepicker.html')_ : + _(Default: 'uib/template/datepicker/datepicker.html')_ : Allows overriding of default template of the datepicker used in popup * `datepicker-append-to-body` diff --git a/src/datepicker/test/datepicker.spec.js b/src/datepicker/test/datepicker.spec.js index e709bbf82d..cc20d15926 100644 --- a/src/datepicker/test/datepicker.spec.js +++ b/src/datepicker/test/datepicker.spec.js @@ -1,11 +1,11 @@ describe('datepicker directive', function() { var $rootScope, $compile, $templateCache, element; beforeEach(module('ui.bootstrap.datepicker')); - beforeEach(module('template/datepicker/datepicker.html')); - beforeEach(module('template/datepicker/day.html')); - beforeEach(module('template/datepicker/month.html')); - beforeEach(module('template/datepicker/year.html')); - beforeEach(module('template/datepicker/popup.html')); + beforeEach(module('uib/template/datepicker/datepicker.html')); + beforeEach(module('uib/template/datepicker/day.html')); + beforeEach(module('uib/template/datepicker/month.html')); + beforeEach(module('uib/template/datepicker/year.html')); + beforeEach(module('uib/template/datepicker/popup.html')); beforeEach(module(function($compileProvider) { $compileProvider.directive('dateModel', function() { return { @@ -382,7 +382,7 @@ describe('datepicker directive', function() { }); it('should expose the controller in the template', function() { - $templateCache.put('template/datepicker/datepicker.html', '
{{datepicker.text}}
'); + $templateCache.put('uib/template/datepicker/datepicker.html', '
{{datepicker.text}}
'); element = $compile('')($rootScope); $rootScope.$digest(); diff --git a/src/modal/modal.js b/src/modal/modal.js index 637bab1992..e5b7c0117a 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -68,7 +68,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap']) return { replace: true, - templateUrl: 'template/modal/backdrop.html', + templateUrl: 'uib/template/modal/backdrop.html', compile: function(tElement, tAttrs) { tElement.addClass(tAttrs.backdropClass); return linkFn; @@ -122,7 +122,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap']) replace: true, transclude: true, templateUrl: function(tElement, tAttrs) { - return tAttrs.templateUrl || 'template/modal/window.html'; + return tAttrs.templateUrl || 'uib/template/modal/window.html'; }, link: function(scope, element, attrs) { element.addClass(attrs.windowClass || ''); diff --git a/src/modal/test/modal.spec.js b/src/modal/test/modal.spec.js index efdd30e96a..0a290a0382 100644 --- a/src/modal/test/modal.spec.js +++ b/src/modal/test/modal.spec.js @@ -4,8 +4,8 @@ describe('$uibModal', function () { beforeEach(module('ngAnimateMock')); beforeEach(module('ui.bootstrap.modal')); - beforeEach(module('template/modal/backdrop.html')); - beforeEach(module('template/modal/window.html')); + beforeEach(module('uib/template/modal/backdrop.html')); + beforeEach(module('uib/template/modal/window.html')); beforeEach(module(function(_$controllerProvider_, _$uibModalProvider_){ $controllerProvider = _$controllerProvider_; $uibModalProvider = _$uibModalProvider_; diff --git a/src/modal/test/modalWindow.spec.js b/src/modal/test/modalWindow.spec.js index 60c00aed81..2a879839fe 100644 --- a/src/modal/test/modalWindow.spec.js +++ b/src/modal/test/modalWindow.spec.js @@ -2,7 +2,7 @@ describe('modal window', function() { var $rootScope, $compile; beforeEach(module('ui.bootstrap.modal')); - beforeEach(module('template/modal/window.html')); + beforeEach(module('uib/template/modal/window.html')); beforeEach(inject(function (_$rootScope_, _$compile_) { $rootScope = _$rootScope_; $compile = _$compile_; diff --git a/src/pagination/docs/readme.md b/src/pagination/docs/readme.md index 74f483179c..96322217ef 100644 --- a/src/pagination/docs/readme.md +++ b/src/pagination/docs/readme.md @@ -70,7 +70,7 @@ Settings can be provided as attributes in the `` or globally con Whether to always display the first and last page numbers. If `max-size` is smaller than the number of pages, then the first and last page numbers are still shown with ellipses in-between as necessary. NOTE: `max-size` refers to the center of the range. This option may add up to 2 more numbers on each side of the displayed range for the end value and what would be an ellipsis but is replaced by a number because it is sequential. * `template-url` - _(Default: 'template/pagination/pagination.html')_ : + _(Default: 'uib/template/pagination/pagination.html')_ : Override the template for the component with a custom provided template ### Pager Settings ### diff --git a/src/pagination/pagination.js b/src/pagination/pagination.js index 6ae49a2a04..09c9ae13e2 100644 --- a/src/pagination/pagination.js +++ b/src/pagination/pagination.js @@ -105,7 +105,7 @@ angular.module('ui.bootstrap.pagination', []) controller: 'UibPaginationController', controllerAs: 'pagination', templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/pagination/pagination.html'; + return attrs.templateUrl || 'uib/template/pagination/pagination.html'; }, replace: true, link: function(scope, element, attrs, ctrls) { @@ -243,7 +243,7 @@ angular.module('ui.bootstrap.pagination', []) controller: 'UibPaginationController', controllerAs: 'pagination', templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/pagination/pager.html'; + return attrs.templateUrl || 'uib/template/pagination/pager.html'; }, replace: true, link: function(scope, element, attrs, ctrls) { diff --git a/src/pagination/test/pager.spec.js b/src/pagination/test/pager.spec.js index 9a68f6419c..b6773f354f 100644 --- a/src/pagination/test/pager.spec.js +++ b/src/pagination/test/pager.spec.js @@ -1,7 +1,7 @@ describe('pager directive', function() { var $compile, $rootScope, $document, $templateCache, body, element; beforeEach(module('ui.bootstrap.pagination')); - beforeEach(module('template/pagination/pager.html')); + beforeEach(module('uib/template/pagination/pager.html')); beforeEach(inject(function(_$compile_, _$rootScope_, _$document_, _$templateCache_) { $compile = _$compile_; $rootScope = _$rootScope_; @@ -54,7 +54,7 @@ describe('pager directive', function() { }); it('exposes the controller on the template', function() { - $templateCache.put('template/pagination/pager.html', '
{{pagination.text}}
'); + $templateCache.put('uib/template/pagination/pager.html', '
{{pagination.text}}
'); element = $compile('')($rootScope); $rootScope.$digest(); diff --git a/src/pagination/test/pagination.spec.js b/src/pagination/test/pagination.spec.js index d94184d2ba..fb1c82268f 100644 --- a/src/pagination/test/pagination.spec.js +++ b/src/pagination/test/pagination.spec.js @@ -1,7 +1,7 @@ describe('pagination directive', function() { var $compile, $rootScope, $document, $templateCache, body, element; beforeEach(module('ui.bootstrap.pagination')); - beforeEach(module('template/pagination/pagination.html')); + beforeEach(module('uib/template/pagination/pagination.html')); beforeEach(inject(function(_$compile_, _$rootScope_, _$document_, _$templateCache_) { $compile = _$compile_; $rootScope = _$rootScope_; @@ -55,7 +55,7 @@ describe('pagination directive', function() { }); it('exposes the controller to the template', function() { - $templateCache.put('template/pagination/pagination.html', '
{{pagination.randomText}}
'); + $templateCache.put('uib/template/pagination/pagination.html', '
{{pagination.randomText}}
'); var scope = $rootScope.$new(); element = $compile('')(scope); @@ -922,7 +922,7 @@ describe('pagination directive', function() { describe('pagination directive', function() { var $compile, $rootScope, element; beforeEach(module('ui.bootstrap.pagination')); - beforeEach(module('template/pagination/pagination.html')); + beforeEach(module('uib/template/pagination/pagination.html')); beforeEach(inject(function(_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; diff --git a/src/popover/popover.js b/src/popover/popover.js index 5386a838e7..dde037e526 100644 --- a/src/popover/popover.js +++ b/src/popover/popover.js @@ -10,7 +10,7 @@ angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip']) replace: true, scope: { title: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&', originScope: '&' }, - templateUrl: 'template/popover/popover-template.html' + templateUrl: 'uib/template/popover/popover-template.html' }; }) @@ -24,7 +24,7 @@ angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip']) return { replace: true, scope: { contentExp: '&', title: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' }, - templateUrl: 'template/popover/popover-html.html' + templateUrl: 'uib/template/popover/popover-html.html' }; }) @@ -38,7 +38,7 @@ angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip']) return { replace: true, scope: { title: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' }, - templateUrl: 'template/popover/popover.html' + templateUrl: 'uib/template/popover/popover.html' }; }) diff --git a/src/popover/test/popover-html.spec.js b/src/popover/test/popover-html.spec.js index dd36149e7f..75853e6521 100644 --- a/src/popover/test/popover-html.spec.js +++ b/src/popover/test/popover-html.spec.js @@ -9,7 +9,7 @@ describe('popover', function() { beforeEach(module('ui.bootstrap.popover')); // load the template - beforeEach(module('template/popover/popover-html.html')); + beforeEach(module('uib/template/popover/popover-html.html')); beforeEach(inject(function($rootScope, $compile, $sce) { elmBody = angular.element( diff --git a/src/popover/test/popover-template.spec.js b/src/popover/test/popover-template.spec.js index de69d343ec..06b14d638f 100644 --- a/src/popover/test/popover-template.spec.js +++ b/src/popover/test/popover-template.spec.js @@ -9,8 +9,8 @@ describe('popover template', function() { beforeEach(module('ui.bootstrap.popover')); // load the template - beforeEach(module('template/popover/popover.html')); - beforeEach(module('template/popover/popover-template.html')); + beforeEach(module('uib/template/popover/popover.html')); + beforeEach(module('uib/template/popover/popover-template.html')); beforeEach(inject(function($templateCache) { $templateCache.put('myUrl', [200, '{{ myTemplateText }}', {}]); diff --git a/src/popover/test/popover.spec.js b/src/popover/test/popover.spec.js index 50f4d36c1c..6893096caf 100644 --- a/src/popover/test/popover.spec.js +++ b/src/popover/test/popover.spec.js @@ -9,7 +9,7 @@ describe('popover', function() { beforeEach(module('ui.bootstrap.popover')); // load the template - beforeEach(module('template/popover/popover.html')); + beforeEach(module('uib/template/popover/popover.html')); beforeEach(inject(function($rootScope, $compile) { elmBody = angular.element( diff --git a/src/progressbar/progressbar.js b/src/progressbar/progressbar.js index 4d9b2481f3..8e983c6c3c 100644 --- a/src/progressbar/progressbar.js +++ b/src/progressbar/progressbar.js @@ -67,7 +67,7 @@ angular.module('ui.bootstrap.progressbar', []) scope: { max: '=?' }, - templateUrl: 'template/progressbar/progress.html' + templateUrl: 'uib/template/progressbar/progress.html' }; }) @@ -80,7 +80,7 @@ angular.module('ui.bootstrap.progressbar', []) value: '=', type: '@' }, - templateUrl: 'template/progressbar/bar.html', + templateUrl: 'uib/template/progressbar/bar.html', link: function(scope, element, attrs, progressCtrl) { progressCtrl.addBar(scope, element, attrs); } @@ -97,7 +97,7 @@ angular.module('ui.bootstrap.progressbar', []) max: '=?', type: '@' }, - templateUrl: 'template/progressbar/progressbar.html', + templateUrl: 'uib/template/progressbar/progressbar.html', link: function(scope, element, attrs, progressCtrl) { progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title}); } diff --git a/src/progressbar/test/progressbar.spec.js b/src/progressbar/test/progressbar.spec.js index 7fcade6e58..19022ef3ae 100644 --- a/src/progressbar/test/progressbar.spec.js +++ b/src/progressbar/test/progressbar.spec.js @@ -1,7 +1,7 @@ describe('progressbar directive', function() { var $rootScope, $compile, element; beforeEach(module('ui.bootstrap.progressbar')); - beforeEach(module('template/progressbar/progressbar.html', 'template/progressbar/progress.html', 'template/progressbar/bar.html')); + beforeEach(module('uib/template/progressbar/progressbar.html', 'uib/template/progressbar/progress.html', 'uib/template/progressbar/bar.html')); beforeEach(inject(function(_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; diff --git a/src/rating/rating.js b/src/rating/rating.js index e348c66d45..10065f72fb 100644 --- a/src/rating/rating.js +++ b/src/rating/rating.js @@ -89,7 +89,7 @@ angular.module('ui.bootstrap.rating', []) onLeave: '&' }, controller: 'UibRatingController', - templateUrl: 'template/rating/rating.html', + templateUrl: 'uib/template/rating/rating.html', replace: true, link: function(scope, element, attrs, ctrls) { var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1]; diff --git a/src/rating/test/rating.spec.js b/src/rating/test/rating.spec.js index 99b27df885..3eab077d35 100644 --- a/src/rating/test/rating.spec.js +++ b/src/rating/test/rating.spec.js @@ -1,7 +1,7 @@ describe('rating directive', function() { var $rootScope, $compile, element; beforeEach(module('ui.bootstrap.rating')); - beforeEach(module('template/rating/rating.html')); + beforeEach(module('uib/template/rating/rating.html')); beforeEach(inject(function(_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js index 6e6c924d13..4ece9d652f 100644 --- a/src/tabs/tabs.js +++ b/src/tabs/tabs.js @@ -97,7 +97,7 @@ angular.module('ui.bootstrap.tabs', []) type: '@' }, controller: 'UibTabsetController', - templateUrl: 'template/tabs/tabset.html', + templateUrl: 'uib/template/tabs/tabset.html', link: function(scope, element, attrs) { scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false; scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false; @@ -189,7 +189,7 @@ angular.module('ui.bootstrap.tabs', []) return { require: '^uibTabset', replace: true, - templateUrl: 'template/tabs/tab.html', + templateUrl: 'uib/template/tabs/tab.html', transclude: true, scope: { active: '=?', diff --git a/src/tabs/test/tabs.spec.js b/src/tabs/test/tabs.spec.js index 6c4bb535d2..f20b9cc12f 100644 --- a/src/tabs/test/tabs.spec.js +++ b/src/tabs/test/tabs.spec.js @@ -2,8 +2,8 @@ describe('tabs', function() { var elm, scope; beforeEach(module('ui.bootstrap.tabs')); - beforeEach(module('template/tabs/tabset.html')); - beforeEach(module('template/tabs/tab.html')); + beforeEach(module('uib/template/tabs/tabset.html')); + beforeEach(module('uib/template/tabs/tab.html')); function titles() { return elm.find('ul.nav-tabs li'); diff --git a/src/timepicker/docs/readme.md b/src/timepicker/docs/readme.md index 5f9b299254..a87c2403e6 100644 --- a/src/timepicker/docs/readme.md +++ b/src/timepicker/docs/readme.md @@ -61,4 +61,8 @@ All settings can be provided as attributes in the `` or globally * `tabindex` _(Defaults: 0)_ : - Sets tabindex for each control in timepicker \ No newline at end of file + Sets tabindex for each control in timepicker + + * `template-url` + _(Defaults: uib/template/timepicker/timepicker.html)_ : + Add the ability to override the template used on the component. diff --git a/src/timepicker/test/timepicker.spec.js b/src/timepicker/test/timepicker.spec.js index 7d44e70fe9..e4ca189515 100644 --- a/src/timepicker/test/timepicker.spec.js +++ b/src/timepicker/test/timepicker.spec.js @@ -2,7 +2,7 @@ describe('timepicker directive', function() { var $rootScope, $compile, $templateCache, element, modelCtrl; beforeEach(module('ui.bootstrap.timepicker')); - beforeEach(module('template/timepicker/timepicker.html')); + beforeEach(module('uib/template/timepicker/timepicker.html')); beforeEach(inject(function(_$compile_, _$rootScope_, _$templateCache_) { $compile = _$compile_; $rootScope = _$rootScope_; @@ -2052,7 +2052,7 @@ describe('timepicker directive', function() { }); it('should expose the controller on the view', function() { - $templateCache.put('template/timepicker/timepicker.html', '
{{timepicker.text}}
'); + $templateCache.put('uib/template/timepicker/timepicker.html', '
{{timepicker.text}}
'); element = $compile('')($rootScope); $rootScope.$digest(); diff --git a/src/timepicker/timepicker.js b/src/timepicker/timepicker.js index 857fd9f3c4..58bce9700d 100644 --- a/src/timepicker/timepicker.js +++ b/src/timepicker/timepicker.js @@ -525,7 +525,7 @@ angular.module('ui.bootstrap.timepicker', []) replace: true, scope: {}, templateUrl: function(element, attrs) { - return attrs.templateUrl || 'template/timepicker/timepicker.html'; + return attrs.templateUrl || 'uib/template/timepicker/timepicker.html'; }, link: function(scope, element, attrs, ctrls) { var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1]; diff --git a/src/tooltip/test/tooltip-template.spec.js b/src/tooltip/test/tooltip-template.spec.js index c2e42c889b..d9fc05f62a 100644 --- a/src/tooltip/test/tooltip-template.spec.js +++ b/src/tooltip/test/tooltip-template.spec.js @@ -9,7 +9,7 @@ describe('tooltip template', function() { beforeEach(module('ui.bootstrap.tooltip')); // load the template - beforeEach(module('template/tooltip/tooltip-template-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-template-popup.html')); beforeEach(inject(function($templateCache) { $templateCache.put('myUrl', [200, '{{ myTemplateText }}', {}]); diff --git a/src/tooltip/test/tooltip.spec.js b/src/tooltip/test/tooltip.spec.js index e8f33969aa..04898aa07e 100644 --- a/src/tooltip/test/tooltip.spec.js +++ b/src/tooltip/test/tooltip.spec.js @@ -10,7 +10,7 @@ describe('tooltip', function() { beforeEach(module('ui.bootstrap.tooltip')); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); beforeEach(inject(function($rootScope, $compile, _$document_) { elmBody = angular.element( @@ -712,7 +712,7 @@ describe('tooltipWithDifferentSymbols', function() { beforeEach(module('ui.bootstrap.tooltip')); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); // configure interpolate provider to use [[ ]] instead of {{ }} beforeEach(module(function($interpolateProvider) { @@ -750,7 +750,7 @@ describe('tooltip positioning', function() { })); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); beforeEach(inject(function($rootScope, $compile, $uibPosition) { $position = $uibPosition; @@ -810,7 +810,7 @@ describe('tooltipHtml', function() { })); // load the template - beforeEach(module('template/tooltip/tooltip-html-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-html-popup.html')); beforeEach(inject(function($rootScope, $compile, $sce) { scope = $rootScope; @@ -880,7 +880,7 @@ describe('$uibTooltipProvider', function() { })); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); beforeEach(inject(function($rootScope, $compile) { elmBody = angular.element( @@ -907,7 +907,7 @@ describe('$uibTooltipProvider', function() { describe('appendToBody', function() { var $body; - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); beforeEach(module('ui.bootstrap.tooltip', function($uibTooltipProvider) { $uibTooltipProvider.options({ appendToBody: true }); })); @@ -965,7 +965,7 @@ describe('$uibTooltipProvider', function() { })); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); it('should use the show trigger and the mapped value for the hide trigger', inject(function($rootScope, $compile) { elmBody = angular.element( @@ -1013,7 +1013,7 @@ describe('$uibTooltipProvider', function() { })); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); it('should use the show trigger and the mapped value for the hide trigger', inject(function($rootScope, $compile) { elmBody = angular.element( @@ -1045,7 +1045,7 @@ describe('$uibTooltipProvider', function() { })); // load the template - beforeEach(module('template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); it('should use the show trigger to hide', inject(function($rootScope, $compile) { elmBody = angular.element( diff --git a/src/tooltip/test/tooltip2.spec.js b/src/tooltip/test/tooltip2.spec.js index 5e26c1b4d0..f07682d7fb 100644 --- a/src/tooltip/test/tooltip2.spec.js +++ b/src/tooltip/test/tooltip2.spec.js @@ -2,9 +2,9 @@ describe('tooltip directive', function() { var $rootScope, $compile, $document, $timeout; beforeEach(module('ui.bootstrap.tooltip')); - beforeEach(module('template/tooltip/tooltip-popup.html')); - beforeEach(module('template/tooltip/tooltip-template-popup.html')); - beforeEach(module('template/tooltip/tooltip-html-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-template-popup.html')); + beforeEach(module('uib/template/tooltip/tooltip-html-popup.html')); beforeEach(inject(function(_$rootScope_, _$compile_, _$document_, _$timeout_) { $rootScope = _$rootScope_; $compile = _$compile_; diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index c3c5b9b11e..36b90249f9 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -609,7 +609,7 @@ function ($animate , $sce , $compile , $templateRequest) { return { replace: true, scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' }, - templateUrl: 'template/tooltip/tooltip-popup.html' + templateUrl: 'uib/template/tooltip/tooltip-popup.html' }; }) @@ -622,7 +622,7 @@ function ($animate , $sce , $compile , $templateRequest) { replace: true, scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&', originScope: '&' }, - templateUrl: 'template/tooltip/tooltip-template-popup.html' + templateUrl: 'uib/template/tooltip/tooltip-template-popup.html' }; }) @@ -636,7 +636,7 @@ function ($animate , $sce , $compile , $templateRequest) { return { replace: true, scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' }, - templateUrl: 'template/tooltip/tooltip-html-popup.html' + templateUrl: 'uib/template/tooltip/tooltip-html-popup.html' }; }) diff --git a/src/typeahead/docs/readme.md b/src/typeahead/docs/readme.md index b8ad8048db..a2ac10c9ae 100644 --- a/src/typeahead/docs/readme.md +++ b/src/typeahead/docs/readme.md @@ -60,11 +60,11 @@ The typeahead directives provide several attributes: Should it automatically select an item when there is one option that exactly matches the user input? * `typeahead-template-url` - : + _(Defaults: `uib/template/typeahead/typeahead-match.html`)_ : Set custom item template * `typeahead-popup-template-url` - _(Defaults: `template/typeahead/typeahead-popup.html`)_ : + _(Defaults: `uib/template/typeahead/typeahead-popup.html`)_ : Set custom popup template * `typeahead-wait-ms` diff --git a/src/typeahead/test/typeahead-popup.spec.js b/src/typeahead/test/typeahead-popup.spec.js index 1e3b3b39b3..325d17a529 100644 --- a/src/typeahead/test/typeahead-popup.spec.js +++ b/src/typeahead/test/typeahead-popup.spec.js @@ -2,8 +2,8 @@ describe('typeaheadPopup - result rendering', function() { var scope, $rootScope, $compile; beforeEach(module('ui.bootstrap.typeahead')); - beforeEach(module('template/typeahead/typeahead-popup.html')); - beforeEach(module('template/typeahead/typeahead-match.html')); + beforeEach(module('uib/template/typeahead/typeahead-popup.html')); + beforeEach(module('uib/template/typeahead/typeahead-match.html')); beforeEach(inject(function(_$rootScope_, _$compile_) { $rootScope = _$rootScope_; scope = $rootScope.$new(); diff --git a/src/typeahead/test/typeahead.spec.js b/src/typeahead/test/typeahead.spec.js index dbfc13afb2..be2fd36f7c 100644 --- a/src/typeahead/test/typeahead.spec.js +++ b/src/typeahead/test/typeahead.spec.js @@ -4,8 +4,8 @@ describe('typeahead tests', function() { beforeEach(module('ui.bootstrap.typeahead')); beforeEach(module('ngSanitize')); - beforeEach(module('template/typeahead/typeahead-popup.html')); - beforeEach(module('template/typeahead/typeahead-match.html')); + beforeEach(module('uib/template/typeahead/typeahead-popup.html')); + beforeEach(module('uib/template/typeahead/typeahead-match.html')); beforeEach(module(function($compileProvider) { $compileProvider.directive('formatter', function() { return { @@ -1248,7 +1248,7 @@ describe('typeahead tests', function() { it('should allow directives in template to require parent controller', function() { module('ui.bootstrap.typeahead'); module('ngSanitize'); - module('template/typeahead/typeahead-popup.html'); + module('uib/template/typeahead/typeahead-popup.html'); module(function($compileProvider) { $compileProvider .directive('uibCustomParent', function() { @@ -1271,7 +1271,7 @@ describe('typeahead tests', function() { inject(function($compile, $rootScope, $sniffer, $templateCache) { var element; var $scope = $rootScope.$new(); - $templateCache.put('template/typeahead/typeahead-match.html', '
{{text}}
'); + $templateCache.put('uib/template/typeahead/typeahead-match.html', '
{{text}}
'); $scope.states = [ {code: 'AL', name: 'Alaska'}, {code: 'CL', name: 'California'} diff --git a/src/typeahead/typeahead.js b/src/typeahead/typeahead.js index 323f6bc3a6..70b4bb6a9f 100644 --- a/src/typeahead/typeahead.js +++ b/src/typeahead/typeahead.js @@ -532,7 +532,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap }, replace: true, templateUrl: function(element, attrs) { - return attrs.popupTemplateUrl || 'template/typeahead/typeahead-popup.html'; + return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html'; }, link: function(scope, element, attrs) { scope.templateUrl = attrs.templateUrl; @@ -566,7 +566,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap query: '=' }, link: function(scope, element, attrs) { - var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'template/typeahead/typeahead-match.html'; + var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html'; $templateRequest(tplUrl).then(function(tplContent) { var tplEl = angular.element(tplContent.trim()); element.replaceWith(tplEl);