OpenID login and comment improoved
[living-lab-site.git] / application / views / user / login_view.php
index 3d3aaa0..5b6226d 100644 (file)
        $(function() {
                $('.login-openid')
                        .click(function() {
+                               var op = $(this).data('op');
                                var openId;
                                
-                               console.log($(this).data('op'));
-                               
-                               switch ($(this).data('op'))
+                               switch (op)
                                {
                                case 'google':
                                        openId = 'https://www.google.com/accounts/o8/id';
                                                        document.close();
                                                });
                        })
-                       .button();
+                       .each(function() {
+                               var op = $(this).data('op');
+                               
+                               $(this)
+                                       .button({
+                                               icons: {
+                                                       primary: 'ui-icon-' + op
+                                               }
+                                       });
+                       });
                
        });
 </script>
\ No newline at end of file