Sha256: 87b365fb571d381d201cb637fed600b1c92529acdf780e4aab1dd8740aa8256f

Contents?: true

Size: 555 Bytes

Versions: 11

Compression:

Stored size: 555 Bytes

Contents

@init_sortable_menu = ->
  $menu = $("#menu")
  return  if $menu.length == 0
  $menu.sortable(
    axis: "x"
    cursor: "crosshair"
    connectWith: ".nested"
    update: ->
      $.post "/refinery/update_menu_positions", $menu.sortable("serialize", 
        key: "menu[]"
        expression: /plugin_([\w]*)$/
      )
  ).tabs()
  $menu.sortable "disable"
  $menu.find("#menu_reorder").click (e) ->
    trigger_reordering e, true
  
  $menu.find("#menu_reorder_done").click (e) ->
    trigger_reordering e, false
  
  $menu.find("> a").corner "top 5px"

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
refinerycms-core-2.0.10 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.9 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.8 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.7 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.6 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.5 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.4 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.3 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.2 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.1 app/assets/javascripts/refinery/sortable_menu.js.coffee
refinerycms-core-2.0.0 app/assets/javascripts/refinery/sortable_menu.js.coffee