 
   # At this point we have all the settings initialized.
   bootstrap: =>
-    dashChangeEl = $('#dashboard_change')
-
     @sidebar.bootstrap()
     # If a "change dashboard" button is present, set up the DashboardChanger.
 
     @router.load_default_slides()
 
+    dashChangeEl = $('#dashboard_change')
     if dashChangeEl.length > 0
       new DashboardChangerView(dashChangeEl)
 


    # initial charts render, takes care of locked charts
    @charts.load_charts()


  setup_fce_toggle: ->
    if element = $('.slide .fce-toggle')

    @checkboxes_initialized = true

  call_api: (input_params) =>
    @api.update
      queries:  window.gqueries.keys(),
      inputs:   input_params,
      settings:
        use_fce: App.settings.get('use_fce')
      success:  @handle_api_result
      error:    @handle_ajax_error

  handle_ajax_error: (jqXHR, textStatus, error) ->
    console.log("Something went wrong: " + textStatus)
