Sha256: fdf83a87d45cf60d177634111ec09f09767bc07b368c5acc91c77d8d103661af

Contents?: true

Size: 743 Bytes

Versions: 28

Compression:

Stored size: 743 Bytes

Contents

root = exports ? this

root.taxon_tree_menu = (obj, context) ->

  base_url = Spree.routes.taxonomy_taxons_path
  admin_base_url = Spree.routes.admin_taxonomy_taxons_path
  edit_url = "#{admin_base_url}/#{obj.attr("id")}/edit"

  create:
    label: "<i class='fa fa-plus'></i> " + Spree.translations.add,
    action: (obj) -> context.create(obj)
  rename:
    label: "<i class='fa fa-pencil'></i> " + Spree.translations.rename,
    action: (obj) -> context.rename(obj)
  remove:
    label: "<i class='fa fa-trash'></i> " + Spree.translations.remove,
    action: (obj) -> context.remove(obj)
  edit:
    separator_before: true,
    label: "<i class='fa fa-edit'></i> " + Spree.translations.edit,
    action: (obj) -> window.location = edit_url

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
solidus_backend-1.2.3 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.4 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.0.7 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.0.6 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.2.2 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.2.1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.3 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.0.5 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.2.0 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.2.0.rc2 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.0.4 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.2 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.2.0.rc1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.2.0.beta1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.0.3 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.0 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.0.pre2 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.0.pre1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
solidus_backend-1.1.0.beta1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee