mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
- Handle expansion/truncation of objects lists as part of the browser navigation history... implemented only for "simple lists" (Trac #73)
SVN:trunk[771]
This commit is contained in:
18
js/utils.js
18
js/utils.js
@@ -18,6 +18,24 @@ function ReloadTruncatedList(divId, sSerializedFilter, sExtraParams)
|
||||
}
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Truncate a previously expanded list !
|
||||
*/
|
||||
function TruncateList(divId, iLimit, sNewLabel, sLinkLabel)
|
||||
{
|
||||
var iCount = 0;
|
||||
$('#'+divId+' table.listResults tr').each( function(){
|
||||
if (iCount > iLimit)
|
||||
{
|
||||
$(this).remove();
|
||||
}
|
||||
iCount++;
|
||||
});
|
||||
$('#lbl_'+divId).html(sNewLabel);
|
||||
$('#'+divId+' table.listResults tr:last td').addClass('truncated');
|
||||
$('#'+divId+' table.listResults').addClass('truncated');
|
||||
$('#trc_'+divId).html(sLinkLabel);
|
||||
}
|
||||
/**
|
||||
* Reload any block -- used for periodic auto-reload
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user