From: moodler Date: Thu, 17 Apr 2008 08:50:56 +0000 (+0000) Subject: MDL-14399 Merged RTL fixes from 1.9 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9aa82ed6d428b8b032d792799b2a30eae6197dd2;p=moodle.git MDL-14399 Merged RTL fixes from 1.9 --- diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js index 24c9ca2d1c..dede0df45f 100755 --- a/lib/ajax/section_classes.js +++ b/lib/ajax/section_classes.js @@ -589,6 +589,9 @@ resource_class.prototype.init_buttons = function() { var moveLeft = false; var moveRight = false; var updateButton = null; + + // for RTL support + var isrtl = (document.getElementsByTagName("html")[0].dir=="rtl"); for (var x=0; xget_query_string()."&addquestion=$questionid&sesskey=".sesskey()."\">pixpath/t/moveleft.gif\" alt=\"$straddtoquiz\" /> "; + src=\"$CFG->pixpath/t/$movearrow\" alt=\"$straddtoquiz\" /> "; return $out; } else { return ''; diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index 1ea548f590..5c47077b58 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -189,6 +189,14 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete=true, $showbreak echo "$strgrade"; echo "$straction"; echo "\n"; + + // for RTL languages: switch right and left arrows /****/ + if (right_to_left()) { + $movearrow = 'moveleft.gif'; + } else { + $movearrow = 'removeright.gif'; + } + foreach ($order as $i => $qnum) { if ($qnum and empty($questions[$qnum])) { @@ -290,7 +298,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete=true, $showbreak } if ($allowdelete && question_has_capability_on($question, 'use', $question->category)) { // remove from quiz, not question delete. echo "out_action(array('delete'=>$count))."\"> - pixpath/t/removeright.gif\" class=\"iconsmall\" alt=\"$strremove\" />"; + pixpath/t/$movearrow\" class=\"iconsmall\" alt=\"$strremove\" />"; } echo ""; diff --git a/theme/standard/rtl.css b/theme/standard/rtl.css index 5dd007a845..960b9303b6 100755 --- a/theme/standard/rtl.css +++ b/theme/standard/rtl.css @@ -79,6 +79,10 @@ body, td, li, div { text-align: right; } +.categorylist .category.number { + text-align: left; +} + .calendar-controls .previous, .calendar-controls .current, .calendar-controls .next { float: right; } @@ -136,6 +140,30 @@ form.mform .fdescription.required { direction: ltr; } +/* on firefox the main layout-table might be pushed to the right by editing buttons **** */ + +#layout-table { + clear: both; +} + +/* admin > appearance > themes > theme settings */ + +#adminsettings .form-label { + float: right; + text-align: left; +} + +#adminsettings .form-setting { + text-align: right; + margin-right: 13em; + margin-left: 0px; +} + +#adminsettings .form-description { + margin: 0.5em 13em 0em 0pt; + text-align: right; +} + #id_lang { direction: ltr; } @@ -151,6 +179,11 @@ select#uninstalllang { } .mod-forum .indent { +/* in forums, fix top and bottom navigation bars' buttons */ +li form .invisiblefieldset { + display: inline; +} + margin-right: 30px; margin-left: 0px; } @@ -204,6 +237,22 @@ h1.main, h2.main, h3.main, h4.main, h5.main, h6.main { direction: ltr; } +.block_admin_tree .admintree .depth1 { + padding-right:16px; +} + +.block_admin_tree .admintree .depth2 { + padding-right:32px; +} + +.block_admin_tree .admintree .depth3 { + padding-right:48px; +} + +.block_admin_tree .admintree .depth4 { + padding-right:64px; +} + .block_admin_tree .admintree { text-align: right; } @@ -232,13 +281,11 @@ body#user-index table#participants td, body#user-index table#participants th { /* Admin > Security */ #adminsettings label { - float: right; text-align: left; } #adminsettings select, #adminsettings input { - float: right; - margin: 0pt 10pt 0pt 0px; + margin: 0pt 5pt 0pt 5pt; } #adminsettings .description { @@ -277,10 +324,19 @@ form.mform div.felement, form.mform fieldset.felement { text-align: right; } +.invisiblefieldset { + display: block; +} + body#mod-quiz-report table#attempts .header { text-align: right; } +#mod-quiz-mod #reviewoptionshdr fieldset.fgroup span { + clear: right; + float: right; +} + .logtable th { text-align: right; } @@ -299,20 +355,32 @@ form.mform .fitemtitle { border-right-style: none; } +.form-setting .form-time { + direction: ltr; + float:right; +} + /* ======================== for tabs support ======================== */ .tabrow0 { - overflow: auto; PADDING-BOTTOM: 2.75em; } +/* IE6 requires overflow: auto. IE7 requires overflow: hidden. + exploit IE's "star html selector bug" to apply to IE6 ONLY */ +.tabrow0 { + #overflow: hidden; /* for IE7. to eliminate extra scroll bars . the # hides from firefox */ + * html overflow: auto; /* for IE6 only **** */ +} + .tabrow0 LI { float: right; MARGIN: 0px; width: 130px; BACKGROUND: url(pix/tab/rtlbg.gif) no-repeat right top; + overflow: hidden; /* for IE7. to prevent long titles from 'falling' 3cm down */ } .tabrow0 A SPAN { @@ -333,10 +401,21 @@ form.mform .fitemtitle { BACKGROUND-IMAGE: none } +.tabrow0 .here A:link, +.tabrow0 .here A:visited { + /* has to override styles.css 'position:relative', otherwise the active tab title disappears on IE6/7 */ + position: static; +} .tabrow0 ul a { PADDING-LEFT: 0px; } +div.tabrow1 { +/* without that, IE will leave a short line floating, when there's ho secondary menu */ + #right: 0px; /* IE only */ + #width: 800px; /* IE only */ +} + UL.tabrow1 { right: 0px; width: 800px; @@ -349,10 +428,23 @@ UL.tabrow1 li { float: right; } +.tabtree { + /* give some space below the tabs row (when there's a secondary row) on firefox */ + margin-bottom:15px; + + /* has to override 'height:100%' in styles_ie6.css, otherwise it causes a huge height in quiz report overview, e.g.: moodle/mod/quiz/report.php?q=14&mode=overview */ + height: auto !important; +} + .tabtree * { width: auto; } +/* notify-problem line gets covered by secondary tabs line (tabrow1), add some height to the line **** */ +.notifyproblem { + line-height: 40px; +} + /* ======================== overrides styles_ie6 ======================== */ @@ -370,7 +462,7 @@ FORM.mform INPUT { direction: rtl; } -form#adminsettings div.htmlarea { - clear: right; +.htmlarea * select { + max-width: 100px; }