Index: branches/unlabeled/unlabeled-1.11.2/kernel/admin_templates/incs/grid.js =================================================================== diff -u -N -r5303 -r5613 --- branches/unlabeled/unlabeled-1.11.2/kernel/admin_templates/incs/grid.js (.../grid.js) (revision 5303) +++ branches/unlabeled/unlabeled-1.11.2/kernel/admin_templates/incs/grid.js (.../grid.js) (revision 5613) @@ -42,6 +42,12 @@ } } +GridManager.prototype.CheckDependencies = function ($prefix) { + if (typeof(this.Grids[$prefix]) != 'undefined') { + this.Grids[$prefix].CheckDependencies('GridManager.CheckDependencies'); + } +} + function GridItem(grid, an_element, cb, item_id, class_on, class_off) { this.Grid = grid; @@ -162,7 +168,7 @@ } } } - this.Grid.CheckDependencies(); + this.Grid.CheckDependencies('GridItem.Click'); e.cancelBubble = true; } @@ -172,7 +178,7 @@ if (this.Grid.RadioMode) this.Grid.ClearSelection(null,'GridItem.cbClick'); this.Grid.ClearAlternativeGridsSelection('GridItem.cbClick'); this.Toggle(); - this.Grid.CheckDependencies(); + this.Grid.CheckDependencies('GridItem.cbClick'); e.cancelBubble = true; } @@ -260,7 +266,7 @@ this.Items[i].UnSelect(force); } this.SelectedCount = 0; - this.CheckDependencies(); + this.CheckDependencies('Grid.ClearSelection'); } Grid.prototype.GetSelected = function() { @@ -286,14 +292,14 @@ this.Items[i].Select(); } } - this.CheckDependencies(); + this.CheckDependencies('Grid.InvertSelection'); } Grid.prototype.SelectAll = function() { for (var i in this.Items) { this.Items[i].Select(); } - this.CheckDependencies(); + this.CheckDependencies('Grid.SelectAll'); this.ClearAlternativeGridsSelection('Grid.SelectAll'); } @@ -322,11 +328,12 @@ this.DependantButtons.push(new Array($buttons[i], $direct, $mode)); } //this.DependantButtons = buttons; - this.CheckDependencies(); + this.CheckDependencies('Grid.SetDependantToolbarButtons'); } -Grid.prototype.CheckDependencies = function() +Grid.prototype.CheckDependencies = function($called_from) { +// alert('prefix: ' + this.prefix + '; ' + $called_from + ' -> Grid.CheckDependencies'); var enabling = (this.CountSelected() > 0); for (var i in this.DependantButtons) { if (this.DependantButtons[i][0].match("portal:(.*)")) {