* long list names workaround: now tab has variable width and title; list name is shortened to the tab width

This commit is contained in:
Max Pozdeev 2009-10-25 20:40:03 +03:00
parent 5b1c6f299f
commit 6c9a830bb7
2 changed files with 7 additions and 8 deletions

View file

@ -968,7 +968,7 @@ function loadLists(onInit)
$.each(json.list, function(i,item){
item.i = i;
tabLists[i] = item;
ti += '<li class="'+(i==0?'mtt-tabs-selected':'')+'"><a href="#list'+item.id+'" onClick="mttTabSelected(this,'+i+');return false;">'+item.name+'</a></li>';
ti += '<li class="'+(i==0?'mtt-tabs-selected':'')+'"><a href="#list'+item.id+'" onClick="mttTabSelected(this,'+i+');return false;" title="'+item.name+'">'+item.name+'</a></li>';
});
if(!curList) {
$('#lists .mtt-htabs').children().removeClass('invisible');
@ -1003,7 +1003,7 @@ function addList()
var i = tabLists.length;
item.i = i;
tabLists[i] = item;
if(i > 0) $('#lists>ul>li.mtt-tabs-button').before('<li><a href="#list'+item.id+'" onClick="mttTabSelected(this,'+i+');return false;">'+item.name+'</a></li>') ;
if(i > 0) $('#lists>ul>li.mtt-tabs-button').before('<li><a href="#list'+item.id+'" onClick="mttTabSelected(this,'+i+');return false;" title="'+item.name+'">'+item.name+'</a></li>') ;
else loadLists();
}, 'json');
}
@ -1022,7 +1022,7 @@ function renameCurList()
item.i = curList.i;
tabLists[curList.i] = item;
curList = item;
$('#lists>ul>.mtt-tabs-selected>a').html(item.name);
$('#lists>ul>.mtt-tabs-selected>a').attr('title', item.name).html(item.name);
}, 'json');
}

View file

@ -24,15 +24,14 @@ a { color:#0000ff; }
#authform div.h { font-weight:bold; }
.mtt-tabs ul { list-style: none; padding:0; margin:0; }
.mtt-tabs ul li { margin:0; font-size: 9pt; font-weight:bold; float: left; width:89px; text-align:center; margin-right:3px; border-left:1px solid #ededed; }
.mtt-tabs ul a { margin:0px; text-decoration: none; color:#444444; display: block; height:21px; width: 100%; padding-top: 6px; outline:none; background:url(images/tab_hover.gif) no-repeat top right; }
.mtt-tabs ul li.mtt-tabs-selected { background:#ededed; border-left:1px solid #ededed; }
.mtt-tabs ul li.mtt-tabs-selected a { background:url(images/corner_right.gif) no-repeat top right; }
.mtt-tabs ul li { margin:0; font-size:9pt; font-weight:bold; float: left; min-width:89px; max-width:199px; text-align:center; overflow:hidden; margin-right:3px; border-left:1px solid #ededed; background:url(images/tab_hover.gif) no-repeat top right; }
.mtt-tabs ul a { margin:0; text-decoration:none; color:#444444; display:block; height:21px; width:100%; padding:6px 2px 0px 2px; outline:none; }
.mtt-tabs ul li.mtt-tabs-selected { background:#ededed url(images/corner_right.gif) no-repeat top right; border-left:1px solid #ededed; }
.mtt-tabs ul li:hover a { color: #888888; }
#page_tasks.readonly #htab_search a.htab-toggle { color:#444; }
.mtt-htabs { clear:both; padding:8px; border-bottom:2px solid #DEDEDE; background:url(images/corner_right.gif) no-repeat top right #ededed; }
#loading { float:left; padding-top:5px; background-color:#ffffff; display:none; padding-right:6px;}
.mtt-tabs ul li.mtt-tabs-button { width:21px; }
.mtt-tabs ul li.mtt-tabs-button { min-width:21px; width:21px; }
.mtt-tabs ul li.mtt-tabs-button a img { border:none;}
.mtt-tabs ul li.mtt-tabs-button:hover a img { opacity:0.5; }
#page_tasks.readonly li.mtt-tabs-button { display:none; }