Skip to content

Commit

Permalink
MDL-42375 course: management interface icon spacing improved
Browse files Browse the repository at this point in the history
Fixed the display of icons and their spacing when JS is disabled.
  • Loading branch information
Sam Hemelryk committed Nov 6, 2013
1 parent 496422e commit 52c93a2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 22 deletions.
6 changes: 3 additions & 3 deletions course/management.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@
}

$strmanagement = new lang_string('coursecatmanagement');
$title = format_string($SITE->fullname, true, array('context' => $systemcontext));
$pageheading = format_string($SITE->fullname, true, array('context' => $systemcontext));

$PAGE->set_context($context);
$PAGE->set_url($url);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($title);
$PAGE->set_heading($strmanagement);
$PAGE->set_title($strmanagement);
$PAGE->set_heading($pageheading);

// This is a system level page that operates on other contexts.
require_login();
Expand Down
15 changes: 9 additions & 6 deletions theme/base/style/course.css
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ input.titleeditor { vertical-align: text-bottom; }
#course-category-listings .listing-actions > * {display:inline-block;line-height:2.2em;}
#course-category-listings .listing-actions > .moodle-actionmenu {display:inline-block;}
.coursecat-management-header .moodle-actionmenu[data-enhanced].show .menu a,
#course-category-listings .listing-actions > .moodle-actionmenu .menu a {padding-left:1em;}
#course-category-listings .listing-actions > .moodle-actionmenu .menu a {padding: 4px 1em;}
#course-category-listings .listing-actions .iconsmall {margin-left:0.5em;}
#course-category-listings ul.ml {list-style: none;margin:1em 0;}
#course-category-listings ul.ml ul.ml {margin:0;}
Expand All @@ -362,7 +362,7 @@ input.titleeditor { vertical-align: text-bottom; }
#course-category-listings li[data-selected='1'].highlight > div {background-color:#ddffaa;}
#course-category-listings li+li > div,
#course-category-listings li:first-child > div {border-top-color:#f7f7f9;}
#course-category-listings li .tree-icon {vertical-align:text-top;margin-right:0.5em;width:12px;height:12px;}
#course-category-listings li .tree-icon {margin-right:0.5em;width:12px;height:12px;}
.dir-rtl #course-category-listings li .tree-icon {margin-left:0.5em;}
#course-category-listings li[data-selected='1'] > div {background-color:#FFFFD8;border-top-color: #e1e1e8;border-bottom-color:#f7f7f9;}
#course-category-listings li[data-selected='1'] li:first-of-type > div,
Expand All @@ -371,10 +371,12 @@ input.titleeditor { vertical-align: text-bottom; }
#course-category-listings > div > div > ul.ml > li:first-child > div {border-top:0;}

#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) li {line-height:normal;}
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menubar li,
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menubar a,
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menu .menu-action-text {display:inline-block;}
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menubar a {color:inherit;}
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menubar a > img {display:none;}
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menubar a > img,
#course-category-listings .listing-actions .moodle-actionmenu:not([data-enhanced]) > .menubar .caret {display:none;}

.jsenabled #course-category-listings .moodle-actionmenu[data-enhance] .toggle-display img {
width: auto;
Expand All @@ -388,9 +390,10 @@ input.titleeditor { vertical-align: text-bottom; }
}

#course-category-listings .item-actions {margin-right:1em;display:inline-block;display:initial;}
#course-category-listings .item-actions img {margin: 0 4px;vertical-align:inherit;}
#course-category-listings .item-actions img {margin: 0 4px;}
#course-category-listings .item-actions .menubar img {vertical-align:inherit;}
#course-category-listings .item-actions .menu img {max-width:none;width:12px;}
#course-category-listings .item-actions .menu a {padding:4px 1em 4px 4px;}
#course-category-listings .item-actions.show .menu a {padding:4px 1em 4px 4px;}

#course-category-listings li .tree-icon {margin-left:0;}
#course-category-listings li li .tree-icon {margin-left:1em;}
Expand All @@ -416,7 +419,7 @@ input.titleeditor { vertical-align: text-bottom; }

#category-listing .course-count {color:#a1a1a8;margin-right:2em;min-width:3.5em;display:inline-block;}
#category-listing .listitem.collapsed > ul.ml {display: none;}
#category-listing .course-count .smallicon {width:0.8em;height:0.8em;vertical-align:middle;margin:0 0.3em;}
#category-listing .course-count .smallicon {width:0.8em;height:0.8em;margin:0 0.3em;}

#category-listing .listitem > div > .ba-checkbox {vertical-align:middle;width:2.2em;text-align:center;margin:-1px 0;padding-top:2px;margin-right:0.5em;}
.dir-rtl #category-listing .listitem > div > .ba-checkbox {margin-left:0.5em;margin-right:0.5em;}
Expand Down
34 changes: 22 additions & 12 deletions theme/bootstrapbase/less/moodle/course.less
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,6 @@ span.editinstructions {
padding-left:1rem;
}
}
.iconsmall {
vertical-align:text-bottom;
}
.moodle-actionmenu:not([data-enhanced]) {
li {line-height:normal;}
> .menubar a {
Expand All @@ -843,6 +840,9 @@ span.editinstructions {
> img {
display:none;
}
.caret {
display: none;
}
}
> .menu .menu-action-text {
display:inline-block;
Expand All @@ -864,8 +864,9 @@ span.editinstructions {
}
}
.tree-icon {
vertical-align:text-top;
margin: 2px 6px 0 0;
width:12px;
vertical-align:inherit;
}
&[data-selected='1'] {
> div {
Expand Down Expand Up @@ -904,8 +905,11 @@ span.editinstructions {
display:initial;
img {
margin: 0 4px;
height:12px;
padding: 0;
vertical-align: inherit;
}
.menu {
&.show .menu {
a {
padding:4px 1em 4px 4px;
}
Expand All @@ -914,6 +918,9 @@ span.editinstructions {
max-width:none;
}
}
.menu-action-text {
vertical-align: inherit;
}
}

.listitem {
Expand Down Expand Up @@ -1001,7 +1008,6 @@ span.editinstructions {
display: none;
}
.bulk-action-checkbox {
vertical-align:middle;
margin:-2px 6px 0 0;
}
}
Expand All @@ -1012,7 +1018,6 @@ span.editinstructions {
.listitem {
> div {
> .ba-checkbox {
vertical-align:middle;
width:2.2em;
text-align:center;
margin:-1px 0.5em 0 0;
Expand All @@ -1038,14 +1043,12 @@ span.editinstructions {
min-width:3.5em;
display:inline-block;
.smallicon {
width:0.8rem;
height:0.8rem;
vertical-align:middle;
margin:0 0.3rem;
width:12px;
margin-left:4px;
vertical-align: inherit;
}
}
.bulk-action-checkbox {
vertical-align:middle;
margin-right: -3px;
}
.category-listing > ul > .listitem:first-child {
Expand Down Expand Up @@ -1109,6 +1112,13 @@ span.editinstructions {
}
}

#course-category-listings #course-listing .listitem .drag-handle {
display: none;
}
.jsenabled #course-category-listings #course-listing .listitem .drag-handle {
display: block;
}

.dir-rtl #course-category-listings {
#category-listing,
#course-listing {
Expand Down
2 changes: 1 addition & 1 deletion theme/bootstrapbase/style/moodle.css

Large diffs are not rendered by default.

0 comments on commit 52c93a2

Please sign in to comment.