Permalink
Browse files

CSS MDL-26013 Fixed several display bugs when using right to left lan…

…guages
  • Loading branch information...
1 parent 50467e5 commit a7e920fbfbe397e449a28e72a98ae5bde9a3232f @nadavkav nadavkav committed with Sam Hemelryk Apr 14, 2011
@@ -1,5 +1,9 @@
.block_messages .content {text-align:left;padding-top:5px;}
.block_messages .content .list li.listentry {clear:both;}
-.block_messages .content .list li.listentry div.user {float:left;position:relative;}
-.block_messages .content .list li.listentry div.message {float:right;}
-.block_messages .content .footer {clear:both;}
+.block_messages .content .list li.listentry .user {float:left;position:relative;}
+.block_messages .content .list li.listentry .message {float:right;}
+.block_messages .content .info {text-align:center;}
+.block_messages .content .footer {clear:both;}
+
+.dir-rtl .block_messages .content .list li.listentry .user {float:right;}
+.dir-rtl .block_messages .content .list li.listentry .message {float:left;}
@@ -35,16 +35,18 @@
.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 li.depth_2 ul {padding-left:0;padding-right: 7px;}
.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 .block_navigation .block_tree,
+.dir-rtl .block_navigation .block_tree li ul,
+.dir-rtl .block_navigation .block_tree .navigation_node.tree_item.branch,
+.dir-rtl .block_navigation .block_tree .root_node.leaf {padding-right:0;}
+
+.dir-rtl .block_navigation .block_tree li.item_with_icon > p img,
+.dir-rtl .block_navigation .block_tree .type_activity > .tree_item.branch img {right:0;left:auto;}
.jsenabled.dir-rtl .block_navigation .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty_rtl]]);background-position: center right;}
.jsenabled.dir-rtl .block_navigation .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed_rtl]]);}
@@ -1,3 +1,7 @@
.block_online_users .content .list li.listentry {clear:both;}
-.block_online_users .content .list li.listentry div.user {float:left;position:relative;}
-.block_online_users .content .list li.listentry div.message {float:right;}
+.block_online_users .content .list li.listentry .user {float:left;position:relative;}
+.block_online_users .content .list li.listentry .message {float:right;}
+.block_online_users .content .info {text-align:center;}
+
+.dir-rtl .block_online_users .content .list li.listentry .user {float:right;}
+.dir-rtl .block_online_users .content .list li.listentry .message {float:left;}
@@ -1,4 +1,6 @@
.block_recent_activity .activitydate,
.block_recent_activity .activityhead {text-align:center;}
.block_recent_activity .unlist li {margin-bottom:1em;}
-.block_recent_activity li .head .date {float:right;}
+.block_recent_activity li .head .date {float:right;}
+
+.dir-rtl .block_recent_activity .content h3 {text-align: right;}
@@ -26,8 +26,9 @@
/** 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 li ul {padding-left:0;padding-right: 7px;}
+.dir-rtl .block_settings .block_tree li.item_with_icon > p img,
+.dir-rtl .block_navigation .block_tree .type_activity > .tree_item.branch img {left:auto;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;}
@@ -70,3 +70,7 @@ Structure of the user enroller panel
.user-enroller-panel .collapsiblearea {border:1px solid #bbb;background-color:#f6f6f6;}
.user-enroller-panel .collapsiblearea.hidden {display:none;}
.user-enroller-panel .collapsiblearea .uep-enrolment-option {margin:5px 1em;}
+
+.dir-rtl .user-enroller-panel .uep-header .close {right: auto;left:1em;}
+.dir-rtl .user-enroller-panel .uep-search-results .user { text-align: right;}
+.dir-rtl .user-enroller-panel .uep-content .uep-controls { text-align: right;}
@@ -37,3 +37,9 @@
#page-mod-assignment-submissions .optionspref {width: 50%;}
#page-mod-assignment-submissions .fastgbutton {text-align: center;}
+
+#page-mod-assignment-submissions.dir-rtl .fullname,
+#page-mod-assignment-submissions.dir-rtl .timemodified,
+#page-mod-assignment-submissions.dir-rtl .timemarked {text-align:right;}
+#page-mod-assignment-submissions.dir-rtl .mform.optionspref .fitem .fitemtitle {text-align:left;}
+#page-mod-assignment-type-uploadsingle-upload.dir-rtl .mdl-left {text-align:right;}
@@ -1,5 +1,5 @@
.yui-skin-sam .yui-layout .yui-layout-hd { border:0; }
-.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd { border:0; }
+.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd { border:0; }
.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd { border:0; }
.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-unit-right { background: white; }
.yui-skin-sam .yui-layout-unit-bottom { background: #F2F2F2; }
@@ -8,44 +8,46 @@
.yui-skin-sam .yui-layout-unit-top { background: #FFE39D; }
.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd { background: transparent; }
-#input-message {
- background:#FFFFFF url(input.png) repeat-x scroll 0 0;
- padding:0 9px;
- border: 1px solid #999;
- border-radius: 9px;
- -moz-border-radius: 9px;
-}
-.mdl-chat-entry, .mdl-chat-my-entry {
- clear:both;
-}
-.chat-message td {
- padding: 0;
-}
+#input-message {background:#FFFFFF url(input.png) repeat-x scroll 0 0;padding:0 9px;border: 1px solid #999;border-radius: 9px;-moz-border-radius: 9px;}
+.mdl-chat-entry,
+.mdl-chat-my-entry {clear:both;}
+.chat-message td {padding: 0;}
-.mdl-chat-entry .topleft { background:transparent url(bubbles.png) no-repeat scroll left top; height:9px; width:18px; }
-.mdl-chat-entry .top { background:transparent url(horizontal.png) repeat-x scroll center top; font-size:1px; height:9px; }
-.mdl-chat-entry .topright { background:transparent url(bubbles.png) no-repeat scroll -18px top; height:9px; width:11px; }
-.mdl-chat-entry .left { background:transparent url(vertical.png) repeat-y scroll left center; width:18px; }
-.mdl-chat-entry .conmts { background:#DCDCDC none repeat scroll 0 0; color:#000000; text-shadow:0 1px 0 #EEEEEE; }
-.mdl-chat-entry .right { background:transparent url(vertical.png) repeat-y scroll -18px 0; width:11px; }
-.mdl-chat-entry .bottomleft { background:transparent url(bubbles.png) no-repeat scroll left -9px; height:12px; width:18px; }
-.mdl-chat-entry .bottomright { background:transparent url(bubbles.png) no-repeat scroll right -9px; height:12px; width:11px; }
-.mdl-chat-entry .bottom { background:transparent url(horizontal.png) repeat-x scroll 0 -9px; height:12px; }
+.mdl-chat-entry .topleft {background:transparent url(bubbles.png) no-repeat scroll left top; height:9px; width:18px;}
+.mdl-chat-entry .top {background:transparent url(horizontal.png) repeat-x scroll center top; font-size:1px; height:9px;}
+.mdl-chat-entry .topright {background:transparent url(bubbles.png) no-repeat scroll -18px top; height:9px; width:11px;}
+.mdl-chat-entry .left {background:transparent url(vertical.png) repeat-y scroll left center; width:18px;}
+.mdl-chat-entry .conmts {background:#DCDCDC none repeat scroll 0 0; color:#000000; text-shadow:0 1px 0 #EEEEEE;}
+.mdl-chat-entry .right {background:transparent url(vertical.png) repeat-y scroll -18px 0; width:11px;}
+.mdl-chat-entry .bottomleft {background:transparent url(bubbles.png) no-repeat scroll left -9px; height:12px; width:18px;}
+.mdl-chat-entry .bottomright {background:transparent url(bubbles.png) no-repeat scroll right -9px; height:12px; width:11px;}
+.mdl-chat-entry .bottom {background:transparent url(horizontal.png) repeat-x scroll 0 -9px; height:12px;}
-.mdl-chat-my-entry .topleft{background:url(bubbles.png) no-repeat 0 -21px;height:9px;width:11px;}
-.mdl-chat-my-entry .topright{background:url(bubbles.png) no-repeat -11px -21px;height:9px;width:18px;}
-.mdl-chat-my-entry .bottomleft{background:url(bubbles.png) no-repeat 0 bottom;width:11px;height:12px;}
-.mdl-chat-my-entry .bottomright{background:url(bubbles.png) no-repeat right bottom;width:18px;height:12px;}
-.mdl-chat-my-entry .top{background:url(horizontal.png) repeat-x 0 -21px;font-size:1px;height:9px;}
-.mdl-chat-my-entry .bottom{background:url(horizontal.png) repeat-x bottom;height:12px;}
-.mdl-chat-my-entry .left{background:url(vertical.png) repeat-y -29px 0;width:11px;}
-.mdl-chat-my-entry .right{background:url(vertical.png) repeat-y right;width:18px;}
-.mdl-chat-my-entry .conmts{background:#C0E668;color:#000;}
-#chat-input-area ,#chat-input-area table.generaltable, #chat-input-area table.generaltable td.cell {
- background: #92B3E8;
- border: 0;
-}
-#chat-userlist {
- background: #E3E8F0;
- height: 100%;
-}
+.mdl-chat-my-entry .topleft {background:url(bubbles.png) no-repeat 0 -21px;height:9px;width:11px;}
+.mdl-chat-my-entry .topright {background:url(bubbles.png) no-repeat -11px -21px;height:9px;width:18px;}
+.mdl-chat-my-entry .bottomleft {background:url(bubbles.png) no-repeat 0 bottom;width:11px;height:12px;}
+.mdl-chat-my-entry .bottomright {background:url(bubbles.png) no-repeat right bottom;width:18px;height:12px;}
+.mdl-chat-my-entry .top {background:url(horizontal.png) repeat-x 0 -21px;font-size:1px;height:9px;}
+.mdl-chat-my-entry .bottom {background:url(horizontal.png) repeat-x bottom;height:12px;}
+.mdl-chat-my-entry .left {background:url(vertical.png) repeat-y -29px 0;width:11px;}
+.mdl-chat-my-entry .right {background:url(vertical.png) repeat-y right;width:18px;}
+.mdl-chat-my-entry .conmts {background:#C0E668;color:#000;}
+
+#chat-input-area,
+#chat-input-area table.generaltable,
+#chat-input-area table.generaltable td.cell {background: #92B3E8;border: 0;}
+#chat-userlist {background: #E3E8F0;height: 100%;}
+
+.dir-rtl .mdl-chat-entry .topleft {background-position: -18px 0;width:11px;}
+.dir-rtl .mdl-chat-entry .topright {background-position: 0 0;width:18px;}
+.dir-rtl .mdl-chat-entry .bottomleft {background-position: -18px -9px;width:11px;}
+.dir-rtl .mdl-chat-entry .bottomright {background-position: 0 -9px;width:18px;}
+.dir-rtl .mdl-chat-entry .right {background-position: 0 0;width:18px;}
+.dir-rtl .mdl-chat-entry .left {background-position: -18px 0;width:11px;}
+
+.dir-rtl .mdl-chat-my-entry .topleft {background-position: -13px -21px;width:18px;}
+.dir-rtl .mdl-chat-my-entry .topright {background-position: 0 -21px;width:11px;}
+.dir-rtl .mdl-chat-my-entry .bottomleft {background-position: -13px -30px;width:18px;}
+.dir-rtl .mdl-chat-my-entry .bottomright {background-position: 0 -30px;width:11px;}
+.dir-rtl .mdl-chat-my-entry .right {background-position: -29px 0;width:11px;}
+.dir-rtl .mdl-chat-my-entry .left {background-position: -42px 0;width:18px;}
@@ -1,5 +1,5 @@
.yui-skin-sam .yui-layout .yui-layout-hd { border:0; }
-.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd { border:0; }
+.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd { border:0; }
.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd { border:0; }
.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-unit-right { background: white; }
.yui-skin-sam .yui-layout-unit-bottom { background: #F2F2F2; }
@@ -59,3 +59,6 @@
background: #E3E8F0;
height: 100%;
}
+
+.dir-rtl .chat-message {text-align:right;}
+.dir-rtl .mdl-chat-my-entry .chat-message .text {text-align:right;}
View
@@ -500,50 +500,46 @@ function data_generate_default_template(&$data, $template, $recordid=0, $form=fa
// get all the fields for that database
if ($fields = $DB->get_records('data_fields', array('dataid'=>$data->id), 'id')) {
- $str = '<div class="defaulttemplate">';
- $str .= '<table cellpadding="5">';
-
+ $table = new html_table();
+ $table->attributes['class'] = 'mod-data-default-template';
+ $table->colclasses = array('template-field', 'template-token');
+ $table->data = array();
foreach ($fields as $field) {
-
- $str .= '<tr><td valign="top" align="right">';
- // Yu: commenting this out, the id was wrong and will fix later
- //if ($template == 'addtemplate') {
- //$str .= '<label';
- //if (!in_array($field->type, array('picture', 'checkbox', 'date', 'latlong', 'radiobutton'))) {
- // $str .= ' for="[['.$field->name.'#id]]"';
- //}
- //$str .= '>'.$field->name.'</label>';
-
- //} else {
- $str .= $field->name.': ';
- //}
- $str .= '</td>';
-
- $str .='<td align="left">';
if ($form) { // Print forms instead of data
$fieldobj = data_get_field($field, $data);
- $str .= $fieldobj->display_add_field($recordid);
-
+ $token = $fieldobj->display_add_field($recordid);
} else { // Just print the tag
- $str .= '[['.$field->name.']]';
+ $token = '[['.$field->name.']]';
}
- $str .= '</td></tr>';
-
+ $table->data[] = array(
+ $field->name.': ',
+ $token
+ );
}
if ($template == 'listtemplate') {
- $str .= '<tr><td align="center" colspan="2">##edit## ##more## ##delete## ##approve## ##export##</td></tr>';
+ $cell = new html_table_cell('##edit## ##more## ##delete## ##approve## ##export##');
+ $cell->colspan = 2;
+ $cell->attributes['class'] = 'controls';
+ $table->data[] = new html_table_row(array($cell));
} else if ($template == 'singletemplate') {
- $str .= '<tr><td align="center" colspan="2">##edit## ##delete## ##approve## ##export##</td></tr>';
+ $cell = new html_table_cell('##edit## ##delete## ##approve## ##export##');
+ $cell->colspan = 2;
+ $cell->attributes['class'] = 'controls';
+ $table->data[] = new html_table_row(array($cell));
} else if ($template == 'asearchtemplate') {
- $str .= '<tr><td valign="top" align="right">'.get_string('authorfirstname', 'data').': </td><td>##firstname##</td></tr>';
- $str .= '<tr><td valign="top" align="right">'.get_string('authorlastname', 'data').': </td><td>##lastname##</td></tr>';
+ $row = new html_table_row(get_string('authorfirstname', 'data').': ', '##firstname##');
+ $row->attributes['class'] = 'searchcontrols';
+ $table->data[] = $row;
+ $row = new html_table_row(get_string('authorlastname', 'data').': ', '##lastname##');
+ $row->attributes['class'] = 'searchcontrols';
+ $table->data[] = $row;
}
- $str .= '</table>';
- $str .= '</div>';
-
+ $str = html_writer::start_tag('div', array('class' => 'defaulttemplate'));
+ $str .= html_writer::table($table);
+ $str .= html_writer::end_tag('div');
if ($template == 'listtemplate'){
- $str .= '<hr />';
+ $str .= html_writer::empty_tag('hr');
}
if ($update) {
View
@@ -19,4 +19,18 @@
.path-mod-data-field .fieldadd select,
.path-mod-data-field .sortdefault select {margin-left: 1em;}
.path-mod-data-field .fieldname,
-.path-mod-data-field .fielddescription {width:300px;}
+.path-mod-data-field .fielddescription {width:300px;}
+
+/** UI Usability Hacks **/
+#page-mod-data-export #notice span {padding:0 10px;}
+#page-mod-data-edit input[id*="url"] {text-align:left;direction:ltr;}
+
+.mod-data-default-template td {vertical-align:top;}
+.mod-data-default-template .template-field {text-align:right;}
+.mod-data-default-template .template-token {text-align:left;}
+.mod-data-default-template .controls {text-align:center;}
+.mod-data-default-template searchcontrols {text-align:right;}
+
+.dir-rtl .mod-data-default-template .template-field {text-align:left;}
+.dir-rtl .mod-data-default-template .template-token {text-align:right;}
+.dir-rtl .mod-data-default-template searchcontrols {text-align:left;}
View
@@ -314,6 +314,10 @@ a.wiki_edit_section {
text-align: left;
}
+.dir-rtl #wiki_printable_content {
+ text-align: right;
+}
+
#wiki_printable_content a {
color: black;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit a7e920f

Please sign in to comment.