 
     # Close the modal.
     close: -> @$el.modal 'close'
+
+
+    exportCalendar: ->
+        calendarId = @calendar.value()
+        if calendarId in app.calendars.toArray()
+            window.location = "export/#{calendarId}.ics"
+
+        else
+            alert t 'please select existing calendar'
+
+
+    # creates a placeholder for the password
+    getPlaceholder: (password) ->
+        placeholder = []
+        placeholder.push '*' for i in [1..password.length] by 1
+        return placeholder.join ''
+
+    showPassword: ->
+        @$('#placeholder').html @model.token
+        @$('#show-password').hide()
+        @$('#hide-password').show()
+
+    hidePassword: ->
+        @$('#placeholder').html @model.placeholder
+        @$('#hide-password').hide()
+        @$('#show-password').show()


    template: require('./templates/settings_modal')

    afterRender: ->

        # Show the modal.
        @$el.modal 'show'

BaseView = require 'lib/base_view'
ImportView = require './import_view'
ComboBox = require './widgets/combobox'

module.exports = class SettingsModals extends BaseView

