avoid setting cookie for promptless buttons
authorJoey Hess <joey@kitenet.net>
Sat, 8 May 2010 06:15:04 +0000 (02:15 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 8 May 2010 06:15:04 +0000 (02:15 -0400)
I think it is clearer to not have such a button appear pre-selected
when entering the signin page, because that may suggest to the user
they don't need to click on it, and yet they do.

underlays/openid-selector/ikiwiki/openid/openid-jquery.js

index 4dfb7420b104acd1808330030ef5958014d991df..59a59c0843f03479bfcf5e54488afa2e4d355b82 100644 (file)
@@ -150,15 +150,16 @@ var openid = {
                }
                
                this.highlight(box_id);
-               this.setCookie(box_id);
                
                this.provider_id = box_id;
                this.provider_url = provider['url'];
                
                // prompt user for input?
                if (provider['label']) {
+                       this.setCookie(box_id);
                        this.useInputBox(provider);
                } else {
+                       this.setCookie('');
                        $('#openid_input_area').empty();
                        if (! onload) {
                                $('#openid_form').submit();