diff --git a/horizon/static/framework/framework.module.js b/horizon/static/framework/framework.module.js index 2785622843..5d5617d7f0 100644 --- a/horizon/static/framework/framework.module.js +++ b/horizon/static/framework/framework.module.js @@ -10,13 +10,14 @@ .config(config); config.$inject = [ + '$injector', '$provide', '$interpolateProvider', '$httpProvider', '$windowProvider' ]; - function config($provide, $interpolateProvider, $httpProvider, $windowProvider) { + function config($injector, $provide, $interpolateProvider, $httpProvider, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'framework/'; $provide.constant('horizon.framework.basePath', path); @@ -32,6 +33,25 @@ $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; $httpProvider.defaults.headers.common['Content-Type'] = 'application/json;charset=utf-8'; + // NOTE(tsufiev): angular-ui/bootstrap v0.11.2 dropdownToggle directive + // conflicts with the native Bootstrap data-toggle="dropdown" attribute + // (see https://github.com/angular-ui/bootstrap/issues/2156). + // This is fixed in 0.13, but before that it'd be valuable to ensure that + // the same html markup works the same way with both versions of + // angular-ui/bootstrap (0.11.2 and 0.13). Could be safely deleted once + // Horizon migrates to angular-ui/bootstra v0.13 + if ($injector.has('dropdownToggleDirective')) { + $provide.decorator('dropdownToggleDirective', patchDropdowns); + } + + patchDropdowns.$inject = ['$delegate']; + + function patchDropdowns($delegate) { + var directive = $delegate[0]; + directive.restrict = 'A'; + return $delegate; + } + // Global http error handler // if user is not authorized, log user out // this can happen when session expires diff --git a/horizon/templates/horizon/common/_region_selector.html b/horizon/templates/horizon/common/_region_selector.html index bbcd9f6dcf..63762eb957 100644 --- a/horizon/templates/horizon/common/_region_selector.html +++ b/horizon/templates/horizon/common/_region_selector.html @@ -1,5 +1,5 @@ {% if regions.support %} - diff --git a/openstack_dashboard/templates/_header.html b/openstack_dashboard/templates/_header.html index 8d0a115800..8e20473c7b 100644 --- a/openstack_dashboard/templates/_header.html +++ b/openstack_dashboard/templates/_header.html @@ -20,7 +20,7 @@