deleteprocess.js
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:3k
源码类别:
xml/soap/webservice
开发平台:
Java
- // function deleteInit() {
- // var searchStr = window.location.search; var params = searchStr.substring(searchStr.indexOf("?") + 1); var paramsArray = params.split("&"); var name = null; for (var i = 0; i < paramsArray.size(); i++) { var tempStr = paramsArray.get(i); var key = tempStr.substring(0, tempStr.indexOf("=")).toLowerCase(); var value = tempStr.substring(tempStr.indexOf("=") + 1); if (key == "name") { name = value; break; } } deleteProcess(name); }
- // function deleteProcess(name) {
- // if (name) { } else {
- //您所要删除的工作流程图名字为空,无法进行删除。 alert("u60a8u6240u8981u5220u9664u7684u5de5u4f5cu6d41u7a0bu56feu540du5b57u4e3au7a7auff0cu65e0u6cd5u8fdbu884cu5220u9664u3002"); }
- //工作流程图删除后将无法恢复,您是否继续进行? if (window.confirm("u5de5u4f5cu6d41u7a0bu56feu5220u9664u540eu5c06u65e0u6cd5u6062u590duff0cu60a8u662fu5426u7ee7u7eedu8fdbu884cuff1f")) { var deleteProcessAjax = new DeleteProcessAjax(); deleteProcessAjax.deleteProcess(name); } } // /**
- * 删除工作流程图
- */ function DeleteProcessAjax() { this.base = Ajax; this.base(); } DeleteProcessAjax.prototype = new Ajax(); DeleteProcessAjax.prototype.deleteProcess = function (name) { var url = XiorkFlowWorkSpace.URL_DELETE_PROCESS; var method = "POST"; var params = "name=" + name; this.loadXMLHttpRequest(url, method, params); }; DeleteProcessAjax.prototype.processXMLHttpRequest = function (httpRequest) { var doc = httpRequest.responseXML; if (!doc) {
- //操作结束,未知服务器处理结果! alert("u64cdu4f5cu7ed3u675fuff0cu672au77e5u670du52a1u5668u5904u7406u7ed3u679cuff01");
- // if (refreshProcessList) { refreshProcessList(); } return false; }
- // var responseNode = doc.getElementsByTagName("Response")[0]; var statusValue = eval(responseNode.getAttribute("status")); var alertStr = ""; switch (statusValue) { case XiorkFlowWorkSpace.STATUS_SUCCESS:
- //删除成功。 alertStr = "u5220u9664u6210u529fu3002";
- // if (refreshProcessList) { refreshProcessList(); } break; case XiorkFlowWorkSpace.STATUS_FAIL:
- //删除失败。 alertStr = "u5220u9664u5931u8d25u3002"; break; case XiorkFlowWorkSpace.STATUS_FILE_NOT_FOUND:
- //删除失败,文件未找到。 alertStr = "u5220u9664u5931u8d25uff0cu6587u4ef6u672au627eu5230u3002"; if (refreshProcessList) { refreshProcessList(); } break; default:
- //删除失败,未知错误。 alertStr = "u5220u9664u5931u8d25uff0cu672au77e5u9519u8befu3002";
- // if (refreshProcessList) { refreshProcessList(); } break; } alert(alertStr); };