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

Context menu available actions not updated after bind callback #1533

Closed
nicorac opened this issue Jul 15, 2016 · 4 comments
Closed

Context menu available actions not updated after bind callback #1533

nicorac opened this issue Jul 15, 2016 · 4 comments
Assignees

Comments

@nicorac
Copy link
Contributor

nicorac commented Jul 15, 2016

I'm adding quota feature to elFinder: when an user goes "over-quota", some actions will be disabled until he/she gets back under the quota limit.

To disable actions, connector tests quota status and returns a different array to 'disabled' parameter based on user over/under quota status. Connector binds a callback to "sensitive" actions like paste, rm, duplicate which updates quota and returns TRUE to let elFinder update itself.
The expected effect is actions disabled immediately after the action that caused the over-quota (and restore them after, say, deleting some files), but actually only toolbar actions are updated (i.e. Paste disappears) but not the context menu.

To demonstrate this "misbehavior" I've setup a sample repository here.
It features a simpler quota algorithm (to keep things simple): quota is not "folder size" but "files count" related: you're allowed to store up to 3 files in the volume, when you add the 4th you'll switch to readonly access.

Since a video is better then a thousand words, take a look to sample video in the same repo.

@paulcanning
Copy link

Your repo contains no connector.php file, which is what is referenced in index.html

@nicorac
Copy link
Contributor Author

nicorac commented Jul 15, 2016

Oops, you're right.
I've cleaned it up too much, now fixed ;)

PS: elFinder version is 2.1.13

@nao-pon nao-pon self-assigned this Jul 15, 2016
@nao-pon
Copy link
Member

nao-pon commented Jul 15, 2016

@nicorac This bug reason is that dosn't update cmd status at sync. I'll fix it.

@nicorac
Copy link
Contributor Author

nicorac commented Jul 15, 2016

Great, will wait next Nightly build then delete my test repo.
Thanks.

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

No branches or pull requests

3 participants