Commit 46605c9175f6648219e8193904f1af267e98a7ce

Authored by Steven Verbeek
1 parent 6c40e898

Started note attachment changes, and text changes

app/assets/javascripts/note.js
@@ -37,6 +37,10 @@ init: @@ -37,6 +37,10 @@ init:
37 $('.attach_holder').show(); 37 $('.attach_holder').show();
38 }); 38 });
39 39
  40 + $("#note_attachment").change(function(e){
  41 + alert($('input[type=file]').val());
  42 + });
  43 +
40 }, 44 },
41 45
42 46
app/assets/stylesheets/common.scss
@@ -1079,3 +1079,40 @@ p.time { @@ -1079,3 +1079,40 @@ p.time {
1079 border-bottom:2px solid $style_color; 1079 border-bottom:2px solid $style_color;
1080 } 1080 }
1081 } 1081 }
  1082 +
  1083 +// Fixes alignment on notes.
  1084 +.new_note {
  1085 + label {
  1086 + text-align:left;
  1087 + }
  1088 +}
  1089 +
  1090 +.issue_notes {
  1091 + .input-file {
  1092 + font: 500px monospace;
  1093 + opacity:0;
  1094 + filter: alpha(opacity=0);
  1095 + position: absolute;
  1096 + z-index: 1;
  1097 + top:0;
  1098 + right:0;
  1099 + padding:0;
  1100 + margin: 0;
  1101 + }
  1102 +
  1103 + .file_upload {
  1104 + position: absolute;
  1105 + width: 100%;
  1106 + height: 100%;
  1107 + background:url('http://viget.com/uploads/image/custom-file-input.png');
  1108 + border:0;
  1109 + text-indent:-9999px;
  1110 + }
  1111 +
  1112 + div.attachments {
  1113 + position:relative;
  1114 + width: 100px;
  1115 + height: 30px;
  1116 + overflow:hidden;
  1117 + }
  1118 +}
1082 \ No newline at end of file 1119 \ No newline at end of file
app/views/notes/_form.html.haml
@@ -24,8 +24,10 @@ @@ -24,8 +24,10 @@
24 .span4 24 .span4
25 %h5 Attachment: 25 %h5 Attachment:
26 .clearfix 26 .clearfix
27 - = f.label :attachment, "Any file, < 10 MB"  
28 - .input= f.file_field :attachment, :class => "input-file" 27 + = f.label :attachment, "Any file less then 10 MB"
  28 + .attachments
  29 + %button.file_upload
  30 + .input= f.file_field :attachment, :class => "input-file"
29 31
30 32
31 - = f.submit 'Add note', :class => "btn primary", :id => "submit_note" 33 + = f.submit 'Add Comment', :class => "btn primary", :id => "submit_note"