anki/web/deckbrowser.js
Damien Elmes f3f90842dc move the inline css and some more js into separate files
- stdHtml() css= arg now takes a list of files like js=
- the files are loaded in the head of the document so that styling
that comes later in the document can easily override it

fixes:
https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7/page/1#comment_43164447
https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43177130
2017-08-10 19:02:32 +10:00

31 lines
693 B
JavaScript

$(init);
function init() {
$("tr.deck").draggable({
scroll: false,
// can't use "helper: 'clone'" because of a bug in jQuery 1.5
helper: function (event) {
return $(this).clone(false);
},
delay: 200,
opacity: 0.7
});
$("tr.deck").droppable({
drop: handleDropEvent,
hoverClass: 'drag-hover'
});
$("tr.top-level-drag-row").droppable({
drop: handleDropEvent,
hoverClass: 'drag-hover'
});
}
function handleDropEvent(event, ui) {
var draggedDeckId = ui.draggable.attr('id');
var ontoDeckId = $(this).attr('id');
pycmd("drag:" + draggedDeckId + "," + ontoDeckId);
}