     markDestroyed: (item) ->
       item.hide().addClass('destroyed').find("input[name$='[_destroy]']").val(1)
       @menu.children('.actions').after(item.remove())
-
 
     # This method is called with a Hash value
     # that is called by reference from the parent function

                validate: ->
                  if this.getElement().isVisible() && (this.getValue() || '').length == 0
                    CKEDITOR.dialog.validate.notEmpty('please enter a URL').apply(this)
              }
            ] # /tab1 elements
          },

                    element.children('a').append("<span class='caret'></span>")
                  else
                    element.children('a').text(this.getValue())
                validate: ->
                  if this.getDialog().getValueOf('item', 'source') != 'Divider' && (this.getValue() || '').length == 0
                    CKEDITOR.dialog.validate.notEmpty('please enter a title').apply(this)
              },
              {type: 'html', html: '<br>'},
              {
                id: 'source',
                type: 'radio',
                label: 'Link Type',
                items: [['Page', 'Page'], ['URL', 'URL'], ['Route', 'Route'], ['Divider', 'Divider']]
                setup: (element) ->
                  menuable_id = element.children('.menu-item').children("input[name$='[menuable_id]']").val() || ''
                  special = element.children('.menu-item').children("input[name$='[special]']").val() || ''
                  url = element.children('.menu-item').children("input[name$='[url]']").val() || ''

                  if menuable_id.length > 0
                    this.setValue('Page')
                  else if special == 'divider'
                    this.setValue('Divider')
                  else if special.length > 0
                    this.setValue('Route')
                  else if url.length > 0 && url != '#'
                    this.setValue('URL')
                  else
                    this.setValue('Page')

                onChange: (event) ->
                  if this.getValue() == 'Page'
                    this.getDialog().getContentElement('item', 'title').getElement().show()
                    this.getDialog().getContentElement('item', 'menuable_id').getElement().show()

                    this.getDialog().getContentElement('item', 'url').getElement().hide()
                    this.getDialog().getContentElement('item', 'special').getElement().hide()

                  if this.getValue() == 'URL'
                    this.getDialog().getContentElement('item', 'title').getElement().show()
                    this.getDialog().getContentElement('item', 'url').getElement().show()

                    this.getDialog().getContentElement('item', 'menuable_id').getElement().hide()
                    this.getDialog().getContentElement('item', 'special').getElement().hide()

                  if this.getValue() == 'Divider'
                    this.getDialog().getContentElement('item', 'url').getElement().hide()
                    this.getDialog().getContentElement('item', 'title').getElement().hide()
                    this.getDialog().getContentElement('item', 'menuable_id').getElement().hide()
                    this.getDialog().getContentElement('item', 'special').getElement().hide()

                  if this.getValue() == 'Route'
                    this.getDialog().getContentElement('item', 'title').getElement().show()
                    this.getDialog().getContentElement('item', 'special').getElement().show()

                    this.getDialog().getContentElement('item', 'menuable_id').getElement().hide()
                    this.getDialog().getContentElement('item', 'url').getElement().hide()
              },
              {
                id: 'menuable_id',
