I wanted to place the subscription interface block in a tab, and I was wondering if there was any way to have the subscriptions interface tab make an ajax request so that the entire page doesn't have to refresh and the tabs reset) when a selection is saved?
Trevor
Comments
Comment #1
salvisWhich path (URL) are you referring to?
Comment #2
break9 commentedI do not understand the question?
Comment #3
salvisWhere do you want to create a tab? On http://example.com/node/NID ? Like "View, Edit, Subscribe"? With "Subscribe" being at http://example.com/node/NID/subscribe ?
There is currently no AJAX functionality.
What do you mean with "tabs reset"? That you're being redirected back to http://example.com/node/NID ? You can change that in the submit handler.
Comment #4
break9 commentedurl is presently http://example.com/node/NID.....
I used;
inside a custom block. Then I called that block with quicktabs and I used the following;
in contemplate to call it into the template file and format it.
Yes I am being redirected to the http://example.com/node/NID when i save but........I envision using the block in several different locations so having it save via ajax would stop the page refresh each time you saved the subscription form, and allow me to use it in many locations without configuring a submit handler for each instance(if that is even possible, i am not sure).
Trevor
Comment #5
salvisI'm not familiar with quicktabs or contemplate, and I can give you only general advice.
The usual way to do this is to hook_form_alter() and add your own submit handler (which calls the original submit handler) to redirect wherever you want.
Unless you (or someone else) actually want to work on changing the subscriptions_ui.module to use AJAX, I can't take this as a feature request. It's just not going to happen.
Comment #6
break9 commentedOk, I will see what I can come up with. If I manage a patch or a solution I will post it back here.
Trevor
Comment #7
gregarios commentedsubscribing.
Actually, I don't think the original poster here has any problems with tabs, as his symptoms are only a normal result of a full page reload.
He is simply asking to have the subscription form block use Ajax so a page reload doesn't have to occur every time someone uses the subscription form. An Ajax call would essentially set the form information in the database, in the background, without doing the page reload of a normal form submittal.
Comment #8
salvis@gregarios: Yes, I agree with your interpretation. I was trying to better understand the OP's requirements and to give some ideas on how to implement them given the current no-AJAX interface.
If someone wants to implement this I'm open to review patches. Please assign yourself before you start.
Comment #9
salvis