socialforge/app/views/student_work/update.js.erb

16 lines
733 B
Plaintext

<% if @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_edit_information') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos");
<% else %>
window.location.href = '<%= edit_student_work_url(@work)%>';
<% end %>
function clickCanel() {
hideModal('#popbox02');
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
}