X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=Pman.Include.js;h=3959cb4d7b9043766dc7fb12d624ec42f2992790;hp=16cd4e1bc2bd6363c0a09f26178ccc5b87441bc6;hb=586e4eb470252d837ba18b67e4c3c1702131fd1d;hpb=72372db94a765bdca65245997a6d43facabbcdd9 diff --git a/Pman.Include.js b/Pman.Include.js index 16cd4e1b..3959cb4d 100644 --- a/Pman.Include.js +++ b/Pman.Include.js @@ -6,22 +6,26 @@ 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 = '