Browse Source

! Remove the sidebar from admin/moderation/profile.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
a455ddabcc

+ 1 - 10
Sources/Subs-Menu.php

@@ -245,20 +245,11 @@ function createMenu($menuData, $menuOptions = array())
 		return false;
 	}
 
-	// What type of menu is this?
-	if (empty($menuOptions['menu_type']))
-	{
-		$menuOptions['menu_type'] = '_' . (empty($options['use_sidebar_menu']) ? 'dropdown' : 'sidebar');
-		$menu_context['can_toggle_drop_down'] = !$user_info['is_guest'] && isset($settings['theme_version']) && $settings['theme_version'] >= 2.0;
-	}
-	else
-		$menu_context['can_toggle_drop_down'] = !empty($menuOptions['can_toggle_drop_down']);
-
 	// Almost there - load the template and add to the template layers.
 	if (!WIRELESS)
 	{
 		loadTemplate(isset($menuOptions['template_name']) ? $menuOptions['template_name'] : 'GenericMenu');
-		$menu_context['layer_name'] = (isset($menuOptions['layer_name']) ? $menuOptions['layer_name'] : 'generic_menu') . $menuOptions['menu_type'];
+		$menu_context['layer_name'] = (isset($menuOptions['layer_name']) ? $menuOptions['layer_name'] : 'generic_menu') . '_dropdown';
 		$context['template_layers'][] = $menu_context['layer_name'];
 	}
 

+ 0 - 103
Themes/default/GenericMenu.template.php

@@ -10,109 +10,6 @@
  * @version 2.1 Alpha 1
  */
 
-// This contains the html for the side bar of the admin center, which is used for all admin pages.
-function template_generic_menu_sidebar_above()
-{
-	global $context, $settings, $options, $scripturl, $txt, $modSettings;
-
-	// This is the main table - we need it so we can keep the content to the right of it.
-	echo '
-	<div id="main_container">
-		<div id="left_admsection">';
-
-	// What one are we rendering?
-	$context['cur_menu_id'] = isset($context['cur_menu_id']) ? $context['cur_menu_id'] + 1 : 1;
-	$menu_context = &$context['menu_data_' . $context['cur_menu_id']];
-
-	// For every section that appears on the sidebar...
-	$firstSection = true;
-	foreach ($menu_context['sections'] as $section)
-	{
-		// Show the section header - and pump up the line spacing for readability.
-		echo '
-			<div class="adm_section">
-				<div class="cat_bar">
-					<h4 class="catbg">
-						', $section['title'], '
-					</h4>
-				</div>
-				<ul class="dropmenu left_admmenu">';
-
-		// For every area of this section show a link to that area (bold if it's currently selected.)
-		foreach ($section['areas'] as $i => $area)
-		{
-			// Not supposed to be printed?
-			if (empty($area['label']))
-				continue;
-
-			echo '
-					<li ', !empty($area['subsections']) ?'class="subsections"':'', ' ', ($i == $menu_context['current_area']) ?'id="menu_current_area"':'', '>';
-
-			// Is this the current area, or just some area?
-			if ($i == $menu_context['current_area'])
-			{
-				echo '
-						<strong><a href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['label'], '</a></strong>';
-
-				if (empty($context['tabs']))
-					$context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array();
-			}
-			else
-				echo '
-						<a href="', isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i, $menu_context['extra_parameters'], '">', $area['label'], '</a>';
-			// Is there any subsections?
-			if (!empty($area['subsections']))
-			{
-				echo '
-						<ul>';
-
-				foreach ($area['subsections'] as $sa => $sub)
-				{
-					if (!empty($sub['disabled']))
-						continue;
-
-					$url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa;
-
-					echo '
-							<li>
-								<a ', !empty($sub['selected']) ? 'class="chosen" ' : '', 'href="', $url, $menu_context['extra_parameters'], '">', $sub['label'], '</a>
-							</li>';
-				}
-
-				echo '
-						</ul>';
-			}
-			echo '
-					</li>';
-		}
-
-		echo '
-				</ul>
-			</div>';
-
-		$firstSection = false;
-	}
-
-	// This is where the actual "main content" area for the admin section starts.
-	echo '
-		</div>
-		<div id="main_admsection">';
-
-	// If there are any "tabs" setup, this is the place to shown them.
-	if (!empty($context['tabs']) && empty($context['force_disable_tabs']))
-		template_generic_menu_tabs($menu_context);
-}
-
-// Part of the sidebar layer - closes off the main bit.
-function template_generic_menu_sidebar_below()
-{
-	global $context, $settings, $options;
-
-	echo '
-		</div>
-	</div>';
-}
-
 // This contains the html for the side bar of the admin center, which is used for all admin pages.
 function template_generic_menu_dropdown_above()
 {

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

@@ -11,7 +11,7 @@
  */
 
 
-// This is the main sidebar for the personal messages section.
+// This is for stuff above the menu in the personal messages section.
 function template_pm_above()
 {
 	global $context, $settings, $options, $txt;

+ 0 - 7
Themes/default/Profile.template.php

@@ -1525,13 +1525,6 @@ function template_profile_theme_settings()
 								<input type="hidden" name="default_options[show_children]" value="0" />
 								<input type="checkbox" name="default_options[show_children]" id="show_children" value="1"', !empty($context['member']['options']['show_children']) ? ' checked="checked"' : '', ' class="input_check" />
 							</dd>
-							<dt>
-								<label for="use_sidebar_menu">', $txt['use_sidebar_menu'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[use_sidebar_menu]" value="0" />
-								<input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
 							<dt>
 								<label for="show_no_avatars">', $txt['show_no_avatars'], '</label>
 							</dt>

+ 0 - 5
Themes/default/Settings.template.php

@@ -25,11 +25,6 @@ function template_options()
 			'label' => $txt['show_children'],
 			'default' => true,
 		),
-		array(
-			'id' => 'use_sidebar_menu',
-			'label' => $txt['use_sidebar_menu'],
-			'default' => true,
-		),
 		array(
 			'id' => 'show_no_avatars',
 			'label' => $txt['show_no_avatars'],

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

@@ -1215,111 +1215,6 @@ img.sort {
 	overflow: hidden;
 }
 
-/* Styles for sidebar menus.
-------------------------------------------------------- */
-#main_container {
-	position: relative;
-}
-#main_container:after {
-	content:"";
-	display: block;
-	clear: both;
-}
-#main_admsection {
-	position: relative;
-	left: 0;
-	right: 0;
-	overflow: auto;
-}
-#left_admsection {
-	width: 180px;
-	float: left;
-	padding: 0 10px 1em 0;
-}
-.adm_section .cat_bar {
-	background: #f0f4f7;
-	border: 1px solid #c8c8c8;
-	border-left: 1px solid #d8d8d8;
-	border-top: 1px solid #e2e2e2;
-	border-radius: 4px 4px 0 0;
-	box-shadow: 0 -2px 4px rgba(0,0,0,0.07) inset;
-	margin: 0;
-}
-.adm_section h4.catbg {
-	padding: 6px 8px;
-	font-size: 1em;
-	color: #444;
-	text-shadow: none;
-}
-.adm_section .dropmenu {
-	padding: 4px 1px 9px 1px;
-	background: linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
-	background: -o-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
-	background: -moz-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
-	background: -webkit-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
-	background: -ms-linear-gradient(bottom, #FFFFFF 1%, #F1F3F5 96%);
-	float: none;
-}
-.adm_section .dropmenu li {
-	margin: 2px 0;
-	padding: 0;
-	line-height: 1.7em;
-	border: 1px solid transparent;
-	border-radius: 2px;
-	float: none;
-}
-.adm_section .dropmenu li:hover, .adm_section .dropmenu li.sfhover, #menu_current_area {
-	background: #fafafa;
-	box-shadow: -1px -1px 2px rgba(0,0,0,0.1), 2px 2px 2px rgba(96,134,166,0.07) inset;
-	border: 1px solid #dfdfdf;
-	border-left: 1px solid #cfcfcf;
-	border-top: 1px solid #c7c7c7;
-}
-.adm_section .dropmenu a, .adm_section .dropmenu a:hover, .adm_section .dropmenu li:hover a,
-.adm_section .dropmenu li.sfhover a, .adm_section .dropmenu>li>a:focus, #menu_current_area>strong>a:focus {
-	background: none;
-	text-decoration: none;
-	border: none;
-	padding: 3px 7px 1px 7px;
-}
-.adm_section .dropmenu a:hover, .adm_section .dropmenu li:hover a, .adm_section .dropmenu li.sfhover a, .adm_section .dropmenu>li a:focus {
-	color: #333;
-}
-.adm_section .dropmenu li ul {
-	top: -1px;
-}
-.adm_section .dropmenu li:hover ul, .adm_section .dropmenu li.sfhover ul {
-	left: 155px;
-}
-.adm_section .dropmenu li li, .adm_section .dropmenu li li:hover {
-	padding: 0;
-	background: none;
-	box-shadow: none;
-}
-.adm_section .dropmenu li li a, .adm_section .dropmenu li:hover li a, .adm_section .dropmenu li.sfhover li a {
-	color: #346;
-	padding: 0 7px;
-}
-.adm_section .dropmenu li li a:hover {
-	color: #333;
-	background: linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
-	background: -o-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
-	background: -moz-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
-	background: -webkit-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
-	background: -ms-linear-gradient(bottom, #E2E9F3 1%, #FFFFFF 70%);
-}
-/* Note: The next declarations are for keyboard access with js disabled. */
-.adm_section .dropmenu ul a:focus {
-	margin-left: 10150px;
-	width: 17em;
-}
-/* Cancel those for hover and/or js access. */
-.adm_section .dropmenu ul li:hover a:focus, .adm_section .dropmenu ul li.sfhover a:focus {
-	margin-left: 0;
-	width: auto;
-}
-/*End sidebar flyout coding. */
-
 /* Styles for the standard button lists.
 ------------------------------------------------------- */
 
@@ -3229,30 +3124,6 @@ dl {
 #avatar_upload {
 	overflow: auto;
 }
-#main_admsection #basicinfo, #main_admsection #detailedinfo {
-	width: 100%;
-}
-#main_admsection #basicinfo h4 {
-	float: left;
-	width: 35%;
-}
-#main_admsection #basicinfo img.avatar {
-	float: right;
-	vertical-align: top;
-}
-#main_admsection #basicinfo ul {
-	clear: left;
-}
-#main_admsection #basicinfo span#userstatus {
-	clear: left;
-}
-#main_admsection #basicinfo p#infolinks {
-	display: none;
-	clear: both;
-}
-#main_admsection #basicinfo .botslice {
-	clear: both;
-}
 
 /* Profile statistics */
 #generalstats div.content dt {

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

@@ -162,7 +162,7 @@ table.table_list a.collapse {
 	right: 14.5em;
 }
 /* Indicator for additional levels. Best in the anchor so it stays visible on hover. */
-.dropmenu li li.subsections a:after, .adm_section .dropmenu li.subsections a:after{
+.dropmenu li li.subsections a:after {
 	left: 2px;
 	right: auto;
 	background: url(../images/admin/subsection_rtl.png) no-repeat;
@@ -605,16 +605,6 @@ div#admin_menu {
 #admin_content {
 	clear: right;
 }
-/* Styles for sidebar menus.
-------------------------------------------------------- */
-#left_admsection {
-	float: right;
-	padding-right: 0;
-	padding-left: 10px;
-}
-.left_admmenu li {
-	padding: 0 0.5em 0 0;
-}
 /* Styles for generic tables.
 ------------------------------------------------------- */
 .topic_table td.stickybg2 {
@@ -663,19 +653,6 @@ div#admin_menu {
 	float: right;
 }
 
-#main_admsection #basicinfo h4 {
-	float: right;
-}
-#main_admsection #basicinfo img.avatar {
-	float: left;
-}
-#main_admsection #basicinfo ul {
-	clear: right;
-}
-#main_admsection #basicinfo span#userstatus {
-	clear: right;
-}
-
 /* Profile statistics */
 #generalstats div.content dt {
 	float: right;

+ 1 - 1
Themes/default/languages/PersonalMessage.english.php

@@ -72,7 +72,7 @@ $txt['pm_msg_label_remove'] = 'Remove label';
 $txt['pm_msg_label_inbox'] = 'Inbox';
 $txt['pm_sel_label_title'] = 'Label selected';
 
-// Sidebar Headings.
+// Menu headings.
 $txt['pm_labels'] = 'Labels';
 $txt['pm_messages'] = 'Messages';
 $txt['pm_actions'] = 'Actions';

+ 0 - 1
Themes/default/languages/Profile.english.php

@@ -278,7 +278,6 @@ $txt['poster'] = 'Poster';
 
 $txt['board_desc_inside'] = 'Show board descriptions inside boards.';
 $txt['show_children'] = 'Show child boards on every page inside boards, not just the first.';
-$txt['use_sidebar_menu'] = 'Use sidebar menus instead of dropdown menus when possible.';
 $txt['show_no_avatars'] = 'Don\'t show users\' avatars.';
 $txt['show_no_signatures'] = 'Don\'t show users\' signatures.';
 $txt['show_no_censored'] = 'Leave words uncensored.';