From c0cda7d092dcf38858278334a6a8719b509c3fe1 Mon Sep 17 00:00:00 2001
From: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
Date: Tue, 14 Dec 2010 17:05:33 +0000
Subject: [PATCH] MDL-25676 Add back missing test for editing_assign class

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 <andrew.nicols@luns.net.uk>
---
 lib/ajax/section_classes.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js
index 74e4c12..3485f78 100755
--- a/lib/ajax/section_classes.js
+++ b/lib/ajax/section_classes.js
@@ -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");
@@ -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') {
@@ -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);
+    }
 };
 
 
-- 
1.5.6.5

