Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made services orderable #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

anna-oake
Copy link

Fixes #1 issue.
Also fixed minor .gitignore issue and made service groups appear after single services, since it's much more logical for me.

@nioupola
Copy link

Hello,
I apply this PR on my fork but can't see how to get the URL to order the services.
Can you tell me how we use this PR?
Thanks in advance

@nioupola
Copy link

I found the fix :

  sortabledata = document.getElementsByClassName('data-orderable-list')[0]
  sortable = new Sortable(sortabledata,
      onUpdate: ->
        orderedIds = $.map($(this.el).find('.data-orderable-id'), (elem) ->
          $(elem).data 'orderable-id'
        )
        $.ajax
          async: true
          url: "/admin/services/reorder"
          type: 'POST'
          data: ids: orderedIds
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UI for re-ordering services
3 participants