Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[livejournal] r17163: LJSUP-6550: SMS Notification

Committer: esavintcev
LJSUP-6550: SMS Notification
U   trunk/htdocs/manage/profile/index.bml
U   trunk/htdocs/stc/ie.css
U   trunk/htdocs/stc/lj_base.css
Modified: trunk/htdocs/manage/profile/index.bml
===================================================================
--- trunk/htdocs/manage/profile/index.bml	2010-08-20 03:01:07 UTC (rev 17162)
+++ trunk/htdocs/manage/profile/index.bml	2010-08-20 03:11:55 UTC (rev 17163)
@@ -496,7 +496,7 @@
             foreach (values %$tminfo) { LJ::text_out(\$_); }
             $tminfo->{'security'} = "N" if ($u->{'txtmsg_status'} eq 'off' || $u->{'txtmsg_status'} eq 'none');
 
-            $ret .= "<span class='view_options'>$ML{'.fn.txtmsg'}";
+            $ret .= "<span id='phone_view_options' class='view_options'>$ML{'.fn.txtmsg'}&nbsp;";
             $ret .= LJ::html_select({ 'name' => 'txtmsg_security', 'selected' => $tminfo->{'security'} },
                                       "all" => BML::ml(".security.visibility.everybody"),
                                       "reg" => BML::ml(".security.visibility.regusers"),
@@ -504,7 +504,7 @@
                                       "N"   => BML::ml(".security.visibility.nobody") );
             $ret .= "</span></div>\n";
 
-            $ret .= "<table class='field_block'>\n";
+            $ret .= "<table class='field_block' id='phone_verification'>\n";
 
             foreach (values %$tminfo) { LJ::text_out(\$_); }
 
@@ -521,12 +521,35 @@
                                           @opts);
             }
 
-            $ret .= " " . BML::ml('.txt.details', {'aopts' => "href='$LJ::SITEROOT/tools/textmessage.bml?mode=details'"}) . "</td></tr>\n";
+            $ret .= " <span>" . BML::ml('.txt.details', {'aopts' => "href='$LJ::SITEROOT/tools/textmessage.bml?mode=details'"}) . "</span></td></tr>\n";
             $ret .= "<tr><td class='field_name'>$ML{'.fn.txtnum'}</td><td>";
-            $ret .= LJ::html_text({ 'name' => 'txtmsg_number',  'value' => $tminfo->{'number'},
-                                    'size' => '15', 'maxlength' => '40' });
+            $ret .= '<ul class="b-manage-smsn b-manage-smsn-hide">';
+            $ret .= '<li class="b-manage-smsn-sms">' . LJ::html_text({ 'name' => 'txtmsg_number', 'value' => $tminfo->{'number'}, 'size' => '15', 'maxlength' => '15' }) . '<br /><span class="helper">' . $ML{'.section.textmsg.example'} . '</span></li>';
+            $ret .= '<li class="b-manage-smsn-status"><i class="i-manage-smsn-icon"></i><span class="i-bubble b-bubble-lite"><i class="i-bubble-arrow-border"></i><i class="i-bubble-arrow"></i><span>' . $ML{'.section.textmsg.info'} . '</span></span>&nbsp;&nbsp;' . LJ::help_icon('sms_notification') . '</li>';
+            $ret .= "<li class='b-manage-smsn-btn'><input type='button' name='sendsms' value='$ML{'.section.textmsg.button'}' disabled='disabled' /></li>";
+            $ret .= '</ul>';
+            $ret .= '<p class="helper" style="display: none;">' . $ML{'.section.textmsg.adv'} . '</p>';
             $ret .= "</td></tr>\n";
             $ret .= "</table>\n";
+
+			$ret .= "<script type='text/javascript'>";
+			$ret .= "var smsNotifyDict = {";
+			$ret .= "";
+			$ret .= "sendsmsbut : \"$ML{'.section.textmsg.button'}\",";
+			$ret .= "resendsmsbut : \"$ML{'.section.textmsg.button.resend'}\",";
+			$ret .= "initial : \"$ML{'.section.textmsg.info'}\",";
+			$ret .= "badnum : \"$ML{'.section.textmsg.info.badnum'}\",";
+			$ret .= "correctNum : \"$ML{'.section.textmsg.info.correctNum'}\",";
+			$ret .= "requestsent : \"$ML{'.section.textmsg.info.requestsent'}\",";
+			$ret .= "smssent : \"$ML{'.section.textmsg.info.smssent'}\",";
+			$ret .= "badtrans : \"$ML{'.section.textmsg.info.badtrans'}\",";
+			$ret .= "notasubscriber : \"$ML{'.section.textmsg.info.notasubscriber'}\",";
+			$ret .= "singlelimitexceeded : \"$ML{'.section.textmsg.info.singlelimitexceeded'}\",";
+			$ret .= "totallimitexceeded : \"$ML{'.section.textmsg.info.totallimitexceeded'}\",";
+			$ret .= "verified : \"$ML{'.section.textmsg.info.verified'}\",";
+			$ret .= "linkexpired : \"$ML{'.section.textmsg.info.linkexpired'}\",";
+			$ret .= "techerror : \"$ML{'.section.textmsg.info.techerror'}\"";
+			$ret .= "}</script>\n";
         }
 
         ## FRIENDS

Modified: trunk/htdocs/stc/ie.css
===================================================================
--- trunk/htdocs/stc/ie.css	2010-08-20 03:01:07 UTC (rev 17162)
+++ trunk/htdocs/stc/ie.css	2010-08-20 03:11:55 UTC (rev 17163)
@@ -157,3 +157,15 @@
 	left: expression(this.parentNode.parentNode.clientWidth-this.parentNode.offsetLeft-2);
 	}
 
+/* SMS Notifications
+--------------------------- */
+/* Must be removed after implementation of Framework! */
+.b-manage-smsn {
+	zoom: 1;
+	}
+	.b-manage-smsn .b-manage-smsn-status {
+		padding: 0 0 0 2.5em;
+		}
+	.b-manage-smsn-status #link_2 {
+		vertical-align: 7px;
+		}

Modified: trunk/htdocs/stc/lj_base.css
===================================================================
--- trunk/htdocs/stc/lj_base.css	2010-08-20 03:01:07 UTC (rev 17162)
+++ trunk/htdocs/stc/lj_base.css	2010-08-20 03:11:55 UTC (rev 17163)
@@ -328,7 +328,7 @@
 .i-bubble {
 	position:relative;
 	margin: 0 0 0 10px !important;
-	padding: 10px;
+	padding: 8px 10px;
 	border-width: 1px;
 	border-style: solid;
 	-webkit-border-radius: 5px;
@@ -1016,7 +1016,7 @@
 
 
 
-/* Facebook & Twitter authorization
+/* SMS Notifications
 --------------------------- */
 /* Must be removed after implementation of Framework! */
 .b-manage-smsn {
@@ -1024,6 +1024,16 @@
 	padding: 0;
 	list-style: none;
 	}
+.b-manage-smsn:after {
+	content: "";
+	display: block;
+	clear: both;
+	visibility: hidden;
+	line-height: 0;
+	height: 0;
+	}
+.b-manage-smsn-hide {
+	}
 	.b-manage-smsn LI {
 		margin: 0;
 		padding: 0;
@@ -1031,14 +1041,56 @@
 		}
 	.b-manage-smsn .b-manage-smsn-sms {
 		float: left;
-		margin: 0 10px 10px 0;
+		margin: 0 0.3em 0.3em 0;
+		padding: 0.3em 0 0;
+		line-height: 1.5;
 		}
+	.b-manage-smsn-hide .b-manage-smsn-sms {
+		padding: 0;
+		}
 	.b-manage-smsn .b-manage-smsn-status {
+		position: relative;
 		float: left;
+		padding: 0 0 0 2em;
 		}
+	.b-manage-smsn-hide .b-manage-smsn-status {
+		display: none;
+		}
+		.i-manage-smsn-icon {
+			position: absolute;
+			top: 50%;
+			left: 0;
+			width: 16px;
+			height: 16px;
+			margin: -9px 0 0 0;
+			background-image: url(/img/icons/smsn.gif);
+			background-repeat: no-repeat;
+			background-position: 0 -800px;
+			}
+		.i-manage-smsn-initial {
+			background-position: 0 0;
+			}
+		.i-manage-smsn-correctnum {
+			background-position: 0 0;
+			}
+		.i-manage-smsn-badnum {
+			background-position: 0 -1000px;
+			}
+		.i-manage-smsn-reqsent {
+			background-position: 0 -200px;
+			}
+		.i-manage-smsn-smssent {
+			background-position: 0 -400px;
+			}
+		.i-manage-smsn-verified {
+			background-position: 0 -600px;
+			}
 	.b-manage-smsn .b-manage-smsn-btn {
 		clear: both;
 		}
+	.b-manage-smsn-hide .b-manage-smsn-btn {
+		display: none;
+		}
 
 
 

Tags: bml, css, livejournal, savintsev_egor
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