diff --git a/hsweb-i18n/hsweb-i18n-en/src/main/resources/messages_en_US.properties b/hsweb-i18n/hsweb-i18n-en/src/main/resources/messages_en_US.properties new file mode 100644 index 000000000..195e706ba --- /dev/null +++ b/hsweb-i18n/hsweb-i18n-en/src/main/resources/messages_en_US.properties @@ -0,0 +1,24 @@ +# +# /* +# * Copyright 2016 http://www.hswebframework.org +# * +# * Licensed under the Apache License, Version 2.0 (the "License"); +# * you may not use this file except in compliance with the License. +# * You may obtain a copy of the License at +# * +# * http://www.apache.org/licenses/LICENSE-2.0 +# * +# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# */ +# +error=Error +decrypt_param_error=Error in decrypting parameters +user_not_exists=The user does not exist +user_is_disabled=The user is disabled +password_error=Wrong password +private_key_is_null=Private key is empty +verify_code_error=Wrong verification code \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/pom.xml b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/pom.xml index 7fb2b1932..1eaa1bccc 100644 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/pom.xml +++ b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/pom.xml @@ -12,79 +12,26 @@ hsweb-system-workflow-flowable-modeler - - org.hswebframework.web - hsweb-authorization-api - ${project.version} - - - org.hswebframework.web - hsweb-commons-controller - ${project.version} - - org.hswebframework.web hsweb-system-workflow-flowable ${project.version} + + + commons-io + commons-io + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.hswebframework.web - hsweb-commons-dao-mybatis - ${project.version} + org.flowable + flowable-spring-boot-starter-basic + ${flowable.version} org.flowable - flowable-bpmn-model + flowable-json-converter ${flowable.version} @@ -94,41 +41,28 @@ org.flowable - flowable-json-converter + flowable-explorer ${flowable.version} + + + vaadin + com.vaadin + + + dcharts-widget + org.vaadin.addons + + + slf4j-log4j12 + org.slf4j + + org.flowable - flowable-bpmn-layout + flowable-simple-workflow ${flowable.version} - - - - - - - - - - - - - - - - - - - - - - - - - - - com.h2database h2 @@ -140,15 +74,15 @@ 1.0.26 test + org.springframework.boot spring-boot-starter-web - test - org.springframework.boot - spring-boot-starter-logging - test + javax.servlet + servlet-api + 3.0-alpha-1 diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/java/org/hswebframework/web/workflow/flowable/modeler/FlowableDeploymentController.java b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/java/org/hswebframework/web/workflow/flowable/modeler/FlowableDeploymentController.java new file mode 100644 index 000000000..a74c1dc71 --- /dev/null +++ b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/java/org/hswebframework/web/workflow/flowable/modeler/FlowableDeploymentController.java @@ -0,0 +1,266 @@ +package org.hswebframework.web.workflow.flowable.modeler; + +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.activiti.bpmn.converter.BpmnXMLConverter; +import org.activiti.bpmn.model.BpmnModel; +import org.activiti.editor.constants.ModelDataJsonConstants; +import org.activiti.editor.language.json.converter.BpmnJsonConverter; +import org.activiti.engine.history.HistoricProcessInstance; +import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity; +import org.activiti.engine.impl.pvm.process.ActivityImpl; +import org.activiti.engine.repository.DeploymentBuilder; +import org.activiti.engine.repository.ProcessDefinition; +import org.activiti.engine.repository.ProcessDefinitionQuery; +import org.apache.commons.io.FilenameUtils; +import org.hsweb.ezorm.core.PropertyWrapper; +import org.hsweb.ezorm.core.SimplePropertyWrapper; +import org.hsweb.ezorm.core.param.TermType; +import org.hswebframework.web.commons.entity.PagerResult; +import org.hswebframework.web.commons.entity.param.QueryParamEntity; +import org.hswebframework.web.controller.message.ResponseMessage; +import org.hswebframework.web.workflow.flowable.service.BpmActivityService; +import org.hswebframework.web.workflow.flowable.service.BpmProcessService; +import org.hswebframework.web.workflow.flowable.service.BpmTaskService; +import org.hswebframework.web.workflow.flowable.utils.FlowableAbstract; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.util.List; +import java.util.zip.ZipInputStream; + +/** + * @Author wangwei + * @Date 2017/8/10. + */ +@RestController +@RequestMapping("/workflow/procDef") +public class FlowableDeploymentController extends FlowableAbstract { + + private final static String MODEL_ID = "modelId"; + private final static String MODEL_NAME = "name"; + private final static String MODEL_REVISION = "revision"; + private final static String MODEL_DESCRIPTION = "description"; + private final static String MODEL_KEY = "key"; + + @Autowired + BpmTaskService bpmTaskService; + @Autowired + BpmProcessService bpmProcessService; + @Autowired + BpmActivityService bpmActivityService; + + /** + * 流程定义列表 + */ + @GetMapping("/list") + public ResponseMessage> processList(QueryParamEntity param) { + ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery(); + param.getTerms().forEach((term) -> { + + PropertyWrapper valueWrapper = new SimplePropertyWrapper(term.getValue()); + String stringValue = valueWrapper.toString(); + switch (term.getColumn()) { + case "name": + if (term.getTermType().equals(TermType.like)) { + processDefinitionQuery.processDefinitionNameLike(stringValue); + } else + processDefinitionQuery.processDefinitionName(stringValue); + break; + case "key": + if (term.getTermType().equals(TermType.like)) { + processDefinitionQuery.processDefinitionKeyLike(stringValue); + } else + processDefinitionQuery.processDefinitionKey(stringValue); + break; + case "category": + if (term.getTermType().equals(TermType.like)) + processDefinitionQuery.processDefinitionCategoryLike(stringValue); + else + processDefinitionQuery.processDefinitionCategory(stringValue); + break; + case "deploymentId": + processDefinitionQuery.deploymentId(stringValue); + break; + } + }); + int total = (int) processDefinitionQuery.count(); + param.rePaging(total); + List models = processDefinitionQuery.listPage(param.getPageIndex(), param.getPageSize() * (param.getPageIndex() + 1)); + return ResponseMessage.ok(new PagerResult<>(total, models)) + .exclude(ProcessDefinitionEntity.class,"identityLinks"); + } + + /** + * 部署流程资源 + * 加载ZIP文件中的流程 + */ + @RequestMapping(value="/deploy") + public String deploy(@RequestParam(value = "file", required = true) MultipartFile file) { + + // 获取上传的文件名 + String fileName = file.getOriginalFilename(); + + try { + // 得到输入流(字节流)对象 + InputStream fileInputStream = file.getInputStream(); + + // 文件的扩展名 + String extension = FilenameUtils.getExtension(fileName); + + // zip或者bar类型的文件用ZipInputStream方式部署 + DeploymentBuilder deployment = repositoryService.createDeployment(); + if (extension.equals("zip") || extension.equals("bar")) { + ZipInputStream zip = new ZipInputStream(fileInputStream); + deployment.addZipInputStream(zip); + } else { + // 其他类型的文件直接部署 + deployment.addInputStream(fileName, fileInputStream); + } + deployment.deploy(); + } catch (Exception e) { +// logger.error("部署流程错误,获取文件流失败"); + } + + return "redirect:list"; + } + + /** + * 读取流程资源 + * + * @param processDefinitionId 流程定义ID + * @param resourceName 资源名称 + */ + @GetMapping(value = "/read-resource") + public void readResource(@RequestParam("pdid") String processDefinitionId, @RequestParam("resourceName") String resourceName, HttpServletResponse response) + throws Exception { + ProcessDefinitionQuery pdq = repositoryService.createProcessDefinitionQuery(); + ProcessDefinition pd = pdq.processDefinitionId(processDefinitionId).singleResult(); + + // 通过接口读取 + InputStream resourceAsStream = repositoryService.getResourceAsStream(pd.getDeploymentId(), resourceName); + + // 输出资源内容到相应对象 + byte[] b = new byte[1024]; + int len = -1; + while ((len = resourceAsStream.read(b, 0, 1024)) != -1) { + response.getOutputStream().write(b, 0, len); + } + } + + /*** + * 流程定义转换Model + * @param processDefinitionId + * @return + * @throws UnsupportedEncodingException + * @throws XMLStreamException + */ + @RequestMapping(value = "/convert-to-model/{processDefinitionId}") + public ResponseMessage convertToModel(@PathVariable("processDefinitionId") String processDefinitionId) + throws UnsupportedEncodingException, XMLStreamException { + ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery() + .processDefinitionId(processDefinitionId).singleResult(); + InputStream bpmnStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), + processDefinition.getResourceName()); + XMLInputFactory xif = XMLInputFactory.newInstance(); + InputStreamReader in = new InputStreamReader(bpmnStream, "UTF-8"); + XMLStreamReader xtr = xif.createXMLStreamReader(in); + BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr); + + BpmnJsonConverter converter = new BpmnJsonConverter(); + com.fasterxml.jackson.databind.node.ObjectNode modelNode = converter.convertToJson(bpmnModel); + org.activiti.engine.repository.Model modelData = repositoryService.newModel(); + modelData.setKey(processDefinition.getKey()); + modelData.setName(processDefinition.getResourceName().substring(0,processDefinition.getResourceName().indexOf("."))); + modelData.setCategory(processDefinition.getDeploymentId()); + + ObjectNode modelObjectNode = new ObjectMapper().createObjectNode(); + modelObjectNode.put(ModelDataJsonConstants.MODEL_NAME, processDefinition.getName()); + modelObjectNode.put(ModelDataJsonConstants.MODEL_REVISION, 1); + modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, processDefinition.getDescription()); + modelData.setMetaInfo(modelObjectNode.toString()); + + repositoryService.saveModel(modelData); + + repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes("utf-8")); + JSONObject jsonObject = new JSONObject(); + jsonObject.put(MODEL_ID,modelData.getId()); + return ResponseMessage.ok(jsonObject.toJSONString()); + } + + /** + * 删除部署的流程,如果流程下有正在运行的流程实例则报错 + * + * @param deploymentId 流程部署ID + */ + @RequestMapping(value = "/delete-deployment") + public String deleteProcessDefinition(@RequestParam("deploymentId") String deploymentId) { + repositoryService.deleteDeployment(deploymentId); + return "redirect:index"; + } + + /** + * 删除部署的流程,级联删除流程实例 + * + * @param deploymentId 流程部署ID + */ + @RequestMapping(value = "/delete-deploy") + public String deleteProcess(@RequestParam("deploymentId") String deploymentId) { + repositoryService.deleteDeployment(deploymentId, true); + return "redirect:index"; + } + + /** + * 查看当前节点流程图 + * @param processInstanceId + * @return 当前节点 + * window.open('/showImage?processInstanceId=' + processInstanceId, 'newwindow', 'height=500, width=1000, top=100,left=200, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no'); + *
+ <#if message??> +

${message!}

+ <#else> + + +
+ +
+ */ + @GetMapping("/showImage/{processInstanceId}") + public Object showImage(@PathVariable String processInstanceId){ + JSONObject jsonObject = new JSONObject(); + HistoricProcessInstance processInstance = bpmTaskService.selectHisProInst(processInstanceId); + if(processInstance!=null){ + ActivityImpl activity = bpmActivityService.getActivityByProcInstId(processInstance.getProcessDefinitionId(),processInstance.getId()); + jsonObject.put("activity",activity); + jsonObject.put("procDefId",processInstance.getProcessDefinitionId()); + }else{ + jsonObject.put("message","获取流程图失败"); +// logger.debug("获取流程节点,processInstanceId:"+processInstanceId); + } + return jsonObject; + } + + @GetMapping("/findPic/{procDefId}") + public void findPic(@PathVariable String procDefId,HttpServletResponse response){ + try{ + InputStream inputStream = bpmProcessService.findProcessPic(procDefId); + byte[] b = new byte[1024]; + int len = 0; + while ((len = inputStream.read(b,0,1024))!=-1){ + response.getOutputStream().write(b, 0, len); + } + }catch (Exception e){ +// logger.debug("获取流程图失败,procDefId:"+procDefId); + } + } +} diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/modeler.html b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/modeler.html new file mode 100644 index 000000000..19265ba8a --- /dev/null +++ b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/modeler.html @@ -0,0 +1,140 @@ + + + + + + + + + + Flowable 工作流模型设计器 + + + + + + + + + + + + + + + + + + + + +
+
+ + {{alerts.current.message}} + +
+ {{alerts.queue.length + 1}} +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/404.html b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/404.html deleted file mode 100644 index ec98e3c26..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/404.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - Page Not Found :( - - - -
-

Not found :(

-

Sorry, but the page you were trying to view does not exist.

-

It looks like this was the result of either:

-
    -
  • a mistyped address
  • -
  • an out-of-date link
  • -
- - -
- - diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/browserconfig.xml b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/browserconfig.xml deleted file mode 100644 index 006d54a60..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #da532c - - - diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/.gitignore b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/.gitignore deleted file mode 100644 index 26e82b02d..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/dist -/node_modules -/displaymodel_temp.html diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/Gruntfile.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/Gruntfile.js deleted file mode 100644 index 9aac21f56..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/Gruntfile.js +++ /dev/null @@ -1,153 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -module.exports = function (grunt) { - - require('load-grunt-tasks')(grunt); - require('time-grunt')(grunt); - - grunt.initConfig({ - yeoman: { - app: require('./package.json').appPath || 'app', - dist: 'dist' - }, - clean: { - dist: { - files: [ - { - dot: true, - src: [ - '.tmp', - '<%= yeoman.dist %>/*', - '!<%= yeoman.dist %>/.git*' - ] - } - ] - }, - server: '.tmp' - }, - useminPrepare: { - html: 'displaymodel.html', - options: { - dest: '<%= yeoman.dist %>/' - } - }, - usemin: { - html: ['<%= yeoman.dist %>/{,*/}*.html'], - css: ['<%= yeoman.dist %>/display/styles/{,*/}*.css'], - options: { - dirs: ['<%= yeoman.dist %>'] - } - }, - // Put files not handled in other tasks here - copy: { - dist: { - files: [{ - expand: true, - dot: true, - cwd: '.', - dest: '<%= yeoman.dist %>', - src: [ - 'fonts/*' - ] - }, { - expand: true, - cwd: '.tmp/images', - dest: '<%= yeoman.dist %>/images', - src: [ - 'generated/*' - ] - }] - }, - styles: { - expand: true, - cwd: 'styles', - dest: '.tmp/styles/', - src: '{,*/}*.css' - }, - index: { - expand: true, - cwd: './', - src: ['*.html', 'views/**/**.html'], - dest: '<%= yeoman.dist %>' - }, - copyCss : { - files: [ - {expand: true, cwd:'.tmp/concat/display/styles/', src:'*.css', dest:'<%= yeoman.dist %>/display/styles/', filter: 'isFile'} - ] - }, - copyJs : { - files: [ - {expand: true, cwd:'.tmp/concat/display/scripts', src:'*.js', dest:'<%= yeoman.dist %>/display/scripts/', filter: 'isFile'} - ] - }, - }, - ngAnnotate: { - dist: { - files: [ - { - expand: true, - cwd: '.tmp/concat/display/scripts', - src: '*.js', - dest: '.tmp/concat/display/scripts' - } - ] - } - }, - uglify: { - dist: { - options: { - mangle: true - }, - files: { - '<%= yeoman.dist %>/display/scripts/displaymodel-logic.js': [ - '<%= yeoman.dist %>/display/scripts/displaymodel-logic.js' - ] - } - } - }, - rev: { - dist: { - files: { - src: [ - '<%= yeoman.dist %>/display/{,*/}*.js', - '<%= yeoman.dist %>/display/{,*/}*.css', - '<%= yeoman.dist %>/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' - ] - } - } - } - }); - - grunt.registerTask('buildApp', [ - 'clean:dist', - 'useminPrepare', - 'copy:styles', - 'concat', - 'copy:dist', - 'ngAnnotate', - 'copy:copyCss', - 'copy:copyJs', - 'copy:index', - 'uglify', - 'rev', - 'usemin' - ]); - - - grunt.registerTask('default', [ - 'buildApp' - ]); - -}; diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/bpmn-draw.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/bpmn-draw.js deleted file mode 100644 index 69a73ecfe..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/bpmn-draw.js +++ /dev/null @@ -1,824 +0,0 @@ -/* Copyright 2005-2015 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function _bpmnGetColor(element, defaultColor) -{ - var strokeColor; - if(element.current) { - strokeColor = CURRENT_COLOR; - } else if(element.completed) { - strokeColor = COMPLETED_COLOR; - } else { - strokeColor = defaultColor; - } - return strokeColor; -} - -function _drawPool(pool) -{ - var rect = paper.rect(pool.x, pool.y, pool.width, pool.height); - - rect.attr({"stroke-width": 1, - "stroke": "#000000", - "fill": "white" - }); - - if (pool.name) - { - var poolName = paper.text(pool.x + 14, pool.y + (pool.height / 2), pool.name).attr({ - "text-anchor" : "middle", - "font-family" : "Arial", - "font-size" : "12", - "fill" : "#000000" - }); - - poolName.transform("r270"); - } - - if (pool.lanes) - { - for (var i = 0; i < pool.lanes.length; i++) - { - var lane = pool.lanes[i]; - _drawLane(lane); - } - } -} - -function _drawLane(lane) -{ - var rect = paper.rect(lane.x, lane.y, lane.width, lane.height); - - rect.attr({"stroke-width": 1, - "stroke": "#000000", - "fill": "white" - }); - - if (lane.name) - { - var laneName = paper.text(lane.x + 10, lane.y + (lane.height / 2), lane.name).attr({ - "text-anchor" : "middle", - "font-family" : "Arial", - "font-size" : "12", - "fill" : "#000000" - }); - - laneName.transform("r270"); - } -} - -function _drawSubProcess(element) -{ - var rect = paper.rect(element.x, element.y, element.width, element.height, 4); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - rect.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "white" - }); -} - -function _drawTransaction(element) -{ - var rect = paper.rect(element.x, element.y, element.width, element.height, 4); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - rect.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "white" - }); - - var borderRect = paper.rect(element.x + 2, element.y + 2, element.width - 4, element.height -4, 4); - - borderRect.attr({"stroke-width": 1, - "stroke": "black", - "fill": "none" - }); -} - -function _drawEventSubProcess(element) -{ - var rect = paper.rect(element.x, element.y, element.width, element.height, 4); - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - rect.attr({"stroke-width": 1, - "stroke": strokeColor, - "stroke-dasharray": ".", - "fill": "white" - }); -} - -function _drawAdhocSubProcess(element) -{ - var rect = paper.rect(element.x, element.y, element.width, element.height, 4); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - rect.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "white" - }); - - paper.text(element.x + (element.width / 2), element.y + element.height - 8).attr({ - "text-anchor" : "middle", - "font-family" : "Arial", - "font-size" : 20, - "text" : "~", - "fill" : "#373e48" - }); -} - -function _drawStartEvent(element) -{ - var startEvent = _drawEvent(element, NORMAL_STROKE, 15); - startEvent.click(function() { - _zoom(true); - }); - _addHoverLogic(element, "circle", MAIN_STROKE_COLOR); -} - -function _drawEndEvent(element) -{ - var endEvent = _drawEvent(element, ENDEVENT_STROKE, 14); - endEvent.click(function() { - _zoom(false); - }); - _addHoverLogic(element, "circle", MAIN_STROKE_COLOR); -} - -function _drawEvent(element, strokeWidth, radius) -{ - var x = element.x + (element.width / 2); - var y = element.y + (element.height / 2); - - var circle = paper.circle(x, y, radius); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - // Fill - var eventFillColor = _determineCustomFillColor(element, "#ffffff"); - - // Opacity - var eventOpacity = 1.0; - if (customActivityBackgroundOpacity) { - eventOpacity = customActivityBackgroundOpacity; - } - - if (element.interrupting === undefined || element.interrupting) { - circle.attr({ - "stroke-width": strokeWidth, - "stroke": strokeColor, - "fill": eventFillColor, - "fill-opacity": eventOpacity - }); - - } else { - circle.attr({ - "stroke-width": strokeWidth, - "stroke": strokeColor, - "stroke-dasharray": ".", - "fill": eventFillColor, - "fill-opacity": eventOpacity - }); - } - - circle.id = element.id; - - _drawEventIcon(paper, element); - - return circle; -} - -function _drawServiceTask(element) -{ - _drawTask(element); - if (element.taskType === "mail") - { - _drawSendTaskIcon(paper, element.x + 4, element.y + 4); - } - else if (element.taskType === "camel") - { - _drawCamelTaskIcon(paper, element.x + 4, element.y + 4); - } - else if (element.taskType === "mule") - { - _drawMuleTaskIcon(paper, element.x + 4, element.y + 4); - } - else if (element.taskType === "http") - { - _drawHttpTaskIcon(paper, element.x + 4, element.y + 4); - } - else if (element.stencilIconId) - { - paper.image("../service/stencilitem/" + element.stencilIconId + "/icon", element.x + 4, element.y + 4, 16, 16); - } - else - { - _drawServiceTaskIcon(paper, element.x + 4, element.y + 4); - } - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawHttpServiceTask(element) -{ - _drawTask(element); - _drawHttpTaskIcon(paper, element.x + 4, element.y + 4); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawCallActivity(element) -{ - var width = element.width - (CALL_ACTIVITY_STROKE / 2); - var height = element.height - (CALL_ACTIVITY_STROKE / 2); - - var rect = paper.rect(element.x, element.y, width, height, 4); - - var strokeColor = _bpmnGetColor(element, ACTIVITY_STROKE_COLOR); - - // Fill - var callActivityFillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - - // Opacity - var callActivityOpacity = 1.0; - if (customActivityBackgroundOpacity) { - callActivityOpacity = customActivityBackgroundOpacity; - } - - rect.attr({"stroke-width": CALL_ACTIVITY_STROKE, - "stroke": strokeColor, - "fill": callActivityFillColor, - "fill-opacity": callActivityOpacity - }); - - rect.id = element.id; - - if (element.name) { - this._drawMultilineText(element.name, element.x, element.y, element.width, element.height, "middle", "middle", 11); - } - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawScriptTask(element) -{ - _drawTask(element); - _drawScriptTaskIcon(paper, element.x + 4, element.y + 4); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawUserTask(element) -{ - _drawTask(element); - _drawUserTaskIcon(paper, element.x + 4, element.y + 4); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawBusinessRuleTask(element) -{ - _drawTask(element); - _drawBusinessRuleTaskIcon(paper, element.x + 4, element.y + 4); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawManualTask(element) -{ - _drawTask(element); - _drawManualTaskIcon(paper, element.x + 4, element.y + 4); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawSendTask(element) -{ - _drawTask(element); - _drawSendTaskIcon(paper, element.x + 4, element.y + 4); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawReceiveTask(element) -{ - _drawTask(element); - _drawReceiveTaskIcon(paper, element.x, element.y); - _addHoverLogic(element, "rect", ACTIVITY_STROKE_COLOR); -} - -function _drawTask(element) -{ - var rectAttrs = {}; - - // Stroke - var strokeColor = _bpmnGetColor(element, ACTIVITY_STROKE_COLOR); - rectAttrs['stroke'] = strokeColor; - - var strokeWidth; - if (strokeColor === ACTIVITY_STROKE_COLOR) { - strokeWidth = TASK_STROKE; - } else { - strokeWidth = TASK_HIGHLIGHT_STROKE; - } - - var width = element.width - (strokeWidth / 2); - var height = element.height - (strokeWidth / 2); - - var rect = paper.rect(element.x, element.y, width, height, 4); - rectAttrs['stroke-width'] = strokeWidth; - - // Fill - var fillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - rectAttrs['fill'] = fillColor; - - // Opacity - if (customActivityBackgroundOpacity) { - rectAttrs['fill-opacity'] = customActivityBackgroundOpacity; - } - - rect.attr(rectAttrs); - rect.id = element.id; - - if (element.name) { - this._drawMultilineText(element.name, element.x, element.y, element.width, element.height, "middle", "middle", 11); - } -} - -function _drawExclusiveGateway(element) -{ - _drawGateway(element); - var quarterWidth = element.width / 4; - var quarterHeight = element.height / 4; - - var iks = paper.path( - "M" + (element.x + quarterWidth + 3) + " " + (element.y + quarterHeight + 3) + - "L" + (element.x + 3 * quarterWidth - 3) + " " + (element.y + 3 * quarterHeight - 3) + - "M" + (element.x + quarterWidth + 3) + " " + (element.y + 3 * quarterHeight - 3) + - "L" + (element.x + 3 * quarterWidth - 3) + " " + (element.y + quarterHeight + 3) - ); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - // Fill - var gatewayFillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - - // Opacity - var gatewayOpacity = 1.0; - if (customActivityBackgroundOpacity) { - gatewayOpacity = customActivityBackgroundOpacity; - } - - - iks.attr({"stroke-width": 3, "stroke": strokeColor, "fill": gatewayFillColor, "fill-opacity": gatewayOpacity}); - - _addHoverLogic(element, "rhombus", MAIN_STROKE_COLOR); -} - -function _drawParallelGateway(element) -{ - _drawGateway(element); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - var path1 = paper.path("M 6.75,16 L 25.75,16 M 16,6.75 L 16,25.75"); - - // Fill - var gatewayFillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - - // Opacity - var gatewayOpacity = 1.0; - if (customActivityBackgroundOpacity) { - gatewayOpacity = customActivityBackgroundOpacity; - } - - path1.attr({ - "stroke-width": 3, - "stroke": strokeColor, - "fill": gatewayFillColor, - "fill-opacity": gatewayOpacity - }); - - path1.transform("T" + (element.x + 4) + "," + (element.y + 4)); - - _addHoverLogic(element, "rhombus", MAIN_STROKE_COLOR); -} - -function _drawInclusiveGateway(element) -{ - _drawGateway(element); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - var circle1 = paper.circle(element.x + (element.width / 2), element.y + (element.height / 2), 9.75); - - // Fill - var gatewayFillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - - // Opacity - var gatewayOpacity = 1.0; - if (customActivityBackgroundOpacity) { - gatewayOpacity = customActivityBackgroundOpacity; - } - - circle1.attr({ - "stroke-width": 2.5, - "stroke": strokeColor, - "fill": gatewayFillColor, - "fill-opacity": gatewayOpacity - }); - - _addHoverLogic(element, "rhombus", MAIN_STROKE_COLOR); -} - -function _drawEventGateway(element) -{ - _drawGateway(element); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - var circle1 = paper.circle(element.x + (element.width / 2), element.y + (element.height / 2), 10.4); - - // Fill - var gatewayFillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - - // Opacity - var gatewayOpacity = 1.0; - if (customActivityBackgroundOpacity) { - gatewayOpacity = customActivityBackgroundOpacity; - } - - circle1.attr({ - "stroke-width": 0.5, - "stroke": strokeColor, - "fill": gatewayFillColor, - "fill-opacity": gatewayOpacity - }); - - var circle2 = paper.circle(element.x + (element.width / 2), element.y + (element.height / 2), 11.7); - circle2.attr({ - "stroke-width": 0.5, - "stroke": strokeColor, - "fill": gatewayFillColor, - "fill-opacity": gatewayOpacity - }); - - var path1 = paper.path("M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549 L 15.794545,8.389969 L 23.130481,13.720774 L 20.327514,22.344972 z"); - path1.attr({ - "stroke-width": 1.39999998, - "stroke": strokeColor, - "fill": gatewayFillColor, - "fill-opacity": gatewayOpacity, - "stroke-linejoin": "bevel" - }); - - path1.transform("T" + (element.x + 4) + "," + (element.y + 4)); - - _addHoverLogic(element, "rhombus", MAIN_STROKE_COLOR); -} - -function _drawGateway(element) -{ - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - var rhombus = paper.path("M" + element.x + " " + (element.y + (element.height / 2)) + - "L" + (element.x + (element.width / 2)) + " " + (element.y + element.height) + - "L" + (element.x + element.width) + " " + (element.y + (element.height / 2)) + - "L" + (element.x + (element.width / 2)) + " " + element.y + "z" - ); - - // Fill - var gatewayFillColor = _determineCustomFillColor(element, ACTIVITY_FILL_COLOR); - - // Opacity - var gatewayOpacity = 1.0; - if (customActivityBackgroundOpacity) { - gatewayOpacity = customActivityBackgroundOpacity; - } - - rhombus.attr("stroke-width", 2); - rhombus.attr("stroke", strokeColor); - rhombus.attr("fill", gatewayFillColor); - rhombus.attr("fill-opacity", gatewayOpacity); - - rhombus.id = element.id; - - return rhombus; -} - -function _drawBoundaryEvent(element) -{ - var x = element.x + (element.width / 2); - var y = element.y + (element.height / 2); - - var circle = paper.circle(x, y, 15); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - if (element.cancelActivity) { - circle.attr({ - "stroke-width": 1, - "stroke": strokeColor, - "fill": "white" - }); - - } else { - circle.attr({ - "stroke-width": 1, - "stroke-dasharray": ".", - "stroke": strokeColor, - "fill": "white" - }); - } - - var innerCircle = paper.circle(x, y, 12); - - if (element.cancelActivity) { - innerCircle.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "none" - }); - - } else { - innerCircle.attr({ - "stroke-width": 1, - "stroke-dasharray": ".", - "stroke": strokeColor, - "fill": "none" - }); - } - - _drawEventIcon(paper, element); - _addHoverLogic(element, "circle", MAIN_STROKE_COLOR); - - circle.id = element.id; - innerCircle.id = element.id + "_inner"; -} - -function _drawIntermediateCatchEvent(element) -{ - var x = element.x + (element.width / 2); - var y = element.y + (element.height / 2); - - var circle = paper.circle(x, y, 15); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - circle.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "white" - }); - - var innerCircle = paper.circle(x, y, 12); - - innerCircle.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "none" - }); - - _drawEventIcon(paper, element); - _addHoverLogic(element, "circle", MAIN_STROKE_COLOR); - - circle.id = element.id; - innerCircle.id = element.id + "_inner"; -} - -function _drawThrowEvent(element) -{ - var x = element.x + (element.width / 2); - var y = element.y + (element.height / 2); - - var circle = paper.circle(x, y, 15); - - var strokeColor = _bpmnGetColor(element, MAIN_STROKE_COLOR); - - circle.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "white" - }); - - var innerCircle = paper.circle(x, y, 12); - - innerCircle.attr({"stroke-width": 1, - "stroke": strokeColor, - "fill": "none" - }); - - _drawEventIcon(paper, element); - _addHoverLogic(element, "circle", MAIN_STROKE_COLOR); - - circle.id = element.id; - innerCircle.id = element.id + "_inner"; -} - -function _drawMultilineText(text, x, y, boxWidth, boxHeight, horizontalAnchor, verticalAnchor, fontSize) -{ - if (!text || text == "") - { - return; - } - - var textBoxX, textBoxY; - var width = boxWidth - (2 * TEXT_PADDING); - - if (horizontalAnchor === "middle") - { - textBoxX = x + (boxWidth / 2); - } - else if (horizontalAnchor === "start") - { - textBoxX = x; - } - - textBoxY = y + (boxHeight / 2); - - var t = paper.text(textBoxX + TEXT_PADDING, textBoxY + TEXT_PADDING).attr({ - "text-anchor" : horizontalAnchor, - "font-family" : "Arial", - "font-size" : fontSize, - "fill" : "#373e48" - }); - - var abc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - t.attr({ - "text" : abc - }); - var letterWidth = t.getBBox().width / abc.length; - - t.attr({ - "text" : text - }); - var removedLineBreaks = text.split("\n"); - var x = 0, s = []; - for (var r = 0; r < removedLineBreaks.length; r++) - { - var words = removedLineBreaks[r].split(" "); - for ( var i = 0; i < words.length; i++) { - - var l = words[i].length; - if (x + (l * letterWidth) > width) { - s.push("\n"); - x = 0; - } - x += l * letterWidth; - s.push(words[i] + " "); - } - s.push("\n"); - x = 0; - } - t.attr({ - "text" : s.join("") - }); - - if (verticalAnchor && verticalAnchor === "top") - { - t.attr({"y": y + (t.getBBox().height / 2)}); - } -} - -function _drawTextAnnotation(element) -{ - var path1 = paper.path("M20,1 L1,1 L1,50 L20,50"); - path1.attr({ - "stroke": "#585858", - "fill": "none" - }); - - var annotation = paper.set(); - annotation.push(path1); - - annotation.transform("T" + element.x + "," + element.y); - - if (element.text) { - this._drawMultilineText(element.text, element.x + 2, element.y, element.width, element.height, "start", "middle", 11); - } -} - -function _drawFlow(flow){ - - var polyline = new Polyline(flow.id, flow.waypoints, SEQUENCEFLOW_STROKE, paper); - - var strokeColor = _bpmnGetColor(flow, MAIN_STROKE_COLOR); - - polyline.element = paper.path(polyline.path); - polyline.element.attr({"stroke-width":SEQUENCEFLOW_STROKE}); - polyline.element.attr({"stroke":strokeColor}); - - polyline.element.id = flow.id; - - var lastLineIndex = polyline.getLinesCount() - 1; - var line = polyline.getLine(lastLineIndex); - - if (line == undefined) return; - - if (flow.type == "connection" && flow.conditions) - { - var middleX = (line.x1 + line.x2) / 2; - var middleY = (line.y1 + line.y2) / 2; - var image = paper.image("../editor/images/condition-flow.png", middleX - 8, middleY - 8, 16, 16); - } - - var polylineInvisible = new Polyline(flow.id, flow.waypoints, SEQUENCEFLOW_STROKE, paper); - - polylineInvisible.element = paper.path(polyline.path); - polylineInvisible.element.attr({ - "opacity": 0, - "stroke-width": 8, - "stroke" : "#000000" - }); - - _showTip(jQuery(polylineInvisible.element.node), flow); - - polylineInvisible.element.mouseover(function() { - paper.getById(polyline.element.id).attr({"stroke":"blue"}); - }); - - polylineInvisible.element.mouseout(function() { - paper.getById(polyline.element.id).attr({"stroke":"#585858"}); - }); - - _drawArrowHead(line); -} - -function _drawAssociation(flow){ - - var polyline = new Polyline(flow.id, flow.waypoints, ASSOCIATION_STROKE, paper); - - polyline.element = paper.path(polyline.path); - polyline.element.attr({"stroke-width": ASSOCIATION_STROKE}); - polyline.element.attr({"stroke-dasharray": ". "}); - polyline.element.attr({"stroke":"#585858"}); - - polyline.element.id = flow.id; - - var polylineInvisible = new Polyline(flow.id, flow.waypoints, ASSOCIATION_STROKE, paper); - - polylineInvisible.element = paper.path(polyline.path); - polylineInvisible.element.attr({ - "opacity": 0, - "stroke-width": 8, - "stroke" : "#000000" - }); - - _showTip(jQuery(polylineInvisible.element.node), flow); - - polylineInvisible.element.mouseover(function() { - paper.getById(polyline.element.id).attr({"stroke":"blue"}); - }); - - polylineInvisible.element.mouseout(function() { - paper.getById(polyline.element.id).attr({"stroke":"#585858"}); - }); -} - -function _drawArrowHead(line, connectionType) -{ - var doubleArrowWidth = 2 * ARROW_WIDTH; - - var arrowHead = paper.path("M0 0L-" + (ARROW_WIDTH / 2 + .5) + " -" + doubleArrowWidth + "L" + (ARROW_WIDTH/2 + .5) + " -" + doubleArrowWidth + "z"); - - // anti smoothing - if (this.strokeWidth%2 == 1) - line.x2 += .5, line.y2 += .5; - - arrowHead.transform("t" + line.x2 + "," + line.y2 + ""); - arrowHead.transform("...r" + Raphael.deg(line.angle - Math.PI / 2) + " " + 0 + " " + 0); - - arrowHead.attr("fill", "#585858"); - - arrowHead.attr("stroke-width", SEQUENCEFLOW_STROKE); - arrowHead.attr("stroke", "#585858"); - - return arrowHead; -} - -function _determineCustomFillColor(element, defaultColor) { - - var color; - - // By name - if (customActivityColors && customActivityColors[element.name]) { - color = customActivityColors[element.name]; - } - - if (color !== null && color !== undefined) { - return color; - } - - // By id - if (customActivityColors && customActivityColors[element.id]) { - color = customActivityColors[element.id]; - } - - if (color !== null && color !== undefined) { - return color; - } - - return defaultColor; -} diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/bpmn-icons.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/bpmn-icons.js deleted file mode 100644 index 88f38ed03..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/bpmn-icons.js +++ /dev/null @@ -1,303 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function _drawUserTaskIcon(paper, startX, startY) -{ - var path1 = paper.path("m 1,17 16,0 0,-1.7778 -5.333332,-3.5555 0,-1.7778 c 1.244444,0 1.244444,-2.3111 1.244444,-2.3111 l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c 0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17"); - path1.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#d1b575" - }); - - var userTaskIcon = paper.set(); - userTaskIcon.push(path1); - - userTaskIcon.transform("T" + startX + "," + startY); -} - -function _drawServiceTaskIcon(paper, startX, startY) -{ - var path1 = paper.path("M 8,1 7.5,2.875 c 0,0 -0.02438,0.250763 -0.40625,0.4375 C 7.05724,3.330353 7.04387,3.358818 7,3.375 6.6676654,3.4929791 6.3336971,3.6092802 6.03125,3.78125 6.02349,3.78566 6.007733,3.77681 6,3.78125 5.8811373,3.761018 5.8125,3.71875 5.8125,3.71875 l -1.6875,-1 -1.40625,1.4375 0.96875,1.65625 c 0,0 0.065705,0.068637 0.09375,0.1875 0.002,0.00849 -0.00169,0.022138 0,0.03125 C 3.6092802,6.3336971 3.4929791,6.6676654 3.375,7 3.3629836,7.0338489 3.3239228,7.0596246 3.3125,7.09375 3.125763,7.4756184 2.875,7.5 2.875,7.5 L 1,8 l 0,2 1.875,0.5 c 0,0 0.250763,0.02438 0.4375,0.40625 0.017853,0.03651 0.046318,0.04988 0.0625,0.09375 0.1129372,0.318132 0.2124732,0.646641 0.375,0.9375 -0.00302,0.215512 -0.09375,0.34375 -0.09375,0.34375 L 2.6875,13.9375 4.09375,15.34375 5.78125,14.375 c 0,0 0.1229911,-0.09744 0.34375,-0.09375 0.2720511,0.147787 0.5795915,0.23888 0.875,0.34375 0.033849,0.01202 0.059625,0.05108 0.09375,0.0625 C 7.4756199,14.874237 7.5,15.125 7.5,15.125 L 8,17 l 2,0 0.5,-1.875 c 0,0 0.02438,-0.250763 0.40625,-0.4375 0.03651,-0.01785 0.04988,-0.04632 0.09375,-0.0625 0.332335,-0.117979 0.666303,-0.23428 0.96875,-0.40625 0.177303,0.0173 0.28125,0.09375 0.28125,0.09375 l 1.65625,0.96875 1.40625,-1.40625 -0.96875,-1.65625 c 0,0 -0.07645,-0.103947 -0.09375,-0.28125 0.162527,-0.290859 0.262063,-0.619368 0.375,-0.9375 0.01618,-0.04387 0.04465,-0.05724 0.0625,-0.09375 C 14.874237,10.52438 15.125,10.5 15.125,10.5 L 17,10 17,8 15.125,7.5 c 0,0 -0.250763,-0.024382 -0.4375,-0.40625 C 14.669647,7.0572406 14.641181,7.0438697 14.625,7 14.55912,6.8144282 14.520616,6.6141566 14.4375,6.4375 c -0.224363,-0.4866 0,-0.71875 0,-0.71875 L 15.40625,4.0625 14,2.625 l -1.65625,1 c 0,0 -0.253337,0.1695664 -0.71875,-0.03125 l -0.03125,0 C 11.405359,3.5035185 11.198648,3.4455201 11,3.375 10.95613,3.3588185 10.942759,3.3303534 10.90625,3.3125 10.524382,3.125763 10.5,2.875 10.5,2.875 L 10,1 8,1 z m 1,5 c 1.656854,0 3,1.3431458 3,3 0,1.656854 -1.343146,3 -3,3 C 7.3431458,12 6,10.656854 6,9 6,7.3431458 7.3431458,6 9,6 z"); - path1.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#72a7d0" - }); - - var serviceTaskIcon = paper.set(); - serviceTaskIcon.push(path1); - - serviceTaskIcon.transform("T" + startX + "," + startY); -} - -function _drawScriptTaskIcon(paper, startX, startY) -{ - var path1 = paper.path("m 5,2 0,0.094 c 0.23706,0.064 0.53189,0.1645 0.8125,0.375 0.5582,0.4186 1.05109,1.228 1.15625,2.5312 l 8.03125,0 1,0 1,0 c 0,-3 -2,-3 -2,-3 l -10,0 z M 4,3 4,13 2,13 c 0,3 2,3 2,3 l 9,0 c 0,0 2,0 2,-3 L 15,6 6,6 6,5.5 C 6,4.1111 5.5595,3.529 5.1875,3.25 4.8155,2.971 4.5,3 4.5,3 L 4,3 z"); - path1.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#72a7d0" - }); - - var scriptTaskIcon = paper.set(); - scriptTaskIcon.push(path1); - - scriptTaskIcon.transform("T" + startX + "," + startY); -} - -function _drawBusinessRuleTaskIcon(paper, startX, startY) -{ - var path1 = paper.path("m 1,2 0,14 16,0 0,-14 z m 1.45458,5.6000386 2.90906,0 0,2.7999224 -2.90906,0 z m 4.36364,0 8.72718,0 0,2.7999224 -8.72718,0 z m -4.36364,4.1998844 2.90906,0 0,2.800116 -2.90906,0 z m 4.36364,0 8.72718,0 0,2.800116 -8.72718,0 z"); - path1.attr({ - "stroke": "none", - "fill": "#72a7d0" - }); - - var businessRuleTaskIcon = paper.set(); - businessRuleTaskIcon.push(path1); - - businessRuleTaskIcon.transform("T" + startX + "," + startY); -} - -function _drawSendTaskIcon(paper, startX, startY) -{ - var path1 = paper.path("M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15 L 17 15 L 12 10 L 9 13 L 6 10 z"); - path1.attr({ - "stroke": "none", - "fill": "#16964d" - }); - - var sendTaskIcon = paper.set(); - sendTaskIcon.push(path1); - - sendTaskIcon.transform("T" + startX + "," + startY); -} - -function _drawManualTaskIcon(paper, startX, startY) -{ - var path1 = paper.path("m 17,9.3290326 c -0.0069,0.5512461 -0.455166,1.0455894 -0.940778,1.0376604 l -5.792746,0 c 0.0053,0.119381 0.0026,0.237107 0.0061,0.355965 l 5.154918,0 c 0.482032,-0.0096 0.925529,0.49051 0.919525,1.037574 -0.0078,0.537128 -0.446283,1.017531 -0.919521,1.007683 l -5.245273,0 c -0.01507,0.104484 -0.03389,0.204081 -0.05316,0.301591 l 2.630175,0 c 0.454137,-0.0096 0.872112,0.461754 0.866386,0.977186 C 13.619526,14.554106 13.206293,15.009498 12.75924,15 L 3.7753054,15 C 3.6045812,15 3.433552,14.94423 3.2916363,14.837136 c -0.00174,0 -0.00436,0 -0.00609,0 C 1.7212035,14.367801 0.99998255,11.458641 1,11.458641 L 1,7.4588393 c 0,0 0.6623144,-1.316333 1.8390583,-2.0872584 1.1767614,-0.7711868 6.8053358,-2.40497 7.2587847,-2.8052901 0.453484,-0.40032 1.660213,1.4859942 0.04775,2.4010487 C 8.5332315,5.882394 8.507351,5.7996113 8.4370292,5.7936859 l 6.3569748,-0.00871 c 0.497046,-0.00958 0.952273,0.5097676 0.94612,1.0738232 -0.0053,0.556126 -0.456176,1.0566566 -0.94612,1.0496854 l -4.72435,0 c 0.01307,0.1149374 0.0244,0.2281319 0.03721,0.3498661 l 5.952195,0 c 0.494517,-0.00871 0.947906,0.5066305 0.940795,1.0679848 z"); - path1.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#d1b575" - }); - - var manualTaskIcon = paper.set(); - manualTaskIcon.push(path1); - - manualTaskIcon.transform("T" + startX + "," + startY); -} - -function _drawReceiveTaskIcon(paper, startX, startY) -{ - var path = paper.path("m 0.5,2.5 0,13 17,0 0,-13 z M 2,4 6.5,8.5 2,13 z M 4,4 14,4 9,9 z m 12,0 0,9 -4.5,-4.5 z M 7.5,9.5 9,11 10.5,9.5 15,14 3,14 z"); - path.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#16964d" - }); - - startX += 4; - startY += 2; - - path.transform("T" + startX + "," + startY); - -} - -function _drawCamelTaskIcon(paper, startX, startY) -{ - var path = paper.path("m 8.1878027,15.383782 c -0.824818,-0.3427 0.375093,-1.1925 0.404055,-1.7743 0.230509,-0.8159 -0.217173,-1.5329 -0.550642,-2.2283 -0.106244,-0.5273 -0.03299,-1.8886005 -0.747194,-1.7818005 -0.712355,0.3776 -0.9225,1.2309005 -1.253911,1.9055005 -0.175574,1.0874 -0.630353,2.114 -0.775834,3.2123 -0.244009,0.4224 -1.741203,0.3888 -1.554386,-0.1397 0.651324,-0.3302 1.13227,-0.9222 1.180246,-1.6705 0.0082,-0.7042 -0.133578,-1.3681 0.302178,-2.0083 0.08617,-0.3202 0.356348,-1.0224005 -0.218996,-0.8051 -0.694517,0.2372 -1.651062,0.6128 -2.057645,-0.2959005 -0.696769,0.3057005 -1.102947,-0.611 -1.393127,-1.0565 -0.231079,-0.6218 -0.437041,-1.3041 -0.202103,-1.9476 -0.185217,-0.7514 -0.39751099,-1.5209 -0.35214999,-2.301 -0.243425,-0.7796 0.86000899,-1.2456 0.08581,-1.8855 -0.76078999,0.1964 -1.41630099,-0.7569 -0.79351899,-1.2877 0.58743,-0.52829998 1.49031699,-0.242 2.09856399,-0.77049998 0.816875,-0.3212 1.256619,0.65019998 1.923119,0.71939998 0.01194,0.7333 -0.0031,1.5042 -0.18417,2.2232 -0.194069,0.564 -0.811196,1.6968 0.06669,1.9398 0.738382,-0.173 1.095723,-0.9364 1.659041,-1.3729 0.727298,-0.3962 1.093982,-1.117 1.344137,-1.8675 0.400558,-0.8287 1.697676,-0.6854 1.955367,0.1758 0.103564,0.5511 0.9073983,1.7538 1.2472763,0.6846 0.121868,-0.6687 0.785541,-1.4454 1.518183,-1.0431 0.813587,0.4875 0.658233,1.6033 1.285504,2.2454 0.768715,0.8117 1.745394,1.4801 2.196633,2.5469 0.313781,0.8074 0.568552,1.707 0.496624,2.5733 -0.35485,0.8576005 -1.224508,-0.216 -0.64725,-0.7284 0.01868,-0.3794 -0.01834,-1.3264 -0.370249,-1.3272 -0.123187,0.7586 -0.152778,1.547 -0.10869,2.3154 0.270285,0.6662005 1.310741,0.7653005 1.060553,1.6763005 -0.03493,0.9801 0.294343,1.9505 0.148048,2.9272 -0.320479,0.2406 -0.79575,0.097 -1.185062,0.1512 -0.165725,0.3657 -0.40138,0.921 -1.020848,0.6744 -0.564671,0.1141 -1.246404,-0.266 -0.578559,-0.7715 0.679736,-0.5602 0.898618,-1.5362 0.687058,-2.3673 -0.529674,-1.108 -1.275984,-2.0954005 -1.839206,-3.1831005 -0.634619,-0.1004 -1.251945,0.6779 -1.956789,0.7408 -0.6065893,-0.038 -1.0354363,-0.06 -0.8495673,0.6969005 0.01681,0.711 0.152396,1.3997 0.157345,2.1104 0.07947,0.7464 0.171287,1.4944 0.238271,2.2351 0.237411,1.0076 -0.687542,1.1488 -1.414811,0.8598 z m 6.8675483,-1.8379 c 0.114364,-0.3658 0.206751,-1.2704 -0.114466,-1.3553 -0.152626,0.5835 -0.225018,1.1888 -0.227537,1.7919 0.147087,-0.1166 0.265559,-0.2643 0.342003,-0.4366 z"); - path.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#bd4848" - }); - - startX += 4; - startY += 2; - - path.transform("T" + startX + "," + startY); - -} - -function _drawMuleTaskIcon(paper, startX, startY) -{ - var path = paper.path("M 8,0 C 3.581722,0 0,3.5817 0,8 c 0,4.4183 3.581722,8 8,8 4.418278,0 8,-3.5817 8,-8 L 16,7.6562 C 15.813571,3.3775 12.282847,0 8,0 z M 5.1875,2.7812 8,7.3437 10.8125,2.7812 c 1.323522,0.4299 2.329453,1.5645 2.8125,2.8438 1.136151,2.8609 -0.380702,6.4569 -3.25,7.5937 -0.217837,-0.6102 -0.438416,-1.2022 -0.65625,-1.8125 0.701032,-0.2274 1.313373,-0.6949 1.71875,-1.3125 0.73624,-1.2317 0.939877,-2.6305 -0.03125,-4.3125 l -2.75,4.0625 -0.65625,0 -0.65625,0 -2.75,-4 C 3.5268433,7.6916 3.82626,8.862 4.5625,10.0937 4.967877,10.7113 5.580218,11.1788 6.28125,11.4062 6.063416,12.0165 5.842837,12.6085 5.625,13.2187 2.755702,12.0819 1.238849,8.4858 2.375,5.625 2.858047,4.3457 3.863978,3.2112 5.1875,2.7812 z"); - path.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#bd4848" - }); - - startX += 4; - startY += 2; - - path.transform("T" + startX + "," + startY); - -} - -function _drawAlfrescoPublishTaskIcon(paper, startX, startY) -{ - - startX += 2; - startY += 2; - - var path = paper.path("M4.11870968,2.12890323 L6.12954839,0.117935484 L3.10993548,0.118064516 L3.10270968,0.118064516 C1.42941935,0.118064516 0.0729032258,1.47458065 0.0729032258,3.14774194 C0.0729032258,4.82116129 1.42929032,6.17754839 3.10258065,6.17754839 C3.22967742,6.17754839 3.35470968,6.16877419 3.47767742,6.15354839 C2.8163871,4.85083871 3.02954839,3.21793548 4.11870968,2.12890323M6.57032258,3.144 L6.57032258,0.300258065 L4.43522581,2.4356129 L4.43006452,2.44064516 C3.24683871,3.62387097 3.24683871,5.54219355 4.43006452,6.72541935 C5.61329032,7.90864516 7.5316129,7.90864516 8.71483871,6.72541935 C8.80464516,6.6356129 8.88529032,6.54025806 8.96154839,6.44270968 C7.57341935,5.98864516 6.57045161,4.68387097 6.57032258,3.144"); - path.attr({"fill": "#87C040"}); - - var startX1 = startX + 1.419355; - var startY1 = startY + 8.387097; - path.transform("T" + startX1 + "," + startY1); - - path = paper.path("M10.4411613,10.5153548 L8.43032258,8.50451613 L8.43032258,11.5313548 C8.43032258,13.2047742 9.78683871,14.5611613 11.460129,14.5611613 C13.1334194,14.5611613 14.4899355,13.2047742 14.4899355,11.5314839 C14.4899355,11.4043871 14.4811613,11.2793548 14.4659355,11.1563871 C13.1632258,11.8178065 11.5303226,11.6045161 10.4411613,10.5153548M15.0376774,5.91935484 C14.947871,5.82954839 14.8526452,5.74890323 14.7550968,5.67264516 C14.3010323,7.06064516 12.996129,8.06374194 11.4563871,8.06374194 L8.61277419,8.06374194 L10.7529032,10.204 C11.936129,11.3872258 13.8545806,11.3872258 15.0376774,10.204 C16.2209032,9.02077419 16.2209032,7.10245161 15.0376774,5.91935484"); - path.attr({"fill": "#87C040"}); - path.transform("T" + startX + "," + startY); - - path = paper.path("M5.9083871,1.5636129 C5.78129032,1.5636129 5.65625806,1.57225806 5.53329032,1.58748387 C6.19458065,2.89032258 5.98141935,4.52309677 4.89225806,5.61225806 L2.88154839,7.62309677 L5.9083871,7.62309677 C7.58154839,7.62309677 8.93806452,6.26658065 8.93806452,4.59329032 C8.93819355,2.92 7.58167742,1.5636129 5.9083871,1.5636129"); - path.attr({"fill": "#ED9A2D"}); - var startX2 = startX + 5.548387; - path.transform("T" + startX2 + "," + startY); - path = paper.path("M4.58090323,1.0156129 C3.39767742,-0.167483871 1.47935484,-0.167483871 0.296129032,1.01574194 C0.206451613,1.10554839 0.125806452,1.20077419 0.0495483871,1.29845161 C1.43754839,1.75251613 2.44064516,3.05729032 2.44064516,4.59703226 L2.44064516,7.44077419 L4.57574194,5.30554839 L4.58090323,5.30051613 C5.76412903,4.11729032 5.76412903,2.19896774 4.58090323,1.0156129"); - path.attr({"fill": "#5698C6"}); - path.transform("T" + startX2 + "," + startY); - - path = paper.path("M5.54051613,5.61432258 L5.62670968,5.70425806 L7.54632258,7.62387097 L7.5483871,7.62387097 L7.5483871,4.604 L7.5483871,4.59677419 C7.5483871,2.92348387 6.19187097,1.56696774 4.51858065,1.56696774 C2.84529032,1.56696774 1.48877419,2.92335484 1.48890323,4.59664516 C1.48890323,4.72348387 1.49754839,4.84812903 1.51264516,4.97083871 C2.81625806,4.30993548 4.45122581,4.52503226 5.54051613,5.61432258M1.23251613,10.4292903 C1.25625806,10.3588387 1.28180645,10.2894194 1.30980645,10.2210323 C1.31329032,10.2123871 1.3163871,10.2036129 1.32,10.1952258 C1.35070968,10.1216774 1.38451613,10.0500645 1.42,9.97935484 C1.42774194,9.96374194 1.43574194,9.9483871 1.44387097,9.93277419 C1.4803871,9.86258065 1.51883871,9.79354839 1.55987097,9.72632258 C1.56425806,9.71909677 1.56903226,9.71225806 1.57341935,9.70529032 C1.6123871,9.64245161 1.65354839,9.58141935 1.6963871,9.52141935 C1.70516129,9.50903226 1.71380645,9.49651613 1.72283871,9.48425806 C1.76890323,9.42154839 1.81690323,9.36064516 1.86683871,9.30129032 C1.87703226,9.28916129 1.88735484,9.27741935 1.89780645,9.26567742 C1.94658065,9.20916129 1.99690323,9.15406452 2.04916129,9.10090323 C2.05380645,9.09625806 2.05806452,9.09135484 2.06270968,9.08670968 C2.11832258,9.03083871 2.17625806,8.97741935 2.23548387,8.92554839 C2.2483871,8.91419355 2.26129032,8.90296774 2.27432258,8.89187097 C2.33393548,8.84103226 2.39496774,8.79212903 2.45780645,8.74529032 C2.46606452,8.73922581 2.47470968,8.73354839 2.48296774,8.7276129 C2.54167742,8.68490323 2.60180645,8.64412903 2.66322581,8.60503226 C2.67535484,8.59729032 2.68735484,8.58929032 2.6996129,8.58167742 C2.76593548,8.54064516 2.83380645,8.50206452 2.90296774,8.46541935 C2.91754839,8.45780645 2.93225806,8.45045161 2.94696774,8.44296774 C3.016,8.40774194 3.08593548,8.37406452 3.15741935,8.34348387 C3.16090323,8.34206452 3.16425806,8.3403871 3.16774194,8.33883871 C3.24167742,8.30748387 3.31729032,8.27948387 3.39380645,8.25316129 C3.41032258,8.24748387 3.42670968,8.24180645 3.44335484,8.2363871 C3.51909677,8.21174194 3.59587097,8.18903226 3.67380645,8.16929032 C3.68567742,8.16645161 3.69793548,8.16387097 3.70980645,8.16116129 C3.78206452,8.14374194 3.85509677,8.12877419 3.92890323,8.116 C3.94270968,8.11367742 3.9563871,8.11083871 3.97019355,8.10877419 C4.05032258,8.09587097 4.13148387,8.08619355 4.21329032,8.07896774 C4.23096774,8.07741935 4.24877419,8.07625806 4.26645161,8.07483871 C4.35109677,8.06877419 4.43612903,8.06451613 4.52232258,8.06451613 L7.36606452,8.0643871 L5.22580645,5.92412903 C4.04258065,4.74103226 2.12412903,4.74090323 0.941032258,5.92412903 C-0.242193548,7.10735484 -0.242193548,9.02567742 0.941032258,10.2089032 C1.03070968,10.2985806 1.12464516,10.3814194 1.22206452,10.4575484 C1.22529032,10.448 1.22929032,10.4388387 1.23251613,10.4292903"); - path.attr({"fill": "#5698C6"}); - path.transform("T" + startX + "," + startY); - - path = paper.path("M5.23290323,5.92412903 L6.92748387,7.61870968 L4.64980645,7.61870968 L4.52064516,7.62141935 C3.13354839,7.62141935 1.96425806,6.68929032 1.60477419,5.41729032 C2.75870968,4.77019355 4.24619355,4.93754839 5.22787097,5.91909677 L5.23290323,5.92412903M7.54722581,4.59612903 L7.54722581,6.99264516 L5.93664516,5.38206452 L5.84348387,5.29264516 C4.86258065,4.31187097 4.69483871,2.82580645 5.34012903,1.67225806 C6.61367742,2.03070968 7.54722581,3.20090323 7.54722581,4.58890323 L7.54722581,4.59612903M10.1385806,5.29819355 L8.444,6.99290323 L8.444,4.71522581 L8.44129032,4.58606452 C8.44129032,3.19896774 9.37341935,2.02954839 10.6454194,1.67019355 C11.2925161,2.82412903 11.1251613,4.3116129 10.1436129,5.29316129 L10.1385806,5.29819355"); - path.attr({"fill": "#446BA5"}); - path.transform("T" + startX + "," + startY); - - path = paper.path("M11.4548387,7.61677419 L9.05832258,7.61677419 L10.6689032,6.00619355 L10.7583226,5.91303226 C11.7390968,4.93212903 13.2251613,4.7643871 14.3787097,5.40967742 C14.0202581,6.68322581 12.8500645,7.61677419 11.4620645,7.61677419 L11.4548387,7.61677419"); - path.attr({"fill": "#FFF101"}); - path.transform("T" + startX + "," + startY); - - path = paper.path("M10.7470968,10.192 L9.05251613,8.49741935 L11.3301935,8.49741935 L11.4593548,8.49470968 C12.8464516,8.49483871 14.0157419,9.42696774 14.3752258,10.6989677 C13.2211613,11.3459355 11.7338065,11.1787097 10.752129,10.1970323 L10.7470968,10.192M8.43729032,11.5174194 L8.43729032,9.12090323 L10.047871,10.7314839 L10.1411613,10.8209032 C11.1219355,11.8018065 11.2896774,13.2876129 10.6443871,14.4412903 C9.37083871,14.0828387 8.43729032,12.9127742 8.43729032,11.5245161 L8.43729032,11.5174194M5.86193548,10.8296774 L7.55651613,9.13496774 L7.55651613,11.4126452 L7.55922581,11.5418065 C7.55922581,12.9289032 6.62709677,14.0983226 5.35509677,14.4578065 C4.708,13.3036129 4.87535484,11.8162581 5.85690323,10.8347097 L5.86193548,10.8296774M4.53251613,8.50993548 L6.92903226,8.50993548 L5.31845161,10.1205161 L5.22903226,10.2136774 C4.24812903,11.1945806 2.76219355,11.3623226 1.60851613,10.7170323 C1.96709677,9.44335484 3.13716129,8.50993548 4.52529032,8.50993548 L4.53251613,8.50993548"); - path.attr({"fill": "#45AB47"}); - path.transform("T" + startX + "," + startY); -} - -function _drawHttpTaskIcon(paper, startX, startY) -{ - var path = paper.path("m 16.704699,5.9229055 q 0.358098,0 0.608767,0.2506681 0.250669,0.250668 0.250669,0.6087677 0,0.3580997 -0.250669,0.6087677 -0.250669,0.2506679 -0.608767,0.2506679 -0.358098,0 -0.608767,-0.2506679 -0.250669,-0.250668 -0.250669,-0.6087677 0,-0.3580997 0.250669,-0.6087677 0.250669,-0.2506681 0.608767,-0.2506681 z m 2.578308,-2.0053502 q -2.229162,0 -3.854034,0.6759125 -1.624871,0.6759067 -3.227361,2.2694472 -0.716197,0.725146 -1.575633,1.7457293 L 7.2329969,8.7876913 Q 7.0897576,8.8055849 7.000233,8.9309334 L 4.9948821,12.368677 q -0.035811,0.06267 -0.035811,0.143242 0,0.107426 0.080572,0.205905 l 0.5729577,0.572957 q 0.125334,0.116384 0.2864786,0.07162 l 2.4708789,-0.760963 2.5156417,2.515645 -0.76096,2.470876 q -0.009,0.02687 -0.009,0.08057 0,0.125338 0.08058,0.205905 l 0.572957,0.572958 q 0.170096,0.152194 0.349146,0.04476 l 3.437744,-2.005351 q 0.125335,-0.08953 0.143239,-0.232763 l 0.17905,-3.392986 q 1.02058,-0.859435 1.745729,-1.575629 1.67411,-1.6830612 2.309735,-3.2049805 0.635625,-1.5219191 0.635625,-3.8585111 0,-0.1253369 -0.08505,-0.2148575 -0.08505,-0.089526 -0.201431,-0.089526 z"); - path.attr({ - "opacity": 1, - "stroke": "none", - "fill": "#16964d" - }); - - startX += -2; - startY += -2; - - path.transform("T" + startX + "," + startY); - -} - -function _drawEventIcon(paper, element) -{ - if (element.eventDefinition && element.eventDefinition.type) - { - if ("timer" === element.eventDefinition.type) - { - _drawTimerIcon(paper, element); - } - else if ("error" === element.eventDefinition.type) - { - _drawErrorIcon(paper, element); - } - else if ("signal" === element.eventDefinition.type) - { - _drawSignalIcon(paper, element); - } - else if ("message" === element.eventDefinition.type) - { - _drawMessageIcon(paper, element); - } - } -} - -function _drawTimerIcon(paper, element) -{ - var x = element.x + (element.width / 2); - var y = element.y + (element.height / 2); - - var circle = paper.circle(x, y, 10); - - circle.attr({"stroke-width": 1, - "stroke": "black", - "fill": "none" - }); - - var path = paper.path("M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20 10 C 20 4.4771525 15.522847 1.1842379e-15 10 0 z M 9.09375 1.03125 C 9.2292164 1.0174926 9.362825 1.0389311 9.5 1.03125 L 9.5 3.5 L 10.5 3.5 L 10.5 1.03125 C 15.063526 1.2867831 18.713217 4.9364738 18.96875 9.5 L 16.5 9.5 L 16.5 10.5 L 18.96875 10.5 C 18.713217 15.063526 15.063526 18.713217 10.5 18.96875 L 10.5 16.5 L 9.5 16.5 L 9.5 18.96875 C 4.9364738 18.713217 1.2867831 15.063526 1.03125 10.5 L 3.5 10.5 L 3.5 9.5 L 1.03125 9.5 C 1.279102 5.0736488 4.7225326 1.4751713 9.09375 1.03125 z M 9.5 5 L 9.5 8.0625 C 8.6373007 8.2844627 8 9.0680195 8 10 C 8 11.104569 8.8954305 12 10 12 C 10.931981 12 11.715537 11.362699 11.9375 10.5 L 14 10.5 L 14 9.5 L 11.9375 9.5 C 11.756642 8.7970599 11.20294 8.2433585 10.5 8.0625 L 10.5 5 L 9.5 5 z"); - path.attr({ - "stroke": "none", - "fill": "#585858" - }); - path.transform("T" + (element.x + 5) + "," + (element.y + 5)); - return path; -} - -function _drawErrorIcon(paper, element) -{ - var path = paper.path("M 22.820839,11.171502 L 19.36734,24.58992 L 13.54138,14.281819 L 9.3386512,20.071607 L 13.048949,6.8323057 L 18.996148,16.132659 L 22.820839,11.171502 z"); - - var fill = "none"; - var x = element.x - 1; - var y = element.y - 1; - if (element.type === "EndEvent") - { - fill = "black"; - x -= 1; - y -= 1; - } - - path.attr({ - "stroke": "black", - "stroke-width": 1, - "fill": fill - }); - - path.transform("T" + x + "," + y); - return path; -} - -function _drawSignalIcon(paper, element) -{ - var fill = "none"; - if (element.type === "ThrowEvent") - { - fill = "black"; - } - - var path = paper.path("M 8.7124971,21.247342 L 23.333334,21.247342 L 16.022915,8.5759512 L 8.7124971,21.247342 z"); - path.attr({ - "stroke": "black", - "stroke-width": 1, - "fill": fill - }); - path.transform("T" + (element.x - 1) + "," + (element.y - 1)); - return path; -} - -function _drawMessageIcon(paper, element) -{ - var path = paper.path("M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15 L 17 15 L 12 10 L 9 13 L 6 10 z"); - path.attr({ - "stroke": "none", - "stroke-width": 1, - "fill": "#585858" - }); - path.transform("T" + (element.x + 6) + "," + (element.y + 6)); - return path; -} \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.css b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.css deleted file mode 100644 index 272b25851..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.css +++ /dev/null @@ -1,24 +0,0 @@ -div[class*='ui-tooltip-kisbpm-'] { - background-color: #ffffff; - border-color: #c5c5c5; - color: #4a4a4a; - font-family: Verdana; - font-size: 12px; -} - -div[class*='ui-tooltip-kisbpm-'] .qtip-content { - color: #4a4a4a; - background-color: #ffffff; - font-family: Verdana; - font-size: 12px; -} - -.ui-tooltip-kisbpm-bpmn .qtip-titlebar { - color: #FFFFFF; - font-size: 12px; - background: #2B414F; -} - -.ui-tooltip-kisbpm-bpmn .qtip-tip { - background-color: #2B414F; -} diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.html b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.html deleted file mode 100644 index d1a095dd5..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.js deleted file mode 100644 index bad3f79bc..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/displaymodel.js +++ /dev/null @@ -1,317 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var NORMAL_STROKE = 1; -var SEQUENCEFLOW_STROKE = 1.5; -var ASSOCIATION_STROKE = 2; -var TASK_STROKE = 1; -var TASK_HIGHLIGHT_STROKE = 2; -var CALL_ACTIVITY_STROKE = 2; -var ENDEVENT_STROKE = 3; - -var COMPLETED_COLOR= "#2632aa"; -var TEXT_COLOR= "#373e48"; -var CURRENT_COLOR= "#017501"; -var HOVER_COLOR= "#666666"; -var ACTIVITY_STROKE_COLOR = "#bbbbbb"; -var ACTIVITY_FILL_COLOR = "#f9f9f9"; -var MAIN_STROKE_COLOR = "#585858"; - -var TEXT_PADDING = 3; -var ARROW_WIDTH = 4; -var MARKER_WIDTH = 12; - -var TASK_FONT = {font: "11px Arial", opacity: 1, fill: Raphael.rgb(0, 0, 0)}; - -// icons -var ICON_SIZE = 16; -var ICON_PADDING = 4; - -var INITIAL_CANVAS_WIDTH; -var INITIAL_CANVAS_HEIGHT; - -var paper; -var viewBox; -var viewBoxWidth; -var viewBoxHeight; - -var canvasWidth; -var canvasHeight; - -var modelDiv = jQuery('#bpmnModel'); -var modelId = modelDiv.attr('data-model-id'); -var historyModelId = modelDiv.attr('data-history-id'); -var processDefinitionId = modelDiv.attr('data-process-definition-id'); -var modelType = modelDiv.attr('data-model-type'); - -// Support for custom background colors for activities -var customActivityColors = modelDiv.attr('data-activity-color-mapping'); -if (customActivityColors !== null && customActivityColors !== undefined && customActivityColors.length > 0) { - // Stored on the attribute as a string - customActivityColors = JSON.parse(customActivityColors); -} - -var customActivityToolTips = modelDiv.attr('data-activity-tooltips'); -if (customActivityToolTips !== null && customActivityToolTips !== undefined && customActivityToolTips.length > 0) { - // Stored on the attribute as a string - customActivityToolTips = JSON.parse(customActivityToolTips); -} - -// Support for custom opacity for activity backgrounds -var customActivityBackgroundOpacity = modelDiv.attr('data-activity-opacity'); - -var elementsAdded = new Array(); -var elementsRemoved = new Array(); - -function _showTip(htmlNode, element) -{ - - // Custom tooltip - var documentation = undefined; - if (customActivityToolTips) { - if (customActivityToolTips[element.name]) { - documentation = customActivityToolTips[element.name]; - } else if (customActivityToolTips[element.id]) { - documentation = customActivityToolTips[element.id]; - } else { - documentation = ''; // Show nothing if custom tool tips are enabled - } - } - - // Default tooltip, no custom tool tip set - if (documentation === undefined) { - var documentation = ""; - if (element.name && element.name.length > 0) { - documentation += "Name: " + element.name + "

"; - } - - if (element.properties) { - for (var i = 0; i < element.properties.length; i++) { - var propName = element.properties[i].name; - if (element.properties[i].type && element.properties[i].type === 'list') { - documentation += '' + propName + ':
'; - for (var j = 0; j < element.properties[i].value.length; j++) { - documentation += '' + element.properties[i].value[j] + '
'; - } - } - else { - documentation += '' + propName + ': ' + element.properties[i].value + '
'; - } - } - } - } - - var text = element.type + " "; - if (element.name && element.name.length > 0) - { - text += element.name; - } - else - { - text += element.id; - } - - htmlNode.qtip({ - content: { - text: documentation, - title: { - text: text - } - }, - position: { - my: 'top left', - at: 'bottom center', - viewport: jQuery('#bpmnModel') - }, - hide: { - fixed: true, delay: 500, - event: 'click mouseleave' - }, - style: { - classes: 'ui-tooltip-kisbpm-bpmn' - } - }); -} - -function _addHoverLogic(element, type, defaultColor) -{ - var strokeColor = _bpmnGetColor(element, defaultColor); - var topBodyRect = null; - if (type === "rect") - { - topBodyRect = paper.rect(element.x, element.y, element.width, element.height); - } - else if (type === "circle") - { - var x = element.x + (element.width / 2); - var y = element.y + (element.height / 2); - topBodyRect = paper.circle(x, y, 15); - } - else if (type === "rhombus") - { - topBodyRect = paper.path("M" + element.x + " " + (element.y + (element.height / 2)) + - "L" + (element.x + (element.width / 2)) + " " + (element.y + element.height) + - "L" + (element.x + element.width) + " " + (element.y + (element.height / 2)) + - "L" + (element.x + (element.width / 2)) + " " + element.y + "z" - ); - } - - var opacity = 0; - var fillColor = "#ffffff"; - if (jQuery.inArray(element.id, elementsAdded) >= 0) - { - opacity = 0.2; - fillColor = "green"; - } - - if (jQuery.inArray(element.id, elementsRemoved) >= 0) - { - opacity = 0.2; - fillColor = "red"; - } - - topBodyRect.attr({ - "opacity": opacity, - "stroke" : "none", - "fill" : fillColor - }); - _showTip(jQuery(topBodyRect.node), element); - - topBodyRect.mouseover(function() { - paper.getById(element.id).attr({"stroke":HOVER_COLOR}); - }); - - topBodyRect.mouseout(function() { - paper.getById(element.id).attr({"stroke":strokeColor}); - }); -} - -function _zoom(zoomIn) -{ - var tmpCanvasWidth, tmpCanvasHeight; - if (zoomIn) - { - tmpCanvasWidth = canvasWidth * (1.0/0.90); - tmpCanvasHeight = canvasHeight * (1.0/0.90); - } - else - { - tmpCanvasWidth = canvasWidth * (1.0/1.10); - tmpCanvasHeight = canvasHeight * (1.0/1.10); - } - - if (tmpCanvasWidth != canvasWidth || tmpCanvasHeight != canvasHeight) - { - canvasWidth = tmpCanvasWidth; - canvasHeight = tmpCanvasHeight; - paper.setSize(canvasWidth, canvasHeight); - } -} - -var modelUrl; - -if (modelType == 'runtime') { - if (historyModelId) { - modelUrl = FLOWABLE.CONFIG.contextRoot + '/app/rest/process-instances/history/' + historyModelId + '/model-json'; - } else { - modelUrl = FLOWABLE.CONFIG.contextRoot + '/app/rest/process-instances/' + modelId + '/model-json'; - } -} else if (modelType == 'design') { - if (historyModelId) { - modelUrl = FLOWABLE.CONFIG.contextRoot + '/app/rest/models/' + modelId + '/history/' + historyModelId + '/model-json'; - } else { - modelUrl = FLOWABLE.CONFIG.contextRoot + '/app/rest/models/' + modelId + '/model-json'; - } -} else if (modelType == 'process-definition') { - modelUrl = FLOWABLE.CONFIG.contextRoot + '/app/rest/process-definitions/' + processDefinitionId + '/model-json'; -} - -var request = jQuery.ajax({ - type: 'get', - url: modelUrl + '?nocaching=' + new Date().getTime() -}); - -request.success(function(data, textStatus, jqXHR) { - - if ((!data.elements || data.elements.length == 0) && (!data.pools || data.pools.length == 0)) return; - - INITIAL_CANVAS_WIDTH = data.diagramWidth; - - if (modelType == 'design') { - INITIAL_CANVAS_WIDTH += 20; - } else { - INITIAL_CANVAS_WIDTH += 30; - } - - INITIAL_CANVAS_HEIGHT = data.diagramHeight + 50; - canvasWidth = INITIAL_CANVAS_WIDTH; - canvasHeight = INITIAL_CANVAS_HEIGHT; - viewBoxWidth = INITIAL_CANVAS_WIDTH; - viewBoxHeight = INITIAL_CANVAS_HEIGHT; - - if (modelType == 'design') { - var headerBarHeight = 170; - var offsetY = 0; - if (jQuery(window).height() > (canvasHeight + headerBarHeight)) - { - offsetY = (jQuery(window).height() - headerBarHeight - canvasHeight) / 2; - } - - if (offsetY > 50) { - offsetY = 50; - } - - jQuery('#bpmnModel').css('marginTop', offsetY); - } - - jQuery('#bpmnModel').width(INITIAL_CANVAS_WIDTH); - jQuery('#bpmnModel').height(INITIAL_CANVAS_HEIGHT); - paper = Raphael(document.getElementById('bpmnModel'), canvasWidth, canvasHeight); - paper.setViewBox(0, 0, viewBoxWidth, viewBoxHeight, false); - paper.renderfix(); - - if (data.pools) - { - for (var i = 0; i < data.pools.length; i++) - { - var pool = data.pools[i]; - _drawPool(pool); - } - } - - var modelElements = data.elements; - for (var i = 0; i < modelElements.length; i++) - { - var element = modelElements[i]; - //try { - var drawFunction = eval("_draw" + element.type); - drawFunction(element); - //} catch(err) {console.log(err);} - } - - if (data.flows) - { - for (var i = 0; i < data.flows.length; i++) - { - var flow = data.flows[i]; - if (flow.type === 'sequenceFlow') { - _drawFlow(flow); - } else if (flow.type === 'association') { - _drawAssociation(flow); - } - } - } -}); - -request.error(function(jqXHR, textStatus, errorThrown) { - alert("error"); -}); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/jquery.qtip.min.css b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/jquery.qtip.min.css deleted file mode 100644 index aef428dcc..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/jquery.qtip.min.css +++ /dev/null @@ -1,2 +0,0 @@ -/* qTip2 v2.2.0 basic css3 | qtip2.com | Licensed MIT, GPL | Wed Dec 18 2013 05:02:24 */ -.qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;cursor:pointer;outline:medium none;border-width:1px;border-style:solid;border-color:transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-titlebar .ui-icon,.qtip-icon .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:transparent none no-repeat -100em -100em}.qtip-focus{}.qtip-hover{}.qtip-default{border-width:1px;border-style:solid;border-color:#F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111} .qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1} .qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030} .qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0} .qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon{border-color:#D95252}.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252} .qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0} .qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-rounded,.qtip-tipsy,.qtip-bootstrap{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.qtip-rounded .qtip-titlebar{-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.qtip-youtube{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 3px #333;-moz-box-shadow:0 0 3px #333;box-shadow:0 0 3px #333;color:#fff;border-width:0;background:#4A4A4A;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,#000));background-image:-webkit-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-moz-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-ms-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:#4A4A4A;background-color:rgba(0,0,0,0)}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-webkit-gradient(linear,left top,left bottom,from(#717171),to(#232323));background-image:-moz-linear-gradient(top,#717171,#232323);background-image:-webkit-linear-gradient(top,#717171,#232323);background-image:-ms-linear-gradient(top,#717171,#232323);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 12px #333;-moz-box-shadow:0 0 12px #333;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323)"}.qtip-jtools .qtip-titlebar,.qtip-jtools .qtip-content{background:transparent;color:#fff;border:0 dashed transparent}.qtip-jtools .qtip-icon{border-color:#555}.qtip-jtools .qtip-titlebar .ui-state-hover{border-color:#333}.qtip-cluetip{-webkit-box-shadow:4px 4px 5px rgba(0,0,0,.4);-moz-box-shadow:4px 4px 5px rgba(0,0,0,.4);box-shadow:4px 4px 5px rgba(0,0,0,.4);background-color:#D9D9C2;color:#111;border:0 dashed transparent}.qtip-cluetip .qtip-titlebar{background-color:#87876A;color:#fff;border:0 dashed transparent}.qtip-cluetip .qtip-icon{border-color:#808064}.qtip-cluetip .qtip-titlebar .ui-state-hover{border-color:#696952;color:#696952}.qtip-tipsy{background:#000;background:rgba(0,0,0,.87);color:#fff;border:0 solid transparent;font-size:11px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px;text-shadow:0 1px #000}.qtip-tipsy .qtip-titlebar{padding:6px 35px 0 10px;background-color:transparent}.qtip-tipsy .qtip-content{padding:6px 10px}.qtip-tipsy .qtip-icon{border-color:#222;text-shadow:none}.qtip-tipsy .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-tipped{border:3px solid #959FA9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#F9F9F9;color:#454545;font-weight:400;font-family:serif}.qtip-tipped .qtip-titlebar{border-bottom-width:0;color:#fff;background:#3A79B8;background-image:-webkit-gradient(linear,left top,left bottom,from(#3A79B8),to(#2E629D));background-image:-webkit-linear-gradient(top,#3A79B8,#2E629D);background-image:-moz-linear-gradient(top,#3A79B8,#2E629D);background-image:-ms-linear-gradient(top,#3A79B8,#2E629D);background-image:-o-linear-gradient(top,#3A79B8,#2E629D);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D)"}.qtip-tipped .qtip-icon{border:2px solid #285589;background:#285589}.qtip-tipped .qtip-icon .ui-icon{background-color:#FBFBFB;color:#555}.qtip-bootstrap{font-size:14px;line-height:20px;color:#333;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.qtip-bootstrap .qtip-titlebar{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.qtip-bootstrap .qtip-titlebar .qtip-close{right:11px;top:45%;border-style:none}.qtip-bootstrap .qtip-content{padding:9px 14px}.qtip-bootstrap .qtip-icon{background:transparent}.qtip-bootstrap .qtip-icon .ui-icon{width:auto;height:auto;float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.qtip-bootstrap .qtip-icon .ui-icon:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.qtip:not(.ie9haxors) div.qtip-content,.qtip:not(.ie9haxors) div.qtip-titlebar{filter:none;-ms-filter:none}.qtip .qtip-tip{margin:0 auto;overflow:hidden;z-index:10}x:-o-prefocus,.qtip .qtip-tip{visibility:hidden}.qtip .qtip-tip,.qtip .qtip-tip .qtip-vml,.qtip .qtip-tip canvas{position:absolute;color:#123456;background:transparent;border:0 dashed transparent}.qtip .qtip-tip canvas{top:0;left:0}.qtip .qtip-tip .qtip-vml{behavior:url(#default#VML);display:inline-block;visibility:visible}#qtip-overlay{position:fixed;left:0;top:0;width:100%;height:100%}#qtip-overlay.blurs{cursor:pointer}#qtip-overlay div{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;filter:alpha(opacity=70);-ms-filter:"alpha(Opacity=70)"} \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/jquery.qtip.min.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/jquery.qtip.min.js deleted file mode 100644 index 25bf4243e..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/jquery.qtip.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* qTip2 v2.2.0 tips viewport svg modal | qtip2.com | Licensed MIT, GPL | Wed Dec 18 2013 05:02:22 */ - -!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=F,this.elements={target:a},this._id=S+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:E,attr:e,onTooltip:E,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=E}function f(a){return a===F||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?E:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?E:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==E,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,F,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||E)&&(b.title=E))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===D?{ready:D}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(R,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d0?setTimeout(d.proxy(a,this),b):(a.call(this),void 0)}function n(a){return this.tooltip.hasClass(ab)?E:(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=m.call(this,function(){this.toggle(D,a)},this.options.show.delay),void 0)}function o(a){if(this.tooltip.hasClass(ab))return E;var b=d(a.relatedTarget),c=b.closest(W)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=m.call(this,function(){this.toggle(E,a)},this.options.hide.delay,this)}function p(a){return this.tooltip.hasClass(ab)||!this.options.hide.inactive?E:(clearTimeout(this.timers.inactive),this.timers.inactive=m.call(this,function(){this.hide(a)},this.options.hide.inactive),void 0)}function q(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function r(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(hb+" "))+hb,function(){var a=y.api[d.attr(this,U)];a&&!a.disabled&&e.apply(a,arguments)})}function s(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):F,p="html5"===f.metadata.type&&o?o[f.metadata.name]:F,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(D,{},y.defaults,f,"object"==typeof q?h(q):F,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===E||!j)return E;k.content.text=j}if(i.container.length||(i.container=m),i.target===E&&(i.target=n),k.show.target===E&&(k.show.target=n),k.show.solo===D&&(k.show.solo=i.container.closest("body")),k.hide.target===E&&(k.hide.target=n),k.position.viewport===D&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new A(i.at,D),i.my=new A(i.my),a.data(S))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===E)return E;return a.attr(T,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(cb,l).attr("title",""),g=new e(a,k,c,!!j),a.data(S,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(S))&&a.destroy(!0)}),g}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function u(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+sb.join(f+" ")+f).split(" "),h=0;if(rb[b])return a.css(rb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return rb[b]=d,e}function v(a,b){return Math.ceil(parseFloat(u(a,b)))}function w(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}function x(a,b){this.options=b,this._ns="-modal",this.init(this.qtip=a)}var y,z,A,B,C,D=!0,E=!1,F=null,G="x",H="y",I="width",J="height",K="top",L="left",M="bottom",N="right",O="center",P="flipinvert",Q="shift",R={},S="qtip",T="data-hasqtip",U="data-qtip-id",V=["ui-widget","ui-tooltip"],W="."+S,X="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Y=S+"-fixed",Z=S+"-default",$=S+"-focus",_=S+"-hover",ab=S+"-disabled",bb="_replacedByqTip",cb="oldtitle",db={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="")&&c.getElementsByTagName("i")[0];);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||E};z=e.prototype,z._when=function(a){return d.when.apply(d,a)},z.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=g.tooltip=b=d("
",{id:this._id,"class":[S,Z,e.style.classes,S+"-pos-"+e.position.my.abbrev()].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":E,"aria-describedby":this._id+"-content","aria-hidden":D}).toggleClass(ab,this.disabled).attr(U,this.id).data(S,this).appendTo(k.container).append(g.content=d("
",{"class":S+"-content",id:this._id+"-content","aria-atomic":D})),this.rendered=-1,this.positioning=D,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,E))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,E)),this.rendered=D,this._setWidget(),d.each(R,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=E,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(D,f.event,E),c.hiddenDuringWait=E}),y.api[this.id]=this,this},z.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=D;var a=this.target,b=a.attr(cb);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(S).removeAttr(U).removeAttr(T).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(cb),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=F,delete y.api[this.id]}}return this.destroyed?this.target:(a===D&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},B=z.checks={builtin:{"^id$":function(a,b,c,e){var f=c===D?y.nextid:c,g=S+"-"+f;f!==E&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),this._updateTitle(c),void 0):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new A(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(D)||this.toggle(D))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass(Z,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},z.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var eb=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,fb=/^prerender|show\.ready/i;z.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=E,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&fb.test(b))return delete a[b],void 0;var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=eb.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=D,d.each(a,d.proxy(j,this)),this.positioning=E,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?F:this.cache.event),this},z._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=D,a.then(function(a){return e.waiting=E,c._update(a,b)},F,function(a){return c._update(a,b)})):a===E||!a&&""!==a?E:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){a.images&&a.images.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):E},z._waitForContent=function(a){var b=this.cache;return b.waiting=D,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=E}).promise()},z._updateContent=function(a,b){this._update(a,this.elements.content,b)},z._updateTitle=function(a,b){this._update(a,this.elements.title,b)===E&&this._removeTitle(E)},z._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("
",{"class":S+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("
",{id:b,"class":S+"-title","aria-atomic":D})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},z._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=F,a!==E&&this.reposition())},z.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=D;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(E),s=i.outerHeight(E),t=0,u=0,v=i.css("position"),w={left:0,top:0},x=i[0].offsetWidth>0,y=c&&"scroll"===c.type,z=d(a),A=o[0].ownerDocument,B=this.mouse;if(d.isArray(k)&&2===k.length)m={x:L,y:K},w={left:k[0],top:k[1]};else if("mouse"===k)m={x:L,y:K},!B||!B.pageX||!p.mouse&&c&&c.pageX?c&&c.pageX||((!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?c=h.origin:(!c||c&&("resize"===c.type||"scroll"===c.type))&&(c=h.event)):c=B,"static"!==v&&(w=o.offset()),A.body.offsetWidth!==(a.innerWidth||A.documentElement.clientWidth)&&(g=d(b.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&y&&B&&(w.left-=(B.scrollX||0)-z.scrollLeft(),w.top-=(B.scrollY||0)-z.scrollTop());else{if("event"===k?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):c.target||(h.target=this.elements.target):"event"!==k&&(h.target=d(k.jquery?k:this.elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=db.iOS?a.innerWidth:k.width(),u=db.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):R.imagemap&&k.is("area")?f=R.imagemap(this,k,m,R.viewport?q:E):R.svg&&k&&k[0].ownerSVGElement?f=R.svg(this,k,m,R.viewport?q:E):(t=k.outerWidth(E),u=k.outerHeight(E),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(db.iOS>3.1&&db.iOS<4.1||db.iOS>=4.3&&db.iOS<4.33||!db.iOS&&"fixed"===v)&&(w.left-=z.scrollLeft(),w.top-=z.scrollTop()),(!f||f&&f.adjustable!==E)&&(w.left+=m.x===N?t:m.x===O?t/2:0,w.top+=m.y===M?u:m.y===O?u/2:0)}return w.left+=p.x+(l.x===N?-r:l.x===O?-r/2:0),w.top+=p.y+(l.y===M?-s:l.y===O?-s/2:0),R.viewport?(w.adjusted=R.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===E||!x||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),db.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=E,this):this},z.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!db.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var gb=(A=z.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,O).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?H:G}).prototype;gb.invert=function(a,b){this[a]=this[a]===L?N:this[a]===N?L:b||this[a]},gb.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===H||this.forceY&&"center"!==b?b+" "+a:a+" "+b},gb.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},gb.clone=function(){return new A(this.string(),this.forceY)},z.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=l(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=D),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",m=this.options[k],n=(this.options[a?"hide":"show"],this.options.position),o=this.options.content,p=this.tooltip.css("width"),q=this.tooltip.is(":visible"),r=a||1===m.target.length,s=!c||m.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!q),h=!g.is(":animated")&&q===a&&s,i=h?F:!!this._trigger(k,[90]),this.destroyed?this:(i!==E&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=l(this.mouse),d.isFunction(o.text)&&this._updateContent(o.text,E),d.isFunction(o.title)&&this._updateTitle(o.title,E),!C&&"mouse"===n.target&&n.adjust.mouse&&(d(b).bind("mousemove."+S,this._storeMouse),C=D),p||g.css("width",g.outerWidth(E)),this.reposition(c,arguments[2]),p||g.css("width",""),m.solo&&("string"==typeof m.solo?d(m.solo):d(W,m.solo)).not(g).not(m.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,C&&!d(W+'[tracking="true"]:visible',m.solo).not(g).length&&(d(b).unbind("mousemove."+S),C=E),this.blur(c)),j=d.proxy(function(){a?(db.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof m.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),m.effect===E||r===E?(g[k](),j()):d.isFunction(m.effect)?(g.stop(1,1),m.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&m.target.trigger("qtip-"+this.id+"-inactive"),this))},z.show=function(a){return this.toggle(D,a)},z.hide=function(a){return this.toggle(E,a)},z.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(W),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=y.zindex+b.length;return c.hasClass($)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+$).qtip("blur",a)),c.addClass($)[0].style.zIndex=f),this},z.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass($),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},z.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(ab):this.disabled):"boolean"!=typeof a&&(a=D),this.rendered&&this.tooltip.toggleClass(ab,a).attr("aria-disabled",a),this.disabled=!!a,this)},z.enable=function(){return this.disable(E)},z._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("",{"class":"qtip-close "+(this.options.style.widget?"":S+"-icon"),title:g,"aria-label":g}).prepend(d("",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(ab)||a.hide(b),E})},z._updateButton=function(a){if(!this.rendered)return E;var b=this.elements.button;a?this._createButton():b.remove()},z._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(ab);c.removeClass(ab),ab=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(ab,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(Z,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(S+"-icon",!a)},z._storeMouse=function(a){(this.mouse=l(a)).type="mousemove"},z._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},z._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var hb="."+S;d(function(){r(W,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(Y)&&!c.hasClass(ab)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(_,b)}),r("["+U+"]",X,p)}),z._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||F,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=E,!e.isDefaultPrevented()},z._bindEvents=function(a,b,c,e,f,g){if(e.add(c).length===e.length){var h=[];b=d.map(b,function(b){var c=d.inArray(b,a);return c>-1?(h.push(a.splice(c,1)[0]),void 0):b}),h.length&&this._bind(c,h,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)})}this._bind(c,a,f),this._bind(e,b,g)},z._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?E:(this.cache.event=l(a),this.cache.target=a?d(a.target):[c],clearTimeout(this.timers.show),this.timers.show=m.call(this,function(){this.render("object"==typeof a||e.show.ready)},e.show.delay),void 0)}var e=this.options,f=e.show.target,g=e.hide.target,h=e.show.event?d.trim(""+e.show.event).split(" "):[],i=e.hide.event?d.trim(""+e.hide.event).split(" "):[];/mouse(over|enter)/i.test(e.show.event)&&!/mouse(out|leave)/i.test(e.hide.event)&&i.push("mouseleave"),this._bind(f,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=D}),this._bindEvents(h,i,f,g,b,function(){clearTimeout(this.timers.show)}),(e.show.ready||e.prerender)&&b.call(this,a)},z._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),m=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(Y)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(ab)&&this.tooltip[0].offsetWidth>0,e=b.parents(W).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",p),this._bind(i.add(g),y.inactiveEvents,p,"-inactive")),this._bindEvents(r,s,h,i,n,o),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(ab)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:m,"resize",q),f.adjust.scroll&&this._bind(m.add(f.container),"scroll",q)},z._unassignEvents=function(){var c=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],a,b];this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a})))},y=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=F,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],S):F;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,S);if(!a)return D;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),E;a.set(b,e)}}),g!==F?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(D,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===E||c.length<1||y.api[c]?y.nextid++:c,b=s(d(this),c,k),b===E?D:(y.api[c]=b,d.each(R,function(){"initialize"===this.initialize&&this(b)}),b._assignInitialEvents(j),void 0)}))},d.qtip=e,y.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,cb):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(cb,b))}return d.fn["attr"+bb].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+bb].apply(this,arguments));return a||b.filter("["+cb+"]").attr("title",function(){return d.attr(this,cb)}).removeAttr(cb),b}},function(a,b){if(!b||d.fn[a+bb])return D;var c=d.fn[a+bb]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+bb]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(T))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+bb].apply(this,arguments)}),y.version="2.2.0",y.nextid=0,y.inactiveEvents=X,y.zindex=15e3,y.defaults={prerender:E,id:E,overwrite:D,suppress:D,content:{text:D,attr:"title",title:E,button:E},position:{my:"top left",at:"bottom right",target:E,container:E,viewport:E,adjust:{x:0,y:0,mouse:D,scroll:D,resize:D,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:E})}},show:{target:E,event:"mouseenter",effect:D,delay:90,solo:E,ready:E,autofocus:E},hide:{target:E,event:"mouseleave",effect:D,delay:0,fixed:E,inactive:E,leave:"window",distance:E},style:{classes:"",widget:E,width:E,height:E,def:D},events:{render:F,move:F,show:F,hide:F,toggle:F,visible:F,hidden:F,focus:F,blur:F}};var ib,jb="margin",kb="border",lb="color",mb="background-color",nb="transparent",ob=" !important",pb=!!b.createElement("canvas").getContext,qb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,rb={},sb=["Webkit","O","Moz","ms"];if(pb)var tb=a.devicePixelRatio||1,ub=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),vb=tb/ub;else var wb=function(a,b,c){return"'};d.extend(w.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("
",{"class":S+"-tip"}).prependTo(a.tooltip),pb?(b=d("").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=wb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===K||a.y===O&&this.element.position().top+this.size[1]/2+this.options.offsetl&&!qb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==D?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===H?[s(r.x===L?l:r.x===N?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===K?k[1]-q[1]:0)]:[s(r.x===L?k[0]-q[0]:0),s(r.y===K?l:r.y===M?k[1]-q[1]-l:(k[1]-q[1])/2)],pb?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,vb),i=this._calculateTip(r,this.size,vb),o.attr(I,k[0]*vb).attr(J,k[1]*vb),o.css(I,k[0]).css(J,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*vb,j[1]*vb),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===db.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(O)>-1),left:j[0]-j[2]*Number(f===G),top:j[1]-j[2]*Number(f===H),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(wb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==E&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return E;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===G&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===O?(h=c===H?L:K,j[h]="50%",j[jb+"-"+h]=-Math.round(b[c===H?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h))) -}),j[a[c]]-=b[c===G?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===Q&&j.precedance===b&&k[d]&&j[c]!==O?j.precedance=j.precedance===G?H:G:a!==Q&&k[d]&&(j[b]=j[b]===O?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===O?p[jb+"-"+b]=o[a]=g[jb+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=E),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:E,top:E,x:0,y:0},p={};this.corner.fixed!==D&&(e(m,G,H,L,N),e(n,H,G,K,M),j.string()===i.corner.string()||i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,E)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===Q&&!!k.left)&&f(G,L,N),(o.top=n===Q&&!!k.top)&&f(H,K,M),this.element.css(p).toggle(!(o.x&&o.y||j.x===O&&o.y||j.y===O&&o.x)),d.left-=g.left.charAt?g.user:m!==Q||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==Q||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),ib=R.tip=function(a){return new w(a,a.options.style.tip)},ib.initialize="render",ib.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=D)}},B.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(D,y.defaults,{style:{tip:{corner:D,mimic:E,width:6,height:6,border:D,offset:0}}}),R.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=v[a],t=w[a],u=c===Q,x=m===f?j:m===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=r[f]+s[f]-(o?0:n[f]),A=z-k,B=k+j-(h===I?p:q)-z,C=x-(v.precedance===a||m===v[b]?y:0)-(t===O?i/2:0);return u?(C=(m===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-n[f]+s[f],k-C,Math.min(Math.max(-n[f]+s[f]+(h===I?p:q),k+C),d[f],"center"===m?k-x:1e9))):(e*=c===P?2:0,A>0&&(m!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(m!==g||A>0)&&(d[f]-=(m===O?-C:C)+e,l.invert(a,g)),d[f]B&&(d[f]=k,l=v.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s,t=e.target,u=c.elements.tooltip,v=e.my,w=e.at,x=e.adjust,y=x.method.split(" "),z=y[0],A=y[1]||y[0],B=e.viewport,C=e.container,D=c.cache,F={left:0,top:0};return B.jquery&&t[0]!==a&&t[0]!==b.body&&"none"!==x.method?(n=C.offset()||F,o="static"===C.css("position"),k="fixed"===u.css("position"),p=B[0]===a?B.width():B.outerWidth(E),q=B[0]===a?B.height():B.outerHeight(E),r={left:k?0:B.scrollLeft(),top:k?0:B.scrollTop()},s=B.offset()||F,("shift"!==z||"shift"!==A)&&(l=v.clone()),F={left:"none"!==z?j(G,H,z,x.x,L,N,I,f,h):0,top:"none"!==A?j(H,G,A,x.y,K,M,J,g,i):0},l&&D.lastClass!==(m=S+"-pos-"+l.abbrev())&&u.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),F):F},R.polys={polygon:function(a,b){var c,d,e,f={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:E},g=0,h=[],i=1,j=1,k=0,l=0;for(g=a.length;g--;)c=[parseInt(a[--g],10),parseInt(a[g+1],10)],c[0]>f.position.right&&(f.position.right=c[0]),c[0]f.position.bottom&&(f.position.bottom=c[1]),c[1]0&&e>0&&i>0&&j>0;)for(d=Math.floor(d/2),e=Math.floor(e/2),b.x===L?i=d:b.x===N?i=f.width-d:i+=Math.floor(d/2),b.y===K?j=e:b.y===M?j=f.height-e:j+=Math.floor(e/2),g=h.length;g--&&!(h.length<2);)k=h[g][0]-f.position.left,l=h[g][1]-f.position.top,(b.x===L&&k>=i||b.x===N&&i>=k||b.x===O&&(i>k||k>f.width-i)||b.y===K&&l>=j||b.y===M&&j>=l||b.y===O&&(j>l||l>f.height-j))&&h.splice(g,1);f.position={left:h[0][0],top:h[0][1]}}return f},rect:function(a,b,c,d){return{width:Math.abs(c-a),height:Math.abs(d-b),position:{left:Math.min(a,c),top:Math.min(b,d)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(a,b,c,d,e){var f=R.polys._angles[e.abbrev()],g=0===f?0:c*Math.cos(f*Math.PI),h=d*Math.sin(f*Math.PI);return{width:2*c-Math.abs(g),height:2*d-Math.abs(h),position:{left:a+g,top:b+h},adjustable:E}},circle:function(a,b,c,d){return R.polys.ellipse(a,b,c,c,d)}},R.svg=function(a,c,e){for(var f,g,h,i,j,k,l,m,n,o,p,q=d(b),r=c[0],s=d(r.ownerSVGElement),t=1,u=1,v=!0;!r.getBBox;)r=r.parentNode;if(!r.getBBox||!r.parentNode)return E;f=s.attr("width")||s.width()||parseInt(s.css("width"),10),g=s.attr("height")||s.height()||parseInt(s.css("height"),10);var w=(parseInt(c.css("stroke-width"),10)||0)/2;switch(w&&(t+=w/f,u+=w/g),r.nodeName){case"ellipse":case"circle":o=R.polys.ellipse(r.cx.baseVal.value,r.cy.baseVal.value,(r.rx||r.r).baseVal.value+w,(r.ry||r.r).baseVal.value+w,e);break;case"line":case"polygon":case"polyline":for(n=r.points||[{x:r.x1.baseVal.value,y:r.y1.baseVal.value},{x:r.x2.baseVal.value,y:r.y2.baseVal.value}],o=[],m=-1,k=n.numberOfItems||n.length;++mparseInt(h[0].style.zIndex,10),b||e.closest(W)[0]===h[0]||c(e),g=a.target===k[k.length-1]}}var f,g,h,i,j=this,k={};d.extend(j,{init:function(){return i=j.elem=d("
",{id:"qtip-overlay",html:"
",mousedown:function(){return E}}).hide(),d(b.body).bind("focusin"+Ab,e),d(b).bind("keydown"+Ab,function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)}),i.bind("click"+Ab,function(a){f&&f.options.show.modal.blur&&f.hide(a)}),j},update:function(b){f=b,k=b.options.show.modal.stealfocus!==E?b.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(a,e,g){var k=(d(b.body),a.tooltip),l=a.options.show.modal,m=l.effect,n=e?"show":"hide",o=i.is(":visible"),p=d(Ab).filter(":visible:not(:animated)").not(k);return j.update(a),e&&l.stealfocus!==E&&c(d(":focus")),i.toggleClass("blurs",l.blur),e&&i.appendTo(b.body),i.is(":animated")&&o===e&&h!==E||!e&&p.length?j:(i.stop(D,E),d.isFunction(m)?m.call(i,e):m===E?i[n]():i.fadeTo(parseInt(g,10)||90,e?1:0,function(){e||i.hide()}),e||i.queue(function(a){i.css({left:"",top:""}),d(Ab).length||i.detach(),a()}),h=e,f.destroyed&&(f=F),j)}}),j.init()},yb=new yb,d.extend(x.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=yb.elem,b.addClass(zb).css("z-index",y.modal_zindex+d(Ab).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(yb.elem[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(Ab),f=y.modal_zindex+e.length,g=parseInt(b[0].style.zIndex,10);yb.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+$).qtip("blur",a.originalEvent),b.addClass($)[0].style.zIndex=f,yb.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(Ab).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this),void 0):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:(yb.toggle(this.qtip,!!b,c),void 0)},destroy:function(){this.qtip.tooltip.removeClass(zb),this.qtip._unbind(this.qtip.tooltip,this._ns),yb.toggle(this.qtip,E),delete this.qtip.elements.overlay}}),xb=R.modal=function(a){return new x(a,a.options.show.modal)},xb.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=D))},y.modal_zindex=y.zindex-200,xb.initialize="render",B.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(D,y.defaults,{show:{modal:{on:E,effect:D,blur:D,stealfocus:D,escape:D}}})})}(window,document); -//# sourceMappingURL=http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0//var/www/qtip2/build/tmp/tmp-11954vgjofvk/jquery.qtip.min.map \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/package.json b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/package.json deleted file mode 100644 index 29c70e5a6..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/display/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "displaymodel", - "version": "1.0.0", - "dependencies": {}, - "devDependencies": { - "grunt": "0.4.2", - "grunt-autoprefixer": "0.4.0", - "grunt-bower-install": "0.7.0", - "grunt-concurrent": "0.4.1", - "grunt-contrib-clean": "0.5.0", - "grunt-contrib-coffee": "0.7.0", - "grunt-contrib-compass": "0.6.0", - "grunt-contrib-concat": "0.3.0", - "grunt-contrib-connect": "0.5.0", - "grunt-contrib-copy": "0.4.1", - "grunt-contrib-cssmin": "0.7.0", - "grunt-contrib-htmlmin": "0.1.3", - "grunt-contrib-imagemin": "0.3.0", - "grunt-contrib-jshint": "0.7.1", - "grunt-contrib-uglify": "0.2.0", - "grunt-contrib-watch": "0.5.2", - "grunt-google-cdn": "0.2.0", - "grunt-newer": "0.5.4", - "grunt-ng-annotate": "0.5.0", - "grunt-rev": "0.1.0", - "grunt-svgmin": "0.2.0", - "grunt-usemin": "2.0.0", - "jshint-stylish": "0.1.3", - "load-grunt-tasks": "0.2.0", - "time-grunt": "0.2.1", - "grunt-text-replace": "0.3.11", - "grunt-contrib-rename": "0.0.3" - }, - "engines": { - "node": ">=0.8.0" - } -} diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/flowable-header-custom.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/flowable-header-custom.js deleted file mode 100644 index 8d75ba293..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/flowable-header-custom.js +++ /dev/null @@ -1,19 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -'use strict'; - -FLOWABLE.HEADER_CONFIG.showAppTitle = false; -FLOWABLE.HEADER_CONFIG.showHeaderMenu = false; -FLOWABLE.HEADER_CONFIG.showMainNavigation = false; -FLOWABLE.HEADER_CONFIG.showPageHeader = false; \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/flowable-toolbar-custom-actions.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/flowable-toolbar-custom-actions.js deleted file mode 100644 index 873f2b940..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/flowable-toolbar-custom-actions.js +++ /dev/null @@ -1,39 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Create custom functions for the FLOWABLE-editor -FLOWABLE.TOOLBAR.ACTIONS.closeEditor = function(services) { - services.$location.path("/processes"); -}; - -FLOWABLE.TOOLBAR.ACTIONS.navigateToProcess = function(processId) { - var navigateEvent = { - type: FLOWABLE.eventBus.EVENT_TYPE_NAVIGATE_TO_PROCESS, - processId: processId - }; - FLOWABLE.eventBus.dispatch(FLOWABLE.eventBus.EVENT_TYPE_NAVIGATE_TO_PROCESS, navigateEvent); -}, - -// Add custom buttons -FLOWABLE.TOOLBAR_CONFIG.secondaryItems.push( - { - "type" : "button", - "title" : "Close", - "cssClass" : "glyphicon glyphicon-remove", - "action" : "FLOWABLE.TOOLBAR.ACTIONS.closeEditor" - } -); - - - - diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-assignment-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-assignment-controller.js deleted file mode 100644 index 9fdfb16af..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-assignment-controller.js +++ /dev/null @@ -1,504 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Assignment - */ -'use strict'; - -angular.module('flowableModeler').controller('FlowableAssignmentCtrl', [ '$scope', '$modal', function($scope, $modal) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/assignment-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); -}]); - -angular.module('flowableModeler').controller('FlowableAssignmentPopupCtrl', - [ '$rootScope', '$scope', '$translate', '$http', 'UserService', 'GroupService', function($rootScope, $scope, $translate, $http, UserService, GroupService) { - - // Put json representing assignment on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.assignment !== undefined - && $scope.property.value.assignment !== null) { - - $scope.assignment = $scope.property.value.assignment; - - } else { - $scope.assignment = {type:'idm'}; - } - - $scope.popup = { - assignmentObject: { - type:$scope.assignment.type, - idm: { - type:undefined, - assignee: undefined, - candidateUsers: [], - candidateGroups: [] - }, - static: { - assignee: undefined, - candidateUsers: [], - candidateGroups: [] - } - } - }; - - - $scope.assignmentOptions = [ - {id: "initiator", title: $translate.instant('PROPERTY.ASSIGNMENT.IDM.DROPDOWN.INITIATOR')}, - {id: "user", title: $translate.instant('PROPERTY.ASSIGNMENT.IDM.DROPDOWN.USER')}, - {id: "users", title: $translate.instant('PROPERTY.ASSIGNMENT.IDM.DROPDOWN.USERS')}, - {id: "groups", title: $translate.instant('PROPERTY.ASSIGNMENT.IDM.DROPDOWN.GROUPS')} - ]; - - if ($scope.assignment.idm && $scope.assignment.idm.type) { - for (var i = 0; i < $scope.assignmentOptions.length; i++) { - if ($scope.assignmentOptions[i].id == $scope.assignment.idm.type) { - $scope.assignmentOption = $scope.assignmentOptions[i]; - break; - } - } - } - - // fill the IDM area - if (!$scope.assignmentOption) { - // Default, first time opening the popup - $scope.assignmentOption = $scope.assignmentOptions[0]; - } else { - // Values already filled - if ($scope.assignment.idm) { //fill the IDM tab - if ($scope.assignment.idm.assignee) { - if ($scope.assignment.idm.assignee.id) { - $scope.popup.assignmentObject.idm.assignee = $scope.assignment.idm.assignee; - } else { - $scope.popup.assignmentObject.idm.assignee = {email: $scope.assignment.idm.assignee.email}; - } - } - - if ($scope.assignment.idm.candidateUsers && $scope.assignment.idm.candidateUsers.length > 0) { - for (var i = 0; i < $scope.assignment.idm.candidateUsers.length; i++) { - $scope.popup.assignmentObject.idm.candidateUsers.push($scope.assignment.idm.candidateUsers[i]); - } - } - - if ($scope.assignment.idm.candidateGroups && $scope.assignment.idm.candidateGroups.length > 0) { - for (var i = 0; i < $scope.assignment.idm.candidateGroups.length; i++) { - $scope.popup.assignmentObject.idm.candidateGroups.push($scope.assignment.idm.candidateGroups[i]); - } - } - } - } - - //fill the static area - if ($scope.assignment.assignee) { - $scope.popup.assignmentObject.static.assignee = $scope.assignment.assignee; - } - - if ($scope.assignment.candidateUsers && $scope.assignment.candidateUsers.length > 0) { - for (var i = 0; i < $scope.assignment.candidateUsers.length; i++) { - $scope.popup.assignmentObject.static.candidateUsers.push($scope.assignment.candidateUsers[i]); - } - } - - if ($scope.assignment.candidateGroups && $scope.assignment.candidateGroups.length > 0) { - for (var i = 0; i < $scope.assignment.candidateGroups.length; i++) { - $scope.popup.assignmentObject.static.candidateGroups.push($scope.assignment.candidateGroups[i]); - } - } - - initStaticContextForEditing($scope); - - $scope.$watch('popup.groupFilter', function () { - $scope.updateGroupFilter(); - }); - - $scope.$watch('popup.filter', function() { - $scope.updateFilter(); - }); - - $scope.updateFilter = function() { - if ($scope.popup.oldFilter == undefined || $scope.popup.oldFilter != $scope.popup.filter) { - if (!$scope.popup.filter) { - $scope.popup.oldFilter = ''; - } else { - $scope.popup.oldFilter = $scope.popup.filter; - } - - if ($scope.popup.filter !== null && $scope.popup.filter !== undefined) { - UserService.getFilteredUsers($scope.popup.filter).then(function (result) { - var filteredUsers = []; - for (var i=0; i= 0 && $scope.popup.selectedIndex < users.length) { - user = users[$scope.popup.selectedIndex]; - } - } - - if (user) { - if ("user" == $scope.assignmentOption.id) { - $scope.popup.assignmentObject.idm.assignee = user; - } else if ("users" == $scope.assignmentOption.id) { - - // Only add if not yet part of candidate users - var found = false; - if ($scope.popup.assignmentObject.idm.candidateUsers) { - for (var i = 0; i < $scope.popup.assignmentObject.idm.candidateUsers.length; i++) { - if ($scope.popup.assignmentObject.idm.candidateUsers[i].id === user.id) { - found = true; - break; - } - } - } - - if (!found) { - $scope.addCandidateUser(user); - } - } - } - }; - - $scope.confirmEmail = function() { - if ("user" == $scope.assignmentOption.id) { - $scope.popup.assignmentObject.idm.assignee = {email: $scope.popup.email}; - } else if ("users" == $scope.assignmentOption.id) { - - // Only add if not yet part of candidate users - var found = false; - if ($scope.popup.assignmentObject.idm.candidateUsers) { - for (var i = 0; i < $scope.popup.assignmentObject.idm.candidateUsers.length; i++) { - - if ($scope.popup.assignmentObject.idm.candidateUsers[i].id) { - if ($scope.popup.assignmentObject.idm.candidateUsers[i].id === user.id) { - found = true; - break; - } - } else if ($scope.popup.assignmentObject.idm.candidateUsers[i].email) { - if ($scope.popup.assignmentObject.idm.candidateUsers[i].email === $scope.popup.email) { - found = true; - break; - } - } - } - } - - if (!found) { - $scope.addCandidateUser({email: $scope.popup.email}); - } - } - }; - - $scope.confirmGroup = function(group) { - if (!group) { - // Selection is done with keyboard, use selection index - var groups = $scope.popup.groupResults; - if ($scope.popup.selectedGroupIndex >= 0 && $scope.popup.selectedGroupIndex < groups.length) { - group = groups[$scope.popup.selectedGroupIndex]; - } - } - - if (group) { - // Only add if not yet part of candidate groups - var found = false; - if ($scope.popup.assignmentObject.idm.candidateGroups) { - for (var i = 0; i < $scope.popup.assignmentObject.idm.candidateGroups.length; i++) { - if ($scope.popup.assignmentObject.idm.candidateGroups[i].id === group.id) { - found = true; - break; - } - } - } - - if (!found) { - $scope.addCandidateGroup(group); - } - } - }; - - $scope.addCandidateUser = function(user) { - $scope.popup.assignmentObject.idm.candidateUsers.push(user); - }; - - $scope.removeCandidateUser = function(user) { - var users = $scope.popup.assignmentObject.idm.candidateUsers; - var indexToRemove = -1; - for (var i = 0; i < users.length; i++) { - if (user.id) { - if (user.id === users[i].id) { - indexToRemove = i; - break; - } - } else { - if (user.email === users[i].email) { - indexToRemove = i; - break; - } - } - } - if (indexToRemove >= 0) { - users.splice(indexToRemove, 1); - } - }; - - $scope.addCandidateGroup = function(group) { - $scope.popup.assignmentObject.idm.candidateGroups.push(group); - }; - - $scope.removeCandidateGroup = function(group) { - var groups = $scope.popup.assignmentObject.idm.candidateGroups; - var indexToRemove = -1; - for (var i = 0; i < groups.length; i++) { - if (group.id == groups[i].id) { - indexToRemove = i; - break; - } - } - if (indexToRemove >= 0) { - groups.splice(indexToRemove, 1); - } - }; - - $scope.resetSelection = function() { - if ($scope.popup.userResults && $scope.popup.userResults.length > 0) { - $scope.popup.selectedIndex = 0; - } else { - $scope.popup.selectedIndex = -1; - } - }; - - $scope.nextUser = function() { - var users = $scope.popup.userResults; - if (users && users.length > 0 && $scope.popup.selectedIndex < users.length -1) { - $scope.popup.selectedIndex += 1; - } - }; - - $scope.previousUser = function() { - var users = $scope.popup.userResults; - if (users && users.length > 0 && $scope.popup.selectedIndex > 0) { - $scope.popup.selectedIndex -= 1; - } - }; - - $scope.resetGroupSelection = function() { - if ($scope.popup.groupResults && $scope.popup.groupResults.length > 0) { - $scope.popup.selectedGroupIndex = 0; - } else { - $scope.popup.selectedGroupIndex = -1; - } - }; - - $scope.nextGroup = function() { - var groups = $scope.popup.groupResults; - if (groups && groups.length > 0 && $scope.popup.selectedGroupIndex < groups.length -1) { - $scope.popup.selectedGroupIndex += 1; - } - }; - - $scope.previousGroup = function() { - var groups = $scope.popup.groupResults; - if (groups && groups.length > 0 && $scope.popup.selectedGroupIndex > 0) { - $scope.popup.selectedGroupIndex -= 1; - } - }; - - $scope.removeAssignee = function() { - $scope.popup.assignmentObject.idm.assignee = undefined; - }; - - // Click handler for + button after enum value - $scope.addCandidateUserValue = function(index) { - $scope.popup.assignmentObject.static.candidateUsers.splice(index + 1, 0, {value: ''}); - }; - - // Click handler for - button after enum value - $scope.removeCandidateUserValue = function(index) { - $scope.popup.assignmentObject.static.candidateUsers.splice(index, 1); - }; - - // Click handler for + button after enum value - $scope.addCandidateGroupValue = function(index) { - $scope.popup.assignmentObject.static.candidateGroups.splice(index + 1, 0, {value: ''}); - }; - - // Click handler for - button after enum value - $scope.removeCandidateGroupValue = function(index) { - $scope.popup.assignmentObject.static.candidateGroups.splice(index, 1); - }; - - $scope.setSearchType = function() { - $scope.popup.assignmentObject.assignmentSourceType = 'search'; - }; - - $scope.allSteps = EDITOR.UTIL.collectSortedElementsFromPrecedingElements($scope.selectedShape); - - $scope.save = function () { - - handleAssignmentInput($scope.popup.assignmentObject.static); - - $scope.assignment.type = $scope.popup.assignmentObject.type; - - if ('idm' === $scope.popup.assignmentObject.type) { // IDM - $scope.popup.assignmentObject.static = undefined; - - //Construct an IDM object to be saved to the process model. - var idm = {type: $scope.assignmentOption.id}; - if ('user' == idm.type) { - if ($scope.popup.assignmentObject.idm.assignee) { - idm.assignee = $scope.popup.assignmentObject.idm.assignee; - } - } else if ('users' == idm.type) { - if ($scope.popup.assignmentObject.idm.candidateUsers && $scope.popup.assignmentObject.idm.candidateUsers.length > 0) { - idm.candidateUsers = $scope.popup.assignmentObject.idm.candidateUsers; - } - } else if ('groups' == idm.type) { - if ($scope.popup.assignmentObject.idm.candidateGroups && $scope.popup.assignmentObject.idm.candidateGroups.length > 0) { - idm.candidateGroups = $scope.popup.assignmentObject.idm.candidateGroups; - } - } - $scope.assignment.idm = idm; - $scope.assignment.assignee = undefined; - $scope.assignment.candidateUsers = undefined; - $scope.assignment.candidateGroups = undefined; - - } - - if ('static' === $scope.popup.assignmentObject.type) { // IDM - $scope.popup.assignmentObject.idm = undefined; - $scope.assignment.idm = undefined; - $scope.assignment.assignee = $scope.popup.assignmentObject.static.assignee; - $scope.assignment.candidateUsers = $scope.popup.assignmentObject.static.candidateUsers; - $scope.assignment.candidateGroups = $scope.popup.assignmentObject.static.candidateGroups; - } - - $scope.property.value = {}; - $scope.property.value.assignment = $scope.assignment; - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - // Close button handler - $scope.close = function() { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - var handleAssignmentInput = function ($assignment) { - - function isEmptyString(value) { - return (value === undefined || value === null || value.trim().length === 0); - } - - if (isEmptyString($assignment.assignee)){ - $assignment.assignee = undefined; - } - var toRemoveIndexes; - var removedItems=0; - var i = 0; - if ($assignment.candidateUsers) { - toRemoveIndexes = []; - for (i = 0; i < $assignment.candidateUsers.length; i++) { - if (isEmptyString($assignment.candidateUsers[i].value)) { - toRemoveIndexes[toRemoveIndexes.length] = i; - } - } - - if (toRemoveIndexes.length == $assignment.candidateUsers.length) { - $assignment.candidateUsers = undefined; - } else { - removedItems=0; - for (i = 0; i < toRemoveIndexes.length; i++) { - $assignment.candidateUsers.splice(toRemoveIndexes[i]-removedItems, 1); - removedItems++; - } - } - } - - if ($assignment.candidateGroups) { - toRemoveIndexes = []; - for (i = 0; i < $assignment.candidateGroups.length; i++) { - if (isEmptyString($assignment.candidateGroups[i].value)) { - toRemoveIndexes[toRemoveIndexes.length] = i; - } - } - - if (toRemoveIndexes.length == $assignment.candidateGroups.length) { - $assignment.candidateGroups = undefined; - } else { - removedItems=0; - for (i = 0; i < toRemoveIndexes.length; i++) { - $assignment.candidateGroups.splice(toRemoveIndexes[i]-removedItems, 1); - removedItems++; - } - } - } - }; - - function initStaticContextForEditing($scope) { - if (!$scope.popup.assignmentObject.static.candidateUsers || $scope.popup.assignmentObject.static.candidateUsers.length==0) { - $scope.popup.assignmentObject.static.candidateUsers = [{value: ''}]; - } - if (!$scope.popup.assignmentObject.static.candidateGroups || $scope.popup.assignmentObject.static.candidateGroups.length==0) { - $scope.popup.assignmentObject.static.candidateGroups = [{value: ''}]; - } - } -}]); diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-collapsed-subprocess-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-collapsed-subprocess-controller.js deleted file mode 100644 index 3f17d3691..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-collapsed-subprocess-controller.js +++ /dev/null @@ -1,80 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -angular.module('flowableModeler').controller('FlowableCollapsedSubprocessReferenceCtrl', - [ '$scope', '$modal', '$http', function($scope, $modal, $http) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/subprocess-reference-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); -}]); - -angular.module('flowableModeler').controller('FlowableCollapsedSubprocessReferencePopupCtrl', [ '$scope', '$http', function($scope, $http) { - - $scope.state = {'loadingSubprocesses' : true, 'error' : false}; - - // Close button handler - $scope.close = function() { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - // Selecting/deselecting a subprocess - $scope.selectSubProcess = function(sub, $event) { - $event.stopPropagation(); - if ($scope.selectedSubProcess && $scope.selectedSubProcess.id && sub.id == $scope.selectedSubProcess.id) { - // un-select the current selection - $scope.selectedSubProcess = null; - } else { - $scope.selectedSubProcess = sub; - } - }; - - // Saving the selected value - $scope.save = function() { - if ($scope.selectedSubProcess) { - $scope.property.value = {'id' : $scope.selectedSubProcess.id, 'name' : $scope.selectedSubProcess.name}; - } else { - $scope.property.value = null; - } - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.loadProcesses = function() { - - $http.get(FLOWABLE.CONFIG.contextRoot + '/app/rest/models?filter=myprocesses') - .success( - function(response) { - $scope.state.loadingSubprocesses = false; - $scope.state.subprocessError = false; - $scope.subProcesses = response.data; - }) - .error( - function(data, status, headers, config) { - $scope.state.loadingSubprocesses = false; - $scope.state.subprocessError = true; - }); - }; - - if ($scope.property && $scope.property.value && $scope.property.value.id) { - $scope.selectedSubProcess = $scope.property.value; - } - - $scope.loadProcesses(); -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-condition-expression-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-condition-expression-controller.js deleted file mode 100644 index 0ef677eaa..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-condition-expression-controller.js +++ /dev/null @@ -1,59 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Condition expression - */ - -angular.module('flowableModeler').controller('FlowableConditionExpressionCtrl', [ '$scope', '$modal', function($scope, $modal) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/condition-expression-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); -}]); - -angular.module('flowableModeler').controller('FlowableConditionExpressionPopupCtrl', - [ '$rootScope', '$scope', '$translate', 'FormBuilderService', function($rootScope, $scope, $translate, FormBuilderService) { - - // Put json representing assignment on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.expression !== undefined - && $scope.property.value.expression !== null) { - - $scope.expression = $scope.property.value.expression; - - } else if ($scope.property.value !== undefined && $scope.property.value !== null) { - $scope.expression = {type: 'static', staticValue: $scope.property.value}; - - } else { - $scope.expression = {}; - } - - $scope.save = function() { - $scope.property.value = {expression: $scope.expression}; - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - // Close button handler - $scope.close = function() { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-custom-controllers.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-custom-controllers.js deleted file mode 100644 index 72ac30409..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-custom-controllers.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-decisiontable-reference-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-decisiontable-reference-controller.js deleted file mode 100644 index 7bf1d23e4..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-decisiontable-reference-controller.js +++ /dev/null @@ -1,288 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -angular.module('flowableModeler').controller('FlowableDecisionTableReferenceCtrl', - [ '$scope', '$modal', '$http', function($scope, $modal, $http) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/decisiontable-reference-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); -}]); - -angular.module('flowableModeler').controller('FlowableDecisionTableReferencePopupCtrl', ['$rootScope', '$scope', '$http', '$location', 'editorManager', - function($rootScope, $scope, $http, $location, editorManager) { - - $scope.state = { - 'loadingDecisionTables': true, - 'decisionTableError': false - }; - - $scope.popup = { - 'state': 'decisionTableReference' - }; - - $scope.foldersBreadCrumbs = []; - - // Make click outside dialog also call close. - $scope.$parent.$on('modal.hide.before', function() { - $scope.close(); - $scope.$parent.$apply(); - }); - - // Close button handler - $scope.close = function() { - $scope.property.newVariablesMapping = undefined; - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - // Selecting/deselecting a decision table - $scope.selectDecisionTable = function(decisionTable, $event) { - $event.stopPropagation(); - if ($scope.selectedDecisionTable && $scope.selectedDecisionTable.id && decisionTable.id == $scope.selectedDecisionTable.id) { - // un-select the current selection - $scope.selectedDecisionTable = null; - } else { - $scope.selectedDecisionTable = decisionTable; - } - }; - - $scope.isSelected = function () { - if ($scope.selectedDecisionTable && $scope.selectedDecisionTable.id) { - return true; - } - return false; - }; - - // Saving the selected value - $scope.save = function() { - if ($scope.selectedDecisionTable) { - $scope.property.value = { - 'id': $scope.selectedDecisionTable.id, - 'name': $scope.selectedDecisionTable.name, - 'key': $scope.selectedDecisionTable.key - }; - - } else { - $scope.property.value = null; - } - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - // Open the selected value - $scope.open = function() { - if ($scope.selectedDecisionTable) { - $scope.property.value = { - 'id': $scope.selectedDecisionTable.id, - 'name': $scope.selectedDecisionTable.name, - 'key': $scope.selectedDecisionTable.key - }; - $scope.updatePropertyInModel($scope.property); - - var modelMetaData = editorManager.getBaseModelData(); - var json = editorManager.getModel(); - json = JSON.stringify(json); - - var params = { - modeltype: modelMetaData.model.modelType, - json_xml: json, - name: modelMetaData.name, - key: modelMetaData.key, - description: modelMetaData.description, - newversion: false, - lastUpdated: modelMetaData.lastUpdated - }; - - // Update - $http({ - method: 'POST', - data: params, - ignoreErrors: true, - headers: { - 'Accept': 'application/json', - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - }, - transformRequest: function (obj) { - var str = []; - for (var p in obj) { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); - } - return str.join("&"); - }, - url: FLOWABLE.URL.putModel(modelMetaData.modelId) - }) - - .success(function(data, status, headers, config) { - editorManager.handleEvents({ - type: ORYX.CONFIG.EVENT_SAVED - }); - - $rootScope.addHistoryItem($scope.selectedShape.resourceId); - $location.path('decision-table-editor/' + $scope.selectedDecisionTable.id); - }) - .error(function(data, status, headers, config) { - - }); - - $scope.close(); - } - }; - - $scope.newDecisionTable = function() { - $scope.property.value.variablesmapping = []; - - $scope.popup.state = 'newDecisionTable'; - - var modelMetaData = editorManager.getBaseModelData(); - - $scope.model = { - loading: false, - decisionTable: { - name: '', - key: '', - description: '', - modelType: 4 - }, - defaultStencilSet: undefined, - decisionTableStencilSets: [] - }; - }; - - $scope.createDecisionTable = function() { - - if (!$scope.model.decisionTable.name || $scope.model.decisionTable.name.length == 0 || - !$scope.model.decisionTable.key || $scope.model.decisionTable.key.length == 0) { - - return; - } - - var stencilSetId = $scope.model.decisionTable.stencilSet; - $scope.model.loading = true; - - $http({ - method: 'POST', - url: FLOWABLE.CONFIG.contextRoot + '/app/rest/models', - data: $scope.model.decisionTable - }). - success(function(data, status, headers, config) { - - var newDecisionTableId = data.id; - $scope.property.value = { - 'id': newDecisionTableId, - 'name': data.name, - 'key': data.key - }; - $scope.updatePropertyInModel($scope.property); - - var modelMetaData = editorManager.getBaseModelData(); - var json = editorManager.getModel(); - json = JSON.stringify(json); - - var params = { - modeltype: modelMetaData.model.modelType, - json_xml: json, - name: modelMetaData.name, - key: modelMetaData.key, - description: modelMetaData.description, - newversion: false, - lastUpdated: modelMetaData.lastUpdated, - stencilSet: stencilSetId - }; - - // Update - $http({ - method: 'POST', - data: params, - ignoreErrors: true, - headers: { - 'Accept': 'application/json', - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - }, - transformRequest: function (obj) { - var str = []; - for (var p in obj) { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); - } - return str.join("&"); - }, - url: FLOWABLE.URL.putModel(modelMetaData.modelId) - }) - - .success(function(data, status, headers, config) { - editorManager.handleEvents({ - type: ORYX.CONFIG.EVENT_SAVED - }); - - $scope.model.loading = false; - $scope.$hide(); - - $rootScope.addHistoryItem($scope.selectedShape.resourceId); - $location.path('decision-table-editor/' + newDecisionTableId); - }) - .error(function(data, status, headers, config) { - $scope.model.loading = false; - $scope.$hide(); - }); - - }). - error(function(data, status, headers, config) { - $scope.model.loading = false; - $scope.model.errorMessage = data.message; - }); - }; - - $scope.cancel = function() { - $scope.close(); - }; - - $scope.resetCurrent = function () { - for (var i = 0, found = false; i < $scope.decisionTables.length && found === false; i++) { - var table = $scope.decisionTables[i]; - if (table.id === $scope.property.value.id) { - $scope.selectedDecisionTable = table; - found = true; - } - } - }; - - $scope.loadDecisionTables = function() { - var modelMetaData = editorManager.getBaseModelData(); - $http.get(FLOWABLE.CONFIG.contextRoot + '/app/rest/decision-table-models') - .success( - function(response) { - $scope.state.loadingDecisionTables = false; - $scope.state.decisionTableError = false; - $scope.decisionTables = response.data; - $scope.resetCurrent(); - }) - .error( - function(data, status, headers, config) { - $scope.state.loadingDecisionTables = false; - $scope.state.decisionTableError = true; - }); - }; - - if ($scope.property && $scope.property.value && $scope.property.value.id) { - $scope.selectedDecisionTable = $scope.property.value; - $scope.storedId = $scope.property.value.id; - } - - $scope.loadDecisionTables(); - } -]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-duedate-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-duedate-controller.js deleted file mode 100644 index 50ff9dd96..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-duedate-controller.js +++ /dev/null @@ -1,126 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Due date - */ -'use strict'; - -angular.module('flowableModeler').controller('BpmnEditorDueDateCtrl', [ '$scope', '$modal', function($scope, $modal) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/duedate-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); -}]); - -angular.module('flowableModeler').controller('BpmnEditorDueDatePopupCtrl', - [ '$rootScope', '$scope', '$translate', function($rootScope, $scope, $translate) { - - // Put json representing assignment on scope - if ($scope.property.value !== undefined && $scope.property.value !== null) { - - if ($scope.property.value.duedate !== undefined && $scope.property.value.duedate !== null) { - $scope.popup = {'duedate': $scope.property.value.duedate}; - - } else if ($scope.property.value.duedateExpression !== undefined && $scope.property.value.duedateExpression !== null) { - $scope.popup = {'duedateExpression': $scope.property.value.duedateExpression}; - - } else { - $scope.popup = {'duedateExpression': $scope.property.value}; - } - - } else { - $scope.popup = {}; - } - - $scope.taskDueDateOptions = [ - {id: "none", title: $translate.instant('PROPERTY.DUEDATE.TASK-DUE-DATE-OPTIONS.NO-DUEDATE')}, - {id: "expression", title: $translate.instant('PROPERTY.DUEDATE.TASK-DUE-DATE-OPTIONS.EXPRESSION')}, - {id: "static", title: $translate.instant('PROPERTY.DUEDATE.TASK-DUE-DATE-OPTIONS.STATIC')}, - {id: "field", title: $translate.instant('PROPERTY.DUEDATE.TASK-DUE-DATE-OPTIONS.FIELD')} - ]; - - if (!$scope.popup.duedate && !$scope.popup.duedateExpression) { - // Default, first time opening the popup - $scope.popup.selectedDueDateOption = $scope.taskDueDateOptions[0].id; - - } else if (!$scope.popup.duedate) { - $scope.popup.selectedDueDateOption = $scope.taskDueDateOptions[1].id; - - } else { - - if ($scope.popup.duedate.fixed) { - $scope.popup.selectedDueDateOption = $scope.taskDueDateOptions[2].id; - - } else if ($scope.popup.duedate.field) { - $scope.popup.selectedDueDateOption = $scope.taskDueDateOptions[3].id; - - } else { - $scope.popup.selectedDueDateOption = $scope.taskDueDateOptions[0].id; - } - } - - $scope.dueDateOptionChanged = function() { - if ($scope.popup.selectedDueDateOption === 'expression') { - $scope.popup.duedate = undefined; - - } else if ($scope.popup.selectedDueDateOption === 'none') { - $scope.popup.duedate = undefined; - $scope.popup.duedateExpression = undefined; - - } else if ($scope.popup.selectedDueDateOption === 'static') { - $scope.popup.duedate = {'fixed': {}}; - $scope.popup.duedateExpression = undefined; - - } else if ($scope.popup.selectedDueDateOption === 'field') { - $scope.popup.duedate = {'field': {}}; - $scope.popup.duedateExpression = undefined; - } - }; - - $scope.setAddCalculationType = function() { - $scope.popup.duedate.field.taskDueDateCalculationType = 'add'; - }; - - $scope.setSubtractCalculationType = function() { - $scope.popup.duedate.field.taskDueDateCalculationType = 'subtract'; - }; - - $scope.allSteps = EDITOR.UTIL.collectSortedElementsFromPrecedingElements($scope.selectedShape); - - $scope.save = function () { - $scope.property.value = {}; - if ($scope.popup.duedate) { - $scope.property.value.duedate = $scope.popup.duedate; - - } else if ($scope.popup.duedateExpression) { - $scope.property.value.duedateExpression = $scope.popup.duedateExpression; - - } else { - $scope.property.value = ''; - } - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - // Close button handler - $scope.close = function() { - $scope.property.mode = 'read'; - $scope.$hide(); - }; -}]); diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-event-listeners-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-event-listeners-controller.js deleted file mode 100644 index 21f9ad4ab..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-event-listeners-controller.js +++ /dev/null @@ -1,263 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Execution listeners - */ - -angular.module('flowableModeler').controller('FlowableEventListenersCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/event-listeners-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 -// Will be fixed in a newer version of Angular UI -angular.module('flowableModeler').controller('FlowableEventListenersPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.eventListeners !== undefined - && $scope.property.value.eventListeners !== null) { - - if ($scope.property.value.eventListeners.constructor == String) { - $scope.eventListeners = JSON.parse($scope.property.value.eventListeners); - } - else { - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happened - $scope.eventListeners = angular.copy($scope.property.value.eventListeners); - } - - } else { - $scope.eventListeners = []; - } - - $scope.translationsRetrieved = false; - $scope.labels = {}; - - var eventPromise = $translate('PROPERTY.EXECUTIONLISTENERS.EVENT'); - var implementationPromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION'); - var namePromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME'); - - $q.all([eventPromise, implementationPromise, namePromise]).then(function (results) { - $scope.labels.eventLabel = results[0]; - $scope.labels.implementationLabel = results[1]; - $scope.labels.nameLabel = results[2]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.eventListeners, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'event', displayName: $scope.labels.eventLabel}, - {field: 'implementation', displayName: $scope.labels.implementationLabel}] - }; - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedListener = row.entity; - - if ($scope.selectedListener) { - var fields = $scope.selectedListener.fields; - if (fields !== undefined && fields !== null) { - for (var i = 0; i < fields.length; i++) { - var field = fields[i]; - if (field.stringValue !== undefined && field.stringValue !== '') { - field.implementation = field.stringValue; - } else if (field.expression !== undefined && field.expression !== '') { - field.implementation = field.expression; - } else if (field.string !== undefined && field.string !== '') { - field.implementation = field.string; - } - } - } else { - $scope.selectedListener.fields = []; - } - if (!$scope.selectedListener.events) { - $scope.selectedListener.events = [{event: ''}]; - } - } - }); - }; - }); - - - // Click handler for + button after enum value - $scope.addEventValue = function (index) { - $scope.selectedListener.events.splice(index + 1, 0, {event: ''}); - }; - - // Click handler for - button after enum value - $scope.removeEventValue = function (index) { - $scope.selectedListener.events.splice(index, 1); - $scope.listenerDetailsChanged(); - }; - - $scope.listenerDetailsChanged = function () { - var listener = $scope.selectedListener; - if (listener.events) { - var eventText = ''; - for (var i = 0; i < listener.events.length; i++) { - if (i > 0) { - eventText += ", "; - } - eventText += listener.events[i].event; - } - $scope.selectedListener.event = eventText; - } - - if (listener.rethrowEvent) { - var implementationText = ''; - if (listener.rethrowType && listener.rethrowType.length > 0) { - if (listener.rethrowType === 'error' && listener.errorcode !== '') { - implementationText = "Rethrow as error " + listener.errorcode; - } - else if (listener.rethrowType === 'message' && listener.messagename !== '') { - implementationText = "Rethrow as message " + listener.messagename; - } - else if ((listener.rethrowType === 'signal' || listener.rethrowType === 'globalSignal') && listener.signalname !== '') { - implementationText = "Rethrow as signal " + listener.signalname; - } - } - $scope.selectedListener.implementation = implementationText; - } - else { - if ($scope.selectedListener.className !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.className; - } - else if ($scope.selectedListener.delegateExpression !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.delegateExpression; - } - else { - $scope.selectedListener.implementation = ''; - } - } - }; - - // Click handler for add button - $scope.addNewListener = function () { - var newListener = { - event: '', - implementation: '', - className: '', - delegateExpression: '', - retrowEvent: false - }; - - $scope.eventListeners.push(newListener); - - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newListener); - }); - }; - - // Click handler for remove button - $scope.removeListener = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.eventListeners.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - $scope.eventListeners.splice(index, 1); - - if ($scope.eventListeners.length == 0) { - $scope.selectedListener = undefined; - } - - $timeout(function () { - if ($scope.eventListeners.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.eventListeners[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveListenerUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.eventListeners.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.eventListeners[index]; - $scope.eventListeners.splice(index, 1); - $timeout(function () { - $scope.eventListeners.splice(index + -1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveListenerDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.eventListeners.indexOf(selectedItems[0]); - if (index != $scope.eventListeners.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.eventListeners[index]; - $scope.eventListeners.splice(index, 1); - $timeout(function () { - $scope.eventListeners.splice(index + 1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.eventListeners.length > 0) { - $scope.property.value = {}; - $scope.property.value.eventListeners = $scope.eventListeners; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - // Close button handler - $scope.close = function () { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - }]); diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-execution-listeners-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-execution-listeners-controller.js deleted file mode 100644 index 3ca1310b2..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-execution-listeners-controller.js +++ /dev/null @@ -1,358 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Execution listeners - */ - -angular.module('flowableModeler').controller('FlowableExecutionListenersCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/execution-listeners-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -angular.module('flowableModeler').controller('FlowableExecutionListenersPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.executionListeners !== undefined - && $scope.property.value.executionListeners !== null) { - - if ($scope.property.value.executionListeners.constructor == String) { - $scope.executionListeners = JSON.parse($scope.property.value.executionListeners); - } - else { - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happened - $scope.executionListeners = angular.copy($scope.property.value.executionListeners); - } - - for (var i = 0; i < $scope.executionListeners.length; i++) { - var executionListener = $scope.executionListeners[i]; - if (executionListener.className !== undefined && executionListener.className !== '') { - executionListener.implementation = executionListener.className; - } - else if (executionListener.expression !== undefined && executionListener.expression !== '') { - executionListener.implementation = executionListener.expression; - } - else if (executionListener.delegateExpression !== undefined && executionListener.delegateExpression !== '') { - executionListener.implementation = executionListener.delegateExpression; - } - } - } else { - $scope.executionListeners = []; - } - - $scope.selectedListener = undefined; - $scope.selectedField = undefined; - $scope.fields = []; - $scope.translationsRetrieved = false; - - $scope.labels = {}; - - var eventPromise = $translate('PROPERTY.EXECUTIONLISTENERS.EVENT'); - var implementationPromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION'); - var namePromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME'); - - $q.all([eventPromise, implementationPromise, namePromise]).then(function (results) { - $scope.labels.eventLabel = results[0]; - $scope.labels.implementationLabel = results[1]; - $scope.labels.nameLabel = results[2]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.executionListeners, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'event', displayName: $scope.labels.eventLabel}, - {field: 'implementation', displayName: $scope.labels.implementationLabel}] - }; - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedListener = row.entity; - $scope.selectedField = undefined; - if ($scope.selectedListener) { - var fields = $scope.selectedListener.fields; - if (fields !== undefined && fields !== null) { - for (var i = 0; i < fields.length; i++) { - var field = fields[i]; - if (field.stringValue !== undefined && field.stringValue !== '') { - field.implementation = field.stringValue; - } else if (field.expression !== undefined && field.expression !== '') { - field.implementation = field.expression; - } else if (field.string !== undefined && field.string !== '') { - field.implementation = field.string; - } - } - } else { - $scope.selectedListener.fields = []; - } - - $scope.fields.length = 0; - for (var i = 0; i < $scope.selectedListener.fields.length; i++) { - $scope.fields.push($scope.selectedListener.fields[i]); - } - } - }); - }; - - // Config for field grid - $scope.gridFieldOptions = { - data: $scope.fields, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'name', displayName: $scope.labels.name}, - {field: 'implementation', displayName: $scope.labels.implementationLabel}] - }; - - $scope.gridFieldOptions.onRegisterApi = function (gridApi) { - // set gridApi on scope - $scope.fieldGridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedField = row.entity; - }); - }; - }); - - $scope.listenerDetailsChanged = function () { - if ($scope.selectedListener.className !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.className; - } else if ($scope.selectedListener.expression !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.expression; - } else if ($scope.selectedListener.delegateExpression !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.delegateExpression; - } else { - $scope.selectedListener.implementation = ''; - } - }; - - // Click handler for add button - $scope.addNewListener = function () { - var newListener = { - event: 'start', - implementation: '', - className: '', - expression: '', - delegateExpression: '' - }; - $scope.executionListeners.push(newListener); - - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newListener); - }); - }; - - // Click handler for remove button - $scope.removeListener = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.executionListeners.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - - $scope.executionListeners.splice(index, 1); - - if ($scope.executionListeners.length == 0) { - $scope.selectedListener = undefined; - } - - $timeout(function () { - if ($scope.executionListeners.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.executionListeners[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveListenerUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.executionListeners.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.executionListeners[index]; - $scope.executionListeners.splice(index, 1); - $timeout(function () { - $scope.executionListeners.splice(index + -1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveListenerDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.executionListeners.indexOf(selectedItems[0]); - if (index != $scope.executionListeners.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.executionListeners[index]; - $scope.executionListeners.splice(index, 1); - $timeout(function () { - $scope.executionListeners.splice(index + 1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - $scope.fieldDetailsChanged = function () { - if ($scope.selectedField.stringValue != '') { - $scope.selectedField.implementation = $scope.selectedField.stringValue; - } else if ($scope.selectedField.expression != '') { - $scope.selectedField.implementation = $scope.selectedField.expression; - } else if ($scope.selectedField.string != '') { - $scope.selectedField.implementation = $scope.selectedField.string; - } else { - $scope.selectedField.implementation = ''; - } - }; - - // Click handler for add button - $scope.addNewField = function () { - if ($scope.selectedListener) { - if ($scope.selectedListener.fields == undefined) { - $scope.selectedListener.fields = []; - } - - var newField = { - name: 'fieldName', - implementation: '', - stringValue: '', - expression: '', - string: '' - }; - $scope.fields.push(newField); - $scope.selectedListener.fields.push(newField); - - $timeout(function () { - $scope.fieldGridApi.selection.toggleRowSelection(newField); - }); - } - }; - - // Click handler for remove button - $scope.removeField = function () { - var selectedItems = $scope.fieldGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - $scope.fieldGridApi.selection.toggleRowSelection(selectedItems[0]); - - $scope.fields.splice(index, 1); - $scope.selectedListener.fields.splice(index, 1); - - if ($scope.fields.length == 0) { - $scope.selectedField = undefined; - } - - $timeout(function () { - if ($scope.fields.length > 0) { - $scope.fieldGridApi.selection.toggleRowSelection($scope.fields[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveFieldUp = function () { - var selectedItems = $scope.fieldGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.fields[index]; - $scope.fields.splice(index, 1); - $scope.selectedListener.fields.splice(index, 1); - $timeout(function () { - $scope.fields.splice(index + -1, 0, temp); - $scope.selectedListener.fields.splice(index + -1, 0, temp); - $timeout(function () { - $scope.fieldGridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveFieldDown = function () { - var selectedItems = $scope.fieldGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - if (index != $scope.fields.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.fields[index]; - $scope.fields.splice(index, 1); - $scope.selectedListener.fields.splice(index, 1); - $timeout(function () { - $scope.fields.splice(index + 1, 0, temp); - $scope.selectedListener.fields.splice(index + 1, 0, temp); - $timeout(function () { - $scope.fieldGridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.executionListeners.length > 0) { - $scope.property.value = {}; - $scope.property.value.executionListeners = $scope.executionListeners; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.$hide(); - $scope.property.mode = 'read'; - }; - - // Close button handler - $scope.close = function () { - $scope.$hide(); - $scope.property.mode = 'read'; - }; - - }]); diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-fields-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-fields-controller.js deleted file mode 100644 index 2d9445b77..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-fields-controller.js +++ /dev/null @@ -1,206 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Task listeners - */ - -angular.module('flowableModeler').controller('FlowableFieldsCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/fields-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -angular.module('flowableModeler').controller('FlowableFieldsPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.fields !== undefined - && $scope.property.value.fields !== null) { - - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happened - $scope.fields = angular.copy($scope.property.value.fields); - - for (var i = 0; i < $scope.fields.length; i++) { - var field = $scope.fields[i]; - if (field.stringValue !== undefined && field.stringValue !== '') { - field.implementation = field.stringValue; - } - else if (field.expression !== undefined && field.expression !== '') { - field.implementation = field.expression; - } - else if (field.string !== undefined && field.string !== '') { - field.implementation = field.string; - } - } - - } else { - $scope.fields = []; - } - - $scope.translationsRetrieved = false; - $scope.labels = {}; - - var namePromise = $translate('PROPERTY.FIELDS.NAME'); - var implementationPromise = $translate('PROPERTY.FIELDS.IMPLEMENTATION'); - - $q.all([namePromise, implementationPromise]).then(function (results) { - $scope.labels.nameLabel = results[0]; - $scope.labels.implementationLabel = results[1]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.fields, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'name', displayName: $scope.labels.nameLabel}, - {field: 'implementation', displayName: $scope.labels.implementationLabel}] - }; - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedField = row.entity; - }); - }; - }); - - $scope.fieldDetailsChanged = function () { - if ($scope.selectedField.stringValue != '') { - $scope.selectedField.implementation = $scope.selectedField.stringValue; - } - else if ($scope.selectedField.expression != '') { - $scope.selectedField.implementation = $scope.selectedField.expression; - } - else if ($scope.selectedField.string != '') { - $scope.selectedField.implementation = $scope.selectedField.string; - } - else { - $scope.selectedField.implementation = ''; - } - }; - - // Click handler for add button - $scope.addNewField = function () { - var newField = { - name: 'fieldName', - implementation: '', - stringValue: '', - expression: '', - string: '' - }; - - $scope.fields.push(newField); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newField); - }); - }; - - // Click handler for remove button - $scope.removeField = function () { - - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - $scope.fields.splice(index, 1); - - if ($scope.fields.length == 0) { - $scope.selectedField = undefined; - } - - $timeout(function () { - if ($scope.fields.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.fields[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveFieldUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.fields[index]; - $scope.fields.splice(index, 1); - $timeout(function () { - $scope.fields.splice(index + -1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveFieldDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - if (index != $scope.fields.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.fields[index]; - $scope.fields.splice(index, 1); - $timeout(function () { - $scope.fields.splice(index + 1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.fields.length > 0) { - $scope.property.value = {}; - $scope.property.value.fields = $scope.fields; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.$hide(); - }; - - // Close button handler - $scope.close = function () { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - }]); diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-form-properties-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-form-properties-controller.js deleted file mode 100644 index ca8f05107..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-form-properties-controller.js +++ /dev/null @@ -1,327 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Form Properties - */ - -angular.module('flowableModeler').controller('FlowableFormPropertiesCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/form-properties-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -angular.module('flowableModeler').controller('FlowableFormPropertiesPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.formProperties !== undefined - && $scope.property.value.formProperties !== null) { - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happended - $scope.formProperties = angular.copy($scope.property.value.formProperties); - - for (var i = 0; i < $scope.formProperties.length; i++) { - var formProperty = $scope.formProperties[i]; - if (formProperty.enumValues && formProperty.enumValues.length > 0) { - for (var j = 0; j < formProperty.enumValues.length; j++) { - var enumValue = formProperty.enumValues[j]; - if (!enumValue.id && !enumValue.name && enumValue.value) { - enumValue.id = enumValue.value; - enumValue.name = enumValue.value; - } - } - } - } - - } else { - $scope.formProperties = []; - } - - $scope.enumValues = []; - - $scope.translationsRetrieved = false; - - $scope.labels = {}; - - var idPromise = $translate('PROPERTY.FORMPROPERTIES.ID'); - var namePromise = $translate('PROPERTY.FORMPROPERTIES.NAME'); - var typePromise = $translate('PROPERTY.FORMPROPERTIES.TYPE'); - - $q.all([idPromise, namePromise, typePromise]).then(function (results) { - $scope.labels.idLabel = results[0]; - $scope.labels.nameLabel = results[1]; - $scope.labels.typeLabel = results[2]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.formProperties, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'id', displayName: $scope.labels.idLabel}, - {field: 'name', displayName: $scope.labels.nameLabel}, - {field: 'type', displayName: $scope.labels.typeLabel}] - }; - - $scope.enumGridOptions = { - data: $scope.enumValues, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{ field: 'id', displayName: $scope.labels.idLabel }, - { field: 'name', displayName: $scope.labels.nameLabel}] - } - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedProperty = row.entity; - $scope.selectedEnumValue = undefined; - if ($scope.selectedProperty && $scope.selectedProperty.enumValues) { - $scope.enumValues.length = 0; - for (var i = 0; i < $scope.selectedProperty.enumValues.length; i++) { - $scope.enumValues.push($scope.selectedProperty.enumValues[i]); - } - } - }); - }; - - $scope.enumGridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.enumGridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedEnumValue = row.entity; - }); - }; - }); - - // Handler for when the value of the type dropdown changes - $scope.propertyTypeChanged = function () { - - // Check date. If date, show date pattern - if ($scope.selectedProperty.type === 'date') { - $scope.selectedProperty.datePattern = 'MM-dd-yyyy hh:mm'; - } else { - delete $scope.selectedProperty.datePattern; - } - - // Check enum. If enum, show list of options - if ($scope.selectedProperty.type === 'enum') { - $scope.selectedProperty.enumValues = [ {id: 'value1', name: 'Value 1'}, {id: 'value2', name: 'Value 2'}]; - $scope.enumValues.length = 0; - for (var i = 0; i < $scope.selectedProperty.enumValues.length; i++) { - $scope.enumValues.push($scope.selectedProperty.enumValues[i]); - } - - } else { - delete $scope.selectedProperty.enumValues; - $scope.enumValues.length = 0; - } - }; - - // Click handler for add button - var propertyIndex = 1; - $scope.addNewProperty = function () { - var newProperty = { - id: 'new_property_' + propertyIndex++, - name: '', - type: 'string', - readable: true, - writable: true - }; - - $scope.formProperties.push(newProperty); - - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newProperty); - }); - }; - - // Click handler for remove button - $scope.removeProperty = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.formProperties.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - $scope.formProperties.splice(index, 1); - - if ($scope.formProperties.length == 0) { - $scope.selectedProperty = undefined; - } - - $timeout(function() { - if ($scope.formProperties.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.formProperties[0]); - } - }); - } - }; - - // Click handler for up button - $scope.movePropertyUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.formProperties.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.formProperties[index]; - $scope.formProperties.splice(index, 1); - $timeout(function(){ - $scope.formProperties.splice(index + -1, 0, temp); - $timeout(function() { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.movePropertyDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.formProperties.indexOf(selectedItems[0]); - if (index != $scope.formProperties.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.formProperties[index]; - $scope.formProperties.splice(index, 1); - $timeout(function(){ - $scope.formProperties.splice(index + 1, 0, temp); - $timeout(function() { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - $scope.addNewEnumValue = function() { - if ($scope.selectedProperty) { - var newEnumValue = { id : '', name : ''}; - $scope.selectedProperty.enumValues.push(newEnumValue); - $scope.enumValues.push(newEnumValue); - - $timeout(function () { - $scope.enumGridApi.selection.toggleRowSelection(newEnumValue); - }); - } - }; - - // Click handler for remove button - $scope.removeEnumValue = function() { - var selectedItems = $scope.enumGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.enumValues.indexOf(selectedItems[0]); - $scope.enumGridApi.selection.toggleRowSelection(selectedItems[0]); - - $scope.enumValues.splice(index, 1); - $scope.selectedProperty.enumValues.splice(index, 1); - - if ($scope.enumValues.length == 0) { - $scope.selectedEnumValue = undefined; - } - - $timeout(function () { - if ($scope.enumValues.length > 0) { - $scope.enumGridApi.selection.toggleRowSelection($scope.enumValues[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveEnumValueUp = function() { - var selectedItems = $scope.enumGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.enumValues.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.enumValues[index]; - $scope.enumValues.splice(index, 1); - $scope.selectedProperty.enumValues.splice(index, 1); - $timeout(function () { - $scope.enumValues.splice(index + -1, 0, temp); - $scope.selectedProperty.enumValues.splice(index + -1, 0, temp); - $timeout(function () { - $scope.enumGridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveEnumValueDown = function() { - var selectedItems = $scope.enumGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.enumValues.indexOf(selectedItems[0]); - if (index != $scope.enumValues.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.enumValues[index]; - $scope.enumValues.splice(index, 1); - $scope.selectedProperty.enumValues.splice(index, 1); - $timeout(function () { - $scope.enumValues.splice(index + 1, 0, temp); - $scope.selectedProperty.enumValues.splice(index + 1, 0, temp); - $timeout(function () { - $scope.enumGridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.formProperties.length > 0) { - $scope.property.value = {}; - $scope.property.value.formProperties = $scope.formProperties; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.$hide(); - $scope.property.mode = 'read'; - }; - - // Close button handler - $scope.close = function () { - $scope.$hide(); - $scope.property.mode = 'read'; - }; - - }]) -; \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-form-reference-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-form-reference-controller.js deleted file mode 100644 index 6788a1c0a..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-form-reference-controller.js +++ /dev/null @@ -1,261 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -angular.module('flowableModeler').controller('FlowableFormReferenceDisplayCtrl', - [ '$scope', '$modal', '$http', function($scope, $modal, $http) { - - if ($scope.property && $scope.property.value && $scope.property.value.id) { - $http.get(FLOWABLE.CONFIG.contextRoot + '/app/rest/models/' + $scope.property.value.id) - .success( - function(response) { - $scope.form = { - id: response.id, - name: response.name - }; - }); - } - -}]); - -angular.module('flowableModeler').controller('FlowableFormReferenceCtrl', - [ '$scope', '$modal', '$http', function($scope, $modal, $http) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/form-reference-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); -}]); - -angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl', - [ '$rootScope', '$scope', '$http', '$location', 'editorManager', function($rootScope, $scope, $http, $location, editorManager) { - - $scope.state = {'loadingForms' : true, 'formError' : false}; - - $scope.popup = {'state' : 'formReference'}; - - $scope.foldersBreadCrumbs = []; - - // Close button handler - $scope.close = function() { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - // Selecting/deselecting a subprocess - $scope.selectForm = function(form, $event) { - $event.stopPropagation(); - if ($scope.selectedForm && $scope.selectedForm.id && form.id == $scope.selectedForm.id) { - // un-select the current selection - $scope.selectedForm = null; - } else { - $scope.selectedForm = form; - } - }; - - // Saving the selected value - $scope.save = function() { - if ($scope.selectedForm) { - $scope.property.value = { - 'id' : $scope.selectedForm.id, - 'name' : $scope.selectedForm.name, - 'key' : $scope.selectedForm.key - }; - - } else { - $scope.property.value = null; - } - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - // Open the selected value - $scope.open = function() { - if ($scope.selectedForm) { - $scope.property.value = { - 'id' : $scope.selectedForm.id, - 'name' : $scope.selectedForm.name, - 'key' : $scope.selectedForm.key - }; - - $scope.updatePropertyInModel($scope.property); - - var modelMetaData = editorManager.getBaseModelData(); - var json = editorManager.getModel(); - json = JSON.stringify(json); - - var params = { - modeltype: modelMetaData.model.modelType, - json_xml: json, - name: modelMetaData.name, - key: modelMetaData.key, - description: modelMetaData.description, - newversion: false, - lastUpdated: modelMetaData.lastUpdated - }; - - // Update - $http({ method: 'POST', - data: params, - ignoreErrors: true, - headers: {'Accept': 'application/json', - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, - transformRequest: function (obj) { - var str = []; - for (var p in obj) { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); - } - return str.join("&"); - }, - url: FLOWABLE.URL.putModel(modelMetaData.modelId)}) - - .success(function (data, status, headers, config) { - editorManager.handleEvents({ - type: ORYX.CONFIG.EVENT_SAVED - }); - - var allSteps = EDITOR.UTIL.collectSortedElementsFromPrecedingElements($scope.selectedShape); - - $rootScope.addHistoryItem($scope.selectedShape.resourceId); - $location.path('form-editor/' + $scope.selectedForm.id); - - }) - .error(function (data, status, headers, config) { - - }); - - $scope.close(); - } - }; - - $scope.newForm = function() { - $scope.popup.state = 'newForm'; - - var modelMetaData = editorManager.getBaseModelData(); - - $scope.model = { - loading: false, - form: { - name: '', - key: '', - description: '', - modelType: 2 - } - }; - }; - - $scope.createForm = function() { - - if (!$scope.model.form.name || $scope.model.form.name.length == 0 || - !$scope.model.form.key || $scope.model.form.key.length == 0) { - - return; - } - - $scope.model.loading = true; - - $http({method: 'POST', url: FLOWABLE.CONFIG.contextRoot + '/app/rest/models', data: $scope.model.form}). - success(function(data, status, headers, config) { - - var newFormId = data.id; - $scope.property.value = { - 'id' : newFormId, - 'name' : data.name, - 'key' : data.key - }; - $scope.updatePropertyInModel($scope.property); - - var modelMetaData = editorManager.getBaseModelData(); - var json = editorManager.getModel(); - json = JSON.stringify(json); - - var params = { - modeltype: modelMetaData.model.modelType, - json_xml: json, - name: modelMetaData.name, - key: modelMetaData.key, - description: modelMetaData.description, - newversion: false, - lastUpdated: modelMetaData.lastUpdated - }; - - // Update - $http({ method: 'POST', - data: params, - ignoreErrors: true, - headers: {'Accept': 'application/json', - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, - transformRequest: function (obj) { - var str = []; - for (var p in obj) { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); - } - return str.join("&"); - }, - url: FLOWABLE.URL.putModel(modelMetaData.modelId)}) - - .success(function (data, status, headers, config) { - editorManager.handleEvents({ - type: ORYX.CONFIG.EVENT_SAVED - }); - - $scope.model.loading = false; - $scope.$hide(); - - var allSteps = EDITOR.UTIL.collectSortedElementsFromPrecedingElements($scope.selectedShape); - - $rootScope.addHistoryItem($scope.selectedShape.resourceId); - $location.path('form-editor/' + newFormId); - - }) - .error(function (data, status, headers, config) { - $scope.model.loading = false; - $scope.$hide(); - }); - - }). - error(function(data, status, headers, config) { - $scope.model.loading = false; - $scope.model.errorMessage = data.message; - }); - }; - - $scope.cancel = function() { - $scope.close(); - }; - - $scope.loadForms = function() { - var modelMetaData = editorManager.getBaseModelData(); - $http.get(FLOWABLE.CONFIG.contextRoot + '/app/rest/form-models') - .success( - function(response) { - $scope.state.loadingForms = false; - $scope.state.formError = false; - $scope.forms = response.data; - }) - .error( - function(data, status, headers, config) { - $scope.state.loadingForms = false; - $scope.state.formError = true; - }); - }; - - if ($scope.property && $scope.property.value && $scope.property.value.id) { - $scope.selectedForm = $scope.property.value; - } - - $scope.loadForms(); -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-in-parameters-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-in-parameters-controller.js deleted file mode 100644 index 801a30750..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-in-parameters-controller.js +++ /dev/null @@ -1,179 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Input parameters for call activity - */ - -angular.module('flowableModeler').controller('FlowableInParametersCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/in-parameters-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -angular.module('flowableModeler').controller('FlowableInParametersPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.inParameters !== undefined - && $scope.property.value.inParameters !== null) { - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happened - $scope.parameters = angular.copy($scope.property.value.inParameters); - } else { - $scope.parameters = []; - } - - $scope.translationsRetrieved = false; - $scope.labels = {}; - - var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE'); - var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION'); - var targetPromise = $translate('PROPERTY.PARAMETER.TARGET'); - - $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function (results) { - $scope.labels.sourceLabel = results[0]; - $scope.labels.sourceExpressionLabel = results[1]; - $scope.labels.targetLabel = results[2]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.parameters, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'source', displayName: $scope.labels.sourceLabel}, - {field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel}, - {field: 'target', displayName: $scope.labels.targetLabel}] - }; - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedParameter = row.entity; - }); - }; - }); - - // Click handler for add button - $scope.addNewParameter = function () { - var newParameter = { - source: '', - sourceExpression: '', - target: '' - }; - - $scope.parameters.push(newParameter); - - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newParameter); - }); - }; - - // Click handler for remove button - $scope.removeParameter = function () { - - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.parameters.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - $scope.parameters.splice(index, 1); - - if ($scope.parameters.length == 0) { - $scope.selectedParameter = undefined; - } - - $timeout(function () { - if ($scope.parameters.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.parameters[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveParameterUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.parameters.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.parameters[index]; - $scope.parameters.splice(index, 1); - $timeout(function () { - $scope.parameters.splice(index + -1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveParameterDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.parameters.indexOf(selectedItems[0]); - if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.parameters[index]; - $scope.parameters.splice(index, 1); - $timeout(function () { - $scope.parameters.splice(index + 1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.parameters.length > 0) { - $scope.property.value = {}; - $scope.property.value.inParameters = $scope.parameters; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.close(); - }; - - // Close button handler - $scope.close = function () { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - }]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-message-scope-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-message-scope-controller.js deleted file mode 100644 index 91f690b06..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-message-scope-controller.js +++ /dev/null @@ -1,41 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -angular.module('flowableModeler').controller('FlowableMessageRefCtrl', [ '$scope', function($scope) { - - // Find the parent shape on which the message definitions are defined - var messageDefinitionsProperty = undefined; - var parent = $scope.selectedShape; - while (parent !== null && parent !== undefined && messageDefinitionsProperty === undefined) { - if (parent.properties && parent.properties.get('oryx-messagedefinitions')) { - messageDefinitionsProperty = parent.properties.get('oryx-messagedefinitions'); - } else { - parent = parent.parent; - } - } - - try { - messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty); - if (typeof messageDefinitionsProperty == 'string') { - messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty); - } - } catch (err) { - // Do nothing here, just to be sure we try-catch it - } - - $scope.messageDefinitions = messageDefinitionsProperty; - - - $scope.messageChanged = function() { - $scope.updatePropertyInModel($scope.property); - }; -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-multiinstance-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-multiinstance-controller.js deleted file mode 100644 index 37e53bf05..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-multiinstance-controller.js +++ /dev/null @@ -1,28 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Execution listeners - */ - -angular.module('flowableModeler').controller('FlowableMultiInstanceCtrl', [ '$scope', function($scope) { - - if ($scope.property.value == undefined && $scope.property.value == null) - { - $scope.property.value = 'None'; - } - - $scope.multiInstanceChanged = function() { - $scope.updatePropertyInModel($scope.property); - }; -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-ordering-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-ordering-controller.js deleted file mode 100644 index 241dfc72a..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-ordering-controller.js +++ /dev/null @@ -1,28 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Adhoc sub process ordering property - */ - -angular.module('flowableModeler').controller('FlowableOrderingCtrl', [ '$scope', function($scope) { - - if ($scope.property.value == undefined && $scope.property.value == null) - { - $scope.property.value = 'Parallel'; - } - - $scope.orderingChanged = function() { - $scope.updatePropertyInModel($scope.property); - }; -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-out-parameters-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-out-parameters-controller.js deleted file mode 100644 index 1417a746e..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-out-parameters-controller.js +++ /dev/null @@ -1,176 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Input parameters for call activity - */ - -angular.module('flowableModeler').controller('FlowableOutParametersCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/out-parameters-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -angular.module('flowableModeler').controller('FlowableOutParametersPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.outParameters !== undefined - && $scope.property.value.outParameters !== null) { - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happened - $scope.parameters = angular.copy($scope.property.value.outParameters); - } else { - $scope.parameters = []; - } - - $scope.translationsRetrieved = false; - $scope.labels = {}; - - var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE'); - var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION'); - var targetPromise = $translate('PROPERTY.PARAMETER.TARGET'); - - $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function (results) { - $scope.labels.sourceLabel = results[0]; - $scope.labels.sourceExpressionLabel = results[1]; - $scope.labels.targetLabel = results[2]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.parameters, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'source', displayName: $scope.labels.sourceLabel}, - {field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel}, - {field: 'target', displayName: $scope.labels.targetLabel}] - }; - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedParameter = row.entity; - }); - }; - }); - - // Click handler for add button - $scope.addNewParameter = function () { - var newParameter = { - source: '', - sourceExpression: '', - target: ''}; - - $scope.parameters.push(newParameter); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newParameter); - }); - }; - - // Click handler for remove button - $scope.removeParameter = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.parameters.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - $scope.parameters.splice(index, 1); - - if ($scope.parameters.length == 0) { - $scope.selectedParameter = undefined; - } - - $timeout(function () { - if ($scope.parameters.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.parameters[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveParameterUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.parameters.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.parameters[index]; - $scope.parameters.splice(index, 1); - $timeout(function () { - $scope.parameters.splice(index + -1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveParameterDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.parameters.indexOf(selectedItems[0]); - if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.parameters[index]; - $scope.parameters.splice(index, 1); - $timeout(function () { - $scope.parameters.splice(index + 1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.parameters.length > 0) { - $scope.property.value = {}; - $scope.property.value.outParameters = $scope.parameters; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.close(); - }; - - // Close button handler - $scope.close = function () { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - }]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-signal-scope-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-signal-scope-controller.js deleted file mode 100644 index c16199147..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-signal-scope-controller.js +++ /dev/null @@ -1,42 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -angular.module('flowableModeler').controller('FlowableSignalRefCtrl', [ '$scope', function($scope) { - - // Find the parent shape on which the signal definitions are defined - var signalDefinitionsProperty = undefined; - var parent = $scope.selectedShape; - while (parent !== null && parent !== undefined && signalDefinitionsProperty === undefined) { - if (parent.properties && parent.properties.get('oryx-signaldefinitions')) { - signalDefinitionsProperty = parent.properties.get('oryx-signaldefinitions'); - } else { - parent = parent.parent; - } - } - - try { - signalDefinitionsProperty = JSON.parse(signalDefinitionsProperty); - if (typeof signalDefinitionsProperty == 'string') { - signalDefinitionsProperty = JSON.parse(signalDefinitionsProperty); - } - } catch (err) { - // Do nothing here, just to be sure we try-catch it - } - - $scope.signalDefinitions = signalDefinitionsProperty; - - - $scope.signalChanged = function() { - $scope.updatePropertyInModel($scope.property); - }; -}]); \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-task-listeners-controller.js b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-task-listeners-controller.js deleted file mode 100644 index 1c5717dac..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties-task-listeners-controller.js +++ /dev/null @@ -1,356 +0,0 @@ -/* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Task listeners - */ - -angular.module('flowableModeler').controller('FlowableTaskListenersCtrl', - ['$scope', '$modal', '$timeout', '$translate', function ($scope, $modal, $timeout, $translate) { - - // Config for the modal window - var opts = { - template: 'editor-app/configuration/properties/task-listeners-popup.html?version=' + Date.now(), - scope: $scope - }; - - // Open the dialog - _internalCreateModal(opts, $modal, $scope); - }]); - -angular.module('flowableModeler').controller('FlowableTaskListenersPopupCtrl', - ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { - - // Put json representing form properties on scope - if ($scope.property.value !== undefined && $scope.property.value !== null - && $scope.property.value.taskListeners !== undefined - && $scope.property.value.taskListeners !== null) { - - if ($scope.property.value.taskListeners.constructor == String) { - $scope.taskListeners = JSON.parse($scope.property.value.taskListeners); - } - else { - // Note that we clone the json object rather then setting it directly, - // this to cope with the fact that the user can click the cancel button and no changes should have happened - $scope.taskListeners = angular.copy($scope.property.value.taskListeners); - } - - for (var i = 0; i < $scope.taskListeners.length; i++) { - var taskListener = $scope.taskListeners[i]; - if (taskListener.className !== undefined && taskListener.className !== '') { - taskListener.implementation = taskListener.className; - } - else if (taskListener.expression !== undefined && taskListener.expression !== '') { - taskListener.implementation = taskListener.expression; - } - else if (taskListener.delegateExpression !== undefined && taskListener.delegateExpression !== '') { - taskListener.implementation = taskListener.delegateExpression; - } - } - } else { - $scope.taskListeners = []; - } - - $scope.selectedListener = undefined; - $scope.selectedField = undefined; - $scope.fields = []; - $scope.translationsRetrieved = false; - - $scope.labels = {}; - - var eventPromise = $translate('PROPERTY.TASKLISTENERS.EVENT'); - var implementationPromise = $translate('PROPERTY.TASKLISTENERS.FIELDS.IMPLEMENTATION'); - var namePromise = $translate('PROPERTY.TASKLISTENERS.FIELDS.NAME'); - - $q.all([eventPromise, implementationPromise, namePromise]).then(function (results) { - $scope.labels.eventLabel = results[0]; - $scope.labels.implementationLabel = results[1]; - $scope.labels.nameLabel = results[2]; - $scope.translationsRetrieved = true; - - // Config for grid - $scope.gridOptions = { - data: $scope.taskListeners, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - enableHorizontalScrollbar: 0, - enableColumnMenus: false, - enableSorting: false, - columnDefs: [{field: 'event', displayName: $scope.labels.eventLabel}, - {field: 'implementation', displayName: $scope.labels.implementationLabel}] - }; - - $scope.gridOptions.onRegisterApi = function (gridApi) { - //set gridApi on scope - $scope.gridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedListener = row.entity; - $scope.selectedField = undefined; - if ($scope.selectedListener) { - var fields = $scope.selectedListener.fields; - if (fields !== undefined && fields !== null) { - for (var i = 0; i < fields.length; i++) { - var field = fields[i]; - if (field.stringValue !== undefined && field.stringValue !== '') { - field.implementation = field.stringValue; - } else if (field.expression !== undefined && field.expression !== '') { - field.implementation = field.expression; - } else if (field.string !== undefined && field.string !== '') { - field.implementation = field.string; - } - } - } else { - $scope.selectedListener.fields = []; - } - - $scope.fields.length = 0; - for (var i = 0; i < $scope.selectedListener.fields.length; i++) { - $scope.fields.push($scope.selectedListener.fields[i]); - } - } - }); - }; - - // Config for field grid - $scope.gridFieldOptions = { - data: $scope.fields, - headerRowHeight: 28, - enableRowSelection: true, - enableRowHeaderSelection: false, - multiSelect: false, - modifierKeysToMultiSelect: false, - columnDefs: [{field: 'name', displayName: $scope.labels.name}, - {field: 'implementation', displayName: $scope.labels.implementationLabel}] - }; - - $scope.gridFieldOptions.onRegisterApi = function (gridApi) { - // set gridApi on scope - $scope.fieldGridApi = gridApi; - gridApi.selection.on.rowSelectionChanged($scope, function (row) { - $scope.selectedField = row.entity; - }); - }; - }); - - $scope.listenerDetailsChanged = function () { - if ($scope.selectedListener.className !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.className; - } else if ($scope.selectedListener.expression !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.expression; - } else if ($scope.selectedListener.delegateExpression !== '') { - $scope.selectedListener.implementation = $scope.selectedListener.delegateExpression; - } else { - $scope.selectedListener.implementation = ''; - } - }; - - // Click handler for add button - $scope.addNewListener = function () { - var newListener = { - event: 'create', - implementation: '', - className: '', - expression: '', - delegateExpression: '' - }; - $scope.taskListeners.push(newListener); - - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(newListener); - }); - }; - - // Click handler for remove button - $scope.removeListener = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.taskListeners.indexOf(selectedItems[0]); - $scope.gridApi.selection.toggleRowSelection(selectedItems[0]); - - $scope.taskListeners.splice(index, 1); - - if ($scope.taskListeners.length == 0) { - $scope.selectedListener = undefined; - } - - $timeout(function () { - if ($scope.taskListeners.length > 0) { - $scope.gridApi.selection.toggleRowSelection($scope.taskListeners[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveListenerUp = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.taskListeners.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.taskListeners[index]; - $scope.taskListeners.splice(index, 1); - $timeout(function () { - $scope.taskListeners.splice(index + -1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for down button - $scope.moveListenerDown = function () { - var selectedItems = $scope.gridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.taskListeners.indexOf(selectedItems[0]); - if (index != $scope.taskListeners.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.taskListeners[index]; - $scope.taskListeners.splice(index, 1); - $timeout(function () { - $scope.taskListeners.splice(index + 1, 0, temp); - $timeout(function () { - $scope.gridApi.selection.toggleRowSelection(temp); - }); - }); - - } - } - }; - - $scope.fieldDetailsChanged = function () { - if ($scope.selectedField.stringValue != '') { - $scope.selectedField.implementation = $scope.selectedField.stringValue; - } else if ($scope.selectedField.expression != '') { - $scope.selectedField.implementation = $scope.selectedField.expression; - } else if ($scope.selectedField.string != '') { - $scope.selectedField.implementation = $scope.selectedField.string; - } else { - $scope.selectedField.implementation = ''; - } - }; - - // Click handler for add button - $scope.addNewField = function () { - if ($scope.selectedListener) { - if ($scope.selectedListener.fields == undefined) { - $scope.selectedListener.fields = []; - } - - var newField = { - name: 'fieldName', - implementation: '', - stringValue: '', - expression: '', - string: '' - }; - $scope.fields.push(newField); - $scope.selectedListener.fields.push(newField); - - $timeout(function () { - $scope.fieldGridApi.selection.toggleRowSelection(newField); - }); - } - }; - - // Click handler for remove button - $scope.removeField = function () { - var selectedItems = $scope.fieldGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - $scope.fieldGridApi.selection.toggleRowSelection(selectedItems[0]); - - $scope.fields.splice(index, 1); - $scope.selectedListener.fields.splice(index, 1); - - if ($scope.fields.length == 0) { - $scope.selectedField = undefined; - } - - $timeout(function () { - if ($scope.fields.length > 0) { - $scope.fieldGridApi.selection.toggleRowSelection($scope.fields[0]); - } - }); - } - }; - - // Click handler for up button - $scope.moveFieldUp = function () { - var selectedItems = $scope.fieldGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - if (index != 0) { // If it's the first, no moving up of course - var temp = $scope.fields[index]; - $scope.fields.splice(index, 1); - $scope.selectedListener.fields.splice(index, 1); - $timeout(function () { - $scope.fields.splice(index + -1, 0, temp); - $scope.selectedListener.fields.splice(index + -1, 0, temp); - $timeout(function () { - $scope.fieldGridApi.selection.toggleRowSelection(temp); - }); - }); - - } - } - }; - - // Click handler for down button - $scope.moveFieldDown = function () { - var selectedItems = $scope.fieldGridApi.selection.getSelectedRows(); - if (selectedItems && selectedItems.length > 0) { - var index = $scope.fields.indexOf(selectedItems[0]); - if (index != $scope.fields.length - 1) { // If it's the last element, no moving down of course - var temp = $scope.fields[index]; - $scope.fields.splice(index, 1); - $scope.selectedListeners.fields.splice(index, 1); - $timeout(function () { - $scope.fields.splice(index + 1, 0, temp); - $scope.selectedListener.fields.splice(index + 1, 0, temp); - $timeout(function () { - $scope.fieldGridApi.selection.toggleRowSelection(temp); - }); - }); - } - } - }; - - // Click handler for save button - $scope.save = function () { - - if ($scope.taskListeners.length > 0) { - $scope.property.value = {}; - $scope.property.value.taskListeners = $scope.taskListeners; - } else { - $scope.property.value = null; - } - - $scope.updatePropertyInModel($scope.property); - $scope.close(); - }; - - $scope.cancel = function () { - $scope.close(); - }; - - // Close button handler - $scope.close = function () { - $scope.property.mode = 'read'; - $scope.$hide(); - }; - - }]); diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties/assignment-display-template.html b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties/assignment-display-template.html deleted file mode 100644 index bbe698938..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties/assignment-display-template.html +++ /dev/null @@ -1,15 +0,0 @@ - -{{'PROPERTY.ASSIGNMENT.ASSIGNEE_DISPLAY' | translate:property.value.assignment }} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.candidateUsers}} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.candidateGroups}} -{{'PROPERTY.ASSIGNMENT.USER_IDM_DISPLAY' | translate:property.value.assignment.idm.assignee }} -{{'PROPERTY.ASSIGNMENT.USER_IDM_EMAIL_DISPLAY' | translate:property.value.assignment.idm.assignee }} -{{'PROPERTY.ASSIGNMENT.USER_IDM_FIELD_DISPLAY' | translate:property.value.assignment.idm.assigneeField }} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.idm.candidateUsers}} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.idm.candidateGroups}} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.idm.candidateUserFields}} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.idm.candidateGroupFields}} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.idm.candidateUserFields.concat(property.value.assignment.idm.candidateUsers)}} -{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.idm.candidateGroupFields.concat(property.value.assignment.idm.candidateGroups)}} -PROPERTY.ASSIGNMENT.EMPTY -PROPERTY.ASSIGNMENT.IDM_EMPTY \ No newline at end of file diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties/assignment-popup.html b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties/assignment-popup.html deleted file mode 100644 index 8089e4580..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-flowable-modeler/src/main/resources/static/workflow/modeler/editor/editor-app/configuration/properties/assignment-popup.html +++ /dev/null @@ -1,268 +0,0 @@ -