[ticket/12648] Improve UCP/MCP/Posting tabs

PHPBB3-12648
This commit is contained in:
PayBas 2014-06-02 19:23:56 +02:00
parent 8332671813
commit eda3c36b1c
7 changed files with 82 additions and 140 deletions

View file

@ -805,7 +805,7 @@ function parse_document(container)
ul = $this.children(), ul = $this.children(),
tabs = ul.children().not('[data-skip-responsive]'), tabs = ul.children().not('[data-skip-responsive]'),
links = tabs.children('a'), links = tabs.children('a'),
item = ul.append('<li class="responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link"><span>&nbsp;</span></a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'), item = ul.append('<li class="tab responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link">&nbsp;</a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
menu = item.find('.dropdown-contents'), menu = item.find('.dropdown-contents'),
maxHeight = 0, maxHeight = 0,
lastWidth = false, lastWidth = false,
@ -847,7 +847,7 @@ function parse_document(container)
for (i = total - 1; i >= 0; i --) { for (i = total - 1; i >= 0; i --) {
tab = availableTabs.eq(i); tab = availableTabs.eq(i);
menu.prepend(tab.clone(true)); menu.prepend(tab.clone(true).removeClass('tab'));
tab.hide(); tab.hide();
if ($this.height() <= maxHeight) { if ($this.height() <= maxHeight) {
menu.find('a').click(function() { check(true); }); menu.find('a').click(function() { check(true); });

View file

@ -11,7 +11,7 @@
<div id="tabs"> <div id="tabs">
<ul> <ul>
<!-- BEGIN l_block1 --> <!-- BEGIN l_block1 -->
<li<!-- IF l_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{l_block1.U_TITLE}"><span>{l_block1.L_TITLE}</span></a></li> <li class="tab<!-- IF l_block1.S_SELECTED --> activetab<!-- ENDIF -->"><a href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a></li>
<!-- END l_block1 --> <!-- END l_block1 -->
</ul> </ul>
</div> </div>

View file

@ -13,14 +13,14 @@
<div id="minitabs" class="sub-panels" data-show-panel="{$SHOW_PANEL}"> <div id="minitabs" class="sub-panels" data-show-panel="{$SHOW_PANEL}">
<ul> <ul>
<li id="display-panel-tab"<!-- IF not S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->> <li id="display-panel-tab" class="tab<!-- IF not S_MERGE_VIEW --> activetab<!-- ENDIF -->">
<a href="#minitabs" data-subpanel="display-panel"><span>{L_DISPLAY_OPTIONS}</span></a> <a href="#minitabs" data-subpanel="display-panel">{L_DISPLAY_OPTIONS}</a>
</li> </li>
<li id="split-panel-tab"> <li id="split-panel-tab" class="tab">
<a href="#minitabs" data-subpanel="split-panel"><span>{L_SPLIT_TOPIC}</span></a> <a href="#minitabs" data-subpanel="split-panel">{L_SPLIT_TOPIC}</a>
</li> </li>
<li id="merge-panel-tab"<!-- IF S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->> <li id="merge-panel-tab" class="tab<!-- IF S_MERGE_VIEW --> activetab<!-- ENDIF -->">
<a href="#minitabs" data-subpanel="merge-panel"><span>{L_MERGE_POSTS}</span></a> <a href="#minitabs" data-subpanel="merge-panel">{L_MERGE_POSTS}</a>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -101,13 +101,11 @@
<!-- IF not S_PRIVMSGS and not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 --> <!-- IF not S_PRIVMSGS and not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
<div id="tabs" class="sub-panels" data-show-panel="<!-- IF SHOW_PANEL -->{SHOW_PANEL}<!-- ELSE -->options-panel<!-- ENDIF -->"> <div id="tabs" class="sub-panels" data-show-panel="<!-- IF SHOW_PANEL -->{SHOW_PANEL}<!-- ELSE -->options-panel<!-- ENDIF -->">
<ul> <ul>
<li id="options-panel-tab" class="activetab"><a href="#tabs" data-subpanel="options-panel"><span>{L_OPTIONS}</span></a></li> <li id="options-panel-tab" class="tab activetab"><a href="#tabs" data-subpanel="options-panel"><span>{L_OPTIONS}</span></a></li>
<!-- IF S_SHOW_ATTACH_BOX --> <!-- IF S_SHOW_ATTACH_BOX -->
<li id="attach-panel-tab"> <li id="attach-panel-tab" class="tab">
<a href="#tabs" data-subpanel="attach-panel"> <a href="#tabs" data-subpanel="attach-panel">
<span> {L_ATTACHMENTS} <strong id="file-total-progress"><strong id="file-total-progress-bar"></strong></strong>
{L_ATTACHMENTS} <strong id="file-total-progress"><strong id="file-total-progress-bar"></strong></strong>
</span>
</a> </a>
</li> </li>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -5,7 +5,7 @@
<div id="tabs"> <div id="tabs">
<ul> <ul>
<!-- BEGIN t_block1 --> <!-- BEGIN t_block1 -->
<li <!-- IF t_block1.S_SELECTED -->class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li> <li class="tab<!-- IF t_block1.S_SELECTED --> activetab<!-- ENDIF -->"><a href="{t_block1.U_TITLE}">{t_block1.L_TITLE}</a></li>
<!-- END t_block1 --> <!-- END t_block1 -->
</ul> </ul>
</div> </div>

View file

@ -807,52 +807,53 @@ ul.cplist {
/* CP tabbed menu /* CP tabbed menu
----------------------------------------*/ ----------------------------------------*/
#tabs a { #tabs .tab > a {
background-image: url("./images/bg_tabs1.gif"); background: #BACCD9;
}
#tabs a span {
background-image: url("./images/bg_tabs2.gif");
color: #536482; color: #536482;
} }
#tabs a:hover span { #tabs .tab > a:hover {
background: #DDEDFB;
color: #BC2A4D; color: #BC2A4D;
} }
#tabs .activetab a { #tabs .activetab > a,
border-bottom-color: #CADCEB; #tabs .activetab > a:hover {
} background: #E2F2FF;
background: -moz-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
#tabs .activetab a span { background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #E2F2FF), color-stop(100%, #CADCEB));
background: -webkit-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
background: -o-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
background: -ms-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
background: linear-gradient(to bottom, #E2F2FF 0%, #CADCEB 100%);
border-color: #CADCEB;
box-shadow: 0 1px 1px #F2F9FF inset;
color: #333333; color: #333333;
} }
#tabs .activetab a:hover span { #tabs .activetab > a:hover {
color: #000000; color: #000000;
} }
/* Mini tabbed menu used in MCP /* Mini tabbed menu used in MCP
----------------------------------------*/ ----------------------------------------*/
#minitabs li { #minitabs .tab > a {
background-color: #E1EBF2; background-color: #E1EBF2;
} }
#minitabs li.activetab { #minitabs .activetab > a,
#minitabs .activetab > a:hover {
background-color: #F9F9F9; background-color: #F9F9F9;
}
#minitabs li.activetab a span, #minitabs li.activetab a:hover span {
color: #333333; color: #333333;
} }
/* Responsive tabs /* Responsive tabs
----------------------------------------*/ ----------------------------------------*/
.responsive-tab .responsive-tab-link span:before { .responsive-tab .responsive-tab-link:before {
border-color: #536482; border-color: #536482;
} }
.responsive-tab .responsive-tab-link:hover span:before { .responsive-tab .responsive-tab-link:hover:before {
border-color: #BC2A4D; border-color: #BC2A4D;
} }
@ -1144,7 +1145,7 @@ input.disabled {
border-color: #FFF transparent; border-color: #FFF transparent;
} }
.dropdown-extended .pointer-inner, #minitabs .pointer-inner { .dropdown-extended .pointer-inner {
border-color: #F1F8FF transparent; border-color: #F1F8FF transparent;
} }
@ -1170,10 +1171,6 @@ ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist
border-color: #DCDCDC; border-color: #DCDCDC;
} }
#minitabs .dropdown-contents {
background-color: #F1F8FF;
}
/* Notifications /* Notifications
---------------------------------------- */ ---------------------------------------- */

View file

@ -106,74 +106,49 @@ ul.cplist {
----------------------------------------*/ ----------------------------------------*/
#tabs { #tabs {
line-height: normal; line-height: normal;
margin: 20px 0 -1px 7px; margin: 20px 0 0 7px;
*overflow: hidden; /**overflow: hidden;*/
} }
#tabs ul { #tabs > ul {
list-style: none;
margin:0; margin:0;
padding: 0; padding: 0;
list-style: none; position: relative;
} }
#tabs ul:after { #tabs > ul:after {
content: ''; content: '';
display: block; display: block;
clear: both; clear: both;
} }
#tabs li { #tabs .tab {
display: inline; display: inline;
margin: 0; float: left;
padding: 0;
font-size: 1em; font-size: 1em;
font-weight: bold; font-weight: bold;
line-height: 14px;
} }
#tabs a { #tabs .tab > a {
float: left;
background: none no-repeat 0% -35px; background: none no-repeat 0% -35px;
margin: 0 1px 0 0; border: 1px solid transparent;
padding: 0 0 0 5px; border-radius: 4px 4px 0 0;
text-decoration: none; display: block;
margin: 1px 1px 0 0;
padding: 5px 9px;
position: relative; position: relative;
text-decoration: none;
white-space: nowrap;
cursor: pointer; cursor: pointer;
} }
#tabs a span { #tabs .activetab > a {
float: left; margin-top: 0;
display: block;
background: none no-repeat 100% -35px;
padding: 6px 10px 6px 5px;
white-space: nowrap;
}
#tabs .activetab a {
background-position: 0 0;
border-bottom: 1px solid transparent;
}
#tabs .activetab a span {
background-position: 100% 0;
padding-bottom: 7px; padding-bottom: 7px;
} }
#tabs a:hover {
background-position: 0 -70px;
}
#tabs a:hover span {
background-position:100% -70px;
}
#tabs .activetab a:hover {
background-position: 0 0;
}
#tabs .activetab a:hover span {
background-position: 100% 0;
}
/* Mini tabbed menu used in MCP /* Mini tabbed menu used in MCP
----------------------------------------*/ ----------------------------------------*/
#minitabs { #minitabs {
@ -183,31 +158,34 @@ ul.cplist {
.tabs-container #minitabs { .tabs-container #minitabs {
float: right; float: right;
margin-top: 19px; margin-top: 15px;
max-width: 50%; max-width: 50%;
} }
#minitabs ul { #minitabs > ul {
list-style: none;
margin:0; margin:0;
padding: 0; padding: 0;
list-style: none; position: relative;
} }
#minitabs li { #minitabs .tab {
display: block; display: inline;
float: right; float: right;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
padding: 5px 10px 4px 10px;
font-size: 1em; font-size: 1em;
font-weight: bold; font-weight: bold;
line-height: 14px;
}
#minitabs .tab > a {
border-radius: 5px 5px 0 0;
display: block;
margin-left: 2px; margin-left: 2px;
padding: 5px 9px;
position: relative;
} }
#minitabs a { #minitabs .tab > a:hover {
}
#minitabs a:hover {
text-decoration: none; text-decoration: none;
} }
@ -217,7 +195,7 @@ ul.cplist {
position: relative; position: relative;
} }
.responsive-tab .responsive-tab-link span { .responsive-tab > a.responsive-tab-link {
display: inline-block; display: inline-block;
font-size: 16px; font-size: 16px;
position: relative; position: relative;
@ -226,45 +204,34 @@ ul.cplist {
text-decoration: none; text-decoration: none;
} }
#minitabs .responsive-tab .responsive-tab-link span { .responsive-tab .responsive-tab-link:before {
display: block;
}
.responsive-tab .responsive-tab-link span:before {
content: ''; content: '';
position: absolute; position: absolute;
left: 5px; left: 10px;
top: 8px; top: 7px;
height: .125em; height: .125em;
width: 14px; width: 14px;
border-bottom: 0.125em solid transparent; border-bottom: 0.125em solid transparent;
border-top: 0.375em double transparent; border-top: 0.375em double transparent;
} }
#minitabs .responsive-tab .responsive-tab-link span:before {
left: 0;
top: 2px;
}
#tabs ul, #minitabs ul {
position: relative;
}
#tabs .dropdown, #minitabs .dropdown { #tabs .dropdown, #minitabs .dropdown {
top: 29px; top: 20px;
margin-right: -1px; margin-right: -2px;
font-size: 1.1em;
font-weight: normal;
} }
#minitabs .dropdown { #minitabs .dropdown {
top: 18px; margin-right: -4px;
} }
#tabs .dropdown-up .dropdown, #minitabs .dropdown-up .dropdown { #tabs .dropdown-up .dropdown, #minitabs .dropdown-up .dropdown {
bottom: -5px; bottom: 20px;
top: auto; top: auto;
} }
#minitabs .dropdown-up .dropdown { #minitabs .dropdown-up .dropdown {
bottom: 18px; bottom: 18px;
} }
@ -272,34 +239,14 @@ ul.cplist {
margin-left: -41px; margin-left: -41px;
} }
#tabs .dropdown li, #minitabs .dropdown li { #tabs .dropdown li {
display: block !important;
background: transparent none;
padding: 0;
}
.tabs-container #minitabs .dropdown a span {
display: block;
}
#tabs .dropdown a, #tabs .dropdown a span, #minitabs .dropdown a, #minitabs .dropdown a span {
background: transparent;
float: none;
margin: 0;
padding: 0;
text-align: right; text-align: right;
} }
.tabs-container #minitabs .dropdown a span { #minitabs .dropdown li {
text-align: left; text-align: left;
} }
#tabs .dropdown a span, #minitabs .dropdown a span {
padding: 5px 8px;
color: inherit !important;
}
/* UCP navigation menu /* UCP navigation menu
----------------------------------------*/ ----------------------------------------*/
/* Container for sub-navigation list */ /* Container for sub-navigation list */