Merge branch 'develop' into dev_kubernete
This commit is contained in:
commit
779c805c5d
|
|
@ -155,16 +155,16 @@ module ApplicationHelper
|
|||
grade = Grade.where(:user_id => user.id, :container_id => container_id, :container_type => container_type).first
|
||||
if grade.nil?
|
||||
Grade.create!(:user_id => user.id, :container_id => container_id, :container_type => container_type, :score => score)
|
||||
user.update_column(:grade, (score.to_i + user.grade.to_i))
|
||||
end
|
||||
user.update_column(:grade, (score.to_i + user.grade.to_i))
|
||||
end
|
||||
|
||||
def reward_experience(user, container_id, container_type, score)
|
||||
experience = Experience.where(:user_id => user.id, :container_id => container_id, :container_type => container_type).first
|
||||
if experience.nil?
|
||||
Experience.create!(:user_id => user.id, :container_id => container_id, :container_type => container_type, :score => score)
|
||||
user.update_column(:experience, (score.to_i + user.experience.to_i))
|
||||
end
|
||||
user.update_column(:experience, (score.to_i + user.experience.to_i))
|
||||
end
|
||||
|
||||
# codeMirror语言转换
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="loading_all">
|
||||
<div class="load">
|
||||
<div class="loading_main"><img src="/images/../images/bigdata/bigdata-logo.png?1502328187" /><span>EDUCODER</span></div>
|
||||
<p class="loading_seconde">LOADING<img src="/images/../images/bigdata/shenglue-ring.gif" /></p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function apply_publish_shixun(url){
|
||||
if($("#apply_publish_shixun").attr("data-option") == '1'){
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -676,6 +676,10 @@ function setupAjaxIndicator() {
|
|||
if(settings && settings.url && settings.url.match(/account\/heartbeat$/)){
|
||||
return;
|
||||
}
|
||||
//模拟实训时,加载效果不显示
|
||||
if (settings && settings.url && settings.url.match(/operation/)){
|
||||
return;
|
||||
}
|
||||
if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') {
|
||||
$('#ajax-indicator').show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ $(function() {
|
|||
$("#search_not_collaborators").live('input', function (e) {
|
||||
throttle(search_not_teacher_f, window, e);
|
||||
});
|
||||
//模拟实训,显示加载等待效果
|
||||
$("#shixun_operation").live("click",function(){
|
||||
$(".loading_all").show();
|
||||
})
|
||||
});
|
||||
|
||||
var lastteSearchCondition = '';
|
||||
|
|
|
|||
|
|
@ -362,6 +362,14 @@ a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weigh
|
|||
.markdown code {padding:0;line-height: 23px;margin: 0;font-family: "微软雅黑","宋体";}
|
||||
|
||||
|
||||
/*模拟实战---加载等待*/
|
||||
.loading_all{background:#ffffff;z-index: 100000;width: 100%;height: 100%;position: fixed;left: 0px;top:0px;text-align: center;display: none;}
|
||||
.loading_main img{border-radius: 4px;}
|
||||
.loading_main span{font-size: 44px;font-weight: bold;color: #ff7500;letter-spacing: 5px;margin-left: 5px;}
|
||||
.load{width: auto;top:50%;margin-top:-50px;position: relative;}
|
||||
.loading_seconde{color: #ff7500;letter-spacing: 3px;font-size: 16px;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue