Sha256: 735c7290294e7ed4d2c81de64516efc2bdf9e37dc0a1365735f00af68d20141b

Contents?: true

Size: 904 Bytes

Versions: 4

Compression:

Stored size: 904 Bytes

Contents

$(document).ready(function() {

  $("#quicksearch").searchField();

  $('.resource :input', document.myForm).bind("change", function() { setConfirmUnload(true); });

  $("a.fancybox").fancybox({
    'titlePosition': 'over',
    'type': 'image'
  });

  $(".iframe").fancybox({
    'width': '75%',
    'height': '100%',
    'autoScale': false,
    'transitionIn': 'none',
    'transitionOut': 'none',
    'type': 'iframe'
  });

  // This method is used by `text_with_ckeditor` template.
  if ($('textarea.ckeditor').length > 0) {
      var data = $('textarea');
      $.each(data, function(i) { CKEDITOR.replace(data[i].id); });
  }

});

function setConfirmUnload(on) {
  window.onbeforeunload = (on) ? unloadMessage : null;
}

function unloadMessage() {
  return "You have entered new data on this page. If you navigate away from this page without first saving your data, the changes will be lost.";
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typus-3.0.12 app/assets/vendor/typus/javascripts/jquery.application.js
typus-3.0.11 app/assets/vendor/typus/javascripts/jquery.application.js
typus-3.0.11.rc5 app/assets/vendor/typus/javascripts/jquery.application.js
typus-3.0.11.rc4 app/assets/vendor/typus/javascripts/jquery.application.js