             if not $(event.currentTarget).hasClass 'disabled'
                 @remove_namespace_dialog.render @get_selected_elements()
             event.preventDefault()
+
+        # Callback that will be registered: updates the toolbar buttons based on how many namespaces have been selected
+        update_toolbar_buttons: =>
+            # We need to check how many namespaces have been checked off to decide which buttons to enable/disable
+            $remove_namespaces_button = $('.actions-bar a.btn.remove-namespace')
+            $remove_namespaces_button.toggleClass 'disabled', @get_selected_elements().length < 1
 
     class @DatacenterList extends @AbstractList
         # Use a datacenter-specific template for the datacenter list

            @remove_namespace_dialog = new NamespaceView.RemoveNamespaceModal

            super namespaces, ClusterView.NamespaceListElement, 'tbody.list'
                
        add_namespace: (event) =>
            log_action 'add namespace button clicked'

        json_for_template: =>
            json = _.extend super(),
                status: DataUtils.get_machine_reachability(@model.get('id'))
                ip: 'TBD' #TODO
                primary_count: 0
                secondary_count: 0

