Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
1e0c6439
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1e0c6439
编写于
5月 18, 2017
作者:
S
Sam Rose
提交者:
Phil Hughes
5月 18, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable reference prefixes in notes for Snippets
上级
0b52808f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
6 deletion
+18
-6
app/assets/javascripts/gl_form.js
app/assets/javascripts/gl_form.js
+10
-3
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+3
-2
app/views/shared/notes/_notes_with_form.html.haml
app/views/shared/notes/_notes_with_form.html.haml
+1
-1
changelogs/unreleased/32086-atwho-is-still-enabled-for-personal-snippet-comments-form.yml
...o-is-still-enabled-for-personal-snippet-comments-form.yml
+4
-0
未找到文件。
app/assets/javascripts/gl_form.js
浏览文件 @
1e0c6439
...
...
@@ -7,9 +7,10 @@ import GfmAutoComplete from './gfm_auto_complete';
window
.
gl
=
window
.
gl
||
{};
function
GLForm
(
form
)
{
function
GLForm
(
form
,
enableGFM
=
false
)
{
this
.
form
=
form
;
this
.
textarea
=
this
.
form
.
find
(
'
textarea.js-gfm-input
'
);
this
.
enableGFM
=
enableGFM
;
// Before we start, we should clean up any previous data for this form
this
.
destroy
();
// Setup the form
...
...
@@ -32,8 +33,14 @@ GLForm.prototype.setupForm = function() {
this
.
form
.
addClass
(
'
gfm-form
'
);
// remove notify commit author checkbox for non-commit notes
gl
.
utils
.
disableButtonIfEmptyField
(
this
.
form
.
find
(
'
.js-note-text
'
),
this
.
form
.
find
(
'
.js-comment-button, .js-note-new-discussion
'
));
new
GfmAutoComplete
(
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
).
setup
(
this
.
form
.
find
(
'
.js-gfm-input
'
));
new
GfmAutoComplete
(
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
).
setup
(
this
.
form
.
find
(
'
.js-gfm-input
'
),
{
emojis
:
true
,
members
:
this
.
enableGFM
,
issues
:
this
.
enableGFM
,
milestones
:
this
.
enableGFM
,
mergeRequests
:
this
.
enableGFM
,
labels
:
this
.
enableGFM
,
});
new
DropzoneInput
(
this
.
form
);
autosize
(
this
.
textarea
);
}
...
...
app/assets/javascripts/notes.js
浏览文件 @
1e0c6439
...
...
@@ -27,7 +27,7 @@ const normalizeNewlines = function(str) {
Notes
.
interval
=
null
;
function
Notes
(
notes_url
,
note_ids
,
last_fetched_at
,
view
)
{
function
Notes
(
notes_url
,
note_ids
,
last_fetched_at
,
view
,
enableGFM
=
true
)
{
this
.
updateTargetButtons
=
this
.
updateTargetButtons
.
bind
(
this
);
this
.
updateComment
=
this
.
updateComment
.
bind
(
this
);
this
.
visibilityChange
=
this
.
visibilityChange
.
bind
(
this
);
...
...
@@ -50,6 +50,7 @@ const normalizeNewlines = function(str) {
this
.
notes_url
=
notes_url
;
this
.
note_ids
=
note_ids
;
this
.
enableGFM
=
enableGFM
;
// Used to keep track of updated notes while people are editing things
this
.
updatedNotesTrackingMap
=
{};
this
.
last_fetched_at
=
last_fetched_at
;
...
...
@@ -523,7 +524,7 @@ const normalizeNewlines = function(str) {
Notes
.
prototype
.
setupNoteForm
=
function
(
form
)
{
var
textarea
,
key
;
new
gl
.
GLForm
(
form
);
new
gl
.
GLForm
(
form
,
this
.
enableGFM
);
textarea
=
form
.
find
(
"
.js-note-text
"
);
key
=
[
"
Note
"
,
...
...
app/views/shared/notes/_notes_with_form.html.haml
浏览文件 @
1e0c6439
...
...
@@ -23,4 +23,4 @@
to post a comment
:javascript
var
notes
=
new
Notes
(
"
#{
notes_url
}
"
,
#{
@notes
.
map
(
&
:id
).
to_json
}
,
#{
Time
.
now
.
to_i
}
,
"
#{
diff_view
}
"
)
var
notes
=
new
Notes
(
"
#{
notes_url
}
"
,
#{
@notes
.
map
(
&
:id
).
to_json
}
,
#{
Time
.
now
.
to_i
}
,
"
#{
diff_view
}
"
,
false
)
changelogs/unreleased/32086-atwho-is-still-enabled-for-personal-snippet-comments-form.yml
0 → 100644
浏览文件 @
1e0c6439
---
title
:
Disable reference prefixes in notes for Snippets
merge_request
:
11278
author
:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录