From 06a859eb5e2985563b48ed619fd1b672bb8b51d4 Mon Sep 17 00:00:00 2001 From: zhangyang Date: Tue, 6 Aug 2013 16:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 5 +++-- public/stylesheets/application.css | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 65ad8804a..546792d50 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -2,8 +2,9 @@ <% if defined?(container) && container && container.saved_attachments %> <% container.saved_attachments.each_with_index do |attachment, i| %> - <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename') + - text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description') + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename', :maxlength => 10)%> + + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 155, :placeholder => l(:label_optional_description), :class => 'description') + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9e5e9582b..aa740f2d2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1084,7 +1084,7 @@ span.required {color: #bb0000;} #attachments_fields input.description {margin-left:4px; width:340px;} #attachments_fields span {display:block; white-space:nowrap;} -#attachments_fields input.filename {border:0; height:1.8em; width:250px; color:#555; background-color:inherit; background:url(../images/attachment.png) no-repeat 1px 50%; padding-left:18px;} +#attachments_fields input.filename {border:0; height:1.8em; width:150px; color:#555; background-color:inherit; background:url(../images/attachment.png) no-repeat 1px 50%; padding-left:18px;}/*Modified by young*/ #attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} #attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }