benluteijn / cherokee

Automatically exported from code.google.com/p/cherokee
0 stars 1 forks source link

setting a final/non-final and moving a rule results it visual correctness #239

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. fit final checkbox
2. move rule

What is the expected output? What do you see instead?

Expected output would be the checkbox that is modified is taken with the
rule. Opposed to what is happening where the modified checkbox stays at the
rule with the old priority.

Original issue reported on code.google.com by ste...@konink.de on 22 Nov 2008 at 10:58

GoogleCodeExporter commented 9 years ago
Sometime it happens, sometimes it doesn't. Odd.

Once the rule is dragged and dropped, sometimes the browser asks for permission 
to
re-send the data. It is then when the checkboxes are not dragged correctly.

If it doesn't ask for permission, things work OK. It usually doesn't if the 
list of
rules is very short.

This is happening to me with Firefox 3.0.4/Linux only. Safari/Konqueror/Opera 
work
fine (never ask for permission to re-submit).

Original comment by tah...@gmail.com on 25 Nov 2008 at 7:40

GoogleCodeExporter commented 9 years ago
Check this patch, please.

The trick is here:

-                                    window.location.reload();
+                                    window.location = window.location;

Anyway, I have added some ajax backport from a proof of concept that I have 
here. I
hope you like those ajaxed checkboxes... ;)

Original comment by skar...@gmail.com on 26 Nov 2008 at 12:55

Attachments:

GoogleCodeExporter commented 9 years ago
The patch looks fine, although I'm not really sure about whether it is messing 
things a little bit too much.

I mean, wouldn't it be enough to do the window.location trick?

Original comment by alobbs on 26 Nov 2008 at 6:14

GoogleCodeExporter commented 9 years ago
Ok... but this is a better patch. Remove refresh; is not needed.

-                              jQuery.post ('%(url)s', post,
-                                  function (data, textStatus) {
-                                      window.location.reload();
-                                  }
-                              );
+                              jQuery.post ('%(url)s', post);

Original comment by skar...@gmail.com on 26 Nov 2008 at 6:26

GoogleCodeExporter commented 9 years ago
The unpatched version + window.location trick from comment 2 works for me.
Applying the patch is also working (and not reloading the whole page when a 
checkbox
changes is neat).

The fix from comment 4 does not work in my case. If applied to the unpatched 
version,
things are messed up. If applied to the patch version, it doesn't work under 
these
conditions:
1) first drag one rule
2) change checkboxes
3) leave the page and come back: the checks are not preserved.

Original comment by tah...@gmail.com on 26 Nov 2008 at 8:51

GoogleCodeExporter commented 9 years ago
taher... Ok!, then I think that it is better to do window.location trick and 
work
more on no-refresh and ajax after 0.11 release. Do you agree with me?.

Original comment by skar...@gmail.com on 26 Nov 2008 at 8:59

GoogleCodeExporter commented 9 years ago
Yes. I would do that.
The no-refresh is nice, but I would leave it for the next release so we can 
test it
properly.

Original comment by tah...@gmail.com on 26 Nov 2008 at 9:05

GoogleCodeExporter commented 9 years ago
Antonio, I'm closing this one as we discussed.
It is in r2472.

Original comment by tah...@gmail.com on 26 Nov 2008 at 9:19

GoogleCodeExporter commented 9 years ago
My take (basically the same):

- Postpone it to 0.12
- No-refresh would be grand
- I'd use background post for submitting info, though.

You know that there are quite a few places where forms must be submitted 
altogether. As long as we have to 
support those cases, it sounds reasonable to try to unify the submit mechanism 
in that way.  Of course, there 
will be some cases where Ajax would be preferred (as in the trashes, for 
instance), but IMO those should be 
the exception to the rule.

Is that what were you thinking guys? :-?
It's the perfect moment to kick-off this discussion.

Original comment by alobbs on 26 Nov 2008 at 9:23

GoogleCodeExporter commented 9 years ago
Yes. IMO, unifying the background submission is the way to go.

Original comment by tah...@gmail.com on 26 Nov 2008 at 9:32

GoogleCodeExporter commented 9 years ago
I agree with the idea of background submission, but I don't agree with the 
complete
form submission.

I would like to submit the changed element only, and do related things with this
change on python side.

Original comment by skar...@gmail.com on 26 Nov 2008 at 11:39