Changeset 7262
- Timestamp:
- 02/08/07 22:18:09 (19 months ago)
- Location:
- trunk/buildscripts
- Files:
-
- 2 modified
- 2 copied
-
makeDojoJsWeb.js (copied) (copied from branches/0.4/buildscripts/makeDojoJsWeb.js)
-
webbuild.php (copied) (copied from branches/0.4/buildscripts/webbuild.php)
-
webbuild/index.html (modified) (6 diffs)
-
webbuild/webbuild.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/buildscripts/webbuild/index.html
r7184 r7262 16 16 } 17 17 18 #xdDojoUrlDisplay { 19 display: none; 20 } 18 21 </style> 19 22 <script type="text/javascript"> … … 32 35 dojo.require("dojo.widget.TreeSelectorV3"); 33 36 dojo.require("dojo.widget.TreeEmphasizeOnSelect"); 34 37 dojo.require("dojo.html.iframe"); 38 35 39 function output(message){ 36 40 dojo.debug(message); 41 } 42 43 function sendDependencyResultToServer(dependencyResult){ 44 var depListForm = document.depListForm; 45 depListForm.action = "../webbuild.php"; 46 depListForm.depList.value = dependencyResult.depList.join(","); 47 depListForm.provideList.value = dependencyResult.provideList.join(","); 48 depListForm.version.value = version; 49 depListForm.xdDojoUrl.value = xdDojoUrl; 50 51 //reset the hidden frame so we can do another build. 52 setTimeout(function(){ 53 dojo.html.iframeContentWindow(dojo.byId("builderFrame")).location = "../webbuild.html?random=" + (new Date()).getTime(); 54 }, 1000); 55 56 depListForm.submit(); 37 57 } 38 58 … … 64 84 65 85 //Set up XD Dojo URL if available. 66 varxdDojoUrl = "@XD_DOJO_URL@";86 xdDojoUrl = "@XD_DOJO_URL@"; 67 87 if(xdDojoUrl != ("@" + "XD_DOJO_URL" + "@")){ 68 dojo.byId("xdDojoPath").value = xdDojoUrl; 88 dojo.byId("xdDojoUrl").innerHTML = xdDojoUrl; 89 dojo.byId("xdDojoUrlDisplay").style.display = "block"; 90 }else{ 91 xdDojoUrl = ""; 69 92 } 93 94 version = "@VERSION@"; 95 if(xdDojoUrl == ("@" + "VERSION" + "@")){ 96 version = ""; 97 } 98 70 99 }); 71 100 </script> … … 82 111 </div> 83 112 <div id="buildControls"> 84 <p >85 <b>XDomain Dojo path (example: http://some.domain.com/dojo-xdversion/src):</b><br />86 < input type="text" id="xdDojoPath" value="" size="30" />113 <p id="xdDojoUrlDisplay"> 114 <b>XDomain Dojo path:</b><br /> 115 <span id="xdDojoUrl"></span> 87 116 </p> 88 117 <p> … … 96 125 </p> 97 126 <p> 98 <button onclick="builderFrame.startBuild(dojo.byId('dependencyList').value, '0.4.2dev', dojo.byId('xdDojoPath').value)">Go</button>127 <button onclick="builderFrame.startBuild(dojo.byId('dependencyList').value, version, xdDojoUrl)">Go</button> 99 128 </p> 100 129 </div> … … 104 133 </div> 105 134 135 <form name="depListForm" action="" method="POST"> 136 <input type="hidden" name="depList" value="" /> 137 <input type="hidden" name="provideList" value="" /> 138 <input type="hidden" name="version" value="" /> 139 <input type="hidden" name="compress" value="false" /> 140 <input type="hidden" name="xdDojoUrl" value="" /> 141 </form> 142 106 143 <iframe id="builderFrame" name="builderFrame" src="../webbuild.html" style="visibility: hidden"></iframe> 107 144 </body> -
trunk/buildscripts/webbuild/webbuild.js
r7187 r7262 42 42 43 43 var dependencyResult = buildUtil.getDependencyList(dependencies, null, true); 44 var dojoResult = buildUtil.makeDojoJs(dependencyResult, version); 44 45 if(location.toString().indexOf("file:") == 0){ 46 var dojoResult = buildUtil.makeDojoJs(dependencyResult, version); 47 48 //Intern strings, and add license 49 dojoResult.dojoContents = new String(readFile("copyright.txt")) + buildUtil.interningRegexpMagic("xdomain", dojoResult.dojoContents, djConfig.baseRelativePath, [["dojo", "src"]], []); 50 51 //Print out the file list. 52 dojo.debug("files in the profile:"); 53 for(var i = 0; i < dojoResult.resourceDependencies.length; i++){ 54 print(dojoResult.resourceDependencies[i]); 55 } 56 57 //Return the dojo contents 58 webbuild.dojoContents = dojoResult.dojoContents; 59 60 //See if we should add in xd dojo module path. 61 xdDojoPath = dojo.string.trim(xdDojoPath); 62 if(xdDojoPath){ 63 webbuild.dojoContents = buildUtilXd.setXdDojoConfig(webbuild.dojoContents, xdDojoPath); 64 } 45 65 46 //Intern strings, and add license 47 dojoResult.dojoContents = new String(readFile("copyright.txt")) + buildUtil.interningRegexpMagic("xdomain", dojoResult.dojoContents, djConfig.baseRelativePath, [["dojo", "src"]], []); 66 var outputWindow = window.open("webbuild/dojo.js.html", "dojoOutput"); 67 outputWindow.focus(); 68 69 //FAILED attempts: 70 //Using a javascript: url, FF 2.0 wraps the content in some HTML, so not really 71 //good for file save operations (get HTML in the saved file). 72 //var outputWindow = window.open("javascript:opener.webbuild.getDojoContents()", "dojoOutput"); 73 74 //using data: urls seem to add funky text to the beginning of the file, at least in OSX FF 2.0 75 //Same issue if application/octet-stream is used instead of text/javascript. 76 //var outputWindow = window.open("data:text/javascript;" + webbuild.dojoContents, "dojoOutput"); 77 }else{ 78 parent.sendDependencyResultToServer(dependencyResult); 79 } 80 }, 48 81 49 //Print out the file list.50 dojo.debug("files in the profile:");51 for(var i = 0; i < dojoResult.resourceDependencies.length; i++){52 print(dojoResult.resourceDependencies[i]);53 }54 55 //Return the dojo contents56 webbuild.dojoContents = dojoResult.dojoContents;57 58 //See if we should add in xd dojo module path.59 xdDojoPath = dojo.string.trim(xdDojoPath);60 if(xdDojoPath){61 webbuild.dojoContents = buildUtilXd.setXdDojoConfig(webbuild.dojoContents, xdDojoPath);62 }63 64 65 66 var outputWindow = window.open("webbuild/dojo.js.html", "dojoOutput");67 outputWindow.focus();68 69 //FAILED attempts:70 //Using a javascript: url, FF 2.0 wraps the content in some HTML, so not really71 //good for file save operations (get HTML in the saved file).72 //var outputWindow = window.open("javascript:opener.webbuild.getDojoContents()", "dojoOutput");73 74 //using data: urls seem to add funky text to the beginning of the file, at least in OSX FF 2.075 //Same issue if application/octet-stream is used instead of text/javascript.76 //var outputWindow = window.open("data:text/javascript;" + webbuild.dojoContents, "dojoOutput");77 },78 79 82 getDojoContents: function(){ 80 83 return webbuild.dojoContents;