[Common] skiped marker for active tab
This commit is contained in:
parent
74f3f9f79a
commit
5911176848
|
@ -81,7 +81,6 @@ define([
|
||||||
return {
|
return {
|
||||||
$tabs: undefined,
|
$tabs: undefined,
|
||||||
$panels: undefined,
|
$panels: undefined,
|
||||||
$marker: undefined,
|
|
||||||
isFolded: false,
|
isFolded: false,
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
|
@ -101,7 +100,6 @@ define([
|
||||||
$boxTabs = me.$('.tabs > ul');
|
$boxTabs = me.$('.tabs > ul');
|
||||||
me.$tabs = $boxTabs.find('> li');
|
me.$tabs = $boxTabs.find('> li');
|
||||||
me.$panels = me.$('.box-panels > .panel');
|
me.$panels = me.$('.box-panels > .panel');
|
||||||
me.$marker = me.$('.tabs .marker');
|
|
||||||
optsFold.$bar = me.$('.toolbar');
|
optsFold.$bar = me.$('.toolbar');
|
||||||
var $scrollR = me.$('.tabs .scroll.right');
|
var $scrollR = me.$('.tabs .scroll.right');
|
||||||
$scrollL = me.$('.tabs .scroll.left');
|
$scrollL = me.$('.tabs .scroll.left');
|
||||||
|
@ -205,19 +203,9 @@ define([
|
||||||
panel.addClass('active');
|
panel.addClass('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
var $tc = this.$tabs.find('> a[data-tab=' + tab + ']');
|
var $tp = this.$tabs.find('> a[data-tab=' + tab + ']').parent();
|
||||||
var $tp = $tc.parent();
|
|
||||||
if ( $tp.length ) {
|
if ( $tp.length ) {
|
||||||
$tp.addClass('active');
|
$tp.addClass('active');
|
||||||
|
|
||||||
// this.$marker.width($tp.width());
|
|
||||||
|
|
||||||
var offs = ($tp.width() - $tc.width())/2-1;
|
|
||||||
this.$marker.width($tc.width()+9);
|
|
||||||
|
|
||||||
if ( $scrollL.is(':visible') )
|
|
||||||
this.$marker.css({left: (offs-9/2)+$tc.position().left + $boxTabs.scrollLeft() - $scrollL.width()});
|
|
||||||
else this.$marker.css({left: (offs-9/2)+$tc.position().left});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( panel.length ) {
|
if ( panel.length ) {
|
||||||
|
|
|
@ -21,9 +21,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.expanded):not(.cover){
|
&:not(.expanded):not(.cover){
|
||||||
.marker {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ribtab.active {
|
.ribtab.active {
|
||||||
> a {
|
> a {
|
||||||
|
@ -129,16 +126,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.marker {
|
|
||||||
position: relative;
|
|
||||||
border-top: 2px solid #fff;
|
|
||||||
top: -7px;
|
|
||||||
-webkit-transition: width .2s, left .2s ease-out;
|
|
||||||
opacity: 1;
|
|
||||||
transition: width .2s, left .2s ease-out, opacity .2s;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.short) {
|
&:not(.short) {
|
||||||
.scroll {
|
.scroll {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
|
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<div class="marker"></div>
|
|
||||||
</ul>
|
</ul>
|
||||||
<a class="scroll right">
|
<a class="scroll right">
|
||||||
<i class="icon">></i>
|
<i class="icon">></i>
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
|
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<div class="marker"></div>
|
|
||||||
</ul>
|
</ul>
|
||||||
<a class="scroll right">
|
<a class="scroll right">
|
||||||
<i class="icon">></i>
|
<i class="icon">></i>
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
|
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<div class="marker"></div>
|
|
||||||
</ul>
|
</ul>
|
||||||
<a href="#" class="scroll right">
|
<a href="#" class="scroll right">
|
||||||
<i class="icon">></i>
|
<i class="icon">></i>
|
||||||
|
|
Loading…
Reference in a new issue