Browse Source

Fixed some rtl issues with the new theme

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
3f571ca569
3 changed files with 49 additions and 16 deletions
  1. 7 0
      Themes/default/css/index.css
  2. 30 4
      Themes/default/css/rtl.css
  3. 12 12
      Themes/default/index.template.php

+ 7 - 0
Themes/default/css/index.css

@@ -1208,6 +1208,13 @@ div#admin_menu {
 	line-height: 1.8em;
 }
 
+li#collapse_button {
+	float: right;
+	position: absolute;
+	top: 0;
+	right: 0;
+}
+
 /* Styles for the standard button lists.
 ------------------------------------------------------- */
 

+ 30 - 4
Themes/default/css/rtl.css

@@ -107,6 +107,7 @@ tr.titlebg th.last_th {
 }
 .dropmenu {
 	float: right;
+	padding: 0;
 }
 .dropmenu li {
 	float: right;
@@ -123,7 +124,7 @@ tr.titlebg th.last_th {
 	margin-right: 1109.5em;
 }
 .dropmenu ul ul a:focus {
-	margin-right: 2228em;
+	margin-right: 0;
 }
 /* Level 3 submenu wrapper positioning. */
 .dropmenu li ul ul {
@@ -139,7 +140,19 @@ tr.titlebg th.last_th {
 }
 /* Reposition as visible on hover. */
 .dropmenu li li:hover ul, .dropmenu li li.sfhover ul {
-	right: auto;
+	right: 14.5em;
+}
+/* Reposition as visible on hover. */
+.dropmenu li li:hover ul, .dropmenu li li.sfhover ul {
+	right: 14.5em;
+}
+/* Indicator for additonal levels. Best in the anchor so it stays visible on hover. */
+.dropmenu li li.subsections a {
+	background: url(../images/admin/subsection_rtl.png) no-repeat 1% 40%;
+}
+/* For no-js background. */
+.dropmenu li li.subsections a:focus {
+	background:  #e3e9ef url(../images/admin/subsection_rtl.png) no-repeat 1% 40%, url(../images/theme/lower_section_rtl.png) 0 0 repeat-x;
 }
 
 /* The dropdown menu toggle image */
@@ -154,6 +167,12 @@ tr.titlebg th.last_th {
 	left: 0;
 }
 
+li#collapse_button {
+	float: left;
+	position: relative;
+	right: 0;
+}
+
 /* Styles for the standard button lists.
 ------------------------------------------------------- */
 .buttonlist ul {
@@ -205,6 +224,14 @@ div#upper_section div.user ul {
 	padding-right: 10px;
 }
 
+.button_submit, .button_reset, .button_link {
+	float: left;
+}
+
+#search_form {
+	text-align: left;
+}
+
 /* The navigation list (i.e. linktree) */
 .navigate_section ul li {
 	float: right;
@@ -246,7 +273,6 @@ form#ic_login ul li {
 }
 img#upshrink_ic, img#newsupshrink {
 	float: right;
-	margin: 10px 0 0 5px;
 }
 
 /* Styles for the message (topic) index.
@@ -555,7 +581,7 @@ h3.titlebg img {
 tr.titlebg td {
 	padding-right: 0.7em;
 }
-#admin_menu {
+div#admin_menu {
 	padding-right: 0;
 }
 #admin_content {

+ 12 - 12
Themes/default/index.template.php

@@ -96,17 +96,6 @@ function template_html_above()
 		echo '
 	<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21" />';
 
-	// RTL languages require an additional stylesheet.
-	if ($context['right_to_left'])
-	{
-		echo '
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css?alp21" />';
-
-	if (!empty($context['theme_variant']))
-		echo '
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl', $context['theme_variant'], '.css?alp21" />';
-	}
-
 	// Save some database hits, if a width for multiple wrappers is set in admin.
 	if(!empty($settings['forum_width']))
 		echo '
@@ -122,6 +111,17 @@ function template_html_above()
 	// load in any javascript files from mods and themes
 	template_javascript();
 
+	// RTL languages require an additional stylesheet.
+	if ($context['right_to_left'])
+	{
+		echo '
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css?alp21" />';
+
+	if (!empty($context['theme_variant']))
+		echo '
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl', $context['theme_variant'], '.css?alp21" />';
+	}
+
 	echo '
 	<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
 	<meta name="description" content="', $context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
@@ -521,7 +521,7 @@ function template_menu()
 	// Menu bar will still accommodate ten buttons on a 1024, with theme set to 90%. That's more than enough.
 	// If anyone is terrified of losing 40px out of the menu bar, set your theme to 92% instead of 90%. :P
 	echo '
-				<li style="float: right; position: absolute; top: 0; right: 0;">
+				<li id="collapse_button">
 					<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="padding: 4px 9px 3px 9px; display: none;" />
 				</li>';