order heading listing Column

New home Forums Pro Add-on order heading listing Column

  • This topic has 21 replies, 1 voice, and was last updated 1 week, 1 day ago by Steven.
Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #60692
    maro
    Participant

    Hi,
    I have reday a custom field but it is displayed at the end of the list
    is it possible to modify the order of the list to have this field in the 2nd column ?
    Thnaks

    #60696

    Hi there,

    Thanks so much for getting in touch.

    It is possible to change the order of custom fields from the custom field editor page (Maps > Custom Fields), by clicking and dragging the handler icon (three vertical bars) on the left side of each custom field.
    You can drag these in the position you want them displayed and then save the settings to update it.

    Please let me know if this works as expected for you.

    Thanks.

    Best regards,
    Dylan

    #60698
    maro
    Participant

    hi Dylan,
    i want to order the custome field whit the default fields like the titre , description etc

    #60707

    Hi Maro,

    Thanks for your response and for confirming.

    This can be accomplished with some custom code, which I would be happy to help with.

    In order to assist you with this further, could I kindly ask if you could send me a link to your map and confirm in which order you would like the columns to be displayed?

    Thanks for your time.

    Best regards,
    Dylan

    #60712
    maro
    Participant
    This reply has been marked as private.
    #60721

    Hi there,

    Thanks for the response and information.

    Could I kindly ask you to install this custom plugin which re-orders the columns based on your order (title, custom field #7, address, description and link):
    https://drive.google.com/file/d/1dKjj5oOV0GojFPs5QYpJY3njIHcXQbT0/view?usp=sharing

    Once installed and activated, it should automatically re-order the columns accordingly.

    Please let me know if this works as expected.

    Thanks.

    Kindest regards,
    Dylan

    #60723
    maro
    Participant

    Hi Daylan,
    Thanks it ‘s work.
    Kindest regards
    Maro

    #60724

    Hi Maro,

    That is great to hear and it is only a pleasure.

    Please let me know if there is ever anything else I can assist you with.

    Kindest regards,
    Dylan

    #60731
    maro
    Participant

    hi,
    I forgot to specify that the site will be multilingual afterwards.
    I have modified the labels by js I don’t know what to do if I activate the multilingual.

    jQuery(function(){
      jQuery(document.body).on("infowindowopen.wpgmza", function(e){
        jQuery(".wpgmza-infowindow p").each(function(){
          var customFieldTitle = jQuery(this).data("custom-field-name");
          if(customFieldTitle){
            jQuery(this).html("" + customFieldTitle + ": " + jQuery(this).text());
          }
        });
      });
    
      jQuery(document).ready(function(){
        jQuery("#wpgmza_marker_holder_3 th:nth-child(2)").text("Patron(s)");
        jQuery("#wpgmza_marker_holder_3 th:nth-child(5)").text("Contact");
    jQuery("#wpgmza_marker_holder_3 th:nth-child(6)").text("Fiche fabricant");
      });
    }); 
    #60745

    Hi Maro,

    Thanks for the response and letting me know.

    The language can be determined by this line of JavaScript:
    var lang = jQuery(‘html’).attr(‘lang’);

    Then the code that changes the labels can be changed to the below in order to set the labels according to the language:
    jQuery(document).ready(function(){
    var lang = jQuery(‘html’).attr(‘lang’);
    var titleLabel = “Patron(s)”;
    var contactLabel = “Contact”;
    var linkLabel = “Fiche fabricant”;

    if (lang == ‘fr-FR’) {
    titleLabel = “French title”;
    contactLabel = “French contact”;
    linkLabel = “French link”;
    } else if (lang == ‘es-ES’) {
    titleLabel = “Spanish title”;
    contactLabel = “Spanish contact”;
    linkLabel = “Spanish link”;
    }
    jQuery(“#wpgmza_marker_holder_3 th:nth-child(2)”).text(titleLabel);
    jQuery(“#wpgmza_marker_holder_3 th:nth-child(5)”).text(contactLabel);
    jQuery(“#wpgmza_marker_holder_3 th:nth-child(6)”).text(linkLabel);
    });

    I hope this helps and please let me know if it works as expected.

    Thanks.

    Kindest regards,
    Dylan

    #60767
    maro
    Participant

    hi,
    i have changed text “more detial” in infoswindows, but i cant change it in the table.
    Thanks

    #60775

    Hi Maro,

    Thanks for letting me know.

    Because this content is dynamically loaded and refreshed, it will require different code, which I have prepared below:

    jQuery(document).ready(function(){
    var parent = WPGMZA.AdvancedTableDataTable.prototype.getDataTableSettings;
    WPGMZA.AdvancedTableDataTable.prototype.getDataTableSettings = function()
    {
    var settings = parent.apply(this, arguments);
    settings.columnDefs = [
    {
    “render”: function ( data, type, row ) {
    var label = ‘More details text’;
    return ” + label + ”;
    },
    “targets”: 5
    },
    ];
    return settings;
    }
    });

    Could I kindly ask you to add the code above, setting the ‘More details text’ text to your required text?

    Please let me know if this helps as expected.

    Thanks again for your time.

    Best regards,
    Dylan

    #60776
    maro
    Participant

    thanks,
    i have erreur in this line :var settings = parent.apply(this, arguments);
    Uncaught TypeError: parent.apply is not a function

    #60777
    maro
    Participant

    [quote quote=60776]thanks,
    i have erreur in this line :var settings = parent.apply(this, arguments);
    Uncaught TypeError: parent.apply is not a function[/quote]
    it work but
    my content is like this:
    <td class="wpgmza_table_link"><a target="_BLANK" href="http://preprod.charcuterie-vaudoise.ch/boucherie-du-chateau-et-chateaubriand-a-morges/">More Details</a></td>
    know i have only the lable :”+ label + ” without and if i dont have data in column, it show the label

    #60778
    maro
    Participant

    i have add condition for check if the row have content or not befor edit the label “more detail”

    if (row[5].length == 0){
    							return data;
    						}else{
    							return data +' ('+ labelMore +')';
    						}
Viewing 15 posts - 1 through 15 (of 39 total)
  • You must be logged in to reply to this topic.