From: Alan Knowles Date: Sat, 1 Dec 2012 12:07:20 +0000 (+0800) Subject: Pman.Include.js X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=b194e53038d8a33f763753384a25f04e6f16a5ed Pman.Include.js --- diff --git a/Pman.Include.js b/Pman.Include.js index 16cd4e1b..835eb533 100644 --- a/Pman.Include.js +++ b/Pman.Include.js @@ -6,22 +6,27 @@ Pman.Include = function(sp) { + + Pman.Include.script(sp, true) + + +) + +Pman.Include.cached = function(sp) { + Pman.Include.script(sp, false) + +) + +Pman.Include.script = function(sp,cached) { var head = document.getElementsByTagName("head")[0]; var script = document.createElement("script"); - script.setAttribute("src", rootURL + sp +'?ts=' + Math.random() ); + script.setAttribute("src", rootURL + sp + + ( cached ? '' : '?ts=' + Math.random() )); script.setAttribute("type", "text/javascript"); //script.setAttribute("id", trans.scriptId); head.appendChild(script); Roo.get(documen.body).appendChild() - -) - -Pman.Include.cached = function(sp) { - var tag = '