eldarion / eldarion-ajax

a library for adding declarative ajax functionality to your website
BSD 3-Clause "New" or "Revised" License
758 stars 153 forks source link

add a data-clear attribute #7

Closed jtauber closed 11 years ago

jtauber commented 12 years ago

Doesn't have to be called data-clear (could be data-remove) but it would be handy to be able to specify not only selectors that are to be refreshed but ones that are just to be removed.

I guess you could have two: data-clear (or data-empty) and data-remove which differ in that the latter removes the selected element(s) whereas the former just clears their content to be empty.

paltman commented 11 years ago

@jtauber could this just be handled with the fragments handler? I realize one is more server driven and your suggestion requires no influence from the server at all. I just want to make sure it's really needed to avoid adding too many things to the library.

jtauber commented 11 years ago

I think it's a pretty common case that would be a shame to require the server to return an empty string for (although that is a valid workaround)

paltman commented 11 years ago

There is a data cancel thing. Perhaps it could be refactored slightly to solve these use cases as well.

Sent from my iPhone

On Jan 18, 2013, at 5:46 PM, James Tauber notifications@github.com wrote:

I think it's a pretty common case that would be a shame to require the server to return an empty string for (although that is a valid workaround)

— Reply to this email directly or view it on GitHub.

paltman commented 11 years ago

Implemented in 0.6.0