Created
July 11, 2011 18:42
-
-
Save wheeyls/1076492 to your computer and use it in GitHub Desktop.
Hide Line Items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lineItemControl a { | |
padding: 2px 20px 0px 20px; | |
overflow: hidden; | |
background-repeat: no-repeat; | |
/*height: 0px !important;*/ | |
height /**/:22px; | |
} | |
#explodeLineItems { background-image: url("/img/tree/plus.gif"); width: 22px; } | |
#collapseLineItems { background-image: url("/img/tree/minus.gif"); width: 22px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allHTMLTags=new Array(); | |
function collapseLineItems() | |
{ | |
jQuery("span[class*='collapsible']").attr("className","collapsible collapsed"); | |
jQuery("tr[class*='line-item child-line-item']").attr("className","line-item child-line-item line-item-show reorderable-row droppable-element line-item-collapsed") | |
} | |
function explodeLineItems() | |
{ | |
jQuery("span[class*='collapsible collapsed']").attr("className","collapsible"); | |
jQuery("tr[class*='line-item child-line-item']").attr("className","line-item child-line-item line-item-show reorderable-row droppable-element") | |
} | |
jQuery(document).ready(collapseLineItems); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allHTMLTags=new Array(); | |
function collapseLineItems() | |
{ | |
//var allHTMLTags=document.getElementsByTagName("*"); | |
var allHTMLTags=jQuery("span[class*='collapsible']"); | |
for(i=0;i<allHTMLTags.length;i++) | |
{ | |
if(allHTMLTags[i].className=="collapsible") | |
{ | |
allHTMLTags[i].className='collapsible collapsed'; | |
} | |
} | |
var allHTMLTags=jQuery("tr[class*='line-item child-line-item']"); | |
for(i=0;i<allHTMLTags.length;i++) | |
{ | |
allHTMLTags[i].style.display='none'; | |
} | |
} | |
function explodeLineItems() | |
{ | |
//var allHTMLTags=document.getElementsByTagName("*"); | |
var allHTMLTags=jQuery("span[class*='collapsible collapsed']"); | |
for(i=0;i<allHTMLTags.length;i++) | |
{ | |
if(allHTMLTags[i].className=="collapsible collapsed") | |
{ | |
allHTMLTags[i].className='collapsible'; | |
} | |
} | |
var allHTMLTags=jQuery("tr[class*='line-item child-line-item']"); | |
for(i=0;i<allHTMLTags.length;i++) | |
{ | |
allHTMLTags[i].style.display='table-row'; | |
} | |
} | |
collapseLineItems(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return "<script type=\"text/javascript\" src=\"/bmfsweb/"+lower(_system_company_name)+"/image/Directory/FILENAME.js\"></script>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="lineItemControl"> | |
<a href="javascript:explodeLineItems()" id="explodeLineItems">Expand All</a> | |
<a href="javascript:collapseLineItems()" id="collapseLineItems">Collapse All</a> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment