Permalink
Browse files

MDL-22952 (bulk commit) - Fixed bidirectional page problems (right to…

… left)
  • Loading branch information...
rwijaya committed Jul 13, 2010
1 parent 63b4eb0 commit 43c90b9b0fe7dcfc8d1049f19867421e4958ac03
@@ -25,4 +25,19 @@
.jsenabled .block_navigation .block_tree_box .requiresjs {display:inline;}
/** Internet explorer specific rules **/
-.ie6 .block_navigation .block_tree .tree_item {width:100%;}
+.ie6 .block_navigation .block_tree .tree_item {width:100%;}
+
+/** Overide for RTL layout **/
+.dir-rtl .block_navigation .block_tree {padding-right:0px;}
+.dir-rtl .block_navigation .block_tree li.item_with_icon > p img {right:0;}
+
+.dir-rtl .block_navigation .block_tree li ul {padding-right:0;}
+.dir-rtl .block_navigation .block_tree li.depth_2 ul {padding-right:16px;}
+.dir-rtl .block_navigation .block_tree .tree_item {padding-right: 18px;text-align:right;}
+
+.dir-rtl .block_navigation .block_tree .tree_item.branch {background-position: center right;}
+.dir-rtl .block_navigation .block_tree .navigation_node.tree_item.branch {padding-right:0;}
+.dir-rtl .block_navigation .block_tree .root_node.leaf {padding-right:0px;}
+
+.dir-rtl.jsenabled .block_navigation .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty_rtl]]);background-position: center right;}
+.dir-rtl.jsenabled .block_navigation .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed_rtl]]);}
View
@@ -22,4 +22,15 @@
.jsenabled .block_settings .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed]]);}
/** Internet explorer specific rules **/
-.ie6 .block_settings .block_tree .tree_item {width:100%;}
+.ie6 .block_settings .block_tree .tree_item {width:100%;}
+
+/** Overide for RTL layout **/
+.dir-rtl .block_settings .block_tree {padding-right:0px;}
+.dir-rtl .block_settings .block_tree li ul {padding-right:16px;}
+.dir-rtl .block_settings .block_tree li.item_with_icon > p img {right:0;}
+.dir-rtl .block_settings .block_tree .tree_item {padding-right: 18px;text-align:right;}
+.dir-rtl .block_settings .block_tree .tree_item.branch {background-position: center right;}
+.dir-rtl .block_settings .block_tree .root_node.leaf {padding-right:0px;}
+
+.dir-rtl.jsenabled .block_settings .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty_rtl]]);background-position: center right;}
+.dir-rtl.jsenabled .block_settings .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed_rtl]]);}
View
@@ -681,10 +681,19 @@ function calendar_top_controls($type, $data) {
list($nextmonth, $nextyear) = calendar_add_month($data['m'], $data['y']);
$nextlink = calendar_get_link_next(get_string('monthnext', 'access'), 'index.php?', 0, $nextmonth, $nextyear, $accesshide=true);
$prevlink = calendar_get_link_previous(get_string('monthprev', 'access'), 'index.php?', 0, $prevmonth, $prevyear, true);
- $content .= "\n".'<div class="calendar-controls">'. $prevlink;
- $content .= '<span class="hide"> | </span><span class="current"><a href="'.calendar_get_link_href(CALENDAR_URL.'view.php?view=month'.$courseid.'&amp;', 1, $data['m'], $data['y']).'">'.userdate($time, get_string('strftimemonthyear')).'</a></span>';
- $content .= '<span class="hide"> | </span>'. $nextlink ."\n";
- $content .= "<span class=\"clearer\"><!-- --></span></div>\n";
+
+ if (right_to_left()) {
+ $content .= "\n".'<div class="calendar-controls">'. $nextlink;
+ $content .= '<span class="hide"> | </span><span class="current"><a href="'.calendar_get_link_href(CALENDAR_URL.'view.php?view=month'.$courseid.'&amp;', 1, $data['m'], $data['y']).'">'.userdate($time, get_string('strftimemonthyear')).'</a></span>';
+ $content .= '<span class="hide"> | </span>'. $prevlink ."\n";
+ $content .= "<span class=\"clearer\"><!-- --></span></div>\n";
+ } else {
+ $content .= "\n".'<div class="calendar-controls">'. $prevlink;
+ $content .= '<span class="hide"> | </span><span class="current"><a href="'.calendar_get_link_href(CALENDAR_URL.'view.php?view=month'.$courseid.'&amp;', 1, $data['m'], $data['y']).'">'.userdate($time, get_string('strftimemonthyear')).'</a></span>';
+ $content .= '<span class="hide"> | </span>'. $nextlink ."\n";
+ $content .= "<span class=\"clearer\"><!-- --></span></div>\n";
+ }
+
break;
case 'course':
list($prevmonth, $prevyear) = calendar_sub_month($data['m'], $data['y']);
@@ -925,6 +934,7 @@ function calendar_get_link_previous($text, $linkbase, $d, $m, $y, $accesshide=fa
function calendar_get_link_next($text, $linkbase, $d, $m, $y, $accesshide=false) {
$href = calendar_get_link_href($linkbase, $d, $m, $y);
if(empty($href)) return $text;
+
return link_arrow_right($text, $href, $accesshide, 'next');
}
@@ -218,4 +218,8 @@ html, body {background-color:#C8C9C7;}
.user #participantsform table {margin-top:1em;}
.user #participantsform td {text-align:left;}
.user table.controls {margin:5px auto;border:1px solid #DDD;background-color:#EEE;border-collapse: collapse;}
-.user table.controls td {border-width:0px;}
+.user table.controls td {border-width:0px;}
+
+/** Overide for RTL layout **/
+.dir-rtl #page-header .navbar .breadcrumb {float:right;}
+.dir-rtl #page-header .navbar .navbutton {float:left;}
@@ -158,3 +158,8 @@
.admin_colourpicker .colourdialogue {float:left;border:1px solid #000;}
.admin_colourpicker .previewcolour {border:1px solid #000;margin-left:301px;}
.admin_colourpicker .currentcolour {border:1px solid #000;margin-left:301px;border-top-width:0;}
+
+/** Overide for RTL layout **/
+.dir-rtl #adminsettings .form-item .form-setting,
+.dir-rtl #adminsettings .form-item .form-label,
+.dir-rtl #adminsettings .form-item .form-description { float: right;text-align: right}
@@ -23,4 +23,8 @@
/** List block contents **/
.block .list .c0 {display:inline;}
-.block .list .c1 {margin-left:5px;display:inline;}
+.block .list .c1 {margin-left:5px;display:inline;}
+
+/** Overide for RTL layout **/
+.dir-rtl .block .header .block_action {float:left;}
+.dir-rtl .block .header .commands { text-align: right;}
View
@@ -192,6 +192,8 @@ a.skip:active {position: static;display: block;}
.mform fieldset.fdate_selector label {display:inline;float: none;width: auto;}
.mform .ftags label.accesshide {display: block;position: static;}
.mform .ftags select {margin-bottom: 0.7em;min-width: 22em;}
+.mform .fitem .felement {margin-right:16%;}
+
/** Browser corrections for mforms **/
.ie .mform .fitem .felement {margin-left:0;text-align:left;float:left;}
/** Fix IE double margin + float bugs **/
@@ -620,4 +622,14 @@ body.tag .managelink {padding: 5px;}
.userenrolment .col_group .addgroup {float:right;width:18px;margin:3px;height:18px;text-align:center;}
.userenrolment .col_group .addgroup a img {vertical-align:bottom;}
.userenrolment .col_enrol .enrolment {float:left;padding:3px;margin:3px;}
-.userenrolment .col_enrol .enrolment a {float:right;margin-left:3px;}
+.userenrolment .col_enrol .enrolment a {float:right;margin-left:3px;}
+
+/** Overide for RTL layout **/
+.dir-rtl .headermain {float:right;}
+.dir-rtl .headermenu {float:left;}
+.dir-rtl .breadcrumb {float:right;}
+.dir-rtl .navbutton {float: left;}
+.dir-rtl .breadcrumb ul li { float: right; margin-left: 5px;}
+.dir-rtl .mform .fitem .fitemtitle {float:right;}
+.dir-rtl .loginbox .loginform .form-label {float:right;text-align:left;}
+.dir-rtl .loginbox .loginform .form-input {text-align: right;}
@@ -102,4 +102,11 @@
.jsenabled .course_category_tree .controls {visibility: visible;}
.jsenabled .course_category_tree .category.with_children.collapsed .category_label {background-image:url([[pix:moodle|t/collapsed]]);}
.jsenabled .course_category_tree .category.with_children.collapsed .subcategories,
-.jsenabled .course_category_tree .category.with_children.collapsed .courses {display:none;}
+.jsenabled .course_category_tree .category.with_children.collapsed .courses {display:none;}
+
+/** Overide for RTL layout **/
+.dir-rtl .coursebox .info {float: right; text-align: right;}
+.dir-rtl .coursebox .summary {text-align:right;}
+.dir-rtl .course_category_tree .category.with_children> .category_label {background-position: center right; padding-right: 18px;}
+.dir-rtl .course_category_tree .category_label, .dir-rtl .course_category_tree .category .course {padding-right:18px;}
+.dir-rtl.jsenabled .course_category_tree .category.with_children.collapsed .category_label {background-image:url([[pix:moodle|t/collapsed_rtl]]);}
@@ -25,4 +25,7 @@ body.has_dock {margin-left:30px;}
#dockeditempanel .dockeditempanel_hd {border-bottom:1px solid #000;text-align:right;}
#dockeditempanel .dockeditempanel_hd h2 {display:inline;margin:0;padding-right:1em;}
#dockeditempanel .dockeditempanel_hd .commands {display:inline;}
-#dockeditempanel .dockeditempanel_hd .commands img {margin-right:2px;vertical-align:middle;}
+#dockeditempanel .dockeditempanel_hd .commands img {margin-right:2px;vertical-align:middle;}
+
+/** Overide for RTL layout **/
+.dir-rtl #dockeditempanel {left:670%;}
@@ -41,3 +41,8 @@
#userselector_options .collapsibleregioncaption {font-weight: bold;}
#userselector_options p {margin:0.2em 0;text-align:left;}
#page-user-profile .messagebox {text-align:center;margin-left:auto;margin-right:auto;}
+
+/** Overide for RTL layout **/
+.dir-rtl .userprofile .profilepicture {float:right; margin-left:20px;margin-right:0px;}
+.dir-rtl .descriptionbox {margin-right: 110px;margin-left: 0px; }=======
+
@@ -650,7 +650,7 @@ h2.headingblock {
}
.forumpost .content {
- border-width: 0 1px 1px;
+ border-width: 1px ;
border-color: #a0c278;
border-style: solid;
padding: 5px 10px;
@@ -83,7 +83,9 @@ body {
margin: 0 auto;
text-align: left;
}
-
+.dir-rtl .loginbox .loginform .form-label {
+ text-align: right;
+}
.loginbox .loginform .form-input {
float: none;
width: 100%;

0 comments on commit 43c90b9

Please sign in to comment.