Commit ec1bccb26173640387124567e9ef748ae220ff37

Authored by Nihad Abbasov
1 parent 46921e69

use 'js-' prefix for behavioral 'gfm-input' class

app/assets/javascripts/gfm_auto_complete.js.coffee
@@ -22,14 +22,14 @@ window.setupGfmAutoComplete = -> @@ -22,14 +22,14 @@ window.setupGfmAutoComplete = ->
22 ### 22 ###
23 Emoji 23 Emoji
24 ### 24 ###
25 - $('.gfm-input').atWho ':', 25 + $('.js-gfm-input').atWho ':',
26 data: autocompleteEmojiData, 26 data: autocompleteEmojiData,
27 tpl: autocompleteEmojiTemplate 27 tpl: autocompleteEmojiTemplate
28 28
29 ### 29 ###
30 Team Members 30 Team Members
31 ### 31 ###
32 - $('.gfm-input').atWho '@', (query, callback) -> 32 + $('.js-gfm-input').atWho '@', (query, callback) ->
33 (getMoreMembers = -> 33 (getMoreMembers = ->
34 $.getJSON(autocompleteMembersUrl, autocompleteMembersParams) 34 $.getJSON(autocompleteMembersUrl, autocompleteMembersParams)
35 .success (members) -> 35 .success (members) ->
@@ -45,7 +45,7 @@ window.setupGfmAutoComplete = -> @@ -45,7 +45,7 @@ window.setupGfmAutoComplete = ->
45 # are we past the last page? 45 # are we past the last page?
46 if newMembersData.length == 0 46 if newMembersData.length == 0
47 # set static data and stop callbacks 47 # set static data and stop callbacks
48 - $('.gfm-input').atWho '@', 48 + $('.js-gfm-input').atWho '@',
49 data: autocompleteMembersData 49 data: autocompleteMembersData
50 callback: null 50 callback: null
51 else 51 else
@@ -54,4 +54,4 @@ window.setupGfmAutoComplete = -> @@ -54,4 +54,4 @@ window.setupGfmAutoComplete = ->
54 54
55 # so the next request gets the next page 55 # so the next request gets the next page
56 autocompleteMembersParams.page += 1; 56 autocompleteMembersParams.page += 1;
57 - ).call();  
58 \ No newline at end of file 57 \ No newline at end of file
  58 + ).call();
app/views/issues/_form.html.haml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 = f.label :title do 12 = f.label :title do
13 %strong= "Subject *" 13 %strong= "Subject *"
14 .input 14 .input
15 - = f.text_field :title, maxlength: 255, class: "xxlarge gfm-input" 15 + = f.text_field :title, maxlength: 255, class: "xxlarge js-gfm-input"
16 .issue_middle_block 16 .issue_middle_block
17 .issue_assignee 17 .issue_assignee
18 = f.label :assignee_id do 18 = f.label :assignee_id do
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 .clearfix 37 .clearfix
38 = f.label :description, "Details" 38 = f.label :description, "Details"
39 .input 39 .input
40 - = f.text_area :description, maxlength: 2000, class: "xxlarge gfm-input", rows: 14 40 + = f.text_area :description, maxlength: 2000, class: "xxlarge js-gfm-input", rows: 14
41 %p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. 41 %p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
42 42
43 43
app/views/merge_requests/_form.html.haml
@@ -30,12 +30,12 @@ @@ -30,12 +30,12 @@
30 .clearfix 30 .clearfix
31 .main_box 31 .main_box
32 .top_box_content 32 .top_box_content
33 - = f.label :title do 33 + = f.label :title do
34 %strong= "Title *" 34 %strong= "Title *"
35 - .input= f.text_field :title, class: "input-xxlarge pad gfm-input", maxlength: 255, rows: 5 35 + .input= f.text_field :title, class: "input-xxlarge pad js-gfm-input", maxlength: 255, rows: 5
36 .middle_box_content 36 .middle_box_content
37 - = f.label :assignee_id do  
38 - %i.icon-user 37 + = f.label :assignee_id do
  38 + %i.icon-user
39 Assign to 39 Assign to
40 .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'}) 40 .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'})
41 41
app/views/notes/_common_form.html.haml
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 = f.hidden_field :noteable_id 9 = f.hidden_field :noteable_id
10 = f.hidden_field :noteable_type 10 = f.hidden_field :noteable_type
11 - = f.text_area :note, size: 255, class: 'note-text gfm-input' 11 + = f.text_area :note, size: 255, class: 'note-text js-gfm-input'
12 #preview-note.preview_note.hide 12 #preview-note.preview_note.hide
13 .hint 13 .hint
14 .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. 14 .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
app/views/notes/_per_line_form.html.haml
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 = f.hidden_field :noteable_id 13 = f.hidden_field :noteable_id
14 = f.hidden_field :noteable_type 14 = f.hidden_field :noteable_type
15 = f.hidden_field :line_code 15 = f.hidden_field :line_code
16 - = f.text_area :note, size: 255, class: 'line-note-text gfm-input' 16 + = f.text_area :note, size: 255, class: 'line-note-text js-gfm-input'
17 .note_actions 17 .note_actions
18 .buttons 18 .buttons
19 = f.submit 'Add note', class: "btn save-btn submit_note submit_inline_note", id: "submit_note" 19 = f.submit 'Add note', class: "btn save-btn submit_note submit_inline_note", id: "submit_note"
app/views/wikis/_form.html.haml
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 21
22 .bottom_box_content 22 .bottom_box_content
23 = f.label :content 23 = f.label :content
24 - .input= f.text_area :content, class: 'span8 gfm-input' 24 + .input= f.text_area :content, class: 'span8 js-gfm-input'
25 .actions 25 .actions
26 = f.submit 'Save', class: "save-btn btn" 26 = f.submit 'Save', class: "save-btn btn"
27 = link_to "Cancel", project_wiki_path(@project, :index), class: "btn cancel-btn" 27 = link_to "Cancel", project_wiki_path(@project, :index), class: "btn cancel-btn"