diff --git a/app/assets/javascripts/application/accessibility.js b/app/assets/javascripts/application/accessibility.js index 3ba70435d54a8285f97fb2f56787cf713ffd852c..2ac880c0fdeaa3c76befac4bb8a9aa7760120440 100644 --- a/app/assets/javascripts/application/accessibility.js +++ b/app/assets/javascripts/application/accessibility.js @@ -146,3 +146,23 @@ function HandleChangeImg() var iminput = document.getElementById("pic"); // iminput.src = ;/*"path"+ fileinput.value; } + +//Correct bug Metadados Adicionais and Adicionar a coleção in firefox +function(e) { +var $this = $(this) +var href = $this.attr('href') +var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 +var option = $target.data('bs.modal') ? 'toggle' : $.extend({ + remote: !/#/.test(href) && href +}, $target.data(), $this.data()) + +if ($this.is('a')) e.preventDefault() + +$target.one('show.bs.modal', function(showEvent) { + if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown + $target.one('hidden.bs.modal', function() { + $this.is(':visible') && $this.trigger('focus') + }) +}) +Plugin.call($target, option, this) +} diff --git a/app/builders/generic_builder.rb b/app/builders/generic_builder.rb index 53379676e22179b11969f7c34fa08f7b623530da..cbdea8b7a6a985302a53e79750b515c9d07981c5 100644 --- a/app/builders/generic_builder.rb +++ b/app/builders/generic_builder.rb @@ -18,6 +18,7 @@ class GenericBuilder < Builder if cache && !object[last_modified].blank? o = Rails.cache.fetch(cache_key(object[id], object[last_modified])) end + o = repository(object['class']).find object[id] if o.nil? array << o end