Commit 3805797cae702e46a83b5da9b6411f1899c3d1a0
1 parent
399d0bdd
Exists in
master
and in
4 other branches
scss: rename file_content to file-content etc
Showing
19 changed files
with
71 additions
and
71 deletions
Show diff stats
app/assets/javascripts/admin.js.coffee
| @@ -14,7 +14,7 @@ class Admin | @@ -14,7 +14,7 @@ class Admin | ||
| 14 | 14 | ||
| 15 | $('.log-bottom').click (e) -> | 15 | $('.log-bottom').click (e) -> |
| 16 | e.preventDefault() | 16 | e.preventDefault() |
| 17 | - visible_log = $(".file_content:visible") | 17 | + visible_log = $(".file-content:visible") |
| 18 | visible_log.animate({ scrollTop: visible_log.find('ol').height() }, "fast") | 18 | visible_log.animate({ scrollTop: visible_log.find('ol').height() }, "fast") |
| 19 | 19 | ||
| 20 | modal = $('.change-owner-holder') | 20 | modal = $('.change-owner-holder') |
app/assets/stylesheets/gitlab_bootstrap/files.scss
| @@ -2,12 +2,12 @@ | @@ -2,12 +2,12 @@ | ||
| 2 | * File content holder | 2 | * File content holder |
| 3 | * | 3 | * |
| 4 | */ | 4 | */ |
| 5 | -.file_holder { | 5 | +.file-holder { |
| 6 | border: 1px solid #BBB; | 6 | border: 1px solid #BBB; |
| 7 | margin-bottom: 1em; | 7 | margin-bottom: 1em; |
| 8 | @include solid-shade; | 8 | @include solid-shade; |
| 9 | 9 | ||
| 10 | - .file_title { | 10 | + .file-title { |
| 11 | border-bottom: 1px solid #bbb; | 11 | border-bottom: 1px solid #bbb; |
| 12 | @include bg-dark-gray-gradient; | 12 | @include bg-dark-gray-gradient; |
| 13 | margin: 0; | 13 | margin: 0; |
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | - .file_content { | 36 | + .file-content { |
| 37 | background: #fff; | 37 | background: #fff; |
| 38 | font-size: 11px; | 38 | font-size: 11px; |
| 39 | 39 |
app/assets/stylesheets/sections/snippets.scss
app/views/admin/logs/show.html.haml
| @@ -11,57 +11,57 @@ | @@ -11,57 +11,57 @@ | ||
| 11 | %p.light To prevent performance issues admin logs output the last 2000 lines | 11 | %p.light To prevent performance issues admin logs output the last 2000 lines |
| 12 | .tab-content | 12 | .tab-content |
| 13 | .tab-pane.active#githost | 13 | .tab-pane.active#githost |
| 14 | - .file_holder#README | ||
| 15 | - .file_title | 14 | + .file-holder#README |
| 15 | + .file-title | ||
| 16 | %i.icon-file | 16 | %i.icon-file |
| 17 | githost.log | 17 | githost.log |
| 18 | .pull-right | 18 | .pull-right |
| 19 | = link_to '#', class: 'log-bottom' do | 19 | = link_to '#', class: 'log-bottom' do |
| 20 | %i.icon-arrow-down | 20 | %i.icon-arrow-down |
| 21 | Scroll down | 21 | Scroll down |
| 22 | - .file_content.logs | 22 | + .file-content.logs |
| 23 | %ol | 23 | %ol |
| 24 | - Gitlab::GitLogger.read_latest.each do |line| | 24 | - Gitlab::GitLogger.read_latest.each do |line| |
| 25 | %li | 25 | %li |
| 26 | %p= line | 26 | %p= line |
| 27 | .tab-pane#application | 27 | .tab-pane#application |
| 28 | - .file_holder#README | ||
| 29 | - .file_title | 28 | + .file-holder#README |
| 29 | + .file-title | ||
| 30 | %i.icon-file | 30 | %i.icon-file |
| 31 | application.log | 31 | application.log |
| 32 | .pull-right | 32 | .pull-right |
| 33 | = link_to '#', class: 'log-bottom' do | 33 | = link_to '#', class: 'log-bottom' do |
| 34 | %i.icon-arrow-down | 34 | %i.icon-arrow-down |
| 35 | Scroll down | 35 | Scroll down |
| 36 | - .file_content.logs | 36 | + .file-content.logs |
| 37 | %ol | 37 | %ol |
| 38 | - Gitlab::AppLogger.read_latest.each do |line| | 38 | - Gitlab::AppLogger.read_latest.each do |line| |
| 39 | %li | 39 | %li |
| 40 | %p= line | 40 | %p= line |
| 41 | .tab-pane#production | 41 | .tab-pane#production |
| 42 | - .file_holder#README | ||
| 43 | - .file_title | 42 | + .file-holder#README |
| 43 | + .file-title | ||
| 44 | %i.icon-file | 44 | %i.icon-file |
| 45 | production.log | 45 | production.log |
| 46 | .pull-right | 46 | .pull-right |
| 47 | = link_to '#', class: 'log-bottom' do | 47 | = link_to '#', class: 'log-bottom' do |
| 48 | %i.icon-arrow-down | 48 | %i.icon-arrow-down |
| 49 | Scroll down | 49 | Scroll down |
| 50 | - .file_content.logs | 50 | + .file-content.logs |
| 51 | %ol | 51 | %ol |
| 52 | - Gitlab::Logger.read_latest_for('production.log').each do |line| | 52 | - Gitlab::Logger.read_latest_for('production.log').each do |line| |
| 53 | %li | 53 | %li |
| 54 | %p= line | 54 | %p= line |
| 55 | .tab-pane#sidekiq | 55 | .tab-pane#sidekiq |
| 56 | - .file_holder#README | ||
| 57 | - .file_title | 56 | + .file-holder#README |
| 57 | + .file-title | ||
| 58 | %i.icon-file | 58 | %i.icon-file |
| 59 | sidekiq.log | 59 | sidekiq.log |
| 60 | .pull-right | 60 | .pull-right |
| 61 | = link_to '#', class: 'log-bottom' do | 61 | = link_to '#', class: 'log-bottom' do |
| 62 | %i.icon-arrow-down | 62 | %i.icon-arrow-down |
| 63 | Scroll down | 63 | Scroll down |
| 64 | - .file_content.logs | 64 | + .file-content.logs |
| 65 | %ol | 65 | %ol |
| 66 | - Gitlab::Logger.read_latest_for('sidekiq.log').each do |line| | 66 | - Gitlab::Logger.read_latest_for('sidekiq.log').each do |line| |
| 67 | %li | 67 | %li |
app/views/help/api.html.haml
| @@ -6,10 +6,10 @@ | @@ -6,10 +6,10 @@ | ||
| 6 | = @category.titleize | 6 | = @category.titleize |
| 7 | %br | 7 | %br |
| 8 | 8 | ||
| 9 | - .file_holder | ||
| 10 | - .file_title | 9 | + .file-holder |
| 10 | + .file-title | ||
| 11 | %i.icon-file | 11 | %i.icon-file |
| 12 | = @category | 12 | = @category |
| 13 | - .file_content.wiki | 13 | + .file-content.wiki |
| 14 | = preserve do | 14 | = preserve do |
| 15 | = markdown File.read(Rails.root.join("doc", "api", "#{@category}.md")) | 15 | = markdown File.read(Rails.root.join("doc", "api", "#{@category}.md")) |
app/views/help/raketasks.html.haml
| @@ -19,46 +19,46 @@ | @@ -19,46 +19,46 @@ | ||
| 19 | 19 | ||
| 20 | .tab-content | 20 | .tab-content |
| 21 | .tab-pane.active#features | 21 | .tab-pane.active#features |
| 22 | - .file_holder | ||
| 23 | - .file_title | 22 | + .file-holder |
| 23 | + .file-title | ||
| 24 | %i.icon-file | 24 | %i.icon-file |
| 25 | Features | 25 | Features |
| 26 | - .file_content.wiki | 26 | + .file-content.wiki |
| 27 | = preserve do | 27 | = preserve do |
| 28 | = markdown File.read(Rails.root.join("doc", "raketasks", "features.md")) | 28 | = markdown File.read(Rails.root.join("doc", "raketasks", "features.md")) |
| 29 | 29 | ||
| 30 | .tab-pane#maintenance | 30 | .tab-pane#maintenance |
| 31 | - .file_holder | ||
| 32 | - .file_title | 31 | + .file-holder |
| 32 | + .file-title | ||
| 33 | %i.icon-file | 33 | %i.icon-file |
| 34 | Maintenance | 34 | Maintenance |
| 35 | - .file_content.wiki | 35 | + .file-content.wiki |
| 36 | = preserve do | 36 | = preserve do |
| 37 | = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md")) | 37 | = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md")) |
| 38 | 38 | ||
| 39 | .tab-pane#user_management | 39 | .tab-pane#user_management |
| 40 | - .file_holder | ||
| 41 | - .file_title | 40 | + .file-holder |
| 41 | + .file-title | ||
| 42 | %i.icon-file | 42 | %i.icon-file |
| 43 | User Management | 43 | User Management |
| 44 | - .file_content.wiki | 44 | + .file-content.wiki |
| 45 | = preserve do | 45 | = preserve do |
| 46 | = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md")) | 46 | = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md")) |
| 47 | 47 | ||
| 48 | .tab-pane#cleanup | 48 | .tab-pane#cleanup |
| 49 | - .file_holder | ||
| 50 | - .file_title | 49 | + .file-holder |
| 50 | + .file-title | ||
| 51 | %i.icon-file | 51 | %i.icon-file |
| 52 | Cleanup | 52 | Cleanup |
| 53 | - .file_content.wiki | 53 | + .file-content.wiki |
| 54 | = preserve do | 54 | = preserve do |
| 55 | = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md")) | 55 | = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md")) |
| 56 | 56 | ||
| 57 | .tab-pane#backup_restore | 57 | .tab-pane#backup_restore |
| 58 | - .file_holder | ||
| 59 | - .file_title | 58 | + .file-holder |
| 59 | + .file-title | ||
| 60 | %i.icon-file | 60 | %i.icon-file |
| 61 | Backup & Restore | 61 | Backup & Restore |
| 62 | - .file_content.wiki | 62 | + .file-content.wiki |
| 63 | = preserve do | 63 | = preserve do |
| 64 | = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md")) | 64 | = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md")) |
app/views/projects/blame/show.html.haml
| @@ -11,14 +11,14 @@ | @@ -11,14 +11,14 @@ | ||
| 11 | %li= link | 11 | %li= link |
| 12 | .clear | 12 | .clear |
| 13 | 13 | ||
| 14 | - .file_holder | ||
| 15 | - .file_title | 14 | + .file-holder |
| 15 | + .file-title | ||
| 16 | %i.icon-file | 16 | %i.icon-file |
| 17 | %span.file_name | 17 | %span.file_name |
| 18 | = @blob.name | 18 | = @blob.name |
| 19 | %small= number_to_human_size @blob.size | 19 | %small= number_to_human_size @blob.size |
| 20 | %span.options= render "projects/blob/actions" | 20 | %span.options= render "projects/blob/actions" |
| 21 | - .file_content.blame | 21 | + .file-content.blame |
| 22 | %table | 22 | %table |
| 23 | - current_line = 1 | 23 | - current_line = 1 |
| 24 | - @blame.each do |commit, lines| | 24 | - @blame.each do |commit, lines| |
app/views/projects/blob/_blob.html.haml
| @@ -17,8 +17,8 @@ | @@ -17,8 +17,8 @@ | ||
| 17 | = link_to title, '#' | 17 | = link_to title, '#' |
| 18 | 18 | ||
| 19 | %div#tree-content-holder.tree-content-holder | 19 | %div#tree-content-holder.tree-content-holder |
| 20 | - .file_holder | ||
| 21 | - .file_title | 20 | + .file-holder |
| 21 | + .file-title | ||
| 22 | %i.icon-file | 22 | %i.icon-file |
| 23 | %span.file_name | 23 | %span.file_name |
| 24 | = blob.name | 24 | = blob.name |
app/views/projects/blob/_download.html.haml
app/views/projects/blob/_image.html.haml
app/views/projects/blob/_text.html.haml
| 1 | - if gitlab_markdown?(blob.name) | 1 | - if gitlab_markdown?(blob.name) |
| 2 | - .file_content.wiki | 2 | + .file-content.wiki |
| 3 | = preserve do | 3 | = preserve do |
| 4 | = markdown(blob.data) | 4 | = markdown(blob.data) |
| 5 | - elsif markup?(blob.name) | 5 | - elsif markup?(blob.name) |
| 6 | - .file_content.wiki | 6 | + .file-content.wiki |
| 7 | = raw GitHub::Markup.render(blob.name, blob.data) | 7 | = raw GitHub::Markup.render(blob.name, blob.data) |
| 8 | - else | 8 | - else |
| 9 | - .file_content.code | 9 | + .file-content.code |
| 10 | - unless blob.empty? | 10 | - unless blob.empty? |
| 11 | %div{class: user_color_scheme_class} | 11 | %div{class: user_color_scheme_class} |
| 12 | = raw blob.colorize(formatter: :gitlab) | 12 | = raw blob.colorize(formatter: :gitlab) |
app/views/projects/edit_tree/show.html.haml
| 1 | .file-editor | 1 | .file-editor |
| 2 | = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do | 2 | = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do |
| 3 | - .file_holder | ||
| 4 | - .file_title | 3 | + .file-holder |
| 4 | + .file-title | ||
| 5 | %i.icon-file | 5 | %i.icon-file |
| 6 | %span.file_name | 6 | %span.file_name |
| 7 | = @path | 7 | = @path |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | %span.options | 11 | %span.options |
| 12 | .btn-group.tree-btn-group | 12 | .btn-group.tree-btn-group |
| 13 | = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message | 13 | = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message |
| 14 | - .file_content.code | 14 | + .file-content.code |
| 15 | %pre#editor= @blob.data | 15 | %pre#editor= @blob.data |
| 16 | 16 | ||
| 17 | .control-group.commit_message-group | 17 | .control-group.commit_message-group |
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3 | 21 | = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3 |
| 22 | .form-actions | 22 | .form-actions |
| 23 | = hidden_field_tag 'last_commit', @last_commit | 23 | = hidden_field_tag 'last_commit', @last_commit |
| 24 | - = hidden_field_tag 'content', '', id: :file_content | 24 | + = hidden_field_tag 'content', '', id: :file-content |
| 25 | .commit-button-annotation | 25 | .commit-button-annotation |
| 26 | = button_tag "Commit changes", class: 'btn commit-btn js-commit-button btn-primary' | 26 | = button_tag "Commit changes", class: 'btn commit-btn js-commit-button btn-primary' |
| 27 | .message | 27 | .message |
| @@ -40,6 +40,6 @@ | @@ -40,6 +40,6 @@ | ||
| 40 | disableButtonIfEmptyField("#commit_message", ".js-commit-button"); | 40 | disableButtonIfEmptyField("#commit_message", ".js-commit-button"); |
| 41 | 41 | ||
| 42 | $(".js-commit-button").click(function(){ | 42 | $(".js-commit-button").click(function(){ |
| 43 | - $("#file_content").val(editor.getValue()); | 43 | + $("#file-content").val(editor.getValue()); |
| 44 | $(".file-editor form").submit(); | 44 | $(".file-editor form").submit(); |
| 45 | }); | 45 | }); |
app/views/projects/snippets/_blob.html.haml
| 1 | -.file_holder | ||
| 2 | - .file_title | 1 | +.file-holder |
| 2 | + .file-title | ||
| 3 | %i.icon-file | 3 | %i.icon-file |
| 4 | %strong= @snippet.file_name | 4 | %strong= @snippet.file_name |
| 5 | %span.options | 5 | %span.options |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | - if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user | 7 | - if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user |
| 8 | = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-tiny", title: 'Edit Snippet' | 8 | = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-tiny", title: 'Edit Snippet' |
| 9 | = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank" | 9 | = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank" |
| 10 | - .file_content.code | 10 | + .file-content.code |
| 11 | - unless @snippet.content.empty? | 11 | - unless @snippet.content.empty? |
| 12 | %div{class: user_color_scheme_class} | 12 | %div{class: user_color_scheme_class} |
| 13 | = raw @snippet.colorize(formatter: :gitlab) | 13 | = raw @snippet.colorize(formatter: :gitlab) |
app/views/projects/snippets/_form.html.haml
| @@ -19,10 +19,10 @@ | @@ -19,10 +19,10 @@ | ||
| 19 | .file-editor | 19 | .file-editor |
| 20 | = f.label :file_name, "File" | 20 | = f.label :file_name, "File" |
| 21 | .input | 21 | .input |
| 22 | - .file_holder.snippet | ||
| 23 | - .file_title | 22 | + .file-holder.snippet |
| 23 | + .file-title | ||
| 24 | = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true | 24 | = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true |
| 25 | - .file_content.code | 25 | + .file-content.code |
| 26 | %pre#editor= @snippet.content | 26 | %pre#editor= @snippet.content |
| 27 | = f.hidden_field :content, class: 'snippet-file-content' | 27 | = f.hidden_field :content, class: 'snippet-file-content' |
| 28 | 28 |
app/views/projects/tree/_readme.html.haml
| 1 | -.file_holder#README | ||
| 2 | - .file_title | 1 | +.file-holder#README |
| 2 | + .file-title | ||
| 3 | %i.icon-file | 3 | %i.icon-file |
| 4 | = readme.name | 4 | = readme.name |
| 5 | - .file_content.wiki | 5 | + .file-content.wiki |
| 6 | - if gitlab_markdown?(readme.name) | 6 | - if gitlab_markdown?(readme.name) |
| 7 | = preserve do | 7 | = preserve do |
| 8 | = markdown(readme.data) | 8 | = markdown(readme.data) |
app/views/projects/wikis/show.html.haml
| @@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
| 8 | This is an old version of this page. | 8 | This is an old version of this page. |
| 9 | You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}. | 9 | You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}. |
| 10 | 10 | ||
| 11 | -.file_holder | ||
| 12 | - .file_content.wiki | 11 | +.file-holder |
| 12 | + .file-content.wiki | ||
| 13 | = preserve do | 13 | = preserve do |
| 14 | = render_wiki_content(@wiki) | 14 | = render_wiki_content(@wiki) |
| 15 | 15 |
app/views/search/_blob.html.haml
| 1 | %li | 1 | %li |
| 2 | - .file_holder | ||
| 3 | - .file_title | 2 | + .file-holder |
| 3 | + .file-title | ||
| 4 | = link_to project_blob_path(@project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do | 4 | = link_to project_blob_path(@project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do |
| 5 | %i.icon-file | 5 | %i.icon-file |
| 6 | %strong | 6 | %strong |
| 7 | = blob.filename | 7 | = blob.filename |
| 8 | - .file_content.code.term | 8 | + .file-content.code.term |
| 9 | %div{class: user_color_scheme_class} | 9 | %div{class: user_color_scheme_class} |
| 10 | = raw blob.colorize( formatter: :gitlab, options: { first_line_number: blob.startline } ) | 10 | = raw blob.colorize( formatter: :gitlab, options: { first_line_number: blob.startline } ) |
app/views/snippets/_blob.html.haml
| 1 | -.file_holder | ||
| 2 | - .file_title | 1 | +.file-holder |
| 2 | + .file-title | ||
| 3 | %i.icon-file | 3 | %i.icon-file |
| 4 | %strong= @snippet.file_name | 4 | %strong= @snippet.file_name |
| 5 | %span.options | 5 | %span.options |
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' | 8 | = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' |
| 9 | = link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet' | 9 | = link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet' |
| 10 | = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" | 10 | = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" |
| 11 | - .file_content.code | 11 | + .file-content.code |
| 12 | - unless @snippet.content.empty? | 12 | - unless @snippet.content.empty? |
| 13 | %div{class: user_color_scheme_class} | 13 | %div{class: user_color_scheme_class} |
| 14 | = raw @snippet.colorize(formatter: :gitlab) | 14 | = raw @snippet.colorize(formatter: :gitlab) |
app/views/snippets/_form.html.haml
| @@ -22,10 +22,10 @@ | @@ -22,10 +22,10 @@ | ||
| 22 | .file-editor | 22 | .file-editor |
| 23 | = f.label :file_name, "File" | 23 | = f.label :file_name, "File" |
| 24 | .input | 24 | .input |
| 25 | - .file_holder.snippet | ||
| 26 | - .file_title | 25 | + .file-holder.snippet |
| 26 | + .file-title | ||
| 27 | = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true | 27 | = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true |
| 28 | - .file_content.code | 28 | + .file-content.code |
| 29 | %pre#editor= @snippet.content | 29 | %pre#editor= @snippet.content |
| 30 | = f.hidden_field :content, class: 'snippet-file-content' | 30 | = f.hidden_field :content, class: 'snippet-file-content' |
| 31 | 31 |