       @addNew homePageData
 
     @on "ChangeHomePageState", (homePageData) =>
-      query     = { isActive: yes }
+      query = { isActive: yes }
       for homePage in @homePages when homePage.getData().isActive is yes
         oldActive = homePage
 
-      activate  = =>
+      toggleState = =>
         homePageData.update { isActive: !homePageData.isActive }, (err, res) =>
           return warn err  if err
           @reloadViews()

      {{> @noPageLabel}}
      {{> @container}}
    """

class HomePageItem extends JView


      if oldActive
        oldActive.getData().update { isActive: no }, (err, res) =>
          return warn err  if err
          toggleState()
      else
        toggleState()

    @on "AddingNewHomePageCancelled", =>
      page.show() for page in @homePages
