Sha256: 6b0532407b4216f06949a908b39c5099fd05ef79c3c65232892cb5b624f0ae1e

Contents?: true

Size: 491 Bytes

Versions: 32

Compression:

Stored size: 491 Bytes

Contents

export default class IngredientAnchorLink {
  static updateIcon(ingredientId, active = false) {
    const ingredientEditor = document.querySelector(
      `[data-ingredient-id="${ingredientId}"]`
    )
    if (ingredientEditor) {
      const icon = ingredientEditor.querySelector(
        ".edit-ingredient-anchor-link > a > .icon"
      )
      if (icon) {
        active
          ? icon.classList.replace("far", "fas")
          : icon.classList.replace("fas", "far")
      }
    }
  }
}

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
alchemy_cms-7.0.16 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.15 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-6.1.10 package/src/ingredient_anchor_link.js
alchemy_cms-7.0.14 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.13 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.12 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.11 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.10 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.9 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.8 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.7 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.6 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.5 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.4 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-7.0.3 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-6.1.9 package/src/ingredient_anchor_link.js
alchemy_cms-7.0.2 app/javascript/alchemy_admin/ingredient_anchor_link.js
alchemy_cms-6.1.8 package/src/ingredient_anchor_link.js
alchemy_cms-6.1.7 package/src/ingredient_anchor_link.js
alchemy_cms-7.0.1 app/javascript/alchemy_admin/ingredient_anchor_link.js