commit
eb97f7dfb2
@ -0,0 +1,8 @@
|
|||||||
|
<% if !@save_flag && @save_message %>
|
||||||
|
$("#error_show").html("<%= @save_message.join(', ') %>");
|
||||||
|
<% elsif @message && @message != "" %>
|
||||||
|
$("#error_show").html("<%= @message.html_safe %>");
|
||||||
|
<% else %>
|
||||||
|
closeModal();
|
||||||
|
location.reload();
|
||||||
|
<% end %>
|
@ -1 +1,9 @@
|
|||||||
<%= render :partial => 'exercise_form'%>
|
<%= render :partial => 'exercise_form'%>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
<% if @exercise.exercise_name != "" && @exercise.end_time != "" %>
|
||||||
|
$("#polls_head_show").show();
|
||||||
|
$("#polls_head_edit").hide();
|
||||||
|
<% end %>
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||||
|
<div class="upload_con">
|
||||||
|
<h2>将此资源引入组织资源栏目</h2>
|
||||||
|
<% if error == '403' %>
|
||||||
|
<div class="upload_box">
|
||||||
|
<div style="color: red;">您没有权限引用此资源</div>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="upload_box">
|
||||||
|
<div id="error_show" style="color: red;"></div>
|
||||||
|
<%= form_tag attachments_add_exist_file_to_org_subfield_path,
|
||||||
|
method: :post,
|
||||||
|
remote: true,
|
||||||
|
id: "relation_file_form" do %>
|
||||||
|
<%= hidden_field_tag(:file_id, file.id) %>
|
||||||
|
<%= content_tag('div', org_subfields_check_box_tags('org_subfields[org_subfield][]',org_subfield.organization.org_subfields.where("field_type='Resource'"),file), :id => 'org_subfields')%>
|
||||||
|
<a id="submit_quote" href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_quote();">引 用</a><a href="javascript:void(0)" class="blue_btn grey_btn fl c_white" onclick="closeModal();">取 消</a>
|
||||||
|
<% end -%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function submit_quote()
|
||||||
|
{
|
||||||
|
$('#submit_quote').parent().submit();
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,45 @@
|
|||||||
|
<% if org_subfield %>
|
||||||
|
<span class="files_tag_icon" >
|
||||||
|
<a title=""
|
||||||
|
onclick="search_org_subfield_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','','<%= @q%>','<%= org_subfield.id%>');"
|
||||||
|
>全部</a></span>
|
||||||
|
<% end %>
|
||||||
|
<% unless tag_list.nil?%>
|
||||||
|
<% tag_list.each do |k,v|%>
|
||||||
|
<% if tag_name && tag_name == k%>
|
||||||
|
<!-- 鼠标不能移动是因为 href="javascript:void(0);"导致的 -->
|
||||||
|
<span> <a class="files_tag_select" ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>(<%= v%>)</a></span>
|
||||||
|
<% else%>
|
||||||
|
<span class="files_tag_icon" >
|
||||||
|
<a title="双击可编辑"
|
||||||
|
onclick="search_org_subfield_tag_attachment('<%= search_org_subfield_tag_attachment_org_subfield_files_path(org_subfield)%>','<%= k %>','<%= @q %>','<%= org_subfield.id %>');"
|
||||||
|
ondblclick="rename_tag($(this),'<%= k %>','',<%= 6 %>);"><%= k%>(<%= v%>)</a></span>
|
||||||
|
<% end%>
|
||||||
|
<% end%>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var clickFunction = null; //单击事件函数
|
||||||
|
var isdb = false; //是否双击
|
||||||
|
function search_org_subfield_tag_attachment(url,tag_name,q,org_subfield_id,sort) {
|
||||||
|
//alert("111");
|
||||||
|
//clearTimeout(clickFunction);
|
||||||
|
clickFunction = setTimeout(function () {
|
||||||
|
search_func();
|
||||||
|
}, 500);
|
||||||
|
function search_func() {
|
||||||
|
if (isdb != false) return;
|
||||||
|
$.get(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
tag_name: tag_name,
|
||||||
|
q: q,
|
||||||
|
org_subfield_id: org_subfield_id
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,11 @@
|
|||||||
|
<% if @can_quote %>
|
||||||
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource_org_subfield',:locals => {:org_subfield => @org_subfield,:file => @file,:error => ''}) %>');
|
||||||
|
<% else %>
|
||||||
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource_org_subfield',:locals => {:org_subfield => @org_subfield,:file => @file,:error => '403'}) %>');
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
showModal('ajax-modal', '513px');
|
||||||
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||||
|
$('#ajax-modal').parent().css("top","").css("left","");
|
||||||
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
@ -0,0 +1,2 @@
|
|||||||
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'org_subfield_list',
|
||||||
|
:locals => {org_subfield: @org_subfield,all_attachments: @result,sort:@sort,order:@order,org_subfield_attachments:@searched_attach})%>");
|
@ -0,0 +1,2 @@
|
|||||||
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'org_subfield_list',
|
||||||
|
:locals => {org_subfield: @org_subfield,all_attachments: @result,sort:@sort,order:@order,org_subfield_attachments:@searched_attach})%>");
|
@ -0,0 +1,6 @@
|
|||||||
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_subfield_file',:locals => {:org_subfield => @org_subfield,:org_subfield_attachment_type => 1}) %>');
|
||||||
|
showModal('ajax-modal', '513px');
|
||||||
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||||
|
$('#ajax-modal').parent().css("top","").css("left","");
|
||||||
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
@ -0,0 +1,38 @@
|
|||||||
|
<div id="issue_detail" style="display: block">
|
||||||
|
<div class="ping_dispic">
|
||||||
|
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
|
||||||
|
</div>
|
||||||
|
<div class="talk_txt fl">
|
||||||
|
<p class="pro_page_tit" style="word-break:break-all;"> <span class="issues fl fl" title="缺陷"></span> <span style="padding-left: 5px;"><%= @issue.subject %></span>
|
||||||
|
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
||||||
|
<br>
|
||||||
|
<div class="cl"></div>
|
||||||
|
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--talk_txt end-->
|
||||||
|
<a href="javascript:void(0)" class="talk_edit fr"> </a>
|
||||||
|
<%= render :partial => 'action_menu' %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% if @issue.description? || @issue.attachments.any? -%>
|
||||||
|
<div class="talk_info mb10 issue_desc" style="word-break:break-all;">
|
||||||
|
<% if @issue.description? %>
|
||||||
|
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||||
|
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end -%>
|
||||||
|
<% if @issue.attachments.any? %>
|
||||||
|
<div class="pro_pic_box mb10">
|
||||||
|
<a href="javascript:void(0)" class="link_img fl">
|
||||||
|
<!--显示附件、图片-->
|
||||||
|
<%= link_to_attachment_project @issue, :thumbnails => true %></a><br/>
|
||||||
|
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
||||||
|
</div><!--pro_pic_box end-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<!--属性-->
|
||||||
|
<%= render :partial => 'issues/attributes_show' %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
@ -0,0 +1,82 @@
|
|||||||
|
<ul>
|
||||||
|
<% issue.journals.reorder("created_on desc").each do |reply| %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
showNormalImage('reply_content_<%= reply.id %>');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% replies_all_i=replies_all_i + 1 %>
|
||||||
|
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();" >
|
||||||
|
<div class="homepagePostReplyPortrait" >
|
||||||
|
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostReplyDes">
|
||||||
|
<div class="homepagePostReplyPublisher mt-4">
|
||||||
|
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||||
|
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
|
<% end %>
|
||||||
|
<%= format_time(reply.created_on) %>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
||||||
|
<% if reply.details.any? %>
|
||||||
|
<% details_to_strings(reply.details).each do |string| %>
|
||||||
|
<p><%= string %></p>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<P><%= reply.notes.html_safe %></P>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 7px">
|
||||||
|
<%= format_time(reply.created_on) %>
|
||||||
|
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'issues',:action => 'reply',:user_id=>reply.user_id, :id => issue.id,:journal_id=>reply.id},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:class => 'fr newsBlue',
|
||||||
|
:title => l(:button_reply)) if User.current.logged? %>
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_delete),
|
||||||
|
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>reply.id},
|
||||||
|
:method => :get,
|
||||||
|
:remote=>true,
|
||||||
|
:class => 'fr newsGrey mr10',
|
||||||
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
|
:title => l(:button_delete)
|
||||||
|
) if reply.user_id == User.current.id %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="reply_message_<%= reply.id%>"></p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
||||||
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
|
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||||
|
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||||
|
<!--<div class="cl"></div>-->
|
||||||
|
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||||
|
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
||||||
|
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,27 @@
|
|||||||
|
<div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @issue.id%>">
|
||||||
|
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
||||||
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ReplyToMessageInputContainer mb10">
|
||||||
|
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||||
|
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||||
|
<!--<div class="cl"></div>-->
|
||||||
|
<input type="hidden" name="quote" value=""/>
|
||||||
|
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||||
|
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
||||||
|
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,3 +1,9 @@
|
|||||||
|
<% if @issue_id%> //issue详情中回复
|
||||||
|
$("#reply_div_<%= @issue_id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => Issue.find( @issue_id),:replies_all_i=>0}) %>");
|
||||||
|
$(".homepagePostReplyBannerCount").html('回复(<%= Issue.find( @issue_id).journals.count %>)')
|
||||||
|
sd_create_editor_from_data(<%= @issue.id%>, null, "100%");
|
||||||
|
<%else%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>");
|
||||||
|
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
|
||||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
|
// sd_create_editor_from_data(<%#= @issue.id%>, null, "100%");
|
||||||
|
<%end %>
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>");
|
||||||
|
$(".homepagePostReplyBannerCount").html('回复(<%= Issue.find( @issue).journals.count %>)')
|
||||||
|
sd_create_editor_from_data(<%= @issue.id%>, null, "100%");
|
@ -0,0 +1,3 @@
|
|||||||
|
$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>");
|
||||||
|
$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)')
|
||||||
|
sd_create_editor_from_data(<%= @issue.id%>, null, "100%");
|
@ -0,0 +1,9 @@
|
|||||||
|
if($("#reply_message_<%= @jour.id%>").length > 0) {
|
||||||
|
$("#reply_message_<%= @jour.id%>").replaceWith("<%= escape_javascript(render :partial => 'issues/issue_reply_ke_form') %>");
|
||||||
|
$(function(){
|
||||||
|
$('input[name=quote]').val("<%= raw escape_javascript(@tempContent.html_safe) %>");
|
||||||
|
sd_create_editor_from_data(<%= @issue.id%>, null, "100%");
|
||||||
|
});
|
||||||
|
}else if($("#reply_to_message_<%= @issue.id%>").length >0) {
|
||||||
|
$("#reply_to_message_<%= @issue.id%>").replaceWith("<p id='reply_message_<%= @jour.id%>'></p>");
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
<% if @obj %>
|
||||||
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||||
|
:locals => {:obj => @obj,:object_flag => @obj_flag}) %>');
|
||||||
|
$("#tags_name_<%=@obj.id%>").val("");
|
||||||
|
$("#add_tag_<%=@obj.id%>").hide();
|
||||||
|
$("#files_tag").html("<%= escape_javascript(render :partial => "files/subfield_tags", :locals => {:tag_list => @tag_list,:org_subfield => @org_subfield,:tag_name => @select_tag_name}) %>");
|
||||||
|
<% else %>
|
||||||
|
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'files/org_subfield_list',
|
||||||
|
:locals => {org_subfield: @org_subfield,all_attachments: @all_attachments,sort:@sort,order:@order,org_subfield_attachments:@obj_attachments}) %>");
|
||||||
|
<% end %>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue