diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index da0077ea77b0007c0961e2da12bc5bf95a37fee5..f75008e2b603dc61cbd11e10e6229f12c8331d04 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -14,7 +14,7 @@ class Admin $('.log-bottom').click (e) -> e.preventDefault() - visible_log = $(".file_content:visible") + visible_log = $(".file-content:visible") visible_log.animate({ scrollTop: visible_log.find('ol').height() }, "fast") modal = $('.change-owner-holder') diff --git a/app/assets/stylesheets/gitlab_bootstrap/files.scss b/app/assets/stylesheets/gitlab_bootstrap/files.scss index 4d42bf4532c425ef9671177b4c37893e52709cb3..ec03fd0d844d444dff847a2e40a457a874e7c337 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/files.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/files.scss @@ -2,12 +2,12 @@ * File content holder * */ -.file_holder { +.file-holder { border: 1px solid #BBB; margin-bottom: 1em; @include solid-shade; - .file_title { + .file-title { border-bottom: 1px solid #bbb; @include bg-dark-gray-gradient; margin: 0; @@ -33,7 +33,7 @@ } } } - .file_content { + .file-content { background: #fff; font-size: 11px; diff --git a/app/assets/stylesheets/sections/snippets.scss b/app/assets/stylesheets/sections/snippets.scss index 3944814fc3e5bf5d5ec1dcbe86ad2dfd8c3ac63e..feeca655cb18053df12ffc92f92aa503629f2ee9 100644 --- a/app/assets/stylesheets/sections/snippets.scss +++ b/app/assets/stylesheets/sections/snippets.scss @@ -1,5 +1,5 @@ -.snippet.file_holder { - .file_title { +.snippet.file-holder { + .file-title { .snippet-file-name { position: relative; top: -4px; diff --git a/app/views/admin/logs/show.html.haml b/app/views/admin/logs/show.html.haml index fef72186b2f37135181f114ee0fe150a24165cbe..cce8aeb02c73ed89a66988c584e286bb7aa3e80f 100644 --- a/app/views/admin/logs/show.html.haml +++ b/app/views/admin/logs/show.html.haml @@ -11,57 +11,57 @@ %p.light To prevent performance issues admin logs output the last 2000 lines .tab-content .tab-pane.active#githost - .file_holder#README - .file_title + .file-holder#README + .file-title %i.icon-file githost.log .pull-right = link_to '#', class: 'log-bottom' do %i.icon-arrow-down Scroll down - .file_content.logs + .file-content.logs %ol - Gitlab::GitLogger.read_latest.each do |line| %li %p= line .tab-pane#application - .file_holder#README - .file_title + .file-holder#README + .file-title %i.icon-file application.log .pull-right = link_to '#', class: 'log-bottom' do %i.icon-arrow-down Scroll down - .file_content.logs + .file-content.logs %ol - Gitlab::AppLogger.read_latest.each do |line| %li %p= line .tab-pane#production - .file_holder#README - .file_title + .file-holder#README + .file-title %i.icon-file production.log .pull-right = link_to '#', class: 'log-bottom' do %i.icon-arrow-down Scroll down - .file_content.logs + .file-content.logs %ol - Gitlab::Logger.read_latest_for('production.log').each do |line| %li %p= line .tab-pane#sidekiq - .file_holder#README - .file_title + .file-holder#README + .file-title %i.icon-file sidekiq.log .pull-right = link_to '#', class: 'log-bottom' do %i.icon-arrow-down Scroll down - .file_content.logs + .file-content.logs %ol - Gitlab::Logger.read_latest_for('sidekiq.log').each do |line| %li diff --git a/app/views/help/api.html.haml b/app/views/help/api.html.haml index 5eb59ab266d0c43335c2caadf7f6c5138038cb4d..8897865192f317b7f262ec8fc53bb699eca4a808 100644 --- a/app/views/help/api.html.haml +++ b/app/views/help/api.html.haml @@ -6,10 +6,10 @@ = @category.titleize %br - .file_holder - .file_title + .file-holder + .file-title %i.icon-file = @category - .file_content.wiki + .file-content.wiki = preserve do = markdown File.read(Rails.root.join("doc", "api", "#{@category}.md")) diff --git a/app/views/help/raketasks.html.haml b/app/views/help/raketasks.html.haml index 0f02696a111739b25b3a61ee9188d776c51073e4..d92efd4d85a3a34065ad2aa461f0b7eac4eb754c 100644 --- a/app/views/help/raketasks.html.haml +++ b/app/views/help/raketasks.html.haml @@ -19,46 +19,46 @@ .tab-content .tab-pane.active#features - .file_holder - .file_title + .file-holder + .file-title %i.icon-file Features - .file_content.wiki + .file-content.wiki = preserve do = markdown File.read(Rails.root.join("doc", "raketasks", "features.md")) .tab-pane#maintenance - .file_holder - .file_title + .file-holder + .file-title %i.icon-file Maintenance - .file_content.wiki + .file-content.wiki = preserve do = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md")) .tab-pane#user_management - .file_holder - .file_title + .file-holder + .file-title %i.icon-file User Management - .file_content.wiki + .file-content.wiki = preserve do = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md")) .tab-pane#cleanup - .file_holder - .file_title + .file-holder + .file-title %i.icon-file Cleanup - .file_content.wiki + .file-content.wiki = preserve do = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md")) .tab-pane#backup_restore - .file_holder - .file_title + .file-holder + .file-title %i.icon-file Backup & Restore - .file_content.wiki + .file-content.wiki = preserve do = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md")) diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 3f68db659fca5fca86fcd1e937a8d2585960f258..e9a6939057743ec5a1631c58fe611e86c2067185 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -11,14 +11,14 @@ %li= link .clear - .file_holder - .file_title + .file-holder + .file-title %i.icon-file %span.file_name = @blob.name %small= number_to_human_size @blob.size %span.options= render "projects/blob/actions" - .file_content.blame + .file-content.blame %table - current_line = 1 - @blame.each do |commit, lines| diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index 68d6c06065c64847f33a741a224f427d790d86d5..6524aaeef4c418c8449c4da4d14fe83fe6b0d2b0 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -17,8 +17,8 @@ = link_to title, '#' %div#tree-content-holder.tree-content-holder - .file_holder - .file_title + .file-holder + .file-title %i.icon-file %span.file_name = blob.name diff --git a/app/views/projects/blob/_download.html.haml b/app/views/projects/blob/_download.html.haml index 864c209db76aa401958a21ab384f05253b023a59..951393b710460c500cd6574b9d642759194951b2 100644 --- a/app/views/projects/blob/_download.html.haml +++ b/app/views/projects/blob/_download.html.haml @@ -1,4 +1,4 @@ -.file_content.blob_file +.file-content.blob_file %center = link_to project_blob_path(@project, @id) do %div.padded diff --git a/app/views/projects/blob/_image.html.haml b/app/views/projects/blob/_image.html.haml index 7b23f0c810ca41bb5def025c3b41920383005d29..c090f690d1d7d90602112e28447a736f1ea5f8f6 100644 --- a/app/views/projects/blob/_image.html.haml +++ b/app/views/projects/blob/_image.html.haml @@ -1,2 +1,2 @@ -.file_content.image_file +.file-content.image_file %img{ src: "data:#{blob.mime_type};base64,#{Base64.encode64(blob.data)}"} diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml index 122e275219d2f10a1c41ec6ff65851d6bf3e2d0e..bed493d6d8c8e882a892efdd58a57481cb11d191 100644 --- a/app/views/projects/blob/_text.html.haml +++ b/app/views/projects/blob/_text.html.haml @@ -1,12 +1,12 @@ - if gitlab_markdown?(blob.name) - .file_content.wiki + .file-content.wiki = preserve do = markdown(blob.data) - elsif markup?(blob.name) - .file_content.wiki + .file-content.wiki = raw GitHub::Markup.render(blob.name, blob.data) - else - .file_content.code + .file-content.code - unless blob.empty? %div{class: user_color_scheme_class} = raw blob.colorize(formatter: :gitlab) diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml index 101b479afedbb89042dc55cf107c5add15a06c0f..25a361cb2fdeb75b801886cb906bd89a5f62bd40 100644 --- a/app/views/projects/edit_tree/show.html.haml +++ b/app/views/projects/edit_tree/show.html.haml @@ -1,7 +1,7 @@ .file-editor = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do - .file_holder - .file_title + .file-holder + .file-title %i.icon-file %span.file_name = @path @@ -11,7 +11,7 @@ %span.options .btn-group.tree-btn-group = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message - .file_content.code + .file-content.code %pre#editor= @blob.data .control-group.commit_message-group @@ -21,7 +21,7 @@ = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3 .form-actions = hidden_field_tag 'last_commit', @last_commit - = hidden_field_tag 'content', '', id: :file_content + = hidden_field_tag 'content', '', id: :file-content .commit-button-annotation = button_tag "Commit changes", class: 'btn commit-btn js-commit-button btn-primary' .message @@ -40,6 +40,6 @@ disableButtonIfEmptyField("#commit_message", ".js-commit-button"); $(".js-commit-button").click(function(){ - $("#file_content").val(editor.getValue()); + $("#file-content").val(editor.getValue()); $(".file-editor form").submit(); }); diff --git a/app/views/projects/snippets/_blob.html.haml b/app/views/projects/snippets/_blob.html.haml index e0d1669acbe080204e8def10788fd0c676507df8..f14a2bd4ec004b034f9193dae47016a4135f90ab 100644 --- a/app/views/projects/snippets/_blob.html.haml +++ b/app/views/projects/snippets/_blob.html.haml @@ -1,5 +1,5 @@ -.file_holder - .file_title +.file-holder + .file-title %i.icon-file %strong= @snippet.file_name %span.options @@ -7,7 +7,7 @@ - if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-tiny", title: 'Edit Snippet' = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank" - .file_content.code + .file-content.code - unless @snippet.content.empty? %div{class: user_color_scheme_class} = raw @snippet.colorize(formatter: :gitlab) diff --git a/app/views/projects/snippets/_form.html.haml b/app/views/projects/snippets/_form.html.haml index a4f307347896d42ab994ff99a79d3c942c43538b..a8aa5460f2eff4730bdfa40ba5a057df6940a065 100644 --- a/app/views/projects/snippets/_form.html.haml +++ b/app/views/projects/snippets/_form.html.haml @@ -19,10 +19,10 @@ .file-editor = f.label :file_name, "File" .input - .file_holder.snippet - .file_title + .file-holder.snippet + .file-title = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true - .file_content.code + .file-content.code %pre#editor= @snippet.content = f.hidden_field :content, class: 'snippet-file-content' diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index e9bb112745b3e40dfb23e07e75eb58a521ed0b4b..98bacb495628429388842d90c79ee4d335b92c8b 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -1,8 +1,8 @@ -.file_holder#README - .file_title +.file-holder#README + .file-title %i.icon-file = readme.name - .file_content.wiki + .file-content.wiki - if gitlab_markdown?(readme.name) = preserve do = markdown(readme.data) diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml index 2fdaa8d00e4ce70f76072291d68488dba4cec002..f1cd782412520a24233bb7443d34266a20f32efa 100644 --- a/app/views/projects/wikis/show.html.haml +++ b/app/views/projects/wikis/show.html.haml @@ -8,8 +8,8 @@ This is an old version of this page. 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)}. -.file_holder - .file_content.wiki +.file-holder + .file-content.wiki = preserve do = render_wiki_content(@wiki) diff --git a/app/views/search/_blob.html.haml b/app/views/search/_blob.html.haml index 39e711707066660dbea83af3896df464d4b8b683..559fdd794fc9b8ec2d7be5942c7781f8764c56e9 100644 --- a/app/views/search/_blob.html.haml +++ b/app/views/search/_blob.html.haml @@ -1,10 +1,10 @@ %li - .file_holder - .file_title + .file-holder + .file-title = link_to project_blob_path(@project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do %i.icon-file %strong = blob.filename - .file_content.code.term + .file-content.code.term %div{class: user_color_scheme_class} = raw blob.colorize( formatter: :gitlab, options: { first_line_number: blob.startline } ) diff --git a/app/views/snippets/_blob.html.haml b/app/views/snippets/_blob.html.haml index c538da0bee57f56d71cc0da13a932af0b8505371..c2e0d97a1179171accdb47929741891e53d8de2e 100644 --- a/app/views/snippets/_blob.html.haml +++ b/app/views/snippets/_blob.html.haml @@ -1,5 +1,5 @@ -.file_holder - .file_title +.file-holder + .file-title %i.icon-file %strong= @snippet.file_name %span.options @@ -8,7 +8,7 @@ = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' = link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet' = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" - .file_content.code + .file-content.code - unless @snippet.content.empty? %div{class: user_color_scheme_class} = raw @snippet.colorize(formatter: :gitlab) diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml index e05794e820c08714c0e61f240b253d4524202216..05502503bee0361c04d8f0e92fc56daf5f892bfd 100644 --- a/app/views/snippets/_form.html.haml +++ b/app/views/snippets/_form.html.haml @@ -22,10 +22,10 @@ .file-editor = f.label :file_name, "File" .input - .file_holder.snippet - .file_title + .file-holder.snippet + .file-title = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true - .file_content.code + .file-content.code %pre#editor= @snippet.content = f.hidden_field :content, class: 'snippet-file-content'