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

Add custom href for links #15

Merged
merged 1 commit into from
Jun 9, 2014
Merged

Add custom href for links #15

merged 1 commit into from
Jun 9, 2014

Conversation

ilya-il
Copy link
Contributor

@ilya-il ilya-il commented Jun 3, 2014

Add custom href for links. To support POST-form pagination you should write JS function.

pagination = Pagination(page=page,
per_page=per_page,
total=total,
href='javascript:change_page({0})')

JS function will change page and submit form. Example from flask template:

<script type="text/javascript">
    function change_page ( page_num )
    {
      document.searchform.current_page.value = page_num ;
      document.searchform.submit() ;
    }
</script>

        pagination = Pagination(page=
                                                    per_page=
                                                    total=,
                                                    href='javascript:change_page({0})')

JS function wil change page and submit form
lixxu added a commit that referenced this pull request Jun 9, 2014
Add custom href for links.
Merge it although I don't know how to use it, :(
@lixxu lixxu merged commit bda64f0 into lixxu:master Jun 9, 2014
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.

2 participants