       @menu.on 'click', 'li.dropdown.open,.dropdown-menu > li.dropdown,li:not(.dropdown)', (event) =>
         event.stopPropagation()
         @menu.find('.open').removeClass('open')
+        @menu.data('dirty', true)
         # Open the CKEDITOR dialog and pass the source effective_menu_item $('li') to the dialog
         CKEDITOR.instances[Object.keys(CKEDITOR.instances)[0]].openDialog 'effectiveMenusDialog', (dialog) ->
           dialog.effective_menu_item = $(event.currentTarget)

    # This way the saves happen all at once

    serialize: (retval) ->
      # console.log "============ BEFORE =============="
      # @menu.find('li').each (index, item) =>
      #   item = $(item)

        item = $(@menu.data('effective-menu-new-html').replace(/:new/g, "#{unique_id}"))

        @menu.children('.actions').before(item)
        @menu.data('dirty', true)

        CKEDITOR.instances[Object.keys(CKEDITOR.instances)[0]].openDialog 'effectiveMenusDialog', (dialog) ->
          dialog.effective_menu_item = item
