Plugin Directory

Changeset 3346534


Ignore:
Timestamp:
08/18/2025 03:34:18 PM (7 months ago)
Author:
wpmart
Message:

modified

Location:
image-map-hotspots/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • image-map-hotspots/trunk/assets/js/imh-6310-admin-script.js

    r3330659 r3346534  
    245245        `#${parentId} .imh-6310-tooltip_img_section .imh-6310-type-${val}:first, #imh_6310_custom_code-html, .imh_6310_custom_code_popup-html`
    246246      ).trigger("click");
    247     } else if(val == 3){
     247    } else if (val == 3) {
    248248      jQuery(".imh_6310_custom_template").removeClass("imh-6310-hide");
    249249      jQuery(
     
    251251      ).addClass("imh-6310-hide");
    252252      jQuery(".imh_6310_template_description").addClass("imh-6310-hide");
    253     } else if(val == 5){
     253    } else if (val == 5) {
    254254      jQuery(
    255255        '.imh_6310_font_prop, .imh_6310_template_embedded, .toggle-tabs li[data-id="3"], .imh_6310_template_description'
    256256      ).addClass("imh-6310-hide");
    257257      jQuery(".imh_6310_woocommerce_image").removeClass("imh-6310-hide");
    258     }
    259     else if(val == 6){
     258    } else if (val == 6) {
    260259      jQuery(
    261260        '.imh_6310_font_prop, .imh_6310_template_embedded, .toggle-tabs li[data-id="3"], .imh_6310_template_description'
     
    613612    });
    614613  });
     614
    615615  /* ######### Custom Icon For Zoom In/Out End ########### */
    616 
    617616  const zoomFeature = Number(
    618617    jQuery("input[name='zoom_feature']:checked").val()
     
    621620    ? jQuery(".toggle-zoom-feature").show()
    622621    : jQuery(".toggle-zoom-feature").hide();
     622
     623  let zoomValue = jQuery("select[name='icon_position']").val();
     624  if (
     625    (zoomValue === "right-top" ||
     626      zoomValue === "right-bottom" ||
     627      zoomValue === "left-top" ||
     628      zoomValue === "left-bottom") &&
     629    zoomFeature > 1
     630  ) {
     631    jQuery(".toggle-zoom-feature-background").show();
     632  } else {
     633    jQuery(".toggle-zoom-feature-background").hide();
     634  }
    623635
    624636  jQuery("body").on("change", "input[name='zoom_feature']", function () {
     
    627639      ? jQuery(".toggle-zoom-feature").show()
    628640      : jQuery(".toggle-zoom-feature").hide();
     641
     642    const zoomValue = jQuery("select[name='icon_position']").val();
     643    if (
     644      (zoomValue === "right-top" ||
     645        zoomValue === "right-bottom" ||
     646        zoomValue === "left-top" ||
     647        zoomValue === "left-bottom") &&
     648      value > 1
     649    ) {
     650      jQuery(".toggle-zoom-feature-background").show();
     651    } else {
     652      jQuery(".toggle-zoom-feature-background").hide();
     653    }
     654  });
     655
     656  jQuery("body").on("change", "select[name='icon_position']", function () {
     657    const value = jQuery(this).val();
     658    if (
     659      value === "right-top" ||
     660      value === "right-bottom" ||
     661      value === "left-top" ||
     662      value === "left-bottom"
     663    ) {
     664      jQuery(".toggle-zoom-feature-background").show();
     665    } else {
     666      jQuery(".toggle-zoom-feature-background").hide();
     667    }
    629668  });
    630669}
  • image-map-hotspots/trunk/assets/js/json-data.js

    r3156447 r3346534  
     1imh_6310_reset_fields();
    12function generateJSON(selector = "#imh-6310-add-point ") {
    23  let myObj = {};
     
    3738  ).val();
    3839  myObj.blinkTooltip = jQuery(selector + ".imh-6310_blink_type:checked").val();
    39   myObj.glowColor = jQuery(selector + ".imh_6310_fontawesome_icon_glow_color").val();
     40  myObj.glowColor = jQuery(
     41    selector + ".imh_6310_fontawesome_icon_glow_color"
     42  ).val();
    4043
    4144  // check element type
     
    4851  myObj.selectedTemplate = "01";
    4952
    50    myObj.popupCustomHtml = jQuery(selector + `textarea[name='imh_6310_popup_custom_html']`).val()
    51   ;
    52   myObj.popupCustomCss = jQuery(selector + `textarea[name='imh_6310_popup_custom_css']`).val()
    53   ;
     53  myObj.popupCustomHtml = jQuery(
     54    selector + `textarea[name='imh_6310_popup_custom_html']`
     55  ).val();
     56  myObj.popupCustomCss = jQuery(
     57    selector + `textarea[name='imh_6310_popup_custom_css']`
     58  ).val();
    5459  myObj.popupCustomCodeWidth = jQuery(
    5560    selector + ".imh_6310_custom_popup_width"
     
    116121  myObj.elementType = elementType;
    117122
    118 
    119     myCSS.styleCSS = `
     123  myCSS.styleCSS = `
    120124    .imh-6310-drag[data-id='${window.currentPoint}'] .imh-6310-pin-main-img{
    121125        color: ${myObj.fontAwesomeIconColor} !important;
     
    128132   
    129133  `;
    130  
    131  
    132134
    133135  //imh_6310_reset_fields();
     
    213215  jQuery(".imh_6310_fontawesome_icon_glow_color").val(jsonData.glowColor);
    214216  jQuery(".imh_6310_fontawesome_icon_glow_color")
    215   .closest("div")
    216   .find(".minicolors-swatch-color")
    217   .css({
    218     "background-color": jsonData.glowColor,
    219   });
    220  
     217    .closest("div")
     218    .find(".minicolors-swatch-color")
     219    .css({
     220      "background-color": jsonData.glowColor,
     221    });
     222
    221223  jQuery(".imh_6310_custom_text_font_color")
    222224    .closest("div")
     
    252254  );
    253255  jQuery(".imh-6310-tooltip_discription_font_color")
    254   .closest("div")
    255   .find(".minicolors-swatch-color")
    256   .css({
    257     "background-color": jsonData.openDesFontColor,
    258   });
     256    .closest("div")
     257    .find(".minicolors-swatch-color")
     258    .css({
     259      "background-color": jsonData.openDesFontColor,
     260    });
    259261  jQuery(".tooltip_discription_font_color")
    260262    .closest("div")
     
    320322
    321323    //Uncommon fields
    322    
    323324  }
    324  if(jsonData.elementType == 1) {
     325  if (jsonData.elementType == 1) {
    325326    jQuery("#imh-6310-edit-point .imh-6310-tooltip-link").removeClass(
    326327      "imh-6310-hide"
     
    342343  let fieldList =
    343344    ".icons-1, .icons-2, .imh-6310-image-edit-1, .imh-6310-image-edit-2, .imh-6310_custom_enter_text, .imh_6310_custom_text_font_size, .imh_6310_custom_text_font_color, .imh_6310_custom_text_font_bg_color, .imh_6310_fontawesome_icon_color, .imh_6310_fontawesome_icon_hover_color, .imh-6310_icon_size, .imh-6310_icon_size_in_mobile, .img_or_icon_size, .img_or_icon_size_in_mobile, .imh_6310_link_text, .imh_6310_custom_link_url, .popup_embedded, .imh_6310_template_font_color, .imh_6310_template_bg_color, .imh_6310_template_font_size, .imh-6310-embedded_code_link, .imh-6310-tooltip_discription, .imh-6310-tooltip_discription_font_size, .imh_6310_fontawesome_icon_glow_color, .imh-6310-tooltip_discription_font_color, .imh-6310-button-text, .imh-6310-button-url, .imh_6310_button_text_color, .imh_6310_button_bg_color, .imh_6310_button_text_size, .imh-6310-custome_html, .imh-6310-custome_css, .imh_6310_custom_popup_width, .imh_6310_popup_custom_html, .imh_6310_popup_custom_css";
    344     fieldList = fieldList.split(",");
     345  fieldList = fieldList.split(",");
    345346  // setTimeout(function () {
    346347  for (let i = 0; i < fieldList.length; i++) {
     
    371372  jQuery(".imh_6310_textarea").addClass("imh-6310-hide");
    372373
    373   setTimeout(function() {
     374  setTimeout(function () {
    374375    if (jQuery(".imh_6310_color_picker").length) {
    375376      jQuery(".imh_6310_color_picker").each(function () {
     
    425426          "data-position",
    426427          `${xPos}-${yPos}-${tWidth}-${iconWidth}`
    427         );     
     428        );
    428429      },
    429430    });
  • image-map-hotspots/trunk/index.php

    r3330659 r3346534  
    66  Author: Sk Abul Hasan
    77  Author URI: https://www.wpmart.org/
    8   Version: 2.9
     8  Version: 3.0
    99 */
    1010
     
    1414define('imh_6310_plugin_url', plugin_dir_path(__FILE__));
    1515define('imh_6310_plugin_dir_url', plugin_dir_url(__FILE__));
    16 define('imh_6310_PLUGIN_CURRENT_VERSION', 2.9);
     16define('imh_6310_PLUGIN_CURRENT_VERSION', 3.0);
    1717
    1818add_shortcode('imh_6310_image_map', 'imh_6310_image_map_shortcode');
  • image-map-hotspots/trunk/readme.txt

    r3330659 r3346534  
    44Requires at least: 5.4
    55Tested up to: 6.8
    6 Stable tag: 2.9
     6Stable tag: 3.0
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    136136
    137137== Changelog ==
     138= 3.0 =
     139* More option added in Zoom In/Out
     140
    138141= 2.9 =
    139142* Added other plugin shortcodes option
  • image-map-hotspots/trunk/settings/form.php

    r3156447 r3346534  
    7171                </td>
    7272              </tr>
    73               <tr height="50" class="toggle-zoom-feature">
     73              <tr height="50" class="toggle-zoom-feature" style="background: #f2f2f2 !important;">
    7474                <td>
    7575                  <b>Zoom Out Icon <span class="imh-6310-pro">(Pro)</span>:</b><br />
     
    8181                </td>
    8282              </tr>
    83               <tr height="50" class="toggle-zoom-feature">
     83              <tr height="50" class="toggle-zoom-feature" style="background: #fff !important;">
    8484                <td>
    8585                  <b>Desktop Icon Size <span class="imh-6310-pro">(Pro)</span>:</b><br />
     
    8989                </td>
    9090              </tr>
    91               <tr height="50" class="toggle-zoom-feature">
     91              <tr height="50" class="toggle-zoom-feature" style="background: #f2f2f2 !important;">
    9292                <td>
    9393                  <b>Mobile Icon Size <span class="imh-6310-pro">(Pro)</span>:</b><br />
     
    9797                </td>
    9898              </tr>
    99               <tr height="50" class="toggle-zoom-feature">
     99              <tr height="50" class="toggle-zoom-feature" style="background: #fff !important;">
    100100                <td>
    101101                  <b>Icon Position <span class="imh-6310-pro">(Pro)</span>:</b><br />
     
    103103                <td>
    104104                  <select name="icon_position" class="imh-6310-form-input">
    105                     <option value="flex-start">Left</option>
    106                     <option value="center" <?php echo isset($cssData['icon_position']) && ($cssData['icon_position'] == 'center') ? ' selected' : '' ?>>Center</option>
    107                     <option value="flex-end" <?php echo isset($cssData['icon_position']) && ($cssData['icon_position'] == 'flex-end') ? ' selected' : '' ?>>Right</option>
     105                    <?php
     106                      $positions = [
     107                        'right-top' => 'Right Top',
     108                        'right-bottom' => 'Right Bottom',
     109                        'left-top' => 'Left Top',
     110                        'left-bottom' => 'Left Bottom',
     111                        'flex-start' => 'Left',
     112                        'center' => 'Center',
     113                        'flex-end' => 'Right',
     114                      ];
     115
     116                      $selectedKey = isset($cssData['icon_position']) ? $cssData['icon_position'] : 'right-top';
     117                      foreach ($positions as $key => $label) {
     118                        $selected = ($key === $selectedKey) ? ' selected' : '';
     119                        echo "<option value=\"{$key}\"{$selected}>{$label}</option>\n";
     120                      }
     121                    ?>
    108122                  </select>
     123                </td>
     124              </tr>
     125              <tr height="40px" class="toggle-zoom-feature toggle-zoom-feature-background" style="background: #f2f2f2 !important;">
     126                <td><label class="imh-6310-form-label" for="icons">Icon Background:</label><span class="imh-6310-pro">(Pro)</span></td>
     127                <td>
     128                  <input type="text" name="icon_background" class="imh_6310_icon_background imh-6310-form-input imh_6310_color_picker" data-opacity="0.8" data-format="rgb" value="<?php echo isset($cssData['icon_background']) ? esc_attr($cssData['icon_background']) : 'rgba(0, 0, 0, 0.9)' ?>">
    109129                </td>
    110130              </tr>
Note: See TracChangeset for help on using the changeset viewer.