Sha256: 79c60b63dbdfbc3b94308f9f67cc70607c3e1ad5e83a8e27819ebcda85fc3bea

Contents?: true

Size: 623 Bytes

Versions: 6

Compression:

Stored size: 623 Bytes

Contents

$(document).ready(function(){
  // focus first field in an admin form.
  $('form input[type=text]:first').focus();

  init_flash_messages();
});

init_flash_messages = function(){
  $('#flash').css({
    'opacity': 0
    , 'visibility':'visible'
  }).animate({'opacity': '1'}, 550);
  $('#flash_close').on('click', function(e) {
    try {
      $('#flash').animate({
         'opacity': 0,
         'visibility': 'hidden'
      }, 330, function() {
        $('#flash').hide();
      });
    } catch(ex) {
      $('#flash').hide();
    }
    e.preventDefault();
  });
  $('#flash.flash_message').prependTo('#records');
};


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refinerycms-core-2.1.5 app/assets/javascripts/refinery/core.js
refinerycms-core-2.1.4 app/assets/javascripts/refinery/core.js
refinerycms-core-2.1.3 app/assets/javascripts/refinery/core.js
refinerycms-core-2.1.2 app/assets/javascripts/refinery/core.js
refinerycms-core-2.1.1 app/assets/javascripts/refinery/core.js
refinerycms-core-2.1.0 app/assets/javascripts/refinery/core.js