diff --git a/assets/js/icecoder.js b/assets/js/icecoder.js index 0205e47..1cd4747 100644 --- a/assets/js/icecoder.js +++ b/assets/js/icecoder.js @@ -4533,31 +4533,31 @@ var ICEcoder = { // Sort tabs into new order sortTabs: function(newOrder) { - var a, b, savedPoints = [], savedContents = [], openFiles = [], openFileMDTs = [], openFileVersions = [], cMInstances = [], selectedTabWillBe; + let a, b, savedPoints = [], savedContents = [], openFiles = [], openFileMDTs = [], openFileVersions = [], cMInstances = [], selectedTabWillBe; // Setup an array of our actual arrays and the blank ones a = [this.savedPoints, this.savedContents, this.openFiles, this.openFileMDTs, this.openFileVersions, this.cMInstances]; b = [savedPoints, savedContents, openFiles, openFileMDTs, openFileVersions, cMInstances]; // Push the new order values into array b then set into array a - for (var i=0;i0) { - var currentArray, currentArrayFull, alphaArray, nextValue, nextPos; - + let fileName, fileExt, currentArray, currentArrayFull, alphaArray, nextValue, nextValueFull, nextPos; + if (0 < this.openFiles.length) { currentArray = []; currentArrayFull = []; alphaArray = []; // Get filenames, full paths and set classname for sliding - for (var i=0;i0) { + while (0 < currentArray.length) { nextValue = currentArray[0]; nextValueFull = currentArrayFull[0]; nextPos = 0; - for (var i=0;i