Add promises managment for templates (jQuery promises, ex: AJAX calls)