Plugin Directory

Changeset 2402523


Ignore:
Timestamp:
10/19/2020 12:11:36 PM (5 years ago)
Author:
envite
Message:

right chat button position

File:
1 edited

Legend:

Unmodified
Added
Removed
  • envite/trunk/envite-init.php

    r2395130 r2402523  
    4040            var c=d.createElement('script');o.params={};c.async=true;c.type='text/javascript';
    4141            c.charset='utf-8';c.src='https://envite-script.web.app/main.js';h.appendChild(c);c.charset='utf-8';
    42             // c.charset='utf-8';c.src='http://localhost:9000/main.js';h.appendChild(c);c.charset='utf-8';
     42            //c.charset='utf-8';c.src='http://localhost:9000/main.js';h.appendChild(c);c.charset='utf-8';
    4343            })(document);
    4444            envite('init', '<?=$options ?>');
     
    4848
    4949            #envite-fast-bubble-wrapper {
    50             z-index: 99999999999; overflow: hidden; height: 77px !important; width: 210px !important; position: fixed !important; bottom: 40px !important; left: 40px !important; top: auto !important;
     50            z-index: 99999999999; overflow: hidden; height: 77px !important; width: 210px !important; position: fixed !important; bottom: 40px !important; top: auto !important; left : 40px;
    5151    display: none;
     52            }
     53            .envite-fast-bubble-wrapper-right {
     54                right : 40px; left : unset !important;
    5255            }
    5356            #envite-fast-bubble-wrapper__mobile {
    5457                z-index: 99999999999;  height: 115px !important; width: 220px !important; position: fixed !important; bottom: 0px !important; top: auto !important;
    5558    display: none;
     59            }
     60            .envite-fast-bubble-wrapper__mobile-right {
     61                left: calc(100% - 100px) !important;
    5662            }
    5763            .fast-bubble-chat-button__desktop {
     
    156162     .then(res => res.json()).then(res => {
    157163         const {
    158              chatColor, primaryColor, secondaryColor, textColor,
     164             chatColor, primaryColor, secondaryColor, textColor, position
    159165         } = res[0];
    160166         document.querySelector('#envite-fast-bubble-wrapper__mobile').style.display = 'block';
     
    164170         document.querySelector('.fast-buble-e').style.fill=textColor;
    165171
     172         if(position === 'right') {
     173             document.querySelector('#envite-fast-bubble-wrapper__mobile').classList.add('envite-fast-bubble-wrapper__mobile-right')
     174         }
     175
    166176        })
    167177
     
    170180     .then(res => res.json()).then(res => {
    171181         const {
    172              chatColor, primaryColor, secondaryColor, textColor, shopwithfriends, ownerId, language
     182             chatColor, primaryColor, secondaryColor, textColor, shopwithfriends, ownerId, language, position
    173183         } = res[0];
    174184         document.querySelector('#fast-bubble-text-shop-with-friends').style.color = textColor;
     
    176186         document.querySelector('#envite-fast-bubble-wrapper').style.display = 'block';
    177187         document.querySelector('#fast-bubble-text-shop-with-friends').textContent = shopwithfriends;
     188
     189         if(position === 'right') {
     190             document.querySelector('#envite-fast-bubble-wrapper').classList.add('envite-fast-bubble-wrapper-right');
     191         }
    178192
    179193         if (ownerId === 'Fv9guG4qcTOXiecbVr7XEvDrnkn1') {
Note: See TracChangeset for help on using the changeset viewer.