sort popup panel in same order as document tabs