Sha256: 03a429cd4f9a9dfc8092d42ab08483c93213d3f6e44ee2854e1485a0fac939dd

Contents?: true

Size: 865 Bytes

Versions: 73

Compression:

Stored size: 865 Bytes

Contents

root = exports ? this

root.taxon_tree_menu = (obj, context) ->

  base_url = Spree.url(Spree.routes.taxonomy_taxons_path)
  admin_base_url = Spree.url(Spree.routes.admin_taxonomy_taxons_path)
  edit_url = admin_base_url.clone()
  edit_url.setPath(edit_url.path() + '/' + obj.attr("id") + "/edit");

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

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
spree_backend-3.4.6 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.2.9 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.1.14 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.6 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.5 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.4 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.3 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.2 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.0 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.5.0 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.3.6 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.2.8 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.1.13 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.6.0.rc1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.5.0.rc2 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.5.0.rc1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.4.5 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.3.5 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-3.4.4 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee