From 01e902e50902b65b57cbae6c3aab2851f9bfddc6 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 21 Sep 2024 03:15:26 +0000 Subject: [PATCH] Update content of files --- data/web/fragment.com/css/auction.css | 8 ++ data/web/fragment.com/js/auction.js | 157 +------------------------- 2 files changed, 9 insertions(+), 156 deletions(-) diff --git a/data/web/fragment.com/css/auction.css b/data/web/fragment.com/css/auction.css index 528cb14fc2..fd99cb87b9 100644 --- a/data/web/fragment.com/css/auction.css +++ b/data/web/fragment.com/css/auction.css @@ -1658,6 +1658,14 @@ a.tm-menu-link:focus { margin-right: 4px; } +.icon-gw-credits:before { + content: '$'; + font-size: 15px; + font-weight: bold; + text-align: center; + color: #fff; +} + .tm-section { padding: 0 10px 5px; } diff --git a/data/web/fragment.com/js/auction.js b/data/web/fragment.com/js/auction.js index 5498409e47..dd5664eda0 100644 --- a/data/web/fragment.com/js/auction.js +++ b/data/web/fragment.com/js/auction.js @@ -2930,7 +2930,7 @@ var Stars = { updateOptions: function(html) { var $form = Aj.state.$starsSearchForm; var stars = $form.field('stars').value(); - $('.js-stars-options').replaceWith(html); + $('.js-premium-options').replaceWith(html); $form.field('stars').value(stars); }, eBuyStars: function(e) { @@ -3112,161 +3112,6 @@ var Stars = { } }; -var Gateway = { - init: function() { - Aj.onLoad(function(state) { - var cont = Aj.ajContainer; - $(cont).on('click.curPage', '.js-howtopay-ton', Ads.eHowToPayTon); - state.$howToPayTonPopup = $('.js-how-to-pay-ton-popup'); - - $(cont).on('click.curPage', '.js-more-funds-btn', Gateway.eAddMoreFunds); - $(cont).on('click.curPage', '.js-recharge-btn', Gateway.eRechargeAccount); - state.$rechargeForm = $('.js-recharge-form', cont); - Main.initForm(state.$rechargeForm); - state.$rechargeForm.on('submit', Gateway.eAmountChanged); - state.$curPrice = $('.js-cur-price', cont); - - state.$amountField = $('.js-credits-quantity-field'); - $(cont).on('click.curPage', '.js-quantity-clear', Gateway.eQuantityClear); - state.$rechargeForm.field('credits').on('change', Gateway.eAmountChanged); - state.updLastReq = +Date.now(); - if (state.needUpdate) { - state.updStateTo = setTimeout(Gateway.updateState, Main.UPDATE_PERIOD); - } - }); - Aj.onUnload(function(state) { - clearTimeout(state.updStateTo); - state.needUpdate = false; - Main.destroyForm(state.$rechargeForm); - state.$rechargeForm.field('credits').off('change', Gateway.eAmountChanged); - }); - }, - eHowToPayTon: function(e) { - e.preventDefault(); - e.stopImmediatePropagation(); - Main.openSimplePopup(Aj.state.$howToPayTonPopup); - }, - updateState: function(force) { - var now = +Date.now(); - if (document.hasFocus() || force || - Aj.state.updLastReq && (now - Aj.state.updLastReq) > Main.FORCE_UPDATE_PERIOD) { - var $form = Aj.state.$rechargeForm; - var account = $form.field('account').value(); - var credits = Main.amountFieldValue($form, 'credits'); - Aj.state.updLastReq = now; - Aj.apiRequest('updateGatewayRechargeState', { - mode: Aj.state.mode, - account: account, - credits: credits - }, function(result) { - if (result.mode) { - Aj.state.mode = result.mode; - } - if (result.html) { - Gateway.updateContent(result.html); - } - if (result.cur_price) { - Aj.state.$curPrice.html(result.cur_price); - } - if (Aj.state.needUpdate && result.need_update) { - Aj.state.updStateTo = setTimeout(Gateway.updateState, Main.UPDATE_PERIOD); - } - }); - } else { - if (Aj.state.needUpdate) { - Aj.state.updStateTo = setTimeout(Gateway.updateState, Main.CHECK_PERIOD); - } - } - }, - eQuantityClear: function() { - Gateway.clearQuantity(true); - }, - clearQuantity: function(need_focus) { - var $form = Aj.state.$rechargeForm; - var $field = $form.field('credits'); - $field.value(''); - if (need_focus) { - $field.focus(); - } - Aj.state.$curPrice.html(''); - Gateway.updateButton(); - }, - eAmountChanged: function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - var $form = Aj.state.$rechargeForm; - var account = $form.field('account').value(); - var credits = +$form.field('credits').value(); - Aj.state.$curPrice.html(''); - Aj.state.$amountField.addClass('loading').removeClass('play').redraw().addClass('play'); - Aj.apiRequest('updateGatewayPrices', { - account: account, - credits: credits - }, function(result) { - Aj.state.$amountField.removeClass('loading'); - if (result.error) { - return showAlert(result.error); - } - Aj.state.$curPrice.html(result.cur_price); - Gateway.updateButton(); - }); - }, - updateButton: function() { - }, - eRechargeAccount: function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - var $form = Aj.state.$rechargeForm; - var account = $form.field('account').value(); - var credits = Main.amountFieldValue($form, 'credits'); - if (credits === false || credits <= 0) { - $form.field('credits').focus(); - return; - } - Aj.apiRequest('initGatewayRechargeRequest', { - account: account, - credits: credits - }, function(result) { - if (result.error) { - return showAlert(result.error); - } - Wallet.sendTransaction({ - request: { - method: 'getGatewayRechargeLink', - params: { - id: result.req_id - } - }, - title: l('WEB_POPUP_QR_GATEWAY_HEADER'), - description: l('WEB_POPUP_QR_GATEWAY_TEXT', { - amount: '' + result.amount + '' - }), - qr_label: result.item_title, - tk_label: l('WEB_POPUP_QR_GATEWAY_TK_BUTTON'), - terms_label: l('WEB_POPUP_QR_PROCEED_TERMS'), - onConfirm: function(by_server) { - Gateway.updateState(true); - } - }); - Aj.state.needUpdate = true; - }); - }, - eAddMoreFunds: function(e) { - e.preventDefault(); - e.stopImmediatePropagation(); - var href = this.href; - Aj.apiRequest('repeatGatewayAddFunds', {}, function(result) { - if (result.error) { - return showAlert(result.error); - } - Aj.location(href); - }); - }, - updateContent: function(html) { - $('.js-main-content').html(html); - } -}; - var QR = { showPopup: function(options) { options = $.extend({