Sha256: cc64f9ca9f60cccea5654c6adbf335010bb8c54add47d88fec02ed5e2f28c24b

Contents?: true

Size: 1.38 KB

Versions: 5

Compression:

Stored size: 1.38 KB

Contents

@init_interface = ->
  $("body#dialog_container.dialog").addClass "iframed" if parent and parent.document.location.href != document.location.href
  $("input:submit:not(.button)").addClass "button"

  if typeof(visual_editor_init_interface_hook) != 'undefined'
    visual_editor_init_interface_hook()

  $("#current_locale li a").click (e) ->
    $("#current_locale li a span.action").each (span) ->
      $(this).css "display", (if $(this).css("display") == "none" then "" else "none")

    $("#other_locales").animate
      opacity: "toggle"
      height: "toggle"
    , 250
    $("html,body").animate scrollTop: $("#other_locales").parent().offset().top, 250
    e.preventDefault()

  $("#existing_image img").on 'load', ->
    margin_top = ($("#existing_image").height() - $("form.edit_image").height() + 8)
    $("form.edit_image .form-actions").css "margin-top": margin_top if margin_top > 0

  $(".form-actions .form-actions-left input:submit#submit_button").click (e) ->
    $(this).nextAll('#spinner').removeClass('hidden_icon').addClass('unhidden_icon')

  $(".form-actions.form-actions-dialog .form-actions-left a.close_dialog").click (e) ->
    titlebar_close_button = $('.ui-dialog-titlebar-close')
    titlebar_close_button = parent.$('.ui-dialog-titlebar-close') if parent
    titlebar_close_button.trigger('click')
    e.preventDefault()

  $("a.suppress").on "click", (e) ->
    e.preventDefault()

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
refinerycms-core-4.0.3 app/assets/javascripts/refinery/interface.js.coffee.erb
refinerycms-core-4.0.2 app/assets/javascripts/refinery/interface.js.coffee.erb
refinerycms-core-4.0.1 app/assets/javascripts/refinery/interface.js.coffee.erb
refinerycms-core-3.0.6 app/assets/javascripts/refinery/interface.js.coffee.erb
refinerycms-core-4.0.0 app/assets/javascripts/refinery/interface.js.coffee.erb