Browse Source

Fix for "Range" selection of queue.

Not a really good fix.
The code looks identical to the code for selecting files within an NZB (in config.js) , but it has some subtle error.
This is a fix which will work reasonably well.
Should be fixed properly later.
pull/178/head
shypike 11 years ago
parent
commit
081010d50b
  1. 6
      interfaces/Plush/templates/static/javascripts/plush.js
  2. 6
      sabnzbd/nzbstuff.py

6
interfaces/Plush/templates/static/javascripts/plush.js

@ -750,9 +750,9 @@ $.plush.queueprevslots = $.plush.queuenoofslots; // for the next refresh
});
var last1, last2;
$("#multiops_select_range").click(function(){
if (last1 && last2 && last1 < last2)
if (last1 >= 0 && last2 >= 0 && last1 < last2)
$("INPUT[type='checkbox']","#queueTable").slice(last1,last2).prop('checked', true).trigger('change');
else if (last1 && last2)
else if (last1 >= 0 && last2 >= 0)
$("INPUT[type='checkbox']","#queueTable").slice(last2,last1).prop('checked', true).trigger('change');
});
$("#multiops_select_invert").click(function(){
@ -765,7 +765,7 @@ $.plush.queueprevslots = $.plush.queuenoofslots; // for the next refresh
});
$("#queue").delegate('.multiops','change',function(event) {
// range event interaction
if (last1) last2 = last1;
if (last1 >= 0) last2 = last1;
last1 = $(event.target).parent()[0].rowIndex ? $(event.target).parent()[0].rowIndex : $(event.target).parent().parent()[0].rowIndex;
// checkbox state persistence

6
sabnzbd/nzbstuff.py

@ -624,7 +624,7 @@ class NzbObject(TryList):
self.oversized = False
self.precheck = False
self.incomplete = False
self.unwanted_ext = False
self.unwanted_ext = 0
self.reuse = reuse
if self.status == Status.QUEUED and not reuse:
self.precheck = cfg.pre_check()
@ -1084,7 +1084,9 @@ class NzbObject(TryList):
self.duplicate = False
self.oversized = False
self.incomplete = False
self.unwanted_ext = False
if self.unwanted_ext:
# If user resumes after "unwanted" warning, no more auto-pauses
self.unwanted_ext = 2
def add_parfile(self, parfile):
if parfile not in self.files:

Loading…
Cancel
Save