 class PageInbox extends KDView
-  
+
   KD.registerPage "Inbox", PageInbox
 
   createCommons:->
     @addSubView header = new HeaderViewSection type : "big", title : "Inbox"
 
-    # Common left pane 
+    # Common left pane
     @commonInnerNavigation = new InboxInnerNavigation
 
-    @commonInnerNavigation.registerListener 
+    @commonInnerNavigation.registerListener
       KDEventTypes : "CommonInnerNavigationListItemReceivedClick"
       listener     : @
       callback     : (pubInst, data)=>

      sizes     : [138,null]
      cssClass  : "inbox-main-split"
      resizable : no
    
    @addSubView inboxSplitView

    inboxSplitView._windowDidResize()
    

  createTabs:->
    @_tab_messages      = @createMessagesTab()
    @_tab_notifications = @createNotificationsTab()
    @inboxTabs.showPane @_tab_messages
    
  createMessagesTab:->
    @inboxTabs.addPane tab = new KDTabPaneView cssClass : "messages-tab"
    
    @inboxMessagesContainer = new KDTabView cssClass : "message-thread-tabs"
    @inboxMessagesContainer.hideHandleContainer()


    inboxMessageListController = new InboxMessageListController
      view          : inboxMessagesList

    tab.addSubView @newMessageBar = new InboxNewMessageBar
      cssClass  : "new-message-bar clearfix"
      delegate  : @inboxMessagesContainer

    @newMessageBar.on "RefreshButtonClicked", =>
      inboxMessageListController.loadMessages =>
        @newMessageBar.refreshButton.hideLoader()

    @newMessageBar.disableMessageActionButtons()

    inboxMessageListController.loadMessages()

    messagesSplit = new SplitViewWithOlderSiblings
      sizes     : ["100%",null]
      views     : [inboxMessagesList,@inboxMessagesContainer]
      cssClass  : "messages-split"
      resizable : yes
      minimums  : [150, null]

