mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Update limit-panels directive to query for the new Panels component
This commit is contained in:
@@ -10,9 +10,10 @@ export default [function() {
|
|||||||
const maxPanels = parseInt(scope.maxPanels);
|
const maxPanels = parseInt(scope.maxPanels);
|
||||||
|
|
||||||
scope.$watch(
|
scope.$watch(
|
||||||
() => angular.element('#' + scope.panelContainer).find('.Panel').length,
|
() => angular.element('#' + scope.panelContainer).find('.Panel, .at-Panel').length,
|
||||||
() => {
|
() => {
|
||||||
const panels = angular.element('#' + scope.panelContainer).find('.Panel');
|
const panels = angular.element('#' + scope.panelContainer).find('.Panel, .at-Panel');
|
||||||
|
|
||||||
if(panels.length > maxPanels) {
|
if(panels.length > maxPanels) {
|
||||||
// hide the excess panels
|
// hide the excess panels
|
||||||
$(panels).each(function( index ) {
|
$(panels).each(function( index ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user