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

Added @sortableurl #112

Open
wants to merge 1 commit into
base: L5.5-7
Choose a base branch
from
Open

Added @sortableurl #112

wants to merge 1 commit into from

Conversation

fomvasss
Copy link

Often there is a need to get a URL for sorting, for example in select or button, for example:

<select class='ajax-sortable'>
      <option value='@sortableurl('id')'>
      <option value='@sortableurl('name')'>
</select>

I added sortableurl function and blade directive. Please, accept my pull-requeat. Thanks!

@Kyslik Kyslik self-assigned this Jan 22, 2019
@Kyslik
Copy link
Owner

Kyslik commented Jan 26, 2019

Hey @fomvasss,

Do I understand the why of this PR.

The sorting does not happen using links <a> but rather via select-box? I've seen this kind of approach. Just making sure.

@fomvasss
Copy link
Author

fomvasss commented Jan 26, 2019

I need to get only URL for sortable, without tag <a>

@nomura-axis
Copy link

@Kyslik , why this PR isn't accepted? I also need functions in this PR.
Perhaps @fomvasss needs the @sortableurl in the case like this.

<select class='ajax-sortable'>
    <option value='@sortableurl('id')'>
    <option value='@sortableurl('name')'>
</select>

<script>
    $(".ajax-sortable").on("change", function(){
        $.ajax({
            url:$(this).val(),
            type:'POST',
            data:{
                'user_id':$('#user_id').val(),
                'user_name':$('#user_name').val()
            }
        }).done((data) => {
            $('.result').html(data);
        })
    })
</script>

@Kyslik
Copy link
Owner

Kyslik commented May 30, 2019

@nomura-axis Because I did not have time to vet it.

@Kyslik
Copy link
Owner

Kyslik commented Sep 7, 2019

@fomvasss, @nomura-axis do you think you could add tests for this; I will happily vet & merge.

@Kyslik Kyslik assigned fomvasss and nomura-axis and unassigned Kyslik Sep 7, 2019
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.

3 participants