Committer: pkornilov
LJSUP-6515: Custom Userheads.U trunk/htdocs/js/editprofile.js U trunk/htdocs/js/pay.js
Modified: trunk/htdocs/js/editprofile.js =================================================================== --- trunk/htdocs/js/editprofile.js 2010-08-24 07:54:53 UTC (rev 9381) +++ trunk/htdocs/js/editprofile.js 2010-08-24 07:56:24 UTC (rev 9382) @@ -1,4 +1,4 @@ -(function($) +jQuery(function($) { var PhoneVerification = { init: function() @@ -82,10 +82,13 @@ { this.supportedProviderEls.css('display',''); this.unsupportedProviderEls.css('display','none'); - this.setState('initial', 'info', 'initial'); 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'); + } return true; } else @@ -203,6 +206,14 @@ } } - $(function(){ PhoneVerification.init() }); - -})(jQuery); + PhoneVerification.init(); + + // Userheads + $('.b-manage-userheads input:radio') + .change(function(){ + jQuery(this.form[this.name]).parent().parent().removeClass('active'); + jQuery(this).parents('li:first').addClass('active'); + }) + // recalc after refresh + .filter(':checked').change(); +}); Modified: trunk/htdocs/js/pay.js =================================================================== --- trunk/htdocs/js/pay.js 2010-08-24 07:54:53 UTC (rev 9381) +++ trunk/htdocs/js/pay.js 2010-08-24 07:56:24 UTC (rev 9382) @@ -269,6 +269,22 @@ return false; }, + pageUserheads: function() + { + this.tabsChanger({ + links: '#shop_userheads .m-buy-types-item a', + containers: '#shop_userheads .b-buy-goods>li' + }); + + jQuery('.b-userheads-item input:radio') + .change(function(){ + jQuery(this.form[this.name]).parents('li.b-userheads-item').removeClass('active'); + jQuery(this).parents('li:first').addClass('active'); + }) + // recalc after refresh + .filter(':checked').change(); + }, + pageDiskquota: function() { jQuery('#shop_diskquota .b-buy-onetime input:radio').change(function() @@ -276,7 +292,7 @@ jQuery(this.form[this.name]).parent().removeClass('i-option-current'); jQuery(this).parent().addClass('i-option-current'); }) - // and recalc after refresh + // recalc after refresh .filter(':checked').change(); }, @@ -409,6 +425,7 @@ $('paidaccount_proceed') && Shop.pagePaidAccount() || $('shop_userpics') && Shop.pageUserpics() || $('shop_wallet') && Shop.pageWallet() || + $('shop_userheads') && Shop.pageUserheads() || $('shop_diskquota') && Shop.pageDiskquota() || $('shop_renameaccount') && Shop.pageRename(); });