This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,7 @@ function initDragAndDrop()
169
169
if ( jsonResponse [ 0 ] )
170
170
{
171
171
createNotive ( jsonResponse [ 1 ] , 1500 ) ;
172
- $ ( $ ( ui . draggable ) . parents ( "tr" ) ) . appendBranchTo ( destination_obj ) ;
173
- $ ( from_obj ) . reload ( ) ;
174
- $ ( destination_obj ) . reload ( ) ;
172
+ $ ( $ ( ui . draggable ) . parents ( "tr" ) ) . appendBranchTo ( destination_obj ) ;
175
173
}
176
174
else
177
175
{
Original file line number Diff line number Diff line change 51
51
} ;
52
52
53
53
// Recursively hide all node's children in a tree
54
- $ . fn . collapse = function ( ) {
55
- var id = $ ( this ) . attr ( 'id' ) ;
56
- $ ( 'tr[id*="' + id + '"]' ) . addClass ( "collapsed" ) . hide ( ) ;
57
- $ ( this ) . show ( ) ;
54
+ $ . fn . collapse = function ( ) {
55
+ $ ( this ) . addClass ( "collapsed" ) ;
56
+
57
+ childrenOf ( $ ( this ) ) . each ( function ( ) {
58
+ if ( ! $ ( this ) . hasClass ( "collapsed" ) ) {
59
+ $ ( this ) . collapse ( ) ;
60
+ }
61
+
62
+ this . style . display = "none" ; // Performance! $(this).hide() is slow...
63
+ } ) ;
64
+
58
65
colorLines ( true ) ;
59
66
return this ;
60
67
} ;
201
208
202
209
node . addClass ( options . childPrefix + destination . id ) ;
203
210
move ( node , destination ) ; // Recursively move nodes to new location
204
- var padding = getPaddingLeft ( destination ) + options . indent ;
211
+ // adjust node's padding'
212
+ var cell = $ ( $ ( destination ) . children ( "td" ) [ options . treeColumn ] ) ;
213
+ var padding = getPaddingLeft ( cell ) + options . indent ;
205
214
node . children ( "td:first" ) [ options . treeColumn ] . style . paddingLeft = ( padding - 12 ) + "px" ;
215
+ // adust node's children's padding'
216
+ var childPaddingLeft = padding - 12 + options . indent ;
217
+ var arrayCell = childrenOf ( node ) ;
218
+ if ( arrayCell == null ) return ;
219
+ arrayCell . each ( function ( ) {
220
+ $ ( this ) . children ( "td:first" ) [ options . treeColumn ] . style . paddingLeft = ( childPaddingLeft - 12 ) + "px" ;
221
+ } ) ;
206
222
}
207
223
208
224
return this ;
Original file line number Diff line number Diff line change @@ -114,9 +114,7 @@ function initDragAndDrop()
114
114
if ( jsonResponse [ 0 ] )
115
115
{
116
116
createNotive ( jsonResponse [ 1 ] , 1500 ) ;
117
- $ ( $ ( ui . draggable ) . parents ( "tr" ) [ 0 ] ) . appendBranchTo ( destination_obj ) ;
118
- $ ( from_obj ) . reload ( ) ;
119
- $ ( destination_obj ) . reload ( ) ;
117
+ $ ( $ ( ui . draggable ) . parents ( "tr" ) [ 0 ] ) . appendBranchTo ( destination_obj ) ;
120
118
}
121
119
else
122
120
{
@@ -146,6 +144,7 @@ function initDragAndDrop()
146
144
}
147
145
} ) ;
148
146
147
+ // qtip pop-up for folders with only read permission
149
148
$ ( this ) . parents ( "tr:[policy=0]" ) . qtip ( {
150
149
content : 'You do not have write permission on this folder and cannot drop item(s) to it !' ,
151
150
show : 'mouseover' ,
You can’t perform that action at this time.
0 commit comments