Commit b510223e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into route-helper

parents 6de4e4a6 01660f0d
class @Diff class @Diff
UNFOLD_COUNT = 20 UNFOLD_COUNT = 20
constructor: -> constructor: ->
$(document).off('click', '.js-unfold')
$(document).on('click', '.js-unfold', (event) => $(document).on('click', '.js-unfold', (event) =>
target = $(event.target) target = $(event.target)
unfoldBottom = target.hasClass('js-unfold-bottom') unfoldBottom = target.hasClass('js-unfold-bottom')
...@@ -36,7 +37,7 @@ class @Diff ...@@ -36,7 +37,7 @@ class @Diff
) )
) )
$('.diff-header').stick_in_parent(offset_top: $('.navbar').height()) $('.diff-header').stick_in_parent(recalc_every: 1, offset_top: $('.navbar').height())
lineNumbers: (line) -> lineNumbers: (line) ->
return ([0, 0]) unless line.children().length return ([0, 0]) unless line.children().length
......
...@@ -16,6 +16,7 @@ class @Issue ...@@ -16,6 +16,7 @@ class @Issue
updateTaskState updateTaskState
) )
$('.issue-details').waitForImages ->
$('.issuable-affix').affix offset: $('.issuable-affix').affix offset:
top: -> top: ->
@top = $('.issue-details').outerHeight(true) + 25 @top = $('.issue-details').outerHeight(true) + 25
......
...@@ -20,9 +20,10 @@ class @MergeRequest ...@@ -20,9 +20,10 @@ class @MergeRequest
if $("a.btn-close").length if $("a.btn-close").length
$("li.task-list-item input:checkbox").prop("disabled", false) $("li.task-list-item input:checkbox").prop("disabled", false)
$('.merge-request-details').waitForImages ->
$('.issuable-affix').affix offset: $('.issuable-affix').affix offset:
top: -> top: ->
@top = $('.merge-request-details').outerHeight(true) + 70 @top = $('.merge-request-details').outerHeight(true) + 91
bottom: -> bottom: ->
@bottom = $('.footer').outerHeight(true) @bottom = $('.footer').outerHeight(true)
...@@ -95,6 +96,7 @@ class @MergeRequest ...@@ -95,6 +96,7 @@ class @MergeRequest
this.$('.merge-request-tabs .diffs-tab').addClass 'active' this.$('.merge-request-tabs .diffs-tab').addClass 'active'
this.loadDiff() unless @diffs_loaded this.loadDiff() unless @diffs_loaded
this.$('.diffs').show() this.$('.diffs').show()
$(".diff-header").trigger("sticky_kit:recalc")
when 'commits' when 'commits'
this.$('.merge-request-tabs .commits-tab').addClass 'active' this.$('.merge-request-tabs .commits-tab').addClass 'active'
this.$('.commits').show() this.$('.commits').show()
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
border-bottom: 1px solid #CCC; border-bottom: 1px solid #CCC;
padding: 5px 5px 5px 10px; padding: 5px 5px 5px 10px;
color: #555; color: #555;
z-index: 10;
> span { > span {
font-family: $monospace_font; font-family: $monospace_font;
......
...@@ -17,7 +17,7 @@ class Import::GitlabController < Import::BaseController ...@@ -17,7 +17,7 @@ class Import::GitlabController < Import::BaseController
@already_added_projects = current_user.created_projects.where(import_type: "gitlab") @already_added_projects = current_user.created_projects.where(import_type: "gitlab")
already_added_projects_names = @already_added_projects.pluck(:import_source) already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.to_a.reject!{ |repo| already_added_projects_names.include? repo["path_with_namespace"] } @repos = @repos.to_a.reject{ |repo| already_added_projects_names.include? repo["path_with_namespace"] }
end end
def jobs def jobs
......
...@@ -15,7 +15,7 @@ class Import::GitoriousController < Import::BaseController ...@@ -15,7 +15,7 @@ class Import::GitoriousController < Import::BaseController
@already_added_projects = current_user.created_projects.where(import_type: "gitorious") @already_added_projects = current_user.created_projects.where(import_type: "gitorious")
already_added_projects_names = @already_added_projects.pluck(:import_source) already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.to_a.reject! { |repo| already_added_projects_names.include? repo.full_name } @repos.reject! { |repo| already_added_projects_names.include? repo.full_name }
end end
def jobs def jobs
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= link_to 'Remove', namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :delete, class: "btn btn-remove delete-key btn-small pull-right" = link_to 'Remove', namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
= key_project = deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first - key_project = deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first
= link_to namespace_project_deploy_key_path(key_project.namespace, key_project, deploy_key) do = link_to namespace_project_deploy_key_path(key_project.namespace, key_project, deploy_key) do
%i.fa.fa-key %i.fa.fa-key
%strong= deploy_key.title %strong= deploy_key.title
......
...@@ -4,6 +4,5 @@ class SetMissingLastActivityAt < ActiveRecord::Migration ...@@ -4,6 +4,5 @@ class SetMissingLastActivityAt < ActiveRecord::Migration
end end
def down def down
raise ActiveRecord::IrreversibleMigration
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment