-
Notifications
You must be signed in to change notification settings - Fork 29
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
Provide AJAX capacities #59
Comments
If you could provide some use-case examples, it would be easier for me to imagine, what you are trying to accomplish and maybe help. |
For example here are some use-cases:
This imply the following improvements:
I'll try to extract you some code of projects I have to a gist so you can imagine what I'm talking about. But this is not for 2.0.0 roadmap!! |
OK. About
It has to reload the whole "results" template. What if, the filter (or scopes) constraint is "status = 20" and action "Accept" calls |
I like that idea. It would probably require some changes in controller.
Agreed. I'll create a milestone "next release" and add this issue. |
This is one of the main issue about "manual AJAX" and filters. In most cases, it's acceptable to not reload all the page, even if you "line" doesn't fit anymore your filters. But this imply many other things (what if you were on the last page, what if someone else change an element from your current list and so on...). But there is no really way to handle this properly... |
@sescandell may be just leave this to action's developer opinion ? |
If it were configurable, then I see no problem. We could probably create a plugin (or use some existing library?) to control diffrent (pre-defined) parts (blocks) of page, like "results", "filters", "row", "menu", "dialog box / modal box". This sounds like a very nice enhancement. It could be the next thing we do after |
Few months ago I saw something similar on web (or news?). This idea is great! |
Hmm. I found it at http://api.jquery.com/load/. Section "Loading Page Fragments". |
@ksn135 I like your idea about making it configurable. Good point! About plugin or library and so on, as I said, I already have something working in some of my projects (not configurable as @ksn135 proposed but working "on demand by the developer"). Here is a simple example of a generator: generator: admingenerator.generator.doctrine
params:
...
object_actions:
copyTo:
credentials: 'hasRole("ROLE_WEBMASTER")'
label: "admin.module.object_actions.copy.label|{ %name%: Module.name }|"
icon: icon-file
csrf_protected: false
class: popin
options:
success: admin.module.object_actions.copy.success
error: admin.module.object_actions.copy.error
...
staging:
credentials: 'canBeDeployedOnStaging(object)'
label: admin.module.object_actions.staging.label
icon: icon-staging
confirm: admin.module.confirm.staging
csrf_protected: true
class: ajax
options:
success: "admin.module.object_actions.staging.success|{ %name%: Module.name }|"
error: "admin.module.object_actions.staging.error|{ %name%: Module.name }|"
... Note the |
We some times ago split templates to make AJAX possible.
On some client integration, I used this functionnality to add some AJAX capacities to the application. Usefull on list mainly (filters, object actions, pagination).
Let's see if it is possible to make it generic enough to be integrated into the bundle
The text was updated successfully, but these errors were encountered: