Browse Source

Tabs replaced by spaces at AuthChoice asset files.

tags/2.0.0-beta
Klimov Paul 11 years ago
parent
commit
e3f4214978
  1. 62
      extensions/authclient/widgets/assets/authchoice.css
  2. 92
      extensions/authclient/widgets/assets/authchoice.js

62
extensions/authclient/widgets/assets/authchoice.css

@ -1,82 +1,82 @@
.clients {
overflow:auto;
overflow:auto;
}
.auth-icon {
display: block;
width: 32px;
height: 32px;
background: url(authchoice.png) no-repeat;
display: block;
width: 32px;
height: 32px;
background: url(authchoice.png) no-repeat;
}
.auth-icon.google,
.auth-icon.google_openid,
.auth-icon.google_oauth {
background-position: 0 -34px;
background-position: 0 -34px;
}
.auth-icon.twitter {
background-position: 0 -68px;
background-position: 0 -68px;
}
.auth-icon.yandex,
.auth-icon.yandex_openid,
.auth-icon.yandex_oauth {
background-position: 0 -102px;
background-position: 0 -102px;
}
.auth-icon.vkontakte {
background-position: 0 -136px;
background-position: 0 -136px;
}
.auth-icon.facebook {
background-position: 0 -170px;
background-position: 0 -170px;
}
.auth-icon.mailru {
background-position: 0 -204px;
background-position: 0 -204px;
}
.auth-icon.moikrug {
background-position: 0 -238px;
background-position: 0 -238px;
}
.auth-icon.odnoklassniki {
background-position: 0 -272px;
background-position: 0 -272px;
}
.auth-icon.linkedin {
background-position: 0 -306px;
background-position: 0 -306px;
}
.auth-icon.github {
background-position: 0 -340px;
background-position: 0 -340px;
}
.auth-icon.live {
background-position: 0 -372px;
background-position: 0 -372px;
}
.auth-link:hover .auth-icon i,
.auth-link:focus .auth-icon i {
display: block;
width: 32px;
height: 32px;
background: url(authchoice.png) 0 0 no-repeat;
display: block;
width: 32px;
height: 32px;
background: url(authchoice.png) 0 0 no-repeat;
}
.auth-clients {
margin: 0 0 1em;
list-style: none;
overflow: auto;
margin: 0 0 1em;
list-style: none;
overflow: auto;
}
.auth-client {
float: left;
margin: 0 1em 0 0;
float: left;
margin: 0 1em 0 0;
}
.auth-clients .auth-client .auth-link {
display: block;
width: 58px;
display: block;
width: 58px;
}
.auth-client .auth-link .auth-icon {
margin: 0 auto;
margin: 0 auto;
}
.auth-client .auth-link .auth-title {
display: block;
margin-top: 0.4em;
text-align: center;
display: block;
margin-top: 0.4em;
text-align: center;
}

92
extensions/authclient/widgets/assets/authchoice.js

@ -1,7 +1,7 @@
/**
* 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/
* @copyright Copyright (c) 2008 Yii Software LLC
@ -10,59 +10,59 @@
* @since 2.0
*/
jQuery(function($) {
$.fn.authchoice = function(options) {
options = $.extend({
popup: {
resizable: 'yes',
scrollbars: 'no',
toolbar: 'no',
menubar: 'no',
location: 'no',
directories: 'no',
status: 'yes',
width: 450,
height: 380
}
}, options);
$.fn.authchoice = function(options) {
options = $.extend({
popup: {
resizable: 'yes',
scrollbars: 'no',
toolbar: 'no',
menubar: 'no',
location: 'no',
directories: 'no',
status: 'yes',
width: 450,
height: 380
}
}, options);
return this.each(function() {
var $container = $(this);
return this.each(function() {
var $container = $(this);
$container.find('a').on('click', function(e) {
e.preventDefault();
$container.find('a').on('click', function(e) {
e.preventDefault();
var authChoicePopup = null;
var authChoicePopup = null;
if (authChoicePopup = $container.data('authChoicePopup')) {
authChoicePopup.close();
}
if (authChoicePopup = $container.data('authChoicePopup')) {
authChoicePopup.close();
}
var url = this.href;
var popupOptions = options.popup;
var url = this.href;
var popupOptions = options.popup;
var localPopupWidth = this.getAttribute('data-popup-width');
if (localPopupWidth) {
popupOptions.width = localPopupWidth;
}
var localPopupHeight = this.getAttribute('data-popup-height');
if (localPopupWidth) {
popupOptions.height = localPopupHeight;
}
var localPopupWidth = this.getAttribute('data-popup-width');
if (localPopupWidth) {
popupOptions.width = localPopupWidth;
}
var localPopupHeight = this.getAttribute('data-popup-height');
if (localPopupWidth) {
popupOptions.height = localPopupHeight;
}
popupOptions.left = (window.screen.width - options.popup.width) / 2;
popupOptions.top = (window.screen.height - options.popup.height) / 2;
popupOptions.left = (window.screen.width - options.popup.width) / 2;
popupOptions.top = (window.screen.height - options.popup.height) / 2;
var popupFeatureParts = [];
for (var propName in popupOptions) {
popupFeatureParts.push(propName + '=' + popupOptions[propName]);
}
var popupFeature = popupFeatureParts.join(',');
var popupFeatureParts = [];
for (var propName in popupOptions) {
popupFeatureParts.push(propName + '=' + popupOptions[propName]);
}
var popupFeature = popupFeatureParts.join(',');
authChoicePopup = window.open(url, 'yii_auth_choice', popupFeature);
authChoicePopup.focus();
authChoicePopup = window.open(url, 'yii_auth_choice', popupFeature);
authChoicePopup.focus();
$container.data('authChoicePopup', authChoicePopup);
});
});
};
$container.data('authChoicePopup', authChoicePopup);
});
});
};
});

Loading…
Cancel
Save