Parcourir la source

! More error / notice / info box harmonization
! move list package function from admin to script .js

Spuds il y a 13 ans
Parent
commit
be781fc249

+ 1 - 1
Themes/default/Display.template.php

@@ -18,7 +18,7 @@ function template_main()
 	if ($context['report_sent'])
 	{
 		echo '
-			<div class="windowbg" id="profile_success">
+			<div class="infobox">
 				', $txt['report_sent'], '
 			</div>';
 	}

+ 6 - 2
Themes/default/Packages.template.php

@@ -41,11 +41,12 @@ function template_view_package()
 	{
 		echo '
 		<div class="errorbox">
-			<strong>', $txt['package_will_fail_title'], '</strong><br />
+			', $txt['package_will_fail_title'], '<br />
 			', $txt['package_will_fail_warning'], '
 		</div>';
 	}
 
+	// Display the package readme if one exists
 	if (isset($context['package_readme']))
 	{
 		echo '
@@ -105,7 +106,10 @@ function template_view_package()
 
 	if (empty($context['actions']) && empty($context['database_changes']))
 		echo '
-				<strong>', $txt['corrupt_compatible'], '</strong>
+				<br />
+				<div class="errorbox">
+					', $txt['corrupt_compatible'], '
+				</div>
 			</div>';
 	else
 	{

+ 1 - 1
Themes/default/PersonalMessage.template.php

@@ -34,7 +34,7 @@ function template_pm_above()
 	// Message sent? Show a small indication.
 	if (isset($context['pm_sent']))
 		echo '
-		<div class="windowbg" id="profile_success">
+		<div class="infobox">
 			', $txt['pm_sent'], '
 		</div>';
 }

+ 4 - 4
Themes/default/Profile.template.php

@@ -33,7 +33,7 @@ function template_profile_above()
 	// If the profile was update successfully, let the user know this.
 	if (!empty($context['profile_updated']))
 		echo '
-					<div class="windowbg" id="profile_success">
+					<div class="infobox">
 						', $context['profile_updated'], '
 					</div>';
 }
@@ -1711,7 +1711,7 @@ function template_groupMembership()
 	// Do we have an update message?
 	if (!empty($context['update_message']))
 		echo '
-			<div id="profile_success">
+			<div class="infobox">
 				', $context['update_message'], '.
 			</div>';
 
@@ -2374,7 +2374,7 @@ function template_deleteAccount()
 	// If they are deleting their account AND the admin needs to approve it - give them another piece of info ;)
 	if ($context['needs_approval'])
 		echo '
-					<div id ="profile_error" class="alert">', $txt['deleteAccount_approval'], '</div>';
+					<div class="errorbox">', $txt['deleteAccount_approval'], '</div>';
 
 	// If the user is deleting their own account warn them first - and require a password!
 	if ($context['user']['is_owner'])
@@ -2476,7 +2476,7 @@ function template_error_message()
 	global $context, $txt;
 
 	echo '
-		<div class="windowbg" id="profile_error">
+		<div class="errorbox">
 			<span>', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], ':</span>
 			<ul class="reset">';
 

+ 1 - 1
Themes/default/Register.template.php

@@ -501,7 +501,7 @@ function template_admin_register()
 
 	if (!empty($context['registration_done']))
 		echo '
-				<div class="windowbg" id="profile_success">
+				<div class="infobox">
 					', $context['registration_done'], '
 				</div>';
 

+ 23 - 44
Themes/default/css/index.css

@@ -2787,12 +2787,12 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 }
 .errorbox 
 {
-	background: #ffe4e9 url(../images/warning_mute.gif) center no-repeat;
-	background-position: 8px 50%;
+	background: #fee url(../images/warning_mute.gif) center no-repeat;
+	background-position: 10px 50%;
 	text-align: left;
-	border-top: 2px solid #cc3344;
-	border-bottom: 2px solid #cc3344;
-	padding: 5px 10px 5px 30px;
+	border-top: 2px solid #c34;
+	border-bottom: 2px solid #c34;
+	padding: 7px 10px 7px 35px;
 	margin-bottom: 1em;
 }
 .errorbox h3
@@ -2814,29 +2814,34 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 	width: 1em;
 	font-size: 1.5em;
 }
+.errorbox span
+{
+	text-decoration: underline;
+}
 
 /* Styles for info boxes
 ------------------------------------------------- */
 
 .noticebox 
 {
-	color:#777;
-	background:#fff6ca url(../images/warning_moderate.gif) center no-repeat;
-	background-position: 8px 50%;
-	text-align:left;
-	border-top:1px solid #ffd324;
-	border-bottom:1px solid #ffd324;
-	padding:5px 2px 5px 30px;
+	color: #777;
+	background: #fff6ca url(../images/warning_moderate.gif) center no-repeat;
+	background-position: 10px 50%;
+	text-align: left;
+	border-top: 1px solid #ffd324;
+	border-bottom: 1px solid #ffd324;
+	padding: 7px 10px 7px 35px;
 	margin-bottom: 1em;
 }
 .infobox 
 {
-	background:#c5ffb8 url(../images/warning_watch.gif) center no-repeat;
-	background-position:8px 50%;
-	text-align:left;
-	border-top:1px solid #green;
-	border-bottom:1px solid #green;
-	padding:1px 10px 1px 30px;
+	color: #000;
+	background: #efe url(../images/icons/field_valid.gif) center no-repeat;
+	background-position: 10px 50%;
+	text-align: left;
+	border-top: 1px solid green;
+	border-bottom: 1px solid green;
+	padding: 7px 10px 7px 35px;
 	margin-bottom: 1em;
 }
 
@@ -2991,32 +2996,6 @@ dl
 	clear: both;
 }
 
-/* Simple feedback messages */
-div#profile_error, div#profile_success
-{
-	margin: 0 0 1em 0;
-	padding: 1em 2em;
-	border: 1px solid;
-}
-div#profile_error
-{
-	border-color: red;
-	color: red;
-	background: #fee;
-}
-
-div#profile_error span
-{
-	text-decoration: underline;
-}
-
-div#profile_success
-{
-	border-color: green;
-	color: green;
-	background: #efe;
-}
-
 /* Profile statistics */
 #generalstats div.content dt
 {

+ 0 - 9
Themes/default/scripts/admin.js

@@ -532,15 +532,6 @@ function swap_database_changes()
 	return false;
 }
 
-function smfSetLatestPackages()
-{
-	if (typeof(window.smfLatestPackages) != "undefined")
-		setInnerHTML(document.getElementById("packagesLatest"), window.smfLatestPackages);
-
-	if (tempOldOnload)
-	tempOldOnload();
-}
-
 function testFTP()
 {
 	ajax_indicator(true);

+ 9 - 0
Themes/default/scripts/script.js

@@ -1552,3 +1552,12 @@ function updateActionDef(optNum)
 		document.getElementById("labdiv" + optNum).style.display = "none";
 	}
 }
+
+function smfSetLatestPackages()
+{
+	if (typeof(window.smfLatestPackages) != "undefined")
+		setInnerHTML(document.getElementById("packagesLatest"), window.smfLatestPackages);
+
+	if (tempOldOnload)
+	tempOldOnload();
+}