From 21111a00e7e4e82966391d1811f8e05b45b9447f Mon Sep 17 00:00:00 2001
From: root <andrew.nicols@luns.net.uk>
Date: Wed, 15 Dec 2010 14:34:08 +0000
Subject: [PATCH] MDL-25682 Set the iconsmall class correctly on all section icons.

I've taken out all of the non-css style from the move icon since this is
all covered by the iconsmall and img classes anyway.

Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
---
 lib/ajax/section_classes.js |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js
index 3485f78..bc52f95 100755
--- a/lib/ajax/section_classes.js
+++ b/lib/ajax/section_classes.js
@@ -664,8 +664,7 @@ resource_class.prototype.init_buttons = function() {
 
     // Add move-handle for drag and drop.
     var handleRef = main.mk_button('a', main.portal.icons['move_2d'], main.portal.strings['move'],
-            [['style', 'cursor:move']],
-            [['height', '11'], ['width', '11'], ['style', 'margin-right:3px; border:0;']]);
+            [['style', 'cursor:move']], [['class', 'iconsmall']]);
 
     YAHOO.util.Dom.generateId(handleRef, 'sectionHandle');
     this.handle = handleRef;
@@ -675,7 +674,7 @@ resource_class.prototype.init_buttons = function() {
     // Add indentation buttons if needed (move left, move right).
     if (moveLeft) {
         var button = main.mk_button('a', main.portal.icons['backwards'], main.portal.strings['moveleft'],
-                [['class', 'editing_moveleft']]);
+                [['class', 'editing_moveleft']], [['class', 'iconsmall']]);
         YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
         commandContainer.appendChild(button);
         this.indentLeftButton = button;
@@ -683,7 +682,7 @@ resource_class.prototype.init_buttons = function() {
 
     if (moveRight) {
         var button = main.mk_button('a', main.portal.icons['forwards'], main.portal.strings['moveright'],
-                [['class', 'editing_moveright']]);
+                [['class', 'editing_moveright']], [['class', 'iconsmall']]);
         YAHOO.util.Event.addListener(button, 'click', this.indent_right, this, true);
         commandContainer.appendChild(button);
         this.indentRightButton = button;
@@ -693,15 +692,15 @@ resource_class.prototype.init_buttons = function() {
     commandContainer.appendChild(updateButton);
 
     // Add the delete button.
-    var button = main.mk_button('a', main.portal.icons['delete'], main.portal.strings['delete']);
+    var button = main.mk_button('a', main.portal.icons['delete'], main.portal.strings['delete'], null, [['class', 'iconsmall']]);
     YAHOO.util.Event.addListener(button, 'click', this.delete_button, this, true);
     commandContainer.appendChild(button);
 
     // Add the hide or show button.
     if (this.hidden) {
-        var button = main.mk_button('a', main.portal.icons['show'], main.portal.strings['show']);
+        var button = main.mk_button('a', main.portal.icons['show'], main.portal.strings['show'], null, [['class', 'iconsmall']]);
     } else {
-        var button = main.mk_button('a', main.portal.icons['hide'], main.portal.strings['hide']);
+        var button = main.mk_button('a', main.portal.icons['hide'], main.portal.strings['hide'], null, [['class', 'iconsmall']]);
     }
     YAHOO.util.Event.addListener(button, 'click', this.toggle_hide, this, true);
     commandContainer.appendChild(button);
@@ -710,11 +709,11 @@ resource_class.prototype.init_buttons = function() {
     // Add the groupmode button if needed.
     if (this.groupmode != null) {
         if (this.groupmode == this.NOGROUPS) {
-            var button = main.mk_button('a', main.portal.icons['groupn'], strgroupsnone);
+            var button = main.mk_button('a', main.portal.icons['groupn'], strgroupsnone, null, [['class', 'iconsmall']]);
         } else if (this.groupmode == this.SEPARATEGROUPS) {
-            var button = main.mk_button('a', main.portal.icons['groups'], strgroupsseparate);
+            var button = main.mk_button('a', main.portal.icons['groups'], strgroupsseparate, null, [['class', 'iconsmall']]);
         } else {
-            var button = main.mk_button('a', main.portal.icons['groupv'], strgroupsvisible);
+            var button = main.mk_button('a', main.portal.icons['groupv'], strgroupsvisible, null, [['class', 'iconsmall']]);
         }
         YAHOO.util.Event.addListener(button, 'click', this.toggle_groupmode, this, true);
         commandContainer.appendChild(button);
@@ -782,7 +781,7 @@ resource_class.prototype.indent_right = function() {
         // Add a indent left button if none is present.
         var commandContainer = YAHOO.util.Dom.getElementsByClassName('commands', 'span', this.getEl())[0];
         var button = main.mk_button('a', main.portal.icons['backwards'], main.portal.strings['moveleft'],
-                [['class', 'editing_moveleft']]);
+                [['class', 'editing_moveleft']], [['class', 'iconsmall']]);
         YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
         commandContainer.insertBefore(button, this.indentRightButton);
         this.indentLeftButton = button;
-- 
1.5.6.5

