<commit_before>###
Modal component.
###
Bootstrap.BsModalComponent = Ember.Component.extend(
    classNames: ['modal']
    #classNameBindings: ['fade']
    attributeBindings: ['role', 'aria-labelledby', 'isAriaHidden:aria-hidden', "ariaLabelledBy:aria-labelledby"]
    isAriaHidden: (->
        "#{@get('isVisible')}"
    ).property('isVisible')
    modalBackdrop: '<div class="modal-backdrop fade in"></div>'
    role: 'dialog'

    #--Defaults--
    backdrop: true
    title: null
    isVisible: false
    manual: false

    didInsertElement: ->
        @._super()
        @setupBinders()
        #Register modal in the modal manager
        name = @get('name')
        Ember.assert("Modal name is required for modal view #{@get('elementId')}", @get('name'))
        name?= @get('elementId')
        Bootstrap.ModalManager.add(name, @)

        if @manual
            @show()

    becameVisible: ->
        @appendBackdrop() if @get("backdrop")

    becameHidden: ->
        @_backdrop.remove() if @_backdrop

    appendBackdrop: ->
        parentElement = @$().parent()<commit_msg>Make the modal implementation follow the spec of bs: http://getbootstrap.com/javascript/#modals-usage Now, body gets "modal-open" class when a modal is opened, which fixes the scrolling issues.<commit_after>###
Modal component.
###
Bootstrap.BsModalComponent = Ember.Component.extend(
    classNames: ['modal']
    #classNameBindings: ['fade']
    attributeBindings: ['role', 'aria-labelledby', 'isAriaHidden:aria-hidden', "ariaLabelledBy:aria-labelledby"]
    isAriaHidden: (->
        "#{@get('isVisible')}"
    ).property('isVisible')
    modalBackdrop: '<div class="modal-backdrop fade in"></div>'
    role: 'dialog'

    #--Defaults--
    backdrop: true
    title: null
    isVisible: false
    manual: false

    didInsertElement: ->
        @._super()
        @setupBinders()
        #Register modal in the modal manager
        name = @get('name')
        Ember.assert("Modal name is required for modal view #{@get('elementId')}", @get('name'))
        name?= @get('elementId')
        Bootstrap.ModalManager.add(name, @)

        if @manual
            @show()

    becameVisible: ->
        @appendBackdrop() if @get("backdrop")
        Em.$('body').addClass("modal-open")

    becameHidden: ->
        @_backdrop.remove() if @_backdrop
        Em.$('body').removeClass("modal-open")

    appendBackdrop: ->
        parentElement = @$().parent()
{'fraction_non_alphanumeric': 0.15703157031570317, 'fraction_numerical': 0.0, 'mean_word_length': 2.92914653784219, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6605141', 'n_tokens_mistral': 745, 'n_tokens_neox': 726, 'n_words': 165}