Expand All | Collapse All

Kontaktdaten:

Bild

').appendTo("#images_wrapper"); if (images_number
').dialog({ width: ($(window).width()*0.5), height: ($(window).height()*0.8), modal: true, resizable: false, draggable: false, title: 'Select map marker icon ', open: function() { w2dc_ajax_loader_show(); $.ajax({ type: "POST", url: w2dc_js_objects.ajaxurl, data: {'action': 'w2dc_select_field_icon'}, dataType: 'html', success: function(response_from_the_action_function){ if (response_from_the_action_function != 0) { $('#select_marker_icon_dialog').html(response_from_the_action_function); if (map_icon_file_input.val()) $("#"+map_icon_file_input.val()).addClass("w2dc-selected-icon"); } }, complete: function() { w2dc_ajax_loader_hide(); } }); $(document).on("click", ".ui-widget-overlay", function() { $('#select_marker_icon_dialog').remove(); }); }, close: function() { $('#select_field_icon_dialog').remove(); } }); }); $(document).on("click", ".w2dc-fa-icon", function() { $(".w2dc-selected-icon").removeClass("w2dc-selected-icon"); if (map_icon_file_input) { map_icon_file_input.val($(this).attr('id')); map_icon_file_input = false; $(this).addClass("w2dc-selected-icon"); $('#select_marker_icon_dialog').remove(); w2dc_generateMap_backend(); } }); $(document).on("click", "#reset_fa_icon", function() { if (map_icon_file_input) { $(".w2dc-selected-icon").removeClass("w2dc-selected-icon"); map_icon_file_input.val(''); map_icon_file_input = false; $('#select_marker_icon_dialog').remove(); w2dc_generateMap_backend(); } }); $(".add_address").click(function() { w2dc_ajax_loader_show(); $.ajax({ type: "POST", url: w2dc_js_objects.ajaxurl, data: {'action': 'w2dc_add_location_in_metabox', 'post_id': 38912}, success: function(response_from_the_action_function){ if (response_from_the_action_function != 0) { $("#w2dc-locations-wrapper").append(response_from_the_action_function); $(".delete_location").show(); if (locations_number == $(".w2dc-location-in-metabox").length) $(".add_address").hide(); w2dc_setupAutocomplete(); } }, complete: function() { w2dc_ajax_loader_hide(); } }); }); $(document).on("click", ".delete_location", function() { $(this).parents(".w2dc-location-in-metabox").remove(); if ($(".w2dc-location-in-metabox").length == 1) $(".delete_location").hide(); w2dc_generateMap_backend(); if (locations_number > $(".w2dc-location-in-metabox").length) $(".add_address").show(); }); $(document).on("click", ".w2dc-manual-coords", function() { if ($(this).is(":checked")) $(this).parents(".w2dc-manual-coords-wrapper").find(".w2dc-manual-coords-block").show(200); else $(this).parents(".w2dc-manual-coords-wrapper").find(".w2dc-manual-coords-block").hide(200); }); if (locations_number > $(".w2dc-location-in-metabox").length) $(".add_address").show(); }); })(jQuery);