summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-25 19:25:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-25 19:25:28 +0000
commit25bba80c9eb112b8ded40d2baf9f202c79d4e2ad (patch)
tree12be06ddc7c8af57a853531ea630ee3230f70c1a /public
parent4d6f50d3febff0e9cbbab158d39b2d8c0375c6a7 (diff)
downloadredmine-25bba80c9eb112b8ded40d2baf9f202c79d4e2ad.tar.gz
redmine-25bba80c9eb112b8ded40d2baf9f202c79d4e2ad.zip
Adds a simple API and a standalone script that can be used to forward emails from a local or remote email server to Redmine (#1110).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1584 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/application.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index a8b6c0e46..4e5b67e55 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -107,6 +107,15 @@ function scmEntryLoaded(id) {
Element.removeClassName(id, 'loading');
}
+function randomKey(size) {
+ var chars = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
+ var key = '';
+ for (i = 0; i < size; i++) {
+ key += chars[Math.floor(Math.random() * chars.length)];
+ }
+ return key;
+}
+
/* shows and hides ajax indicator */
Ajax.Responders.register({
onCreate: function(){