Skip to content

Commit

Permalink
Issue #687. Use .js- prefixed classes for ImageUploadView.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Sep 21, 2015
1 parent e3e6f9d commit 27c5d7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions webcompat/static/js/lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ issues.TextAreaView = Backbone.View.extend({
});

issues.ImageUploadView = Backbone.View.extend({
tagName: 'div',
className: 'wc-Form-group',
el: $('.js-ImageUploadView'),
events: {
'change .ButtonUpload': 'validateAndUpload'
'change .js-buttonUpload': 'validateAndUpload'
},
_submitButton: $('.js-issue-comment-button'),
_loaderImage: $('.js-loader'),
Expand Down
5 changes: 3 additions & 2 deletions webcompat/templates/issue.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,17 @@ <h1 class="wc-IssueDetail-title wc-Title--l">
<div class="wc-Comment-body wc-Comment-body--caret">
<label for="wc-Comment-text" class="wc-sronly">Comment Text</label>
<textarea id="Comment-text" class="wc-Comment-wrapper wc-Comment-text" placeholder="Leave a comment"></textarea>
<div class="wc-Form-group js-ImageUploadView">
<script type="text/template" id="upload-input-tmpl">
<!-- div class="wc-Form-group" parent created by BackBone -->
<form><div class="wc-Form-upload">
<span class="wc-Form-upload-icon" aria-hidden="true">
<span class="wc-Icon wc-Icon--cloud-upload"></span>
</span>
<label class="wc-Form-label wc-Form-label--upload" for="image">Attach a screenshot image</label>
<input accept=".jpe,.jpg,.jpeg,.gif,.png,.bmp" class="ButtonUpload" id="image" name="image" type="file">
<input accept=".jpe,.jpg,.jpeg,.gif,.png,.bmp" class="ButtonUpload js-buttonUpload" id="image" name="image" type="file">
</div></form>
</script>
</div>
<div class="wc-Loader js-loader"></div>
<div class="wc-Comment-button">
<button class="Button Button--action js-issue-state-button">
Expand Down

0 comments on commit 27c5d7b

Please sign in to comment.