Skip to content

Commit 7b9e6b5

Browse files
committed
Addresses issue with dragging and dropping unscheduled items back into the unscheduled bin (primary fix provided by Matt Miller). Fixes bug 1386. Commit ready for merge.
- Legacy-Id: 7865
1 parent a3437c0 commit 7b9e6b5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

static/js/agenda/agenda_listeners.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ function info_location_select_set() {
613613
function move_thing(parameters) {
614614
// hasn't moved don't do anything
615615
if(parameters.from_slot_id == parameters.to_slot_id){
616+
$(parameters.dom_obj).removeClass('highlight_free_slot');
616617
return;
617618
}
618619

@@ -625,8 +626,8 @@ function move_thing(parameters) {
625626
parameters.too_small = true;
626627
}
627628

628-
bucket_list = (parameters.to_slot_id == bucketlist_id);
629-
if(!bucket_list && !parameters.to_slot.empty){
629+
parameters.bucket_list = (parameters.to_slot_id == bucketlist_id);
630+
if(!parameters.bucket_list && !parameters.to_slot.empty){
630631
parameters.slot_occupied = true
631632
}
632633

@@ -1210,8 +1211,8 @@ function move_slot(parameters) {
12101211
// do something else?
12111212
}
12121213
else {
1213-
console.log("ERROR updating from_slot", parameters.from_slot_id, agenda_globals.slot_status[parameters.from_slot_id]);
1214-
return;
1214+
console.log("WARNING -- nothing to delete when updating from_slot", parameters.from_slot_id, agenda_globals.slot_status[parameters.from_slot_id]);
1215+
//return;
12151216
}
12161217
parameters.session.slot_status_key = parameters.to_slot_id;
12171218

0 commit comments

Comments
 (0)