Plugin Directory

Changeset 1191455 for easy2map


Ignore:
Timestamp:
07/02/2015 08:01:15 PM (10 years ago)
Author:
stevenellis
Message:

version 1.2.5 of easy2map plugin

Location:
easy2map/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • easy2map/trunk/includes/Easy2Map.php

    r1178300 r1191455  
    77    const min_php_version = '5.0';
    88    const min_wp_version = '3.0';
    9     const e2m_version = '1.2.2';
     9    const e2m_version = '1.2.5';
    1010
    1111    // Used to uniquely identify this plugin's menu page in the WP manager
  • easy2map/trunk/includes/Functions.php

    r1178300 r1191455  
    112112            $settings = new e2mMapItem("0", "0", "",
    113113                    str_replace('index.php', '', easy2map_get_plugin_url('/index.php')) . "images/map_pins/pins/111.png"
    114                     , '<settings lattitude="9.51119363015591" longitude="15.191190643725605" zoom="2" clusterpins="1" mapType="ROADMAP" width="800" height="600" backgroundColor="B52932" draggable="1" scrollWheel="1" mapTypeControl="1" mapTypeControl_style="DROPDOWN_MENU" mapTypeControl_position="TOP_RIGHT" panControl="1" panControl_position="TOP_LEFT" rotateControl="1" rotateControl_position="TOP_LEFT" scaleControl="1" scaleControl_position="TOP_LEFT" streetViewControl="1" streetViewControl_position="TOP_LEFT" zoomControl="1" zoomControl_position="TOP_LEFT" zoomControl_style="LARGE" polyline_strokecolor="000000" polyline_opacity="1.0" polyline_strokeweight="1" showMarkerTitle="0" markerNameFontSize="1.2" setMaxWidthPopups="0" maxWidthPopups="250" showDirections="0" directionsLinkTitle="Get Directions" directionsLinkFontSize="1" />',
    115                     '', '', '', '');
     114                    , '<settings lattitude="9.51119363015591" longitude="15.191190643725605" zoom="2" clusterpins="1" mapType="ROADMAP" width="800" height="600" backgroundColor="B52932" draggable="1" scrollWheel="1" mapTypeControl="1" mapTypeControl_style="DROPDOWN_MENU" mapTypeControl_position="TOP_RIGHT" panControl="1" panControl_position="TOP_LEFT" rotateControl="1" rotateControl_position="TOP_LEFT" scaleControl="1" scaleControl_position="TOP_LEFT" streetViewControl="1" streetViewControl_position="TOP_LEFT" zoomControl="1" zoomControl_position="TOP_LEFT" zoomControl_style="LARGE" polyline_strokecolor="000000" polyline_opacity="1.0" polyline_strokeweight="1" showMarkerTitle="0" markerNameFontSize="1.2" setMaxWidthPopups="0" maxWidthPopups="250" showDirections="0" directionsLinkTitle="Get Directions" directionsLinkFontSize="1" descriptionInListItems="1" />',
     115                    '', '', '', '', '', '');
    116116
    117117            return $settings;
     
    126126        foreach ($mapSettings as $row) {
    127127
    128             $settings = new e2mMapItem($row->ID, $row->TemplateID, $row->MapName, $row->DefaultPinImage, $row->Settings, $row->CSSValues, $row->CSSValuesList, $row->CSSValuesHeading, $row->PolyLines, $row->ThemeID, $row->Styles);
     128            $settings = new e2mMapItem($row->ID, $row->TemplateID, $row->MapName,
     129                $row->DefaultPinImage, $row->Settings, $row->CSSValues,
     130                $row->CSSValuesList, $row->CSSValuesHeading, $row->PolyLines,
     131                $row->ThemeID, $row->Styles);
    129132
    130133            return $settings;
     
    161164
    162165            //this is a map update
    163             $wpdb->query(sprintf("
     166            $wpdb->query($wpdb->prepare("
    164167                UPDATE $mapsTable
    165168                SET TemplateID = '%s',
     
    176179                    $Items['mapTemplateName'],
    177180                    $Items['mapName'],
    178                     urldecode($Items['mapSettingsXML']),
    179                     urldecode($Items["mapCSSXML"]),
    180                     urldecode($Items["listCSSXML"]),
    181                     urldecode($Items["headingCSSXML"]),
    182                     urldecode($Items["mapHTML"]),
     181                    stripcslashes(urldecode($Items['mapSettingsXML'])),
     182                    stripcslashes(urldecode($Items["mapCSSXML"])),
     183                    stripcslashes(urldecode($Items["listCSSXML"])),
     184                    stripcslashes(urldecode($Items["headingCSSXML"])),
     185                    stripcslashes(urldecode($Items["mapHTML"])),
    183186                    $Items['mapThemeName'],
    184187                    $mapID));
     
    186189
    187190            //this is a map insert
    188             if (!$wpdb->query(sprintf("
     191            if (!$wpdb->query($wpdb->prepare("
    189192            INSERT INTO $mapsTable(
    190193                TemplateID,
     
    203206                    CURRENT_TIMESTAMP, '%s', '%s', '%s', '%s', '%s', 0, '%s');",
    204207                    $Items['mapTemplateName'],
    205                     $Items['mapName'], str_replace('index.php', '', easy2map_get_plugin_url('/index.php')) . "images/map_pins/pins/111.png",
    206                     urldecode($Items['mapSettingsXML']), '',
    207                     urldecode($Items["mapCSSXML"]),
    208                     urldecode($Items["listCSSXML"]),
    209                     urldecode($Items["headingCSSXML"]),
    210                     urldecode($Items["mapHTML"]),
     208                    $Items['mapName'], str_replace('index.php', '',
     209                    easy2map_get_plugin_url('/index.php')) . "images/map_pins/pins/111.png",
     210                    stripcslashes(urldecode($Items['mapSettingsXML'])), '',
     211                    stripcslashes(urldecode($Items["mapCSSXML"])),
     212                    stripcslashes(urldecode($Items["listCSSXML"])),
     213                    stripcslashes(urldecode($Items["headingCSSXML"])),
     214                    stripcslashes(urldecode($Items["mapHTML"])),
    211215                    $Items['mapThemeName']))) {
    212216                die("Error!");
     
    542546    public $Styles;
    543547
    544     public function __construct($ID, $TemplateID, $MapName, $DefaultPinImage, $Settings, $CSSValues, $CSSValuesList, $CSSValuesHeading, $PolyLines, $ThemeID, $Styles) {
     548    public function __construct($ID, $TemplateID, $MapName, $DefaultPinImage, $Settings, $CSSValues, $CSSValuesList,
     549        $CSSValuesHeading, $PolyLines, $ThemeID, $Styles) {
    545550        $this->ID = $ID;
    546551        $this->TemplateID = $TemplateID;
  • easy2map/trunk/includes/MapPinImageSave.php

    r795810 r1191455  
    22include 'ImageFunctions.php';
    33
    4 $imagesDirectory = WP_CONTENT_DIR . "/uploads/easy2map/images/map_pins/uploaded/" . $_GET["map_id"] . "/";
     4$imagesDirectory = WP_CONTENT_DIR . "/uploads/easy2map/images/map_pins/uploaded/" . intval($_GET["map_id"]) . "/";
    55echo $imagesDirectory;
    66$imagePlusLocation = "";
  • easy2map/trunk/includes/SettingsEdit.php

    r1178300 r1191455  
    6060        </h6>   
    6161        <h6>Font size:
    62            <select onclick="easy2map_map_functions.changeMarkerPopups()"
    63            id="markerNameFontSize" name="markerNameFontSize"
    64            style="font-size:12px;width:80px"';
    65            if ($premiumYN === false) {
     62         <select onclick="easy2map_map_functions.changeMarkerPopups()"
     63         id="markerNameFontSize" name="markerNameFontSize"
     64         style="font-size:12px;width:80px"';
     65         if ($premiumYN === false) {
    6666            echo ' disabled="disabled"';
    6767        }
     
    7878        echo ' />&nbsp;&nbsp;Set maximum width of popup windows</h6>
    7979        <h6>Max width:     
    80            <select onclick="easy2map_map_functions.changeMarkerPopups()"
    81            id="maxWidthPopups" name="maxWidthPopups"
    82            style="font-size:12px;width:80px"';
    83            if ($premiumYN === false) {
     80         <select onclick="easy2map_map_functions.changeMarkerPopups()"
     81         id="maxWidthPopups" name="maxWidthPopups"
     82         style="font-size:12px;width:80px"';
     83         if ($premiumYN === false) {
    8484            echo ' disabled="disabled"';
    8585        }
     
    110110            <h6 style="margin-top:12px;">Font size:
    111111
    112                <select onclick="easy2map_map_functions.changeMarkerPopups()"
    113                id="directionsLinkFontSize" name="directionsLinkFontSize"
    114                style="font-size:12px;width:60px"';
    115                if ($premiumYN === false) {
     112             <select onclick="easy2map_map_functions.changeMarkerPopups()"
     113             id="directionsLinkFontSize" name="directionsLinkFontSize"
     114             style="font-size:12px;width:60px"';
     115             if ($premiumYN === false) {
    116116                echo ' disabled="disabled"';
    117117            }
     
    124124        </div>
    125125    </div>';
     126
     127
     128//-----------------
     129    echo '<h5 style="margin-top:20px;border-top:1px solid #EBEBEB;padding-top:0.5em;">Misc</h5>'
     130    . '<h6><input type="checkbox" onclick="easy2map_map_functions.changeMarkerPopups()"
     131    id="descriptionInListItems" name="descriptionInListItems"';
     132    if ($premiumYN === false) {
     133        echo ' disabled="disabled"';
     134    }
     135    echo ' />&nbsp;&nbsp;Display <span style="font-size:1.2em">pin description</span> in pin-list '
     136    . '<p style="font-size:0.9em;text-decoration:italic;">(only applicable in templates containing list of pins).</p></h6>';
     137
    126138    ?>
  • easy2map/trunk/readme.txt

    r1178324 r1191455  
    55
    66Requires at least: 3.0.1
    7 Tested up to: 4.1.1
    8 Stable tag: 1.2.4
     7Tested up to: 4.2.2
     8Stable tag: 1.2.5
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    171171* Ability to import map markers from CSV file using addresses (previously only supported latitude and longitude) (Ultimate Version).
    172172
     173= 1.2.5 =
     174* WordPress version 4.2.2 compatability.
     175* SQL injection vulnerability fixed.
     176*  Ability to show/hide pin description in list alongside map (Ultimate Version).
     177
  • easy2map/trunk/scripts/functions.map.admin.js

    r1178300 r1191455  
    200200        var $styles = [];
    201201        for (var t = 0; t < $arrThemes.length; t++) {
    202            
     202
    203203            if($mapTheme == parseInt($arrThemes[t].ID)){
    204204                if ($arrThemes[t].Styles != null && $arrThemes[t].Styles.length > 0){
     
    278278        });
    279279
    280     };
     280};
    281281
    282282    //retrieve all map themes from the database
     
    313313        });
    314314
    315     };
    316 
    317     return {
     315};
     316
     317return {
    318318        //Change a single CSS value
    319319        changeElementValue: function(i, element, proVersion) {
     
    360360
    361361                case "border_style":
    362                     {
    363                         jQuery('#tdheading_style').html("Border Style");
    364                         jQuery('#div_edit_style').modal();
    365                         jQuery('#txtDefaultValue_style').val(value).focus();
    366                         break;
    367                     }
     362                {
     363                    jQuery('#tdheading_style').html("Border Style");
     364                    jQuery('#div_edit_style').modal();
     365                    jQuery('#txtDefaultValue_style').val(value).focus();
     366                    break;
     367                }
    368368
    369369                case "font_family":
    370                     {
    371                         jQuery('#tdheading_fontfamily').html("Font Family");
    372                         jQuery('#div_edit_fontfamily').modal();
    373                         jQuery('#txtDefaultValue_fontfamily').val(value).focus();
    374                         break;
    375                     }
     370                {
     371                    jQuery('#tdheading_fontfamily').html("Font Family");
     372                    jQuery('#div_edit_fontfamily').modal();
     373                    jQuery('#txtDefaultValue_fontfamily').val(value).focus();
     374                    break;
     375                }
    376376
    377377                case "border_width":
    378                     {
    379 
    380                         jQuery('#tdheading_pixel').html("Border Width");
     378                {
     379
     380                    jQuery('#tdheading_pixel').html("Border Width");
    381381                        //jQuery('#txtDefaultValue_pixel').find('option').remove();
    382382                        //for (var i = parseInt(0); i <= parseInt(50); i++)
     
    388388                    }
    389389
    390                 case "font_size":
     390                    case "font_size":
    391391                    {
    392392                        jQuery('#tdheading_pixel').html("Font Size");
     
    400400                    }
    401401
    402                 case "padding":
     402                    case "padding":
    403403                    {
    404404                        jQuery('#tdheading_pixel').html("Padding");
     
    412412                    }
    413413
    414                 case "text_align":
     414                    case "text_align":
    415415                    {
    416416                        jQuery('#tdheading_textalign').html("Text Align");
     
    420420                    }
    421421
    422                 case "width":
     422                    case "width":
    423423                    {
    424424
     
    446446                    }
    447447
    448                 case "height":
     448                    case "height":
    449449                    {
    450450
     
    459459                    }
    460460
    461                 case "max_height":
     461                    case "max_height":
    462462                    {
    463463
     
    472472                    }
    473473
    474                 case "margin_bottom":
     474                    case "margin_bottom":
    475475                    {
    476476
     
    485485                    }
    486486
    487                 case "margin_top":
     487                    case "margin_top":
    488488                    {
    489489
     
    498498                    }
    499499
    500                 case "margin_left":
     500                    case "margin_left":
    501501                    {
    502502
     
    511511                    }
    512512
    513                 case "margin_right":
     513                    case "margin_right":
    514514                    {
    515515
     
    524524                    }
    525525
    526                 case "border_radius":
     526                    case "border_radius":
    527527                    {
    528528
     
    537537                    }
    538538
    539                 case "border_color":
     539                    case "border_color":
    540540                    {
    541541                        jQuery('#tdheading_color').html("Border Color");
     
    548548                    }
    549549
    550                 case "background_color":
     550                    case "background_color":
    551551                    {
    552552                        jQuery('#tdheading_color').html("Background Color");
     
    559559                    }
    560560
    561                 case "color":
     561                    case "color":
    562562                    {
    563563                        jQuery('#tdheading_color').html("Color");
     
    570570                    }
    571571
    572             }
    573 
    574         },
     572                }
     573
     574            },
    575575        //change a map's template
    576576        changeMapTemplate: function() {
     
    774774                    jQuery('#directionsLinkTitle').val(!!settings.directionsLinkTitle ? settings.directionsLinkTitle : "Get Directions");
    775775                    jQuery('#directionsLinkFontSize').val(parseInt(settings.directionsLinkFontSize) > 0 ? settings.directionsLinkFontSize : 1);
     776                    if (typeof settings.descriptionInListItems == "undefined"){
     777                        jQuery('#descriptionInListItems').prop("checked", true);
     778                    } else {
     779                        jQuery('#descriptionInListItems').prop("checked", parseInt(settings.descriptionInListItems) === 1 ? true : false);
     780                    }
    776781
    777782                    jQuery('#mapEditPencil').show();
     
    785790            });
    786791
    787         },
     792},
    788793        //save the CSS element that has been edited
    789794        saveItemValue: function() {
     
    801806            switch (attribute) {
    802807                case "border_style":
    803                     {
    804                         alteredValue = jQuery('#txtDefaultValue_style').val();
    805                         jQuery('#div_edit_style').hide();
    806                         break;
    807                     }
     808                {
     809                    alteredValue = jQuery('#txtDefaultValue_style').val();
     810                    jQuery('#div_edit_style').hide();
     811                    break;
     812                }
    808813                case "font_family":
    809                     {
    810                         alteredValue = jQuery('#txtDefaultValue_fontfamily').val();
    811                         jQuery('#div_edit_fontfamily').hide();
    812                         break;
    813                     }
     814                {
     815                    alteredValue = jQuery('#txtDefaultValue_fontfamily').val();
     816                    jQuery('#div_edit_fontfamily').hide();
     817                    break;
     818                }
    814819
    815820                case "font_size":
    816                     {
    817                         alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
    818                         jQuery('#div_edit_em').hide();
    819                         break;
    820 
    821                     }
     821                {
     822                    alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
     823                    jQuery('#div_edit_em').hide();
     824                    break;
     825
     826                }
    822827
    823828                case "padding":
    824                     {
    825                         alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
    826                         jQuery('#div_edit_em').hide();
    827                         break;
    828                     }
     829                {
     830                    alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
     831                    jQuery('#div_edit_em').hide();
     832                    break;
     833                }
    829834
    830835                case "text_align":
    831                     {
    832                         alteredValue = jQuery('#txtDefaultValue_textalign').val();
    833                         jQuery('#div_edit_textalign').hide();
    834                         break;
    835                     }
     836                {
     837                    alteredValue = jQuery('#txtDefaultValue_textalign').val();
     838                    jQuery('#div_edit_textalign').hide();
     839                    break;
     840                }
    836841
    837842                case "border_width":
    838                     {
    839                         alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
    840                         jQuery('#div_edit_pixel').hide();
    841                         break;
    842                     }
     843                {
     844                    alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
     845                    jQuery('#div_edit_pixel').hide();
     846                    break;
     847                }
    843848                case "width":
    844                     {
    845 
    846                         if (jQuery('#styleElement' + $styleElementIndex).attr('value').indexOf("%") !== -1) {
     849                {
     850
     851                    if (jQuery('#styleElement' + $styleElementIndex).attr('value').indexOf("%") !== -1) {
    847852                            //percentage-based width
    848853                            alteredValue = jQuery('#txtDefaultValue_percentage').val() + "%";
     
    857862                        break;
    858863                    }
    859                 case "height":
     864                    case "height":
    860865                    {
    861866                        alteredValue = jQuery('#txtDefaultValue_pixel').val() + "px";
     
    863868                        break;
    864869                    }
    865                 case "max_height":
     870                    case "max_height":
    866871                    {
    867872                        alteredValue = jQuery('#txtDefaultValue_pixel').val() + "px";
     
    869874                        break;
    870875                    }
    871                 case "margin_top":
     876                    case "margin_top":
    872877                    {
    873878                        alteredValue = jQuery('#txtDefaultValue_margin').val();
     
    877882                        break;
    878883                    }
    879                 case "margin_bottom":
     884                    case "margin_bottom":
    880885                    {
    881886                        alteredValue = jQuery('#txtDefaultValue_margin').val();
     
    885890                        break;
    886891                    }
    887                 case "margin_left":
     892                    case "margin_left":
    888893                    {
    889894                        alteredValue = jQuery('#txtDefaultValue_margin').val();
     
    893898                        break;
    894899                    }
    895                 case "margin_right":
     900                    case "margin_right":
    896901                    {
    897902                        alteredValue = jQuery('#txtDefaultValue_margin').val();
     
    902907                    }
    903908
    904                 case "border_color":
     909                    case "border_color":
    905910                    {
    906911                        alteredValue = '#' + jQuery('#txtDefaultValue_color').val();
     
    909914                        break;
    910915                    }
    911                 case "background_color":
     916                    case "background_color":
    912917                    {
    913918                        alteredValue = '#' + jQuery('#txtDefaultValue_color').val();
     
    916921                        break;
    917922                    }
    918                 case "color":
     923                    case "color":
    919924                    {
    920925                        alteredValue = '#' + jQuery('#txtDefaultValue_color').val();
     
    923928                        break;
    924929                    }
    925                 case "z-index":
     930                    case "z-index":
    926931                    {
    927932                        alteredValue = jQuery('#txtDefaultValue_pixel').val();
     
    929934                        break;
    930935                    }
    931                 case "border_radius":
     936                    case "border_radius":
    932937                    {
    933938                        alteredValue = jQuery('#txtDefaultValue_pixel').val() + jQuery('#txtDefaultValue_pixel_em').val();
     
    935940                        break;
    936941                    }
    937             }
    938 
    939             if ($styleSelectedElement === 1) {
    940                 jQuery('#styleElement' + $styleElementIndex).attr('value', alteredValue);
    941                 jQuery('#styleElement' + $styleElementIndex).html(normaliseCSSElement(attribute) + ' (' + alteredValue + ')');
    942 
    943             }
    944             else if ($styleSelectedElement === 2) {
    945                 jQuery('#styleList' + $styleElementIndex).attr('value', alteredValue);
    946                 jQuery('#styleList' + $styleElementIndex).html(normaliseCSSElement(attribute) + ' (' + alteredValue + ')');
    947 
    948             }
    949             else {
    950                 jQuery('#styleHeading' + $styleElementIndex).attr('value', alteredValue);
    951                 jQuery('#styleHeading' + $styleElementIndex).html(normaliseCSSElement(attribute) + ' (' + alteredValue + ')');
    952 
    953             }
    954 
    955             refreshExampleMap(true);
    956         },
     942                }
     943
     944                if ($styleSelectedElement === 1) {
     945                    jQuery('#styleElement' + $styleElementIndex).attr('value', alteredValue);
     946                    jQuery('#styleElement' + $styleElementIndex).html(normaliseCSSElement(attribute) + ' (' + alteredValue + ')');
     947
     948                }
     949                else if ($styleSelectedElement === 2) {
     950                    jQuery('#styleList' + $styleElementIndex).attr('value', alteredValue);
     951                    jQuery('#styleList' + $styleElementIndex).html(normaliseCSSElement(attribute) + ' (' + alteredValue + ')');
     952
     953                }
     954                else {
     955                    jQuery('#styleHeading' + $styleElementIndex).attr('value', alteredValue);
     956                    jQuery('#styleHeading' + $styleElementIndex).html(normaliseCSSElement(attribute) + ' (' + alteredValue + ')');
     957
     958                }
     959
     960                refreshExampleMap(true);
     961            },
    957962        //save the map to the database
    958963        saveMap: function(redirect, showMapID) {
     
    971976            var $directionsLinkTitle = encodeURIComponent(jQuery('#directionsLinkTitle').val());
    972977            var $directionsLinkFontSize = jQuery('#directionsLinkFontSize').val();
     978
     979            var $descriptionInListItems = jQuery('#descriptionInListItems').prop("checked") ? "1" : "0";
    973980
    974981            if ($map != null) {
     
    9941001            var $styles = [];
    9951002            for (var t = 0; t < $arrThemes.length; t++) {
    996                
     1003
    9971004                if($mapTheme == parseInt($arrThemes[t].ID)){
    9981005                    if ($arrThemes[t].Styles != null && $arrThemes[t].Styles.length > 0){
     
    10401047                showDirections: $showDirections,
    10411048                directionsLinkTitle: $directionsLinkTitle,
    1042                 directionsLinkFontSize: $directionsLinkFontSize
     1049                directionsLinkFontSize: $directionsLinkFontSize,
     1050                descriptionInListItems : $descriptionInListItems
    10431051            };
    10441052            var options = {
     
    10981106                }
    10991107            });
    1100         },
     1108},
    11011109        //save the map to the database
    11021110        saveMapName: function() {
     
    11431151
    11441152                jQuery.when(easy2map_map_functions.saveMap(false, false)).then(
    1145                         function(data, textStatus, jqXHR) {
    1146                             window.location = '?page=easy2map&action=mapimportcsv&map_id=' + $mapID;
    1147                         });
     1153                    function(data, textStatus, jqXHR) {
     1154                        window.location = '?page=easy2map&action=mapimportcsv&map_id=' + $mapID;
     1155                    });
    11481156            } else {
    11491157                window.location = '?page=easy2map&action=mapimportcsv&map_id=' + $mapID;
     
    11561164
    11571165                jQuery.when(easy2map_map_functions.saveMap(false, false)).then(
    1158                         function(data, textStatus, jqXHR) {
    1159                             window.location = '?page=easy2map&action=mapimportcsv2&map_id=' + $mapID;
    1160                         });
     1166                    function(data, textStatus, jqXHR) {
     1167                        window.location = '?page=easy2map&action=mapimportcsv2&map_id=' + $mapID;
     1168                    });
    11611169            } else {
    11621170                window.location = '?page=easy2map&action=mapimportcsv2&map_id=' + $mapID;
  • easy2map/trunk/scripts/functions.mappin.admin.js

    r1178300 r1191455  
    492492                        jQuery('#ulEasy2MapPinList').find('li').remove();
    493493                        jQuery('#divAddressSearch').show();
     494                        var descriptionInListItems = jQuery('#descriptionInListItems').prop("checked") ? true : false;
    494495
    495496                        var noPinsFound = false;
     
    628629                                tr2.appendChild(imageTd2);
    629630                                tr2.appendChild(nameTd2);
    630                                 tblPinList.appendChild(tr3);
    631                                 tr3.appendChild(descriptionTd);
     631
     632                                if (descriptionInListItems){
     633                                    tblPinList.appendChild(tr3);
     634                                    tr3.appendChild(descriptionTd);
     635                                }
     636
    632637                                tblPinList.appendChild(tr4);
    633638                                tr4.appendChild(emptyTd);
     
    715720                                        tr2.appendChild(nameTd2);
    716721                                        tblPinList.appendChild(tr3);
    717                                         tr3.appendChild(descriptionTd);
    718                                         tblPinList.appendChild(tr4);
     722
     723                                        if (descriptionInListItems){
     724                                            tr3.appendChild(descriptionTd);
     725                                            tblPinList.appendChild(tr4);
     726                                        }
     727
    719728                                        tr4.appendChild(emptyTd);
    720729
     
    723732                                        tr2.appendChild(imageTd2);
    724733                                        tr2.appendChild(nameTd2);
    725                                         tr3.appendChild(descriptionTd);
     734                                        if (descriptionInListItems){
     735                                            tr3.appendChild(descriptionTd);
     736                                        }
    726737                                        tr4.appendChild(emptyTd);
    727738                                    }
     
    783794                                tr2.appendChild(imageTd2);
    784795                                tr2.appendChild(nameTd2);
    785                                 tbl.appendChild(tr3);
    786                                 tr3.appendChild(descriptionTd);
     796                                if (descriptionInListItems){
     797                                    tbl.appendChild(tr3);
     798                                    tr3.appendChild(descriptionTd);
     799                                }
    787800
    788801                                li.appendChild(tbl);
Note: See TracChangeset for help on using the changeset viewer.