Browse Source

Merge pull request #976 from Arantor/release-2.1

Some clean-ups
Arantor 11 years ago
parent
commit
212f0a3578
3 changed files with 13 additions and 32 deletions
  1. 9 16
      Sources/ManageLanguages.php
  2. 3 11
      Themes/default/css/index.css
  3. 1 5
      Themes/default/css/rtl.css

+ 9 - 16
Sources/ManageLanguages.php

@@ -668,24 +668,17 @@ function ModifyLanguages()
 				'value' => '<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" /><input type="submit" name="set_default" value="' . $txt['save'] . '"' . (is_writable($boarddir . '/Settings.php') ? '' : ' disabled="disabled"') . ' class="button_submit" />',
 			),
 		),
-		// For highlighting the default.
-		'javascript' => '
-					var prevClass = "";
-					var prevDiv = "";
-					function highlightSelected(box)
-					{
-						if (prevClass != "")
-							prevDiv.className = prevClass;
-
-						prevDiv = document.getElementById(box);
-						prevClass = prevDiv.className;
-
-						prevDiv.className = "highlight2";
-					}
-					highlightSelected("list_language_list_' . ($language == '' ? 'english' : $language). '");
-		',
 	);
 
+	// We want to highlight the selected language. Need some Javascript for this.
+	addInlineJavascript('
+	function highlightSelected(box)
+	{
+		$("tr.highlight2").removeClass("highlight2");
+		$("#" + box).addClass("highlight2");
+	}
+	highlightSelected("list_language_list_' . ($language == '' ? 'english' : $language). '");', true);
+
 	// Display a warning if we cannot edit the default setting.
 	if (!is_writable($boarddir . '/Settings.php'))
 		$listOptions['additional_rows'][] = array(

+ 3 - 11
Themes/default/css/index.css

@@ -2485,8 +2485,6 @@ ul.quickbuttons li.inline_mod_check {
 	background: #f0f4f7;
 	margin: 8px 0 0 0;
 	padding: 8px 10% 12px 10%;
-	border: 1px solid #ccc;
-	border-radius: 7px;
 	box-shadow: 0 -2px 2px rgba(0,0,0,0.1);
 	overflow: auto;
 }
@@ -2555,9 +2553,6 @@ ul.post_options li {
 #postAttachment dt, #postAttachment2 dt {
 	font-weight: bold;
 }
-#postAttachment3  /* Can't see this called anywhere in Post.template.php */{
-	margin-left: 12px;
-}
 #postDraftOptions {
 	background: #fdfdfd;
 	border: 1px solid #aaa;
@@ -4159,7 +4154,7 @@ div#editlang_desc {
 	margin: 12px 0 0 0;
 	padding: 16px 12px 6px 12px;
 }
-#info_center .cat_bar, .table_grid tr.catbg th, #show_attachments th, #searchform .roundframe .title_bar {
+#info_center .cat_bar, .table_grid tr.catbg th, #searchform .roundframe .title_bar {
 	border-top: 2px solid #ff9400;
 	border-bottom: 2px solid #bf6900;
 	background: #fff;
@@ -4173,9 +4168,6 @@ div#editlang_desc {
 .table_grid tr.catbg th.centercol, .table_grid tr.windowbg2 td.centercol, .table_grid tr.windowbg td.centercol, .table_grid tr.highlight2 td.centercol {
 	text-align: center;
 }
-#show_attachments th {
-	text-align: left;
-}
 #info_center .cat_bar, #searchform .roundframe .title_bar {
 	border-right: 1px solid #ddd;
 	border-left: 1px solid #ddd;
@@ -4184,10 +4176,10 @@ div#editlang_desc {
 .table_grid tr.catbg th {
 	padding: 4px 3px 3px 8px;
 }
-tr.catbg th:first-child, #show_attachments th:first-child {
+tr.catbg th:first-child {
 	border-left: 1px solid #ddd;
 }
-tr.catbg th:last-child, #show_attachments th:last-child {
+tr.catbg th:last-child {
 	border-right: 1px solid #ddd;
 }
 #info_center .catbg, #searchform .roundframe .titlebg {

+ 1 - 5
Themes/default/css/rtl.css

@@ -487,10 +487,6 @@ ul.post_options li {
 #postAttachment dt, #postAttachment2 dt {
 	font-weight: bold;
 }
-#postAttachment3 {
-	margin-left: 0;
-	margin-left: 1em;
-}
 .post_verification #verification_control {
 	margin: .3em 1em .3em 0;
 }
@@ -619,7 +615,7 @@ div#admin_menu {
 .topic_table td.lastpost {
 	background: none;
 }
-#info_center .cat_bar, .table_grid tr.catbg th, #show_attachments th, #searchform .roundframe .title_bar {
+#info_center .cat_bar, .table_grid tr.catbg th, #searchform .roundframe .title_bar {
 	text-align: right;
 }
 /* Styles for (fatal) errors.