Plugin Directory

Changeset 2424615


Ignore:
Timestamp:
11/24/2020 12:50:15 PM (5 years ago)
Author:
spoot1986
Message:

Add new version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sp-framework/trunk/assets/js/adminScript.js

    r2424430 r2424615  
    210210                    classList   = target.getAttribute('class');
    211211
    212                 if(classList.includes('sp-add-marker')){
    213                     let itemID = target.getAttribute('data-id');
    214                     spAdminYandexMap.addMarker(itemID);
    215                 }
     212                if(classList.includes('sp-add-marker') !== null){   
     213
     214                    if(classList.includes('sp-add-marker')){
     215                        let itemID = target.getAttribute('data-id');
     216                        spAdminYandexMap.addMarker(itemID);
     217                    }
     218                }   
    216219               
    217220            });
     
    221224
    222225    let initSpMetaBox = spMetaBox.init();
    223     let initYandexMap = spAdminYandexMap.init();
    224    
     226
     227    if($('.sp-field-map').length){
     228        let initYandexMap = spAdminYandexMap.init();
     229    }
     230
    225231});
Note: See TracChangeset for help on using the changeset viewer.