[Common] skiped marker for active tab

This commit is contained in:
Maxim Kadushkin 2017-06-16 11:50:21 +03:00
parent 74f3f9f79a
commit 5911176848
5 changed files with 1 additions and 29 deletions

View file

@ -81,7 +81,6 @@ define([
return {
$tabs: undefined,
$panels: undefined,
$marker: undefined,
isFolded: false,
initialize : function(options) {
@ -101,7 +100,6 @@ define([
$boxTabs = me.$('.tabs > ul');
me.$tabs = $boxTabs.find('> li');
me.$panels = me.$('.box-panels > .panel');
me.$marker = me.$('.tabs .marker');
optsFold.$bar = me.$('.toolbar');
var $scrollR = me.$('.tabs .scroll.right');
$scrollL = me.$('.tabs .scroll.left');
@ -205,19 +203,9 @@ define([
panel.addClass('active');
}
var $tc = this.$tabs.find('> a[data-tab=' + tab + ']');
var $tp = $tc.parent();
var $tp = this.$tabs.find('> a[data-tab=' + tab + ']').parent();
if ( $tp.length ) {
$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 ) {

View file

@ -21,9 +21,6 @@
}
&:not(.expanded):not(.cover){
.marker {
opacity: 0;
}
.ribtab.active {
> 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) {
.scroll {
display: none;

View file

@ -12,7 +12,6 @@
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
</li>
<% } %>
<div class="marker"></div>
</ul>
<a class="scroll right">
<i class="icon">&gt;</i>

View file

@ -12,7 +12,6 @@
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
</li>
<% } %>
<div class="marker"></div>
</ul>
<a class="scroll right">
<i class="icon">&gt;</i>

View file

@ -12,7 +12,6 @@
<a data-tab="<%= tabs[i].action %>" data-title="<%= tabs[i].caption %>"><%= tabs[i].caption %></a>
</li>
<% } %>
<div class="marker"></div>
</ul>
<a href="#" class="scroll right">
<i class="icon">&gt;</i>