#NEWLINE# def importFileOpen( self , * ignore ) : #NEWLINE# #INDENT# if ( ( not filename . modelManager . modelXbrl ) or ( self . modelManager . modelXbrl . modelDocument . type not in ( ModelDocument . Type . SCHEMA , ModelDocument . Type . LINKBASE , ModelDocument . Type . INSTANCE , ModelDocument . Type . INLINEXBRL ) ) ) : #NEWLINE# #INDENT# tkinter . messagebox . showwarning ( _ ( 'arelle - Warning' ) , _ ( 'Import requires an opened DTS' ) , parent = self . parent ) #NEWLINE# return False #NEWLINE# #UNINDENT# filename = self . uiFileDialog ( 'open' , title = _ ( 'arelle - Import file into opened DTS' ) , initialdir = self . config . setdefault ( 'importOpenDir' , '.' ) , filetypes = [ ( _ ( 'XBRL files' ) , '*.*' ) ] , defaultextension = '.xml' ) #NEWLINE# if ( self . isMSW and ( '/Microsoft/Windows/Temporary Internet Files/Content.IE5/' in filename ) ) : #NEWLINE# #INDENT# tkinter . messagebox . showerror ( _ ( 'Loading web-accessed files' ) , _ ( 'Please import web-accessed files with the File menu, fourth entry, "Import web..."' ) , parent = self . parent ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( os . sep == '\\' ) : #NEWLINE# #INDENT# filename = filename . replace ( '/' , '\\' ) #NEWLINE# #UNINDENT# self . fileOpenFile ( filename , importToDTS = True )