版本库git帮助文档的显示与隐藏

memcached_alan
whimlex 10 years ago
parent 2323c821d6
commit 40fdda0ee2

@ -4,5 +4,5 @@
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>
<%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("all_attributes", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %>
<%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %>
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %>

File diff suppressed because it is too large Load Diff

@ -59,6 +59,27 @@ function show_more_msg() {
}
}
function showhelpAndScrollTo(id, focus) {
var information = $("#showgithelp");
var val = information.attr("value");
if (val == "show_help") {
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
$('#' + id).show();
if (focus !== null) {
$('#' + focus).focus();
}
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
}
else {
$("#showgithelp").text("显示Git操作指南");
information.attr("value", "show_help");
$('#' + id).hide();
}
}
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////项目讨论区
function regexSubject() {
@ -191,27 +212,22 @@ function project_setting(n) {
}
//配置-验证项目名称
function regex_project_name()
{
function regex_project_name() {
var name = $.trim($("#project_name").val());
if(name.length == 0)
{
if (name.length == 0) {
$("#project_name_notice").show();
return false;
}
else
{
else {
$("#project_name_notice").hide();
return true;
}
}
//配置-信息提交
function submit_edit_project(id)
{
if(regex_project_name())
{
$("#edit_project_"+id).submit();
function submit_edit_project(id) {
if (regex_project_name()) {
$("#edit_project_" + id).submit();
}
}
@ -233,12 +249,13 @@ $(document).ready(function () {
//issue_project_id
});
function showAndScrollTo(id, focus) {
$('#' + id).show();
if (focus !== null) {
function showAndScrollTo(id, focus) {
$('#' + id).show();
if (focus !== null) {
$('#' + focus).focus();
}
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
}
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
/*缺陷完成度决定缺陷状态*/
@ -287,7 +304,4 @@ function showAndScrollTo(id, focus) {
$("pre").addClass("break_word");
}
});
}
});

@ -177,7 +177,7 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; color:#64bdd9; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
.r_txt_tit{width:510px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
.repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;}
/* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}

Loading…
Cancel
Save