Commit 5609c632 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

MDL-40975 Course: Make the edit title instructinos position with mod-indent

parent 685addbd
...@@ -660,6 +660,16 @@ YUI.add('moodle-course-toolboxes', function(Y) { ...@@ -660,6 +660,16 @@ YUI.add('moodle-course-toolboxes', function(Y) {
anchor.replace(editform); anchor.replace(editform);
activity.one('div').appendChild(editinstructions); activity.one('div').appendChild(editinstructions);
// Force the editing instruction to match the mod-indent position.
var padside = 'left';
if (right_to_left()) {
padside = 'right';
}
var mi = activity.one('.mod-indent'),
instructionpad = parseInt(mi.getStyle('padding-' + padside), 10) +
parseInt(mi.getStyle('margin-' + padside), 10);
editinstructions.setStyle('margin-' + padside, instructionpad + 'px');
// We hide various components whilst editing: // We hide various components whilst editing:
activity.addClass(CSS.EDITINGTITLE); activity.addClass(CSS.EDITINGTITLE);
......
...@@ -414,7 +414,6 @@ input.titleeditor { ...@@ -414,7 +414,6 @@ input.titleeditor {
span.editinstructions { span.editinstructions {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0;
margin-top: -22px; margin-top: -22px;
margin-left: 30px; margin-left: 30px;
line-height: 16px; line-height: 16px;
...@@ -428,8 +427,6 @@ span.editinstructions { ...@@ -428,8 +427,6 @@ span.editinstructions {
border: 1px solid @infoBorder; border: 1px solid @infoBorder;
} }
.dir-rtl span.editinstructions { .dir-rtl span.editinstructions {
left: auto;
right: 32px;
} }
/* Course drag and drop upload styles */ /* Course drag and drop upload styles */
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment