diff --git a/horizon/static/framework/framework.module.js b/horizon/static/framework/framework.module.js index 5d5617d7f0..a2408e6d82 100644 --- a/horizon/static/framework/framework.module.js +++ b/horizon/static/framework/framework.module.js @@ -7,7 +7,8 @@ 'horizon.framework.util', 'horizon.framework.widgets' ]) - .config(config); + .config(config) + .run(run); config.$inject = [ '$injector', @@ -71,4 +72,20 @@ } } + run.$inject = ['$window', '$rootScope']; + + function run($window, $rootScope) { + $window.recompileAngularContent = recompileAngularContent; + + function recompileAngularContent() { + var body = angular.element('body'); + + function explicit($compile) { + $compile(body)($rootScope); + } + explicit.$inject = ['$compile']; + body.injector().invoke(explicit); + } + } + })(); diff --git a/horizon/static/horizon/js/horizon.tables.js b/horizon/static/horizon/js/horizon.tables.js index 34ff4d075d..44e376e957 100644 --- a/horizon/static/horizon/js/horizon.tables.js +++ b/horizon/static/horizon/js/horizon.tables.js @@ -98,6 +98,13 @@ horizon.datatables = { $new_row.find('.table-row-multi-select').prop('checked', true); } $row.replaceWith($new_row); + + // TODO(matt-borland, tsufiev): ideally we should solve the + // problem with not-working angular actions in a content added + // by jQuery via replacing jQuery insert with Angular insert. + // Should address this in Newton release + recompileAngularContent(); + // Reset tablesorter's data cache. $table.trigger("update"); // Reset decay constant.