diff options
author | Nimish Singhal | 2016-07-05 09:28:56 +0530 |
---|---|---|
committer | GitHub | 2016-07-05 09:28:56 +0530 |
commit | 99ef8777a7bda86af4e85d15a71ba1c73f85da4b (patch) | |
tree | d39e65c607bfd2d5c11dd523cbcfc6aa264fd96c | |
parent | fc854a637d437056a60bed2ebf10df29c4407f89 (diff) | |
download | xcos-on-web-99ef8777a7bda86af4e85d15a71ba1c73f85da4b.tar.gz xcos-on-web-99ef8777a7bda86af4e85d15a71ba1c73f85da4b.tar.bz2 xcos-on-web-99ef8777a7bda86af4e85d15a71ba1c73f85da4b.zip |
Update dependencies.js
-rw-r--r-- | dependencies.js | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/dependencies.js b/dependencies.js index 307ee92..51341e4 100644 --- a/dependencies.js +++ b/dependencies.js @@ -1,24 +1,30 @@ -var dir = ["data_structures_correct"]; -var fileextension = "."; +$.getScript('math.js'); +$.getScript('combined.js'); -var script = document.createElement("script"); - script.src = "math.js"; - document.head.appendChild(script); -$.each(dir, function(index, value) { - $.ajax({ // http://stackoverflow.com/a/18480589 - url: value, - success: function(data) { - $(data).find("a:contains(" + fileextension + ")").each(function() { - var filename = this.href.replace(window.location.host, ""); - filename = filename.replace("https://", value); - filename = filename.replace("http://", value); - var script = document.createElement("script"); - script.src = filename; - document.head.appendChild(script); - }); - } - }); +// @Adhitya: 02-07-2016: Commented Jitesh's work to call Data Structures individually, +// and combined all of them into combined.js using combine_script.bat + +/* +$.ajax({ + type: "POST", + // Invoke filenames.php + url: "filenames.php", + // Receive the resultant filenames from the php script in JSON format + dataType: "json", + // Add url for the required folder + data: { + url: "/data_structures_correct/" + }, + success: function (data) { + + // @Parameter: data will have the required filenames in the mentioned folder + // For each url, add the script to the body div element with getScript function + for (i in data) { + $.getScript(data[i]); + } + } }); +*/ function AfficheBlock() { if (arguments.length > 0) { @@ -555,4 +561,4 @@ function inverse() { str += arg + "]]"; var array = JSON.parse(str); return array; -}
\ No newline at end of file +} |