403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/lpost/delivery/map/src/js/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/lpost/delivery/map/src/js/Balloon.js
export default class Balloon
{
    constructor(type, params)
    {
        this.type = type;
        this.html = "";
        this.params = params;
    }

    generate(){

        switch (this.type) {
            case "pvz": this.templatePvz(); break;
            case "zone": this.templateZone(); break;
            default: this.templateEmpty(); break;
        }

        return this;
    }

    templatePvz(){
        this.html = `
            <div class="lpost-pvz__map-balloon">
                <div class="map-balloon__address _bold">${this.params.address}</div>
                <div class="map-balloon__sum">${BX.message("LPOST_DELIVERY_SOA_LABLE_DELIVERY_SUM") + "#SUM_FORMAT#"}</div>
                <div class="map-balloon__description">#DESCRIPTION#</div>
                <div class="map-balloon__time-work">${BX.message("LPOST_DELIVERY_SOA_LABLE_TIME_WORK") + "#TIME_WORK#"}</div>
                <div class="map-balloon__has-fitting-room">${this.params.has_fitting_room ? BX.message('LPOST_DELIVERY_SOA_HAS_FITTING_ROOM') : BX.message('LPOST_DELIVERY_SOA_NOT_HAS_FITTING_ROOM')}</div>
                <div class="map-balloon__method-pay">#METHOD_PAY#</div>
                <div class="map-balloon__day-delivery">${BX.message("LPOST_DELIVERY_SOA_LABLE_DELIVERY_DAY") + "#DELIVERY_DAY#"}</div>
                <div class="map-balloon__button" 
                    data-id="${this.params.id}" 
                    data-address="${this.params.address}" 
                    data-price="#SUM#"
                    data-day="#DELIVERY_DAY#"  
                    data-coords="${this.params.coords || false}">${this.params.buttonText}</div>
            </div>
        `;
    }

    templateZone(){

        let additional_properties_html = '';

        if (IS_SHOW_ADDITIONAL_PROPERTIES) {
            additional_properties_html = `
                <div class="map-balloon__additional-field">
                    <label class="map-balloon__additional-label">
                        Квартира:<input class="map-balloon__additional-input lpost-delivery-input-flat" data-input-for="flat" placeholder="Номер квартиры" type="number" step="1" min="0">
                    </label>
                </div>
                <div class="map-balloon__additional-field">
                    <label class="map-balloon__additional-label">
                        Этаж:<input class="map-balloon__additional-input lpost-delivery-input-floor" data-input-for="floor" placeholder="Этаж" type="number" step="1" min="0">
                    </label>
                </div>
                <div class="map-balloon__additional-field">
                    <label class="map-balloon__additional-label">
                        Подъезд:<input class="map-balloon__additional-input lpost-delivery-input-porch" data-input-for="porch" placeholder="Номер подъезда" type="number" step="1" min="0">
                    </label>
                </div>
                <div class="map-balloon__additional-field">
                    <label class="map-balloon__additional-label">
                        Домофон:<input class="map-balloon__additional-input lpost-delivery-input-code" data-input-for="code" placeholder="Код домофона" type="text">
                    </label>
                </div>
            `;
        }

        this.html = `        
            <div class="lpost-pvz__map-balloon">
                <div class="map-balloon__address _bold">${this.params.address}</div>
                <div class="map-balloon__sum">${BX.message("LPOST_DELIVERY_SOA_LABLE_DELIVERY_SUM") + "#SUM_FORMAT#"}</div>
                <div class="map-balloon__method-pay">#METHOD_PAY#</div>
                <div class="map-balloon__day-delivery">${BX.message("LPOST_DELIVERY_SOA_LABLE_DELIVERY_DAY") + "#DELIVERY_DAY#"}</div>
                <div class="map-balloon__date-delivery">#DATE_DELIVERY_SELECTOR#</div>
                ${additional_properties_html}
                <div class="map-balloon__button" 
                    data-id="${this.params.id}"
                    data-address="${this.params.address}" 
                    data-price="#SUM#"
                    data-day="#DELIVERY_DAY#"
                    data-date-day-delivery="#DATE_DAY_DELIVERY#"
                    data-date-time-delivery="#DATE_TIME_DELIVERY#"
                    data-coords="${this.params.coords || false}">${this.params.buttonText}</div>
            </div>
        `;
    }

    templateEmpty(){
        this.html = `
        <div class="lpost-pvz__map-balloon">
            <div class="map-balloon__address">${this.params.buttonText}</div>
        </div>`;
    }

    getHtml(){
        return this.html;
    }

};



Youez - 2016 - github.com/yon3zu
LinuXploit