Skip to content

Added @sortableurl - #112

Open
fomvasss wants to merge 1 commit into
Kyslik:L5.5-7from
fomvasss:sortableurl
Open

Added @sortableurl#112
fomvasss wants to merge 1 commit into
Kyslik:L5.5-7from
fomvasss:sortableurl

Conversation

@fomvasss

Copy link
Copy Markdown

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

Kyslik commented Jan 26, 2019

Copy link
Copy Markdown
Owner

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

fomvasss commented Jan 26, 2019

Copy link
Copy Markdown
Author

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

@nomura-axis

Copy link
Copy Markdown

@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

Kyslik commented May 30, 2019

Copy link
Copy Markdown
Owner

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

@Kyslik

Kyslik commented Sep 7, 2019

Copy link
Copy Markdown
Owner

@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