diff -Naur bootstrapbase_orig/less/moodle/bootstrapoverride.less bootstrapbase/less/moodle/bootstrapoverride.less --- bootstrapbase_orig/less/moodle/bootstrapoverride.less 2014-01-11 18:27:34.000000000 +0330 +++ bootstrapbase/less/moodle/bootstrapoverride.less 2014-01-29 14:38:50.000000000 +0330 @@ -29,4 +29,84 @@ .fluid-span (@columns) { width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)); *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%); +} + +// RTL overrides +// file: dropdowns +.dir-rtl .dropdown .caret { + margin-right: 2px; + margin-left: 0; +} + +.dir-rtl .dropdown-menu { + left: auto; + right: 0; + float: right; + *border-left-width: 2px; +} + +// file: navbar +.dir-rtl .navbar .nav > li > .dropdown-menu { + &:before { + left: auto; + right: 9px; + } + &:after { + left: auto; + right: 10px; + } +} + +.dir-rtl .navbar .brand { + float: right; + margin-left: 0; + margin-right: -20px; // negative indent to right-align the text down the page +} + +.dir-rtl { + .navbar .nav { + left: auto; + right: 0; + float: right; + margin: 0 0 0 10px; + } + .navbar .nav.pull-right { + float: left; // redeclare due to specificity + margin-left: 0; // remove margin on float left nav + } + .navbar .nav > li { + float: right; + } +} + +// file: forms +.dir-rtl { + .form-horizontal { + // Float the labels right + .control-label { + float: right; + text-align: left; + } + // Move over all input controls and content + .controls { + // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend + // don't inherit the margin of the parent, in this case .controls + *padding-left: 0; + *padding-right: 20px; + margin-left: 0; + *margin-left: 0; + margin-right: @horizontalComponentOffset; + *margin-right: 0; + &:first-child { + *padding-left: 0; + *padding-right: @horizontalComponentOffset; + } + } + // And apply it only to .help-block instances that follow a form control + // Move over buttons in .form-actions to align with .controls + .form-actions { + padding-left: 0; + padding-right: @horizontalComponentOffset; + } + } } \ No newline at end of file diff -Naur bootstrapbase_orig/less/moodle/buttons.less bootstrapbase/less/moodle/buttons.less --- bootstrapbase_orig/less/moodle/buttons.less 2014-01-11 18:27:34.000000000 +0330 +++ bootstrapbase/less/moodle/buttons.less 2014-01-28 21:19:09.000000000 +0330 @@ -15,6 +15,9 @@ .btn-lineup { margin: 0 0 10px 5px; } +.dir-rtl .btn-lineup { + margin: 0 5px 10px 0; +} input[name="searchwikicontent"] + input[type="submit"], select + input[type="submit"], input[type="text"] + input[type="button"], @@ -23,6 +26,16 @@ input[type="text"] + input[type="submit"] { .btn-lineup } +.dir-rtl { + input[name="searchwikicontent"] + input[type="submit"], + select + input[type="submit"], + input[type="text"] + input[type="button"], + input[type="password"] + input[type="submit"], + input[type="text"] + button, + input[type="text"] + input[type="submit"] { + .dir-rtl .btn-lineup + } +} p.arrow_button { margin-top: 5em; text-align: center; @@ -59,6 +72,16 @@ { .btn-lineup } +.dir-rtl { + button, + input.form-submit, + input[type="button"], + input[type="submit"], + input[type="reset"] + { + .dir-rtl .btn-lineup + } +} button.yui3-button.closebutton, button.yui3-button.closebutton:hover { background-position: 0 0; diff -Naur bootstrapbase_orig/less/moodle/core.less bootstrapbase/less/moodle/core.less --- bootstrapbase_orig/less/moodle/core.less 2014-01-11 18:27:34.000000000 +0330 +++ bootstrapbase/less/moodle/core.less 2014-01-29 13:02:52.000000000 +0330 @@ -348,8 +348,8 @@ font-size: 1em; } .dir-rtl .accesshide { - top: -30000px; left: auto; + right: -10000px; } span.hide, div.hide { @@ -2119,11 +2119,13 @@ .moodle-actionmenu[data-enhanced].show { .menu { text-align: right; - left: 0; - right: auto; + .box-shadow(-5px 5px 20px 0 #666); + a { + padding:2px 28px 2px 1em; + } .iconsmall { - margin-right:0; - margin-left:8px; + margin-right:-24px; + margin-left:4px; } /** bottom left of button **/ @@ -2138,11 +2140,11 @@ &.align-br-br {right: auto; left: 0;} /** top left of button **/ &.align-tl-tl {left: auto; right: 0;} - &.align-tr-tl {right: auto; left: 100%;} + &.align-tr-tl {right: auto; left: 100%; margin-right: 0; margin-left: 4px;} &.align-bl-tl {left: auto; right: 0;} &.align-br-tl {right: auto; left: 100%;} /** top right of button **/ - &.align-tl-tr {left: auto; right: 100%;} + &.align-tl-tr {left: auto; right: 100%; margin-left: 0; margin-right: 4px;} &.align-tr-tr {right: auto; left: 0;} &.align-bl-tr {left: auto; right: 100%;} &.align-br-tr {right: auto; left: 0;} diff -Naur bootstrapbase_orig/less/moodle/course.less bootstrapbase/less/moodle/course.less --- bootstrapbase_orig/less/moodle/course.less 2014-01-11 18:27:34.000000000 +0330 +++ bootstrapbase/less/moodle/course.less 2014-01-29 02:48:27.000000000 +0330 @@ -460,6 +460,9 @@ border: 1px solid @infoBorder; } .dir-rtl span.editinstructions { + margin-left: 0; + margin-right: 30px; + .box-shadow(-2px 2px 5px 1px #ccc); } /* Course drag and drop upload styles */ diff -Naur bootstrapbase_orig/less/moodle/forms.less bootstrapbase/less/moodle/forms.less --- bootstrapbase_orig/less/moodle/forms.less 2014-01-11 18:27:34.000000000 +0330 +++ bootstrapbase/less/moodle/forms.less 2014-01-29 14:41:31.000000000 +0330 @@ -148,8 +148,7 @@ .dir-rtl { .form-item .form-label, .mform .fitem div.fitemtitle { - float:right; - text-align: left; + .dir-rtl .form-horizontal .control-label; } } .form-defaultinfo, diff -Naur bootstrapbase_orig/less/moodle/modules.less bootstrapbase/less/moodle/modules.less --- bootstrapbase_orig/less/moodle/modules.less 2014-01-11 18:27:34.000000000 +0330 +++ bootstrapbase/less/moodle/modules.less 2014-01-29 02:00:39.000000000 +0330 @@ -75,10 +75,18 @@ text-align: left; } +.dir-rtl#page-mod-forum-discuss .discussioncontrol.displaymode { + text-align: right; +} + #page-mod-forum-discuss .discussioncontrols .discussioncontrol { float: left; } +.dir-rtl#page-mod-forum-discuss .discussioncontrols .discussioncontrol { + float: right; +} + #page-footer { margin-top: 1em; padding: 1em 0; @@ -120,9 +128,6 @@ float: right; } } -.dir-rtl .navbar .brand { - float: right; -} .navbar-inverse .logininfo a { color: @navbarInverseLinkColor;