Skip to content

Commit

Permalink
4474/refactor/covers remove inline js (internetarchive#4596)
Browse files Browse the repository at this point in the history
Inline JavaScript inside covers/manage.html is moved to index.js
  • Loading branch information
drakene authored Feb 14, 2021
1 parent 3d15c02 commit 55a6a39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
11 changes: 11 additions & 0 deletions openlibrary/plugins/openlibrary/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,15 @@ jQuery(function () {
});

$('#wikiselect').on('focus', function(){$(this).select();})

// Functionality for manage.html
$('.column').sortable({
connectWith: '.trash'
});
$('.trash').sortable({
connectWith: '.column'
});
$('.column').disableSelection();
$('.trash').disableSelection();
$('#topNotice').hide();
});
14 changes: 0 additions & 14 deletions openlibrary/templates/covers/manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@
$putctx("bodyid", "form")
$putctx('robots', 'noindex,nofollow')

<script type="text/javascript">
window.q.push(function () {
\$(".column").sortable({
connectWith: '.trash'
});
\$(".trash").sortable({
connectWith: '.column'
});
\$(".column").disableSelection();
\$(".trash").disableSelection();
\$("#topNotice").hide();
});
</script>

<div class="imageIntro">
$_("You can drag and drop thumbnails to reorder, or into the trash to delete them.")
</div>
Expand Down

0 comments on commit 55a6a39

Please sign in to comment.