Add document listener to resource panel