59 lines
2.4 KiB
Plaintext
59 lines
2.4 KiB
Plaintext
<%= render_flash_messages %>
|
||
<div id="put-bid-form" style="display: none">
|
||
<%= form_for HomeworkAttach.new, :url => {:controller => 'bids', :action => 'add_homework'}, :update => "bidding_project_list", :complete => '$("#put-bid-form").hide();', :html => {:multipart => true, :id => 'add_homework_form'} do |f| %>
|
||
<fieldset>
|
||
<legend>
|
||
<%= l(:label_attachment_plural) %>
|
||
</legend>
|
||
<p id="put-bid-form-partial">
|
||
<%= render :partial => 'attachments/form' %>
|
||
</p>
|
||
</fieldset>
|
||
<%= submit_tag l(:button_create), :onclick => "return true" %>
|
||
<% end %>
|
||
<script type="text/javascript">
|
||
function j_submit () {
|
||
alert('start');
|
||
var submit_homework = function(){
|
||
$('#add_homework_form').clone().attr('action', '<%= url_for({:controller => "bids", :action => "add_homework"})+".js" %>').ajaxSubmit()
|
||
};
|
||
alert('stop');
|
||
$.globalEval(submit_homework());
|
||
return false;
|
||
}
|
||
|
||
function show()
|
||
{
|
||
$("#what_is_project_div").slideToggle();
|
||
}
|
||
|
||
window.onready = function()
|
||
{
|
||
<% if !@is_teacher && @homework_list.count > 0 && @bid.comment_status == 1%>
|
||
//登录者不是老师,且作业列表数目不为0,且作业处于开启匿评阶段
|
||
var alert_model = "'#ajax-modal'";
|
||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_attach/praise_alert') %>');
|
||
showModal('ajax-modal', '480px');
|
||
$('#ajax-modal').css('height','240px');
|
||
$('#ajax-modal').before("<span style='float: right;padding-left: 455px;cursor:pointer;'>" +
|
||
"<a href='#' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||
<% end %>
|
||
}
|
||
|
||
function hiddent_alert_model(){hideModal($('#popbox02'));}
|
||
|
||
function hidden_homework_atert_form()
|
||
{
|
||
hideModal($("#popbox"));
|
||
// 评了分的则刷新列表
|
||
if($("#star_score > .rateable").attr('class').contains('jDisabled'))
|
||
{
|
||
$("#not_batch_homework").click();
|
||
}
|
||
}
|
||
</script>
|
||
</div>
|
||
<div id='bidding_project_list'>
|
||
<%= render :partial => 'homework_list' %>
|
||
</div>
|