Mode-locking transitions in nanostructured weakly disordered lasers