diff options
author | Sem <sembrestels@riseup.net> | 2012-09-22 05:06:19 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-09-22 05:06:19 +0200 |
commit | e69825051c3d19f188e68801ba945c1cd8b8cfdd (patch) | |
tree | 356d890af39dc2798ceb3b83e79a2078062d6b5e /views/default/openid_client | |
parent | 1c1fe3b50e5a3297115c57543932a210d585a539 (diff) | |
download | elgg-e69825051c3d19f188e68801ba945c1cd8b8cfdd.tar.gz elgg-e69825051c3d19f188e68801ba945c1cd8b8cfdd.tar.bz2 |
Removed comercial openid providers and refactored openid login form.
Diffstat (limited to 'views/default/openid_client')
-rw-r--r-- | views/default/openid_client/css.php | 51 | ||||
-rw-r--r-- | views/default/openid_client/js.php | 22 | ||||
-rw-r--r-- | views/default/openid_client/login.php | 18 |
3 files changed, 20 insertions, 71 deletions
diff --git a/views/default/openid_client/css.php b/views/default/openid_client/css.php index 900de7e6e..d01fc6b5a 100644 --- a/views/default/openid_client/css.php +++ b/views/default/openid_client/css.php @@ -2,53 +2,12 @@ /**
* OpenID client CSS
*/
-
-$site_url = elgg_get_site_url();
-
?>
-.openid-client-login-or {
- margin-top: 5px;
- text-align: center;
- color: #333;
-}
-
-.elgg-menu-openid-login {
- text-align: center;
-}
-
-.elgg-menu-openid-login > li {
- margin: 3px;
-}
-
-.elgg-menu-openid-login span {
- display: block;
- background: url("<?php echo $site_url; ?>mod/openid_client/graphics/openid_providers.png") no-repeat left;
- border: 1px solid #ccc;
-}
-
-.elgg-menu-openid-login-large span {
- height: 32px;
- width: 92px;
+.elgg-icon-openid {
+ background-image: url(<?php echo elgg_get_site_url(); ?>mod/openid_client/graphics/openid_icon.png);
}
-.elgg-menu-openid-login-small span {
- height: 20px;
- width: 20px;
-}
-
-.elgg-menu-item-google span {
- background-position: -5px -14px;
-}
-
-.elgg-menu-openid-login-large > .elgg-menu-item-yahoo span {
- background-position: -105px -14px;
-}
-
-.elgg-menu-item-blogger span {
- background-position: -170px -62px;
-}
-
-.elgg-menu-item-wordpress span {
- background-position: -146px -62px;
-}
+.elgg-form-login {
+ margin-bottom: 10px;
+}
\ No newline at end of file diff --git a/views/default/openid_client/js.php b/views/default/openid_client/js.php index 175577719..171215593 100644 --- a/views/default/openid_client/js.php +++ b/views/default/openid_client/js.php @@ -7,12 +7,20 @@ // OpenID toggle elgg.register_hook_handler('init', 'system', function() { - $(".openid-client-toggle").click(function(event) { - $("#openid-client-login-form").slideDown(); - - var provider_input = $("#openid-client-login-form input[name=openid_provider]"); - provider_input.attr('value', $(this).attr('rel')); - - event.preventDefault(); + $('.openid-login-icon').click(function(e) { + var openid_box = $(this).prev('.elgg-form-openid-client-login'); + var shown = openid_box.is(':visible') ? openid_box : openid_box.prev(); + var hidden = !openid_box.is(':visible') ? openid_box : openid_box.prev(); + shown.fadeOut(function() { + hidden.fadeIn(); + }); + e.preventDefault(); + }); + $(".elgg-form-openid-client-login [name='openid_provider']").change(function(event) { + if (this.value == 'others') { + $(".openid-client-url").slideDown().find('input').focus(); + } else { + $(".openid-client-url").slideUp(); + } }); }); diff --git a/views/default/openid_client/login.php b/views/default/openid_client/login.php deleted file mode 100644 index 30685fe51..000000000 --- a/views/default/openid_client/login.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -/** - * OpenID client login choices - */ - -echo '<h3 class="openid-client-login-or">' . elgg_echo('openid_client:or:header') . '</h3>'; -echo '<h3>' . elgg_echo('openid_client:login:header') . '</h3>'; - -echo elgg_view_menu('openid_login', array( - 'class' => 'elgg-menu-hz', - 'sort_by' => 'priority', -)); - -$form_vars = array( - 'class' => 'hidden', - 'id' => 'openid-client-login-form', -); -echo elgg_view_form('openid_client/login', $form_vars); |