Skip to content
Browse files

MDL-25682 Set the iconsmall class correctly on all section icons.

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>
  • Loading branch information...
1 parent f056cb5 commit a8a44f28459019611fe108c84372dbb5d7563564 @andrewnicols andrewnicols committed with danpoltawski Dec 15, 2010
Showing with 10 additions and 11 deletions.
  1. +10 −11 lib/ajax/section_classes.js
View
21 lib/ajax/section_classes.js
@@ -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,15 +671,15 @@ 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;
}
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;

0 comments on commit a8a44f2

Please sign in to comment.
Something went wrong with that request. Please try again.