diff --git a/data/web/corefork.telegram.org/constructor/updates.html b/data/web/corefork.telegram.org/constructor/updates.html index 0bbd97ab74..49617e3c57 100644 --- a/data/web/corefork.telegram.org/constructor/updates.html +++ b/data/web/corefork.telegram.org/constructor/updates.html @@ -39,23 +39,11 @@
- +

Updates

Full constructor of updates

-

- -
-
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;

+

{schema}

Parameters

diff --git a/data/web/fragment.com/css/auction.css b/data/web/fragment.com/css/auction.css index 38dbfe5120..279409652c 100644 --- a/data/web/fragment.com/css/auction.css +++ b/data/web/fragment.com/css/auction.css @@ -293,12 +293,6 @@ i.icon { .tm-main-form-group { margin-bottom: 20px; } -.tm-main-form-link-wrap { - font-size: 15px; - line-height: 19px; - margin-top: 30px; - text-align: center; -} .tm-form-radio-item { display: block; position: relative; @@ -322,7 +316,6 @@ i.icon { box-shadow: 0 0 0 0px var(--accent-color); transition: box-shadow var(--def-transition); color: var(--field-color); - white-space: nowrap; position: relative; overflow: hidden; } @@ -377,14 +370,6 @@ i.icon { color: var(--dropdown-secondary-color); width: 70px; } -.tm-form-radio-label .tm-quantity { - width: 60px; - font-weight: normal; - color: var(--dropdown-secondary-color); -} -.tm-form-radio-label .tm-quantity ~ .tm-value { - width: 80px; -} .tm-form-checkbox-item { display: inline-block; @@ -641,13 +626,10 @@ i.icon { left: 0; width: 100%; } -.tm-button-label { - max-width: 100%; - text-overflow: ellipsis; - overflow: hidden; -} .tm-button-label.opt-fixed-width { max-width: 100px; + text-overflow: ellipsis; + overflow: hidden; } .icon-connect-telegram { width: 17px; @@ -1258,7 +1240,7 @@ a.tm-menu-link:focus { max-width: 164px; margin: 10px 0 10px auto; } -.tm-field { +.tm-search-field { border-radius: var(--def-border-radius); background: var(--field-bg-color); position: relative; @@ -1269,7 +1251,7 @@ a.tm-menu-link:focus { pointer-events: none; } .tm-main-search-form .tm-search-field:before { - margin: 12px 15px 12px 19px; + margin: 12px 16px; } .tm-search-input { height: auto; @@ -1282,14 +1264,10 @@ a.tm-menu-link:focus { color: var(--field-color); text-overflow: ellipsis; } -.tm-main-search-form .tm-input, +.tm-main-search-form .tm-search-input, .tm-main-search-form .tm-search-prefix { font-size: 14px; line-height: 18px; - padding: 12px 19px; -} -.tm-main-search-form .tm-search-input, -.tm-main-search-form .tm-search-prefix { padding: 12px 42px 12px 48px; } .tm-main-search-form .tm-search-prefix { @@ -1330,7 +1308,7 @@ a.tm-menu-link:focus { position: absolute; left: 0; top: 0; - margin: 11px 12px 11px 16px; + margin: 11px 14px; width: 20px; height: 20px; } @@ -1428,8 +1406,7 @@ a.tm-menu-link:focus { visibility: visible; opacity: 1; } -.loading .tm-search-clear, -.loading .tm-search-rlabel { +.loading .tm-search-clear { visibility: hidden; opacity: 0; } @@ -2964,6 +2941,7 @@ a.tm-table-action-link:hover { .tm-gift-premium-preview .preview-sender-text { font-size: 13px; line-height: 19px; + color: var(--text-color); } .tm-gift-premium-preview .preview-sticker, .tm-gift-premium-preview-sent .preview-sticker { @@ -2997,10 +2975,6 @@ a.tm-table-action-link:hover { font-size: 13px; line-height: 20px; } -.tm-gift-premium-preview + .popup-text { - margin-top: 19px; -} -.tm-giveaway-whats-next, .tm-gift-premium-preview-sent { width: 348px; max-width: 100%; @@ -3011,10 +2985,6 @@ a.tm-table-action-link:hover { color: var(--field-color); text-align: center; } -.tm-giveaway-whats-next { - padding: 24px; - text-align: left; -} .tm-gift-premium-preview-sent .preview-sticker { width: 164px; height: 164px; @@ -3030,70 +3000,6 @@ a.tm-table-action-link:hover { line-height: 23px; margin: 3px 0 0; } -.tm-giveaway-whats-next .whats-next-header { - font-size: 15px; - line-height: 18px; - font-weight: bold; - color: var(--accent-color); - margin: 0; -} -.tm-giveaway-whats-next .whats-next-list { - font-size: 15px; - line-height: 23px; - margin: 8px 0 0; - padding-left: 35px; - list-style: none; - list-style-image: none; - counter-reset: list; -} -.tm-giveaway-whats-next .whats-next-item { - position: relative; - margin: 15px 0 0; -} -.tm-giveaway-whats-next .whats-next-item:before { - position: absolute; - left: -35px; - display: inline-block; - width: 19px; - height: 19px; - border-radius: 50%; - font-size: 12px; - line-height: 15px; - text-align: center; - padding: 2px 0; - margin: 2px 0; - background-color: var(--field-accent-color); - counter-increment: list; - content: counter(list); -} -.tm-giveaway-whats-next .whats-next-item:before { - position: absolute; - left: -35px; - display: inline-block; - width: 19px; - height: 19px; - border-radius: 50%; - font-size: 12px; - line-height: 15px; - font-weight: bold; - text-align: center; - padding: 2px 0; - margin: 2px 0; - background-color: var(--field-accent-color); - counter-increment: list; - content: counter(list); -} -.tm-giveaway-whats-next .whats-next-item .icon-app-more { - margin: 0 2px; -} -.icon-app-more:before { - display: inline-block; - width: 26px; - height: 26px; - vertical-align: top; - margin-bottom: -3px; - background-image: var(--image-url-app-more-icon); -} .tm-main-box-processing { width: 348px; max-width: 100%; @@ -3133,88 +3039,6 @@ a.tm-table-action-link:hover { margin-top: 10px; } -.tm-main-premium-intro { - padding: 42px 0; -} -.tm-main-premium-options { - display: flex; - flex-direction: row; - justify-content: center; - flex-wrap: wrap; -} -.tm-main-premium-option { - position: relative; - width: 300px; - max-width: 100%; - border-radius: 16px; - background-color: var(--field-bg-color); - padding: 15px 30px; - margin: 0 15px 15px; - text-align: center; -} -.tm-premium-opt-icon { - display: inline-block; - width: 200px; - height: 125px; - vertical-align: top; - background-position: 0 0; - background-repeat: no-repeat; -} -.tm-premium-opt-icon-gift { - background-image: var(--image-url-premium-opt-gift-icon); -} -.tm-premium-opt-icon-giveaway { - background-image: var(--image-url-premium-opt-giveaway-icon); -} -.tm-main-premium-option .tm-label-new { - position: absolute; - right: 0; - top: 0; - font-size: 12px; - line-height: 16px; - padding: 2px 7px; - margin: 14px; -} -.tm-main-premium-option-head { - font-size: 22px; - line-height: 30px; - font-weight: bold; - margin-top: 4px; - color: var(--field-color); -} -.tm-main-premium-option-text { - font-size: 15px; - line-height: 22px; - margin-top: 8px; - color: var(--text-color); -} -.tm-main-premium-option-button { - margin: 30px 0 21px; -} -.tm-premium-boost-label { - position: absolute; - top: 0; - right: 0; - display: inline-block; - font-size: 14px; - line-height: 18px; - padding: 3px 6px; - margin: 9px 10px; - font-weight: bold; - background-color: #9f53ff; - color: #fff; - border-radius: 6px; -} -.icon-boost:before { - width: 11px; - height: 18px; - vertical-align: top; - background-image: var(--image-url-boost-icon); -} -.tm-premium-boost-label.icon-boost:before { - margin-right: 4px; -} - .processing-popup-container .popup-body { width: 348px; max-width: 100%; @@ -3568,14 +3392,10 @@ a.tm-table-action-link:hover { .tm-search-field:before { margin: 8px 12px; } - .tm-main-search-form .tm-input, + .tm-main-search-form .tm-search-input, .tm-main-search-form .tm-search-prefix { font-size: 17px; line-height: 24px; - padding: 14px 19px 16px; - } - .tm-main-search-form .tm-search-input, - .tm-main-search-form .tm-search-prefix { padding: 14px 54px 16px 66px; } .tm-main-search-form .tm-search-prefix { @@ -3595,18 +3415,8 @@ a.tm-table-action-link:hover { width: 22px; height: 22px; } - .tm-main-premium .tm-main-search-form .icon-search:before { - width: 17px; - height: 20px; - margin: 14px 16px 16px 20px; - } - .tm-main-premium .tm-main-search-form .tm-input { + .tm-main-premium .tm-main-search-form .tm-search-input { font-size: 15px; - padding: 12px 19px; - } - .tm-main-premium .tm-main-search-form .tm-search-input, - .tm-main-premium .tm-main-search-form .tm-search-prefix { - padding: 12px 54px 12px 52px; } .tm-main-form-group { margin-bottom: 28px; @@ -3622,26 +3432,14 @@ a.tm-table-action-link:hover { .tm-search-clear { padding: 16px; } - .tm-main-premium .tm-main-search-form .tm-search-loading, - .tm-main-premium .tm-main-search-form .tm-search-clear { - padding: 13px; - } .tm-search-error-icon { margin: 17px 19px; } - .tm-main-premium .tm-main-search-form .tm-search-error-icon { - margin: 14px 14px 14px 18px; - } .tm-search-field-photo { margin: 9px 14px; width: 36px; height: 36px; } - .tm-main-premium .tm-search-field-photo { - margin: 10px 14px; - width: 28px; - height: 28px; - } .icon-ton:before { width: 15px; @@ -3911,17 +3709,10 @@ a.tm-table-action-link:hover { padding: 0 8px; } - .tm-premium-boost-label { - margin: 12px; - } - .tm-main-box-processing { margin: 50px auto 0; } - .tm-form-radio-label .tm-quantity { - width: 110px; - } .tm-form-radio-label .tm-value { width: 90px; } @@ -4023,12 +3814,4 @@ a.tm-table-action-link:hover { --image-url-row-arrow: url('data:image/svg+xml,%3Csvg%20height%3D%2217%22%20viewBox%3D%220%200%2011%2017%22%20width%3D%2211%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m3%2014%205.15-5.11c.19-.2.19-.52%200-.71l-5.15-5.18%22%20fill%3D%22none%22%20stroke%3D%22%235b6975%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E'); --image-url-list-item-selected-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2225%22%20viewBox%3D%220%200%2025%2025%22%20width%3D%2225%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m6%2013.44%204.3%204.3c.2.2.52.2.71%200l8.74-8.74%22%20fill%3D%22none%22%20stroke%3D%22%234db2ff%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%222.2%22%2F%3E%3C%2Fsvg%3E'); - - --image-url-premium-opt-gift-icon: url('data:image/svg+xml,%3Csvg%20height%3D%22125%22%20viewBox%3D%220%200%20200%20125%22%20width%3D%22200%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23219cfb%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20transform%3D%22translate%2817.0021%2011.2592%29%22%3E%3Cpath%20d%3D%22m124.562592%2020.89623-2.788821%202.1183585c-.260323.1977383-.631655.1470037-.829393-.1133191-.16075-.2116267-.16075-.5044472%200-.7160739l2.118358-2.7888211c.296811-.3907523.296829-.9314178.000045-1.3221901l-2.117535-2.7881272c-.197772-.2604041-.146999-.6318295.113405-.8296019.211669-.1607591.504528-.1607591.716197%200l2.788128%202.1175342c.390772.2967848.931437.2967665%201.32219-.0000447l2.788821-2.1183585c.260323-.1977383.631654-.1470036.829393.1133191.160749.2116267.160749.5044472%200%20.7160739l-2.118359%202.7888211c-.296811.3907523-.296829.9314178-.000044%201.3221901l2.117534%202.7881272c.197772.2604041.146999.6318296-.113405.8296019-.211669.1607591-.504528.1607591-.716197%200l-2.788127-2.1175342c-.390773-.2967848-.931438-.2967665-1.32219.0000447z%22%20opacity%3D%22.406581%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2049.924947%20-83.059285%29%22%2F%3E%3Cpath%20d%3D%22m36.1055855%2076.3361027-2.7888211%202.1183585c-.2603228.1977383-.6316547.1470037-.829393-.1133191-.1607493-.2116267-.1607493-.5044472%200-.7160739l2.1183585-2.7888211c.2968112-.3907523.2968295-.9314178.0000446-1.3221901l-2.1175342-2.7881272c-.1977724-.2604041-.1469993-.6318295.1134048-.8296019.2116691-.1607591.504528-.1607591.7161972%200l2.7881272%202.1175342c.3907723.2967848.9314378.2967665%201.3221901-.0000447l2.7888211-2.1183585c.2603227-.1977383.6316546-.1470036.829393.1133191.1607493.2116267.1607493.5044472%200%20.7160739l-2.1183585%202.7888211c-.2968112.3907523-.2968295.9314178-.0000447%201.3221901l2.1175342%202.7881272c.1977724.2604041.1469994.6318296-.1134047.829602-.2116692.160759-.504528.160759-.7161972%200l-2.7881272-2.1175343c-.3907724-.2967848-.9314378-.2967665-1.3221901.0000447z%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2063.218421%20-4.27277%29%22%2F%3E%3Cpath%20d%3D%22m45.6646266%2017.5466051-2.7888212%202.1183585c-.2603227.1977383-.6316546.1470036-.8293929-.1133191-.1607494-.2116267-.1607494-.5044472%200-.7160739l2.1183584-2.7888211c.2968113-.3907523.2968295-.9314178.0000447-1.3221901l-2.1175342-2.7881272c-.1977724-.2604041-.1469994-.6318296.1134047-.829602.2116692-.160759.5045281-.160759.7161972%200l2.7881272%202.1175343c.3907724.2967848.9314378.2967665%201.3221901-.0000447l2.7888212-2.1183585c.2603227-.1977383.6316546-.1470037.8293929.1133191.1607494.2116267.1607494.5044472%200%20.7160739l-2.1183584%202.7888211c-.2968113.3907523-.2968295.9314177-.0000447%201.3221901l2.1175342%202.7881272c.1977724.2604041.1469993.6318295-.1134048.8296019-.2116691.1607591-.504528.1607591-.7161971%200l-2.7881272-2.1175342c-.3907724-.2967848-.9314378-.2967665-1.3221901.0000447z%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2024.447733%20-28.251049%29%22%2F%3E%3Cpath%20d%3D%22m148.562592%2048.5241-2.788821%202.1183585c-.260323.1977383-.631655.1470036-.829393-.1133191-.16075-.2116267-.16075-.5044472%200-.7160739l2.118358-2.7888211c.296811-.3907523.296829-.9314178.000045-1.3221901l-2.117535-2.7881272c-.197772-.2604041-.146999-.6318296.113405-.829602.211669-.160759.504528-.160759.716197%200l2.788128%202.1175343c.390772.2967848.931437.2967665%201.32219-.0000447l2.788821-2.1183585c.260323-.1977383.631654-.1470037.829393.1133191.160749.2116267.160749.5044472%200%20.7160739l-2.118359%202.7888211c-.296811.3907523-.296829.9314177-.000044%201.3221901l2.117534%202.7881272c.197772.2604041.146999.6318295-.113405.8296019-.211669.1607591-.504528.1607591-.716197%200l-2.788127-2.1175342c-.390773-.2967848-.931438-.2967665-1.32219.0000447z%22%20opacity%3D%22.337378%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2076.49026%20-91.937823%29%22%2F%3E%3Cpath%20d%3D%22m98.9917581%20100.549938-2.0420863%201.551146c-.1886395.143289-.4577203.106525-.6010088-.082115-.1164849-.153352-.1164849-.365541%200-.518893l1.5511468-2.0420866c.2055603-.2706205.205573-.6450651.0000309-.9156994l-1.550548-2.0415846c-.1433132-.1886985-.1065212-.457847.0821772-.6011602.1533833-.1164919.3655996-.1164919.5189829%200l2.0415846%201.550548c.2706343.2055421.645079.2055295.9156994-.0000309l2.0420862-1.5511468c.18864-.1432885.45772-.1065242.601009.0821152.116485.1533525.116485.3655411%200%20.5188936l-1.551147%202.0420863c-.20556.2706205-.205573.6450651-.000031.9156994l1.550548%202.041585c.143313.188698.106521.457847-.082177.60116-.153383.116492-.3656.116492-.518983%200l-2.0415845-1.550548c-.2706343-.205542-.645079-.20553-.9156994.000031z%22%20opacity%3D%22.337378%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2099.131714%20-41.325129%29%22%2F%3E%3Cpath%20d%3D%22m78.6259012%2089.5874279-1.4262067%201.0833312c-.1320477.100302-.3204042.074567-.4207062-.0574806-.0815394-.1073468-.0815394-.2558788%200-.3632255l1.0833313-1.4262067c.1453531-.1913575.145362-.4561299.0000218-.6474973l-1.0829123-1.4258552c-.1003192-.1320889-.0745648-.3204929.0575241-.4208122.1073683-.0815443.2559197-.0815443.363288%200l1.4258553%201.0829124c.1913674.1453402.4561397.1453312.6474973-.0000219l1.4262067-1.0833312c.1320476-.100302.3204041-.074567.4207061.0574806.0815394.1073468.0815394.2558788%200%20.3632255l-1.0833312%201.4262067c-.1453532.1913575-.1453621.4561299-.0000219.6474973l1.0829123%201.4258552c.1003192.1320889.0745648.3204929-.0575241.4208122-.1073683.0815443-.2559197.0815443-.363288%200l-1.4258553-1.0829124c-.1913673-.1453402-.4561397-.1453312-.6474972.0000219z%22%20opacity%3D%22.337378%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2085.702782%20-29.904818%29%22%2F%3E%3Cpath%20d%3D%22m4.62590116%2057.5874279-1.42620669%201.0833312c-.13204762.100302-.32040417.074567-.42070613-.0574806-.08153943-.1073468-.08153943-.2558788%200-.3632255l1.08333122-1.4262067c.14535313-.1913575.14536207-.4561299.00002189-.6474973l-1.08291234-1.4258552c-.10031922-.1320889-.07456481-.3204929.05752408-.4208122.1073683-.0815443.25591973-.0815443.36328804%200l1.42585529%201.0829124c.19136736.1453402.45613972.1453312.64749726-.0000219l1.42620668-1.0833312c.13204763-.100302.32040418-.074567.42070613.0574806.08153944.1073468.08153944.2558788%200%20.3632255l-1.08333122%201.4262067c-.14535312.1913575-.14536207.4561299-.00002188.6474973l1.08291234%201.4258552c.10031922.1320889.07456481.3204929-.05752408.4208122-.10736831.0815443-.25591974.0815443-.36328804%200l-1.42585529-1.0829124c-.19136736-.1453402-.45613972-.1453312-.64749726.0000219z%22%20opacity%3D%22.337378%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2041.401267%2013.0485%29%22%2F%3E%3Cpath%20d%3D%22m22.7262677%2037.0850666-2.2301396%201.6939899c-.2082582.1581907-.5053237.117603-.6635143-.0906552-.1285995-.1693014-.1285995-.4035578%200-.5728591l1.6939899-2.2301396c.2378609-.3131441.2378755-.7464267.0000358-1.0595868l-1.6933306-2.2295844c-.1582179-.2083233-.1175995-.5054636.0907238-.6636815.1693353-.1286073.4036224-.1286073.5729578%200l2.2295843%201.6933306c.3131602.2378397.7464428.237825%201.0595869-.0000358l2.2301395-1.69399c.2082582-.1581906.5053237-.1176029.6635144.0906553.1285995.1693013.1285995.4035578%200%20.5728591l-1.69399%202.2301395c-.2378608.3131441-.2378755.7464268-.0000358%201.0595869l1.6933306%202.2295844c.1582179.2083232.1175995.5054636-.0907238.6636815-.1693353.1286072-.4036224.1286072-.5729577%200l-2.2295844-1.6933306c-.3131601-.2378397-.7464427-.2378251-1.0595868.0000358z%22%20opacity%3D%22.351327%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2031.811697%20-6.089231%29%22%2F%3E%3Cpath%20d%3D%22m128.043393%2069.5360782-2.23014%201.6939899c-.208258.1581907-.505323.1176029-.663514-.0906553-.1286-.1693013-.1286-.4035577%200-.5728591l1.69399-2.2301395c.237861-.3131441.237875-.7464267.000036-1.0595869l-1.693331-2.2295843c-.158218-.2083233-.1176-.5054636.090724-.6636816.169335-.1286072.403622-.1286072.572958%200l2.229584%201.6933306c.31316.2378398.746443.2378251%201.059587-.0000358l2.230139-1.6939899c.208258-.1581907.505324-.1176029.663515.0906553.128599.1693013.128599.4035577%200%20.5728591l-1.69399%202.2301395c-.237861.3131441-.237876.7464267-.000036%201.0595869l1.69333%202.2295843c.158218.2083233.1176.5054636-.090723.6636816-.169336.1286072-.403623.1286072-.572958%200l-2.229584-1.6933306c-.313161-.2378397-.746443-.2378251-1.059587.0000358z%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2085.604684%20-71.054988%29%22%2F%3E%3Cpath%20d%3D%22m97.0433927%209.53607816-2.2301395%201.69398994c-.2082582.1581907-.5053237.1176029-.6635144-.0906553-.1285994-.1693013-.1285994-.4035577%200-.5728591l1.69399-2.23013951c.2378608-.31314408.2378755-.7464267.0000358-1.05958686l-1.6933306-2.22958435c-.1582179-.20832328-.1175995-.50546362.0907238-.66368153.1693353-.12860725.4036224-.12860725.5729577%200l2.2295844%201.6933306c.3131601.2378397.7464427.23782506%201.0595868-.00003581l2.2301393-1.69398994c.208258-.15819068.505324-.11760294.663515.09065525.128599.16930135.128599.40355778%200%20.57285912l-1.6939903%202.23013954c-.2378609.31314408-.2378755.7464267-.0000358%201.05958686l1.6933301%202.22958433c.158218.2083233.1176.5054636-.090723.6636816-.169336.1286072-.403623.1286072-.572958%200l-2.2295844-1.69333065c-.3131602-.2378397-.7464428-.23782506-1.0595869.00003581z%22%20transform%3D%22matrix%28.70710678%20.70710678%20-.70710678%20.70710678%2034.098587%20-66.708271%29%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22m87.6435784%2046.0734503%208.6589748-16.8994921c.9989344-1.9495936%203.4141504-2.7328464%205.3945358-1.749444.777476.386072%201.406429%201.0104476%201.792081%201.7790378l8.177582%2016.2976272c.668026%201.3313511%201.974031%202.240369%203.471761%202.4164472l17.124478%202.0132119c2.324769.2733078%203.984307%202.3501624%203.706683%204.6387847-.114339.9425667-.551672%201.8185971-1.239834%202.4835386l-13.535228%2013.0785162c-.54651.5280695-.811329%201.2769965-.716037%202.0250036l2.249355%2017.6566581c.322015%202.5277021-1.498412%204.8337951-4.066037%205.1508029-.973069.1201384-1.959902-.0633266-2.821449-.5245437l-14.300238-7.6554343c-1.034584-.5538502-2.2800684-.5697649-3.3289061-.0425364l-14.8160572%207.4477173c-2.0851797%201.0481756-4.6386866.2338004-5.7034171-1.818958-.398374-.7680492-.5452741-1.6387316-.4205006-2.492322l1.1841433-8.1008676c.5791696-3.9621692%203.0805908-7.3990749%206.7053485-9.2130228l16.4556812-8.234964c.439391-.2198854.614519-.7487959.391161-1.1813545-.173047-.3351252-.543504-.5247311-.921557-.4716686l-20.1252708%202.8247274c-3.0765074.4318101-6.196543-.4192394-8.6086134-2.3481642l-6.7032719-5.3605848c-1.9129047-1.5297437-2.2039318-4.2964503-.6500273-6.1796122.722617-.8757325%201.759794-1.4441869%202.8965835-1.5875549l17.1851828-2.1673378c1.1021999-.1390057%202.062446-.8075008%202.5628935-1.784211z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E'); - - --image-url-premium-opt-giveaway-icon: url('data:image/svg+xml,%3Csvg%20height%3D%22125%22%20viewBox%3D%220%200%20200%20125%22%20width%3D%22200%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23219cfb%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%2820.9866%2011.2379%29%22%3E%3Cpath%20d%3D%22m85.9948015%2015.5846151-29.4657005%2035.5272127c-.7910217.953746-.6591075%202.3681597.2946385%203.1591813.4026017.3339115.9092178.516663%201.4322714.516663h10.0111442c1.239091%200%202.2435728%201.0044818%202.2435728%202.2435728%200%20.1234315-.0101859.2466525-.0304541.3684085l-4.451025%2026.7383865c-.2034663%201.2222717.6224386%202.3780607%201.8447103%202.5815271.797049.1326813%201.6038749-.1734783%202.1122581-.8015213l29.5283484-36.4785318c.7796034-.9631016.6308494-2.3758434-.3322523-3.1554472-.3994181-.3233177-.8977208-.4997231-1.4115974-.4997231h-9.3572323c-1.2390911%200-2.2435729-1.0044818-2.2435729-2.2435729%200-.1076315.0077452-.2151235.0231754-.3216433l3.7490228-25.8805977c.1776387-1.2262916-.6724625-2.364402-1.8987542-2.5420407-.773515-.1120502-1.5495959.1865262-2.0485532.7881261z%22%2F%3E%3Cpath%20d%3D%22m114.035786.18826498-7.273244%208.61842476c-.18886.22379021-.160544.55830977.063246.74717035.095658.08072782.216792.12501059.341962.12501059h2.501494c.292832%200%20.530218.23738696.530218.53021862%200%20.0296726-.00249.0592928-.007446.0885487l-1.102117%206.506663c-.048904.2887192.145505.5624169.434224.611321.187215.031711.377094-.0391114.497815-.1856774l7.290186-8.85099793c.186173-.22603146.15386-.56018869-.072171-.74636109-.094936-.07819439-.214103-.12095246-.337095-.12095246h-2.340855c-.292831%200-.530218-.23738696-.530218-.53021861%200-.02587617.001894-.05171763.005667-.07731721l.928093-6.29655279c.042701-.28970156-.157533-.55916716-.447234-.60186828-.181605-.02676793-.364135.04230195-.482525.18258875z%22%20opacity%3D%22.687097%22%2F%3E%3Cpath%20d%3D%22m27.802257%2023.1987483-6.7046163%208.4243596c-.1754528.2204568-.13897.541405.0814868.7168579.0902944.0718618.2022854.1109871.3176855.1109871h2.2961389c.2817533%200%20.5101594.2284061.5101594.5101594%200%20.0269503-.0021355.0538583-.0063866.0804713l-1.0161734%206.3615297c-.044443.2782261.1450755.539801.4233015.5842441.1838727.0293713.3691425-.0437691.4833667-.1908224l6.7184627-8.6494145c.1728377-.222513.132568-.5430081-.089945-.7158458-.089506-.0695241-.1996148-.107264-.3129504-.107264h-2.1465905c-.2817532%200-.5101594-.2284062-.5101594-.5101594%200-.0234968.0016233-.0469655.0048584-.0702386l.8558351-6.1569403c.0387917-.2790701-.1559925-.5367479-.4350625-.5755396-.1786335-.0248306-.3571031.0465006-.4694109.1876155z%22%2F%3E%3Cpath%20d%3D%22m57.7748529%204.90248851-4.6980894%205.95276209c-.1221259.1547409-.0956863.3791859.0590546.5013118.0629873.0497114.1408876.0767489.2211286.0767489h1.6122674c.1971282%200%20.3569321.1598039.3569321.356932%200%20.018701-.0014697.0373732-.0043956.0558439l-.7126203%204.4986917c-.0308417.1947005.101992.3775386.2966925.4083804.1290204.0204376.2588991-.0312375.3386133-.1347247l4.7077624-6.1117505c.1202941-.1561692.0912116-.380287-.0649576-.5005812-.062427-.04808624-.1390119-.07416262-.2178118-.07416262h-1.5073805c-.1971281%200-.3569321-.15980392-.3569321-.35693204%200-.0163041.0011172-.03258903.0033435-.0487404l.6001646-4.35391035c.0269186-.19528156-.1095666-.37541037-.3048481-.40232894-.1253708-.01728173-.2505188.0331163-.3289236.13245996z%22%20opacity%3D%22.176794%22%2F%3E%3Cpath%20d%3D%22m157.774853%2049.9024885-4.698089%205.9527621c-.122126.1547409-.095687.3791859.059054.5013118.062987.0497114.140888.0767489.221129.0767489h1.612267c.197128%200%20.356932.1598039.356932.356932%200%20.018701-.00147.0373732-.004395.0558439l-.712621%204.4986917c-.030841.1947005.101992.3775386.296693.4083804.12902.0204376.258899-.0312375.338613-.1347247l4.707763-6.1117505c.120294-.1561692.091211-.380287-.064958-.5005812-.062427-.0480862-.139012-.0741626-.217812-.0741626h-1.50738c-.197129%200-.356932-.1598039-.356932-.3569321%200-.0163041.001117-.032589.003343-.0487404l.600165-4.3539103c.026918-.1952816-.109567-.3754104-.304849-.402329-.12537-.0172817-.250518.0331163-.328923.13246z%22%20opacity%3D%22.33598%22%2F%3E%3Cpath%20d%3D%22m126.774853%2032.9024885-4.698089%205.9527621c-.122126.1547409-.095687.3791859.059054.5013118.062987.0497114.140888.0767489.221129.0767489h1.612267c.197128%200%20.356932.1598039.356932.356932%200%20.018701-.00147.0373732-.004395.0558439l-.712621%204.4986917c-.030841.1947005.101992.3775386.296693.4083804.12902.0204376.258899-.0312375.338613-.1347247l4.707763-6.1117505c.120294-.1561692.091211-.380287-.064958-.5005812-.062427-.0480862-.139012-.0741626-.217812-.0741626h-1.50738c-.197129%200-.356932-.1598039-.356932-.3569321%200-.0163041.001117-.032589.003343-.0487404l.600165-4.3539103c.026918-.1952816-.109567-.3754104-.304849-.402329-.12537-.0172817-.250518.0331163-.328923.13246z%22%2F%3E%3Cpath%20d%3D%22m4.77485287%2060.9024885-4.69808937%205.9527621c-.12212594.1547409-.09568627.3791859.05905465.5013118.06298727.0497114.1408876.0767489.22112858.0767489h1.61226741c.19712813%200%20.35693205.1598039.35693205.356932%200%20.018701-.00146973.0373732-.00439561.0558439l-.71262027%204.4986917c-.03084175.1947005.10199201.3775386.29669251.4083804.12902039.0204376.25889913-.0312375.33861332-.1347247l4.70776236-6.1117505c.12029411-.1561692.09121159-.380287-.06495763-.5005812-.06242698-.0480862-.13901189-.0741626-.21781175-.0741626h-1.50738053c-.19712812%200-.35693204-.1598039-.35693204-.3569321%200-.0163041.00111711-.032589.0033435-.0487404l.60016459-4.3539103c.02691857-.1952816-.10956659-.3754104-.30484815-.402329-.12537076-.0172817-.25051877.0331163-.32892362.13246z%22%20opacity%3D%22.377448%22%2F%3E%3Cpath%20d%3D%22m121.801073%2061.2001308-6.703092%208.4219806c-.17568.2207299-.139159.5420835.08157.7177634.09041.0719576.202547.1111354.318097.1111354h2.294385c.282109%200%20.510803.228694.510803.5108023%200%20.0269858-.002139.0539291-.006396.080577l-1.015783%206.3587374c-.044501.2785763.145254.5404825.42383.5849839.184101.0294094.369602-.0438184.483972-.1910514l6.716893-8.6469184c.173061-.2227887.132749-.5436887-.090039-.7167502-.089621-.069617-.199873-.1074076-.313356-.1074076h-2.144857c-.282108%200-.510802-.2286939-.510802-.5108023%200-.0235276.001625-.0470272.004865-.0703308l.855514-6.1542919c.038842-.2794215-.156185-.5374255-.435607-.5762682-.178855-.0248627-.357546.0465538-.469997.1878408z%22%20opacity%3D%22.338008%22%2F%3E%3Cpath%20d%3D%22m93.4589003%2086.9095818-5.3375327%206.4107371c-.144151.173135-.1206547.4303462.0524804.5744972.0732893.0610202.1656418.0944336.2610084.0944336h1.8096408c.2252893%200%20.4079223.182633.4079223.4079223%200%20.0225274-.0018661.0450161-.0055791.0672355l-.8056997%204.8213801c-.0371331.222208.1128997.4324456.3351077.4695787.1447212.0241843.291281-.0312187.3838137-.1450906l5.3488304-6.5823363c.1420766-.1748413.1155157-.4317541-.0593256-.5738308-.0727156-.0590889-.163556-.0913442-.2572526-.0913442h-1.6912199c-.2252893%200-.4079223-.182633-.4079223-.4079223%200-.0196441.001419-.0392625.0042459-.0587022l.6786476-4.6668474c.0324203-.2229444-.12203-.4299583-.3449743-.4623787-.140434-.0204217-.2813894.0336092-.372191.142668z%22%2F%3E%3Cpath%20d%3D%22m46.4589003%2066.9095818-5.3375327%206.4107371c-.144151.173135-.1206547.4303462.0524804.5744972.0732893.0610202.1656418.0944336.2610084.0944336h1.8096408c.2252893%200%20.4079223.182633.4079223.4079223%200%20.0225274-.0018661.0450161-.0055791.0672355l-.8056997%204.8213801c-.0371331.222208.1128997.4324456.3351077.4695787.1447212.0241843.291281-.0312187.3838137-.1450906l5.3488304-6.5823363c.1420766-.1748413.1155157-.4317541-.0593256-.5738308-.0727156-.0590889-.163556-.0913442-.2572526-.0913442h-1.6912199c-.2252893%200-.4079223-.182633-.4079223-.4079223%200-.0196441.001419-.0392625.0042459-.0587022l.6786476-4.6668474c.0324203-.2229444-.12203-.4299583-.3449743-.4623787-.140434-.0204217-.2813894.0336092-.372191.142668z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E'); - - --image-url-boost-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2011%2018%22%20width%3D%2211%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m5.84.14-5.74%206.53c-.15.17-.13.43.04.58.07.07.17.1.27.1h2.14c.23%200%20.41.19.41.41%200%20.03%200%20.05-.01.07l-.83%204.94c-.04.22.11.43.34.47.14.03.28-.03.38-.14l5.75-6.71c.15-.17.13-.43-.04-.58-.08-.06-.17-.1-.27-.1h-2.02c-.23%200-.41-.18-.41-.41%200-.02%200-.04%200-.06l.71-4.77c.03-.22-.13-.43-.35-.47-.14-.02-.28.04-.37.14z%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%281.1555%202.3794%29%22%2F%3E%3C%2Fsvg%3E'); - - --image-url-app-more-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2226%22%20viewBox%3D%220%200%2026%2026%22%20width%3D%2226%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%3E%3Ccircle%20cx%3D%2213%22%20cy%3D%2213%22%20opacity%3D%22.07%22%20r%3D%2213%22%2F%3E%3Cg%3E%3Ccircle%20cx%3D%227%22%20cy%3D%2213%22%20r%3D%221.67%22%2F%3E%3Ccircle%20cx%3D%2213%22%20cy%3D%2213%22%20r%3D%221.67%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2213%22%20r%3D%221.67%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E'); } diff --git a/data/web/fragment.com/js/auction.js b/data/web/fragment.com/js/auction.js index a0ed386e46..ccae58e3d6 100644 --- a/data/web/fragment.com/js/auction.js +++ b/data/web/fragment.com/js/auction.js @@ -147,7 +147,7 @@ var Main = { size = parseInt(size); while (this.scrollWidth > this.offsetWidth) { size -= 0.5; - if (size >= init_size * 0.65) { + if (size >= init_size * 0.75) { $(this).css('font-size', size + 'px'); } else { break; @@ -1563,29 +1563,6 @@ var MyBids = { } }; -var PremiumHistory = { - init: function() { - Aj.onLoad(function(state) { - $(document).on('click.curPage', '.js-load-more-rows', PremiumHistory.eLoadMoreRows); - }); - }, - eLoadMoreRows: function(e) { - e.preventDefault(); - var $table = $(this).closest('table'); - var offset_id = $(this).attr('data-next-offset'); - Aj.apiRequest('getPremiumHistory', { - type: Aj.state.type || '', - offset_id: offset_id - }, function(result) { - if (result.error) { - return showAlert(result.error); - } - $('tbody', $table).append(result.body); - $('tfoot', $table).html(result.foot); - }); - } -}; - var Sessions = { init: function() { Aj.onLoad(function(state) { @@ -1774,7 +1751,7 @@ var Premium = { } if (result.found.name) { var $form = Aj.state.$premiumSearchForm; - $form.field('query').value(uncleanHTML(result.found.name)); + $form.field('query').value(result.found.name); } $form.toggleClass('myself', result.found.myself); $form.field('recipient').value(result.found.recipient); @@ -1893,325 +1870,6 @@ var Premium = { } }; -var PremiumGiveaway = { - init: function() { - Aj.onLoad(function(state) { - var cont = Aj.ajContainer; - $(cont).on('click.curPage', '.js-another-giveaway-btn', PremiumGiveaway.eMoreGiveawayPremium); - $(cont).on('click.curPage', '.js-giveaway-premium-btn', PremiumGiveaway.eGiveawayPremium); - state.$giveawayPremiumPopup = $('.js-giveaway-premium-popup'); - $(cont).on('submit.curPage', '.js-giveaway-premium-form', PremiumGiveaway.eGiveawayPremiumSubmit); - state.$giveawayPremiumForm = $('.js-giveaway-premium-form'); - state.$premiumSearchField = $('.js-premium-search-field'); - state.$premiumSearchForm = $('.js-premium-form'); - state.$premiumSearchForm.on('submit', PremiumGiveaway.eSearchSubmit); - state.$premiumSearchForm.field('query').on('input', PremiumGiveaway.eSearchInput); - state.$premiumSearchForm.field('query').on('change', PremiumGiveaway.eSearchChange); - $('.js-form-clear', state.$premiumSearchForm).on('click', PremiumGiveaway.eSearchClear); - state.$premiumQuantityField = $('.js-premium-quantity-field'); - state.$premiumSearchForm.field('quantity').on('change', PremiumGiveaway.eQuantityChanged); - state.$premiumSearchForm.on('change', '.js-premium-options input.radio', PremiumGiveaway.eRadioChanged); - state.$giveawayPremiumBtn = $('.js-giveaway-premium-btn'); - state.curQuantity = state.$premiumSearchForm.field('quantity').value(); - state.updLastReq = +Date.now(); - if (state.needUpdate) { - state.updStateTo = setTimeout(PremiumGiveaway.updateState, Main.UPDATE_PERIOD); - } - $(cont).on('click.curPage', '.js-preview-sticker', function() { - RLottie.playUntilEnd(this); - }); - $('.js-preview-sticker').each(function() { - RLottie.init(this, {playUntilEnd: true}); - }); - RLottie.init(); - }); - Aj.onUnload(function(state) { - clearTimeout(state.updStateTo); - state.needUpdate = false; - Main.destroyForm(state.$giveawayPremiumForm); - state.$premiumSearchForm.off('submit', PremiumGiveaway.eSearchSubmit); - state.$premiumSearchForm.field('query').off('input', PremiumGiveaway.eSearchInput); - state.$premiumSearchForm.field('query').on('change', PremiumGiveaway.eSearchChange); - $('.js-form-clear', state.$premiumSearchForm).off('click', PremiumGiveaway.eSearchClear); - state.$premiumSearchForm.field('quantity').off('change', PremiumGiveaway.eQuantityChanged); - state.$premiumSearchForm.off('change', '.js-premium-options input.radio', PremiumGiveaway.eRadioChanged); - state.$giveawayPremiumForm.off('change', 'input.checkbox', PremiumGiveaway.eCheckboxChanged); - $('.js-preview-sticker').each(function() { - RLottie.destroy(this); - }); - }); - }, - updateState: function() { - var now = +Date.now(); - if (document.hasFocus() || - Aj.state.updLastReq && (now - Aj.state.updLastReq) > Main.FORCE_UPDATE_PERIOD) { - Aj.state.updLastReq = now; - Aj.apiRequest('updatePremiumGiveawayState', { - mode: Aj.state.mode, - lv: Aj.state.lastVer, - dh: Aj.state.lastDh, - quantity: Aj.state.curQuantity - }, function(result) { - if (result.mode) { - Aj.state.mode = result.mode; - } - if (result.html) { - PremiumGiveaway.updateContent(result.html); - } else { - if (result.history_html) { - PremiumGiveaway.updateHistory(result.history_html); - } - if (result.options_html) { - PremiumGiveaway.updateOptions(result.options_html); - } - } - if (result.lv) { - Aj.state.lastVer = result.lv; - if (Aj.state.$sentPopup) { - closePopup(Aj.state.$sentPopup); - } - } - if (result.dh) { - Aj.state.lastDh = result.dh; - } - if (Aj.state.needUpdate && result.need_update) { - Aj.state.updStateTo = setTimeout(PremiumGiveaway.updateState, Main.UPDATE_PERIOD); - } - }); - } else { - if (Aj.state.needUpdate) { - Aj.state.updStateTo = setTimeout(PremiumGiveaway.updateState, Main.CHECK_PERIOD); - } - } - }, - eSearchInput: function(e) { - var $field = Aj.state.$premiumSearchField; - $('.js-search-field-error').html(''); - $field.removeClass('error'); - }, - eSearchChange: function(e) { - PremiumGiveaway.searchSubmit(); - }, - eSearchClear: function(e) { - var $form = Aj.state.$premiumSearchForm; - var $field = Aj.state.$premiumSearchField; - var $btn = Aj.state.$giveawayPremiumBtn; - $form.field('recipient').value(''); - $form.field('query').value('').prop('disabled', false); - $btn.prop('disabled', true); - $field.removeClass('found'); - $('.js-search-field-error').html(''); - $field.removeClass('error'); - PremiumGiveaway.updateUrl(); - }, - eQuantityChanged: function() { - var $form = Aj.state.$premiumSearchForm; - var quantity = +$form.field('quantity').value(); - Aj.state.$premiumQuantityField.addClass('loading').removeClass('play').redraw().addClass('play'); - Aj.apiRequest('updatePremiumGiveawayPrices', { - quantity: quantity - }, function(result) { - var $form = Aj.state.$premiumSearchForm; - var $field = Aj.state.$premiumQuantityField; - var $btn = Aj.state.$giveawayPremiumBtn; - if (result.error) { - $('.js-quantity-field-error').html(result.error); - $field.addClass('error').removeClass('found'); - quantity = 0; - } else { - $('.js-quantity-field-error').html(''); - $field.removeClass('error'); - } - $('.js-boost-value').html(result.boosts); - if (result.button_label) { - $('.js-prepay-premium-label').html(result.button_label); - } - if (result.options_html) { - PremiumGiveaway.updateOptions(result.options_html); - } - if (result.dh) { - Aj.state.lastDh = result.dh; - } - if (quantity > 0 && $form.field('recipient').value()) { - $btn.prop('disabled', false); - } else { - $btn.prop('disabled', true); - } - Aj.state.curQuantity = quantity; - PremiumGiveaway.updateUrl(); - Aj.state.$premiumQuantityField.removeClass('loading'); - }); - }, - eRadioChanged: function() { - PremiumGiveaway.updateUrl(); - }, - eSearchSubmit: function(e) { - e.preventDefault(); - PremiumGiveaway.searchSubmit(); - }, - searchSubmit: function() { - var $form = Aj.state.$premiumSearchForm; - var recipient = $form.field('recipient').value(); - var quantity = $form.field('quantity').value(); - var query = $form.field('query').value(); - var months = $form.field('months').value(); - if (!query.length) { - $form.field('query').focus(); - return; - } - Aj.state.$premiumSearchField.addClass('loading').removeClass('play').redraw().addClass('play'); - Aj.showProgress(); - Aj.apiRequest('searchPremiumGiveawayRecipient', { - query: recipient || query, - quantity: quantity, - months: months - }, function(result) { - Aj.hideProgress(); - PremiumGiveaway.updateResult(result); - Aj.state.$premiumSearchField.removeClass('loading'); - }); - }, - updateResult: function(result) { - var $form = Aj.state.$premiumSearchForm; - var $field = Aj.state.$premiumSearchField; - var $btn = Aj.state.$giveawayPremiumBtn; - if (result.error) { - $('.js-search-field-error').html(result.error); - $field.addClass('error').removeClass('found'); - $form.field('query').prop('disabled', false); - } else { - $('.js-search-field-error').html(''); - $field.removeClass('error'); - if (result.found) { - if (result.found.photo) { - $('.js-premium-search-photo', $field).html(result.found.photo); - } - if (result.found.name) { - var $form = Aj.state.$premiumSearchForm; - $form.field('query').value(uncleanHTML(result.found.name)); - } - $form.field('recipient').value(result.found.recipient); - $field.addClass('found'); - $form.field('query').prop('disabled', true); - if (Aj.state.curQuantity > 0) { - $btn.prop('disabled', false); - } else { - $btn.prop('disabled', true); - } - } else { - $form.field('recipient').value(''); - $field.removeClass('found'); - $form.field('query').prop('disabled', false); - $btn.prop('disabled', true); - } - } - PremiumGiveaway.updateUrl(); - }, - updateUrl: function() { - var new_url = ''; - var $form = Aj.state.$premiumSearchForm; - var recipient = $form.field('recipient').value(); - var quantity = Aj.state.curQuantity; - var months = $form.field('months').value(); - if (recipient) { - new_url += '&recipient=' + encodeURIComponent(recipient); - } - if (quantity) { - new_url += '&quantity=' + encodeURIComponent(quantity); - } - if (months) { - new_url += '&months=' + encodeURIComponent(months); - } - if (new_url) { - new_url = '?' + new_url.substr(1); - } - var loc = Aj.location(), path = loc.pathname + loc.search; - Aj.setLocation(new_url, path != '/premium/giveaway'); - }, - updateOptions: function(html) { - var $form = Aj.state.$premiumSearchForm; - var months = $form.field('months').value(); - $('.js-premium-options').replaceWith(html); - $form.field('months').value(months); - }, - updateHistory: function(html) { - $('.js-premium-history').replaceWith(html); - }, - updateContent: function(html) { - $('.js-main-content').html(html).find('.js-preview-sticker').each(function() { - RLottie.init(this, {playUntilEnd: true}); - }); - }, - eGiveawayPremium: function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - var $form = Aj.state.$premiumSearchForm; - var recipient = $form.field('recipient').value(); - var quantity = $form.field('quantity').value(); - var months = $form.field('months').value(); - Aj.apiRequest('initGiveawayPremiumRequest', { - recipient: recipient, - quantity: quantity, - months: months - }, function(result) { - if (result.error) { - return showAlert(result.error); - } - $('.js-giveaway-premium-content', Aj.state.$giveawayPremiumPopup).html(result.content); - $('.js-giveaway-premium-button', Aj.state.$giveawayPremiumPopup).html(result.button); - Aj.state.giveawayPrice = result.amount; - Aj.state.itemTitle = result.item_title; - Aj.state.$giveawayPremiumForm.field('id').value(result.req_id); - RLottie.WORKERS_LIMIT = 1; - openPopup(Aj.state.$giveawayPremiumPopup, { - onOpen: function() { - $('.js-preview-sticker').each(function() { - RLottie.init(this, {playUntilEnd: true}); - }); - }, - onClose: function() { - $('.js-preview-sticker').each(function() { - RLottie.destroy(this); - }); - } - }); - }); - }, - eGiveawayPremiumSubmit: function(e) { - e.preventDefault(); - var $form = $(this); - var item_title = Aj.state.itemTitle; - var req_id = $form.field('id').value(); - closePopup(Aj.state.$giveawayPremiumPopup); - QR.showPopup({ - request: { - method: 'getGiveawayPremiumLink', - params: { - id: req_id - } - }, - title: l('WEB_POPUP_QR_GIVEAWAY_HEADER'), - description: l('WEB_POPUP_QR_GIVEAWAY_TEXT', { - amount: '' + Aj.state.giveawayPrice + '' - }), - qr_label: item_title, - tk_label: l('WEB_POPUP_QR_GIVEAWAY_TK_BUTTON'), - terms_label: l('WEB_POPUP_QR_PROCEED_TERMS') - }); - Aj.state.needUpdate = true; - }, - eMoreGiveawayPremium: function(e) { - e.preventDefault(); - e.stopImmediatePropagation(); - Aj.apiRequest('repeatPremiumGiveaway', {}, function(result) { - if (result.error) { - return showAlert(result.error); - } - Aj.location('/premium/giveaway'); - }); - } -}; - var QR = { showPopup: function(options) { options = $.extend({