could have an alias like:
alias partsome {
if ($active !ischan) { partall }
else {
var %x = $chan(0) , %c
while (%x) {
if ($chan(%x) == $active) { dec %x }
%c = $addtok(%c,$chan(%x),44)
dec %x
}
part %c $1-
}
}
I think that should work with most ircds. If not you will need to make seperate part commands for each channel.
Then just link that alias to your popup.