Permalink
Browse files

🎤 M Scripts/Community/forums.js, M Scripts/Community/workshop_functio…

…ns.js, M Scripts/Partner/packages.js, M Scripts/Store/checkout.js, M Scripts/Store/home.js, M Styles/BigPicture/profile.css, M Styles/Community/badges.css, M Styles/Community/economy.css, M Styles/Community/economy_market.css, M Styles/Community/forums.css, M Styles/Community/groupadmin.css, M Styles/Community/profile_commentnotifications.css, M Styles/Community/profile_editv2.css, M Styles/Community/profilev2.css, M Styles/Store/game.css
  • Loading branch information...
SteamTracker committed Feb 10, 2016
1 parent bacd51a commit 669249406fc8ab216bf50106d9fe707311a968a5
@@ -688,63 +688,19 @@ function Forum_ReplyToPost( gidTopic, gidComment )
}
var g_elAuthorMenu = null;
function Forum_AuthorMenu( elLink, event, bCanBan, gidTopic, gidComment, accountIDTarget, strTargetName )
function Forum_AuthorMenu( elLink, accountIDTarget, gidComment )
{
if ( !event )
event = window.event;
if ( !g_elAuthorMenu )
g_elAuthorMenu = $('forum_user_menu');
var $Link = $J(elLink);
var $Menu = $Link.siblings('.forum_author_menu');
// reparent the author menu first, so we can make sure it's in the document
var elParent = elLink.up('.commentthread_comment');
if ( !elParent )
elParent = elLink.up( '.forum_op' );
if ( elParent )
elParent.appendChild( g_elAuthorMenu.remove() );
elParent.style.overflow = 'visible';
var $Parent = $Link.parents('.commentthread_comment, .forum_op');
$Parent.css( 'overflow', 'visible' );
// now set up the links
var elProfileLink = $('forum_user_menu_viewprofile');
var elViewPostsLink = $('forum_user_menu_viewposts');
var elBanUserLink = $('forum_user_menu_ban');
var elModeratorMessageLink = $('forum_user_menu_viewmoderatormessages');
if ( g_rgForumTopics[ gidTopic ] )
{
var Topic = g_rgForumTopics[ gidTopic ];
var rgForumData = Topic.m_rgForumData;
elProfileLink.href = elLink.href;
if ( rgForumData.is_public )
elViewPostsLink.href = elProfileLink.href + '/posthistory/';
else
elViewPostsLink.href = Topic.GetSearchURL( { author: accountIDTarget } );
$Menu.css('min-width', $Link.width() + 'px' );
if ( elBanUserLink )
{
if ( bCanBan )
{
elBanUserLink.href = 'javascript:Forum_BanUser( ' + rgForumData['owner'] + ', \'' + rgForumData['gidforum'] + '\', \'' + gidTopic + '\', \'' + gidComment + '\', ' + accountIDTarget + ' );'
elBanUserLink.show();
}
else
{
elBanUserLink.hide();
}
}
if ( elModeratorMessageLink )
elModeratorMessageLink.href = elProfileLink.href + '/moderatormessages/';
$('forum_user_menu_inner').style.minWidth = $(elLink).getWidth() + 'px';
ShowMenu( elLink, g_elAuthorMenu, 'left', 'bottom', 2 );
}
ShowMenu( $Link, $Menu, 'left', 'bottom', 2 );
return false;
}
@@ -446,7 +446,15 @@ function ValidateUserPaymentInfo( baseURL )
} );
},
error: function( jqXHR ) {
alert( jqXHR.responseText );
var json = jqXHR.responseJSON;
if ( json.hasOwnProperty( "msg" ) )
{
ShowAlertDialog( 'Error', json.msg );
}
else
{
ShowAlertDialog( 'Error', 'An unknown error occurred while trying to save your contact information.' );
}
}
} );
}
@@ -567,9 +567,6 @@ var templ_DiscountsSummaryDiv = new Template( ''
// discounts = map of initial discount values for base price & country overrides (currency/country code => value)
function CreateDiscount( target, id, discount )
{
if ( discount == null )
discount = new Object();
var name = (discount['name'] == null ) ? '' : discount['name'];
var description = (discount['description'] == null ) ? '' : discount['description'];
var amt = (discount['discount'] == null) ? new Object() : discount['discount'];
@@ -788,7 +785,7 @@ function GetInitialCosts()
return initialCost;
}
function AddPctgDiscount( target, id, pctg )
function AddPctgDiscount( target, pctg, packageid )
{
if ( !pctg )
return false;
@@ -842,24 +839,45 @@ function AddPctgDiscount( target, id, pctg )
discount['discount'] = { base: discounts, country: discountsCountry, region: discountsRegion };
discount['discount_percent'] = pctg;
AddDiscount( target, id, discount, true );
AddDiscount( target, discount, packageid, true );
return true;
}
function AddDiscount( target, id, discount, updateSummary )
function AddDiscount( target, discount, packageid, updateSummary )
{
var elementId = ++g_nextElementID;
var key = id + '[' + elementId + ']';
CreateDiscount( target, key, discount );
if ( discount )
if ( discount == null )
discount = new Object();
if( discount['discount_id'] == null )
{
CreateAjaxRequest( g_szBaseURL + "/packages/getnewdiscountid/" + packageid,
{},
function( results )
{
if ( results[ 'success' ] )
{
discount['discount_id'] = results[ 'discountid' ];
return AddDiscount( target, discount, packageid, updateSummary );
}
}
);
}
else
{
g_AllDiscounts[ key ] = discount;
if ( updateSummary )
var key = 'discounts' + '[' + discount['discount_id'] + ']';
CreateDiscount(target, key, discount);
if (discount)
{
UpdateSummaryDiscounts( $( 'discountSummary' ), 'discountSummary', g_RequiredCurrencies );
g_AllDiscounts[key] = discount;
if (updateSummary)
{
UpdateSummaryDiscounts($('discountSummary'), 'discountSummary', g_RequiredCurrencies);
}
}
return key;
}
return key;
}
function AddRequiredPackage( target, id, initValue )
@@ -1448,7 +1466,7 @@ packages.ToolTip_Show = function ToolTip_Show( tooltipId, parentId )
g_InitialCostsCountry = initialCost.country;
g_InitialCostsRegion = initialCost.country;
AddDiscount( toolTip, 'discounts', discount, false );
AddDiscount( toolTip, discount, packageId, false );
}
}
View
@@ -639,7 +639,7 @@ function InitializeTransaction()
'CardExpirationYear' : $('expiration_year').value,
'CardExpirationMonth' : $('expiration_month').value,
// address info, which may go unused be there depending on payment method
// address info, which may go unused depending on payment method
'FirstName' : $('first_name').value,
'LastName' : $('last_name').value,
'Address' : $('billing_address').value,
@@ -756,7 +756,7 @@ function OnInitializeTransactionSuccess( result )
|| result.paymentmethod == 17
|| result.paymentmethod == 18 || result.paymentmethod == 19 || result.paymentmethod == 20 || result.paymentmethod == 21 || result.paymentmethod == 22 || result.paymentmethod == 23 || result.paymentmethod == 24 || result.paymentmethod == 25 || result.paymentmethod == 26 || result.paymentmethod == 27 || result.paymentmethod == 28 || result.paymentmethod == 29
|| result.paymentmethod == 45 || result.paymentmethod == 46
|| result.paymentmethod == 47 || result.paymentmethod == 48 || result.paymentmethod == 49 || result.paymentmethod == 50 || result.paymentmethod == 51 || result.paymentmethod == 52 || result.paymentmethod == 53 || result.paymentmethod == 54 || result.paymentmethod == 55 || result.paymentmethod == 56 || result.paymentmethod == 57 || result.paymentmethod == 58 || result.paymentmethod == 59 || result.paymentmethod == 60 || result.paymentmethod == 61 || result.paymentmethod == 62 || result.paymentmethod == 66 || result.paymentmethod == 31 || result.paymentmethod == 34 || result.paymentmethod == 36 || result.paymentmethod == 37 || result.paymentmethod == 38 || result.paymentmethod == 65 || result.paymentmethod == 39 || result.paymentmethod == 40 || result.paymentmethod == 41 || result.paymentmethod == 42 || result.paymentmethod == 43 || result.paymentmethod == 44 || result.paymentmethod == 35 || result.paymentmethod == 67 || result.paymentmethod == 68 || result.paymentmethod == 69 || result.paymentmethod == 70 || result.paymentmethod == 71 || result.paymentmethod == 72 || result.paymentmethod == 73 || result.paymentmethod == 74 || result.paymentmethod == 75 || result.paymentmethod == 76 || result.paymentmethod == 77 )
|| result.paymentmethod == 47 || result.paymentmethod == 48 || result.paymentmethod == 49 || result.paymentmethod == 50 || result.paymentmethod == 51 || result.paymentmethod == 52 || result.paymentmethod == 53 || result.paymentmethod == 54 || result.paymentmethod == 55 || result.paymentmethod == 56 || result.paymentmethod == 57 || result.paymentmethod == 58 || result.paymentmethod == 59 || result.paymentmethod == 60 || result.paymentmethod == 61 || result.paymentmethod == 62 || result.paymentmethod == 66 || result.paymentmethod == 31 || result.paymentmethod == 34 || result.paymentmethod == 36 || result.paymentmethod == 37 || result.paymentmethod == 38 || result.paymentmethod == 65 || result.paymentmethod == 39 || result.paymentmethod == 40 || result.paymentmethod == 41 || result.paymentmethod == 42 || result.paymentmethod == 43 || result.paymentmethod == 44 || result.paymentmethod == 35 || result.paymentmethod == 67 || result.paymentmethod == 68 || result.paymentmethod == 69 || result.paymentmethod == 70 || result.paymentmethod == 71 || result.paymentmethod == 72 || result.paymentmethod == 73 || result.paymentmethod == 74 || result.paymentmethod == 75 || result.paymentmethod == 76 || result.paymentmethod == 77 || result.paymentmethod == 79 )
{
$('is_external_finalize_transaction').value = 1;
@@ -1797,6 +1797,16 @@ function OnGetFinalPriceSuccess( result )
$('col_right_review_payment_tips_info_text').innerHTML = 'Complete your purchase through the BoaCompra website by signing in and completing your transaction.<br/><br/>This process can take up to a few business days depending on when you complete payment. Once you have approved payment, you will receive an email receipt confirming your purchase.';
}
}
else if ( method.value == 'bitcoin' )
{
$('purchase_bottom_note_paypalgc').innerHTML = 'Bitcoin transactions are authorized through the BitPay website. Click the button below to open a new web browser to initiate the transaction.';
$('purchase_button_bottom_text').innerHTML = 'Continue to BitPay';
if ( $('col_right_review_payment_tips_header_text') && $('col_right_review_payment_tips_info_text') )
{
$('col_right_review_payment_tips_header_text').innerHTML = 'Tips for Bitcoin customers';
$('col_right_review_payment_tips_info_text').innerHTML = 'Make sure that you confirm your purchase on the BitPay website. After completing payment, please click the "Continue to Valve" button and allow the transaction to process.<br/><br/>This process can take up to 60 seconds. To avoid purchasing failures, please do not hit your back button or close the bitpay window before the process is complete.';
}
}
}
else
{
@@ -2583,6 +2593,13 @@ function UpdatePaymentInfoForm()
bShowPaymentSpecificNote = true;
$('payment_method_specific_note').innerHTML = '* Note: Your bank or payment processor may charge an additional service fee for using this payment method';
}
else if ( method.value == 'bitcoin' )
{
bShowAddressForm = false || $('billing_country').value == 'US';
bShowCountryVerification = $('billing_country').value != 'US';
bShowPaymentSpecificNote = true;
$('payment_method_specific_note').innerHTML = '* Note: Any approved refunds for purchases made with Bitcoin can only be credited to your Steam wallet';
}
else if ( method.value == 'steamaccount' )
{
bShowAddressForm = false;
@@ -2602,7 +2619,6 @@ function UpdatePaymentInfoForm()
bDisabledPaymentMethod = true;
$('payment_method_specific_note').innerHTML = '* Note: We are temporarily unable to process transactions with this payment method at this time. We apologize for the inconvenience.';
}
if ( g_bIsInOverlay && method.value == 'alipay' )
{
@@ -2939,34 +2955,25 @@ function SubmitPaymentInfoForm()
rgBadFields.expiration_year_trigger = true;
}
}
if ( method.value == 'giropay' || method.value == 'ideal' || method.value == 'paysafe' || method.value == 'sofort' || method.value == 'webmoney' || method.value == 'moneybookers'
|| method.value == 'alipay' || method.value == 'unionpay' || method.value == 'yandex' || method.value == 'mopay' || method.value == 'boleto' || method.value == 'boacompragold'
|| method.value == 'bancodobrasilonline' || method.value == 'itauonline' || method.value == 'bradescoonline' || method.value == 'pagseguro' || method.value == 'visabrazil'
|| method.value == 'amexbrazil' || method.value == 'aura' || method.value == 'hipercard' || method.value == 'mastercardbrazil' || method.value == 'dinerscardbrazil'
|| method.value == 'multibanco' || method.value == 'payshop' || method.value == 'maestroboacompra'
|| method.value == 'oxxo' || method.value == 'toditocash' || method.value == 'carnet'
|| method.value == 'spei' || method.value == '3pay' || method.value == 'isbank'
|| method.value == 'garanti' || method.value == 'akbank' || method.value == 'yapikredi'
|| method.value == 'halkbank' || method.value == 'bankasya' || method.value == 'finansbank'
|| method.value == 'denizbank' || method.value == 'ptt' || method.value == 'cashu'
|| method.value == 'onecard'
|| method.value == 'molpoints' || method.value == 'beeline' || method.value == 'konbini' || method.value == 'eclubpoints' || method.value == 'credit_card_japan'
|| method.value == 'bank_transfer_japan' || method.value == 'payeasy' || method.value == 'webmoney_japan'
|| ( method.value == 'paypal' && g_bSkipAddressRequirementForPayPal ) || ( method.value == 'updatepaypal' && g_bSkipAddressRequirementForPayPal ) || method.value == 'storedpaypal'
|| method.value == 'zong' || method.value == 'culturevoucher' || method.value == 'bookvoucher' || method.value == 'happymoneyvoucher' || method.value == 'convenientstorevoucher'
|| method.value == 'gamevoucher'
|| method.value == 'pse' || method.value == 'exito' || method.value == 'efecty' || method.value == 'baloto'
|| method.value == 'pinvalidda' || method.value == 'mangirkart' || method.value == 'bancocreditodeperu' || method.value == 'bbvacontinental'
|| method.value == 'safetypay' || method.value == 'pagoefectivo' || method.value == 'trustly'
)
if ( $('payment_row_country_verification').visible() )
{
if ( !$('verify_country_only').checked )
{
errorString += 'Please verify your country selected below.<br/>';
rgBadFields.verify_country_only_label = true;
}
}
if ( $('verify_country').visible() )
{
if ( !$( 'verify_country' ).checked )
{
errorString += 'Please verify your country selected below.<br/>';
rgBadFields.label_verify_country = true;
}
}
if ( method.value == 'qiwi' )
{
// Expect 10 digits, we'll make sure we at least have that many digits
@@ -3088,12 +3095,6 @@ function SubmitPaymentInfoForm()
errorString += 'Please enter your zip or postal code.<br/>';
rgBadFields.billing_postal_code = true;
}
if ( !$( 'verify_country' ).checked )
{
errorString += 'Please verify your country selected below.<br/>';
rgBadFields.label_verify_country = true;
}
}
if ( method.value == 'giropay' )
@@ -3665,6 +3666,11 @@ function UpdateReviewPageBillingInfoWithCurrentValues( price_data )
$('payment_method_review_text').innerHTML = 'Trustly';
$('checkout_review_payment_info_area').style.display = 'none';
}
else if ( method.value == 'bitcoin' && providerPaymentMethod == 79 )
{
$('payment_method_review_text').innerHTML = 'Bitcoin';
$('checkout_review_payment_info_area').style.display = 'none';
}
}
$('review_address_body').innerText = $('first_name').value+' '+$('last_name').value;
@@ -4079,6 +4085,7 @@ function HandleFinalizeTransactionFailure( ePaymentType, eErrorDetail, bShowBRSp
case 76:
case 77:
case 78:
case 79:
default:
{
switch ( eErrorDetail )
@@ -4329,6 +4336,12 @@ function DisplayPendingReceiptPage()
$('pending_purchase_summary_payment_method_notes_text').innerHTML = 'For questions regarding your payment processing status, please contact <a href="https://www.eclubstore.com">eClub Store</a>.';
$('pending_purchase_summary_payment_method_notes').style.display = 'block';
break;
case 'bitcoin':
$('pending_purchase_summary_payment_method_description').innerHTML = 'Your purchase is currently in progress and is waiting for confirmation of Bitcoin delivery from BitPay. This process can take several minutes to a few days for confirmation. Valve will send an email receipt to you when payment is received for this purchase. During this time you may continue shopping for other games, though you will not be able to re-purchase any products that are pending in this transaction.';
$('pending_purchase_summary_payment_method_notes_text').innerHTML = 'For questions regarding your payment processing status, please contact <a href="https://bitpay.com/">BitPay</a>.';
$('pending_purchase_summary_payment_method_notes').style.display = 'block';
break;
default:
$('pending_purchase_summary_payment_method_notes').style.display = 'none';
@@ -4464,7 +4477,8 @@ function PollForTransactionStatus( txnid, retries, timeout )
}
var bNeedsApproval = (result.success == 22 && result.purchaseresultdetail == 29);
if ( result.success == 22 && !bNeedsApproval )
var bPurchaseResultDelayed = (result.success == 22 && result.purchaseresultdetail == 66);
if ( result.success == 22 && !bNeedsApproval && !bPurchaseResultDelayed )
{
g_timeoutPoll = setTimeout( NewPollForTransactionStatusClosure( txnid, retries-1, timeout ), timeout*1000 );
return;
@@ -4479,6 +4493,10 @@ function PollForTransactionStatus( txnid, retries, timeout )
OnPurchaseSuccess( result );
return;
}
else if ( bPurchaseResultDelayed )
{
DisplayPendingReceiptPage();
}
else
{
var ePaymentMethod = 2;
Oops, something went wrong.

0 comments on commit 6692494

Please sign in to comment.