Daniel@0: tmpl = (function() { Daniel@0: Daniel@0: var tmpl = {}; Daniel@0: Daniel@0: tmpl.autoload = []; Daniel@0: Daniel@0: /** Daniel@0: * Renders template from a preloaded collection or current page Daniel@0: * @param template template id, e.g. "calendar:flash_error-load" Daniel@0: * @returns jQuery object Daniel@0: */ Daniel@0: tmpl.render = function(template, data, options) { Daniel@0: //Loading a preloaded template Daniel@0: $result = $.tmpl(template, data, options); Daniel@0: // Use of a preloaded template failed. Getting template from current page (