MDL-27516 Several CSS fixes for right to left languages
authorNadav Kavalerchik <nadavkav@gmail.com>
Wed, 16 Nov 2011 22:28:07 +0000 (11:28 +1300)
committerSam Hemelryk <sam@moodle.com>
Wed, 16 Nov 2011 22:42:12 +0000 (11:42 +1300)
mod/quiz/styles.css
mod/wiki/styles.css
theme/base/style/core.css
theme/base/style/course.css
theme/standard/style/core.css
webservice/renderer.php

index 60d83d4..f963409 100644 (file)
@@ -96,6 +96,13 @@ div.editq div.question div.content .singlequestion a .questiontext{text-decorati
 #page-mod-quiz-mod #reviewoptionshdr fieldset.fgroup span label,
 #adminquizreviewoptions span label {margin-left: 0.4em;}
 
+#page-mod-quiz-mod.dir-rtl #reviewoptionshdr .fitem,
+#adminquizreviewoptions .group {float: right; width: 24%;}
+#page-mod-quiz-mod.dir-rtl #reviewoptionshdr fieldset.fgroup span,
+#adminquizreviewoptions span {float: right; clear: right;}
+#page-mod-quiz-mod.dir-rtl #reviewoptionshdr .fitemtitle,
+#adminquizreviewoptions .fitemtitle {text-align: right;}
+
 /** Mod quiz view **/
 #page-mod-quiz-view .quizinfo,
 #page-mod-quiz-view #page .quizgradefeedback,
@@ -377,4 +384,4 @@ bank window's title is prominent enough*/
 .qnum label {padding-right: 0.25em;}
 
 /** settings.php */
-#adminquizreviewoptions {margin-bottom: 0.5em;}
+#adminquizreviewoptions {margin-bottom: 0.5em;}
\ No newline at end of file
index 18e0391..dcfd480 100644 (file)
     float: right;
 }
 
+.dir-rtl .wiki_diffuserleft {
+    float: left;
+}
+
 .wiki_diffuserright {
     float: left;
 }
index 4976044..3abeb99 100644 (file)
@@ -218,6 +218,8 @@ a.skip:active {position: static;display: block;}
 .mform .ftags label.accesshide {display: block;position: static;}
 .mform .ftags select {margin-bottom: 0.7em;min-width: 22em;}
 
+input#id_externalurl {direction:ltr;}
+
 /** Browser corrections for mforms **/
 .ie .mform .fitem .felement {margin-left:0;text-align:left;float:left;}
 /** Fix IE double margin + float bugs **/
@@ -720,6 +722,23 @@ body.tag .managelink {padding: 5px;}
 .mod-indent-15,
 .mod-indent-huge {margin-left:300px;}
 
+.dir-rtl .mod-indent-1 {margin-right:20px;margin-left:0;}
+.dir-rtl .mod-indent-2 {margin-right:40px;margin-left:0;}
+.dir-rtl .mod-indent-3 {margin-right:60px;margin-left:0;}
+.dir-rtl .mod-indent-4 {margin-right:80px;margin-left:0;}
+.dir-rtl .mod-indent-5 {margin-right:100px;margin-left:0;}
+.dir-rtl .mod-indent-6 {margin-right:120px;margin-left:0;}
+.dir-rtl .mod-indent-7 {margin-right:140px;margin-left:0;}
+.dir-rtl .mod-indent-8 {margin-right:160px;margin-left:0;}
+.dir-rtl .mod-indent-9 {margin-right:180px;margin-left:0;}
+.dir-rtl .mod-indent-10 {margin-right:200px;margin-left:0;}
+.dir-rtl .mod-indent-11 {margin-right:220px;margin-left:0;}
+.dir-rtl .mod-indent-12 {margin-right:240px;margin-left:0;}
+.dir-rtl .mod-indent-13 {margin-right:260px;margin-left:0;}
+.dir-rtl .mod-indent-14 {margin-right:280px;margin-left:0;}
+.dir-rtl .mod-indent-15,
+.dir-rtl .mod-indent-huge {margin-right:300px;margin-left:0;}
+
 .dir-rtl .felement.feditor select {margin-right:18.75%;}
 
 /* Resourcelib mp3 player size: only width could be changed here, height hardcoded in JS */
@@ -804,3 +823,53 @@ ul li,
 ol li,
 .course-content ul.weeks .content .summary ol li,
 .course-content ul.topics .content .summary ol li {list-style: decimal outside none;}
+
+.dir-rtl #adminsettings #id_s__pathtodu,
+.dir-rtl #adminsettings #id_s__aspellpath,
+.dir-rtl #adminsettings #id_s__pathtodot,
+.dir-rtl #adminsettings #id_s__supportemail,
+.dir-rtl #adminsettings #id_s__supportpage,
+.dir-rtl #adminsettings #id_s__sessioncookie,
+.dir-rtl #adminsettings #id_s__sessioncookiepath,
+.dir-rtl #adminsettings #id_s__sessioncookiedomain,
+.dir-rtl #adminsettings #id_s__proxyhost,
+.dir-rtl #adminsettings #id_s__proxyuser,
+.dir-rtl #adminsettings #id_s__proxypassword,
+.dir-rtl #adminsettings #id_s__proxybypass,
+.dir-rtl #adminsettings #id_s__jabberhost,
+.dir-rtl #adminsettings #id_s__jabberserver,
+.dir-rtl #adminsettings #id_s__jabberusername,
+.dir-rtl #adminsettings #id_s__jabberpassword,
+.dir-rtl #adminsettings #id_s__additionalhtmlhead,
+.dir-rtl #adminsettings #id_s__additionalhtmltopofbody,
+.dir-rtl #adminsettings #id_s__additionalhtmlfooter,
+.dir-rtl #adminsettings #id_s__docroot,
+.dir-rtl #adminsettings #id_s__filter_tex_latexpreamble,
+.dir-rtl #adminsettings #id_s__filter_tex_latexbackground,
+.dir-rtl #adminsettings #id_s__filter_tex_pathlatex,
+.dir-rtl #adminsettings #id_s__filter_tex_pathdvips,
+.dir-rtl #adminsettings #id_s__filter_tex_pathconvert,
+.dir-rtl #adminsettings #id_s__blockedip,
+.dir-rtl #adminsettings #id_s__pathtoclam,
+.dir-rtl #adminsettings #id_s__quarantinedir,
+.dir-rtl #adminsettings #id_s__sitepolicy,
+.dir-rtl #adminsettings #id_s__sitepolicyguest,
+.dir-rtl #adminsettings #id_s__cronremotepassword,
+.dir-rtl #adminsettings #id_s__allowedip,
+.dir-rtl #adminsettings #id_s__blockedip,
+.dir-rtl #adminsettings #id_s_enrol_meta_nosyncroleids,
+.dir-rtl #adminsettings #id_s_enrol_ldap_host_url,
+.dir-rtl #adminsettings #id_s_enrol_ldap_ldapencoding,
+.dir-rtl #adminsettings #id_s_enrol_ldap_bind_dn,
+.dir-rtl #adminsettings #id_s_enrol_ldap_bind_pw,
+.dir-rtl #adminsettings #admin-emoticons .form-text,
+.dir-rtl #adminsettings #admin-role_mapping input[type=text],
+.dir-rtl #adminsettings #id_s_enrol_paypal_paypalbusiness,
+.dir-rtl #adminsettings #id_s_enrol_flatfile_location,
+#page-admin-setting-enrolsettingsflatfile.dir-rtl input[type=text],
+#page-admin-setting-enrolsettingsdatabase.dir-rtl input[type=text],
+#page-admin-auth-db.dir-rtl input[type=text] {direction: ltr;}
+
+#page-admin-setting-enrolsettingsflatfile.dir-rtl .informationbox {direction: ltr;text-align: left;}
+
+#page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {margin-right: 170px;}
\ No newline at end of file
index 3062ac6..37f9792 100644 (file)
@@ -27,7 +27,7 @@
 .path-course-view li.activity form.togglecompletion .ajaxworking {position:absolute;top:0; left:20px;width: 20px; height: 20px;background: url([[pix:i/ajaxloader]]) no-repeat;}
 .dir-rtl.path-course-view li.activity {margin-right:0px;margin-left:20px;}
 .dir-rtl.path-course-view li.activity form.togglecompletion,
-.dir-rtl.path-course-view li.activity span.autocompletion {right:auto;left:-20px;}
+.dir-rtl.path-course-view li.activity span.autocompletion {right:auto;right:-20px;}
 
 .section img.movetarget {height:16px;width:80px;}
 
index 12cf9d8..4b69618 100644 (file)
@@ -277,6 +277,8 @@ h2.tag-heading {text-align:center;margin-left:auto;margin-right:auto;width:95%;}
 #tags-management-links,
 .tag .managelink {text-align:right;}
 table#tag-management-list {margin: 10px auto;width: 80%;}
+#page-tag-index.dir-rtl .relatedpages {text-align:center;}
+#page-tag-index.dir-rtl .user-box {float:right;}
 
 /**
  * Overriding base
index 37b9935..75668fd 100644 (file)
@@ -46,15 +46,24 @@ class core_webservice_renderer extends plugin_renderer_base {
         $table->cellspacing = 0;
         $table->cellpadding = 0;
 
+        // LTR/RTL support, for drawing button arrows in the right direction
+        if (right_to_left()) {
+            $addarrow = '▶';
+            $removearrow = '◀';
+        } else {
+            $addarrow = '◀';
+            $removearrow = '▶';
+        }
+
         //create the add and remove button
         $addinput = html_writer::empty_tag('input',
                         array('name' => 'add', 'id' => 'add', 'type' => 'submit',
-                            'value' => '◀' . ' ' . get_string('add'),
+                            'value' => $addarrow . ' ' . get_string('add'),
                             'title' => get_string('add')));
         $addbutton = html_writer::tag('div', $addinput, array('id' => 'addcontrols'));
         $removeinput = html_writer::empty_tag('input',
                         array('name' => 'remove', 'id' => 'remove', 'type' => 'submit',
-                            'value' => '▶' . ' ' . get_string('remove'),
+                            'value' => $removearrow . ' ' . get_string('remove'),
                             'title' => get_string('remove')));
         $removebutton = html_writer::tag('div', $removeinput, array('id' => 'removecontrols'));