diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-12-22 18:26:26 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-12-22 18:26:26 +0000 |
commit | 9f75fb8231e9443fd7d6bbb792612381843932d5 (patch) | |
tree | 74635bf40c4e33a07014fa88736b1575ce1304f3 /release/build/js/Words.js | |
parent | 9d4bfd8c80ce5daa360d79dd5e557c86c83cab94 (diff) | |
download | jquery-ui-9f75fb8231e9443fd7d6bbb792612381843932d5.tar.gz jquery-ui-9f75fb8231e9443fd7d6bbb792612381843932d5.zip |
Build: Fix for #3576, adding headers to minified and packed files; current solution is rather ugly, need to refactor; also removed unnecessary files from old build scripts, while adding ant-contrib-0.6.jar
Diffstat (limited to 'release/build/js/Words.js')
-rw-r--r-- | release/build/js/Words.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/release/build/js/Words.js b/release/build/js/Words.js deleted file mode 100644 index cbd9cab45..000000000 --- a/release/build/js/Words.js +++ /dev/null @@ -1,62 +0,0 @@ - -var Words = Collection.extend({ - constructor: function(script) { - this.base(); - forEach (script.match(WORDS), this.add, this); - this.encode(); - }, - - add: function(word) { - if (!this.exists(word)) this.base(word); - word = this.fetch(word); - word.count++; - return word; - }, - - encode: function() { - // sort by frequency - this.sort(function(word1, word2) { - return word2.count - word1.count; - }); - - eval("var a=62,e=" + Packer.ENCODE62); - var encode = e; - var encoded = new Collection; // a dictionary of base62 -> base10 - var count = this.count(); - for (var i = 0; i < count; i++) { - encoded.store(encode(i), i); - } - - var empty = function() {return ""}; - var index = 0; - forEach (this, function(word) { - if (encoded.exists(word)) { - word.index = encoded.fetch(word); - word.toString = empty; - } else { - while (this.exists(encode(index))) index++; - word.index = index++; - } - word.encoded = encode(word.index); - }, this); - - // sort by encoding - this.sort(function(word1, word2) { - return word1.index - word2.index; - }); - }, - - toString: function() { - return this.values().join("|"); - } -}, { - Item: { - constructor: function(word) { - this.toString = function() {return word}; - }, - - count: 0, - encoded: "", - index: -1 - } -}); |