can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[ljcom] r10238: LJSUP-7874: SMS notification - new featu...

Committer: dpetrov
LJSUP-7874: SMS notification - new features
U   trunk/htdocs/js/editprofile.js
Modified: trunk/htdocs/js/editprofile.js
===================================================================
--- trunk/htdocs/js/editprofile.js	2011-03-15 10:46:02 UTC (rev 10237)
+++ trunk/htdocs/js/editprofile.js	2011-03-16 03:34:38 UTC (rev 10238)
@@ -102,7 +102,8 @@
 				phVerification: $('#phone_vercode'),
 				notification: this.table.find('.b-manage-smsn-status'),
 				verCode: $('#phone_vercode [name=txtmsg_verify]'),
-				sendCodeBtn: $('#phone_vercode [name=verify]')
+				sendCodeBtn: $('#phone_vercode [name=verify]'),
+				smsTime: $('#sms_time')
 			}
 
 
@@ -195,7 +196,7 @@
 				var answer = $.trim(data);
 				switch(answer)
 				{
-					case 'accepted': that.setState('requestsent', 'success', 'reqsent'); 
+					case 'accepted': that.setState('requestsent', 'success', 'reqsent');
 									that.checkVerification();
 									break;
 					case 'rate_limit_exceded': that.setState('totallimitexceeded', 'error', 'rateexceed'); break;
@@ -240,7 +241,7 @@
 				case 'verification_asked': this.setState('requestsent', 'success', 'reqsent');
 											this.checkVerification();
 											break;
-				case 'not_verified': this.setState('correctNum', 'success', 'correctnum');
+				case 'not_verified': this.setState('correctNum', 'info', 'correctnum');
 									 break;
 
 			}
@@ -285,6 +286,7 @@
 				that.ui.verCode.val('');
 				bt.val(dict['sendsmsbut']);
 				that.skipReqSent = false;
+				that.ui.smsTime.hide();
 			}
 
 			function updateInfoBubble(text, event)
@@ -318,13 +320,14 @@
 					case 'correctnum': bt.attr('disabled', false);
 									resetUI();
 									break;
-					case 'reqsent':	bt.val( dict['resendsmsbut']);
+					case 'reqsent': bt.val( dict['resendsmsbut']);
 									break;
 					case 'rateexceed': bt.attr('disabled', true);
 									resetUI();
 									break;
 					case 'verified': /* hide send button */
 									resetUI(true);
+									this.ui.smsTime.show();
 									break;
 					case 'wrongcode': this.skipReqSent = true;
 									  break;
@@ -336,6 +339,7 @@
 									bt.attr('disabled', true);
 									break;
 					case 'smssent' : bt.attr( 'disabled', false );
+									this.ui.smsTime.hide();
 									this.ui.resendBtn.parent('.b-manage-smsn-btn').css('display','');
 									this.ui.phVerification.removeAttr('style');
 									break;
@@ -363,6 +367,10 @@
 	}
 
 	PhoneVerification.init();
+
+	$('#sms_interval').change( function() {
+		$('#sms_interval_values')[ this.checked ? "show" : "hide" ]();
+	} ).change();
 	
 	// Userheads
 	$('.b-manage-userheads input:radio')

Tags: can3p, js, ljcom
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