Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r10585: LJINT-435 (Cross-version support in comm...

Committer: ailyin
LJINT-435 (Cross-version support in comments for side projects)
U   trunk/cgi-bin/LJ/PartnerSite.pm
U   trunk/htdocs/gadgets/loginstatus.bml
A   trunk/htdocs/stc/partners/login/
A   trunk/htdocs/stc/partners/login/v1.css
A   trunk/htdocs/stc/partners/login/v2.css
U   trunk/htdocs/stc/partners/login.css
A   trunk/templates/Identity/ExternalLogin/
A   trunk/templates/Identity/ExternalLogin/v1.tmpl
A   trunk/templates/Identity/ExternalLogin/v2.tmpl
U   trunk/templates/Identity/ExternalLogin.tmpl
Modified: trunk/cgi-bin/LJ/PartnerSite.pm
===================================================================
--- trunk/cgi-bin/LJ/PartnerSite.pm	2011-05-31 09:02:41 UTC (rev 10584)
+++ trunk/cgi-bin/LJ/PartnerSite.pm	2011-05-31 09:52:05 UTC (rev 10585)
@@ -198,7 +198,8 @@
                               xdreceiver_path rate_limits encoding
                               mapping_locked disabled dochash_salt
                               sync_comments_count_url_pattern
-                              lj_resources partner_resources identities );
+                              lj_resources partner_resources identities
+                              widget_version );
 
 ### CLASS METHODS ###
 
@@ -246,6 +247,8 @@
 
     $params{'journalid'} = $params{'journal'}->userid;
 
+    $params{'widget_version'} ||= $LJ::PARTNER_SITES_DEFAULT_WIDGET_VERSION;
+
     my $self = bless \%params, $class;
     $by_id_map{ $params{'id'} } = $self;
     return $self;
@@ -595,8 +598,8 @@
 
     LJ::need_res(qw( js/partners/placeholder.js
                      js/jquery.js
-                     stc/lj_base.css
-                     stc/partners/login.css ));
+                     stc/lj_base.css ),
+                     'stc/partners/login/v' . $self->widget_version . '.css' );
 
     LJ::include_raw( 'css_link' => $self->custom_css_url )
         if $self->custom_css_url;

Modified: trunk/htdocs/gadgets/loginstatus.bml
===================================================================
--- trunk/htdocs/gadgets/loginstatus.bml	2011-05-31 09:02:41 UTC (rev 10584)
+++ trunk/htdocs/gadgets/loginstatus.bml	2011-05-31 09:52:05 UTC (rev 10585)
@@ -33,7 +33,7 @@
 
     my ( $partner_remote_ljuser, $logout_url );
 
-    LJ::need_res(qw( stc/partners/login.css ));
+    LJ::need_res( 'stc/partners/login/v' . $partner->widget_version . '.css' );
 
     if ( $remote ) {
         my $remote_sessid = $remote->session->id;

Added: trunk/htdocs/stc/partners/login/v1.css
===================================================================
--- trunk/htdocs/stc/partners/login/v1.css	                        (rev 0)
+++ trunk/htdocs/stc/partners/login/v1.css	2011-05-31 09:52:05 UTC (rev 10585)
@@ -0,0 +1,334 @@
+BODY {
+	background:white;
+	}
+.m-auth {
+	position:relative;
+	bottom:-1px;
+	overflow:hidden;
+	margin:0;
+	z-index:2;
+	border:0;
+	font:12px Arial, Helvetica, sans-serif;
+	}
+	.m-auth-item {
+		float:left;
+		padding:6px 30px 5px;
+		position:relative;
+		}
+	.m-auth-user {
+		width:87px;
+		}
+	.m-auth-openid {
+		width:62px;
+		}
+	.m-auth-facebook {
+		width:75px;
+		}
+	.m-auth-twitter {
+		width:58px;
+		}
+	.m-auth .current {
+		padding:5px 29px 4px;
+		border:1px solid #FFF;
+		border-color:#CCC #CCC #FFF;
+		border-radius:6px 6px 0 0;
+		-moz-border-radius:6px 6px 0 0;
+		-webkit-border-radius:6px 6px 0 0;
+		}
+		.m-auth-item A,
+		.m-auth-item A:link,
+		.m-auth-item A:visited,
+		.m-auth-item A:hover,
+		.m-auth-item A:active {
+			text-decoration:none;
+			margin:0;
+			padding:0 0 0 20px;
+			outline:0;
+			background-position:0 50%;
+			color:#222;
+			}
+			.m-auth .m-auth-item .m-auth-bl,
+			.m-auth .m-auth-item .m-auth-br {
+				display:none;
+				}
+			.m-auth-item B,
+			.m-auth-item SPAN {
+				border-bottom:1px dotted #000;
+				font-weight:normal;
+				}
+			.m-auth-item A:hover B,
+			.m-auth-item A:hover SPAN {
+				border-bottom:0;
+				}
+			.m-auth-item.current B,
+			.m-auth-item.current SPAN {
+				border-bottom:0;
+				font-weight:bold;
+				}
+
+.b-auth {
+	position:relative;
+	z-index:1;
+	border:0;
+	font:12px Arial, Helvetica, sans-serif;
+	}
+	.b-auth LI {
+		padding:0;
+		border:0;
+		}
+		.b-auth FORM {
+			padding:10px 30px;
+			height:180px;
+			overflow:hidden;
+			border:1px solid #CCC;
+			border-radius:6px;
+			-moz-border-radius:6px;
+			-webkit-border-radius:6px;
+			}
+		.b-auth #tab-user FORM {
+			border-radius:0 6px 6px 6px;
+			-moz-border-radius:0 6px 6px 6px;
+			-webkit-border-radius:0 6px 6px 6px;
+			}
+		.b-auth #tab-facebook FORM,
+		.b-auth #tab-twitter FORM {
+			padding:30px;
+			height:140px;
+			}
+
+.b-auth-user-form,
+.b-auth-openid-form {
+	/*float:left;*/
+	margin:0;
+	padding:20px 0;
+	text-align:left;
+	}
+#tab-user .b-auth-input-wrapper {
+	margin: 0 0 5px;
+	}
+.b-auth-input-wrapper {
+	display:block;
+	position:relative;
+	}
+	.b-auth-input-wrapper LABEL {
+		position:absolute;
+		top:4px;
+		left:6px;
+		color:#666;
+		}
+	.lj3-input-wrapper INPUT,
+	.lj3-input-wrapper TEXTAREA,
+	.b-auth-input-wrapper INPUT,
+	.b-auth-input-wrapper TEXTAREA {
+		padding-left:2px;
+		padding-right:2px;
+		margin:0 0 5px;
+		font-family:Arial,Helvetica,sans-serif;
+		}
+	.b-auth-input-wrapper A,
+	.b-auth-input-wrapper SPAN {
+		display:block;
+		font-size:11px;
+		color:#666;
+		}
+	.b-auth-input-wrapper A {
+		color:#222;
+		}
+.b-auth-user-form BUTTON,
+.b-auth-openid-form BUTTON {
+	margin:10px 0;
+	text-align:left;
+	}
+
+.b-auth-desc {
+	float:right;
+	padding:20px 0;
+	line-height:1.4em;
+	}
+.b-auth #tab-user .b-auth-desc {
+	width:340px;
+	}
+.b-auth #tab-openid .b-auth-desc {
+	width:260px;
+	}
+.b-auth #tab-facebook .b-auth-desc,
+.b-auth #tab-twitter .b-auth-desc {
+	width:300px;
+	padding:0;
+	}
+
+.b-auth-error {
+    position:absolute;
+    top:10px;
+    left:0;
+    right:0;
+    margin:0 30px;
+    z-index:2;
+    }
+    .b-auth-error .i-message-error {
+        display:block;
+        padding:9px 30px 9px 9px;
+        border:1px solid #FF9B97;
+        border-radius:6px;
+        -moz-border-radius:6px;
+        -webkit-border-radius:6px;
+        text-align:left;
+        color:#D51C00;
+        }
+    .b-auth-error .i-close {
+        position:absolute;
+        width:12px;
+        height:12px;
+        top:9px;
+        right:9px;
+        background:url(/img/icons/close.png) no-repeat 0 0;
+        cursor:pointer;
+        }
+
+.b-auth-user-form .b-auth-user-input {
+	width:138px;
+	margin:0;
+	}
+.b-auth-openid-form INPUT {
+	width:218px;
+	}
+
+.lj3-form-wrapper {
+	position:relative;
+	z-index:1;
+	font:12px Arial, Helvetica, sans-serif;
+	}
+.lj3-form-wrapper .lj3-form  {
+	display:none;
+	padding:9px 30px;
+	overflow:hidden;
+	border:1px solid #CCC;
+	border-radius:6px;
+	-moz-border-radius:6px;
+	-webkit-border-radius:6px;
+	}
+.lj3-form-wrapper FIELDSET {
+	padding:0;
+	margin:0;
+	border:0;
+	}
+.lj3-form-wrapper .lj3-livejournal  {
+	border-radius:0 6px 6px 6px;
+	-moz-border-radius:0 6px 6px 6px;
+	-webkit-border-radius:0 6px 6px 6px;
+	}
+.lj3-form-wrapper .lj3-form.lj3-active {
+	display:block;
+	}
+
+.lj3-input-wrapper {
+	position:relative;
+	margin:0;
+	}
+	.lj3-input-wrapper LABEL {
+		position:absolute;
+		top:4px;
+		left:6px;
+		color:#666;
+		}
+	.lj3-input-wrapper INPUT,
+	.lj3-input-wrapper TEXTAREA {
+		padding-left:2px;
+		padding-right:2px;
+		margin:0 0 5px;
+		font-family:Arial,Helvetica,sans-serif;
+		}
+	.lj3-input-wrapper A,
+	.lj3-input-wrapper SPAN {
+		display:block;
+		font-size:11px;
+		color:#666;
+		}
+	.lj3-input-wrapper A {
+		color:#222;
+		}
+.lj3-submit-wrapper {
+	padding:5px 0;
+	margin:0;
+	text-align:right;
+	}
+
+/* post comment */
+	.lj3-post-comment .lj3-input-wrapper LABEL {
+		font-size:15px;
+		}
+	.lj3-post-comment .lj3-input-wrapper .lj3-input-subject {
+		width:518px;
+		font-size:15px;
+		}
+	.lj3-post-comment .lj3-input-wrapper TEXTAREA {
+		width:520px;
+		height:112px;
+		font-size:15px;
+		}
+.lj3-identity {
+	margin:0 0 10px;
+	}
+.b-auth .lj3-identity {
+	text-align:center;
+	}
+	.lj3-identity A {
+		color:#222;
+		text-decoration:none;
+		font-weight:bold;
+		}
+	.lj3-identity .lj3-logout {
+		font-size:11px;
+		}
+		.lj3-identity .lj3-logout A {
+			font-size:11px;
+			font-weight:normal;
+			text-decoration:underline;
+			}
+		.lj3-identity .lj3-logout A:hover {
+			text-decoration:none;
+			}
+.lj3-close {
+	position:absolute;
+	right:9px;
+	top:12px;
+	width:12px;
+	height:12px;
+	margin:0;
+	}
+.b-identity .lj3-close {
+	right:14px;
+	top:39px;
+	z-index:3;
+	}
+	.lj3-close A {
+		display:block;
+		width:100%;
+		height:100%;
+		background:url(/img/CloseButton_gray.gif);
+		}
+
+.iframe-crossdomain {
+	width:1px;
+	height:1px;
+	position:absolute;
+}
+.lj3-user IMG {
+	width:16px;
+	height:16px;
+	vertical-align:bottom;
+	border:0;
+	}
+.lj3-user.lj3-openid IMG {
+	background:url(/img/icons/openid-16.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-livejournal IMG {
+	background:url(/img/pencil.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-facebook IMG {
+	background:url(/img/icons/facebook-16.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-twitter IMG {
+	background:url(/img/icons/twitter-16.gif?v=1) no-repeat 0 0;
+	}
+

Added: trunk/htdocs/stc/partners/login/v2.css
===================================================================
--- trunk/htdocs/stc/partners/login/v2.css	                        (rev 0)
+++ trunk/htdocs/stc/partners/login/v2.css	2011-05-31 09:52:05 UTC (rev 10585)
@@ -0,0 +1,425 @@
+BODY {
+	background:white;
+	}
+.m-auth {
+	position:relative;
+	bottom:-1px;
+	overflow:hidden;
+	margin:0;
+	z-index:2;
+	border:0;
+	font:12px Arial, Helvetica, sans-serif;
+	}
+	.m-auth-item {
+		float:left;
+		padding:6px 30px 5px;
+		position:relative;
+		}
+	.m-auth-user {
+		width:87px;
+		}
+	.m-auth-openid {
+		width:62px;
+		}
+	.m-auth-facebook {
+		width:75px;
+		}
+	.m-auth-twitter {
+		width:58px;
+		}
+	.m-auth .current {
+		padding:5px 29px 4px;
+		border:1px solid #FFF;
+		border-color:#CCC #CCC #FFF;
+		border-radius:6px 6px 0 0;
+		-moz-border-radius:6px 6px 0 0;
+		-webkit-border-radius:6px 6px 0 0;
+		}
+		.m-auth-item A,
+		.m-auth-item A:link,
+		.m-auth-item A:visited,
+		.m-auth-item A:hover,
+		.m-auth-item A:active {
+			text-decoration:none;
+			margin:0;
+			padding:0 0 0 20px;
+			outline:0;
+			background-position:0 50%;
+			color:#222;
+			}
+			.m-auth .m-auth-item .m-auth-bl,
+			.m-auth .m-auth-item .m-auth-br {
+				display:none;
+				}
+			.m-auth-item B,
+			.m-auth-item SPAN {
+				border-bottom:1px dotted #000;
+				font-weight:normal;
+				}
+			.m-auth-item A:hover B,
+			.m-auth-item A:hover SPAN {
+				border-bottom:0;
+				}
+			.m-auth-item.current B,
+			.m-auth-item.current SPAN {
+				border-bottom:0;
+				font-weight:bold;
+				}
+
+.b-auth {
+	position:relative;
+	z-index:1;
+	border:0;
+	font:12px Arial, Helvetica, sans-serif;
+	}
+UL.b-auth {
+	background-color:#F7F7F7;
+	}
+	.b-auth LI {
+		padding:0;
+		border:0;
+		}
+		.b-auth FORM {
+			padding:24px 30px 9px;
+			height:147px;
+			overflow:hidden;
+			border:1px solid #CCC;
+			-webkit-border-radius:0 0 6px 6px;
+			-moz-border-radius:0 0 6px 6px;
+			border-radius:0 0 6px 6px;
+			}
+		/*.b-auth #tab-user FORM {
+			border-radius:0 6px 6px 6px;
+			-moz-border-radius:0 6px 6px 6px;
+			-webkit-border-radius:0 6px 6px 6px;
+			}
+		.b-auth #tab-facebook FORM,
+		.b-auth #tab-twitter FORM {
+			padding:30px;
+			height:140px;
+			}*/
+
+.b-auth-user-form,
+.b-auth-openid-form {
+	float:left;
+	margin:0;
+	padding:0;
+	text-align:center;
+	}
+#tab-user .b-auth-input-wrapper {
+	margin: 0 0 5px;
+	}
+.b-auth-input-wrapper {
+	display:block;
+	position:relative;
+	}
+	.b-auth-input-wrapper LABEL {
+		position:absolute;
+		top:4px;
+		left:6px;
+		color:#666;
+		}
+	.b-auth-input-wrapper INPUT {
+		width:150px;
+		}
+	.lj3-input-wrapper INPUT,
+	.lj3-input-wrapper TEXTAREA,
+	.b-auth-input-wrapper INPUT,
+	.b-auth-input-wrapper TEXTAREA {
+		padding-left:2px;
+		padding-right:2px;
+		margin:0 0 5px;
+		font-family:Arial,Helvetica,sans-serif;
+		}
+	.b-auth-input-wrapper A,
+	.b-auth-input-wrapper SPAN {
+		display:block;
+		text-align:center;
+		font-size:11px;
+		color:#666;
+		}
+	.b-auth-input-wrapper A {
+		color:#369;
+		}
+.b-auth-user-form BUTTON,
+.b-auth-openid-form BUTTON {
+	margin:5px 0;
+	text-align:left;
+	color:#222;
+	}
+
+.b-auth-desc {
+	/*float:right;*/
+	padding:0 0 0 184px;
+	overflow:visible;
+	line-height:1.4em;
+	color:#333;
+	}
+/*.b-auth #tab-user .b-auth-desc {
+	width:340px;
+	}*/
+.b-auth #tab-openid .b-auth-desc {
+	padding:0 0 0 260px;
+	}
+/*.b-auth #tab-facebook .b-auth-desc,
+.b-auth #tab-twitter .b-auth-desc {
+	width:300px;
+	padding:0;
+	}*/
+
+.b-auth-error {
+	position:absolute;
+	top:10px;
+	left:0;
+	right:0;
+	margin:0 30px;
+	z-index:2;
+	}
+	.b-auth-error .i-message-error {
+		display:block;
+		padding:9px 30px 9px 9px;
+		border:1px solid #FF9B97;
+		border-radius:6px;
+		-moz-border-radius:6px;
+		-webkit-border-radius:6px;
+		text-align:left;
+		color:#D51C00;
+		}
+	.b-auth-error .i-close {
+		position:absolute;
+		width:12px;
+		height:12px;
+		top:9px;
+		right:9px;
+		background:url(/img/icons/close.png) no-repeat 0 0;
+		cursor:pointer;
+		}
+
+.b-auth-user-form .b-auth-user-input {
+	width:138px;
+	margin:0 0 5px;
+	}
+.b-auth-openid-form INPUT {
+	width:218px;
+	}
+
+.lj3-form-wrapper {
+	position:relative;
+	z-index:1;
+	font:12px Arial, Helvetica, sans-serif;
+	}
+.lj3-form-wrapper .lj3-form  {
+	display:none;
+	padding:9px 30px;
+	overflow:hidden;
+	border:1px solid #CCC;
+	border-radius:6px;
+	-moz-border-radius:6px;
+	-webkit-border-radius:6px;
+	}
+.lj3-form-wrapper FIELDSET {
+	padding:0;
+	margin:0;
+	border:0;
+	}
+.lj3-form-wrapper .lj3-livejournal  {
+	border-radius:0 6px 6px 6px;
+	-moz-border-radius:0 6px 6px 6px;
+	-webkit-border-radius:0 6px 6px 6px;
+	}
+.lj3-form-wrapper .lj3-form.lj3-active {
+	display:block;
+	}
+
+.lj3-input-wrapper {
+	position:relative;
+	margin:0;
+	}
+	.lj3-input-wrapper LABEL {
+		position:absolute;
+		top:4px;
+		left:6px;
+		color:#666;
+		}
+	.lj3-input-wrapper INPUT,
+	.lj3-input-wrapper TEXTAREA {
+		padding-left:2px;
+		padding-right:2px;
+		margin:0 0 5px;
+		font-family:Arial,Helvetica,sans-serif;
+		}
+	.lj3-input-wrapper A,
+	.lj3-input-wrapper SPAN {
+		display:block;
+		font-size:11px;
+		color:#666;
+		}
+	.lj3-input-wrapper A {
+		color:#222;
+		}
+.lj3-submit-wrapper {
+	padding:5px 0;
+	margin:0;
+	text-align:right;
+	}
+
+/* post comment */
+	.lj3-post-comment .lj3-input-wrapper LABEL {
+		font-size:15px;
+		}
+	.lj3-post-comment .lj3-input-wrapper .lj3-input-subject {
+		width:518px;
+		font-size:15px;
+		}
+	.lj3-post-comment .lj3-input-wrapper TEXTAREA {
+		width:520px;
+		height:112px;
+		font-size:15px;
+		}
+.lj3-identity {
+	margin:0 0 10px;
+	}
+.b-auth .lj3-identity {
+	text-align:center;
+	}
+	.lj3-identity A {
+		color:#222;
+		text-decoration:none;
+		font-weight:bold;
+		}
+	.lj3-identity .lj3-logout {
+		font-size:11px;
+		}
+		.lj3-identity .lj3-logout A {
+			font-size:11px;
+			font-weight:normal;
+			text-decoration:underline;
+			}
+		.lj3-identity .lj3-logout A:hover {
+			text-decoration:none;
+			}
+.lj3-close {
+	position:absolute;
+	right:9px;
+	top:12px;
+	width:12px;
+	height:12px;
+	margin:0;
+	}
+.b-identity .lj3-close {
+	right:14px;
+	top:39px;
+	z-index:3;
+	}
+	.lj3-close A {
+		display:block;
+		width:100%;
+		height:100%;
+		background:url(/img/CloseButton_gray.gif?v=1);
+		}
+
+.iframe-crossdomain {
+	width:1px;
+	height:1px;
+	position:absolute;
+}
+.lj3-user IMG {
+	width:16px;
+	height:16px;
+	vertical-align:bottom;
+	border:0;
+	}
+.lj3-user.lj3-openid IMG {
+	background:url(/img/icons/openid-16.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-livejournal IMG {
+	background:url(/img/pencil.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-facebook IMG {
+	background:url(/img/icons/facebook-16.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-twitter IMG {
+	background:url(/img/icons/twitter-16.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-vkontakte IMG {
+	background:url(/img/icons/vkontakte-16.gif?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-google IMG {
+	background:url(/img/icons/google-16.png?v=1) no-repeat 0 0;
+	}
+.lj3-user.lj3-mailru IMG {
+	background:url(/img/icons/mailru-16.gif?v=3) no-repeat 0 0;
+	}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* NEW DESIGN */
+.b-identity-header {
+	padding:14px 28px 12px;
+	position:relative;
+	border-bottom:1px solid #3F6D8D;
+	-webkit-border-radius:6px 6px 0 0;
+	-moz-border-radius:6px 6px 0 0;
+	border-radius:6px 6px 0 0;
+	overflow:visible;
+
+	background:#194874; /* Old browsers */
+	background:-moz-linear-gradient(top, #194874 0%, #6d9bc7 100%); /* FF3.6+ */
+	background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#194874), color-stop(100%,#6d9bc7)); /* Chrome,Safari4+ */
+	background:-webkit-linear-gradient(top, #194874 0%,#6d9bc7 100%); /* Chrome10+,Safari5.1+ */
+	background:-o-linear-gradient(top, #194874 0%,#6d9bc7 100%); /* Opera11.10+ */
+	background:-ms-linear-gradient(top, #194874 0%,#6d9bc7 100%); /* IE10+ */
+	background:linear-gradient(top, #194874 0%,#6d9bc7 100%); /* W3C */
+	}
+.b-identity-header .logo {
+	font:bold 18px/20px Arial, sans-serif;
+	text-shadow:0 -1px 0 #000;
+	color:#FFF;
+	}
+.b-identity-header .logo I {
+	display:inline-block;
+	width:16px;
+	height:16px;
+	margin:0 6px 0 0;
+	vertical-align:baseline;
+	background:url(http://livejournal.com/img/pencil.gif) no-repeat 0 0;
+	}
+.b-identity-header .b-auth-wrapper {
+	position:absolute;
+	right:28px;
+	top:14px;
+	line-height:10px;
+	padding:2px;
+	background-color:rgba(0, 0, 0, 0.25);
+	border-color:#253343;
+	border-radius:4px 4px 4px 4px;
+	border-style:solid;
+	border-width:0 1px 1px 0;
+	}
+
+.b-loginpopup-item A,
+.b-identity-header A {
+	outline:none;
+	}
+/* so heavy weight of css-rules cause there is heavy weight of system css-rules in FF 3.6 */
+.b-loginpopup-item A IMG,
+.b-identity-header A IMG {
+	border:none;
+	}
+
+.b-popup-inner {
+	padding:6px 8px;
+	}
+

Modified: trunk/htdocs/stc/partners/login.css
===================================================================
--- trunk/htdocs/stc/partners/login.css	2011-05-31 09:02:41 UTC (rev 10584)
+++ trunk/htdocs/stc/partners/login.css	2011-05-31 09:52:05 UTC (rev 10585)
@@ -1,425 +0,0 @@
-BODY {
-	background:white;
-	}
-.m-auth {
-	position:relative;
-	bottom:-1px;
-	overflow:hidden;
-	margin:0;
-	z-index:2;
-	border:0;
-	font:12px Arial, Helvetica, sans-serif;
-	}
-	.m-auth-item {
-		float:left;
-		padding:6px 30px 5px;
-		position:relative;
-		}
-	.m-auth-user {
-		width:87px;
-		}
-	.m-auth-openid {
-		width:62px;
-		}
-	.m-auth-facebook {
-		width:75px;
-		}
-	.m-auth-twitter {
-		width:58px;
-		}
-	.m-auth .current {
-		padding:5px 29px 4px;
-		border:1px solid #FFF;
-		border-color:#CCC #CCC #FFF;
-		border-radius:6px 6px 0 0;
-		-moz-border-radius:6px 6px 0 0;
-		-webkit-border-radius:6px 6px 0 0;
-		}
-		.m-auth-item A,
-		.m-auth-item A:link,
-		.m-auth-item A:visited,
-		.m-auth-item A:hover,
-		.m-auth-item A:active {
-			text-decoration:none;
-			margin:0;
-			padding:0 0 0 20px;
-			outline:0;
-			background-position:0 50%;
-			color:#222;
-			}
-			.m-auth .m-auth-item .m-auth-bl,
-			.m-auth .m-auth-item .m-auth-br {
-				display:none;
-				}
-			.m-auth-item B,
-			.m-auth-item SPAN {
-				border-bottom:1px dotted #000;
-				font-weight:normal;
-				}
-			.m-auth-item A:hover B,
-			.m-auth-item A:hover SPAN {
-				border-bottom:0;
-				}
-			.m-auth-item.current B,
-			.m-auth-item.current SPAN {
-				border-bottom:0;
-				font-weight:bold;
-				}
-
-.b-auth {
-	position:relative;
-	z-index:1;
-	border:0;
-	font:12px Arial, Helvetica, sans-serif;
-	}
-UL.b-auth {
-	background-color:#F7F7F7;
-	}
-	.b-auth LI {
-		padding:0;
-		border:0;
-		}
-		.b-auth FORM {
-			padding:24px 30px 9px;
-			height:147px;
-			overflow:hidden;
-			border:1px solid #CCC;
-			-webkit-border-radius:0 0 6px 6px;
-			-moz-border-radius:0 0 6px 6px;
-			border-radius:0 0 6px 6px;
-			}
-		/*.b-auth #tab-user FORM {
-			border-radius:0 6px 6px 6px;
-			-moz-border-radius:0 6px 6px 6px;
-			-webkit-border-radius:0 6px 6px 6px;
-			}
-		.b-auth #tab-facebook FORM,
-		.b-auth #tab-twitter FORM {
-			padding:30px;
-			height:140px;
-			}*/
-
-.b-auth-user-form,
-.b-auth-openid-form {
-	float:left;
-	margin:0;
-	padding:0;
-	text-align:center;
-	}
-#tab-user .b-auth-input-wrapper {
-	margin: 0 0 5px;
-	}
-.b-auth-input-wrapper {
-	display:block;
-	position:relative;
-	}
-	.b-auth-input-wrapper LABEL {
-		position:absolute;
-		top:4px;
-		left:6px;
-		color:#666;
-		}
-	.b-auth-input-wrapper INPUT {
-		width:150px;
-		}
-	.lj3-input-wrapper INPUT,
-	.lj3-input-wrapper TEXTAREA,
-	.b-auth-input-wrapper INPUT,
-	.b-auth-input-wrapper TEXTAREA {
-		padding-left:2px;
-		padding-right:2px;
-		margin:0 0 5px;
-		font-family:Arial,Helvetica,sans-serif;
-		}
-	.b-auth-input-wrapper A,
-	.b-auth-input-wrapper SPAN {
-		display:block;
-		text-align:center;
-		font-size:11px;
-		color:#666;
-		}
-	.b-auth-input-wrapper A {
-		color:#369;
-		}
-.b-auth-user-form BUTTON,
-.b-auth-openid-form BUTTON {
-	margin:5px 0;
-	text-align:left;
-	color:#222;
-	}
-
-.b-auth-desc {
-	/*float:right;*/
-	padding:0 0 0 184px;
-	overflow:visible;
-	line-height:1.4em;
-	color:#333;
-	}
-/*.b-auth #tab-user .b-auth-desc {
-	width:340px;
-	}*/
-.b-auth #tab-openid .b-auth-desc {
-	padding:0 0 0 260px;
-	}
-/*.b-auth #tab-facebook .b-auth-desc,
-.b-auth #tab-twitter .b-auth-desc {
-	width:300px;
-	padding:0;
-	}*/
-
-.b-auth-error {
-	position:absolute;
-	top:10px;
-	left:0;
-	right:0;
-	margin:0 30px;
-	z-index:2;
-	}
-	.b-auth-error .i-message-error {
-		display:block;
-		padding:9px 30px 9px 9px;
-		border:1px solid #FF9B97;
-		border-radius:6px;
-		-moz-border-radius:6px;
-		-webkit-border-radius:6px;
-		text-align:left;
-		color:#D51C00;
-		}
-	.b-auth-error .i-close {
-		position:absolute;
-		width:12px;
-		height:12px;
-		top:9px;
-		right:9px;
-		background:url(/img/icons/close.png) no-repeat 0 0;
-		cursor:pointer;
-		}
-
-.b-auth-user-form .b-auth-user-input {
-	width:138px;
-	margin:0 0 5px;
-	}
-.b-auth-openid-form INPUT {
-	width:218px;
-	}
-
-.lj3-form-wrapper {
-	position:relative;
-	z-index:1;
-	font:12px Arial, Helvetica, sans-serif;
-	}
-.lj3-form-wrapper .lj3-form  {
-	display:none;
-	padding:9px 30px;
-	overflow:hidden;
-	border:1px solid #CCC;
-	border-radius:6px;
-	-moz-border-radius:6px;
-	-webkit-border-radius:6px;
-	}
-.lj3-form-wrapper FIELDSET {
-	padding:0;
-	margin:0;
-	border:0;
-	}
-.lj3-form-wrapper .lj3-livejournal  {
-	border-radius:0 6px 6px 6px;
-	-moz-border-radius:0 6px 6px 6px;
-	-webkit-border-radius:0 6px 6px 6px;
-	}
-.lj3-form-wrapper .lj3-form.lj3-active {
-	display:block;
-	}
-
-.lj3-input-wrapper {
-	position:relative;
-	margin:0;
-	}
-	.lj3-input-wrapper LABEL {
-		position:absolute;
-		top:4px;
-		left:6px;
-		color:#666;
-		}
-	.lj3-input-wrapper INPUT,
-	.lj3-input-wrapper TEXTAREA {
-		padding-left:2px;
-		padding-right:2px;
-		margin:0 0 5px;
-		font-family:Arial,Helvetica,sans-serif;
-		}
-	.lj3-input-wrapper A,
-	.lj3-input-wrapper SPAN {
-		display:block;
-		font-size:11px;
-		color:#666;
-		}
-	.lj3-input-wrapper A {
-		color:#222;
-		}
-.lj3-submit-wrapper {
-	padding:5px 0;
-	margin:0;
-	text-align:right;
-	}
-
-/* post comment */
-	.lj3-post-comment .lj3-input-wrapper LABEL {
-		font-size:15px;
-		}
-	.lj3-post-comment .lj3-input-wrapper .lj3-input-subject {
-		width:518px;
-		font-size:15px;
-		}
-	.lj3-post-comment .lj3-input-wrapper TEXTAREA {
-		width:520px;
-		height:112px;
-		font-size:15px;
-		}
-.lj3-identity {
-	margin:0 0 10px;
-	}
-.b-auth .lj3-identity {
-	text-align:center;
-	}
-	.lj3-identity A {
-		color:#222;
-		text-decoration:none;
-		font-weight:bold;
-		}
-	.lj3-identity .lj3-logout {
-		font-size:11px;
-		}
-		.lj3-identity .lj3-logout A {
-			font-size:11px;
-			font-weight:normal;
-			text-decoration:underline;
-			}
-		.lj3-identity .lj3-logout A:hover {
-			text-decoration:none;
-			}
-.lj3-close {
-	position:absolute;
-	right:9px;
-	top:12px;
-	width:12px;
-	height:12px;
-	margin:0;
-	}
-.b-identity .lj3-close {
-	right:14px;
-	top:39px;
-	z-index:3;
-	}
-	.lj3-close A {
-		display:block;
-		width:100%;
-		height:100%;
-		background:url(/img/CloseButton_gray.gif?v=1);
-		}
-
-.iframe-crossdomain {
-	width:1px;
-	height:1px;
-	position:absolute;
-}
-.lj3-user IMG {
-	width:16px;
-	height:16px;
-	vertical-align:bottom;
-	border:0;
-	}
-.lj3-user.lj3-openid IMG {
-	background:url(/img/icons/openid-16.gif?v=1) no-repeat 0 0;
-	}
-.lj3-user.lj3-livejournal IMG {
-	background:url(/img/pencil.gif?v=1) no-repeat 0 0;
-	}
-.lj3-user.lj3-facebook IMG {
-	background:url(/img/icons/facebook-16.gif?v=1) no-repeat 0 0;
-	}
-.lj3-user.lj3-twitter IMG {
-	background:url(/img/icons/twitter-16.gif?v=1) no-repeat 0 0;
-	}
-.lj3-user.lj3-vkontakte IMG {
-	background:url(/img/icons/vkontakte-16.gif?v=1) no-repeat 0 0;
-	}
-.lj3-user.lj3-google IMG {
-	background:url(/img/icons/google-16.png?v=1) no-repeat 0 0;
-	}
-.lj3-user.lj3-mailru IMG {
-	background:url(/img/icons/mailru-16.gif?v=3) no-repeat 0 0;
-	}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* NEW DESIGN */
-.b-identity-header {
-	padding:14px 28px 12px;
-	position:relative;
-	border-bottom:1px solid #3F6D8D;
-	-webkit-border-radius:6px 6px 0 0;
-	-moz-border-radius:6px 6px 0 0;
-	border-radius:6px 6px 0 0;
-	overflow:visible;
-
-	background:#194874; /* Old browsers */
-	background:-moz-linear-gradient(top, #194874 0%, #6d9bc7 100%); /* FF3.6+ */
-	background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#194874), color-stop(100%,#6d9bc7)); /* Chrome,Safari4+ */
-	background:-webkit-linear-gradient(top, #194874 0%,#6d9bc7 100%); /* Chrome10+,Safari5.1+ */
-	background:-o-linear-gradient(top, #194874 0%,#6d9bc7 100%); /* Opera11.10+ */
-	background:-ms-linear-gradient(top, #194874 0%,#6d9bc7 100%); /* IE10+ */
-	background:linear-gradient(top, #194874 0%,#6d9bc7 100%); /* W3C */
-	}
-.b-identity-header .logo {
-	font:bold 18px/20px Arial, sans-serif;
-	text-shadow:0 -1px 0 #000;
-	color:#FFF;
-	}
-.b-identity-header .logo I {
-	display:inline-block;
-	width:16px;
-	height:16px;
-	margin:0 6px 0 0;
-	vertical-align:baseline;
-	background:url(http://livejournal.com/img/pencil.gif) no-repeat 0 0;
-	}
-.b-identity-header .b-auth-wrapper {
-	position:absolute;
-	right:28px;
-	top:14px;
-	line-height:10px;
-	padding:2px;
-	background-color:rgba(0, 0, 0, 0.25);
-	border-color:#253343;
-	border-radius:4px 4px 4px 4px;
-	border-style:solid;
-	border-width:0 1px 1px 0;
-	}
-
-.b-loginpopup-item A,
-.b-identity-header A {
-	outline:none;
-	}
-/* so heavy weight of css-rules cause there is heavy weight of system css-rules in FF 3.6 */
-.b-loginpopup-item A IMG,
-.b-identity-header A IMG {
-	border:none;
-	}
-
-.b-popup-inner {
-	padding:6px 8px;
-	}
-

Added: trunk/templates/Identity/ExternalLogin/v1.tmpl
===================================================================
--- trunk/templates/Identity/ExternalLogin/v1.tmpl	                        (rev 0)
+++ trunk/templates/Identity/ExternalLogin/v1.tmpl	2011-05-31 09:52:05 UTC (rev 10585)
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Log in</title>
+<TMPL_VAR resources_html>
+</head>
+<body>
+<TMPL_VAR js_check_domain>
+<div class="b-identity">
+<ul class="m-auth">
+    <TMPL_LOOP type_user>
+        <li class="m-auth-item m-auth-<TMPL_VAR type> current"><a href="?type=<TMPL_VAR type>"><span><TMPL_VAR ml_tab_heading></span></a><i class="m-auth-bl"></i><i class="m-auth-br"></i></li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_openid>
+        <li class="m-auth-item m-auth-<TMPL_VAR type>"><a href="?type=<TMPL_VAR type>"><span><TMPL_VAR ml_tab_heading></span></a><i class="m-auth-bl"></i><i class="m-auth-br"></i></li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_facebook>
+        <li class="m-auth-item m-auth-<TMPL_VAR type>"><a href="?type=<TMPL_VAR type>"><span><TMPL_VAR ml_tab_heading></span></a><i class="m-auth-bl"></i><i class="m-auth-br"></i></li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_twitter>
+        <li class="m-auth-item m-auth-<TMPL_VAR type>"><a href="?type=<TMPL_VAR type>"><span><TMPL_VAR ml_tab_heading></span></a><i class="m-auth-bl"></i><i class="m-auth-br"></i></li>
+    </TMPL_LOOP>
+
+</ul>
+<ul class="b-auth">
+    <TMPL_LOOP type_user>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item">
+			<form action="<tmpl_var action>" method="post" target="">
+                <input type="hidden" name="remember_me" value="1">
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.user.desc')"></p>
+                <p class="b-auth-user-form">
+                    <span class="b-auth-input-wrapper">
+                        <label style="display:none;" for="ljusername"><TMPL_VAR expr="ml('/identity/login.bml.user.label.name')"></label>
+                        <input type="text" name="user" id="ljusername" value="" class="b-auth-user-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.user.label.name')">" />
+                    </span>
+                    <span class="b-auth-input-wrapper">
+                        <label style="display:none;" for="ljuserpassword"><TMPL_VAR expr="ml('/identity/login.bml.user.label.pass')"></label>
+                        <input type="password" name="password" id="ljuserpassword" value="" class="b-auth-user-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.user.label.pass')">" />
+                        <a target="_blank" href="<TMPL_VAR lj_siteroot>/lostinfo.bml"><TMPL_VAR expr="ml('/identity/login.bml.user.help')"></a>
+                        <a target="_blank" href="<TMPL_VAR lj_siteroot>/create.bml"><TMPL_VAR expr="ml('/identity/login.bml.user.register')"></a>
+                    </span>
+                    <button disabled="disabled" type="submit"><TMPL_VAR expr="ml('/identity/login.bml.user.btn.login')"></button>
+                </p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+                <input type="hidden" name="returnto" value="<TMPL_VAR returnto>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_openid>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+			<form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.openid.desc')"></p>
+                <p class="b-auth-openid-form">
+                    <span class="b-auth-input-wrapper">
+                        <label style="display:none;" for="openid_url"><TMPL_VAR expr="ml('/identity/login.bml.openid.label.url')"></label>
+                        <input type="url" name="openid:url" id="openid_url" value="" class="b-auth-openid-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.openid.label.url')">" />
+                        <span><TMPL_VAR expr="ml('/identity/login.bml.openid.label.sample')"></span>
+                    </span>
+                    <button disabled="disabled" type="submit"><TMPL_VAR expr="ml('/identity/login.bml.openid.btn.login')"></button>
+                </p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_facebook>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+			<form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-facebookbtn" title="<TMPL_VAR expr="ml('/identity/login.bml.facebook.btn.connect')">"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.facebook.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.facebook.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_twitter>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+			<form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-twitterbtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.twitter.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.twitter.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+</ul>
+<p class="lj3-close">
+    <a href="javascript:void(0);" id="close-button"></a>
+</p>
+</div>
+
+<script type="text/javascript">
+    jQuery(function($) {
+        $(".m-auth a").click(function(e) {
+            e.preventDefault();
+
+            var type = $(this).attr("href").replace(/.*type=/, "");
+
+            $(".m-auth-item").removeClass("current");
+            $(".b-auth-item").hide();
+            $(this).parent('li').addClass("current");
+            $("#tab-" + type).show();
+        });
+		
+		$('.b-auth-item').each(function() {
+			var tabItem = $(this),
+				submitButton = tabItem.find(':submit'),
+				inputFields = tabItem.find('input:text, input:password, input[type=url]');
+			
+			inputFields
+				.bind('change keyup', function () {
+					var someInputIsEmpty = false;
+					
+					inputFields.each(function () {
+						var currentInput = $(this);
+						
+						if ($.trim(currentInput.val()) === '') {
+							someInputIsEmpty = true;
+						}
+					});
+					
+					if (someInputIsEmpty) {
+						submitButton.attr('disabled', 'disabled');
+					} else {
+						submitButton.removeAttr('disabled');
+					}
+				})
+				.trigger('keyup');
+		});		
+
+        $("form").submit(function(e) {
+            var form = $(this);
+
+            if (form.attr("target") == "ljidentityauth") {
+                window.open("", "ljidentityauth", "width=800,height=600");
+            }
+        });
+    });
+</script>
+</body>
+</html>

Added: trunk/templates/Identity/ExternalLogin/v2.tmpl
===================================================================
--- trunk/templates/Identity/ExternalLogin/v2.tmpl	                        (rev 0)
+++ trunk/templates/Identity/ExternalLogin/v2.tmpl	2011-05-31 09:52:05 UTC (rev 10585)
@@ -0,0 +1,213 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Log in</title>
+<TMPL_VAR resources_html>
+</head>
+<body>
+<TMPL_VAR js_check_domain>
+<div class="b-identity">
+    <div class="b-identity-header">
+        <div class="logo"><i></i>LiveJournal</div>
+        <span class="b-auth-wrapper">
+        <TMPL_LOOP type_user>
+            <a class="i-auth" title="Login with <TMPL_VAR ml_tab_heading>" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/livejournal-16.png?v=1"></a>
+        </TMPL_LOOP>
+        <TMPL_LOOP type_facebook>
+            <a class="i-auth" title="Login with <TMPL_VAR ml_tab_heading>" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=1"></a>
+        </TMPL_LOOP>
+        <TMPL_LOOP type_twitter>
+            <a class="i-auth" title="Login with <TMPL_VAR ml_tab_heading>" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=2"></a>
+        </TMPL_LOOP>
+            <a class="i-loginpopup-show" href="#login-more"><img width="16" height="16" alt="More login options" src="/img/icons/showmore.gif?v=1"></a>
+        </span>
+        <div id="login-more" class="b-loginpopup" style="display: none;">
+            <ul class="b-loginpopup-items">
+            <TMPL_LOOP type_openid>
+                <li class="b-loginpopup-item"><a title="Login with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=1"><TMPL_VAR ml_tab_heading></a></li>
+            </TMPL_LOOP>
+            <TMPL_LOOP type_mailru>
+                <li class="b-loginpopup-item"><a title="Login with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=3"><TMPL_VAR ml_tab_heading></a></li>
+            </TMPL_LOOP>
+            <TMPL_LOOP type_google>
+                <li class="b-loginpopup-item"><a title="Login with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.png?v=1"><TMPL_VAR ml_tab_heading></a></li>
+            </TMPL_LOOP>
+            <TMPL_LOOP type_vkontakte>
+                <li class="b-loginpopup-item"><a title="Log in with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Log in with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=1"><TMPL_VAR ml_tab_heading></a></li>
+            </TMPL_LOOP>
+            </ul>
+        </div>
+		<script type="text/javascript">
+			jQuery('#login-more').bubble({
+				target: 'a.i-loginpopup-show',
+				closeControl: false,
+				showOn: 'hover',
+				closeOnContentClick: true
+			});
+		</script>
+    </div>
+<ul class="b-auth">
+    <TMPL_LOOP type_user>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item current">
+            <form action="<tmpl_var action>" method="post" target="">
+                <input type="hidden" name="remember_me" value="1">
+                <p class="b-auth-user-form">
+                    <span class="b-auth-input-wrapper">
+                        <label style="display:none;" for="ljusername"><TMPL_VAR expr="ml('/identity/login.bml.user.label.name')"></label>
+                        <input type="text" name="user" id="ljusername" value="" class="b-auth-user-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.user.label.name')">" />
+                    </span>
+                    <span class="b-auth-input-wrapper">
+                        <label style="display:none;" for="ljuserpassword"><TMPL_VAR expr="ml('/identity/login.bml.user.label.pass')"></label>
+                        <input type="password" name="password" id="ljuserpassword" value="" class="b-auth-user-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.user.label.pass')">" />
+                        <a target="_blank" href="<TMPL_VAR lj_siteroot>/lostinfo.bml"><TMPL_VAR expr="ml('/identity/login.bml.user.help')"></a>
+                        <a target="_blank" href="<TMPL_VAR lj_siteroot>/create.bml"><TMPL_VAR expr="ml('/identity/login.bml.user.register')"></a>
+                    </span>
+                    <button disabled="disabled" type="submit"><TMPL_VAR expr="ml('/identity/login.bml.user.btn.login')"></button>
+                </p>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.user.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+                <input type="hidden" name="returnto" value="<TMPL_VAR returnto>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_openid>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <p class="b-auth-openid-form">
+                    <span class="b-auth-input-wrapper">
+                        <label style="display:none;" for="openid_url"><TMPL_VAR expr="ml('/identity/login.bml.openid.label.url')"></label>
+                        <input type="url" name="openid:url" id="openid_url" value="" class="b-auth-openid-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.openid.label.url')">" />
+                        <span><TMPL_VAR expr="ml('/identity/login.bml.openid.label.sample')"></span>
+                    </span>
+                    <button disabled="disabled" type="submit"><TMPL_VAR expr="ml('/identity/login.bml.openid.btn.login')"></button>
+                </p>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.openid.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_facebook>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-facebookbtn" title="<TMPL_VAR expr="ml('/identity/login.bml.facebook.btn.connect')">"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.facebook.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.facebook.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_twitter>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-twitterbtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.twitter.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.twitter.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_mailru>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-mailrubtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.mailru.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.mailru.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_vkontakte>
+        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
+            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-vkontaktebtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.vkontakte.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.vkontakte.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+    <TMPL_LOOP type_google>
+        <li id="tab-google" class="b-auth-item" style="display:none">
+            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
+                <button type="submit" class="b-googlebtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.google.btn.connect')"></span></button>
+                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.google.desc')"></p>
+                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
+
+                <input type="hidden" name="type" value="<TMPL_VAR type>" />
+            </form>
+        </li>
+    </TMPL_LOOP>
+
+</ul>
+<!--<p class="lj3-close">
+    <a href="javascript:void(0);" id="close-button"></a>
+</p>-->
+</div>
+
+<script type="text/javascript">
+    jQuery(function($) {
+        $("a.i-auth").click(function(e) {
+            e.preventDefault();
+
+            var type = $(this).attr("href").replace(/.*type=/, "");
+
+            $(".m-auth-item").removeClass("current");
+            $(".b-auth-item").hide();
+            $(this).parent('li').addClass("current");
+            $("#tab-" + type).show();
+        });
+        
+        $('.b-auth-item').each(function() {
+            var tabItem = $(this),
+                submitButton = tabItem.find(':submit'),
+                inputFields = tabItem.find('input:text, input:password, input[type=url]');
+            
+            inputFields
+                .bind('change keyup', function () {
+                    var someInputIsEmpty = false;
+                    
+                    inputFields.each(function () {
+                        var currentInput = $(this);
+                        
+                        if ($.trim(currentInput.val()) === '') {
+                            someInputIsEmpty = true;
+                        }
+                    });
+                    
+                    if (someInputIsEmpty) {
+                        submitButton.attr('disabled', 'disabled');
+                    } else {
+                        submitButton.removeAttr('disabled');
+                    }
+                })
+                .trigger('keyup');
+        });        
+
+        $("form").submit(function(e) {
+            var form = $(this);
+
+            if (form.attr("target") == "ljidentityauth") {
+                window.open("", "ljidentityauth", "width=800,height=600");
+            }
+        });
+		
+		
+    });
+</script>
+</body>
+</html>

Modified: trunk/templates/Identity/ExternalLogin.tmpl
===================================================================
--- trunk/templates/Identity/ExternalLogin.tmpl	2011-05-31 09:02:41 UTC (rev 10584)
+++ trunk/templates/Identity/ExternalLogin.tmpl	2011-05-31 09:52:05 UTC (rev 10585)
@@ -1,213 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Log in</title>
-<TMPL_VAR resources_html>
-</head>
-<body>
-<TMPL_VAR js_check_domain>
-<div class="b-identity">
-    <div class="b-identity-header">
-        <div class="logo"><i></i>LiveJournal</div>
-        <span class="b-auth-wrapper">
-        <TMPL_LOOP type_user>
-            <a class="i-auth" title="Login with <TMPL_VAR ml_tab_heading>" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/livejournal-16.png?v=1"></a>
-        </TMPL_LOOP>
-        <TMPL_LOOP type_facebook>
-            <a class="i-auth" title="Login with <TMPL_VAR ml_tab_heading>" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=1"></a>
-        </TMPL_LOOP>
-        <TMPL_LOOP type_twitter>
-            <a class="i-auth" title="Login with <TMPL_VAR ml_tab_heading>" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=2"></a>
-        </TMPL_LOOP>
-            <a class="i-loginpopup-show" href="#login-more"><img width="16" height="16" alt="More login options" src="/img/icons/showmore.gif?v=1"></a>
-        </span>
-        <div id="login-more" class="b-loginpopup" style="display: none;">
-            <ul class="b-loginpopup-items">
-            <TMPL_LOOP type_openid>
-                <li class="b-loginpopup-item"><a title="Login with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=1"><TMPL_VAR ml_tab_heading></a></li>
-            </TMPL_LOOP>
-            <TMPL_LOOP type_mailru>
-                <li class="b-loginpopup-item"><a title="Login with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=3"><TMPL_VAR ml_tab_heading></a></li>
-            </TMPL_LOOP>
-            <TMPL_LOOP type_google>
-                <li class="b-loginpopup-item"><a title="Login with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Login with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.png?v=1"><TMPL_VAR ml_tab_heading></a></li>
-            </TMPL_LOOP>
-            <TMPL_LOOP type_vkontakte>
-                <li class="b-loginpopup-item"><a title="Log in with <TMPL_VAR ml_tab_heading>" class="i-auth" href="?type=<TMPL_VAR type>"><img width="16" height="16" alt="Log in with <TMPL_VAR ml_tab_heading>" src="/img/icons/<TMPL_VAR type>-16.gif?v=1"><TMPL_VAR ml_tab_heading></a></li>
-            </TMPL_LOOP>
-            </ul>
-        </div>
-		<script type="text/javascript">
-			jQuery('#login-more').bubble({
-				target: 'a.i-loginpopup-show',
-				closeControl: false,
-				showOn: 'hover',
-				closeOnContentClick: true
-			});
-		</script>
-    </div>
-<ul class="b-auth">
-    <TMPL_LOOP type_user>
-        <li id="tab-<TMPL_VAR type>" class="b-auth-item current">
-            <form action="<tmpl_var action>" method="post" target="">
-                <input type="hidden" name="remember_me" value="1">
-                <p class="b-auth-user-form">
-                    <span class="b-auth-input-wrapper">
-                        <label style="display:none;" for="ljusername"><TMPL_VAR expr="ml('/identity/login.bml.user.label.name')"></label>
-                        <input type="text" name="user" id="ljusername" value="" class="b-auth-user-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.user.label.name')">" />
-                    </span>
-                    <span class="b-auth-input-wrapper">
-                        <label style="display:none;" for="ljuserpassword"><TMPL_VAR expr="ml('/identity/login.bml.user.label.pass')"></label>
-                        <input type="password" name="password" id="ljuserpassword" value="" class="b-auth-user-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.user.label.pass')">" />
-                        <a target="_blank" href="<TMPL_VAR lj_siteroot>/lostinfo.bml"><TMPL_VAR expr="ml('/identity/login.bml.user.help')"></a>
-                        <a target="_blank" href="<TMPL_VAR lj_siteroot>/create.bml"><TMPL_VAR expr="ml('/identity/login.bml.user.register')"></a>
-                    </span>
-                    <button disabled="disabled" type="submit"><TMPL_VAR expr="ml('/identity/login.bml.user.btn.login')"></button>
-                </p>
-                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.user.desc')"></p>
-                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
-
-                <input type="hidden" name="type" value="<TMPL_VAR type>" />
-                <input type="hidden" name="returnto" value="<TMPL_VAR returnto>" />
-            </form>
-        </li>
-    </TMPL_LOOP>
-
-    <TMPL_LOOP type_openid>
-        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
-            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
-                <p class="b-auth-openid-form">
-                    <span class="b-auth-input-wrapper">
-                        <label style="display:none;" for="openid_url"><TMPL_VAR expr="ml('/identity/login.bml.openid.label.url')"></label>
-                        <input type="url" name="openid:url" id="openid_url" value="" class="b-auth-openid-input" placeholder="<TMPL_VAR expr="ml('/identity/login.bml.openid.label.url')">" />
-                        <span><TMPL_VAR expr="ml('/identity/login.bml.openid.label.sample')"></span>
-                    </span>
-                    <button disabled="disabled" type="submit"><TMPL_VAR expr="ml('/identity/login.bml.openid.btn.login')"></button>
-                </p>
-                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.openid.desc')"></p>
-                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
-
-                <input type="hidden" name="type" value="<TMPL_VAR type>" />
-            </form>
-        </li>
-    </TMPL_LOOP>
-
-    <TMPL_LOOP type_facebook>
-        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
-            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
-                <button type="submit" class="b-facebookbtn" title="<TMPL_VAR expr="ml('/identity/login.bml.facebook.btn.connect')">"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.facebook.btn.connect')"></span></button>
-                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.facebook.desc')"></p>
-                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
-
-                <input type="hidden" name="type" value="<TMPL_VAR type>" />
-            </form>
-        </li>
-    </TMPL_LOOP>
-
-    <TMPL_LOOP type_twitter>
-        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
-            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
-                <button type="submit" class="b-twitterbtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.twitter.btn.connect')"></span></button>
-                <p class="b-auth-desc"><TMPL_VAR expr="ml('/identity/login.bml.twitter.desc')"></p>
-                <TMPL_IF errors><TMPL_LOOP errors><p class="b-auth-error"><span class="i-message i-message-error"><TMPL_VAR error></span><i class="i-close"></i></p></TMPL_LOOP></TMPL_IF>
-
-                <input type="hidden" name="type" value="<TMPL_VAR type>" />
-            </form>
-        </li>
-    </TMPL_LOOP>
-
-    <TMPL_LOOP type_mailru>
-        <li id="tab-<TMPL_VAR type>" class="b-auth-item" style="display:none">
-            <form action="<tmpl_var action>" method="post" target="ljidentityauth">
-                <button type="submit" class="b-mailrubtn"><span><i></i><TMPL_VAR expr="ml('/identity/login.bml.mailru.btn.connect')"><...
 (truncated)
Tags: andy, bml, css, ljcom, pm, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments