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 22 ###
23 23 Emoji
24 24 ###
25   - $('.gfm-input').atWho ':',
  25 + $('.js-gfm-input').atWho ':',
26 26 data: autocompleteEmojiData,
27 27 tpl: autocompleteEmojiTemplate
28 28  
29 29 ###
30 30 Team Members
31 31 ###
32   - $('.gfm-input').atWho '@', (query, callback) ->
  32 + $('.js-gfm-input').atWho '@', (query, callback) ->
33 33 (getMoreMembers = ->
34 34 $.getJSON(autocompleteMembersUrl, autocompleteMembersParams)
35 35 .success (members) ->
... ... @@ -45,7 +45,7 @@ window.setupGfmAutoComplete = ->
45 45 # are we past the last page?
46 46 if newMembersData.length == 0
47 47 # set static data and stop callbacks
48   - $('.gfm-input').atWho '@',
  48 + $('.js-gfm-input').atWho '@',
49 49 data: autocompleteMembersData
50 50 callback: null
51 51 else
... ... @@ -54,4 +54,4 @@ window.setupGfmAutoComplete = ->
54 54  
55 55 # so the next request gets the next page
56 56 autocompleteMembersParams.page += 1;
57   - ).call();
58 57 \ No newline at end of file
  58 + ).call();
... ...
app/views/issues/_form.html.haml
... ... @@ -12,7 +12,7 @@
12 12 = f.label :title do
13 13 %strong= "Subject *"
14 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 16 .issue_middle_block
17 17 .issue_assignee
18 18 = f.label :assignee_id do
... ... @@ -37,7 +37,7 @@
37 37 .clearfix
38 38 = f.label :description, "Details"
39 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 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 30 .clearfix
31 31 .main_box
32 32 .top_box_content
33   - = f.label :title do
  33 + = f.label :title do
34 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 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 39 Assign to
40 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 8  
9 9 = f.hidden_field :noteable_id
10 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 12 #preview-note.preview_note.hide
13 13 .hint
14 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 13 = f.hidden_field :noteable_id
14 14 = f.hidden_field :noteable_type
15 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 17 .note_actions
18 18 .buttons
19 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 21  
22 22 .bottom_box_content
23 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 25 .actions
26 26 = f.submit 'Save', class: "save-btn btn"
27 27 = link_to "Cancel", project_wiki_path(@project, :index), class: "btn cancel-btn"
... ...