             title: title
             manual: true
             footerButtons: footerButtons
-            targetObject: controller
+            targetObject: targetObj
             fade: fade
             fullSizeButtons: fullSizeButtons
         )

            Ember.Object.create({title: confirmButtonTitle, clicked:"modalConfirmed", dismiss: 'modal'})
            Ember.Object.create({title: cancelButtonTitle, clicked:"modalCanceled", dismiss: 'modal'})
        ]
        @open('confirm-modal', title || 'Confirmation required!', body, buttons, controller)

    openModal: (modalView, options = {}) ->
        rootElement = options.rootElement or '.ember-application'
        instance = modalView.create options
        instance.appendTo rootElement

    open: (name, title, view, footerButtons, controller, fade, fullSizeButtons) ->
        cl = controller.container.lookup 'component-lookup:main'
        modalComponent = cl.lookupFactory('bs-modal', controller.get('container')).create()


    toggle: (name) ->
        @get(name).toggle()

    confirm: (controller, title, message, confirmButtonTitle = "Confirm", cancelButtonTitle = "Cancel", targetObj = controller, fade = true, fullSizeButtons = false) ->
        body = Ember.View.extend(
            template: Ember.Handlebars.compile(message || "Are you sure you would like to perform this action?")
        )
