         alertMsg = $('<div class="alert"></div>').text(t(error.value))
         @$('.popover-content').before alertMsg
 
-    getButtonText: -> if @model.isNew() then t('create') else t('edit')
-
+
+    getButtonText: ->
+        if @model.isNew() then t('create') else t('edit')
+

        if not @model.isAllDay()
            inputEnd = @$('#input-end')
            inputStart = @$('#input-start')
            inputDiff = @$('#input-diff')
            inputStart.on 'timepicker.next', -> inputEnd.focus()
            inputEnd.on 'timepicker.next', -> inputDiff.focus()
            inputEnd.on 'timepicker.prev', ->
                inputStart.focus().timepicker 'highlightMinute'

            inputDiff.on 'keydown', (ev) ->
                if ev.keyCode is 37 # left
                    inputEnd.focus().timepicker 'highlightMinute'
                if ev.keyCode is 39 # right
                    @$('#input-desc').focus()

        @calendar = new ComboBox
            el: @$ '#calendarcombo'

            @selfclose()
        else
            @addButton.removeClass 'disabled'


    formatDateTime: (dtStr) ->
        splitted = dtStr.match /([0-9]{1,2}):([0-9]{2})\+?([0-9]*)/
