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,8 +16,9 @@ class @Issue ...@@ -16,8 +16,9 @@ class @Issue
updateTaskState updateTaskState
) )
$('.issuable-affix').affix offset: $('.issue-details').waitForImages ->
top: -> $('.issuable-affix').affix offset:
@top = $('.issue-details').outerHeight(true) + 25 top: ->
bottom: -> @top = $('.issue-details').outerHeight(true) + 25
@bottom = $('.footer').outerHeight(true) bottom: ->
@bottom = $('.footer').outerHeight(true)
...@@ -20,11 +20,12 @@ class @MergeRequest ...@@ -20,11 +20,12 @@ 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)
$('.issuable-affix').affix offset: $('.merge-request-details').waitForImages ->
top: -> $('.issuable-affix').affix offset:
@top = $('.merge-request-details').outerHeight(true) + 70 top: ->
bottom: -> @top = $('.merge-request-details').outerHeight(true) + 91
@bottom = $('.footer').outerHeight(true) bottom: ->
@bottom = $('.footer').outerHeight(true)
# Local jQuery finder # Local jQuery finder
$: (selector) -> $: (selector) ->
...@@ -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