summaryrefslogtreecommitdiffstats
path: root/public/javascripts/application.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/application.js')
-rw-r--r--public/javascripts/application.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
new file mode 100644
index 000000000..46649130e
--- /dev/null
+++ b/public/javascripts/application.js
@@ -0,0 +1,20 @@
+function checkAll (id, checked) {
+ var el = document.getElementById(id);
+ for (var i = 0; i < el.elements.length; i++) {
+ if (el.elements[i].disabled==false) {
+ el.elements[i].checked = checked;
+ }
+ }
+}
+
+function addFileField() {
+ var f = document.createElement("input");
+ f.type = "file";
+ f.name = "attachments[]";
+ f.size = 30;
+
+ p = document.getElementById("attachments_p");
+ p.appendChild(document.createElement("br"));
+ p.appendChild(document.createElement("br"));
+ p.appendChild(f);
+} \ No newline at end of file