diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-29 19:46:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-29 19:46:58 +0000 |
commit | 9daf39ec5242a6a87efb9c862952e176d4314856 (patch) | |
tree | 78ac3c4012e88e4f907e0d5a075956402af67684 /public | |
parent | 4b15dc10c10d9cb54d156457cc7d6823dac55520 (diff) | |
download | redmine-9daf39ec5242a6a87efb9c862952e176d4314856.tar.gz redmine-9daf39ec5242a6a87efb9c862952e176d4314856.zip |
Adds an optional description to attachments.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1180 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/application.js | 15 | ||||
-rw-r--r-- | public/stylesheets/application.css | 4 |
2 files changed, 16 insertions, 3 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index d77362a06..4e8849842 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -10,15 +10,24 @@ function checkAll (id, checked) { } } +var fileFieldCount = 1; + function addFileField() { + if (fileFieldCount >= 10) return false + fileFieldCount++; var f = document.createElement("input"); f.type = "file"; - f.name = "attachments[]"; + f.name = "attachments[" + fileFieldCount + "][file]"; f.size = 30; - - p = document.getElementById("attachments_p"); + var d = document.createElement("input"); + d.type = "text"; + d.name = "attachments[" + fileFieldCount + "][description]"; + d.size = 60; + + p = document.getElementById("attachments_fields"); p.appendChild(document.createElement("br")); p.appendChild(f); + p.appendChild(d); } function showTab(name) { diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b3dcac6b0..833937482 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -222,7 +222,11 @@ width: 200px; .required {color: #bb0000;} .summary {font-style: italic;} +#attachments_fields input[type=text] {margin-left: 8px; } + div.attachments p { margin:4px 0 2px 0; } +div.attachments img { vertical-align: middle; } +div.attachments span.author { font-size: 0.9em; color: #888; } /***** Flash & error messages ****/ #errorExplanation, div.flash, .nodata { |