Commit e3f42149 by Klimov Paul

Tabs replaced by spaces at AuthChoice asset files.

parent 4f0089bb
.clients { .clients {
overflow:auto; overflow:auto;
} }
.auth-icon { .auth-icon {
display: block; display: block;
width: 32px; width: 32px;
height: 32px; height: 32px;
background: url(authchoice.png) no-repeat; background: url(authchoice.png) no-repeat;
} }
.auth-icon.google, .auth-icon.google,
.auth-icon.google_openid, .auth-icon.google_openid,
.auth-icon.google_oauth { .auth-icon.google_oauth {
background-position: 0 -34px; background-position: 0 -34px;
} }
.auth-icon.twitter { .auth-icon.twitter {
background-position: 0 -68px; background-position: 0 -68px;
} }
.auth-icon.yandex, .auth-icon.yandex,
.auth-icon.yandex_openid, .auth-icon.yandex_openid,
.auth-icon.yandex_oauth { .auth-icon.yandex_oauth {
background-position: 0 -102px; background-position: 0 -102px;
} }
.auth-icon.vkontakte { .auth-icon.vkontakte {
background-position: 0 -136px; background-position: 0 -136px;
} }
.auth-icon.facebook { .auth-icon.facebook {
background-position: 0 -170px; background-position: 0 -170px;
} }
.auth-icon.mailru { .auth-icon.mailru {
background-position: 0 -204px; background-position: 0 -204px;
} }
.auth-icon.moikrug { .auth-icon.moikrug {
background-position: 0 -238px; background-position: 0 -238px;
} }
.auth-icon.odnoklassniki { .auth-icon.odnoklassniki {
background-position: 0 -272px; background-position: 0 -272px;
} }
.auth-icon.linkedin { .auth-icon.linkedin {
background-position: 0 -306px; background-position: 0 -306px;
} }
.auth-icon.github { .auth-icon.github {
background-position: 0 -340px; background-position: 0 -340px;
} }
.auth-icon.live { .auth-icon.live {
background-position: 0 -372px; background-position: 0 -372px;
} }
.auth-link:hover .auth-icon i, .auth-link:hover .auth-icon i,
.auth-link:focus .auth-icon i { .auth-link:focus .auth-icon i {
display: block; display: block;
width: 32px; width: 32px;
height: 32px; height: 32px;
background: url(authchoice.png) 0 0 no-repeat; background: url(authchoice.png) 0 0 no-repeat;
} }
.auth-clients { .auth-clients {
margin: 0 0 1em; margin: 0 0 1em;
list-style: none; list-style: none;
overflow: auto; overflow: auto;
} }
.auth-client { .auth-client {
float: left; float: left;
margin: 0 1em 0 0; margin: 0 1em 0 0;
} }
.auth-clients .auth-client .auth-link { .auth-clients .auth-client .auth-link {
display: block; display: block;
width: 58px; width: 58px;
} }
.auth-client .auth-link .auth-icon { .auth-client .auth-link .auth-icon {
margin: 0 auto; margin: 0 auto;
} }
.auth-client .auth-link .auth-title { .auth-client .auth-link .auth-title {
display: block; display: block;
margin-top: 0.4em; margin-top: 0.4em;
text-align: center; text-align: center;
} }
\ No newline at end of file
/** /**
* Yii auth choice widget. * Yii auth choice widget.
* *
* This is the JavaScript widget used by the yii\authclient\widgets\Choice widget. * This is the JavaScript widget used by the yii\authclient\widgets\AuthChoice widget.
* *
* @link http://www.yiiframework.com/ * @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC * @copyright Copyright (c) 2008 Yii Software LLC
...@@ -10,59 +10,59 @@ ...@@ -10,59 +10,59 @@
* @since 2.0 * @since 2.0
*/ */
jQuery(function($) { jQuery(function($) {
$.fn.authchoice = function(options) { $.fn.authchoice = function(options) {
options = $.extend({ options = $.extend({
popup: { popup: {
resizable: 'yes', resizable: 'yes',
scrollbars: 'no', scrollbars: 'no',
toolbar: 'no', toolbar: 'no',
menubar: 'no', menubar: 'no',
location: 'no', location: 'no',
directories: 'no', directories: 'no',
status: 'yes', status: 'yes',
width: 450, width: 450,
height: 380 height: 380
} }
}, options); }, options);
return this.each(function() { return this.each(function() {
var $container = $(this); var $container = $(this);
$container.find('a').on('click', function(e) { $container.find('a').on('click', function(e) {
e.preventDefault(); e.preventDefault();
var authChoicePopup = null; var authChoicePopup = null;
if (authChoicePopup = $container.data('authChoicePopup')) { if (authChoicePopup = $container.data('authChoicePopup')) {
authChoicePopup.close(); authChoicePopup.close();
} }
var url = this.href; var url = this.href;
var popupOptions = options.popup; var popupOptions = options.popup;
var localPopupWidth = this.getAttribute('data-popup-width'); var localPopupWidth = this.getAttribute('data-popup-width');
if (localPopupWidth) { if (localPopupWidth) {
popupOptions.width = localPopupWidth; popupOptions.width = localPopupWidth;
} }
var localPopupHeight = this.getAttribute('data-popup-height'); var localPopupHeight = this.getAttribute('data-popup-height');
if (localPopupWidth) { if (localPopupWidth) {
popupOptions.height = localPopupHeight; popupOptions.height = localPopupHeight;
} }
popupOptions.left = (window.screen.width - options.popup.width) / 2; popupOptions.left = (window.screen.width - options.popup.width) / 2;
popupOptions.top = (window.screen.height - options.popup.height) / 2; popupOptions.top = (window.screen.height - options.popup.height) / 2;
var popupFeatureParts = []; var popupFeatureParts = [];
for (var propName in popupOptions) { for (var propName in popupOptions) {
popupFeatureParts.push(propName + '=' + popupOptions[propName]); popupFeatureParts.push(propName + '=' + popupOptions[propName]);
} }
var popupFeature = popupFeatureParts.join(','); var popupFeature = popupFeatureParts.join(',');
authChoicePopup = window.open(url, 'yii_auth_choice', popupFeature); authChoicePopup = window.open(url, 'yii_auth_choice', popupFeature);
authChoicePopup.focus(); authChoicePopup.focus();
$container.data('authChoicePopup', authChoicePopup); $container.data('authChoicePopup', authChoicePopup);
}); });
}); });
}; };
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment