Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
596e64e5
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 搜索 >>
未验证
提交
596e64e5
编写于
11月 29, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Drop rjs from Notes#index
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
071de30f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
9 deletion
+21
-9
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+6
-3
app/controllers/projects/notes_controller.rb
app/controllers/projects/notes_controller.rb
+14
-1
app/views/projects/notes/index.js.haml
app/views/projects/notes/index.js.haml
+0
-4
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
未找到文件。
app/assets/javascripts/notes.js
浏览文件 @
596e64e5
...
@@ -6,7 +6,7 @@ var NoteList = {
...
@@ -6,7 +6,7 @@ var NoteList = {
target_type
:
null
,
target_type
:
null
,
init
:
function
(
tid
,
tt
,
path
)
{
init
:
function
(
tid
,
tt
,
path
)
{
NoteList
.
notes_path
=
path
+
"
.js
"
;
NoteList
.
notes_path
=
path
+
"
.js
on
"
;
NoteList
.
target_id
=
tid
;
NoteList
.
target_id
=
tid
;
NoteList
.
target_type
=
tt
;
NoteList
.
target_type
=
tt
;
NoteList
.
target_params
=
"
target_type=
"
+
NoteList
.
target_type
+
"
&target_id=
"
+
NoteList
.
target_id
;
NoteList
.
target_params
=
"
target_type=
"
+
NoteList
.
target_type
+
"
&target_id=
"
+
NoteList
.
target_id
;
...
@@ -411,7 +411,10 @@ var NoteList = {
...
@@ -411,7 +411,10 @@ var NoteList = {
data
:
NoteList
.
target_params
,
data
:
NoteList
.
target_params
,
complete
:
function
(){
$
(
'
.js-notes-busy
'
).
removeClass
(
"
loading
"
)},
complete
:
function
(){
$
(
'
.js-notes-busy
'
).
removeClass
(
"
loading
"
)},
beforeSend
:
function
()
{
$
(
'
.js-notes-busy
'
).
addClass
(
"
loading
"
)
},
beforeSend
:
function
()
{
$
(
'
.js-notes-busy
'
).
addClass
(
"
loading
"
)
},
dataType
:
"
script
"
success
:
function
(
data
)
{
NoteList
.
setContent
(
data
.
html
);
},
dataType
:
"
json
"
});
});
},
},
...
@@ -419,7 +422,7 @@ var NoteList = {
...
@@ -419,7 +422,7 @@ var NoteList = {
* Called in response to getContent().
* Called in response to getContent().
* Replaces the content of #notes-list with the given html.
* Replaces the content of #notes-list with the given html.
*/
*/
setContent
:
function
(
newNoteIds
,
html
)
{
setContent
:
function
(
html
)
{
$
(
"
#notes-list
"
).
html
(
html
);
$
(
"
#notes-list
"
).
html
(
html
);
},
},
...
...
app/controllers/projects/notes_controller.rb
浏览文件 @
596e64e5
...
@@ -14,7 +14,20 @@ class Projects::NotesController < Projects::ApplicationController
...
@@ -14,7 +14,20 @@ class Projects::NotesController < Projects::ApplicationController
@discussions
=
discussions_from_notes
@discussions
=
discussions_from_notes
end
end
respond_with
(
@notes
)
respond_to
do
|
format
|
format
.
html
{
redirect_to
:back
}
format
.
json
do
html
=
render_to_string
(
"projects/notes/_notes"
,
layout:
false
,
formats:
[
:html
]
)
render
json:
{
html:
html
,
}
end
end
end
end
def
create
def
create
...
...
app/views/projects/notes/index.js.haml
已删除
100644 → 0
浏览文件 @
071de30f
-
unless
@notes
.
blank?
var notesHtml = "
#{
escape_javascript
(
render
'projects/notes/notes'
)
}
";
-
new_note_ids
=
@notes
.
map
(
&
:id
)
NoteList.setContent(
#{
new_note_ids
}
, notesHtml);
config/initializers/1_settings.rb
浏览文件 @
596e64e5
...
@@ -30,7 +30,7 @@ class Settings < Settingslogic
...
@@ -30,7 +30,7 @@ class Settings < Settingslogic
gitlab
.
relative_url_root
gitlab
.
relative_url_root
].
join
(
''
)
].
join
(
''
)
end
end
# check that values in `current` (string or integer) is a contant in `modul`.
# check that values in `current` (string or integer) is a contant in `modul`.
def
verify_constant_array
(
modul
,
current
,
default
)
def
verify_constant_array
(
modul
,
current
,
default
)
values
=
default
||
[]
values
=
default
||
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录