             "click .quest-add-realm-list li a": "switchRealmList"
 
         initialize: ->
+            super
             _.bindAll this
             $("#modal-storage").append @$el
             @render()

            tagLine = @$("[name=tags]").val()
            QuestModel::tagline2tags tagLine


        render: ->
            unless sharedModels.realms.length
                sharedModels.realms.fetch().success => @render()
                return

            defaultRealm = @options.realm
            unless defaultRealm
                userRealms = sharedModels.currentUser.get("realms")
                defaultRealm = userRealms[0] if userRealms and userRealms.length is 1
            @$el.html $(@template(
                realms: sharedModels.realms.toJSON()
                defaultRealm: defaultRealm
            ))

            @$("[name=name]").focus()


define [
    "underscore", "jquery"
    "views/proto/common"
    "views/helper/textarea"
    "models/shared-models", "models/quest"
    "text!templates/quest/add.html"
    "bootstrap", "jquery.autosize"
], (_, $, Common, Textarea, sharedModels, QuestModel, html) ->
    class extends Common
        template: _.template(html)
        events:
            "click ._go": "submit"
