* mv jscodes from view to js file.