Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
7d56a51b
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 搜索 >>
提交
7d56a51b
编写于
3月 26, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Js refactoring and ajax animation replaced
上级
f1c534c6
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
41 addition
and
54 deletion
+41
-54
app/assets/images/ajax-loader-facebook.gif
app/assets/images/ajax-loader-facebook.gif
+0
-0
app/assets/images/ajax-loader.gif
app/assets/images/ajax-loader.gif
+0
-0
app/assets/images/ajax_loader.gif
app/assets/images/ajax_loader.gif
+0
-0
app/assets/javascripts/application.js
app/assets/javascripts/application.js
+4
-0
app/assets/javascripts/merge_requests.js
app/assets/javascripts/merge_requests.js
+3
-1
app/assets/javascripts/projects.js
app/assets/javascripts/projects.js
+14
-0
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+1
-1
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+1
-1
app/views/merge_requests/show.html.haml
app/views/merge_requests/show.html.haml
+1
-2
app/views/projects/_form.html.haml
app/views/projects/_form.html.haml
+1
-1
app/views/projects/create.js.haml
app/views/projects/create.js.haml
+1
-0
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+7
-24
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+7
-24
app/views/projects/update.js.haml
app/views/projects/update.js.haml
+1
-0
未找到文件。
app/assets/images/ajax-loader-facebook.gif
已删除
100644 → 0
浏览文件 @
f1c534c6
723 字节
app/assets/images/ajax-loader.gif
已删除
100644 → 0
浏览文件 @
f1c534c6
4.1 KB
app/assets/images/ajax_loader.gif
0 → 100644
浏览文件 @
7d56a51b
7.4 KB
app/assets/javascripts/application.js
浏览文件 @
7d56a51b
...
...
@@ -70,3 +70,7 @@ function showMenu() {
function
resetMenu
()
{
$
(
this
).
removeClass
(
"
hover
"
);
}
function
slugify
(
text
)
{
return
text
.
replace
(
/
[^
-a-zA-Z0-9
]
+/g
,
'
_
'
).
toLowerCase
();
}
app/assets/javascripts/merge_requests.js
浏览文件 @
7d56a51b
...
...
@@ -31,10 +31,12 @@ var MergeRequest = {
$
.
ajax
({
type
:
"
GET
"
,
url
:
$
(
"
.merge-diffs-tab
"
).
attr
(
"
data-url
"
),
beforeSend
:
function
(){
$
(
'
.status
'
).
addClass
(
"
loading
"
)},
complete
:
function
(){
MergeRequest
.
diffs_loaded
=
true
;
$
(
"
.merge_request_notes
"
).
hide
();
$
(
"
.dashboard-loader
"
).
hide
()},
$
(
'
.status
'
).
removeClass
(
"
loading
"
);
},
dataType
:
"
script
"
});
}
}
app/assets/javascripts/projects.js
0 → 100644
浏览文件 @
7d56a51b
function
Projects
()
{
$
(
"
#project_name
"
).
live
(
"
change
"
,
function
(){
var
slug
=
slugify
(
$
(
this
).
val
());
$
(
"
#project_code
"
).
val
(
slug
);
$
(
"
#project_path
"
).
val
(
slug
);
});
$
(
'
.new_project, .edit_project
'
).
live
(
'
ajax:before
'
,
function
()
{
$
(
'
.project_new_holder, .project_edit_holder
'
).
hide
();
$
(
'
.ajax_loader
'
).
show
();
});
$
(
'
form #project_default_branch
'
).
chosen
();
}
app/assets/stylesheets/common.scss
浏览文件 @
7d56a51b
...
...
@@ -589,7 +589,7 @@ table a code {
.loading
{
margin
:
20px
auto
;
background
:
url(ajax
-loader-facebook
.gif)
no-repeat
center
center
;
background
:
url(ajax
_loader
.gif)
no-repeat
center
center
;
width
:
40px
;
height
:
40px
;
}
...
...
app/views/issues/index.html.haml
浏览文件 @
7d56a51b
...
...
@@ -3,7 +3,7 @@
Issues
%span
.rss-icon
=
link_to
project_issues_path
(
@project
,
:atom
,
{
:private_token
=>
current_user
.
private_token
})
do
=
image_tag
"Rss-UI.PNG"
,
:width
=>
22
,
:title
=>
"feed"
=
image_tag
"Rss-UI.PNG"
,
:width
=>
16
,
:title
=>
"feed"
-
if
can?
current_user
,
:write_issue
,
@project
=
link_to
new_project_issue_path
(
@project
),
:class
=>
"right btn small"
,
:title
=>
"New Issue"
,
:remote
=>
true
do
...
...
app/views/merge_requests/show.html.haml
浏览文件 @
7d56a51b
...
...
@@ -73,12 +73,11 @@
=
link_to
"#diffs"
,
"data-url"
=>
diffs_project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"merge-diffs-tab tab"
do
Diff
%img
{
:src
=>
"/assets/ajax-loader-facebook.gif"
,
:class
=>
"dashboard-loader"
}
.merge_request_notes
#notes
=
render
"notes/notes"
,
:tid
=>
@merge_request
.
id
,
:tt
=>
"merge_request"
.merge-request-diffs
.status
:javascript
$
(
function
(){
...
...
app/views/projects/_form.html.haml
浏览文件 @
7d56a51b
...
...
@@ -49,7 +49,7 @@
.clearfix
=
f
.
label
:description
.input
=
f
.
text_area
:description
,
:placeholder
=>
"project description"
,
:class
=>
"x
large"
,
:rows
=>
4
=
f
.
text_area
:description
,
:placeholder
=>
"project description"
,
:class
=>
"x
xlarge"
,
:rows
=>
5
%p
.hint
Markdown is enabled.
%br
...
...
app/views/projects/create.js.haml
浏览文件 @
7d56a51b
...
...
@@ -3,5 +3,6 @@
location.href = "
#{
project_path
(
@project
,
:notice
=>
'Project was successfully created.'
)
}
";
-
else
:plain
$('.project_new_holder').show();
$("#new_project").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$('.ajax_loader').hide();
app/views/projects/edit.html.haml
浏览文件 @
7d56a51b
=
render
"project_head"
%h3
Edit Project
%hr
=
render
"projects/form"
%div
{
:class
=>
"ajax_loader"
,
:style
=>
"display:none;height:200px;"
}
.project_edit_holder
%h3
Edit Project
%hr
=
render
"projects/form"
%div
.ajax_loader.hide
%center
=
image_tag
"ajax-loader.gif"
,
:class
=>
"append-bottom
"
%div
.padded
=
image_tag
"ajax_loader.gif
"
%h3
.prepend-top
Saving project
&
repository. Please wait...
:javascript
$
(
function
(){
$
(
"
#project_name
"
).
live
(
"
change
"
,
function
(){
var
slug
=
slugify
(
$
(
this
).
val
());
$
(
"
#project_code
"
).
val
(
slug
);
$
(
"
#project_path
"
).
val
(
slug
);
});
});
function
slugify
(
text
)
{
return
text
.
replace
(
/
[^
-a-zA-Z0-9
]
+/g
,
'
_
'
).
toLowerCase
();
}
$
(
function
(){
$
(
'
.edit_project
'
).
live
(
'
ajax:before
'
,
function
()
{
$
(
this
).
hide
();
$
(
'
.ajax_loader
'
).
show
();
});
$
(
'
form #project_default_branch
'
).
chosen
();
})
$
(
function
(){
new
Projects
();
});
app/views/projects/new.html.haml
浏览文件 @
7d56a51b
%h3
New Project
%hr
=
render
'form'
%div
{
:class
=>
"ajax_loader"
,
:style
=>
"display:none;height:200px;"
}
.project_new_holder
%h3
New Project
%hr
=
render
'form'
%div
.ajax_loader.hide
%center
=
image_tag
"ajax-loader.gif"
,
:class
=>
"append-bottom
"
%div
.padded
=
image_tag
"ajax_loader.gif
"
%h3
.prepend-top
Creating project
&
repository. Please wait for few minutes
:javascript
$
(
function
(){
$
(
"
#project_name
"
).
live
(
"
change
"
,
function
(){
var
slug
=
slugify
(
$
(
this
).
val
());
$
(
"
#project_code
"
).
val
(
slug
);
$
(
"
#project_path
"
).
val
(
slug
);
});
});
function
slugify
(
text
)
{
return
text
.
replace
(
/
[^
-a-zA-Z0-9
]
+/g
,
'
_
'
).
toLowerCase
();
}
$
(
function
(){
$
(
'
.new_project
'
).
live
(
'
ajax:before
'
,
function
()
{
$
(
this
).
hide
();
$
(
'
.ajax_loader
'
).
show
();
});
$
(
'
form #project_default_branch
'
).
chosen
();
})
$
(
function
(){
new
Projects
();
});
app/views/projects/update.js.haml
浏览文件 @
7d56a51b
...
...
@@ -3,5 +3,6 @@
location.href = "
#{
edit_project_path
(
@project
,
:notice
=>
'Project was successfully updated.'
)
}
";
-
else
:plain
$('.project_edit_holder').show();
$(".edit_project").replaceWith("
#{
escape_javascript
(
render
(
'form'
))
}
");
$('.ajax_loader').hide();
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录