diff options
author | jiteshjha | 2016-06-30 16:22:23 +0530 |
---|---|---|
committer | jiteshjha | 2016-06-30 16:22:23 +0530 |
commit | 4a1a77706b7c7aafb9634917e564b5ccdc4da732 (patch) | |
tree | e7b5e62bbb9179900ac52f950d7c470f8da803e1 | |
parent | 937dcaece3da2a453c671e6bb6e6aa16af98ca54 (diff) | |
download | xcos-on-web-4a1a77706b7c7aafb9634917e564b5ccdc4da732.tar.gz xcos-on-web-4a1a77706b7c7aafb9634917e564b5ccdc4da732.tar.bz2 xcos-on-web-4a1a77706b7c7aafb9634917e564b5ccdc4da732.zip |
Code refactoring part 3
-rw-r--r-- | dependencies.js | 4 | ||||
-rw-r--r-- | filenames.php | 2 | ||||
-rw-r--r-- | index.html | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/dependencies.js b/dependencies.js index 028a8e5..5edd328 100644 --- a/dependencies.js +++ b/dependencies.js @@ -16,10 +16,10 @@ $.ajax({ success: function (data) { /* - * data will have the required filenames in the mentioned folder + * @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 (var i = 0, length = data.length; i < length; ++i) { + for (i in data) { $.getScript(data[i]); } } diff --git a/filenames.php b/filenames.php index 2df7df5..81ca89f 100644 --- a/filenames.php +++ b/filenames.php @@ -2,7 +2,7 @@ /* * @jiteshjha - * filenames returns the names of all the files in a given folder + * filenames.php returns the names of all the files in a given folder */ // Store the filenames @@ -412,13 +412,13 @@ // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // https://jgraph.github.io/mxgraph/docs/js-api/files/model/mxCell-js.html // Uncomment this block to see XML tags work - /*graph.convertValueToString = function(cell) + graph.convertValueToString = function(cell) { if (mxUtils.isNode(cell.value)) { return cell.getAttribute('label', ''); } - };*/ + }; var cellLabelChanged = graph.cellLabelChanged; graph.cellLabelChanged = function(cell, newValue, autoSize) { @@ -2163,10 +2163,10 @@ function preload(sources) { /* - * sources will have the required filenames in the mentioned folder + * @Parameter: sources will have the required filenames in the mentioned folder * For each image url, make a new image to enable preloading */ - for (var i = 0, length = sources.length; i < length; ++i) { + for (i in sources) { var image = new Image(); image.src = sources[i]; } |