* tpl memo: move some common function to memo/base.html
+ tpl: add memoQuery function
+ tpl js: entryFactory