MDL-25682 Set the iconsmall class correctly on all section icons.
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Wed, 15 Dec 2010 14:34:08 +0000 (14:34 +0000)
committerDan Poltawski <dan.poltawski@luns.net.uk>
Wed, 22 Dec 2010 15:23:07 +0000 (15:23 +0000)
When using AJAX the icons are not styled correctly. 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>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
lib/ajax/section_classes.js

index b228110..bf10e8a 100755 (executable)
@@ -661,8 +661,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;
@@ -672,7 +671,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;
@@ -680,7 +679,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;
@@ -690,15 +689,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);
@@ -707,11 +706,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);
@@ -774,7 +773,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;