Sha256: a53adbda286c24008e5ca09d9c019b60c907ed5d7139268e1499d41ce799fcf1

Contents?: true

Size: 910 Bytes

Versions: 3

Compression:

Stored size: 910 Bytes

Contents

<% if defined?(Djatoka) %>

$(document).ready(function() {
  $('body.edit.admin_kinney_images #main_content, body.new.admin_kinney_images #main_content').prepend('<div id="preview_image"></div>');
  
  function insertDjimage(){
    var base_url = "<%= Djatoka.resolver.url %>";
    var params = jQuery.param({
      'rft_id': $('#kinney_image_filename').val(),
      'svc.level':2,
      'svc_id':'info:lanl-repo/svc/getRegion',
      'svc_val_fmt':'info:ofi/fmt:kev:mtx:jpeg2000',
      'url_ver':'Z39.88-2004'
    });
    var full_url = base_url + '?' + params;
    var image_tag = '<img src="' + full_url + '"/>'
    $('#preview_image').html(image_tag);
  }
  
  if ($('body.admin_kinney_images #kinney_image_filename').length > 0 && $('#kinney_image_filename').val().length > 0){
    insertDjimage();
  }
  
  $('input#kinney_image_filename').keyup(function(){
    insertDjimage();
  });
  
});

<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kinney-0.0.3 app/assets/javascripts/kinney/admin/images.js.erb
kinney-0.0.2 app/assets/javascripts/kinney/admin/images.js.erb
kinney-0.0.1 app/assets/javascripts/kinney/admin/images.js.erb