Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit a8a44f28459019611fe108c84372dbb5d7563564 1 parent f056cb5
Andrew Nicols andrewnicols authored danpoltawski committed

Showing 1 changed file with 10 additions and 11 deletions. Show diff stats Hide diff stats

  1. +10 11 lib/ajax/section_classes.js
21 lib/ajax/section_classes.js
@@ -661,8 +661,7 @@ resource_class.prototype.init_buttons = function() {
661 661
662 662 // Add move-handle for drag and drop.
663 663 var handleRef = main.mk_button('a', main.portal.icons['move_2d'], main.portal.strings['move'],
664   - [['style', 'cursor:move']],
665   - [['height', '11'], ['width', '11'], ['style', 'margin-right:3px; border:0;']]);
  664 + [['style', 'cursor:move']], [['class', 'iconsmall']]);
666 665
667 666 YAHOO.util.Dom.generateId(handleRef, 'sectionHandle');
668 667 this.handle = handleRef;
@@ -672,7 +671,7 @@ resource_class.prototype.init_buttons = function() {
672 671 // Add indentation buttons if needed (move left, move right).
673 672 if (moveLeft) {
674 673 var button = main.mk_button('a', main.portal.icons['backwards'], main.portal.strings['moveleft'],
675   - [['class', 'editing_moveleft']]);
  674 + [['class', 'editing_moveleft']], [['class', 'iconsmall']]);
676 675 YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
677 676 commandContainer.appendChild(button);
678 677 this.indentLeftButton = button;
@@ -680,7 +679,7 @@ resource_class.prototype.init_buttons = function() {
680 679
681 680 if (moveRight) {
682 681 var button = main.mk_button('a', main.portal.icons['forwards'], main.portal.strings['moveright'],
683   - [['class', 'editing_moveright']]);
  682 + [['class', 'editing_moveright']], [['class', 'iconsmall']]);
684 683 YAHOO.util.Event.addListener(button, 'click', this.indent_right, this, true);
685 684 commandContainer.appendChild(button);
686 685 this.indentRightButton = button;
@@ -690,15 +689,15 @@ resource_class.prototype.init_buttons = function() {
690 689 commandContainer.appendChild(updateButton);
691 690
692 691 // Add the delete button.
693   - var button = main.mk_button('a', main.portal.icons['delete'], main.portal.strings['delete']);
  692 + var button = main.mk_button('a', main.portal.icons['delete'], main.portal.strings['delete'], null, [['class', 'iconsmall']]);
694 693 YAHOO.util.Event.addListener(button, 'click', this.delete_button, this, true);
695 694 commandContainer.appendChild(button);
696 695
697 696 // Add the hide or show button.
698 697 if (this.hidden) {
699   - var button = main.mk_button('a', main.portal.icons['show'], main.portal.strings['show']);
  698 + var button = main.mk_button('a', main.portal.icons['show'], main.portal.strings['show'], null, [['class', 'iconsmall']]);
700 699 } else {
701   - var button = main.mk_button('a', main.portal.icons['hide'], main.portal.strings['hide']);
  700 + var button = main.mk_button('a', main.portal.icons['hide'], main.portal.strings['hide'], null, [['class', 'iconsmall']]);
702 701 }
703 702 YAHOO.util.Event.addListener(button, 'click', this.toggle_hide, this, true);
704 703 commandContainer.appendChild(button);
@@ -707,11 +706,11 @@ resource_class.prototype.init_buttons = function() {
707 706 // Add the groupmode button if needed.
708 707 if (this.groupmode != null) {
709 708 if (this.groupmode == this.NOGROUPS) {
710   - var button = main.mk_button('a', main.portal.icons['groupn'], strgroupsnone);
  709 + var button = main.mk_button('a', main.portal.icons['groupn'], strgroupsnone, null, [['class', 'iconsmall']]);
711 710 } else if (this.groupmode == this.SEPARATEGROUPS) {
712   - var button = main.mk_button('a', main.portal.icons['groups'], strgroupsseparate);
  711 + var button = main.mk_button('a', main.portal.icons['groups'], strgroupsseparate, null, [['class', 'iconsmall']]);
713 712 } else {
714   - var button = main.mk_button('a', main.portal.icons['groupv'], strgroupsvisible);
  713 + var button = main.mk_button('a', main.portal.icons['groupv'], strgroupsvisible, null, [['class', 'iconsmall']]);
715 714 }
716 715 YAHOO.util.Event.addListener(button, 'click', this.toggle_groupmode, this, true);
717 716 commandContainer.appendChild(button);
@@ -774,7 +773,7 @@ resource_class.prototype.indent_right = function() {
774 773 // Add a indent left button if none is present.
775 774 var commandContainer = YAHOO.util.Dom.getElementsByClassName('commands', 'span', this.getEl())[0];
776 775 var button = main.mk_button('a', main.portal.icons['backwards'], main.portal.strings['moveleft'],
777   - [['class', 'editing_moveleft']]);
  776 + [['class', 'editing_moveleft']], [['class', 'iconsmall']]);
778 777 YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
779 778 commandContainer.insertBefore(button, this.indentRightButton);
780 779 this.indentLeftButton = button;

0 comments on commit a8a44f2

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