     opt = templates.find 'option:selected'
     opt.insertAfter opt.next()
     templates.change().focus()
+    saveTemplates()
   # Move the selected option up once when the *Up* control is clicked.
   $('#moveUp_btn').click ->
     opt = templates.find 'option:selected'
     opt.insertBefore opt.prev()
     templates.change().focus()
+    saveTemplates()
 
 # Bind the event handlers required for exporting templates.
 loadTemplateExportEvents = ->

    $(document).trigger 'close.facebox'
    updateToolbarTemplates()
    templates.focus()
  # Cancel the import process.
  $('.import_no_btn, .import_close_btn').live 'click', ->
    $(document).trigger 'close.facebox'

  templates.change ->
    $this = $ this
    opt   = $this.find 'option:selected'
    templates.data 'quiet', 'true'
    if opt.length is 0
      # Disable all the controls as no option is selected.
      lastSelectedTemplate = {}
