[global settings editor] Reorganize code of client edit.js