|
@@ -420,7 +420,7 @@ MarkControl.prototype.start = function(taskOption) {
|
|
|
markControl.getStatus();
|
|
|
};
|
|
|
taskOption.error = function(message) {
|
|
|
- alert('初始化失败,请刷新页面重新加载');
|
|
|
+ alert(getMessage(mark.control.init.error));
|
|
|
};
|
|
|
this.taskControl = new TaskControl(taskOption);
|
|
|
this.taskControl.init();
|
|
@@ -660,10 +660,10 @@ MarkControl.prototype.sidebar_dom = '<div class="mark-sidebar span2 hide"></div>
|
|
|
MarkControl.prototype.center_dom = '<div class="center-content span12"></div>';
|
|
|
|
|
|
MarkControl.prototype.center_header_dom = '<div class="row-fluid"><div class="header"><p class="tips">\
|
|
|
-<em><a href="##" class="btn" id="switch-track-button" style="display:none" data-i18n-text="mark.mode.track">切换到轨迹模式</a>\
|
|
|
-<a href="javascript:void(0)" id="assistant-button" class="btn"><i class="icon-wrench"></i><span data-i18n-text="mark.assistant"> 小助手</span></a></em>\
|
|
|
+<em><a href="##" class="btn" id="switch-track-button" style="display:none" data-i18n-text="mark.control.mode.track">切换到轨迹模式</a>\
|
|
|
+<a href="javascript:void(0)" id="assistant-button" class="btn"><i class="icon-wrench"></i><span data-i18n-text="mark.control.assistant"> 小助手</span></a></em>\
|
|
|
<a class="useinfo" href="#"><i class="icon-user icon-white"></i><i id="mark-user-name"></i></a>\
|
|
|
-<a class="logout" id="logout-link" href="{logoutUrl}"><i class="icon-off icon-white"></i> <i id="logout-title" data-i18n-text="user.logout">退出</i></a>\
|
|
|
+<a class="logout" id="logout-link" href="{logoutUrl}"><i class="icon-off icon-white"></i> <i id="logout-title" data-i18n-text="mark.control.logout">退出</i></a>\
|
|
|
</p></div></div>';
|
|
|
|
|
|
MarkControl.prototype.center_content_dom = '<div class="row-fluid"></div>';
|
|
@@ -672,7 +672,7 @@ MarkControl.prototype.image_content_dom = '<div class="image-content span12"></d
|
|
|
|
|
|
MarkControl.prototype.assistant_dom = '<div class="popover bottom assistant"><div class="arrow"></div></div>';
|
|
|
|
|
|
-MarkControl.prototype.mark_function_dom = '<h3 class="popover-title" data-i18n-text="mark.function">评卷功能</h3>\
|
|
|
+MarkControl.prototype.mark_function_dom = '<h3 class="popover-title" data-i18n-text="mark.control.function">评卷功能</h3>\
|
|
|
<div class="popover-content"><p id="function-list" class="popover-list">\
|
|
|
</p></div>';
|
|
|
|
|
@@ -718,14 +718,26 @@ function getDom(content, markControl) {
|
|
|
content = content.replace(/{logoutUrl}/g, markControl.option.logoutUrl);
|
|
|
}
|
|
|
var result = $(content);
|
|
|
- result.find("[data-i18n-value]").each(function() {
|
|
|
- $(this).val($.i18n.prop($(this).data("i18n-value")));
|
|
|
- });
|
|
|
- result.find("[data-i18n-text]").each(function() {
|
|
|
- $(this).text($.i18n.prop($(this).data("i18n-text")));
|
|
|
- });
|
|
|
- result.find("[data-i18n-placeholder]").each(function() {
|
|
|
- $(this).attr('placeholder',$.i18n.prop($(this).data("i18n-placeholder")));
|
|
|
+ result.each(function() {
|
|
|
+ if($(this).data("i18n-value")!=undefined){
|
|
|
+ $(this).val($.i18n.prop($(this).data("i18n-value")));
|
|
|
+ }
|
|
|
+ if($(this).data("i18n-text")!=undefined){
|
|
|
+ $(this).text($.i18n.prop($(this).data("i18n-text")));
|
|
|
+ }
|
|
|
+ if($(this).data("i18n-placeholder")!=undefined){
|
|
|
+ $(this).attr('placeholder',$.i18n.prop($(this).data("i18n-placeholder")));
|
|
|
+ }
|
|
|
+
|
|
|
+ $(this).find("[data-i18n-value]").each(function() {
|
|
|
+ $(this).val($.i18n.prop($(this).data("i18n-value")));
|
|
|
+ });
|
|
|
+ $(this).find("[data-i18n-text]").each(function() {
|
|
|
+ $(this).text($.i18n.prop($(this).data("i18n-text")));
|
|
|
+ });
|
|
|
+ $(this).find("[data-i18n-placeholder]").each(function() {
|
|
|
+ $(this).attr('placeholder',$.i18n.prop($(this).data("i18n-placeholder")));
|
|
|
+ });
|
|
|
});
|
|
|
return result;
|
|
|
}
|