theapp.js:  fix period/periodName; fix loadData called twice