Commit 9e01a2cd by yuwei

项目初始化

parent 17703326
/* 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 _drawHumanTaskIcon(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 _drawCaseTaskIcon(paper, startX, startY)
{
var path1 = paper.path("M5 8 L9 4 L18 4 L 21 7");
path1.attr({
"opacity": 1,
"stroke": "#000000",
"fill": "#000000"
});
var path2 = paper.path("M1 23 L1 4 L30 4 L30 23z");
path2.attr({
"opacity": 1,
"stroke": "#000000",
"fill": "#F4F6F7"
});
var caseTaskIcon = paper.set();
caseTaskIcon.push(path1);
caseTaskIcon.push(path2);
caseTaskIcon.translate(startX, startY);
caseTaskIcon.scale(0.7, 0.7);
}
function _drawProcessTaskIcon(paper, startX, startY)
{
var path1 = paper.path("M1 23 L7 11 L1 0 L30 0 L 35 11 L 30 23z");
path1.attr({
"opacity": 1,
"stroke": "#000000",
"fill": "#F4F6F7"
});
var processTaskIcon = paper.set();
processTaskIcon.push(path1);
processTaskIcon.translate(startX, startY);
processTaskIcon.scale(0.7, 0.7);
}
function _drawDecisionTaskIcon(paper, startX, startY)
{
var path1 = paper.path("m 1,2 0,14 16,0 0,-14 z m 1.9,2.4000386 3.7,0 0,2.7999224 -3.7,0 z m 4.36364,0 3.7,0 0,2.7999224 -3.7,0 z m 4.36364,0 3.7,0 0,2.7999224 -3.7,0 z m -8.67364,3.9 3.7,0 0,2.7999224 -3.7,0 z m 4.36364,0 3.7,0 0,2.7999224 -3.7,0 z m 4.36364,0 3.7,0 0,2.7999224 -3.7,0 z m -8.67364,3.9 3.7,0 0,2.7999224 -3.7,0 z m 4.36364,0 3.7,0 0,2.7999224 -3.7,0 z m 4.36364,0 3.7,0 0,2.7999224 -3.7,0 z");
path1.attr({
"opacity": 1,
"stroke": "#000000",
"fill": "#F4F6F7"
});
var decisionTaskIcon = paper.set();
decisionTaskIcon.push(path1);
decisionTaskIcon.translate(startX, startY);
decisionTaskIcon.scale(0.7, 0.7);
}
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 _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 _drawTimerEventListenerIcon(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 _drawUserEventListenerIcon(paper, element) {
var userTaskIcon = paper.set();
var path1 = paper.path("M0.585,24.167h24.083v-7.833c0,0-2.333-3.917-7.083-5.167h-9.25 c-4.417,1.333-7.833,5.75-7.833,5.75L0.585,24.167z");
path1.attr({"opacity": 1, "stroke": "none", "fill": "#F4F6F7"});
userTaskIcon.push(path1);
var path2 = paper.path("M6,20L6,24");
path2.attr({"opacity": 1, "stroke": "white", "fill": "none"});
userTaskIcon.push(path2);
var path3 = paper.path("M20,20L20,24");
path3.attr({"opacity": 1, "stroke": "white", "fill": "none"});
userTaskIcon.push(path3);
var circle = paper.circle(13.002, 5.916, 5.417);
circle.attr({"stroke-width": 1, "stroke": "black", "fill": "#000000"});
userTaskIcon.push(circle);
var path4 = paper.path("M8.043,7.083c0,0,2.814-2.426,5.376-1.807s4.624-0.693,4.624-0.693 c0.25,1.688,0.042,3.75-1.458,5.584c0,0,1.083,0.75,1.083,1.5s0.125,1.875-1,3s-5.5,1.25-6.75,0S8.668,12.834,8.668,12 s0.583-1.25,1.25-1.917C8.835,9.5,7.419,7.708,8.043,7.083z");
path4.attr({"opacity": 1, "stroke": "none", "fill": "#F0EFF0"});
userTaskIcon.push(path4);
var x = (element.width / 2) - 2;
var y = (element.height / 2) - 2;
var circle2 = paper.circle(x, y, 17);
circle2.attr({"stroke-width": 1, "stroke": "#F0EFF0", "fill": "none"});
userTaskIcon.push(circle2);
userTaskIcon.transform("S0.7,0.7" + "T" + (element.x + 2) + "," + (element.y + 2));
return userTaskIcon;
}
div[class*='ui-tooltip-flowable-'] {
background-color: #ffffff;
border-color: #c5c5c5;
color: #4a4a4a;
font-family: Verdana;
font-size: 12px;
}
div[class*='ui-tooltip-flowable-'] .qtip-content {
color: #4a4a4a;
background-color: #ffffff;
font-family: Verdana;
font-size: 12px;
}
.ui-tooltip-flowable-cmmn .qtip-titlebar {
color: #FFFFFF;
font-size: 12px;
background: #2B414F;
}
.ui-tooltip-flowable-cmmn .qtip-tip {
background-color: #2B414F;
}
<html>
<head>
<link type="text/css" rel="stylesheet" href="display/jquery.qtip.min.css" />
<link type="text/css" rel="stylesheet" href="display-cmmn/displaymodel.css" />
<script type="text/javascript" src="display/jquery.qtip.min.js"></script>
<script type="text/javascript" src="display/raphael.min.js"></script>
<script type="text/javascript" src="display-cmmn/cmmn-draw.js"></script>
<script type="text/javascript" src="display-cmmn/cmmn-icons.js"></script>
<script type="text/javascript" src="display/Polyline.js"></script>
<script type="text/javascript" src="display-cmmn/displaymodel.js"></script>
</head>
</html>
\ No newline at end of file
/* 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 ASSOCIATION_STROKE = 2;
var TASK_STROKE = 1;
var TASK_HIGHLIGHT_STROKE = 2;
var TEXT_COLOR= "#373e48";
var CURRENT_COLOR= "#017501";
var HOVER_COLOR= "#666666";
var ACTIVITY_STROKE_COLOR = "#bbbbbb";
var ACTIVITY_FILL_COLOR = "#f9f9f9";
var WHITE_FILL_COLOR = "#ffffff";
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('#cmmnModel');
var modelId = modelDiv.attr('data-model-id');
var historyModelId = modelDiv.attr('data-history-id');
var caseDefinitionId = modelDiv.attr('data-case-definition-id');
var modelType = modelDiv.attr('data-model-type');
var elementsAdded = new Array();
var elementsRemoved = new Array();
function _showTip(htmlNode, element)
{
// Default tooltip, no custom tool tip set
if (documentation === undefined) {
var documentation = "";
if (element.name && element.name.length > 0) {
documentation += "<b>Name</b>: <i>" + element.name + "</i><br/><br/>";
}
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 += '<b>' + propName + '</b>:<br/>';
for (var j = 0; j < element.properties[i].value.length; j++) {
documentation += '<i>' + element.properties[i].value[j] + '</i><br/>';
}
}
else {
documentation += '<b>' + propName + '</b>: <i>' + element.properties[i].value + '</i><br/>';
}
}
}
}
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('#cmmnModel')
},
hide: {
fixed: true, delay: 500,
event: 'click mouseleave'
},
style: {
classes: 'ui-tooltip-flowable-cmmn'
}
});
}
function _addHoverLogic(element, type, defaultColor)
{
var strokeColor = _cmmnGetColor(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.APP_URL.getCaseInstancesHistoryModelJsonUrl(historyModelId);
} else {
modelUrl = FLOWABLE.APP_URL.getCaseInstancesModelJsonUrl(modelId);
}
} else if (modelType == 'design') {
if (historyModelId) {
modelUrl = FLOWABLE.APP_URL.getModelHistoryModelJsonUrl(modelId, historyModelId);
} else {
modelUrl = FLOWABLE.APP_URL.getModelModelJsonUrl(modelId);
}
} else if (modelType == 'case-definition') {
modelUrl = FLOWABLE.APP_URL.getCaseDefinitionModelJsonUrl(caseDefinitionId);
}
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('#cmmnModel').css('marginTop', offsetY);
}
jQuery('#cmmnModel').width(INITIAL_CANVAS_WIDTH);
jQuery('#cmmnModel').height(INITIAL_CANVAS_HEIGHT);
paper = Raphael(document.getElementById('cmmnModel'), canvasWidth, canvasHeight);
paper.setViewBox(0, 0, viewBoxWidth, viewBoxHeight, false);
paper.renderfix();
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];
_drawAssociation(flow);
}
}
});
request.error(function(jqXHR, textStatus, errorThrown) {
alert("error");
});
/* 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
/* 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) {
if (services.editorManager && services.editorManager.getStencilData()) {
var stencilNameSpace = services.editorManager.getStencilData().namespace;
if (stencilNameSpace !== undefined && stencilNameSpace !== null && stencilNameSpace.indexOf('cmmn1.1') !== -1) {
services.$location.path("/casemodels");
return;
}
}
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"
}
);
/* 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.
*/
/*
* Call activity calledElement type property
*/
angular.module('flowableModeler').controller('FlowableCalledElementTypeCtrl', [ '$scope', function($scope) {
if ($scope.property.value == undefined && $scope.property.value == null)
{
$scope.property.value = 'key';
}
$scope.calledElementTypeChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
/* 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('FlowableCaseReferenceCtrl',
[ '$scope', '$modal', '$http', function($scope, $modal, $http) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/case-reference-popup.html?version=' + Date.now(),
scope: $scope
};
// Open the dialog
_internalCreateModal(opts, $modal, $scope);
}]);
angular.module('flowableModeler').controller('FlowableCaseReferencePopupCtrl', [ '$scope', '$http', 'editorManager', function($scope, $http, editorManager) {
$scope.state = {'loadingCases' : true, 'error' : false};
// Close button handler
$scope.close = function() {
$scope.property.mode = 'read';
$scope.$hide();
};
// Selecting/deselecting a case
$scope.selectCase = function(caseModel, $event) {
$event.stopPropagation();
if ($scope.selectedCase && $scope.selectedCase.id && caseModel.id == $scope.selectedCase.id) {
// un-select the current selection
$scope.selectedCase = null;
} else {
$scope.selectedCase = caseModel;
}
};
// Saving the selected value
$scope.save = function() {
if ($scope.selectedCase) {
$scope.property.value = {'id' : $scope.selectedCase.id, 'name' : $scope.selectedCase.name};
} else {
$scope.property.value = null;
}
$scope.updatePropertyInModel($scope.property);
$scope.close();
};
$scope.loadCases = function() {
var modelMetaData = editorManager.getBaseModelData();
$http.get(FLOWABLE.APP_URL.getCaseModelsUrl('?excludeId=' + modelMetaData.modelId))
.success(
function(response) {
$scope.state.loadingCases = false;
$scope.state.caseError = false;
$scope.caseModels = response.data;
})
.error(
function(data, status, headers, config) {
$scope.state.loadingCases = false;
$scope.state.caseError = true;
});
};
if ($scope.property && $scope.property.value && $scope.property.value.id) {
$scope.selectedCase = $scope.property.value;
}
$scope.loadCases();
}]);
/* 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
/* 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.
*/
/* 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.
*/
/*
* String controller
*/
angular.module('flowableModeler').controller('FlowableStringPropertyCtrl', [ '$scope', function ($scope) {
$scope.shapeId = $scope.selectedShape.id;
$scope.valueFlushed = false;
/** Handler called when input field is blurred */
$scope.inputBlurred = function() {
$scope.valueFlushed = true;
if ($scope.property.value) {
$scope.property.value = $scope.property.value.replace(/(<([^>]+)>)/ig,"");
}
$scope.updatePropertyInModel($scope.property);
};
$scope.enterPressed = function(keyEvent) {
// if enter is pressed
if (keyEvent && keyEvent.which === 13) {
keyEvent.preventDefault();
$scope.inputBlurred(); // we want to do the same as if the user would blur the input field
}
// else; do nothing
};
$scope.$on('$destroy', function controllerDestroyed() {
if(!$scope.valueFlushed) {
if ($scope.property.value) {
$scope.property.value = $scope.property.value.replace(/(<([^>]+)>)/ig,"");
}
$scope.updatePropertyInModel($scope.property, $scope.shapeId);
}
});
}]);
/*
* Boolean controller
*/
angular.module('flowableModeler').controller('FlowableBooleanPropertyCtrl', ['$scope', function ($scope) {
$scope.changeValue = function() {
if ($scope.property.key === 'oryx-defaultflow' && $scope.property.value) {
var selectedShape = $scope.selectedShape;
if (selectedShape) {
var incomingNodes = selectedShape.getIncomingShapes();
if (incomingNodes && incomingNodes.length > 0) {
// get first node, since there can be only one for a sequence flow
var rootNode = incomingNodes[0];
var flows = rootNode.getOutgoingShapes();
if (flows && flows.length > 1) {
// in case there are more flows, check if another flow is already defined as default
for (var i = 0; i < flows.length; i++) {
if (flows[i].resourceId != selectedShape.resourceId) {
var defaultFlowProp = flows[i].properties.get('oryx-defaultflow');
if (defaultFlowProp) {
flows[i].setProperty('oryx-defaultflow', false, true);
}
}
}
}
}
}
}
$scope.updatePropertyInModel($scope.property);
};
}]);
/*
* Text controller
*/
angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$scope', '$modal', '$timeout', function($scope, $modal, $timeout) {
var opts = {
template: 'editor-app/configuration/properties/text-popup.html?version=' + Date.now(),
scope: $scope,
prefixEvent: 'textModalEvent'
};
$scope.$on('textModalEvent.hide.before', function() {
$timeout(function() {
$scope.property.mode = 'read';
}, 0);
});
// Open the dialog
_internalCreateModal(opts, $modal, $scope);
}]);
angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['$scope', function($scope) {
$scope.save = function() {
$scope.updatePropertyInModel($scope.property);
$scope.close();
};
$scope.close = function() {
$scope.property.mode = 'read';
$scope.$hide();
};
}]);
\ No newline at end of file
/* 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();
};
}]);
/* 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.
*/
/*
* Escalation definitions
*/
angular.module('flowableModeler').controller('FlowableEscalationDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/escalation-definitions-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('FlowableEscalationDefinitionsPopupCtrl',
['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) {
// Put json representing signal definitions on scope
if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) {
if ($scope.property.value.constructor == String) {
$scope.escalationDefinitions = JSON.parse($scope.property.value);
}
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.escalationDefinitions = angular.copy($scope.property.value);
}
} else {
$scope.escalationDefinitions = [];
}
// Array to contain selected signal definitions (yes - we only can select one, but ng-grid isn't smart enough)
$scope.selectedEscalationDefinition = undefined;
$scope.translationsRetrieved = false;
$scope.labels = {};
var idPromise = $translate('PROPERTY.ESCALATIONDEFINITIONS.ID');
var namePromise = $translate('PROPERTY.ESCALATIONDEFINITIONS.NAME');
$q.all([idPromise, namePromise]).then(function (results) {
$scope.labels.idLabel = results[0];
$scope.labels.nameLabel = results[1];
$scope.translationsRetrieved = true;
// Config for grid
$scope.gridOptions = {
data: $scope.escalationDefinitions,
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.selectedEscalationDefinition = row.entity;
});
};
});
// Click handler for add button
$scope.addNewEscalationDefinition = function () {
var newEscalationDefinition = {id: '', name: ''};
$scope.escalationDefinitions.push(newEscalationDefinition);
$timeout(function () {
$scope.gridApi.selection.toggleRowSelection(newEscalationDefinition);
});
};
// Click handler for remove button
$scope.removeEscalationDefinition = function () {
var selectedItems = $scope.gridApi.selection.getSelectedRows();
if (selectedItems && selectedItems.length > 0) {
var index = $scope.escalationDefinitions.indexOf(selectedItems[0]);
$scope.gridApi.selection.toggleRowSelection(selectedItems[0]);
$scope.escalationDefinitions.splice(index, 1);
if ($scope.escalationDefinitions.length == 0) {
$scope.selectedEscalationDefinition = undefined;
}
$timeout(function () {
if ($scope.escalationDefinitions.length > 0) {
$scope.gridApi.selection.toggleRowSelection($scope.escalationDefinitions[0]);
}
});
}
};
// Click handler for save button
$scope.save = function () {
if ($scope.escalationDefinitions.length > 0) {
$scope.property.value = $scope.escalationDefinitions;
} 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();
};
}]);
\ No newline at end of file
/* 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('FlowableEscalationRefCtrl', [ '$scope', function($scope) {
// Find the parent shape on which the signal definitions are defined
var escalationDefinitionsProperty = undefined;
var parent = $scope.selectedShape;
while (parent !== null && parent !== undefined && escalationDefinitionsProperty === undefined) {
if (parent.properties && parent.properties.get('oryx-escalationdefinitions')) {
escalationDefinitionsProperty = parent.properties.get('oryx-escalationdefinitions');
} else {
parent = parent.parent;
}
}
try {
escalationDefinitionsProperty = JSON.parse(escalationDefinitionsProperty);
if (typeof escalationDefinitionsProperty == 'string') {
escalationDefinitionsProperty = JSON.parse(escalationDefinitionsProperty);
}
} catch (err) {
// Do nothing here, just to be sure we try-catch it
}
$scope.escalationDefinitions = escalationDefinitionsProperty;
$scope.escalationChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
/* 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();
};
}]);
/* 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.APP_URL.getModelUrl($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.APP_URL.getModelsUrl(), 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.APP_URL.getFormModelsUrl())
.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();
}]);
/* 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('FlowableHttpRequestMethodCtrl', [ '$scope', function($scope) {
if ($scope.property.value == undefined && $scope.property.value == null)
{
$scope.property.value = 'GET';
}
$scope.httpRequestMethodChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
/* 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');
var targetExpressionPromise = $translate('PROPERTY.PARAMETER.TARGETEXPRESSION');
$q.all([sourcePromise, sourceExpressionPromise, targetPromise, targetExpressionPromise]).then(function (results) {
$scope.labels.sourceLabel = results[0];
$scope.labels.sourceExpressionLabel = results[1];
$scope.labels.targetLabel = results[2];
$scope.labels.targetExpressionLabel = results[3];
$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},
{field: 'targetExpression', displayName: $scope.labels.targetExpressionLabel}]
};
$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: '',
targetExpression: ''
};
$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
/* 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('FlowableMessageDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/message-definitions-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('FlowableMessageDefinitionsPopupCtrl',
['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) {
// Put json representing mesage definitions on scope
if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) {
if ($scope.property.value.constructor == String) {
$scope.messageDefinitions = JSON.parse($scope.property.value);
}
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.messageDefinitions = angular.copy($scope.property.value);
}
} else {
$scope.messageDefinitions = [];
}
// Array to contain selected mesage definitions (yes - we only can select one, but ng-grid isn't smart enough)
$scope.selectedMessageDefinition = undefined;
$scope.translationsRetrieved = false;
$scope.labels = {};
var idPromise = $translate('PROPERTY.MESSAGEDEFINITIONS.ID');
var namePromise = $translate('PROPERTY.MESSAGEDEFINITIONS.NAME');
$q.all([idPromise, namePromise]).then(function (results) {
$scope.labels.idLabel = results[0];
$scope.labels.nameLabel = results[1];
$scope.translationsRetrieved = true;
// Config for grid
$scope.gridOptions = {
data: $scope.messageDefinitions,
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.selectedMessageDefinition = row.entity;
});
};
});
// Click handler for add button
$scope.addNewMessageDefinition = function () {
var newMessageDefinition = {id: '', name: ''};
$scope.messageDefinitions.push(newMessageDefinition);
$timeout(function () {
$scope.gridApi.selection.toggleRowSelection(newMessageDefinition);
});
};
// Click handler for remove button
$scope.removeMessageDefinition = function () {
var selectedItems = $scope.gridApi.selection.getSelectedRows();
if (selectedItems && selectedItems.length > 0) {
var index = $scope.messageDefinitions.indexOf(selectedItems[0]);
$scope.gridApi.selection.toggleRowSelection(selectedItems[0]);
$scope.messageDefinitions.splice(index, 1);
if ($scope.messageDefinitions.length == 0) {
$scope.selectedMesageDefinition = undefined;
}
$timeout(function () {
if ($scope.messageDefinitions.length > 0) {
$scope.gridApi.selection.toggleRowSelection($scope.messageDefinitions[0]);
}
});
}
};
// Click handler for save button
$scope.save = function () {
if ($scope.messageDefinitions.length > 0) {
$scope.property.value = $scope.messageDefinitions;
} 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();
};
}]);
\ No newline at end of file
/* 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
/* 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('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
/* 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
/* 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');
var targetExpressionPromise = $translate('PROPERTY.PARAMETER.TARGETEXPRESSION');
$q.all([sourcePromise, sourceExpressionPromise, targetPromise, targetExpressionPromise]).then(function (results) {
$scope.labels.sourceLabel = results[0];
$scope.labels.sourceExpressionLabel = results[1];
$scope.labels.targetLabel = results[2];
$scope.labels.targetExpressionLabel = results[3];
$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},
{field: 'targetExpression', displayName: $scope.labels.targetExpressionLabel}]
};
$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: '',
targetExpression: ''};
$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
/* 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('FlowablePlanItemDropdownCtrl', [ '$scope', function($scope) {
// Find all planitems
var selectedShape = $scope.selectedShape;
if (selectedShape) {
// Go up in parent chain until plan model is found
var planModel;
var parent = selectedShape.parent;
if (parent) {
while (planModel === undefined && parent !== null && parent !== undefined) {
if (parent.resourceId !== null && parent.resourceId !== undefined && 'casePlanModel' === parent.resourceId) {
planModel = parent;
} else {
parent = parent.parent;
}
}
}
var planItems = [];
if (planModel !== null && planModel !== undefined) {
var toVisit = [];
for (var i=0; i<planModel.children.length; i++) {
toVisit.push(planModel.children[i]);
}
while (toVisit.length > 0) {
var child = toVisit.pop();
if (typeof child.getStencil === 'function'
&& (child.getStencil()._jsonStencil.groups.indexOf('Activities') >= 0 || (child.getStencil()._jsonStencil.title === 'Stage') )) {
planItems.push(child);
}
if (child.children !== null && child.children !== undefined) {
for (var i=0; i<child.children.length; i++) {
toVisit.push(child.children[i]);
}
}
}
}
var simplifiedPlanItems = [];
for (var i=0; i<planItems.length; i++) {
simplifiedPlanItems.push({ id: planItems[i].resourceId, name: planItems[i].properties.get('oryx-name') });
}
if (simplifiedPlanItems.length > 0) {
simplifiedPlanItems.sort(function(a,b) {
if(a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
} else {
return 0;
}
});
}
$scope.planItems = simplifiedPlanItems;
}
if ($scope.property.value == undefined && $scope.property.value == null) {
$scope.property.value = '';
}
$scope.planItemChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
/* 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('FlowableProcessHistoryLevelCtrl', [ '$scope', function($scope) {
if ($scope.property.value == undefined && $scope.property.value == null)
{
$scope.property.value = 'None';
}
$scope.historyLevelChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
/* 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('FlowableProcessReferenceCtrl',
[ '$scope', '$modal', '$http', function($scope, $modal, $http) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/process-reference-popup.html?version=' + Date.now(),
scope: $scope
};
// Open the dialog
_internalCreateModal(opts, $modal, $scope);
}]);
angular.module('flowableModeler').controller('FlowableProcessReferencePopupCtrl', [ '$scope', '$http', function($scope, $http) {
$scope.state = {'loadingProcesses' : true, 'error' : false};
// Close button handler
$scope.close = function() {
$scope.property.mode = 'read';
$scope.$hide();
};
// Selecting/deselecting a process
$scope.selectProcess = function(processModel, $event) {
$event.stopPropagation();
if ($scope.selectedProcess && $scope.selectedProcess.id && processModel.id == $scope.selectedProcess.id) {
// un-select the current selection
$scope.selectedProcess = null;
} else {
$scope.selectedProcess = processModel;
}
};
// Saving the selected value
$scope.save = function() {
if ($scope.selectedProcess) {
$scope.property.value = {'id' : $scope.selectedProcess.id, 'name' : $scope.selectedProcess.name};
} else {
$scope.property.value = null;
}
$scope.updatePropertyInModel($scope.property);
$scope.close();
};
$scope.loadProcesses = function() {
$http.get(FLOWABLE.APP_URL.getModelsUrl("?modelType=0"))
.success(
function(response) {
$scope.state.loadingProcesses = false;
$scope.state.processError = false;
$scope.processModels = response.data;
})
.error(
function(data, status, headers, config) {
$scope.state.loadingProcesses = false;
$scope.state.processError = true;
});
};
if ($scope.property && $scope.property.value && $scope.property.value.id) {
$scope.selectedProcess = $scope.property.value;
}
$scope.loadProcesses();
}]);
/* 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.
*/
/*
* Sequence flow order controller
*/
angular.module('flowableModeler').controller('FlowableSequenceFlowOrderCtrl',
[ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/sequenceflow-order-popup.html?version=' + Date.now(),
scope: $scope
};
_internalCreateModal(opts, $modal, $scope);
}]);
angular.module('flowableModeler').controller('FlowableSequenceFlowOrderPopupCtrl',
['$scope', '$translate', function($scope, $translate) {
// Find the outgoing sequence flow of the current selected shape
var outgoingSequenceFlow = [];
var selectedShape = $scope.selectedShape;
if (selectedShape) {
var outgoingNodes = selectedShape.getOutgoingShapes();
for (var i=0; i<outgoingNodes.length; i++) {
if (outgoingNodes[i].getStencil().idWithoutNs() === 'SequenceFlow') {
var targetActivity = outgoingNodes[i].getTarget();
// We need the resourceId of a sequence flow, not the id because that will change with every editor load
outgoingSequenceFlow.push({
id : outgoingNodes[i].resourceId,
targetTitle : targetActivity.properties.get('oryx-name'),
targetType : $translate.instant(targetActivity.getStencil().title())
});
}
}
} else {
console.log('Programmatic error: no selected shape found');
}
// Now we can apply the order which was (possibly) previously saved
var orderedOutgoingSequenceFlow = [];
if ($scope.property.value && $scope.property.value.sequenceFlowOrder) {
var sequenceFlowOrderList = $scope.property.value.sequenceFlowOrder;
// Loop the list of sequence flow that was saved in the json model and match them with the outgoing sequence flow found above
for (var flowIndex=0; flowIndex < sequenceFlowOrderList.length; flowIndex++) {
// find the sequence flow in the outgoing sequence flows.
for (var outgoingFlowIndex=0; outgoingFlowIndex < outgoingSequenceFlow.length; outgoingFlowIndex++) {
if (outgoingSequenceFlow[outgoingFlowIndex].id === sequenceFlowOrderList[flowIndex]) {
orderedOutgoingSequenceFlow.push(outgoingSequenceFlow[outgoingFlowIndex]);
outgoingSequenceFlow.splice(outgoingFlowIndex, 1);
break;
}
}
}
// Now all the matching sequence flow we're removed from the outgoing sequence flow list
// We can simply apply the remaining ones (these are new vs. the time when the values were saved to the model)
orderedOutgoingSequenceFlow = orderedOutgoingSequenceFlow.concat(outgoingSequenceFlow);
} else {
orderedOutgoingSequenceFlow = outgoingSequenceFlow;
}
// Now we can put it on the scope
$scope.outgoingSequenceFlow = orderedOutgoingSequenceFlow;
// Move up click handler
$scope.moveUp = function(index) {
var temp = $scope.outgoingSequenceFlow[index];
$scope.outgoingSequenceFlow[index] = $scope.outgoingSequenceFlow[index - 1];
$scope.outgoingSequenceFlow[index - 1] = temp;
};
// Move down click handler
$scope.moveDown = function(index) {
var temp = $scope.outgoingSequenceFlow[index];
$scope.outgoingSequenceFlow[index] = $scope.outgoingSequenceFlow[index + 1];
$scope.outgoingSequenceFlow[index + 1] = temp;
};
// Save click handler
$scope.save = function() {
if ($scope.outgoingSequenceFlow.length > 0) {
$scope.property.value = {};
$scope.property.value.sequenceFlowOrder = [];
for (var flowIndex=0; flowIndex < $scope.outgoingSequenceFlow.length; flowIndex++) {
$scope.property.value.sequenceFlowOrder.push($scope.outgoingSequenceFlow[flowIndex].id);
}
} else {
$scope.property.value = null;
}
$scope.updatePropertyInModel($scope.property);
$scope.close();
};
// Cancel click handler
$scope.cancel = function() {
$scope.close();
};
// Close button handler
$scope.close = function() {
$scope.property.mode = 'read';
$scope.$hide();
};
}]);
\ No newline at end of file
/* 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('FlowableSignalDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) {
// Config for the modal window
var opts = {
template: 'editor-app/configuration/properties/signal-definitions-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('FlowableSignalDefinitionsPopupCtrl',
['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) {
// Put json representing signal definitions on scope
if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) {
if ($scope.property.value.constructor == String) {
$scope.signalDefinitions = JSON.parse($scope.property.value);
}
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.signalDefinitions = angular.copy($scope.property.value);
}
} else {
$scope.signalDefinitions = [];
}
// Array to contain selected signal definitions (yes - we only can select one, but ng-grid isn't smart enough)
$scope.selectedSignalDefinition = undefined;
$scope.translationsRetrieved = false;
$scope.labels = {};
var idPromise = $translate('PROPERTY.SIGNALDEFINITIONS.ID');
var namePromise = $translate('PROPERTY.SIGNALDEFINITIONS.NAME');
var scopePromise = $translate('PROPERTY.SIGNALDEFINITIONS.SCOPE');
$q.all([idPromise, namePromise, scopePromise]).then(function (results) {
$scope.labels.idLabel = results[0];
$scope.labels.nameLabel = results[1];
$scope.labels.scopeLabel = results[2];
$scope.translationsRetrieved = true;
// Config for grid
$scope.gridOptions = {
data: $scope.signalDefinitions,
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: 'scope', displayName: $scope.labels.scopeLabel}]
};
$scope.gridOptions.onRegisterApi = function (gridApi) {
//set gridApi on scope
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope, function (row) {
$scope.selectedSignalDefinition = row.entity;
});
};
});
// Click handler for add button
$scope.addNewSignalDefinition = function () {
var newSignalDefinition = {id: '', name: '', scope: 'global'};
$scope.signalDefinitions.push(newSignalDefinition);
$timeout(function () {
$scope.gridApi.selection.toggleRowSelection(newSignalDefinition);
});
};
// Click handler for remove button
$scope.removeSignalDefinition = function () {
var selectedItems = $scope.gridApi.selection.getSelectedRows();
if (selectedItems && selectedItems.length > 0) {
var index = $scope.signalDefinitions.indexOf(selectedItems[0]);
$scope.gridApi.selection.toggleRowSelection(selectedItems[0]);
$scope.signalDefinitions.splice(index, 1);
if ($scope.signalDefinitions.length == 0) {
$scope.selectedSignalDefinition = undefined;
}
$timeout(function () {
if ($scope.signalDefinitions.length > 0) {
$scope.gridApi.selection.toggleRowSelection($scope.signalDefinitions[0]);
}
});
}
};
$scope.scopeOptions = [{'value': 'global', 'translationId': 'PROPERTY.SIGNALDEFINITIONS.SCOPE-GLOBAL'},
{'value': 'processInstance', 'translationId': 'PROPERTY.SIGNALDEFINITIONS.SCOPE-PROCESSINSTANCE'}];
// Click handler for save button
$scope.save = function () {
if ($scope.signalDefinitions.length > 0) {
$scope.property.value = $scope.signalDefinitions;
} 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();
};
}]);
\ No newline at end of file
/* 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
/* 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('FlowableTransitionEventCtrl', [ '$scope', function($scope) {
if ($scope.property.value == undefined && $scope.property.value == null) {
$scope.property.value = 'complete';
}
$scope.transitionEventChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
/* 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('FlowableTriggerModeCtrl', [ '$scope', function($scope) {
if ($scope.property.value === undefined || $scope.property.value == null) {
$scope.property.value = 'default';
}
$scope.triggerModeChanged = function() {
$scope.updatePropertyInModel($scope.property);
};
}]);
\ No newline at end of file
<span ng-if="property.value.assignment.type != 'idm' && property.value.assignment.assignee">{{'PROPERTY.ASSIGNMENT.ASSIGNEE_DISPLAY' | translate:property.value.assignment }} </span>
<span ng-if="property.value.assignment.type != 'idm' && property.value.assignment.candidateUsers.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.candidateUsers}} </span>
<span ng-if="property.value.assignment.type != 'idm' && property.value.assignment.candidateGroups.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.candidateGroups}} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.assignee && property.value.assignment.idm.assignee.id">{{'PROPERTY.ASSIGNMENT.USER_IDM_DISPLAY' | translate:property.value.assignment.idm.assignee }} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.assignee && !property.value.assignment.idm.assignee.id">{{'PROPERTY.ASSIGNMENT.USER_IDM_EMAIL_DISPLAY' | translate:property.value.assignment.idm.assignee }} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.assigneeField && property.value.assignment.idm.assigneeField.id">{{'PROPERTY.ASSIGNMENT.USER_IDM_FIELD_DISPLAY' | translate:property.value.assignment.idm.assigneeField }} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.candidateUsers && property.value.assignment.idm.candidateUsers.length > 0 && (!property.value.assignment.idm.candidateUserFields || property.value.assignment.idm.candidateUserFields.length === 0)">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.idm.candidateUsers}} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.candidateGroups && property.value.assignment.idm.candidateGroups.length > 0 && (!property.value.assignment.idm.candidateGroupFields || property.value.assignment.idm.candidateGroupFields.length === 0)">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.idm.candidateGroups}} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.candidateUserFields && property.value.assignment.idm.candidateUserFields.length > 0 && (!property.value.assignment.idm.candidateUsers || property.value.assignment.idm.candidateUsers.length === 0)">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.idm.candidateUserFields}} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.candidateGroupFields && property.value.assignment.idm.candidateGroupFields.length > 0 && (!property.value.assignment.idm.candidateGroups || property.value.assignment.idm.candidateGroups.length === 0)">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.idm.candidateGroupFields}} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.candidateUserFields && property.value.assignment.idm.candidateUserFields.length > 0 && property.value.assignment.idm.candidateUsers && property.value.assignment.idm.candidateUsers.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.idm.candidateUserFields.concat(property.value.assignment.idm.candidateUsers)}} </span>
<span ng-if="property.value.assignment.type == 'idm' && property.value.assignment.idm.candidateGroupFields && property.value.assignment.idm.candidateGroupFields.length > 0 && property.value.assignment.idm.candidateGroups && property.value.assignment.idm.candidateGroups.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.idm.candidateGroupFields.concat(property.value.assignment.idm.candidateGroups)}} </span>
<span ng-if="property.value.assignment.type != 'idm' && !property.value.assignment.assignee && (!property.value.assignment.candidateUsers || property.value.assignment.candidateUsers.length == 0) && (!property.value.assignment.candidateGroups || property.value.assignment.candidateGroups.length == 0)" translate>PROPERTY.ASSIGNMENT.EMPTY</span>
<span ng-if="property.value.assignment.type == 'idm' && !property.value.assignment.idm.assignee && !property.value.assignment.idm.assigneeField && (!property.value.assignment.idm.candidateUsers || property.value.assignment.idm.candidateUsers.length == 0) && (!property.value.assignment.idm.candidateUserFields || property.value.assignment.idm.candidateUserFields.length == 0) && (!property.value.assignment.idm.candidateGroups || property.value.assignment.idm.candidateGroups.length == 0) && (!property.value.assignment.idm.candidateGroupFields || property.value.assignment.idm.candidateGroupFields.length == 0)" translate>PROPERTY.ASSIGNMENT.IDM_EMPTY</span>
\ No newline at end of file
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableAssignmentCtrl">
</span>
\ No newline at end of file
<div ng-controller="FlowableBooleanPropertyCtrl">
<input type="checkbox" ng-model="property.value" ng-change="changeValue()"/>
</div>
\ No newline at end of file
<div ng-controller="FlowableCalledElementTypeCtrl">
<select ng-model="property.value" ng-change="calledElementTypeChanged ()">
<option>key</option>
<option>id</option>
</select>
</div>
\ No newline at end of file
<span ng-if="property.value.name">{{property.value.name}}</span>
<span ng-if="!property.value || !property.value.name" translate>PROPERTY.CASEREFERENCE.EMPTY</span>
<div class="modal" ng-controller="FlowableCaseReferencePopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>
{{'PROPERTY.CASEREFERENCE.TITLE' | translate}}
<span ng-show="selectedCase != null"> - {{selectedCase.name}}</span>
<span ng-show="selectedCase == null"> - {{'PROPERTY.CASEREFERENCE.EMPTY' | translate}}</span>
</h2>
</div>
<div class="modal-body-with-overflow">
<div class="detail-group clearfix">
<div class="col-xs-12">
<div class="alert alert-error" ng-show="!state.loadingCases && state.caseError" translate>PROPERTY.CASEREFERENCE.ERROR.FORM</div>
</div>
</div>
<div class="detail-group clearfix">
<div class="col-xs-12 editor-item-picker">
<div ng-if="!state.loadingCases && !state.caseError" class="col-xs-4 editor-item-picker-component" ng-repeat="caseModel in caseModels" ng-class="{'selected' : caseModel.id == selectedCase.id}" ng-click="selectCase(caseModel, $event)">
<div class="controls">
<input type="checkbox" value="option1" ng-click="selectCase(caseModel, $event)" ng-checked="caseModel.id == selectedCase.id" />
</div>
<h4>{{caseModel.name}}</h4>
<img ng-src="{{getModelThumbnailUrl(caseModel.id)}}" />
</div>
<div ng-show="state.loadingCases">
<p class="loading" translate>PROPERTY.CASEREFERENCE.CASE.LOADING</p>
</div>
<div ng-show="!state.loadingCases && caseModels.length == 0">
<p translate>PROPERTY.CASEREFERENCE.CASE.EMPTY</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="close()" class="btn btn-primary" translate>GENERAL.ACTION.CANCEL</button>
<button ng-disabled="!selectedCase || state.caseError" ng-click="open()" class="btn btn-primary" translate>GENERAL.ACTION.OPEN</button>
<button ng-disabled="state.caseError" ng-click="save()" class="btn btn-primary" translate>GENERAL.ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<span ng-if="property.value.expression.type != 'variables' && property.value.expression.staticValue">{{property.value.expression.staticValue|limitTo:20}}</span>
<span ng-if="property.value && !property.value.expression">{{property.value|limitTo:20}}</span>
<span ng-if="!property.value">{{'PROPERTY.SEQUENCEFLOW.CONDITION.NO-CONDITION-DISPLAY' | translate}}</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableConditionExpressionPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2 translate>PROPERTY.SEQUENCEFLOW.CONDITION.TITLE</h2>
</div>
<div class="modal-body">
<div class="detail-group clearfix">
<div class="col-xs-12">
<label class="col-xs-3">{{'PROPERTY.SEQUENCEFLOW.CONDITION.STATIC' | translate}}</label>
<div class="col-xs-9">
<textarea class="form-control" ng-model="expression.staticValue" style="width:70%; height:100%; max-width: 100%; max-height: 100%; min-height: 50px"/>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="close()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableConditionExpressionCtrl">
</span>
\ No newline at end of file
<span ng-if="property.value.items && property.value.items.length > 0">{{'PROPERTY.DATAPROPERTIES.VALUES' | translate:property.value.items}}</span>
<span ng-if="!property.value.items || property.value.items.length == 0" translate>PROPERTY.DATAPROPERTIES.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableDataPropertiesPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="movePropertyUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="movePropertyDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewProperty()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeProperty()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedProperty">
<div class="form-group">
<label for="idField">{{'PROPERTY.DATAPROPERTIES.ID' | translate}}</label>
<input id="idField" class="form-control" type="text" ng-model="selectedProperty.dataproperty_id" placeholder="{{'PROPERTY.DATAPROPERTIES.ID.PLACEHOLDER' | translate }}" />
</div>
<div class="form-group">
<label for="nameField">{{'PROPERTY.DATAPROPERTIES.NAME' | translate}}</label>
<input id="nameField" class="form-control" type="text" ng-model="selectedProperty.dataproperty_name" placeholder="{{'PROPERTY.DATAPROPERTIES.NAME.PLACEHOLDER' | translate }}" />
</div>
<div class="form-group">
<label for="typeField">{{'PROPERTY.DATAPROPERTIES.TYPE' | translate}}</label>
<select id="typeField" class="form-control" ng-model="selectedProperty.dataproperty_type" ng-change="propertyTypeChanged()">
<option selected>string</option>
<option>boolean</option>
<option>datetime</option>
<option>double</option>
<option>int</option>
<option>long</option>
</select>
</div>
<div class="form-group">
<label for="valueField">{{'PROPERTY.DATAPROPERTIES.VALUE' | translate}}</label>
<input id="valueField" class="form-control" type="text" ng-model="selectedProperty.dataproperty_value" placeholder="{{'PROPERTY.DATAPROPERTIES.VALUE.PLACEHOLDER' | translate }}" />
</div>
</div>
<div ng-show="!selectedProperty" class="muted no-property-selected" translate>PROPERTY.DATAPROPERTIES.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableDataPropertiesCtrl">
</span>
\ No newline at end of file
<span ng-if="property.value.name">{{property.value.name}}</span>
<span ng-if="!property.value || !property.value.name" translate>PROPERTY.DECISIONTABLEREFERENCE.EMPTY</span>
<div class="modal" ng-controller="FlowableDecisionTableReferencePopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header" ng-if="popup.state == 'decisionTableReference'">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>
{{'PROPERTY.DECISIONTABLEREFERENCE.TITLE' | translate}}
<span ng-show="selectedDecisionTable != null"> - {{selectedDecisionTable.name}}</span>
<span ng-show="selectedDecisionTable == null"> - {{'PROPERTY.DECISIONTABLEREFERENCE.EMPTY' | translate}}</span>
</h2>
</div>
<div class="modal-header" ng-if="popup.state == 'newDecisionTable'"><h2>{{'DECISION-TABLE.POPUP.CREATE-TITLE' | translate}}</h2></div>
<div class="modal-body-with-overflow" ng-if="popup.state == 'decisionTableReference'">
<div class="detail-group clearfix">
<div class="col-xs-12">
<div class="alert alert-error" ng-show="!state.loadingDecisionTables && state.decisionTableError" translate>PROPERTY.DECISIONTABLEREFERENCE.ERROR.FORM</div>
</div>
</div>
<div class="detail-group clearfix">
<div class="col-xs-12 editor-item-picker">
<div ng-if="!state.loadingDecisionTables && !state.decisionTableError" class="col-xs-4 editor-item-picker-component" ng-repeat="decisionTable in decisionTables" ng-class="{'selected' : decisionTable.decisionTableId == selectedDecisionTable.decisionTableId}" ng-click="selectDecisionTable(decisionTable, $event)">
<div class="controls">
<input type="checkbox" value="option1" ng-click="selectDecisionTable(decisionTable, $event)" ng-checked="decisionTable.id == selectedDecisionTable.id" />
</div>
<h4>{{decisionTable.name}}</h4>
<img ng-src="{{getModelThumbnailUrl(decisionTable.id)}}" />
</div>
<div ng-show="state.loadingDecisionTables">
<p class="loading" translate>PROPERTY.DECISIONTABLEREFERENCE.DECISIONTABLE.LOADING</p>
</div>
<div ng-show="!state.loadingDecisionTables && decisionTables.length == 0">
<p translate>PROPERTY.DECISIONTABLEREFERENCE.DECISIONTABLE.EMPTY</p>
</div>
</div>
</div>
</div>
<div class="modal-body" ng-if="popup.state == 'newDecisionTable'">
<p>{{'DECISION-TABLE.POPUP.CREATE-DESCRIPTION' | translate}}</p>
<div ng-if="model.errorMessage && model.errorMessage.length > 0" class="alert error" style="font-size: 14px; margin-top:20px">
<div class="popup-error" style="font-size: 14px">
<span class="glyphicon glyphicon-remove-circle"></span>
<span>{{model.errorMessage}}</span>
</div>
</div>
<div class="form-group">
<label for="newDecisionTableName">{{'DECISION-TABLE.NAME' | translate}}</label>
<input ng-disabled="model.loading" type="text" class="form-control"
id="newDecisionTableName" ng-model="model.decisionTable.name" custom-keys enter-pressed="ok()" auto-focus editor-input-check>
</div>
<div class="form-group">
<label for="newDecisionTableKey">{{'DECISION-TABLE.KEY' | translate}}</label>
<input ng-disabled="model.loading" type="text" class="form-control"
id="newDecisionTableKey" ng-model="model.decisionTable.key" editor-input-check>
</div>
<div class="form-group">
<label for="newDecisionTableDescription">{{'DECISION-TABLE.DESCRIPTION' | translate}}</label>
<textarea ng-disabled="model.loading" class="form-control" id="newDecisionTableDescription" rows="5" ng-model="model.decisionTable.description"></textarea>
</div>
</div>
<div class="modal-footer" ng-if="popup.state == 'decisionTableReference'">
<button ng-click="cancel()" class="btn btn-primary" translate>GENERAL.ACTION.CANCEL</button>
<button ng-disabled="state.decisionTableError" ng-click="newDecisionTable()" class="btn btn-primary" translate>GENERAL.ACTION.NEW-DECISION-TABLE</button>
<button ng-disabled="!selectedDecisionTable || state.decisionTableError" ng-click="open()" class="btn btn-primary" translate>GENERAL.ACTION.OPEN</button>
<button ng-disabled="state.decisionTableError" ng-click="save()" class="btn btn-primary" translate>GENERAL.ACTION.SAVE</button>
</div>
<div class="modal-footer" ng-if="popup.state == 'newDecisionTable'">
<button ng-click="cancel()" class="btn btn-primary" translate>GENERAL.ACTION.CANCEL</button>
<button ng-disabled="state.decisionTableError || model.decisionTable.name.length == 0 || model.decisionTable.key.length == 0" ng-click="createDecisionTable()" class="btn btn-primary" translate>GENERAL.ACTION.CREATE-DECISION-TABLE</button>
</div>
</div>
</div>
</div>
<span ng-if="!property.noValue">{{property.value|limitTo:20}}</span>
<span ng-if="!property.noValue && property.value != null && property.value.length > 20">...</span>
<span ng-if="property.noValue" translate>PROPERTY.EMPTY</span>
\ No newline at end of file
<span ng-if="property.value && property.value.duedate && property.value.duedate.field || property.value.duedate.field.taskDueDateField" translate>PROPERTY.DUEDATE.DEFINED</span>
<span ng-if="property.value && property.value.duedate && property.value.duedate.fixed" translate>PROPERTY.DUEDATE.DEFINED</span>
<span ng-if="property.value && property.value.duedateExpression">{{property.value.duedateExpression}}</span>
<span ng-if="property.value && property.value.length > 0 && !property.value.duedate && !property.value.duedateExpression">{{property.value}}</span>
<span ng-if="!property.value || property.value.length === 0" translate>PROPERTY.DUEDATE.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="BpmnEditorDueDatePopupCtrl">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2 translate>PROPERTY.DUEDATE.TITLE</h2>
</div>
<div class="modal-body">
<div class="clearfix first">
<div class="col-xs-12">
<div class="col-xs-12">
<div class="btn-group span">
<button class="selection" data-toggle="dropdown" ng-options="option.id as (option.title | translate) for option in taskDueDateOptions"
bs-select ng-model="popup.selectedDueDateOption" ng-change="dueDateOptionChanged()" activiti-fix-dropdown-bug>
<i class="icon icon-caret-down"></i>
</button>
</div>
</div>
</div>
</div>
<div class="clearfix first" ng-if="popup.selectedDueDateOption === 'expression'" style="padding-top: 10px">
<div class="col-xs-12">
<div class="col-xs-4">
<label>{{'PROPERTY.DUEDATE.EXPRESSION-LABEL' | translate}}: </label>
</div>
<div class="col-xs-8">
<input id="expression" type="text" class="form-control" ng-model="popup.duedateExpression">
</div>
</div>
</div>
<div class="clearfix first" ng-if="popup.selectedDueDateOption === 'field'" style="padding-top: 10px">
<div class="col-xs-12">
<div class="col-xs-4">
<label>{{'PROCESS-BUILDER.FIELD.TIMER.DATE-FIELD' | translate}}: </label>
</div>
<div class="col-xs-8">
<div field-select="popup.duedate.field.taskDueDateField" editor-type="bpmn" all-steps="allSteps" step-id="selectedShape.resourceId" field-type-filter="['date']"></div>
</div>
</div>
</div>
<div class="clearfix first" ng-if="popup.selectedDueDateOption === 'field'" style="padding-top: 10px">
<div class="col-xs-12">
<div class="col-xs-4">
<label>{{'PROCESS-BUILDER.FIELD.DUEDATE.CALCULATION-TYPE' | translate}}: </label>
</div>
<div class="col-xs-8">
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button type="button" class="btn btn-default" ng-click="setAddCalculationType()" ng-model="popup.duedate.field.taskDueDateCalculationType" ng-class="{'active' : (!popup.duedate.field.taskDueDateCalculationType || popup.duedate.field.taskDueDateCalculationType == 'add')}">{{'PROCESS-BUILDER.FIELD.DUEDATE.CALCULATION-OPTIONS.ADD' | translate}}</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" ng-click="setSubtractCalculationType()" ng-model="popup.duedate.field.taskDueDateCalculationType" ng-class="{'active' : popup.duedate.field.taskDueDateCalculationType == 'subtract'}">{{'PROCESS-BUILDER.FIELD.DUEDATE.CALCULATION-OPTIONS.SUBTRACT' | translate}}</button>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix first" ng-if="popup.selectedDueDateOption === 'field'" style="padding-top: 10px">
<div class="col-xs-12">
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.YEARS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.field.years">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.MONTHS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.field.months">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.DAYS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.field.days">
</div>
</div>
<div class="col-xs-12">
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.HOURS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.field.hours">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.MINUTES' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.field.minutes">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.SECONDS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.field.seconds">
</div>
</div>
</div>
<div class="clearfix first" ng-if="popup.selectedDueDateOption === 'static'" style="padding-top: 10px">
<div class="col-xs-12">
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.YEARS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.fixed.years">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.MONTHS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.fixed.months">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.DAYS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.fixed.days">
</div>
</div>
<div class="col-xs-12">
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.HOURS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.fixed.hours">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.MINUTES' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.fixed.minutes">
</div>
<div class="col-xs-4">
{{'PROCESS-BUILDER.FIELD.TIMER.SECONDS' | translate}}:<input type="number" class="form-control" ng-model="popup.duedate.fixed.seconds">
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="close()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="BpmnEditorDueDateCtrl">
</span>
\ No newline at end of file
<div class="ui-grid-cell-contents flowable-status">
<!-- we inverse the logic here. A false warning is critical. A true warning is a warning -->
<div class="flowable-warning" ng-if="row.entity.warning">Warning</div>
<div class="flowable-critical" ng-if="!row.entity.warning">Critical</div>
</div>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.ESCALATIONDEFINITIONS.DISPLAY' | translate:property.value}}</span>
<span ng-if="property.noValue" translate>PROPERTY.ESCALATIONDEFINITIONS.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableEscalationDefinitionsPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-8">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewEscalationDefinition()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeEscalationDefinition()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-4" ng-show="selectedEscalationDefinition">
<div class="form-group">
<label>{{'PROPERTY.ESCALATIONDEFINITIONS.ID' | translate}}</label>
<input type="text" class="form-control" ng-model="selectedEscalationDefinition.id">
</div>
<div class="form-group">
<label>{{'PROPERTY.ESCALATIONDEFINITIONS.NAME' | translate}}</label>
<input type="text" class="form-control" ng-model="selectedEscalationDefinition.name">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableEscalationDefinitionsCtrl">
</span>
\ No newline at end of file
<div ng-controller="FlowableEscalationRefCtrl">
<select ng-model="property.value" ng-change="escalationChanged()" ng-options="escalationDefinition.id as (escalationDefinition.name + ' (' + escalationDefinition.id + ')') for escalationDefinition in escalationDefinitions">
</select>
</div>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.EVENTLISTENERS.DISPLAY' | translate:property.value.eventListeners}}</span>
<span ng-if="property.noValue" translate>PROPERTY.EVENTLISTENERS.EMPTY</span>
\ No newline at end of file
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableEventListenersCtrl">
</span>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.EXECUTIONLISTENERS.DISPLAY' | translate:property.value.executionListeners}}</span>
<span ng-if="property.noValue" translate>PROPERTY.EXECUTIONLISTENERS.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableExecutionListenersPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewListener()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeListener()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedListener">
<div class="form-group">
<label for="eventField">{{'PROPERTY.EXECUTIONLISTENERS.EVENT' | translate}}</label>
<select id="eventField" class="form-control" ng-model="selectedListener.event">
<option>start</option>
<option>end</option>
<option>take</option>
</select>
</div>
<div class="form-group">
<label for="classField">{{'PROPERTY.EXECUTIONLISTENERS.CLASS' | translate}}</label>
<input type="text" id="classField" class="form-control" ng-model="selectedListener.className" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.CLASS.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="expressionField">{{'PROPERTY.EXECUTIONLISTENERS.EXPRESSION' | translate}}</label>
<input type="text" id="expressionField" class="form-control" ng-model="selectedListener.expression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.EXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="delegateExpressionField">{{'PROPERTY.EXECUTIONLISTENERS.DELEGATEEXPRESSION' | translate}}</label>
<input type="text" id="delegateExpressionField" class="form-control" ng-model="selectedListener.delegateExpression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER' | translate}}" />
</div>
</div>
<div ng-show="!selectedListener" class="muted no-property-selected" translate>PROPERTY.EXECUTIONLISTENERS.UNSELECTED</div>
</div>
</div>
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-field-grid" ui-grid="gridFieldOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewField()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeField()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedField">
<div class="form-group">
<label for="nameField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME' | translate}}</label>
<input type="text" id="nameField" class="form-control" ng-model="selectedField.name" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="stringValueField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRINGVALUE' | translate}}</label>
<input type="text" id="stringValueField" class="form-control" ng-model="selectedField.stringValue" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRINGVALUE.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="expressionField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.EXPRESSION' | translate}}</label>
<input type="text" id="expressionField" class="form-control" ng-model="selectedField.expression" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.EXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="stringField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRING' | translate}}</label>
<textarea id="stringField" class="form-control" ng-model="selectedField.string" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRING.PLACEHOLDER' | translate}}"></textarea>
</div>
</div>
<div ng-show="!selectedField" class="muted no-property-selected"translate>PROPERTY.EXECUTIONLISTENERS.FIELDS.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableExecutionListenersCtrl">
</span>
\ No newline at end of file
<div class="modal" ng-controller="BpmnFeedbackPopupCtrl">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2>{{'PROPERTY.FEEDBACK.TITLE' | translate:property}}</h2>
</div>
<div class="modal-body">
<p><textarea auto-focus class="form-control" ng-model="model.feedback" style="width:90%; height:100%; max-width: 100%; max-height: 100%; min-height: 300px"/></p>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate >ACTION.CANCEL</button>
<button ng-click="send()" ng-disabled="model.feedback.length === 0" class="btn btn-primary" translate >ACTION.SEND</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.FIELDS' | translate:property.value.fields}}</span>
<span ng-if="property.noValue">{{'PROPERTY.FIELDS.EMPTY' | translate}}</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableFieldsPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h3>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h3>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewField()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeField()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedField">
<div class="form-group">
<label translate>PROPERTY.FIELDS.NAME</label>
<input type="text" class="form-control" ng-model="selectedField.name" placeholder="{{'PROPERTY.FIELDS.NAME.PLACEHOLDER' | translate}}" />
</div>
<div>
<label translate>PROPERTY.FIELDS.STRINGVALUE</label>
<input type="text" class="form-control" ng-model="selectedField.stringValue" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.FIELDS.STRINGVALUE.PLACEHOLDER' | translate}}" />
</div>
<div>
<label translate>PROPERTY.FIELDS.EXPRESSION</label>
<input type="text" class="form-control" ng-model="selectedField.expression" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.FIELDS.EXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div>
<label translate>PROPERTY.FIELDS.STRING</label>
<textarea type="text" class="form-control" ng-model="selectedField.string" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.FIELDS.STRING.PLACEHOLDER' | translate}}"></textarea>
</div>
</div>
<div ng-show="!selectedField" class="muted no-property-selected" translate>PROPERTY.FIELDS.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableFieldsCtrl">
</span>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.FORMPROPERTIES.VALUE' | translate:property.value.formProperties}}</span>
<span ng-if="property.noValue" translate>PROPERTY.FORMPROPERTIES.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableFormPropertiesPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="movePropertyUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="movePropertyDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewProperty()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeProperty()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedProperty">
<div class="form-group">
<label for="idField">{{'PROPERTY.FORMPROPERTIES.ID' | translate}}</label>
<input id="idField" class="form-control" type="text" ng-model="selectedProperty.id" placeholder="{{'PROPERTY.FORMPROPERTIES.ID.PLACEHOLDER' | translate }}" />
</div>
<div class="form-group">
<label for="nameField">{{'PROPERTY.FORMPROPERTIES.NAME' | translate}}</label>
<input id="nameField" class="form-control" type="text" ng-model="selectedProperty.name" placeholder="{{'PROPERTY.FORMPROPERTIES.NAME.PLACEHOLDER' | translate }}" />
</div>
<div class="form-group">
<label for="typeField">{{'PROPERTY.FORMPROPERTIES.TYPE' | translate}}</label>
<select id="typeField" class="form-control" ng-model="selectedProperty.type" ng-change="propertyTypeChanged()">
<option>string</option>
<option>long</option>
<option>boolean</option>
<option>date</option>
<option>enum</option>
</select>
</div>
<div class="form-group" ng-show="selectedProperty.datePattern">
<label for="datePatternField">{{'PROPERTY.FORMPROPERTIES.DATEPATTERN' | translate}}</label>
<input id="datePatternField" class="form-control" type="text" ng-model="selectedProperty.datePattern" placeholder="{{'PROPERTY.FORMPROPERTIES.DATEPATTERN.PLACEHOLDER' | translate }}" />
</div>
<div ng-show="selectedProperty.type == 'enum'" style="padding-bottom:10px">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="enumGridOptions" ui-grid-selection ui-grid-auto-resize></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveEnumValueUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveEnumValueDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewEnumValue()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeEnumValue()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedEnumValue">
<div class="form-group">
<label for="classField">{{'PROPERTY.FORMPROPERTIES.VALUES.ID' | translate}}</label>
<input type="text" id="classField" class="form-control" ng-model="selectedEnumValue.id" placeholder="{{'PROPERTY.FORMPROPERTIES.VALUES.ID.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="classField">{{'PROPERTY.FORMPROPERTIES.VALUES.NAME' | translate}}</label>
<input type="text" id="classField" class="form-control" ng-model="selectedEnumValue.name" placeholder="{{'PROPERTY.FORMPROPERTIES.VALUES.NAME.PLACEHOLDER' | translate}}" />
</div>
</div>
<div ng-show="!selectedEnumValue" class="muted no-property-selected" translate>PROPERTY.FORMPROPERTIES.ENUMVALUES.EMPTY</div>
</div>
</div>
</div>
<div class="form-group">
<label for="expressionField">{{'PROPERTY.FORMPROPERTIES.EXPRESSION' | translate}}</label>
<input id="expressionField" class="form-control" type="text" ng-model="selectedProperty.expression" placeholder="{{'PROPERTY.FORMPROPERTIES.EXPRESSION.PLACEHOLDER' | translate }}" />
</div>
<div class="form-group">
<label for="variableField">{{'PROPERTY.FORMPROPERTIES.VARIABLE' | translate}}</label>
<input id="variableField" class="form-control" type="text" ng-model="selectedProperty.variable" placeholder="{{'PROPERTY.FORMPROPERTIES.VARIABLE.PLACEHOLDER' | translate }}" />
</div>
<div class="form-group">
<label for="defaultField">{{'PROPERTY.FORMPROPERTIES.DEFAULT' | translate}}</label>
<input id="defaultField" class="form-control" type="text" ng-model="selectedProperty.default" placeholder="{{'PROPERTY.FORMPROPERTIES.DEFAULT.PLACEHOLDER' | translate }}" />
</div>
<div class="form-inline">
<div class="form-group col-xs-2" >
<label for="requiredField">{{'PROPERTY.FORMPROPERTIES.REQUIRED' | translate}}</label>
<input id="requiredField" class="checkbox" type="checkbox" ng-model="selectedProperty.required" />
</div>
<div class="form-group col-xs-2">
<label for="readableField">{{'PROPERTY.FORMPROPERTIES.READABLE' | translate}}</label>
<input id="readableField" class="checkbox" type="checkbox" ng-model="selectedProperty.readable" />
</div>
<div class="form-group col-xs-2">
<label for="writableField">{{'PROPERTY.FORMPROPERTIES.WRITABLE' | translate}}</label>
<input id="writableField" class="checkbox" type="checkbox" ng-model="selectedProperty.writable" />
</div>
</div>
</div>
<div ng-show="!selectedProperty" class="muted no-property-selected" translate>PROPERTY.FORMPROPERTIES.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableFormPropertiesCtrl">
</span>
\ No newline at end of file
<div ng-controller="FlowableFormReferenceDisplayCtrl">
<span ng-if="property.value && property.value.id">{{form.name}}</span>
<span ng-if="!property.value || !property.value.id" translate>PROPERTY.FORMREFERENCE.EMPTY</span>
</div>
<div class="modal" ng-controller="FlowableFormReferencePopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header" ng-if="popup.state != 'newForm'">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>
{{'PROPERTY.FORMREFERENCE.TITLE' | translate}}
<span ng-show="selectedForm != null"> - {{selectedForm.name}}</span>
<span ng-show="selectedForm == null"> - {{'PROPERTY.FORMREFERENCE.EMPTY' | translate}}</span>
</h2>
</div>
<div class="modal-header" ng-if="popup.state == 'newForm'"><h2>{{'FORM.POPUP.CREATE-TITLE' | translate}}</h2></div>
<div class="modal-body-with-overflow" ng-if="popup.state != 'newForm'">
<div class="detail-group clearfix">
<div class="col-xs-12">
<div class="alert alert-error" ng-show="!state.loadingForms && state.formError" translate>PROPERTY.FORMREFERENCE.ERROR.FORM</div>
</div>
</div>
<div class="detail-group clearfix">
<div class="col-xs-12 editor-item-picker">
<div ng-if="!state.loadingForms && !state.formError" class="col-xs-4 editor-item-picker-component" ng-repeat="form in forms" ng-class="{'selected' : form.formId == selectedForm.formId}" ng-click="selectForm(form, $event)">
<div class="controls">
<input type="checkbox" value="option1" ng-click="selectForm(form, $event)" ng-checked="form.id == selectedForm.id" />
</div>
<h4>{{form.name}}</h4>
<img ng-src="{{getModelThumbnailUrl(form.id)}}" />
</div>
<div ng-show="state.loadingForms">
<p class="loading" translate>PROPERTY.FORMREFERENCE.FORM.LOADING</p>
</div>
<div ng-show="!state.loadingForms && forms.length == 0">
<p translate>PROPERTY.FORMREFERENCE.FORM.EMPTY</p>
</div>
</div>
</div>
</div>
<div class="modal-body" ng-if="popup.state == 'newForm'">
<p>{{'FORM.POPUP.CREATE-DESCRIPTION' | translate}}</p>
<div ng-if="model.errorMessage && model.errorMessage.length > 0" class="alert error" style="font-size: 14px; margin-top:20px">
<div class="popup-error" style="font-size: 14px">
<span class="glyphicon glyphicon-remove-circle"></span>
<span>{{model.errorMessage}}</span>
</div>
</div>
<div class="form-group">
<label for="newFormName">{{'FORM.NAME' | translate}}</label>
<input ng-disabled="model.loading" type="text" class="form-control"
id="newFormName" ng-model="model.form.name" custom-keys enter-pressed="ok()" auto-focus editor-input-check>
</div>
<div class="form-group">
<label for="newFormKey">{{'FORM.KEY' | translate}}</label>
<input ng-disabled="model.loading" type="text" class="form-control"
id="newFormKey" ng-model="model.form.key" editor-input-check>
</div>
<div class="form-group">
<label for="newFormDescription">{{'FORM.DESCRIPTION' | translate}}</label>
<textarea ng-disabled="model.loading" class="form-control" id="newFormDescription" rows="5" ng-model="model.form.description"></textarea>
</div>
</div>
<div class="modal-footer" ng-if="popup.state != 'newForm'">
<button ng-click="cancel()" class="btn btn-primary" translate>GENERAL.ACTION.CANCEL</button>
<button ng-disabled="state.formError" ng-click="newForm()" class="btn btn-primary" translate>GENERAL.ACTION.NEW-FORM</button>
<button ng-disabled="!selectedForm || state.formError" ng-click="open()" class="btn btn-primary" translate>GENERAL.ACTION.OPEN</button>
<button ng-disabled="state.formError" ng-click="save()" class="btn btn-primary" translate>GENERAL.ACTION.SAVE</button>
</div>
<div class="modal-footer" ng-if="popup.state == 'newForm'">
<button ng-click="cancel()" class="btn btn-primary" translate>GENERAL.ACTION.CANCEL</button>
<button ng-disabled="state.formError || model.form.name.length == 0 || model.form.key.length == 0" ng-click="createForm()" class="btn btn-primary" translate>GENERAL.ACTION.CREATE-FORM</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableFormReferenceCtrl">
</span>
\ No newline at end of file
<span ng-if="!property.noValue">{{property.value}}</span>
<span ng-if="property.noValue">GET</span>
\ No newline at end of file
<div ng-controller="FlowableHttpRequestMethodCtrl">
<select ng-model="property.value" ng-change="httpRequestMethodChanged()">
<option>GET</option>
<option>POST</option>
<option>PUT</option>
<option>DELETE</option>
</select>
</div>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.INPARAMETERS.VALUE' | translate:property.value.inParameters}}</span>
<span ng-if="property.noValue" translate>PROPERTY.INPARAMETERS.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableInParametersPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewParameter()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="removeParameter()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedParameter">
<div class="form-group">
<label for="sourceField">{{'PROPERTY.PARAMETER.SOURCE' | translate}}</label>
<input type="text" id="sourceField" class="form-control" ng-model="selectedParameter.source" placeholder="{{'PROPERTY.PARAMETER.SOURCE.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="sourceExpressionField">{{'PROPERTY.PARAMETER.SOURCEEXPRESSION' | translate}}</label>
<input type="text" id="sourceExpressionField" class="form-control" ng-model="selectedParameter.sourceExpression" placeholder="{{'PROPERTY.PARAMETER.SOURCEEXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="targetField">{{'PROPERTY.PARAMETER.TARGET' | translate}}</label>
<input type="text" id="targetField" class="form-control" ng-model="selectedParameter.target" placeholder="{{'PROPERTY.PARAMETER.TARGET.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="targetExpressionField">{{'PROPERTY.PARAMETER.TARGETEXPRESSION' | translate}}</label>
<input type="text" id="targetExpressionField" class="form-control" ng-model="selectedParameter.targetExpression" placeholder="{{'PROPERTY.PARAMETER.TARGETEXPRESSION.PLACEHOLDER' | translate}}" />
</div>
</div>
<div ng-show="!selectedParameter" class="muted no-property-selected" translate>PROPERTY.PARAMETER.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableInParametersCtrl">
</span>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.MESSAGEDEFINITIONS.DISPLAY' | translate:property.value}}</span>
<span ng-if="property.noValue" translate>PROPERTY.MESSAGEDEFINITIONS.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableMessageDefinitionsPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-8">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewMessageDefinition()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeMessageDefinition()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-4" ng-show="selectedMessageDefinition">
<div class="form-group">
<label>{{'PROPERTY.MESSAGEDEFINITIONS.ID' | translate}}</label>
<input type="text" class="form-control" ng-model="selectedMessageDefinition.id">
</div>
<div class="form-group">
<label>{{'PROPERTY.MESSAGEDEFINITIONS.NAME' | translate}}</label>
<input type="text" class="form-control" ng-model="selectedMessageDefinition.name">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableMessageDefinitionsCtrl">
</span>
\ No newline at end of file
<div ng-controller="FlowableMessageRefCtrl">
<select ng-model="property.value" ng-change="messageChanged()" ng-options="messageDefinition.id as (messageDefinition.name + ' (' + messageDefinition.id + ')') for messageDefinition in messageDefinitions">
</select>
</div>
\ No newline at end of file
<div ng-controller="FlowableMultiInstanceCtrl">
<select ng-model="property.value" ng-change="multiInstanceChanged()">
<option>None</option>
<option>Parallel</option>
<option>Sequential</option>
</select>
</div>
\ No newline at end of file
<div ng-controller="FlowableOrderingCtrl">
<select ng-model="property.value" ng-change="orderingChanged()">
<option>Parallel</option>
<option>Sequential</option>
</select>
</div>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.OUTPARAMETERS.VALUE' | translate:property.value.outParameters}}</span>
<span ng-if="property.noValue" translate>PROPERTY.OUTPARAMETERS.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowableOutParametersPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewParameter()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="removeParameter()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedParameter">
<div class="form-group">
<label for="sourceField">{{'PROPERTY.PARAMETER.SOURCE' | translate}}</label>
<input type="text" id="sourceField" class="form-control" ng-model="selectedParameter.source" placeholder="{{'PROPERTY.PARAMETER.SOURCE.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="sourceExpressionField">{{'PROPERTY.PARAMETER.SOURCEEXPRESSION' | translate}}</label>
<input type="text" id="sourceExpressionField" class="form-control" ng-model="selectedParameter.sourceExpression" placeholder="{{'PROPERTY.PARAMETER.SOURCEEXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="targetField">{{'PROPERTY.PARAMETER.TARGET' | translate}}</label>
<input type="text" id="targetField" class="form-control" ng-model="selectedParameter.target" placeholder="{{'PROPERTY.PARAMETER.TARGET.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="targetExpressionField">{{'PROPERTY.PARAMETER.TARGETEXPRESSION' | translate}}</label>
<input type="text" id="targetExpressionField" class="form-control" ng-model="selectedParameter.targetExpression" placeholder="{{'PROPERTY.PARAMETER.TARGETEXPRESSION.PLACEHOLDER' | translate}}" />
</div>
</div>
<div ng-show="!selectedParameter" class="muted no-property-selected" translate>PROPERTY.PARAMETER.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog -->
<span ng-controller="FlowableOutParametersCtrl">
</span>
\ No newline at end of file
<span ng-if="!property.noValue">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.VALUE' | translate:property.value.planItemLifecycleListeners}}</span>
<span ng-if="property.noValue" translate>PROPERTY.PLANITEMLIFECYCLELISTENERS.EMPTY</span>
\ No newline at end of file
<div class="modal" ng-controller="FlowablePlanItemLifecycleListenersPopupCtrl">
<div class="modal-dialog modal-wide">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
</div>
<div class="modal-body">
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-listener-grid" ui-grid="gridOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewListener()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeListener()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedListener">
<div class="form-group">
<label for="sourceStateField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.SOURCE_STATE' | translate}}</label>
<select id="sourceStateField" class="form-control" ng-model="selectedListener.sourceState">
<option>active</option>
<option>available</option>
<option>enabled</option>
<option>disabled</option>
<option>completed</option>
<option>failed</option>
<option>suspended</option>
<option>closed</option>
<option>terminated</option>
<option>wait_repetition</option>
<option>async-active</option>
</select>
</div>
<div class="form-group">
<label for="targetStateField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.TARGET_STATE' | translate}}</label>
<select id="targetStateField" class="form-control" ng-model="selectedListener.targetState">
<option>active</option>
<option>available</option>
<option>enabled</option>
<option>disabled</option>
<option>completed</option>
<option>failed</option>
<option>suspended</option>
<option>closed</option>
<option>terminated</option>
<option>wait_repetition</option>
<option>async-active</option>
</select>
</div>
<div class="form-group">
<label for="classField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.CLASS' | translate}}</label>
<input type="text" id="classField" class="form-control" ng-model="selectedListener.className" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.CLASS.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="expressionField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.EXPRESSION' | translate}}</label>
<input type="text" id="expressionField" class="form-control" ng-model="selectedListener.expression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.EXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="delegateExpressionField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.DELEGATEEXPRESSION' | translate}}</label>
<input type="text" id="delegateExpressionField" class="form-control" ng-model="selectedListener.delegateExpression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.DELEGATEEXPRESSION.PLACEHOLDER' | translate}}" />
</div>
</div>
<div ng-show="!selectedListener" class="muted no-property-selected" translate>PROPERTY.PLANITEMLIFECYCLELISTENERS.UNSELECTED</div>
</div>
</div>
<div class="row row-no-gutter">
<div class="col-xs-6">
<div ng-if="translationsRetrieved" class="kis-field-grid" ui-grid="gridFieldOptions" ui-grid-selection></div>
<div class="pull-right">
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldUp()"><i class="glyphicon glyphicon-arrow-up"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldDown()"><i class="glyphicon glyphicon-arrow-down"></i></a>
</div>
<div class="btn-group">
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewField()"><i class="glyphicon glyphicon-plus"></i></a>
<a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeField()"><i class="glyphicon glyphicon-minus"></i></a>
</div>
</div>
</div>
<div class="col-xs-6">
<div ng-show="selectedField">
<div class="form-group">
<label for="nameField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.NAME' | translate}}</label>
<input type="text" id="nameField" class="form-control" ng-model="selectedField.name" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.NAME.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="stringValueField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.STRINGVALUE' | translate}}</label>
<input type="text" id="stringValueField" class="form-control" ng-model="selectedField.stringValue" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.STRINGVALUE.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="expressionField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.EXPRESSION' | translate}}</label>
<input type="text" id="expressionField" class="form-control" ng-model="selectedField.expression" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.EXPRESSION.PLACEHOLDER' | translate}}" />
</div>
<div class="form-group">
<label for="stringField">{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.STRING' | translate}}</label>
<textarea id="stringField" class="form-control" ng-model="selectedField.string" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.STRING.PLACEHOLDER' | translate}}"></textarea>
</div>
</div>
<div ng-show="!selectedField" class="muted no-property-selected"translate>PROPERTY.PLANITEMLIFECYCLELISTENERS.FIELDS.EMPTY</div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button>
<button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button>
</div>
</div>
</div>
</div>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment