multiple profile2 + multiple getlocations field on jquery tabs

Error message

  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in require_once() (line 818 of /home/xenyomed/public_html/sites/all/modules/libraries/libraries.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context has a deprecated constructor in require_once() (line 127 of /home/xenyomed/public_html/sites/all/modules/ctools/ctools.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context_required has a deprecated constructor in require_once() (line 127 of /home/xenyomed/public_html/sites/all/modules/ctools/ctools.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context_optional has a deprecated constructor in require_once() (line 127 of /home/xenyomed/public_html/sites/all/modules/ctools/ctools.module).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 579 of /home/xenyomed/public_html/includes/menu.inc).

WE HAVE MOVED!

Please visit our new Drupal Website at https://www.xenyo.com.

  //we need profile2 + field_group + field_multiple + getlocations modules
  drupal_add_css("http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css", array('type' => 'external'));
   drupal_add_js("http://code.jquery.com/ui/1.9.2/jquery-ui.js");
 
    drupal_add_js( '
    $= jQuery;
    $(document).ready(function() {
      $(".ui-tabs-anchor").live("click", function() {
        $.each(Drupal.settings.getlocations_fields, function (key, settings) {
          if(getlocations_map[key] != undefined) {
             google.maps.event.trigger(getlocations_map[key], "resize");   // this will fix google map display problem
           }
        })
      })
    function tabme() {   //create ul list for jquery ui tabs
      window.tabstr = "<ul>";
      $(".field-group-multiple .multiple-inline-element").each(function(i,e) {
        var tabname = "tabs-"+i;
        $(this).attr("id", tabname);
        window.tabstr += "<li><a href=\'#" + tabname + "\'>" + "Profile" + (i+1) + "</a></li>";
      })
      window.tabstr += "</ul>";
      $(".field-group-multiple").prepend(window.tabstr);
      $(".field-group-multiple").tabs();
      getlocations_init();   //reinitialize map display , see getlocations.js
      getlocations_fields_init();  //reinitialize geocoder , see getlocations_fields.js
      Drupal.attachBehaviors(document);
  }
    $("body").ajaxComplete(function(event,request, settings){
      if(settings.context.extraData._triggering_element_value != undefined && settings.context.extraData._triggering_element_value  == "Add another item") {  // while mulitiple profile add more button is clicked
        tabme();
      }
    });
    tabme();
  });
   ', 'inline');
Help Share this Article