Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-10 Thread Stephen McDonald
That makes sense - maybe we could add some scroll to top code then. On Wed, Jun 11, 2014 at 12:26 PM, Ahmad Khayyat wrote: > This behavior is browser-dependent, apparently. I ran into this issue on > chromium, where a page reload gets you back to the same position in the > page as before the re

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-10 Thread Ahmad Khayyat
This behavior is browser-dependent, apparently. I ran into this issue on chromium, where a page reload gets you back to the same position in the page as before the reload. In firefox, a reload puts you back at the top of the page. -- You received this message because you are subscribed to the Goo

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-10 Thread Stephen McDonald
On Sun, Jun 8, 2014 at 8:18 AM, Ahmad Khayyat wrote: > There is one issue with the current approach. The exception message is > shown using Django messages, which displays the message at the top of the > page. If the page tree is scrolled down, the user will see that the illegal > move move was r

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Ahmad Khayyat
There is one issue with the current approach. The exception message is shown using Django messages, which displays the message at the top of the page. If the page tree is scrolled down, the user will see that the illegal move move was reverted, but will not see the message, which is unsettling! Pe

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Ahmad Khayyat
​My pleasure. I appreciate the careful consideration of usability and APIs.​ -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googl

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Stephen McDonald
Looks great Ahmad, thanks a lot for putting up with all my feedback. I'll try and merge this in before the next release which I hope to get out over the next day or so. On Sun, Jun 8, 2014 at 12:35 AM, Ahmad Khayyat wrote: > ​Pull request implementing can_move during page moves only: > https:/

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Ahmad Khayyat
​Pull request implementing can_move during page moves only: https://bitbucket.org/stephenmcd/mezzanine/pull-request/64/ - Interface: can_move(request, new_parent)​ ​. Raises a PageMoveException if permission is denied. Does not return anything. - Docs included. - Not called during page creation, a

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-06 Thread Stephen McDonald
I'm for it given a few outstanding things: - If this only occurs in the move view now, I don't think we need the three-tuple return from can_move. Let's just have the api be raising a PageMoveException that can include the error message in it. - Need to document this (there's already a Page permis

[mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-06 Thread Ahmad Khayyat
Is there no interest in this feature? I kinda need it right now. Can we decide one way or the other? The code is already there. Calling can_move() during page creation is separated into its own commit. Pull request: https://bitbucket.org/stephenmcd/mezzanine/pull-request/63/ ​ -- You receiv