Sha256: 157cecf377160c5e3fbaf949955c1b781d71f4709c57d017db340d875e6a0ce3

Contents?: true

Size: 822 Bytes

Versions: 30

Compression:

Stored size: 822 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: "<i class='icon-plus'></i> " + Spree.translations.add,
    action: (obj) -> context.create(obj)
  rename:
    label: "<i class='icon-pencil'></i> " + Spree.translations.rename,
    action: (obj) -> context.rename(obj)
  remove:
    label: "<i class='icon-trash'></i> " + Spree.translations.remove,
    action: (obj) -> context.remove(obj)
  edit:
    separator_before: true,
    label: "<i class='icon-edit'></i> " + Spree.translations.edit,
    action: (obj) -> window.location = edit_url.toString()

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
spree_backend-2.1.12 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.11 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.10 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.13 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.9 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.8 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.12 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.7 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.11 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.10 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.2.1 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-2.1.6 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.2.0 app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
spree_backend-2.1.5 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.9 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.4 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.8 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.3 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.0.7 app/assets/javascripts/admin/taxon_tree_menu.js.coffee
spree_backend-2.1.2 app/assets/javascripts/admin/taxon_tree_menu.js.coffee