Skip to content

Commit

Permalink
fixed some bugs with multiple selection in the Graph Data dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavis committed Dec 9, 2009
1 parent b3fc631 commit ad0e057
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion webapp/content/js/composer_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,15 @@ var GraphDataWindow = {
targetChanged: function () {
if (!this.targetList) { return; } // Ignore initial call

if (this.getSelectedTargets().length == 0) {
var selected;

try {
selected = this.getSelectedTargets().length;
} catch (e) {
return;
}

if (selected == 0) {
Ext.getCmp('editTargetButton').disable();
Ext.getCmp('removeTargetButton').disable();
Ext.getCmp('combineMenu').disable();
Expand Down Expand Up @@ -736,10 +744,12 @@ var GraphDataWindow = {

removeTarget: function (item, e) {
var targets = Composer.url.getParamList('target');

Ext.each(this.getSelectedTargets(), function (target) {
targets.remove(target);
removeTarget(target);
});

Composer.url.setParamList('target', targets);
Composer.updateImage();
},
Expand Down

0 comments on commit ad0e057

Please sign in to comment.