"Range"-selection bugs in "Queue"

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Hurda
Newbie
Newbie
Posts: 37
Joined: November 7th, 2011, 4:30 am

"Range"-selection bugs in "Queue"

Post by Hurda »

1.) I cannot get "Range" to work when selecting the first and i.e. fifth entry (setting the queue to show everything to demonstrate).
Either no checkboxes in between are being checked, or all the checkboxes from the fifth entry down to the penultimate entry are being checked.
Trying select a range from the second to fifth or third to fifth etc. is working fine, it's only not working only when the first entry is selected.

2.) After trying the above, click "None" to deselect all checkboxes, and then, without checking any boxes, click "Range". The penultimate checkbox will be checked, for whatever reason.

Tested in Firefox, IE and Chrome, sabnzdb.log comes up empty regarding this.

Can you confirm this?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: "Range"-selection bugs in "Queue"

Post by shypike »

Confirmed.
Strangely enough "Range" does work in the file details page of a job.
I will investigate.
mrnejc
Newbie
Newbie
Posts: 1
Joined: August 2nd, 2014, 7:14 pm

Re: "Range"-selection bugs in "Queue"

Post by mrnejc »

Just came here to report this issue as well ;D

The problem is in plush.js - testing last1 or last2 when their value is 0 evaluates to false.

This is quick and dirty fix - change (starting at line 753):

Code: Select all

    if (last1 && last2 && last1 < last2)
      $("INPUT[type='checkbox']","#queueTable").slice(last1,last2).prop('checked', true).trigger('change');
    else if (last1 && last2)
      $("INPUT[type='checkbox']","#queueTable").slice(last2,last1).prop('checked', true).trigger('change');
to

Code: Select all

    if ((last1||last1==0) && (last2||last2==0) && last1 < last2)
      $("INPUT[type='checkbox']","#queueTable").slice(last1,last2).prop('checked', true).trigger('change');
    else if ((last1||last1==0) && (last2||last2==0))
      $("INPUT[type='checkbox']","#queueTable").slice(last2,last1).prop('checked', true).trigger('change');
please note: I'm not a JavaScript dev so there must be a better/cleaner way to fix this ...
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: "Range"-selection bugs in "Queue"

Post by shypike »

Thanks, should make it easier to fix.
Hurda
Newbie
Newbie
Posts: 37
Joined: November 7th, 2011, 4:30 am

Re: "Range"-selection bugs in "Queue"

Post by Hurda »

Thanks for confirming!

There's also a quirk in the file-details-page, but it's very minor.

Select any two files, then "range", then "none" and again "range".
I.e. when first checking the second and sixth checkbox, clicking range for the second time will select the checkboxes 3, 4, 5 and 6.
Post Reply