Explorar o código

新增评卷时间显示;评卷代码去重

ting.yin %!s(int64=6) %!d(string=hai) anos
pai
achega
f6ce90bb1e
Modificáronse 28 ficheiros con 131 adicións e 1915 borrados
  1. 35 31
      stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java
  2. 1 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markNew.jsp
  3. 9 8
      stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markTrack.jsp
  4. 24 0
      stmms-web/src/main/webapp/static/mark-new/css/style.css
  5. BIN=BIN
      stmms-web/src/main/webapp/static/mark-new/images/clock.png
  6. 18 1
      stmms-web/src/main/webapp/static/mark-new/js/mark-control.js
  7. 3 5
      stmms-web/src/main/webapp/static/mark-new/js/modules/mark-status.js
  8. 24 0
      stmms-web/src/main/webapp/static/mark-track/css/style.css
  9. BIN=BIN
      stmms-web/src/main/webapp/static/mark-track/images/clock.png
  10. 17 0
      stmms-web/src/main/webapp/static/mark-track/js/mark-control.js
  11. 0 38
      stmms-web/src/main/webapp/static/mark-track/js/modules/answer-view.js
  12. 0 59
      stmms-web/src/main/webapp/static/mark-track/js/modules/arbitration-process.js
  13. 0 47
      stmms-web/src/main/webapp/static/mark-track/js/modules/back-process.js
  14. 0 106
      stmms-web/src/main/webapp/static/mark-track/js/modules/change-name.js
  15. 0 50
      stmms-web/src/main/webapp/static/mark-track/js/modules/flash-image-view.js
  16. 0 84
      stmms-web/src/main/webapp/static/mark-track/js/modules/header-mark-status.js
  17. 0 80
      stmms-web/src/main/webapp/static/mark-track/js/modules/heart-beat.js
  18. 0 38
      stmms-web/src/main/webapp/static/mark-track/js/modules/idle-process.js
  19. 0 37
      stmms-web/src/main/webapp/static/mark-track/js/modules/image-server-selector.js
  20. 0 191
      stmms-web/src/main/webapp/static/mark-track/js/modules/mark-history.js
  21. 0 151
      stmms-web/src/main/webapp/static/mark-track/js/modules/mark-status.js
  22. 0 268
      stmms-web/src/main/webapp/static/mark-track/js/modules/multi-image-view.js
  23. 0 105
      stmms-web/src/main/webapp/static/mark-track/js/modules/problem-process.js
  24. 0 88
      stmms-web/src/main/webapp/static/mark-track/js/modules/tag-process.js
  25. 0 116
      stmms-web/src/main/webapp/static/mark-track/js/modules/thumbnail.js
  26. 0 89
      stmms-web/src/main/webapp/static/mark-track/js/modules/view-sidebar.js
  27. 0 91
      stmms-web/src/main/webapp/static/mark-track/js/modules/warning-info.js
  28. 0 232
      stmms-web/src/main/webapp/static/mark-track/js/task-control.js

+ 35 - 31
stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.stmms.mark;
 
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
@@ -46,7 +47,7 @@ import cn.com.qmth.stmms.common.utils.RequestUtils;
 public class MarkController extends BaseController {
 
     private static Logger log = LoggerFactory.getLogger(MarkController.class);
-    
+
     protected static final String MARK_LOGIN_VIEW = "modules/sys/markLogin";
 
     protected static final String AP_MARK_LOGIN_VIEW = "modules/sys/markLoginAp";
@@ -65,7 +66,7 @@ public class MarkController extends BaseController {
 
     @Autowired
     private TagService tagService;
-    
+
     @Autowired
     private ExamService examService;
 
@@ -110,7 +111,7 @@ public class MarkController extends BaseController {
             modelAndView.setViewName("modules/mark/subjectSelect");
         }
         modelAndView.addObject("marker", marker);
-        modelAndView.addObject("subjectList",marker.getExamSubjects());
+        modelAndView.addObject("subjectList", marker.getExamSubjects());
 
         if (StringUtils.isNotBlank(marker.getSubjectCode())) {
             clearCurrentTask(marker);
@@ -123,32 +124,32 @@ public class MarkController extends BaseController {
         Marker marker = RequestUtils.getWebUser(request).getMarker();
         ModelAndView modelAndView = new ModelAndView(MARK_LOGIN_VIEW);
         ModelAndView modelAndViewForAP = new ModelAndView(AP_MARK_LOGIN_VIEW);
-	      ExamSubject subject = subjectService.find(marker.getExamId(), subjectCode);
-	      if (subject == null) {
-	          if ("aopeng".equals(appIndex)) {
-	              modelAndViewForAP.addObject("message", "科目不存在");
-	              return modelAndViewForAP;
-	          }
-	          modelAndView.addObject("message", "科目不存在");
-	          return modelAndView;
-	      }
-	      if (subject.getStatus() == ExamSubjectStatus.PAUSE) {
-	          if ("aopeng".equals(appIndex)) {
-	              modelAndViewForAP.addObject("message", "当前科目暂停评卷");
-	              return modelAndViewForAP;
-	          }
-	          modelAndView.addObject("message", "当前科目暂停评卷");
-	          return modelAndView;
-	      }
-	      if (subject.getStatus() == ExamSubjectStatus.FINISH) {
-	          if ("aopeng".equals(appIndex)) {
-	              modelAndViewForAP.addObject("message", "当前科目评卷已结束");
-	              return modelAndViewForAP;
-	          }
-	          modelAndView.addObject("message", "当前科目评卷已结束");
-	          return modelAndView;
-	      }
-	    marker.setSubjectCode(subjectCode);
+        ExamSubject subject = subjectService.find(marker.getExamId(), subjectCode);
+        if (subject == null) {
+            if ("aopeng".equals(appIndex)) {
+                modelAndViewForAP.addObject("message", "科目不存在");
+                return modelAndViewForAP;
+            }
+            modelAndView.addObject("message", "科目不存在");
+            return modelAndView;
+        }
+        if (subject.getStatus() == ExamSubjectStatus.PAUSE) {
+            if ("aopeng".equals(appIndex)) {
+                modelAndViewForAP.addObject("message", "当前科目暂停评卷");
+                return modelAndViewForAP;
+            }
+            modelAndView.addObject("message", "当前科目暂停评卷");
+            return modelAndView;
+        }
+        if (subject.getStatus() == ExamSubjectStatus.FINISH) {
+            if ("aopeng".equals(appIndex)) {
+                modelAndViewForAP.addObject("message", "当前科目评卷已结束");
+                return modelAndViewForAP;
+            }
+            modelAndView.addObject("message", "当前科目评卷已结束");
+            return modelAndView;
+        }
+        marker.setSubjectCode(subjectCode);
         markerService.save(marker);
         return new ModelAndView("redirect:/mark/index");
     }
@@ -180,8 +181,7 @@ public class MarkController extends BaseController {
             marker.setMode(mode);
             markerService.save(marker);
         }
-        ModelAndView view = new ModelAndView(
-                mode == MarkMode.TRACK ? "modules/mark/markTrack" : "modules/mark/markNew");
+        ModelAndView view = new ModelAndView(mode == MarkMode.TRACK ? "modules/mark/markTrack" : "modules/mark/markNew");
         view.addObject("forceMode", forceMode);
         return view;
     }
@@ -209,6 +209,10 @@ public class MarkController extends BaseController {
         modelAndView.addObject("subject", subjectService.find(marker.getExamId(), marker.getSubjectCode()));
         Exam exam = examService.findById(marker.getExamId());
         modelAndView.addObject("exam", exam);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String start = exam.getStartTime() == null ? "---" : sdf.format(exam.getStartTime());
+        String end = exam.getEndTime() == null ? "---" : sdf.format(exam.getEndTime());
+        modelAndView.addObject("markTime", start + " ~ " + end);
         clearCurrentTask(marker);
     }
 

+ 1 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markNew.jsp

@@ -51,6 +51,7 @@
 				switchTrackUrl: '${ctx}/mark/index?mode=track',
 				</c:if>
 				forceSpecialTag : eval('${exam.forceSpecialTag}'.toLowerCase()),
+				markTime : "${markTime}",
 				modules : {
 					'single-image-view' : {},
 					'image-builder': {},

+ 9 - 8
stmms-web/src/main/webapp/WEB-INF/views/modules/mark/markTrack.jsp

@@ -14,19 +14,19 @@
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/jquery.mousewheel.min.js"></script>
 
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/mark-control.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/task-control.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/task-control.js"></script>
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/object-view.js"></script>
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/sheet-view.js"></script>
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/mark-board.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/mark-history.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/mark-status.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-history.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-status.js"></script>
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/image-builder.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/warning-info.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/thumbnail.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/warning-info.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/thumbnail.js"></script>
 <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/single-image-view.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/change-name.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/tag-process.js"></script>
-<script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/view-sidebar.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/change-name.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/tag-process.js"></script>
+<script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/view-sidebar.js"></script>
 <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/specialTag.js"></script>
 </head>
 <body>
@@ -44,6 +44,7 @@
 				switchCommonUrl: '${ctx}/mark/index?mode=common',
 				</c:if>
 				forceSpecialTag : eval('${exam.forceSpecialTag}'.toLowerCase()),
+				markTime : "${markTime}",
 				modules : {
 					'single-image-view' : {},
 					'image-builder': {},

+ 24 - 0
stmms-web/src/main/webapp/static/mark-new/css/style.css

@@ -1181,3 +1181,27 @@ a.button.all-zero-button {
 	padding: 15px;
 	overflow-y: scroll;
 }
+
+/*center-content */
+.center-content .header .text {
+	overflow: hidden;
+}
+.center-content .tips .clock {
+	float: left;
+	width: 18px;
+	height: 18px;
+	overflow: hidden;
+	background: url(../images/clock.png) no-repeat 0 0;
+	margin: 3px 5px 0 20px;
+}
+/*clock_popover*/
+.clock_popover {
+	top: 30px;
+	left:inherit;
+	right: -35px;
+	width: 320px;
+	text-align: center;
+}
+.clock_popover .popover-content {
+	padding: 10px 20px;
+}

BIN=BIN
stmms-web/src/main/webapp/static/mark-new/images/clock.png


+ 18 - 1
stmms-web/src/main/webapp/static/mark-new/js/mark-control.js

@@ -63,7 +63,18 @@ MarkControl.prototype.initHeaderAndAssistant = function() {
         self.trigger('logout.link.click');
         return true;
     })
-
+    //评卷时间显示
+    this.container.markTime = getDom(this.mark_clock_dom, this).appendTo(this.container);
+    this.container.markTime.find('#mark-time').html(this.option.markTime);
+    this.container.markTime.hide();
+    this.container.clock = this.container.header.find("#mark-clock");
+    this.container.clock.mouseover(this, function(event) {
+    	self.container.markTime.show();
+    });
+    this.container.clock.mouseout(this, function(event) {
+    	self.container.markTime.hide();
+    })
+    
     this.container.assistant = getDom(this.assistant_dom, this).appendTo(this.container);
     this.container.assistant.positionSet = false;
     this.container.assistantButton = this.container.header.find('#assistant-button');
@@ -574,6 +585,7 @@ 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">切换到轨迹模式</a>\
 <a href="javascript:void(0)" id="assistant-button" class="btn"><i class="icon-wrench"></i> 小助手</a></em>\
+<a class="clock" id="mark-clock"></a>\
 <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">退出</i></a>\
 </p></div></div>';
@@ -588,6 +600,11 @@ MarkControl.prototype.mark_function_dom = '<h3 class="popover-title">评卷功
 <div class="popover-content"><p id="function-list" class="popover-list">\
 </p></div>';
 
+MarkControl.prototype.mark_clock_dom = '<div class="clock_popover popover bottom assistant show">\
+<div class="arrow"></div>\
+<div class="popover-content"><p>阅卷时间:<em id="mark-time"></em></p></div>\
+</div>';
+
 //其他通用方法
 String.prototype.startWith = function(prefix) {
     return this.indexOf(prefix) === 0;

+ 3 - 5
stmms-web/src/main/webapp/static/mark-new/js/modules/mark-status.js

@@ -52,7 +52,7 @@ function MarkStatus(option) {
 
 MarkStatus.prototype.init = function(option) {
     this.topStatus = getDom(this.status_dom, this.markControl).prependTo(this.markControl.container.header);
-    this.blockProgress = getDom(this.progress_dom, this.markControl).insertAfter(this.topStatus);
+    this.blockProgress = this.topStatus.append(getDom(this.progress_dom, this.markControl));
     this.subjectTitle = this.topStatus.find('#subject-title');
     this.studentTitle = this.topStatus.find('#student-title');
     this.objectiveArea = this.topStatus.find('#objective-area');
@@ -129,11 +129,9 @@ MarkStatus.prototype.status_dom = '<p class="text">\
 <i>评卷数<em id="mark-count"></em></i>\
 </p>';
 
-MarkStatus.prototype.progress_dom = '<p class="text">\
-<i>未评<em id="todo-count"></em></i>\
+MarkStatus.prototype.progress_dom = '<i>未评<em id="todo-count"></em></i>\
 <i>进度<em id="marked-percent"></em></i>\
-<i>总评<em id="person-count"></em></i>\
-</p>';
+<i>总评<em id="person-count"></em></i>';
 
 MarkStatus.prototype.block_progress_bak_dom = '<p class="text">\
 <i>总数<em id="total-count"></em></i>\

+ 24 - 0
stmms-web/src/main/webapp/static/mark-track/css/style.css

@@ -1208,4 +1208,28 @@ i,em {
 }
 .buttonCss{
     border-bottom: 1px solid #b50505;!important;
+}
+
+/*center-content */
+.center-content .header .text {
+	overflow: hidden;
+}
+.center-content .tips .clock {
+	float: left;
+	width: 18px;
+	height: 18px;
+	overflow: hidden;
+	background: url(../images/clock.png) no-repeat 0 0;
+	margin: 3px 5px 0 20px;
+}
+/*clock_popover*/
+.clock_popover {
+	top: 30px;
+	left:inherit;
+	right: -35px;
+	width: 320px;
+	text-align: center;
+}
+.clock_popover .popover-content {
+	padding: 10px 20px;
 }

BIN=BIN
stmms-web/src/main/webapp/static/mark-track/images/clock.png


+ 17 - 0
stmms-web/src/main/webapp/static/mark-track/js/mark-control.js

@@ -66,6 +66,17 @@ MarkControl.prototype.initHeaderAndAssistant = function() {
         self.trigger('logout.link.click');
         return true;
     })
+	//评卷时间显示
+    this.container.markTime = getDom(this.mark_clock_dom, this).appendTo(this.container);
+    this.container.markTime.find('#mark-time').html(this.option.markTime);
+    this.container.markTime.hide();
+    this.container.clock = this.container.header.find("#mark-clock");
+    this.container.clock.mouseover(this, function(event) {
+    	self.container.markTime.show();
+    });
+    this.container.clock.mouseout(this, function(event) {
+    	self.container.markTime.hide();
+    })
 
     this.container.assistant = getDom(this.assistant_dom, this).appendTo(this.container);
     this.container.assistant.positionSet = false;
@@ -588,6 +599,7 @@ 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-common-button" style="display:none">切换到普通模式</a>\
 <a href="javascript:void(0)" id="assistant-button" class="btn"><i class="icon-wrench"></i> 小助手</a></em>\
+<a class="clock" id="mark-clock"></a>\
 <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">退出</i></a>\
 </p></div></div>';
@@ -600,6 +612,11 @@ MarkControl.prototype.mark_function_dom = '<h3 class="popover-title">评卷功
 <div class="popover-content"><p id="function-list" class="popover-list">\
 </p></div>';
 
+MarkControl.prototype.mark_clock_dom = '<div class="clock_popover popover bottom assistant show">\
+	<div class="arrow"></div>\
+	<div class="popover-content"><p>阅卷时间:<em id="mark-time"></em></p></div>\
+	</div>';
+
 // 其他通用方法
 String.prototype.startWith = function(prefix) {
     return this.indexOf(prefix) === 0;

+ 0 - 38
stmms-web/src/main/webapp/static/mark-track/js/modules/answer-view.js

@@ -1,38 +0,0 @@
-//查看答案模块
-var answer_view = function(option, success) {
-    var object = new AnswerView(option);
-    success();
-    return object;
-}
-
-function AnswerView(option) {
-    this.markControl = option.markControl;
-    this.server = option.server;
-    this.init();
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.render(this.server + context.task.answerUrl);
-    });
-    this.markControl.on('task.get.none', this, function(event, context, eventObject) {
-        this.render();
-    });
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.render();
-    });
-}
-
-AnswerView.prototype.init = function() {
-    this.markControl.initMarkFunction();
-    this.toggleButton = getDom(this.toggle_button_dom, this.markControl).appendTo(this.markControl.container.assistant.functionList);
-}
-
-AnswerView.prototype.render = function(url) {
-    if (url != undefined && url.length > 0) {
-        this.toggleButton.attr('href', url);
-        this.toggleButton.show();
-    } else {
-        this.toggleButton.attr('href', '##');
-        this.toggleButton.hide();
-    }
-}
-
-AnswerView.prototype.toggle_button_dom = '<a href="#" target="_blank">标答</a>';

+ 0 - 59
stmms-web/src/main/webapp/static/mark-track/js/modules/arbitration-process.js

@@ -1,59 +0,0 @@
-//回评模块
-var arbitration_process = function(option, success) {
-    var object = new ArbitrationProcess(option);
-    success();
-    return object;
-}
-
-function ArbitrationProcess(option) {
-    this.markControl = option.markControl;
-    this.container = this.markControl.container.sidebar;
-    this.init();
-
-    this.markControl.on('task.get.none', this, function(event, context, data) {
-        this.container.list.empty();
-        this.markControl.trigger('mark.sidebar.close');
-        this.container.addClass('hide');
-    });
-    this.markControl.on('task.get.success', this, function(event, context, data) {
-        if (context.task.previous != true) {
-            var historyList = context.task.arbitrationList;
-            this.container.list.empty();
-            if (isArray(historyList) && historyList.length > 0) {
-                for (var i in historyList) {
-                    var history = historyList[i];
-                    var row = getDom(this.history_row_dom, this.markControl).appendTo(this.container.list);
-                    row.find('.history-name').html(history.markerName);
-
-                    var date = new Date();
-                    date.setTime(history.markTime);
-                    row.find('.history-time').html(date.format('hh:mm:ss'));
-                    row.find('.history-score').html(history.totalScore);
-                }
-            }
-            this.markControl.trigger('mark.sidebar.open');
-            this.container.removeClass('hide');
-        }
-    });
-    this.markControl.on('mark.history.open', this, function(event, context, data) {
-        this.container.addClass('hide');
-    });
-}
-
-ArbitrationProcess.prototype.init = function() {
-    this.container.empty();
-
-    this.container.header = getDom(this.header_dom, this.markControl).appendTo(this.container);
-    this.container.list = getDom(this.history_list_dom, this.markControl).appendTo(this.container).find('#history-list');
-}
-
-
-ArbitrationProcess.prototype.header_dom = '<div class="header">\
-<p class="fl">给分记录</p></div>';
-
-ArbitrationProcess.prototype.history_list_dom = '<div class="sublist"><table class="table table-hover">\
-<thead><tr><th>评卷员</th><th>时间</th><th>总分</th></tr></thead>\
-<tbody id="history-list"></tbody></table></div>';
-
-ArbitrationProcess.prototype.history_row_dom = '<tr><td class="history-name"></td>\
-<td class="history-time"></td><td class="history-score"></td></tr>';

+ 0 - 47
stmms-web/src/main/webapp/static/mark-track/js/modules/back-process.js

@@ -1,47 +0,0 @@
-//打回处理模块
-var back_process = function(option, success) {
-    var object = new BackProcess(option);
-    success();
-    return object;
-}
-
-function BackProcess(option) {
-    this.markControl = option.markControl;
-    this.autoSubmit = option.autoSubmit === false ? false : true;
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.task = undefined;
-        this.button.hide();
-    });
-    this.markControl.on('task.get.none', this, function(event, context, eventObject) {
-        this.task = undefined;
-        this.button.hide();
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.task = context.task;
-        this.button.show();
-    });
-}
-
-BackProcess.prototype.init = function() {
-    var self = this;
-
-    this.markControl.initMarkFunction();
-    this.button = getDom(this.button_dom, this.markControl).appendTo(this.markControl.container.assistant.functionList);
-    this.button.click(this, function() {
-        self.onBackSelect();
-    });
-}
-
-BackProcess.prototype.onBackSelect = function() {
-    if (this.task != undefined) {
-        this.task.back = true;
-        if (this.autoSubmit == false && confirm('确认要将本试卷打回?')) {
-            this.markControl.submitTask();
-        } else if (this.autoSubmit == true) {
-            this.markControl.submitTask();
-        }
-    }
-}
-
-BackProcess.prototype.button_dom = '<a class="back-process-button" href="#">打回</a>';

+ 0 - 106
stmms-web/src/main/webapp/static/mark-track/js/modules/change-name.js

@@ -1,106 +0,0 @@
-//评卷状态模块
-var change_name = function(option, success) {
-  var object = new ChangeName(option);
-  success();
-  return object;
-}
-
-function ChangeName(option) {
-  this.markControl = option.markControl;
-  this.url = option.url;
-  this.context = option.markControl.context;
-  this.userName = option.markControl.container.header.find('#mark-user-name');
-
-  this.popover = getDom(this.popover_dom, this.markControl);
-  this.popover.userNameInput = this.popover.find('input.username-input');
-  this.popover.passwordInput = this.popover.find('input.password-input');
-  this.popover.password2Input = this.popover.find('input.password2-input');
-  this.popover.userNameMessage = this.popover.find('i.username');
-  this.popover.password2Message = this.popover.find('i.password2');
-  this.popover.submitButton = this.popover.find('a.btn');
-  this.popover.cancelButton = this.popover.find('p.image-close');
-  this.popover.appendTo(this.markControl.container);
-
-  var self = this;
-
-  this.markControl.container.header.find('a.useinfo').click(function() {
-    self.toggle(true);
-  });
-  this.popover.cancelButton.click(function() {
-    self.toggle(false);
-  });
-  this.popover.submitButton.click(function() {
-    var logout = false;
-    var nameText = self.popover.userNameInput.val();
-    nameText = nameText.replace(/(^\s*)|(\s*$)/g, "");
-    var pwText = self.popover.passwordInput.val();
-    pwText = pwText.replace(/(^\s*)|(\s*$)/g, "");
-    var pw2Text = self.popover.password2Input.val();
-    pw2Text = pw2Text.replace(/(^\s*)|(\s*$)/g, "");
-    if (nameText.length == 0) {
-      self.popover.userNameMessage.html('姓名不能为空');
-      return false;
-    } else if (nameText.length > 8) {
-      self.popover.userNameMessage.html('长度不能超过8个字');
-      return false;
-    }
-    if(pwText.length > 0 || pw2Text.length > 0) {
-      logout = true;
-      if (!pw2Text) {
-        self.popover.password2Message.html('请再次输入您的密码');
-        return false;
-      }
-      if (pwText != pw2Text) {
-        self.popover.password2Message.html('两次密码请保持一致');
-        return false;
-      }
-      if(pw2Text.length < 4){
-        self.popover.password2Message.html('密码的长度至少4位');
-        return false;
-      }
-    }
-    $.post(self.url, {
-      name: nameText,
-      password:pwText
-    }, function(result) {
-      if (result.success == true) {
-        self.userName.html(result.name);
-        self.toggle(false);
-        if(logout){//修改密码后请重新登陆
-          window.location.href = '/mark/logout';
-        }
-      } else {
-        self.popover.userNameMessage.html('修改失败,请稍后重试');
-      }
-    }).error(function() {
-      self.popover.userNameMessage.html('网络通信错误,请稍后重试');
-    });
-  });
-}
-
-ChangeName.prototype.toggle = function(enable) {
-  if (enable == true) {
-    this.enable = true;
-    this.popover.userNameInput.val(this.userName.html());
-    this.popover.passwordInput.val('');
-    this.popover.userNameMessage.html('');
-    this.popover.password2Message.html('');
-    this.popover.show();
-    this.context.listenKeyboard = false;
-  } else {
-    this.enable = false;
-    this.popover.hide();
-    this.context.listenKeyboard = true;
-  }
-}
-
-ChangeName.prototype.popover_dom = '<div class="message-popover" style="display:none"><div class="popover-header">\
-<p class="title">修改个人信息</p><p class="image-close"><img src="{staticServer}/mark-new/images/images-close.png" /></p></div>\
-<div class="popover-cont"><span style="color: red;">*</span><input type="text" class="username-input" placeholder="请输入您的姓名" />\
-<i class="wrong username"></i></div>\
-<div class="popover-cont"><input type="password" class="password-input" placeholder="请输入新的密码" />\
- <i class="wrong password"></i></div>\
- <div class="popover-cont"><input type="password" class="password2-input" placeholder="请再次输入您的密码" /> \
- <i class="wrong password2"></i></div>\
-<a href="#" class="btn btn-small btn-info text-userInfo">确定</a>\
-</div>';

+ 0 - 50
stmms-web/src/main/webapp/static/mark-track/js/modules/flash-image-view.js

@@ -1,50 +0,0 @@
-var flashImageView;
-
-var flash_image_view = function(option, success) {
-    flashImageView = new FlashImageView(option);
-    flashImageView.createSuccess = success;
-    return flashImageView;
-}
-
-function FlashImageView(option) {
-    this.markControl = option.markControl;
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.task = undefined;
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.task = context.task;
-        this.imageCount = this.task.pictureUrls.length;
-        this.imageServer = context.imageServer;
-        //refreshPictureConfig(this.task.pictureConfig, this.task.pictureUrls, this.imageServer);
-        getSwfObject('ImageViewer').setJson(this.task.pictureConfig);
-    });
-}
-
-FlashImageView.prototype.init = function() {
-    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container.center);
-    var path = this.markControl.context.staticServer + '/plugin/';
-    var container = this.container;
-    $.getScript(path + 'swfobject.js', function() {
-        $.getScript(path + 'swfplugin.js', function() {
-            initImageViewPluginDefault(path, "viewer", container.width(), container.height());
-        });
-    });
-}
-
-function refreshPictureConfig(config, urls, imageServer) {
-    if (urls != undefined && urls.length > 0 && config != undefined && config != '') {
-        for (var i = 0; i < urls.length; i++) {
-            eval('config=config.replace(/\\{' + i + '\\}/, "' + (imageServer + urls[i]) + '")');
-        }
-        getSwfObject('ImageViewer').setJson(config);
-    }
-}
-
-function creationComplete() {
-    flashImageView.createSuccess();
-}
-
-function loadComplete() {}
-
-FlashImageView.prototype.container_dom = '<div id="viewer"></div>';

+ 0 - 84
stmms-web/src/main/webapp/static/mark-track/js/modules/header-mark-status.js

@@ -1,84 +0,0 @@
-//评卷状态模块
-var header_mark_status = function(option, success) {
-    var object = new HeaderMarkStatus(option);
-    success();
-    return object;
-}
-
-function HeaderMarkStatus(option) {
-    this.markControl = option.markControl;
-    this.title = option.title;
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, statusInfo) {
-        //this.topStatus.find('#type-name').html('正在领取任务');
-        this.secretArea.hide();
-        this.blockTitle.hide();
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        var task = context.task;
-        //状态栏区域
-        this.blockTitle.show();
-        this.blockTitle.html(task.blockTitle);
-
-        var typeName = task.libraryType < this.typeName.length ? this.typeName[task.libraryType] : '';
-        //this.topStatus.find('#type-name').html(typeName);
-
-        this.secretArea.show();
-        this.topStatus.find('#secret-number').html(task.secretNo);
-    });
-    this.markControl.on('task.get.none', this, function(event, context, status) {
-        this.secretArea.hide();
-        this.blockTitle.hide();
-        this.topStatus.find('#block-title').html();
-        //this.topStatus.find('#type-name').html('');
-        this.topStatus.find('#secret-number').html('');
-    });
-    this.markControl.on('mark.status.change', this, function(event, context, status) {
-        this.render(status);
-    });
-}
-
-HeaderMarkStatus.prototype.init = function() {
-    this.progress = getDom(this.progress_dom, this.markControl).prependTo(this.markControl.container.header);
-    this.topStatus = getDom(this.top_status_dom, this.markControl).prependTo(this.markControl.container.header);
-    this.secretArea = this.topStatus.find('#secret-area');
-    this.secretArea.hide();
-    this.progress.hide();
-
-    this.blockTitle = this.topStatus.find('#block-title');
-    this.topStatus.find('#status-title').html(this.title);
-}
-
-HeaderMarkStatus.prototype.render = function(status) {
-    if (status != undefined && status.valid === true) {
-        this.progress.show();
-        //进度信息区域
-        var totalCount = status.blockTotalCount;
-        var markedCount = status.blockMarkedCount;
-        var leftCount = totalCount > markedCount ? (totalCount - markedCount) : 0;
-        var markedPercent = totalCount > 0 ? new Number((totalCount - leftCount) * 100 / totalCount).toFixed(0) : 0;
-        if (markedPercent == '100' && leftCount > 0) {
-            markedPercent = '99';
-        } else if (markedPercent == '0' && markedCount > 0) {
-            markedPercent = '1';
-        }
-        this.progress.find('#total-count').html(totalCount);
-        this.progress.find('#marked-count').html(markedCount);
-        //this.progress.find('#todo-count').html(leftCount);
-        //this.progress.find('#marked-percent').html(markedPercent.toString() + '%');
-    }
-}
-
-HeaderMarkStatus.prototype.typeName = ['样卷', '试评', '正评'];
-
-HeaderMarkStatus.prototype.top_status_dom = '<p class="text">\
-<i id="status-title"></i>\
-<i id="type-name"></i>\
-<i id="block-title"></i>\
-<i id="secret-area">密号<em id="secret-number"></em></i>\
-</p>';
-
-HeaderMarkStatus.prototype.progress_dom = '<p class="text">\
-<i>试卷总数<em id="total-count"></em></i>\
-<i>已处理<em id="marked-count"></em></i>\
-</p>';

+ 0 - 80
stmms-web/src/main/webapp/static/mark-track/js/modules/heart-beat.js

@@ -1,80 +0,0 @@
-//评卷状态模块
-var heart_beat = function(option, success) {
-    var object = new HeartBeat(option);
-    success();
-    return object;
-}
-
-function HeartBeat(option) {
-    this.markControl = option.markControl;
-    this.url = option.url;
-    this.interval = parseInt(option.interval) != undefined ? parseInt(option.interval) : 20;
-
-    this.popover = getDom(this.popover_dom, this.markControl);
-    this.popover.content = this.popover.find('.popover-cont');
-    this.popover.confirmButton = this.popover.find('#message-confirm-button');
-    this.popover.nextButton = this.popover.find('#message-next-button');
-
-    this.popover.hide();
-    this.popover.appendTo(this.markControl.container);
-
-    var self = this;
-    this.popover.confirmButton.click(function() {
-        self.popover.hide();
-    });
-    this.popover.nextButton.click(function() {
-        self.index++;
-        self.showMessage();
-    });
-
-    if (this.url != undefined && this.url != '') {
-        this.beat();
-    }
-}
-
-HeartBeat.prototype.beat = function() {
-    var self = this;
-    $.ajax({
-        method: 'POST',
-        url: this.url,
-        timeout: 10000,
-        success: function(message) {
-            if (message != undefined && message.length > 0) {
-                self.initMessage(message);
-            }
-        },
-        complete: function() {
-            setTimeout(function() {
-                self.beat();
-            }, self.interval * 1000);
-        }
-    });
-}
-
-HeartBeat.prototype.initMessage = function(message) {
-    this.message = message;
-    this.index = 0;
-    this.showMessage();
-}
-
-HeartBeat.prototype.showMessage = function() {
-    if (this.index < this.message.length) {
-        this.popover.content.html(this.message[this.index]);
-        if (this.index == (this.message.length - 1)) {
-            this.popover.confirmButton.show();
-            this.popover.nextButton.hide();
-        } else {
-            this.popover.confirmButton.hide();
-            this.popover.nextButton.show();
-        }
-        this.popover.show();
-    } else {
-        this.popover.hide();
-    }
-}
-
-HeartBeat.prototype.popover_dom = '<div class="message-popover"><div class="popover-header">\
-<p class="title">通知</p></div><div class="popover-cont"></div>\
-<a href="#" class="btn btn-large btn-info text-c" id="message-next-button" style="display:none">下一条</a>\
-<a href="#" class="btn btn-large btn-info text-c" id="message-confirm-button" style="display:none">确 定</a>\
-</div>';

+ 0 - 38
stmms-web/src/main/webapp/static/mark-track/js/modules/idle-process.js

@@ -1,38 +0,0 @@
-//评卷状态模块
-var idle_process = function(option, success) {
-    var object = new IdleProcess(option);
-    success();
-    return object;
-}
-
-function IdleProcess(option) {
-    this.markControl = option.markControl;
-    this.logoutUrl = option.logoutUrl;
-    this.timeoutMinute = parseInt(option.timeout) != undefined ? parseInt(option.timeout) : 3;
-    this.intervalSecond = 15;
-
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.libraryId = context.task.libraryId;
-        this.start = new Date().getTime();
-    });
-
-    this.process();
-}
-
-IdleProcess.prototype.process = function() {
-    var self = this;
-    if (this.lastLibraryId == undefined) {
-        this.lastLibraryId = this.libraryId;
-    }
-    var now = new Date().getTime();
-    if (this.lastLibraryId != undefined && this.libraryId != undefined && this.start != undefined) {
-        if (this.lastLibraryId == this.libraryId) {
-            if ((now - this.start) > (this.timeoutMinute * 60 * 1000)) {
-                window.location.href = this.logoutUrl;
-            }
-        }
-    }
-    setTimeout(function() {
-        self.process();
-    }, self.intervalSecond * 1000);
-}

+ 0 - 37
stmms-web/src/main/webapp/static/mark-track/js/modules/image-server-selector.js

@@ -1,37 +0,0 @@
-//评卷状态模块
-var image_server_selector = function(option, success) {
-    var object = new ImageServerSelector(option);
-    success();
-    return object;
-}
-
-function ImageServerSelector(option) {
-    this.markControl = option.markControl;
-    this.servers = option.servers;
-    this.flag = option.flag != undefined && option.flag.length > 0 ? option.flag : '/ok.jpg';
-
-    this.connect(0);
-}
-
-ImageServerSelector.prototype.connect = function(index) {
-    if (isArray(this.servers) && this.servers.length > index) {
-        var self = this;
-        var url = this.servers[index].trim();
-        if (url.length > 0) {
-            $.ajax({
-                url: url + this.flag,
-                type: 'GET',
-                cache: false,
-                //timeout: 1000,
-                error: function() {
-                    self.connect(index + 1);
-                },
-                success: function() {
-                    self.markControl.context.imageServer = url;
-                }
-            });
-        } else {
-            self.connect(index + 1);
-        }
-    }
-}

+ 0 - 191
stmms-web/src/main/webapp/static/mark-track/js/modules/mark-history.js

@@ -1,191 +0,0 @@
-//回评模块
-var mark_history = function(option, success) {
-	var object = new MarkHistory(option);
-	success();
-	return object;
-}
-
-function MarkHistory(option) {
-	this.markControl = option.markControl;
-	// this.url = option.url;
-	this.pageSize = option.pageSize;
-	this.taskList = [];
-	this.container = this.markControl.container.sidebar;
-	this.loading = false;
-
-	this.markControl.initMarkFunction();
-	this.container.toggleButton = getDom(this.toggle_button_dom, this.markControl).appendTo(this.markControl.container.assistant.functionList);
-	this.container.toggleButton.click(this, function(event) {
-		event.data.toggle(true);
-	});
-
-	this.markControl.on('history.get.success', this, function(event, context, data) {
-		var taskList = data.result;
-        this.taskList = [];
-		this.loading = false;
-		this.container.list.empty();
-		if(isArray(taskList) && taskList.length > 0) {
-			this.taskList = taskList;
-			for( var i in taskList) {
-				var task = taskList[i];
-				var row = getDom(this.history_row_dom, this.markControl).appendTo(this.container.list);
-				row.find('.history-secret-number').html(task.studentId);
-
-				var date = new Date();
-				date.setTime(task.markTime);
-				row.find('.history-time').html(date.format('hh:mm:ss'));
-				row.find('.history-score').html(task.totalScore);
-				row.attr('data-index', i);
-
-				// 回评任务处理
-				task.previous = true;
-				// task.markFinish = true;
-				// task.totalScore = parseFloat(task.totalScore);
-				// var scoreList = task.scoreList != undefined ?
-				// task.scoreList.split(',') : [];
-				// for (var j in task.markStepList) {
-				// var step = task.markStepList[j];
-				// if (scoreList != undefined && scoreList.length > j) {
-				// step.markScore = new Number(scoreList[j]);
-				// step.score = new String(step.markScore);
-				// step.markFinish = true;
-				// }
-				// }
-			}
-		}
-		this.container.list.find('td').click(this, function(event) {
-			var markHistory = event.data;
-			var index = $(event.target).parent().attr('data-index');
-			markHistory.onTaskSelect(index);
-		});
-		this.pageNumber = data.pageNumber;
-		this.updateHeader();
-
-		if(this.taskList.length > 0) {
-			this.onTaskSelect(0);
-		}
-	});
-	this.markControl.on('history.get.error', this, function(event, context, data) {
-		alert('暂时无法读取评卷历史,请稍后重试');
-	});
-	this.markControl.on('task.submit.success', this, function(event, context, data) {
-		if(this.enable) {
-			this.toggle(false);
-		}
-	});
-	this.markControl.on('task.get.success', this, function(event, context, data) {
-		this.loading = false;
-	});
-}
-
-MarkHistory.prototype.init = function() {
-	this.container.empty();
-
-	this.container.header = getDom(this.header_dom, this.markControl).appendTo(this.container);
-	this.container.paginator = getDom(this.paginator_dom, this.markControl).appendTo(this.container);
-	this.container.list = getDom(this.history_list_dom, this.markControl).appendTo(this.container).find('#history-list');
-
-	var self = this;
-	this.container.header.find('#close-history-button').click(this, function(event) {
-		event.data.toggle(false);
-		self.markControl.context.task = undefined;
-		self.markControl.getTask();
-	})
-	this.container.paginator.find('#last-page-button').click(this, function(event) {
-		var markHistory = event.data;
-		markHistory.onSearch(markHistory.pageNumber + 1);
-	});
-	this.container.paginator.find('#next-page-button').click(this, function(event) {
-		var markHistory = event.data;
-		if(markHistory.pageNumber > 1) {
-			markHistory.onSearch(markHistory.pageNumber - 1);
-		}
-	});
-}
-
-MarkHistory.prototype.toggle = function(enable) {
-	this.enable = enable;
-	if(enable) {
-		this.init();
-		this.pageNumber = 1;
-		this.markControl.setTask(undefined);
-		this.markControl.trigger('mark.sidebar.open');
-		this.markControl.trigger('mark.history.open');
-		this.updateHeader();
-		this.container.list.empty();
-		this.container.removeClass('hide');
-		this.onSearch();
-	} else {
-		this.container.addClass('hide');
-		this.markControl.trigger('mark.sidebar.close');
-		this.markControl.trigger('mark.history.close');
-	}
-}
-
-MarkHistory.prototype.updateHeader = function() {
-	this.container.header.find('#history-start').html(this.pageSize * (this.pageNumber - 1));
-	this.container.header.find('#history-end').html(this.pageSize * this.pageNumber);
-
-	if(this.pageNumber == 1) {
-		this.container.paginator.find('#next-page-label').show();
-		this.container.paginator.find('#next-page-button').hide();
-	} else {
-		this.container.paginator.find('#next-page-label').hide();
-		this.container.paginator.find('#next-page-button').show();
-	}
-
-	if(this.taskList.length < this.pageSize) {
-		this.container.paginator.find('#last-page-label').show();
-		this.container.paginator.find('#last-page-button').hide();
-	} else {
-		this.container.paginator.find('#last-page-label').hide();
-		this.container.paginator.find('#last-page-button').show();
-	}
-}
-
-MarkHistory.prototype.onSearch = function(pageNumber) {
-	if(pageNumber == undefined || pageNumber < 1) {
-		pageNumber = 1;
-	}
-	this.markControl.getHistory({
-	    pageNumber: pageNumber,
-	    pageSize: this.pageSize
-	});
-}
-
-MarkHistory.prototype.onTaskSelect = function(index) {
-    //初始化--特殊标识
-    this.markControl.trigger('mark.specialTag.success');
-	var number = new String(index);
-	if(this.taskList != undefined && index < this.taskList.length && this.loading != true) {
-		this.container.list.find('tr').each(function(index, obj) {
-			if($(obj).attr('data-index') == number) {
-				$(obj).addClass('active');
-			} else {
-				$(obj).removeClass('active');
-			}
-		});
-
-		this.markControl.setTask(jQuery.extend(true, {}, this.taskList[index]));
-		this.loading = true;
-	}
-}
-
-MarkHistory.prototype.toggle_button_dom = '<a href="#">回评</a>';
-
-MarkHistory.prototype.header_dom = '<div class="header">\
-<p class="fl">前<i class="yellow" id="history-start"></i>-前<i class="yellow" id="history-end"></i></p>\
-<a href="#" id="close-history-button"><img src="{staticServer}/mark-new/images/hp-close.png"></a>\
-</div>';
-
-MarkHistory.prototype.paginator_dom = '<div class="m-pagination"><a id="last-page-button" href="#">上一页</a>\
-<i id="last-page-label">上一页</i>\
-<a id="next-page-button" href="#">下一页</a>\
-<i id="next-page-label">下一页</i></div>';
-
-MarkHistory.prototype.history_list_dom = '<div class="sublist"><table class="table table-hover">\
-<thead><tr><th>编号</th><th>时间</th><th>总分</th></tr></thead>\
-<tbody id="history-list"></tbody></table></div>';
-
-MarkHistory.prototype.history_row_dom = '<tr><td class="history-secret-number"></td>\
-<td class="history-time"></td><td class="history-score"></td></tr>';

+ 0 - 151
stmms-web/src/main/webapp/static/mark-track/js/modules/mark-status.js

@@ -1,151 +0,0 @@
-//评卷状态模块
-var mark_status = function(option, success) {
-    var object = new MarkStatus(option);
-    success();
-    return object;
-}
-
-function MarkStatus(option) {
-    this.markControl = option.markControl;
-    this.init(option);
-    this.markControl.on('task.get.before', this, function(event, context, statusInfo) {
-        this.topStatus.find('#stage-name').html('正在加载');
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        var task = context.task;
-        //修改页面显示
-        this.topStatus.find('#stage-name').html('');
-        this.topStatus.find('#student-number').html(task.studentId);
-        this.studentTitle.show();
-
-        if (task.objectiveScore != undefined) {
-            this.objectiveArea.find('#objective-score').html(task.objectiveScore);
-            this.objectiveArea.show();
-        } else {
-            this.objectiveArea.hide();
-        }
-        this.checkTopCount(task);
-    });
-    this.markControl.on('task.get.none', this, function(event, context, status) {
-        this.topStatus.find('#stage-name').html('');
-        this.topStatus.find('#student-number').html('');
-        this.studentTitle.hide();
-        this.objectiveArea.hide();
-    });
-    this.markControl.on('task.get.finish', this, function(event, context, status) {
-        this.topStatus.find('#stage-name').html('');
-        this.topStatus.find('#student-number').html('');
-        this.studentTitle.hide();
-        this.objectiveArea.hide();
-    });
-    this.markControl.on('mark.status.change', this, function(event, context, status) {
-        this.status = status;
-        this.render(status);
-    });
-    this.markControl.on('view.sidebar.open', this, function(event, context, eventObject) {
-        this.blockProgress.hide();
-    });
-    this.markControl.on('view.sidebar.close', this, function(event, context, eventObject) {
-        this.blockProgress.show();
-    });
-}
-
-MarkStatus.prototype.init = function(option) {
-    this.topStatus = getDom(this.status_dom, this.markControl).prependTo(this.markControl.container.header);
-    this.blockProgress = getDom(this.progress_dom, this.markControl).insertAfter(this.topStatus);
-    this.subjectTitle = this.topStatus.find('#subject-title');
-    this.studentTitle = this.topStatus.find('#student-title');
-    this.objectiveArea = this.topStatus.find('#objective-area');
-
-    this.popover = getDom(this.popover_dom, this.markControl);
-    this.popover.hide();
-    this.popover.appendTo(this.markControl.container);
-    var self = this;
-    this.popover.find('#continue-button').click(function() {
-        self.ignoreTopCount = true;
-        self.popover.hide();
-    });
-
-    this.subjectTitle.find('#subject-name').html(option.subjectName);
-    if (option.subjectSelectUrl != undefined) {
-        this.subjectTitle.click(function() {
-            window.location.href = option.subjectSelectUrl;
-        });
-    }
-}
-
-MarkStatus.prototype.checkTopCount = function(task) {
-    //任务限额提示
-    if (task != undefined && task.previous != true && this.status != undefined && this.status.topCount > 0 && this.status.personCount >= this.status.topCount && this.ignoreTopCount != true) {
-        this.popover.show();
-    } else {
-        this.popover.hide();
-    }
-}
-
-MarkStatus.prototype.render = function(status) {
-    if (status != undefined && status.valid === true) {
-        var topCount = status.topCount;
-        this.topStatus.find('#mark-count').html(status.markedCount);
-        this.topStatus.find('#person-count').html(status.personCount);
-        //大题进度信息区域
-        if (this.blockProgress != undefined) {
-            var totalCount = status.totalCount;
-            var markedCount = status.markedCount;
-            var exceptionCount = status.exceptionCount;
-            var personCount = status.personCount;
-            var leftCount = status.leftCount;
-            var markedPercent = totalCount > 0 ? new Number((totalCount - leftCount) * 100 / totalCount).toFixed(0) : '0';
-            if (markedPercent == '100' && leftCount > 0) {
-                markedPercent = '99';
-            } else if (markedPercent == '0' && markedCount > 0) {
-                markedPercent = '1';
-            }
-            if(topCount > 0){
-                if(this.blockProgress.find('#top-count').length == 0){
-                  this.blockProgress.find('#todo-count').after('<i>任务数<em id="top-count"></em></i>');
-                  this.blockProgress.find('#top-count').html(topCount);
-                }
-            }
-            this.blockProgress.find('#total-count').html(totalCount);
-            this.blockProgress.find('#marked-count').html(markedCount);
-            this.blockProgress.find('#person-count').html(personCount);
-            this.blockProgress.find('#todo-count').html(leftCount);
-            this.blockProgress.find('#exception-count').html(exceptionCount);
-            this.blockProgress.find('#marked-percent').html(markedPercent + '%');
-        }
-
-        if (status.totalCount > 0 && status.leftCount == 0) {
-            this.markControl.context.isFinish = true;
-        }
-    }
-}
-
-MarkStatus.prototype.status_dom = '<p class="text">\
-<i id="subject-title" style="cursor:pointer"><em id="subject-name"></em></i>\
-<i id="stage-name"></i>\
-<i id="student-title">考生编号<em id="student-number"></em></i>\
-<i id="objective-area">客观得分<em id="objective-score"></em></i>\
-<i>评卷数<em id="mark-count"></em></i>\
-</p>';
-
-MarkStatus.prototype.progress_dom = '<p class="text">\
-<i>未评<em id="todo-count"></em></i>\
-<i>进度<em id="marked-percent"></em></i>\
-<i>总评<em id="person-count"></em></i>\
-</p>';
-
-MarkStatus.prototype.block_progress_bak_dom = '<p class="text">\
-<i>总数<em id="total-count"></em></i>\
-<i>已评<em id="marked-count"></em></i>\
-<i>未评<em id="todo-count"></em></i>\
-<i>异常<em id="exception-count"></em></i>\
-<i>进度<em id="marked-percent"></em></i>\
-<i>总评<em id="person-count"></em></i>\
-</p>';
-
-MarkStatus.prototype.popover_dom = '<div class="warning-popover">\
-<p>分配任务已评完,是否继续?</p>\
-<a href="#" class="btn btn-large btn-primary text-c" id="continue-button">继续</a>\
-<a href="{logoutUrl}" class="btn btn-large text-c" id="exit-button">退出</a>\
-</div>';

+ 0 - 268
stmms-web/src/main/webapp/static/mark-track/js/modules/multi-image-view.js

@@ -1,268 +0,0 @@
-//简单多张图片排列显示模块
-var multi_image_view = function(option, success) {
-    var object = new MultiImageView(option);
-    success();
-    return object;
-}
-
-function MultiImageView(option) {
-    this.markControl = option.markControl;
-    this.defaultZoom = 'fit';
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.task = undefined;
-        this.imageCount = 0;
-        this.render();
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.task = context.task;
-        this.imageCount = this.task.pictureUrls.length;
-        this.imageServer = context.imageServer;
-        this.render();
-    });
-    this.markControl.on('step.board.show', this, function(event, context, eventObject) {
-        this.container.removeClass('span12');
-        this.container.addClass('span10');
-
-        this.container.perfectScrollbar('update');
-        if (this.iviewer != undefined) {
-            this.iviewer.iviewer('update');
-        }
-    });
-    this.markControl.on('step.board.hide', this, function(event, context, eventObject) {
-        this.container.removeClass('span10');
-        this.container.addClass('span12');
-
-        this.container.perfectScrollbar('update');
-        if (this.iviewer != undefined) {
-            this.iviewer.iviewer('update');
-        }
-    });
-    this.markControl.on('center.width.change', this, function(event, context, eventObject) {
-        this.container.perfectScrollbar('update');
-        if (this.iviewer != undefined) {
-            this.iviewer.iviewer('update');
-        }
-    });
-    this.markControl.on('key.press', this, function(e, context, event) {
-        var code = event.keyCode;
-        if (this.iviewer != undefined && this.currentConfig != undefined && this.imageCount > 0) {
-            if (code == 91) {
-                // [按键,切换上一张图片
-                var number = this.currentConfig.number;
-                if (number > 1) {
-                    this.change(number - 1);
-                    event.preventDefault();
-                    return false;
-                }
-            } else if (code == 93) {
-                // ]按键,切换下一张图片
-                var number = this.currentConfig.number;
-                if (number < this.imageCount) {
-                    this.change(number + 1);
-                    event.preventDefault();
-                    return false;
-                }
-            }
-        }
-    });
-    this.markControl.on('key.up', this, function(e, context, event) {
-        var code = event.keyCode;
-        if (this.iviewer != undefined && this.currentConfig != undefined && this.imageCount > 0) {
-            if (code == 37) {
-                // left按键,切换上一张图片
-                var number = this.currentConfig.number;
-                if (number > 1) {
-                    this.change(number - 1);
-                    event.preventDefault();
-                    return false;
-                }
-            } else if (code == 39) {
-                // right按键,切换下一张图片
-                var number = this.currentConfig.number;
-                if (number < this.imageCount) {
-                    this.change(number + 1);
-                    event.preventDefault();
-                    return false;
-                }
-            }
-        }
-
-    });
-}
-
-MultiImageView.prototype.init = function() {
-    this.configCache = {};
-    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container.center);
-    this.container.perfectScrollbar({
-        wheelSpeed: 20
-    });
-    this.container.width('100%');
-    this.container.height(this.markControl.container.height() - 41);
-
-    this.imageHolder = getDom(this.imageHolder_dom, this.markControl).appendTo(this.container);
-    this.imageHolder.width('100%');
-
-    this.centerHeader = getDom(this.center_header_dom, this.markControl).appendTo(this.markControl.container.header.find('p.pictures')).parent();
-    this.centerHeader.hide();
-    this.imageControl = getDom(this.image_control_dom, this.markControl).appendTo(this.markControl.container);
-    this.imageControl.css('position', 'absolute');
-    this.imageSwitchList = this.imageControl.find('#image-switch-list');
-
-    this.centerHeader.click(this, function(event) {
-        var obj = event.data.centerHeader;
-        var position = obj.offset();
-        var left = position.left;
-        var top = position.top + obj.height();
-        event.data.imageControl.css('top', top);
-        event.data.imageControl.css('left', left);
-        event.data.imageControl.toggle();
-    });
-    this.imageControl.find('a.image-popover-close').click(this, function(event) {
-        event.data.imageControl.hide();
-    });
-    this.imageControl.find('#zoom-out-button').click(this, function(event) {
-        var iviewer = event.data.iviewer;
-        if (iviewer != undefined) {
-            iviewer.iviewer('zoom_by', 1);
-        }
-    });
-    this.imageControl.find('#zoom-in-button').click(this, function(event) {
-        var iviewer = event.data.iviewer;
-        if (iviewer != undefined) {
-            iviewer.iviewer('zoom_by', -1);
-        }
-    });
-    this.imageControl.find('#zoom-fit-button').click(this, function(event) {
-        var iviewer = event.data.iviewer;
-        if (iviewer != undefined) {
-            iviewer.iviewer('fit');
-        }
-    });
-    this.imageControl.find('#zoom-origin-button').click(this, function(event) {
-        var iviewer = event.data.iviewer;
-        if (iviewer != undefined) {
-            iviewer.iviewer('set_zoom', 100);
-        }
-    });
-}
-
-MultiImageView.prototype.render = function() {
-    if (this.task != undefined) {
-        var config = this.configCache[this.task.blockId];
-        if (config == undefined) {
-            config = {
-                number: 1,
-                zoom: this.defaultZoom
-            };
-            this.configCache[this.task.blockId] = config;
-        }
-        if (config.number == undefined || config.number < 0 || config.number > this.imageCount) {
-            config.number = 1;
-        }
-        this.currentConfig = config;
-
-        for (var i = 1; i <= this.imageCount; i++) {
-            var switchButton = getDom(this.image_switch_button_dom, this.markControl).appendTo(this.imageSwitchList);
-            switchButton.html(i);
-            switchButton.attr('data-number', i);
-            if (i == config.number) {
-                switchButton.addClass('curr');
-            }
-        }
-        this.imageSwitchList.find('.image-switch-button').click(this, function(event) {
-            var number = $(event.target).attr('data-number');
-            event.data.change(number, config.zoom, config);
-            event.data.imageControl.hide();
-        });
-
-        if (this.iviewer == undefined) {
-            var MultiImageView = this;
-            this.iviewer = this.imageHolder.iviewer({
-                src: this.imageServer + this.task.pictureUrls[config.number - 1],
-                zoom: config.zoom,
-                ui_disabled: true,
-                mousewheel: false,
-                zoom_animation: false,
-                onZoom: function(ev, new_zoom) {
-                    MultiImageView.onZoomSet(new_zoom);
-                },
-                onStopDrag: function(ev, point) {
-                    MultiImageView.onStopDrag(point);
-                },
-                onFinishLoad: function(ev, url) {
-                    MultiImageView.onImageLoad();
-                }
-            });
-            this.centerHeader.find('#image-number').html(config.number);
-        } else {
-            this.change(config.number, config.zoom, config);
-        }
-        this.imageHolder.show();
-        this.centerHeader.show();
-
-        this.imageHolder.trigger('mouseenter');
-    } else {
-        this.centerHeader.hide();
-        this.imageHolder.hide();
-        this.currentConfig = undefined;
-        this.imageSwitchList.empty();
-    }
-}
-
-MultiImageView.prototype.change = function(number) {
-    if (this.task != undefined && number > 0 && number <= this.imageCount && this.currentConfig != undefined && this.currentConfig.loading == false) {
-        this.currentConfig.loading = true;
-        this.currentConfig.number = number;
-
-        this.iviewer.iviewer('loadImage', this.imageServer + this.task.pictureUrls[number - 1]);
-        this.centerHeader.find('#image-number').html(number);
-        this.imageSwitchList.find('.image-switch-button').each(function(index, obj) {
-            if ($(obj).attr('data-number') == number) {
-                $(obj).addClass('curr');
-            } else {
-                $(obj).removeClass('curr');
-            }
-        });
-    }
-}
-
-MultiImageView.prototype.onImageLoad = function() {
-    this.currentConfig.loading = false;
-    this.imageHolder.find('img').css('top', '0');
-    this.iviewer.iviewer('set_zoom', this.currentConfig.zoom);
-    if (this.currentConfig.dx != undefined && this.currentConfig.dy != undefined) {
-        this.iviewer.iviewer('moveTo', point.dx, point.dy);
-    }
-}
-
-MultiImageView.prototype.onZoomSet = function(zoom) {
-    if (this.currentConfig.loading == false) {
-        this.currentConfig.zoom = zoom;
-    }
-}
-
-MultiImageView.prototype.onStopDrag = function(point) {
-    if (this.currentConfig.loading == false) {
-        this.currentConfig.dx = point.x;
-        this.currentConfig.dy = point.y;
-    }
-}
-
-MultiImageView.prototype.container_dom = '<div class="content"></div>';
-
-MultiImageView.prototype.imageHolder_dom = '<div style="position:relative"></div>';
-
-MultiImageView.prototype.center_header_dom = '<i class="L-pic">当前图片</i><i id="image-number" class="R-pic"></i>';
-
-MultiImageView.prototype.image_control_dom = '<div class="image-popover hide">\
-<div class="image-control">\
-<span class="control-row"><p class="title">图片切换</p><p class="content" id="image-switch-list"></p></span>\
-<span class="control-row"><p class="title">图片控制</p>\
-<p class="content">\
-<a href="#" id="zoom-out-button">放大</a><a href="#" id="zoom-in-button">缩小</a>\
-<a href="#" id="zoom-fit-button">1:1</a><a href="#" id="zoom-origin-button">原始</a>\
-</p></span></div>\
-<a href="#" class="image-popover-close"><p>关</p><p>闭</p></a></div>';
-
-MultiImageView.prototype.image_switch_button_dom = '<a href="#" class="image-switch-button"></a>';

+ 0 - 105
stmms-web/src/main/webapp/static/mark-track/js/modules/problem-process.js

@@ -1,105 +0,0 @@
-//问题卷处理模块
-var problem_process = function(option, success) {
-    var object = new ProblemProcess(option);
-    success();
-    return object;
-}
-
-function ProblemProcess(option) {
-    this.markControl = option.markControl;
-    this.autoSubmit = false;
-    this.reasons = option.reasons;
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.task = undefined;
-        this.reasonType = undefined;
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.task = context.task;
-        if (this.task.previous != true && this.task.back != true) {
-            this.container.show();
-        } else {
-            this.container.hide();
-        }
-    });
-    this.markControl.on('task.get.none', this, function(event, context, eventObject) {
-        this.container.hide();
-    });
-    this.markControl.on('task.get.error', this, function(event, context, eventObject) {
-        this.container.hide();
-    });
-}
-
-ProblemProcess.prototype.init = function() {
-    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container.assistant);
-    this.container.list = this.container.find('#problem-list');
-    this.container.title = this.container.find('.popover-title');
-    for (var i in this.reasons) {
-        var button = getDom(this.button_dom, this.markControl).appendTo(this.container.list);
-        button.attr('data-reason', i);
-        button.html(this.reasons[i]);
-    }
-    this.container.list.find('.problem-select-button').click(this, function(event) {
-        var problemProcess = event.data;
-        var button = $(event.target);
-
-        problemProcess.container.list.find('.problem-select-button').each(function(index, obj) {
-            $(obj).removeClass('curr');
-        });
-        problemProcess.onReasonSelect(button);
-    });
-
-    this.popover = getDom(this.popover_dom, this.markControl);
-    this.popover.hide();
-    this.popover.appendTo(this.markControl.container);
-    var self = this;
-    this.popover.find('#submit-button').click(function() {
-        self.submit();
-        self.reset();
-    });
-    this.popover.find('#cancel-button').click(function() {
-        self.reset();
-    });
-}
-
-ProblemProcess.prototype.reset = function() {
-    this.popover.hide();
-    this.container.list.find('.problem-select-button').each(function(index, obj) {
-        $(obj).removeClass('curr');
-    });
-}
-
-ProblemProcess.prototype.onReasonSelect = function(button) {
-    var self = this;
-    if (this.task != undefined && this.task.problem != true) {
-        button.addClass('curr');
-        this.reasonType = button.attr('data-reason');
-        if (this.autoSubmit) {
-            this.submit();
-        } else {
-            this.popover.show();
-        }
-    }
-    return false;
-}
-
-ProblemProcess.prototype.submit = function() {
-    if (this.task != undefined && this.reasonType != undefined) {
-        this.task.problem = true;
-        this.task.reason = this.reasonType;
-        this.markControl.submitTask();
-    }
-}
-
-
-ProblemProcess.prototype.container_dom = '<h3 class="popover-title">问题卷</h3>\
-<div class="popover-content"><p id="problem-list" class="popover-list">\
-</p></div>';
-
-ProblemProcess.prototype.button_dom = '<a class="problem-select-button" href="#"></a>';
-
-ProblemProcess.prototype.popover_dom = '<div class="warning-popover">\
-<p>确认要将本试卷置为问题卷吗?</p>\
-<a href="#" class="btn btn-large btn-primary text-c" id="submit-button">确定</a>\
-<a href="#" class="btn btn-large text-c" id="cancel-button">取消</a>\
-</div>';

+ 0 - 88
stmms-web/src/main/webapp/static/mark-track/js/modules/tag-process.js

@@ -1,88 +0,0 @@
-//试卷标记处理模块
-var tag_process = function(option, success) {
-    var object = new TagProcess(option);
-    success();
-    return object;
-}
-
-function TagProcess(option) {
-    this.markControl = option.markControl;
-    this.url = option.url;
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.task = undefined;
-        this.reset();
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.task = context.task;
-        this.reset();
-    });
-    this.markControl.on('task.get.none', this, function(event, context, eventObject) {
-        this.reset();
-    });
-    this.markControl.on('task.get.error', this, function(event, context, eventObject) {
-        this.reset();
-    });
-}
-
-TagProcess.prototype.init = function() {
-    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container.assistant);
-    this.container.list = this.container.find('#type-list');
-    this.container.title = this.container.find('.popover-title');
-
-    var self = this;
-    $.post(this.url, function(result) {
-        for (var i = 0; i < result.length; i++) {
-            var button = getDom(self.button_dom, self.markControl).appendTo(self.container.list);
-            button.attr('data-value', result[i].value);
-            button.html(result[i].name);
-        }
-
-        self.container.list.find('.tag-button').click(function(event) {
-            $(this).toggleClass('curr');
-            self.onTypeSelect();
-        });
-    });
-}
-
-TagProcess.prototype.reset = function() {
-    //this.container.list.find('.tag-button').removeClass('curr');
-	var self = this;
-    if (this.task != undefined) {
-        this.container.list.find('.tag-button').each(function(index, obj) {
-            var value = $(obj).attr('data-value');
-            if (self.task.tags != undefined && self.task.tags.indexOf(value) != -1) {
-                $(obj).addClass('curr');
-            } else {
-                $(obj).removeClass('curr');
-            }
-        });
-        this.container.show();
-    } else {
-        this.container.hide();
-    }
-}
-
-TagProcess.prototype.onTypeSelect = function() {
-    var self = this;
-    if (this.task != undefined) {
-        var array = [];
-        this.container.list.find('.tag-button').each(function(index, obj) {
-            if ($(obj).hasClass('curr')) {
-                array.push($(obj).attr('data-value'));
-            }
-        });
-
-        if (array.length > 0) {
-            this.task.tags = array.join(',');
-        } else {
-            this.task.tags = undefined;
-        }
-    }
-}
-
-TagProcess.prototype.container_dom = '<h3 class="popover-title">标记试卷</h3>\
-<div class="popover-content"><p id="type-list" class="popover-list">\
-</p></div>';
-
-TagProcess.prototype.button_dom = '<a class="tag-button" href="#"></a>';

+ 0 - 116
stmms-web/src/main/webapp/static/mark-track/js/modules/thumbnail.js

@@ -1,116 +0,0 @@
-//给分板模块
-var thumbnail = function(option, success) {
-    var object = new Thumbnail(option);
-    success();
-    return object;
-}
-
-function Thumbnail(option) {
-    this.markControl = option.markControl;
-    this.maxWidth = option.width != undefined ? option.width : 100;
-    this.show = false;
-    this.loading = false;
-    this.imageHeight = undefined;
-    this.mousePosition = undefined;
-
-    this.init();
-    this.markControl.on('task.get.before', this, function(event, context, eventObject) {
-        this.task = undefined;
-        this.render();
-    });
-    this.markControl.on('task.get.success', this, function(event, context, eventObject) {
-        this.task = context.task;
-        this.render();
-    });
-}
-
-Thumbnail.prototype.init = function() {
-    var self = this;
-    this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container);
-    this.container.width(this.maxWidth);
-    this.container.offset({
-        top: 60,
-        left: 0
-    });
-
-    this.container.header = getDom(this.container_header_dom, this.markControl).appendTo(this.container);
-    this.container.header.width('100%');
-
-    this.container.content = getDom(this.container_content_dom, this.markControl).appendTo(this.container);
-    this.container.content.width('100%');
-    this.imageObject = this.container.content.find('img');
-    this.imageObject.width('100%');
-    this.imageObject.bind('mouseover', function(e) {
-        self.updatePosition(e);
-    }).bind('mousemove', function(e) {
-        self.updatePosition(e);
-    }).bind('mouseout', function(e) {
-        self.updatePosition();
-    }).bind('click', function() {
-        if (self.show == true && self.task != undefined && self.mousePosition != undefined) {
-            self.markControl.trigger('image.position.change', self.mousePosition.y / self.imageObject.height())
-        }
-    });
-
-    this.container.draggable({
-        containment: "window"
-    });
-    this.container.header.find('#close-button').click(function() {
-        self.toggle(false);
-    });
-
-    this.control = getDom(this.control_dom, this.markControl).appendTo(this.markControl.container.assistant);
-    this.control.find('#show-thumbnail-button').click(function() {
-        self.markControl.container.assistant.hide();
-        self.toggle(true);
-    });
-    this.control.find('#hide-thumbnail-button').click(function() {
-        self.markControl.container.assistant.hide();
-        self.toggle(false);
-    });
-}
-
-Thumbnail.prototype.render = function() {
-    var imageObject = this.imageObject;
-    if (this.task != undefined) {
-        imageObject[0].src = this.task.imageData;
-        imageObject[0].onload = function() {
-            imageObject.show();
-        }
-    } else {
-    	imageObject[0].src = '';
-        imageObject.hide();
-    }
-}
-
-Thumbnail.prototype.toggle = function(show) {
-    if (show == true) {
-        this.show = true;
-        this.container.show();
-    } else {
-        this.show = false;
-        this.container.hide();
-    }
-}
-
-Thumbnail.prototype.updatePosition = function(e) {
-    var position = this.imageObject.offset();
-    this.mousePosition = e != undefined ? {
-        x: e.pageX - position.left,
-        y: e.pageY - position.top
-    } : undefined;
-}
-
-Thumbnail.prototype.container_dom = '<div class="score-board score-board-popover" style="display:none"></div>';
-
-Thumbnail.prototype.container_header_dom = '<div class="header">\
-<p class="fl" id="header">缩略图</p>\
-<a class="header-close" id="close-button" href="#"><img src="{staticServer}/images/close.png"></a>\
-</div>';
-
-Thumbnail.prototype.container_content_dom = '<div class="content" style="padding:4px"><img src=""></div>';
-
-Thumbnail.prototype.control_dom = '<h3 class="popover-title">缩略图</h3>\
-<div class="popover-content"><p id="problem-list" class="popover-list">\
-<a href="#" id="show-thumbnail-button">打开</a><a href="#" id="hide-thumbnail-button">关闭</a>\
-</p></div>';

+ 0 - 89
stmms-web/src/main/webapp/static/mark-track/js/modules/view-sidebar.js

@@ -1,89 +0,0 @@
-//回评模块
-var view_sidebar = function(option, success) {
-    var object = new ViewSidebar(option);
-    success();
-    return object;
-}
-
-function ViewSidebar(option) {
-    this.markControl = option.markControl;
-    this.list = option.list;
-    this.init();
-}
-
-ViewSidebar.prototype.init = function() {
-    var self = this;
-    this.container = getDom(this.container_dom, this.markControl).prependTo(this.markControl.container);
-    this.container.list = this.container.find('#view-list');
-    this.container.content = this.container.find('#view-content');
-
-    if (this.list.length > 0) {
-        for (var i = 0; i < this.list.length; i++) {
-            var option = this.list[i];
-            if (option.url == undefined || option.url.length == 0) {
-                continue;
-            }
-            this.container.list.append('<i style="cursor:pointer" data-url="' + option.url + '">' + option.title + '</i>');
-            this.container.list.append('&nbsp;&nbsp;')
-        }
-
-        this.container.list.find('i').click(function() {
-            self.container.list.find('i').removeClass('yellow');
-            $(this).addClass('yellow');
-            self.changeContent($(this).attr('data-url'));
-        });
-
-        this.container.list.find('i:first').trigger('click');
-
-        this.markControl.initMarkFunction();
-        this.toggleButton = getDom(this.toggle_button_dom, this.markControl).appendTo(this.markControl.container.assistant.functionList);
-        this.toggleButton.click(this, function(event) {
-            self.toggle(true);
-        });
-    }
-
-    this.container.find('#view-close-button').click(this, function(event) {
-        self.toggle(false);
-    });
-}
-
-ViewSidebar.prototype.toggle = function(enable) {
-    if (enable) {
-        this.markControl.trigger('view.sidebar.open');
-        this.container.removeClass('hide');
-    } else {
-        this.container.addClass('hide');
-        this.markControl.trigger('view.sidebar.close');
-    }
-}
-
-ViewSidebar.prototype.changeContent = function(url) {
-    this.container.content.empty();
-
-    var dom = $(this.content_dom);
-    dom[0].width = this.container.width();
-    dom[0].height = this.container.height() * 0.9;
-    dom.find('object')[0].width = this.container.width();
-    dom.find('object')[0].height = this.container.height() * 0.9;
-    dom.find('#object-src').val(url);
-    dom.find('object')[0].data = url;
-    this.container.content.append(dom);
-}
-
-ViewSidebar.prototype.toggle_button_dom = '<a href="#">侧边栏</a>';
-
-ViewSidebar.prototype.container_dom = '<div class="mark-sidebar span5 hide">\
-<div class="header"><p class="fl" id="view-list"></p>\
-<a href="##" id="view-close-button"><img src="{staticServer}/mark-new/images/hp-close.png"></a>\
-</div>\
-<div id="view-content"></div>\
-</div>';
-
-ViewSidebar.prototype.content_dom = '<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="" height="" border="0">\
-<param name="_Version" value="65539">\
-<param name="_ExtentX" value="20108">\
-<param name="_ExtentY" value="10866">\
-<param name="_StockProps" value="0">\
-<param name="SRC" id="object-src" value="">\
-<object data="" type="application/pdf" width="" height=""></object>\
-</object>';

+ 0 - 91
stmms-web/src/main/webapp/static/mark-track/js/modules/warning-info.js

@@ -1,91 +0,0 @@
-//提示警告信息
-var warning_info = function(option, success) {
-    var object = new WarningInfo(option);
-    success();
-    return object;
-}
-
-function WarningInfo(option) {
-    this.option = option;
-    this.markControl = option.markControl;
-    this.init();
-    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() {
-            self.markControl.getTask();
-        });
-        if (context.status != undefined && context.status.totalCount == 0) {
-            this.container.button.hide();
-        }
-    });
-    this.markControl.on('task.get.finish', this, function(event, context, message) {
-        this.toggle(true, option.finishMessage != undefined ? option.finishMessage : '评卷任务已完成');
-        if (option.finishButtonUrl != undefined) {
-            this.container.button.attr('href', option.finishButtonUrl);
-            if (option.finishButtonText != undefined) {
-                this.container.button.html(option.finishButtonText);
-            }
-            this.container.button.show();
-        } else {
-            this.container.button.hide();
-        }
-    });
-    this.markControl.on('task.get.error', this, function(event, context, eventObject) {
-        this.toggle(true, option.errorMessage != undefined ? option.errorMessage : '领取评卷任务出错', '', function() {
-            self.markControl.getTask();
-        });
-    });
-    this.markControl.on('task.submit.success', this, function(event, context, eventObject) {
-        //this.toggle(false);
-    });
-    this.markControl.on('task.submit.error', this, function(event, context, eventObject) {
-        this.toggle(true, '网络异常,任务提交失败', '关闭');
-    });
-    this.markControl.on('task.submit.forceSpecialTag', this, function(event, context, eventObject) {
-        this.toggle(true, '强制标记已开启,至少使用一个标记', '关闭');
-    });
-}
-
-WarningInfo.prototype.init = function() {
-    this.container = getDom(this.container_dom, this.markControl);
-    this.container.hide();
-    this.container.appendTo(this.markControl.container);
-
-    this.container.message = this.container.find('p');
-    this.container.button = this.container.find('a');
-}
-
-WarningInfo.prototype.toggle = function(enable, message, buttonText, callback) {
-    if (enable) {
-        var self = this;
-        this.container.message.html(message);
-
-        this.container.button.removeClass('disabled');
-        if (buttonText != undefined && buttonText != '') {
-            this.container.button.html(buttonText);
-        } else {
-            this.container.button.html('请点击重试');
-        }
-
-        this.container.button.unbind();
-        this.container.button.click(function() {
-            self.container.button.addClass('disabled');
-            self.toggle(false);
-            if (callback != undefined) {
-                callback();
-            }
-        });
-        this.container.button.show();
-
-        this.container.show();
-    } else {
-        this.container.hide();
-    }
-}
-
-WarningInfo.prototype.container_dom = '<div class="warning-popover"><p></p>\
-<a href="#" class="btn btn-large btn-primary text-c">请点击重试</a></div>';

+ 0 - 232
stmms-web/src/main/webapp/static/mark-track/js/task-control.js

@@ -1,232 +0,0 @@
-function TaskControl(option) {
-    this.option = option;
-}
-
-//初始化任务控制器
-TaskControl.prototype.init = function() {
-    var message = '';
-    var option = this.option;
-    //任务提交地址必须有
-    if (option.submitUrl != undefined && option.submitUrl.length > 0) {
-        this.submitUrl = option.submitUrl;
-        if (option.mode == 'loop') {
-            if (option.getUrl != undefined && option.getUrl.length > 0) {
-                this.provider = new LoopTask(this, option.getUrl, option.historyUrl, option.statusUrl);
-            } else {
-                message = 'loop mode: option.getUrl is null';
-            }
-        } else if (option.mode == 'list') {
-            if (isArray(option.tasks) && option.tasks.length > 0) {
-                this.provider = new ListTask(this, option.tasks);
-            } else {
-                message = 'list mode: option.tasks is empty';
-            }
-        }
-    } else {
-        message = 'option.submitUrl is null';
-    }
-
-    if (this.provider == undefined) {
-        if (option.error != undefined && typeof(option.error) == 'function') {
-            option.error.call(this, message);
-        }
-    } else {
-        if (option.success != undefined && typeof(option.success) == 'function') {
-            option.success.call(this);
-        }
-    }
-}
-
-TaskControl.prototype.isFinish = function() {
-    return this.provider.isFinish();
-}
-
-//领取新的任务
-TaskControl.prototype.fetch = function(success, none, error) {
-    this.provider.getTask(function(task) {
-        this.currentTask = task;
-        success.call(this, task);
-    }, function(status) {
-        this.currentTask = undefined;
-        none.call(this, status);
-    }, function() {
-        this.currentTask = undefined;
-        error.call(this);
-    });
-}
-
-//提交任务处理结果
-TaskControl.prototype.submit = function(data, success, error) {
-    var taskControl = this;
-    $.ajax({
-        url: this.submitUrl,
-        type: 'POST',
-        data: JSON.stringify(data),
-        dataType: "json",
-        contentType : 'application/json;charset=utf-8',
-        success: function(result) {
-            if (result.success) {
-                success.call(taskControl, taskControl.provider.onSubmit(result));
-            } else {
-                error.call(taskControl, result.message);
-            }
-        },
-        error: function() {
-            error.call(taskControl);
-        }
-    });
-}
-
-TaskControl.prototype.history = function(data, success, error) {
-    this.provider.getHistory(data, function(list) {
-        success.call(this, list);
-    }, function(message) {
-        error.call(this, message);
-    });
-}
-
-TaskControl.prototype.status = function(callback) {
-    this.provider.getStatus(callback);
-}
-
-function LoopTask(taskControl, getUrl, historyUrl, statusUrl) {
-    this.taskControl = taskControl;
-    this.getUrl = getUrl;
-    this.historyUrl = historyUrl;
-    this.statusUrl = statusUrl;
-    this.finish = false;
-}
-
-LoopTask.prototype.isFinish = function() {
-    return this.finish;
-}
-
-//遍历模式领取任务
-LoopTask.prototype.getTask = function(success, none, error) {
-    var getUrl = this.getUrl;
-    var taskControl = this.taskControl;
-    var self = this;
-    $.ajax({
-        url: getUrl,
-        type: 'POST',
-        success: function(task) {
-            if (task != undefined && task.exist === true) {
-                success.call(taskControl, task);
-            } else if (task != undefined && task.finish == true) {
-                self.finish = true;
-            } else {
-                none.call(taskControl, task);
-            }
-        },
-        error: function(request, message) {
-            error.call(taskControl, message);
-        }
-    });
-}
-
-//任务处理回调方法
-LoopTask.prototype.onSubmit = function(result) {
-    return result.status;
-}
-
-//获取评卷历史方法
-LoopTask.prototype.getHistory = function(data, success, error) {
-    var historyUrl = this.historyUrl;
-    var taskControl = this.taskControl;
-    if (historyUrl != undefined) {
-        $.ajax({
-            url: historyUrl,
-            type: 'POST',
-            data: data,
-            success: function(obj) {
-                success.call(taskControl, obj);
-            },
-            error: function(request, message) {
-                error.call(taskControl, message);
-            }
-        });
-    } else {
-        success.call(taskControl, []);
-    }
-}
-
-LoopTask.prototype.getStatus = function(callback) {
-    if (this.statusUrl != undefined) {
-        $.post(this.statusUrl, {}, function(status) {
-            if (status != undefined) {
-                callback(status);
-            }
-        });
-    }
-}
-
-
-//列表方式的任务引擎
-//用于预先指定需要评卷的任务的情况
-
-function ListTask(taskControl, taskList) {
-    this.taskControl = taskControl;
-    this.taskList = taskList;
-    this.totalCount = taskList.length;
-    this.getCount = 0;
-    this.markedCount = 0;
-}
-
-ListTask.prototype.isFinish = function() {
-    return this.markedCount == this.totalCount;
-}
-
-//列表模式领取任务
-ListTask.prototype.getTask = function(success, none, error) {
-    if (this.getCount < this.totalCount) {
-        var task = this.taskList[this.getCount];
-        task.index = this.getCount;
-        task.exist = true;
-
-        this.getCount++;
-        success.call(this.taskControl, task);
-    } else {
-        none.call(this.taskControl, {
-            exist: false,
-            message: '无评卷任务'
-        });
-    }
-}
-
-//任务处理回调方法
-ListTask.prototype.onSubmit = function(data) {
-    if (data.index == this.markedCount) {
-        this.markedCount++;
-    }
-    var status = {
-        markedCount: this.markedCount,
-        blockMarkedCount: this.markedCount,
-        blockTotalCount: this.totalCount
-    };
-    return status;
-}
-
-//获取评卷历史方法
-ListTask.prototype.getHistory = function(data, success, error) {
-    var start = this.markedCount - (data.pageNumber - 1) * data.pageSize - 1;
-    var end = start - data.pageSize;
-    var list = [];
-    for (var i = start; i > 0 && i > end; i--) {
-        var task = this.taskList[i];
-        task.previous = true;
-        list.push(task);
-    }
-    success.call(this.taskControl, list);
-}
-
-ListTask.prototype.getStatus = function(callback) {
-    var status = {
-        valid: true,
-        topCount: 0,
-        markedCount: this.markedCount,
-        blockMarkedCount: this.markedCount,
-        blockTotalCount: this.totalCount,
-        blockExceptionCount: 0
-    };
-    callback(status);
-}