- Delete js and view code for crumbs in docDetail .
This commit is contained in:
@@ -61,12 +61,6 @@
|
||||
#mainContent > .panel {margin-bottom: 0; overflow-y: auto;}
|
||||
#mainContent > .main-col{flex: auto;}
|
||||
|
||||
.info .version, .info .crumbs {float: left;}
|
||||
.crumbs img {margin-right: 3px; margin-bottom: 4px;}
|
||||
.crumbs {float: left; display: flex;height: 32px; width: 640px; align-items: center; overflow: hidden;}
|
||||
.crumbs .crumb-item {padding: 6px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; display: flex;}
|
||||
.crumb-item .separator {flex: 0 0 15px; display: flex; justify-content: center; align-items: center;}
|
||||
.crumb-item a {flex: none}
|
||||
.main-col {position: relative;}
|
||||
#autoBox {display: flex; overflow: hidden; text-overflow: ellipsis; padding-right: 15px; position: relative;}
|
||||
#autoBox > .ellipsis {position: absolute; top: 3px; right: 0; width: 10px; background: #F4F5F7; height: 100%;}
|
||||
|
||||
@@ -402,33 +402,3 @@ function submit(object)
|
||||
setTimeout(function(){$(object).attr('type', 'button').removeAttr('disabled')}, 2000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update crumbs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function updateCrumbs()
|
||||
{
|
||||
var $crumbs = $('#crumbs');
|
||||
var $crumbItems = $('#crumbs > .crumb-item');
|
||||
var crumbMaxWidth = 660;
|
||||
if($crumbs.width < crumbMaxWidth || $crumbItems.length == 1) return;
|
||||
|
||||
/* last crumbItem width major */
|
||||
var $lastChild = $($crumbItems[$crumbItems.length -1]);
|
||||
var widthSum = 0 + $lastChild.width();
|
||||
for(var i = 0; i < $crumbItems.length - 1; i++)
|
||||
{
|
||||
var crumbItem = $crumbItems[i];
|
||||
var widthSum = widthSum + $(crumbItem).width();
|
||||
if(widthSum >= crumbMaxWidth)
|
||||
{
|
||||
$(crumbItem).addClass('in-auto-box');
|
||||
var $autoCrumbItems = $('#crumbs > .in-auto-box');
|
||||
$lastChild.before('<div id="autoBox" class="flex-auto"><div class="ellipsis">...<div></div>');
|
||||
$('#autoBox').prepend($autoCrumbItems);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user