     __prepareTabs: (tab) ->
       @addTab 'preview'
       @__hideTab 'preview'
-      
+
       @addTab tabName for tabName in @settings.tabs
       @switchTab(tab || @settings.tabs[0])
 

      return promise

    apiForTab: (tabName) ->
      api = 
        avalibleTabs: @settings.tabs
        fileColl: @files.readOnly()
        onSwitched: $.Callbacks()


  currentDialogPr = null

  ns.isDialogOpened = ->
    currentDialogPr != null

  ns.closeDialog = ->
