Skip to content

Commit

Permalink
MDL-25676 Add back missing test for editing_assign class
Browse files Browse the repository at this point in the history
This had caused the assign roles button disappeared in AJAX view.

Note - this does not fix the issue with the cloned buttons being resized
(MDL-25682)

Signed-off-by: Andrew Robert Nicols <[email protected]>
Signed-off-by: Dan Poltawski <[email protected]>
  • Loading branch information
Andrew Robert Nicols authored and danpoltawski committed Dec 22, 2010
1 parent f056cb5 commit 1a0d7bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ajax/section_classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ resource_class.prototype.init_buttons = function() {
var moveLeft = false;
var moveRight = false;
var updateButton = null;
var assignButton = null;

// for RTL support
var isrtl = (document.getElementsByTagName("html")[0].dir=="rtl");
Expand All @@ -642,6 +643,8 @@ resource_class.prototype.init_buttons = function() {
moveRight = true;
} else if (buttons[x].className == 'editing_update') {
updateButton = buttons[x].cloneNode(true);
} else if (buttons[x].className == 'editing_assign') {
assignButton = buttons[x].cloneNode(true);
} else if (buttons[x].className == 'editing_groupsnone') {
this.groupmode = this.NOGROUPS;
} else if (buttons[x].className == 'editing_groupsseparate') {
Expand Down Expand Up @@ -717,6 +720,11 @@ resource_class.prototype.init_buttons = function() {
commandContainer.appendChild(button);
this.groupButton = button;
}

// Add the assign roles button back in
if (assignButton != null) {
commandContainer.appendChild(assignButton);
}
};


Expand Down

0 comments on commit 1a0d7bd

Please sign in to comment.