File tree Expand file tree Collapse file tree
gateway/sds_gateway/static/js/dataset Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,23 @@ class AuthorsManager {
237237 } )
238238 }
239239
240+ static refreshFileTreeModal ( handler ) {
241+ const { filesSearchHandler } = handler
242+ if ( ! filesSearchHandler ) {
243+ return false
244+ }
245+
246+ if ( ! filesSearchHandler . currentTree ) {
247+ filesSearchHandler . handleSearch ( )
248+ return false
249+ }
250+
251+ filesSearchHandler . updateFilesTable ( {
252+ tree : filesSearchHandler . currentTree ,
253+ } )
254+ return true
255+ }
256+
240257 static getCurrentAuthorsWithDOMIds ( ) {
241258 const authorsList = document . querySelector ( ".authors-list" )
242259 const currentAuthors = [ ]
Original file line number Diff line number Diff line change @@ -266,16 +266,7 @@ class DatasetCreationHandler extends BaseManager {
266266 * Handle file modal show
267267 */
268268 onFileModalShow ( ) {
269- if ( ! this . filesSearchHandler ) {
270- return
271- }
272- if ( ! this . filesSearchHandler . currentTree ) {
273- this . filesSearchHandler . handleSearch ( )
274- return
275- }
276- this . filesSearchHandler . updateFilesTable ( {
277- tree : this . filesSearchHandler . currentTree ,
278- } )
269+ window . AuthorsManager ?. refreshFileTreeModal ( this )
279270 }
280271
281272 /**
Original file line number Diff line number Diff line change @@ -211,17 +211,9 @@ class DatasetEditingHandler extends BaseManager {
211211 * Handle file modal show
212212 */
213213 onFileModalShow ( ) {
214- if ( ! this . filesSearchHandler ) {
215- return
216- }
217- if ( ! this . filesSearchHandler . currentTree ) {
218- this . filesSearchHandler . handleSearch ( )
219- return
214+ if ( window . AuthorsManager ?. refreshFileTreeModal ( this ) ) {
215+ this . syncAllPendingFileRemovalStylesInTree ( )
220216 }
221- this . filesSearchHandler . updateFilesTable ( {
222- tree : this . filesSearchHandler . currentTree ,
223- } )
224- this . syncAllPendingFileRemovalStylesInTree ( )
225217 }
226218
227219 /**
You can’t perform that action at this time.
0 commit comments