summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/images/icon-attachment.pngbin0 -> 450 bytes
-rw-r--r--app/assets/javascripts/note.js6
-rw-r--r--app/assets/stylesheets/common.scss106
-rw-r--r--app/assets/stylesheets/ref_select.scss10
-rw-r--r--app/models/issue.rb5
-rw-r--r--app/views/issues/_form.html.haml17
-rw-r--r--app/views/issues/show.html.haml48
-rw-r--r--app/views/notes/_form.html.haml14
-rw-r--r--app/views/notes/_show.html.haml4
-rw-r--r--db/migrate/20120317095543_add_description_to_issues.rb5
-rw-r--r--db/schema.rb1
-rw-r--r--vendor/assets/stylesheets/chosen.css14
12 files changed, 185 insertions, 45 deletions
diff --git a/app/assets/images/icon-attachment.png b/app/assets/images/icon-attachment.png
new file mode 100644
index 00000000000..168ad8dce37
--- /dev/null
+++ b/app/assets/images/icon-attachment.png
Binary files differ
diff --git a/app/assets/javascripts/note.js b/app/assets/javascripts/note.js
index 41759671ff8..c45cdd90b4f 100644
--- a/app/assets/javascripts/note.js
+++ b/app/assets/javascripts/note.js
@@ -37,6 +37,12 @@ init:
$('.attach_holder').show();
});
+ $("#note_attachment").change(function(e){
+ var val = $('.input-file').val();
+ var filename = val.replace(/^.*[\\\/]/, '');
+ $(".file_name").text(filename);
+ });
+
},
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 581ad507557..633135137e7 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -293,8 +293,14 @@ nav.main_menu {
background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
@include shade;
.count {
- color:#aaa;
- margin-left:3px;
+ margin-left:3px;
+ color: #332;
+ background: white;
+ padding: 1px 6px 2px;
+ font-weight: bold;
+ -webkit-border-radius: 9px;
+ -moz-border-radius: 9px;
+ border-radius: 9px;
}
.label {
background:$hover;
@@ -345,8 +351,8 @@ nav.main_menu {
img.avatar {
float:left;
- margin-right:15px;
- width:40px;
+ margin-right:10px;
+ width:35px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
@@ -372,7 +378,7 @@ img.lil_av {
.wll {
background-color: #FFF;
- padding: 10px 5px;
+ padding: 6px 10px;
min-height: 20px;
border-bottom: 1px solid #eee;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
@@ -998,6 +1004,41 @@ p.time {
margin: 2px;
}
+/* Issues Changed */
+/* Could probably rewrite this, a bit sloppy */
+.well {
+ .issue_status.span2 {
+ width:116px;
+
+ .alert-message {
+ width:34px;
+ margin: 0 0 0 auto;
+
+ .error {
+ width: 40px;
+ }
+ }
+ }
+ pre {
+ background: white !important;
+
+ code {
+ background: none !important;
+ }
+ }
+}
+
+/* Fix for readme code (stopped it from being yellow) */
+.readme {
+ pre {
+ background: white !important;
+
+ code {
+ background: none !important;
+ }
+ }
+}
+
.highlight_word {
background:#EEDC94;
}
@@ -1040,3 +1081,58 @@ p.time {
border-bottom:2px solid $style_color;
}
}
+
+// Fixes alignment on notes.
+.new_note {
+ label {
+ text-align:left;
+ }
+}
+
+.issue_notes {
+ .input-file {
+ font: 500px monospace;
+ opacity:0;
+ filter: alpha(opacity=0);
+ position: absolute;
+ z-index: 1;
+ top:0;
+ right:0;
+ padding:0;
+ margin: 0;
+ }
+
+ .file_upload {
+ position: absolute;
+ right:14px;
+ top:7px;
+ height: 30px;
+ }
+
+ div.attachments {
+ position:relative;
+ width: 350px;
+ height: 30px;
+ overflow:hidden;
+ margin:0 0 5px !important;
+ }
+ .file_name {
+ line-height:30px;
+ width:240px;
+ height:28px;
+ overflow:hidden;
+ }
+}
+
+// Fix issue with notes & lists creating a bunch of bottom borders.
+li.note {
+ .note-title {
+ li {
+ border-bottom:none !important;
+ }
+ .file {
+ padding-left:20px;
+ background:url("icon-attachment.png") no-repeat left center;
+ }
+ }
+} \ No newline at end of file
diff --git a/app/assets/stylesheets/ref_select.scss b/app/assets/stylesheets/ref_select.scss
index ff0ffa9f522..6f6a1bc983d 100644
--- a/app/assets/stylesheets/ref_select.scss
+++ b/app/assets/stylesheets/ref_select.scss
@@ -48,3 +48,13 @@
}
}
+/** Fix for Search Dropdown Border **/
+.chzn-container {
+ .chzn-search {
+ input:focus {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ }
+ }
+}
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 632e6537aad..dfc0622f975 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -24,6 +24,10 @@ class Issue < ActiveRecord::Base
validates :title,
:presence => true,
:length => { :within => 0..255 }
+
+ validates :description,
+ :presence => true,
+ :length => { :within => 0..2000 }
scope :critical, where(:critical => true)
scope :non_critical, where(:critical => false)
@@ -57,6 +61,7 @@ end
#
# id :integer not null, primary key
# title :string(255)
+# description :text
# assignee_id :integer
# author_id :integer
# project_id :integer
diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml
index 1635590bf1f..300e2d0ce19 100644
--- a/app/views/issues/_form.html.haml
+++ b/app/views/issues/_form.html.haml
@@ -9,12 +9,18 @@
%li= msg
.clearfix
- = f.label :title
- .input= f.text_area :title, :maxlength => 255, :class => "xxlarge"
+ = f.label :title, "Issue Subject"
+ .input= f.text_field :title, :maxlength => 255
+
+ .clearfix
+ = f.label :description, "Issue Details"
+ .input
+ = f.text_area :description, :maxlength => 2000, :class => "xxlarge"
+ %p.hint Markdown is enabled.
.clearfix
= f.label :assignee_id
- .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
+ .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Assign to user" })
.clearfix
= f.label :critical, "Critical"
@@ -26,7 +32,10 @@
.input= f.check_box :closed
.actions
- = f.submit 'Save', :class => "primary btn"
+ - if @issue.new_record?
+ = f.submit 'Submit new issue', :class => "primary btn"
+ -else
+ = f.submit 'Save changes', :class => "primary btn"
- if request.xhr?
= link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn"
diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml
index a320a16f646..0c020a1e4c0 100644
--- a/app/views/issues/show.html.haml
+++ b/app/views/issues/show.html.haml
@@ -1,5 +1,9 @@
-%h3
- Issue ##{@issue.id}
+.back_link
+= link_to project_issues_path(@project) do
+ &larr; To issues list
+
+%h3
+ #{@issue.title}
%small
created at
= @issue.created_at.stamp("Aug 21, 2011")
@@ -17,33 +21,33 @@
%br
- if @issue.upvotes > 0
.upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}"
-
-
-.back_link
- = link_to project_issues_path(@project) do
- &larr; To issues list
%hr
-- if @issue.closed
- .alert-message.error Closed
-- else
- .alert-message.success Open
-%div.well.prettyprint
- %div
- %cite.cgray Created by
- = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av"
- %strong.author= link_to_issue_author(@issue)
-
- %cite.cgray and currently assigned to
- = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av"
- %strong.author= link_to_issue_assignee(@issue)
+%div.well
+ %div.row
+ %div.issue_meta.span13
+ %cite.cgray Created by
+ = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av"
+ %strong.author= link_to_issue_author(@issue)
+
+ %cite.cgray and currently assigned to
+ = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av"
+ %strong.author= link_to_issue_assignee(@issue)
+
+ %div.issue_status.span2
+ - if @issue.closed
+ .alert-message.error Closed
+ - else
+ .alert-message.success Open
- %hr
+ %hr
- %div= simple_format @issue.title
+ %div
+ - if @project.description.present?
+ = markdown @issue.description
.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue"
diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml
index 0d20bb15835..7ec093b0100 100644
--- a/app/views/notes/_form.html.haml
+++ b/app/views/notes/_form.html.haml
@@ -1,5 +1,5 @@
= form_for [@project, @note], :remote => "true", :multipart => true do |f|
- %h3 Leave a note
+ %h3 Leave a comment
-if @note.errors.any?
.alert-message.block-message.error
- @note.errors.full_messages.each do |msg|
@@ -8,6 +8,7 @@
= f.hidden_field :noteable_id
= f.hidden_field :noteable_type
= f.text_area :note, :size => 255
+ %p.hint Markdown is enabled.
.row
.span4
@@ -21,11 +22,14 @@
= label_tag :notify_author do
= check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
%span Commit author
- .span4
+ .span8
%h5 Attachment:
.clearfix
- = f.label :attachment, "Any file, < 10 MB"
- .input= f.file_field :attachment, :class => "input-file"
+ .attachments.breadcrumb
+ %div.file_name File name...
+ %button.file_upload.btn.primary Upload File
+ .input= f.file_field :attachment, :class => "input-file"
+ %span Any file less then 10 MB
- = f.submit 'Add note', :class => "btn primary", :id => "submit_note"
+ = f.submit 'Add Comment', :class => "btn primary", :id => "submit_note"
diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml
index 6da1d5904bf..916fda06271 100644
--- a/app/views/notes/_show.html.haml
+++ b/app/views/notes/_show.html.haml
@@ -12,6 +12,6 @@
= markdown(note.note)
- if note.attachment.url
.right
- %span.file
- = link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
+ %div.file
+ = link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
.clear
diff --git a/db/migrate/20120317095543_add_description_to_issues.rb b/db/migrate/20120317095543_add_description_to_issues.rb
new file mode 100644
index 00000000000..e47e3f8e898
--- /dev/null
+++ b/db/migrate/20120317095543_add_description_to_issues.rb
@@ -0,0 +1,5 @@
+class AddDescriptionToIssues < ActiveRecord::Migration
+ def change
+ add_column :issues, :description, :text
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index c76fd9b5d98..d2c54b50f67 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -27,6 +27,7 @@ ActiveRecord::Schema.define(:version => 20120323221339) do
create_table "issues", :force => true do |t|
t.string "title"
+ t.text "description"
t.integer "assignee_id"
t.integer "author_id"
t.integer "project_id"
diff --git a/vendor/assets/stylesheets/chosen.css b/vendor/assets/stylesheets/chosen.css
index 7870f053d4c..27cd2459011 100644
--- a/vendor/assets/stylesheets/chosen.css
+++ b/vendor/assets/stylesheets/chosen.css
@@ -107,13 +107,13 @@
z-index: 1010;
}
.chzn-container-single .chzn-search input {
- background: #fff url('chosen-sprite.png') no-repeat 100% -22px;
- background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
- background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
- background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
- background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
- background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
- background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ background: #fff url('chosen-sprite.png') no-repeat 100% -21px;
+ background: url('chosen-sprite.png') no-repeat 100% -21px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
+ background: url('chosen-sprite.png') no-repeat 100% -21px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -21px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -21px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -21px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
+ background: url('chosen-sprite.png') no-repeat 100% -21px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
margin: 1px 0;
padding: 4px 20px 4px 5px;
outline: 0;