提交 38dd6bca 编写于 作者: D Dmitriy Zaporozhets

Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce

......@@ -49,6 +49,7 @@ v 7.10.0 (unreleased)
- AJAX selectbox for issue assignee and author filters
- Fix issue with missing options in issue filtering dropdown if selected one
- Prevent holding Control-Enter or Command-Enter from posting comment multiple times.
- Prevent note form from being cleared when submitting failed.
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.
......
......@@ -37,7 +37,8 @@ class @Notes
$(document).on "click", ".js-note-attachment-delete", @removeAttachment
# reset main target form after submit
$(document).on "ajax:complete", ".js-main-target-form", @resetMainTargetForm
$(document).on "ajax:complete", ".js-main-target-form", @reenableTargetFormSubmitButton
$(document).on "ajax:success", ".js-main-target-form", @resetMainTargetForm
# update the file name when an attachment is selected
$(document).on "change", ".js-note-attachment-input", @updateFormAttachment
......@@ -71,6 +72,7 @@ class @Notes
$(document).off "click", ".js-note-delete"
$(document).off "click", ".js-note-attachment-delete"
$(document).off "ajax:complete", ".js-main-target-form"
$(document).off "ajax:success", ".js-main-target-form"
$(document).off "click", ".js-discussion-reply-button"
$(document).off "click", ".js-add-diff-note-button"
$(document).off "visibilitychange"
......@@ -170,6 +172,11 @@ class @Notes
form.find(".js-note-text").data("autosave").reset()
reenableTargetFormSubmitButton: ->
form = $(".js-main-target-form")
form.find(".js-note-text").trigger "input"
###
Shows the main form and does some setup on it.
......
......@@ -24,13 +24,6 @@
display: none !important;
}
.project-home-panel {
.star-fork-buttons {
padding-top: 10px;
padding-right: 15px;
}
}
.project-home-links {
display: none;
}
......
......@@ -48,9 +48,12 @@
.project-home-row {
@extend .clearfix;
margin-bottom: 15px;
&.project-home-row-top {
margin-bottom: 11px;
}
.project-home-desc,
.star-fork-buttons {
.project-home-desc {
font-size: 16px;
line-height: 1.3;
}
......@@ -60,23 +63,8 @@
color: #666;
}
.star-fork-buttons {
float: right;
min-width: 200px;
font-weight: bold;
.star-buttons, .fork-buttons {
float: right;
margin-left: 20px;
a:hover {
text-decoration: none;
}
.count {
margin-left: 5px;
}
}
.btn-action-count {
margin-left: 5px;
}
}
......@@ -87,6 +75,10 @@
color: inherit;
}
}
.project-repo-buttons {
margin-top: -5px;
}
}
.project-home-links {
......
......@@ -81,7 +81,7 @@ module ProjectsHelper
end
def link_to_toggle_star(title, starred, signed_in)
cls = 'star-btn'
cls = 'star-btn btn btn-sm btn-default'
cls << ' disabled' unless signed_in
toggle_html = content_tag('span', class: 'toggle') do
......@@ -120,7 +120,7 @@ module ProjectsHelper
def link_to_toggle_fork
out = icon('code-fork')
out << ' Fork'
out << content_tag(:span, class: 'count') do
out << content_tag(:span, class: 'count btn-action-count') do
@project.forks_count.to_s
end
end
......
......@@ -2,7 +2,7 @@
.project-home-panel{:class => ("empty-project" if empty_repo)}
.project-identicon-holder
= project_icon(@project, alt: '', class: 'avatar project-avatar')
.project-home-row
.project-home-row.project-home-row-top
.project-home-desc
- if @project.description.present?
= escaped_autolink(@project.description)
......@@ -14,31 +14,23 @@
&ndash;
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)) do
= readme.name
.star-fork-buttons
.pull-right.prepend-left-10.project-repo-buttons
- unless @project.empty_repo?
.fork-buttons
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork' do
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-sm btn-default' do
= link_to_toggle_fork
- else
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project" do
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-sm btn-default' do
= link_to_toggle_fork
.star-buttons
%span.star.js-toggler-container{class: @show_star ? 'on' : ''}
- if current_user
= link_to_toggle_star('Star this project.', false, true)
= link_to_toggle_star('Unstar this project.', true, true)
- else
= link_to_toggle_star('You must sign in to star a project.', false, false)
.star.pull-right.prepend-left-10.project-repo-buttons.js-toggler-container{class: @show_star ? 'on' : ''}
- if current_user
= link_to_toggle_star('Star this project.', false, true)
= link_to_toggle_star('Unstar this project.', true, true)
.project-home-row.hidden-xs
- if current_user && !empty_repo
.project-home-dropdown
= render "dropdown"
- unless @project.empty_repo?
- if can? current_user, :download_code, @project
.pull-right.prepend-left-10
= render 'projects/repositories/download_archive', split_button: true
= render "shared/clone_panel"
......@@ -87,6 +87,9 @@
- else
%span.light CI provided by
= link_to ci_service.title, ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
- unless @project.empty_repo?
- if can? current_user, :download_code, @project
= render 'projects/repositories/download_archive', split_button: true
- if readme
.tab-pane#tab-readme
......@@ -97,4 +100,3 @@
= readme.name
.wiki
= render_readme(readme)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册