Skip to content

Commit

Permalink
Bundle the latest javascript changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jul 23, 2018
1 parent 20aa5d1 commit eec4e63
Show file tree
Hide file tree
Showing 2 changed files with 473 additions and 336 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/blacklight/blacklight.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Blacklight.onLoad(function () {
var uniqueId = form.attr('data-doc-id') || Math.random();
// if form is currently using method delete to change state,
// then checkbox is currently checked
var checked = form.find('input[name=_method][value=delete]').size() != 0;
var checked = form.find('input[name=_method][value=delete]').length != 0;

var checkbox = $('<input type="checkbox">').addClass(options.cssClass).attr('id', options.cssClass + '_' + uniqueId);
var label = $('<label>').addClass(options.cssClass).attr('for', options.cssClass + '_' + uniqueId).attr('title', form.attr('title') || '');
Expand Down Expand Up @@ -368,7 +368,7 @@ Blacklight.modal.receiveAjax = function (contents) {
// important we don't execute script tags, we shouldn't.
// code modelled off of JQuery ajax.load. https://github.com/jquery/jquery/blob/master/src/ajax/load.js?source=c#L62
var container = $('<div>').append(jQuery.parseHTML(contents)).find(Blacklight.modal.containerSelector).first();
if (container.size() !== 0) {
if (container.length !== 0) {
contents = container.html();
}

Expand Down

0 comments on commit eec4e63

Please sign in to comment.