can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[ljcom] r9476: LJSUP-6482: SMS Notification RU - remove...

Committer: dpetrov
LJSUP-6482: SMS Notification RU - removed provider toggle

U   trunk/htdocs/js/editprofile.js
Modified: trunk/htdocs/js/editprofile.js
===================================================================
--- trunk/htdocs/js/editprofile.js	2010-09-08 08:04:06 UTC (rev 9475)
+++ trunk/htdocs/js/editprofile.js	2010-09-09 03:03:58 UTC (rev 9476)
@@ -3,8 +3,7 @@
 
 	$.fn.maskInput = function(options)
 	{
-		var supportedDEF = [901,903,905,906,909,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,936,937,938,960,961,962,963,964,965,967,968,997],
-			mask = /^(\+?[7]|8)\d{10}$/,
+		var mask = /^(\+?[7]|8)\d{10}$/,
 			allowedChars = "0-9";
 		var lastValue;
 
@@ -47,7 +46,6 @@
 				provider: this.table.find('[name=txtmsg_provider]'),
 				resendBtn: this.table.find('[name=sendsms]'),
 				phInput: this.table.find('[name=txtmsg_number]'),
-				phViewOptions: $('#phone_view_options'),
 				phVerification: $('#phone_vercode'),
 				notification: this.table.find('.b-manage-smsn-status'),
 				verCode: $('#phone_vercode [name=txtmsg_verify]'),
@@ -57,25 +55,20 @@
 			this.endpoint = "/tools/endpoints/validate_phone.bml";
 			this.stopVerification = false;
 
-			this.supportedProviderEls = this.table.find('.b-manage-smsn-status')
-				.add(this.table.find('.b-manage-smsn-btn'))
-				.add(this.table.find('.helper'));
-			this.unsupportedProviderEls = this.ui.phViewOptions
-				.add(this.table.find('tr:first span'));
 			this.verifiedElement = this.table.find('.b-manage-smsn-btn');
 
 			this.table.find('.b-manage-smsn').removeClass('b-manage-smsn-hide');
 			var that = this;
 
 			this.viewOptionsValue = '';
-			this.ui.provider.change(function(){ that.checkProvider(this.value); });
+			//this.ui.provider.change(function(){ that.checkProvider(this.value); });
 
 
 			var initial = true;
 			this.ui.phInput.maskInput({
 				update: function(isok, isGoodDef)
 				{
-					if(!that.checkProvider(that.ui.provider.val()) || that.ui.phInput.val().length == 0)
+					if(that.ui.phInput.val().length == 0)
 					{
 						that.setState('initial', 'info', 'initial');
 					} 
@@ -92,11 +85,11 @@
 						if(initial)
 						{
 							that.checkVerification();
-							initial = false;
 						}
 						else
 							that.setState('correctNum', 'success', 'correctnum');
 					}
+					initial = false;
 				}
 			});
 
@@ -130,41 +123,6 @@
 			});
 		},
 
-		checkProvider: function(selectVal)
-		{
-			if($.inArray(selectVal, this.supportedProviders) >= 0)
-			{
-				this.supportedProviderEls.css('display','');
-				this.unsupportedProviderEls.css('display','none');
-				this.viewOptionsValue = this.ui.phViewOptions.val();
-				this.ui.phViewOptions.val('friends');
-				this.ui.resendBtn.attr('disabled', false);
-				if(this.ui.resendBtn.val().length == 0)
-				{
-					this.setState('initial', 'info', 'initial');
-				}
-
-				var state = this.getState()[2] || "";
-				if(state == "reqsent")
-				{
-					this.ui.phVerification.removeAttr('style');
-					this.skipReqSent = false;
-					this.checkVerification();
-				}
-
-				return true;
-			}
-			else
-			{
-				this.supportedProviderEls.css('display','none');
-				this.unsupportedProviderEls.css('display','');
-				this.ui.phViewOptions.val(this.viewOptionsValue);
-				this.viewOptionsValue = '';
-				clearInterval(this.verifyTimer);
-				return false;
-			}
-		},
-
 		sendVerification: function(number)
 		{
 			var that = this;

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