|
@@ -9,13 +9,14 @@ function WarningInfo(option) {
|
|
|
this.option = option;
|
|
|
this.markControl = option.markControl;
|
|
|
this.init();
|
|
|
+ loadLanguage();
|
|
|
var self = this;
|
|
|
|
|
|
this.markControl.on('task.get.success', this, function(event, context, eventObject) {
|
|
|
this.toggle(false);
|
|
|
});
|
|
|
this.markControl.on('task.get.none', this, function(event, context, message) {
|
|
|
- this.toggle(true, message != undefined ? message : '评卷任务正在加载中', '', function() {
|
|
|
+ this.toggle(true, message != undefined ? message : $.i18n.prop("mark.task.loading"), '', function() {
|
|
|
self.markControl.getTask();
|
|
|
});
|
|
|
if (context.status != undefined && context.status.totalCount == 0) {
|
|
@@ -23,7 +24,7 @@ function WarningInfo(option) {
|
|
|
}
|
|
|
});
|
|
|
this.markControl.on('task.get.finish', this, function(event, context, message) {
|
|
|
- this.toggle(true, option.finishMessage != undefined ? option.finishMessage : '评卷任务已完成');
|
|
|
+ this.toggle(true, option.finishMessage != undefined ? option.finishMessage : $.i18n.prop("mark.task.finish"));
|
|
|
if (option.finishButtonUrl != undefined) {
|
|
|
this.container.button.attr('href', option.finishButtonUrl);
|
|
|
if (option.finishButtonText != undefined) {
|
|
@@ -35,7 +36,7 @@ function WarningInfo(option) {
|
|
|
}
|
|
|
});
|
|
|
this.markControl.on('task.get.error', this, function(event, context, eventObject) {
|
|
|
- this.toggle(true, option.errorMessage != undefined ? option.errorMessage : '领取评卷任务出错', '', function() {
|
|
|
+ this.toggle(true, option.errorMessage != undefined ? option.errorMessage : $.i18n.prop("mark.task.error"), '', function() {
|
|
|
self.markControl.getTask();
|
|
|
});
|
|
|
});
|
|
@@ -43,16 +44,16 @@ function WarningInfo(option) {
|
|
|
//this.toggle(false);
|
|
|
});
|
|
|
this.markControl.on('task.submit.error', this, function(event, context, eventObject) {
|
|
|
- this.toggle(true, eventObject || '网络异常,任务提交失败', '关闭');
|
|
|
+ this.toggle(true, eventObject || $.i18n.prop("mark.network.error"), $.i18n.prop("mark.close"));
|
|
|
});
|
|
|
this.markControl.on('task.submit.forceSpecialTag', this, function(event, context, eventObject) {
|
|
|
- this.toggle(true, '强制特殊标记已开启,至少使用一个特殊标记', '关闭');
|
|
|
+ this.toggle(true, $.i18n.prop("mark.force.special.tag"), $.i18n.prop("mark.close"));
|
|
|
});
|
|
|
this.markControl.on('history.submit.success', this, function(event, context, task) {
|
|
|
if(task.problem==true){
|
|
|
- this.toggle(true, '回评成功,已提交问题卷','关闭');
|
|
|
+ this.toggle(true,$.i18n.prop("mark.history.problem") ,$.i18n.prop("mark.close"));
|
|
|
}else if(task.previous==true){
|
|
|
- this.toggle(true, '回评成功,总分:'+task.totalScore, '关闭');
|
|
|
+ this.toggle(true, $.i18n.prop("mark.history.success") +task.totalScore, $.i18n.prop("mark.close"));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -75,7 +76,7 @@ WarningInfo.prototype.toggle = function(enable, message, buttonText, callback) {
|
|
|
if (buttonText != undefined && buttonText != '') {
|
|
|
this.container.button.html(buttonText);
|
|
|
} else {
|
|
|
- this.container.button.html('请点击重试');
|
|
|
+ this.container.button.html($.i18n.prop("mark.try.again"));
|
|
|
}
|
|
|
|
|
|
this.container.button.unbind();
|
|
@@ -95,4 +96,4 @@ WarningInfo.prototype.toggle = function(enable, message, buttonText, callback) {
|
|
|
}
|
|
|
|
|
|
WarningInfo.prototype.container_dom = '<div class="warning-popover"><p></p>\
|
|
|
-<a href="#" class="btn btn-large btn-primary text-c">请点击重试</a></div>';
|
|
|
+<a href="#" class="btn btn-large btn-primary text-c" data-i18n-text="mark.try.again">请点击重试</a></div>';
|