Adds mobile icon (#2)
Jeremy D

Jeremy D commited on 2023-03-29 18:00:13
Showing 2 changed files, with 8 additions and 3 deletions.


Fixes #1
... ...
@@ -41,7 +41,7 @@ class ErrorPopup
41 41
 			addInlineJavaScript('
42 42
 			errorLI += \'<div id="error_menu" class="top_menu scrollable" style="width: 90vw; max-width: 1200px;"></div>\';
43 43
 			$("ul#top_info").append(errorLI);
44
-			$("ul#top_info").find(\'a[href*="errorlog"]\').attr("id", "error_menu_top");
44
+			$("ul#top_info").find(\'a[href*="errorlog"]\').attr("id", "error_menu_top").wrapInner("<span class=\"textmenu\"></span>").prepend("<span class=\"main_icons logs\"></span>");
45 45
 			user_menus.add("error", "' . $scripturl . '?action=admin;area=logs;sa=errorlog");
46 46
 
47 47
 			function tryUpdateErrorCounter(xhr) {
... ...
@@ -57,6 +57,11 @@ class ErrorPopup
57 57
 		// Fixes a minor bug where the content isn't sized right.
58 58
 		addInlineCss('
59 59
 			div#error_menu .half_content { width: 49%;}
60
+			#error_menu_top .main_icons {display: none;}
61
+			@media (max-width: 855px) {
62
+				#error_menu_top .main_icons {display: inline-block;}
63
+				#error_menu_top .textmenu {display: none;}
64
+			}
60 65
 		');
61 66
 
62 67
 		// Fix the admin login prompt to work.
... ...
@@ -2,7 +2,7 @@
2 2
 <package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
3 3
 	<id>sleepy:errorpup</id>
4 4
 	<name>Error Log Popup</name>
5
-	<version>1.1</version>
5
+	<version>1.2</version>
6 6
 	<type>modification</type>
7 7
 
8 8
 	<install for="SMF 2.1.*">
... ...
@@ -22,7 +22,7 @@
22 22
 		<remove-file name="$sourcedir/ErrorPopup.php" />
23 23
 	</uninstall>
24 24
 
25
-	<upgrade from="1.0" for="2.1.*">
25
+	<upgrade from="1.0-1.1" for="2.1.*">
26 26
 		<require-file name="ErrorPopup.php" destination="$sourcedir" />
27 27
 	</upgrade>
28 28
 
29 29