This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-19
lines changed Expand file tree Collapse file tree 2 files changed +13
-19
lines changed Original file line number Diff line number Diff line change 52
52
53
53
// Recursively hide all node's children in a tree
54
54
$ . fn . collapse = function ( ) {
55
- $ ( this ) . addClass ( "collapsed" ) ;
56
- childrenOf ( $ ( this ) ) . each ( function ( ) {
57
- if ( ! $ ( this ) . hasClass ( "collapsed" ) ) {
58
- $ ( this ) . collapse ( ) ;
59
- }
60
-
61
- this . style . display = "none" ; // Performance! $(this).hide() is slow...
62
- } ) ;
55
+ var id = $ ( this ) . attr ( 'id' ) ;
56
+ $ ( 'tr[id*="' + id + '"]' ) . addClass ( "collapsed" ) . hide ( ) ;
57
+ $ ( this ) . show ( ) ;
63
58
colorLines ( true ) ;
64
59
return this ;
65
60
} ;
156
151
{
157
152
// $(this).find('td:first').prepend('<img class="tableLoading" alt="" src="'+json.global.coreWebroot+'/public/images/icons/loading.gif"/>');
158
153
}
154
+
155
+ var id = $ ( this ) . attr ( 'id' ) ;
156
+
159
157
$ ( this ) . removeClass ( "collapsed" ) . addClass ( "expanded" ) ;
160
- childrenOf ( $ ( this ) ) . each ( function ( ) {
158
+ $ ( 'tr[id*="' + id + '"]' ) . show ( ) ;
159
+ $ ( 'tr[id*="' + id + '"]' ) . each ( function ( ) {
161
160
initialize ( $ ( this ) ) ;
162
-
163
- if ( $ ( this ) . is ( ".expanded.parent" ) ) {
164
- $ ( this ) . expand ( ) ;
165
- }
166
-
167
- // this.style.display = "table-row"; // Unfortunately this is not possible with IE :-(
168
- $ ( this ) . show ( ) ;
169
161
} ) ;
170
162
initializeAjax ( $ ( this ) , false ) ;
171
163
colorLines ( true ) ;
You can’t perform that action at this time.
0 commit comments