Rev 1814 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1814 | Rev 1816 | ||
---|---|---|---|
1 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
1 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
3 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
3 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
4 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
4 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
5 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
5 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
6 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
6 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
7 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
7 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
8 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
8 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
9 | <%@ page import="pt.estgp.estgweb.domain.*" %> |
9 | <%@ page import="pt.estgp.estgweb.domain.*" %> |
10 | <%@ page import="pt.estgp.estgweb.domain.bpmn.*" %> |
- | |
11 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
10 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
12 | <%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %> |
11 | <%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %> |
13 | <%@ page import="pt.estgp.estgweb.domain.bpmn.utils.TaskConstantVariablesUtils" %> |
12 | <%@ page import="pt.estgp.estgweb.domain.bpmn.utils.TaskConstantVariablesUtils" %> |
14 | <%@ page import="pt.estgp.estgweb.domain.bpmn.utils.VariableTypeUtils" %> |
13 | <%@ page import="pt.estgp.estgweb.domain.bpmn.utils.VariableTypeUtils" %> |
15 | <%@ page import="pt.estgp.estgweb.domain.typesgen.Todos" %> |
14 | <%@ page import="pt.estgp.estgweb.domain.typesgen.Todos" %> |
16 | <%@ page import="pt.estgp.estgweb.domain.typesgen.Argument" %> |
15 | <%@ page import="pt.estgp.estgweb.domain.typesgen.Argument" %> |
17 | <%@ page import="pt.estgp.estgweb.domain.typesgen.ConnectorSoa" %> |
16 | <%@ page import="pt.estgp.estgweb.domain.typesgen.ConnectorSoa" %> |
18 | <%@ page import="pt.estgp.estgweb.domain.typesgen.OperationMethodCall" %> |
17 | <%@ page import="pt.estgp.estgweb.domain.typesgen.OperationMethodCall" %> |
19 | <%@ taglib tagdir="/WEB-INF/tags" prefix="bacoTags" %> |
18 | <%@ taglib tagdir="/WEB-INF/tags" prefix="bacoTags" %> |
20 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
19 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
21 | <% |
20 | <% |
22 | 21 | ||
23 | Long processId = Long.parseLong(request.getParameter("id")); |
22 | Long processId = Long.parseLong(request.getParameter("id")); |
24 | AbstractDao.getCurrentSession().beginTransaction(); |
23 | AbstractDao.getCurrentSession().beginTransaction(); |
25 | BpmnProcessImpl process = (BpmnProcessImpl) DaoFactory.getBpmnProcessDaoImpl().get(processId); |
24 | BpmnProcessImpl process = (BpmnProcessImpl) DaoFactory.getBpmnProcessDaoImpl().get(processId); |
26 | 25 | ||
27 | 26 | ||
28 | %> |
27 | %> |
29 | 28 | ||
30 | <style> |
29 | <style> |
31 | div.dirty |
30 | div.dirty |
32 | { |
31 | { |
33 | border: 3px dashed orangered !important; |
32 | border: 3px dashed orangered !important; |
34 | } |
33 | } |
35 | </style> |
34 | </style> |
36 | 35 | ||
37 | 36 | ||
38 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/angularjs/angular-ui-tree/angular-ui-tree.min.css"> |
37 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/angularjs/angular-ui-tree/angular-ui-tree.min.css"> |
39 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/angularjs/angular-ui-tree/angular-ui-tree.js"></script> |
38 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/angularjs/angular-ui-tree/angular-ui-tree.js"></script> |
40 | 39 | ||
41 | 40 | ||
42 | <div class="container-fluid" |
41 | <div class="container-fluid" |
43 | id="processEditorModule" |
42 | id="processEditorModule" |
44 | ng-app="processEditorModule" |
43 | ng-app="processEditorModule" |
45 | ng-controller="processEditorModuleController" |
44 | ng-controller="processEditorModuleController" |
46 | ng-init="initBuilder()"> |
45 | ng-init="initBuilder()"> |
47 | 46 | ||
48 | <style> |
47 | <style> |
49 | .has-error .chosen-container |
48 | .has-error .chosen-container |
50 | { |
49 | { |
51 | border: 1px solid #a94442 !important; |
50 | border: 1px solid #a94442 !important; |
52 | } |
51 | } |
53 | </style> |
52 | </style> |
54 | 53 | ||
55 | <script> |
54 | <script> |
56 | 55 | ||
57 | 56 | ||
58 | 57 | ||
59 | //DECLARACAO DA APLICACAO LOCAL EM ANGULAR |
58 | //DECLARACAO DA APLICACAO LOCAL EM ANGULAR |
60 | var processEditorModule = angular.module('processEditorModule', ['ui.tree']); |
59 | var processEditorModule = angular.module('processEditorModule', ['ui.tree']); |
61 | GLOBAL_BacoAngularAppDependencies.push('processEditorModule'); |
60 | GLOBAL_BacoAngularAppDependencies.push('processEditorModule'); |
62 | 61 | ||
63 | /**Fim de directiva reutilizavel**/ |
62 | /**Fim de directiva reutilizavel**/ |
64 | 63 | ||
65 | 64 | ||
66 | 65 | ||
67 | 66 | ||
68 | 67 | ||
69 | processEditorModule.controller('processEditorModuleController', function($scope,$interval,$filter) |
68 | processEditorModule.controller('processEditorModuleController', function($scope,$interval,$filter) |
70 | { |
69 | { |
71 | $scope.callServiceSync = function(service,parameters,callback) |
70 | $scope.callServiceSync = function(service,parameters,callback) |
72 | { |
71 | { |
73 | widgetCallWithActionParameters( |
72 | widgetCallWithActionParameters( |
74 | "<%=request.getContextPath()%>/admin/bpmn/bpmnController.do", |
73 | "<%=request.getContextPath()%>/admin/bpmn/bpmnController.do", |
75 | service, |
74 | service, |
76 | parameters, |
75 | parameters, |
77 | "#processEditorModule", |
76 | "#processEditorModule", |
78 | function(jsonAnswer) |
77 | function(jsonAnswer) |
79 | { |
78 | { |
80 | callback(jsonAnswer); |
79 | callback(jsonAnswer); |
81 | $scope.$apply(); |
80 | $scope.$apply(); |
82 | } |
81 | } |
83 | ); |
82 | ); |
84 | } |
83 | } |
85 | $scope.callService = function(service,parameters,callback) |
84 | $scope.callService = function(service,parameters,callback) |
86 | { |
85 | { |
87 | widgetCallWithActionParameters( |
86 | widgetCallWithActionParameters( |
88 | "<%=request.getContextPath()%>/admin/bpmn/bpmnController.do", |
87 | "<%=request.getContextPath()%>/admin/bpmn/bpmnController.do", |
89 | service, |
88 | service, |
90 | parameters, |
89 | parameters, |
91 | "#processEditorModule", |
90 | "#processEditorModule", |
92 | function(jsonAnswer) |
91 | function(jsonAnswer) |
93 | { |
92 | { |
94 | callback(jsonAnswer); |
93 | callback(jsonAnswer); |
95 | $scope.$apply(); |
94 | $scope.$apply(); |
96 | } |
95 | } |
97 | ); |
96 | ); |
98 | } |
97 | } |
99 | $scope.callSimpleService = function(service,parameters,callback) |
98 | $scope.callSimpleService = function(service,parameters,callback) |
100 | { |
99 | { |
101 | widgetSimpleCallWithActionParameters( |
100 | widgetSimpleCallWithActionParameters( |
102 | "<%=request.getContextPath()%>/admin/bpmn/bpmnController.do", |
101 | "<%=request.getContextPath()%>/admin/bpmn/bpmnController.do", |
103 | service, |
102 | service, |
104 | parameters, |
103 | parameters, |
105 | "#processEditorModule", |
104 | "#processEditorModule", |
106 | function() |
105 | function() |
107 | { |
106 | { |
108 | callback(); |
107 | callback(); |
109 | $scope.$apply(); |
108 | $scope.$apply(); |
110 | } |
109 | } |
111 | ); |
110 | ); |
112 | } |
111 | } |
113 | 112 | ||
114 | /* |
113 | /* |
115 | * Variaveis e metodos auxiliares |
114 | * Variaveis e metodos auxiliares |
116 | * */ |
115 | * */ |
117 | 116 | ||
118 | $scope.allFlowComponents = []; |
117 | $scope.allFlowComponents = []; |
119 | $scope.autoSavesObjects = []; |
118 | $scope.autoSavesObjects = []; |
120 | $scope.idTemp = -1; |
119 | $scope.idTemp = -1; |
121 | $scope.jsps = []; |
120 | $scope.jsps = []; |
122 | $scope.newSoa = {}; |
121 | $scope.newSoa = {}; |
123 | $scope.servicesSoa = []; //Tem Servicos e metodos os metodos sao apanhados do servico selecionado, quando muda o serviço os metodos mudam automaticamente, como o existente antigo não faz match com os do selecionado lodo chama o setNewArguments que opera sobre um metodo que nao faz match logo não há argumentos e ficam vazi-os |
122 | $scope.servicesSoa = []; //Tem Servicos e metodos os metodos sao apanhados do servico selecionado, quando muda o serviço os metodos mudam automaticamente, como o existente antigo não faz match com os do selecionado lodo chama o setNewArguments que opera sobre um metodo que nao faz match logo não há argumentos e ficam vazi-os |
124 | 123 | ||
125 | $scope.newMethodCall = {}; //Uma so classe escolhida em vez de um array como nos servicos |
124 | $scope.newMethodCall = {}; //Uma so classe escolhida em vez de um array como nos servicos |
126 | $scope.methodsClassSelected = []; //Os metodos sao apanhados em tempo real e tem de estar aqui |
125 | $scope.methodsClassSelected = []; //Os metodos sao apanhados em tempo real e tem de estar aqui |
127 | 126 | ||
128 | //TEM APENAS AS NORMAIS CONSTANTES |
127 | //TEM APENAS AS NORMAIS CONSTANTES |
129 | $scope.constantVariables = <%=TaskConstantVariablesUtils.obtainConstantBpmnVariablesRegularTask().toString()%> |
128 | $scope.constantVariables = <%=TaskConstantVariablesUtils.obtainConstantBpmnVariablesRegularTask().toString()%> |
130 | //TEM TODAS, AS NORMAIS E AS DE TAREFA ATOR |
129 | //TEM TODAS, AS NORMAIS E AS DE TAREFA ATOR |
131 | $scope.constantVariablesActorTask = <%=TaskConstantVariablesUtils.obtainConstantBpmnVariablesActorTask().toString()%>; |
130 | $scope.constantVariablesActorTask = <%=TaskConstantVariablesUtils.obtainConstantBpmnVariablesActorTask().toString()%>; |
132 | 131 | ||
133 | 132 | ||
134 | $scope.processVariableTypes = <%=VariableTypeUtils.obtainProcessSerializableVariableTypes().toString()%>; |
133 | $scope.processVariableTypes = <%=VariableTypeUtils.obtainProcessSerializableVariableTypes().toString()%>; |
135 | $scope.localVariableTypes = <%=VariableTypeUtils.obtainAllVariableTypes().toString()%>; |
134 | $scope.localVariableTypes = <%=VariableTypeUtils.obtainAllVariableTypes().toString()%>; |
136 | 135 | ||
137 | 136 | ||
138 | $scope.initBuilder = function() |
137 | $scope.initBuilder = function() |
139 | { |
138 | { |
140 | $scope.initServicesSoa(); |
139 | $scope.initServicesSoa(); |
141 | $scope.initJsps(); |
140 | $scope.initJsps(); |
142 | $scope.inicializarSaves(); |
141 | $scope.inicializarSaves(); |
143 | $scope.copiaFlowComponentsDasActorPools(); |
142 | $scope.copiaFlowComponentsDasActorPools(); |
144 | setTimeout(function() { $(".angularChosen").chosen(); }, 500); |
143 | setTimeout(function() { $(".angularChosen").chosen(); }, 500); |
145 | } |
144 | } |
146 | 145 | ||
147 | 146 | ||
148 | $scope.initJsps = function() |
147 | $scope.initJsps = function() |
149 | { |
148 | { |
150 | $scope.callService("loadJspsPlugins",{},function(interfaces) |
149 | $scope.callService("loadJspsPlugins",{},function(interfaces) |
151 | { |
150 | { |
152 | $scope.jsps = interfaces.jsps; |
151 | $scope.jsps = interfaces.jsps; |
153 | $scope.$apply(); |
152 | $scope.$apply(); |
154 | }); |
153 | }); |
155 | } |
154 | } |
156 | 155 | ||
157 | $scope.initServicesSoa = function() |
156 | $scope.initServicesSoa = function() |
158 | { |
157 | { |
159 | $scope.callService("loadServicesSoa",{},function(servicesSoa) |
158 | $scope.callService("loadServicesSoa",{},function(servicesSoa) |
160 | { |
159 | { |
161 | $scope.servicesSoa = servicesSoa.services; |
160 | $scope.servicesSoa = servicesSoa.services; |
162 | $scope.$apply(); |
161 | $scope.$apply(); |
163 | }); |
162 | }); |
164 | } |
163 | } |
165 | 164 | ||
166 | $scope.showMethodSign = function(method) |
165 | $scope.showMethodSign = function(method) |
167 | { |
166 | { |
168 | return method.name + " => " + method.simpleReturnType; |
167 | return method.name + " => " + method.simpleReturnType; |
169 | } |
168 | } |
170 | 169 | ||
171 | 170 | ||
172 | 171 | ||
173 | $scope.inicializarSaves = function() |
172 | $scope.inicializarSaves = function() |
174 | { |
173 | { |
175 | $interval($scope.autoSaves,2000); |
174 | $interval($scope.autoSaves,2000); |
176 | } |
175 | } |
177 | 176 | ||
178 | $scope.copiaFlowComponentsDasActorPools = function() |
177 | $scope.copiaFlowComponentsDasActorPools = function() |
179 | { |
178 | { |
180 | for(x in $scope.process.actorPools) |
179 | for(x in $scope.process.actorPools) |
181 | { |
180 | { |
182 | var pool = $scope.process.actorPools[x]; |
181 | var pool = $scope.process.actorPools[x]; |
183 | for(y in pool.flowComponents) |
182 | for(y in pool.flowComponents) |
184 | { |
183 | { |
185 | var flowComponent = pool.flowComponents[y]; |
184 | var flowComponent = pool.flowComponents[y]; |
186 | $scope.allFlowComponents.push(flowComponent); |
185 | $scope.allFlowComponents.push(flowComponent); |
187 | } |
186 | } |
188 | } |
187 | } |
189 | } |
188 | } |
190 | 189 | ||
191 | $scope.autoSaves = function() |
190 | $scope.autoSaves = function() |
192 | { |
191 | { |
193 | for(var v in $scope.process.processVariables) |
192 | for(var v in $scope.process.processVariables) |
194 | { |
193 | { |
195 | var variable = $scope.process.processVariables[v]; |
194 | var variable = $scope.process.processVariables[v]; |
196 | if(variable.dirty == true) |
195 | if(variable.dirty == true) |
197 | { |
196 | { |
198 | var variableCall = variable; |
197 | var variableCall = variable; |
199 | $scope.callSimpleService("updateVariable",{"object":BacoJS.stringifyOrdered(variableCall)},function() |
198 | $scope.callSimpleService("updateVariable",{"object":BacoJS.stringifyOrdered(variableCall)},function() |
200 | { |
199 | { |
201 | variableCall.dirty = false; |
200 | variableCall.dirty = false; |
202 | $scope.$apply(); |
201 | $scope.$apply(); |
203 | }); |
202 | }); |
204 | 203 | ||
205 | } |
204 | } |
206 | } |
205 | } |
207 | for(var x in $scope.process.actorPools) |
206 | for(var x in $scope.process.actorPools) |
208 | { |
207 | { |
209 | var pool = $scope.process.actorPools[x]; |
208 | var pool = $scope.process.actorPools[x]; |
210 | if(pool.dirty == true) |
209 | if(pool.dirty == true) |
211 | { |
210 | { |
212 | var poolCall = pool; |
211 | var poolCall = pool; |
213 | $scope.callSimpleService("updatePool",{"object":BacoJS.stringifyOrdered(pool)},function() |
212 | $scope.callSimpleService("updatePool",{"object":BacoJS.stringifyOrdered(pool)},function() |
214 | { |
213 | { |
215 | poolCall.dirty = false; |
214 | poolCall.dirty = false; |
216 | //alert("Apagando dirty"); |
215 | //alert("Apagando dirty"); |
217 | $scope.$apply(); |
216 | $scope.$apply(); |
218 | }); |
217 | }); |
219 | } |
218 | } |
220 | for(var y in pool.flowComponents) |
219 | for(var y in pool.flowComponents) |
221 | { |
220 | { |
222 | var flowComponent = pool.flowComponents[y]; |
221 | var flowComponent = pool.flowComponents[y]; |
223 | if(flowComponent.dirty == true) |
222 | if(flowComponent.dirty == true) |
224 | { |
223 | { |
225 | //flowComponent.dirty = false; |
224 | //flowComponent.dirty = false; |
226 | //todo if para ver se é task pode ser gateway ou event |
225 | //todo if para ver se é task pode ser gateway ou event |
227 | //so estou a meter as tasks nos flow components não estou a meter os gateways nem os eventos |
226 | //so estou a meter as tasks nos flow components não estou a meter os gateways nem os eventos |
228 | var flowComponentCall = flowComponent; |
227 | var flowComponentCall = flowComponent; |
229 | $scope.callSimpleService("updateTask",{"object":BacoJS.stringifyOrdered(flowComponent)},function() |
228 | $scope.callSimpleService("updateTask",{"object":BacoJS.stringifyOrdered(flowComponent)},function() |
230 | { |
229 | { |
231 | flowComponentCall.dirty = false; |
230 | flowComponentCall.dirty = false; |
232 | //alert("Apagando dirty"); |
231 | //alert("Apagando dirty"); |
233 | $scope.$apply(); |
232 | $scope.$apply(); |
234 | }); |
233 | }); |
235 | } |
234 | } |
236 | for(var z in flowComponent.flowConnectors) |
235 | for(var z in flowComponent.flowConnectors) |
237 | { |
236 | { |
238 | var flowConnector = flowComponent.flowConnectors[z]; |
237 | var flowConnector = flowComponent.flowConnectors[z]; |
239 | if(flowConnector.dirty == true) |
238 | if(flowConnector.dirty == true) |
240 | { |
239 | { |
241 | var flowConnectorCall = flowConnector; |
240 | var flowConnectorCall = flowConnector; |
242 | $scope.callSimpleService("updateConnector",{"object":BacoJS.stringifyOrdered(flowConnector)},function() |
241 | $scope.callSimpleService("updateConnector",{"object":BacoJS.stringifyOrdered(flowConnector)},function() |
243 | { |
242 | { |
244 | flowConnectorCall.dirty = false; |
243 | flowConnectorCall.dirty = false; |
245 | $scope.$apply(); |
244 | $scope.$apply(); |
246 | }); |
245 | }); |
247 | 246 | ||
248 | } |
247 | } |
249 | } |
248 | } |
250 | for(var v in flowComponent.localVariables) |
249 | for(var v in flowComponent.localVariables) |
251 | { |
250 | { |
252 | var variable = flowComponent.localVariables[v]; |
251 | var variable = flowComponent.localVariables[v]; |
253 | if(variable.dirty == true) |
252 | if(variable.dirty == true) |
254 | { |
253 | { |
255 | var variableCall = variable; |
254 | var variableCall = variable; |
256 | $scope.callSimpleService("updateVariable",{"object":BacoJS.stringifyOrdered(variableCall)},function() |
255 | $scope.callSimpleService("updateVariable",{"object":BacoJS.stringifyOrdered(variableCall)},function() |
257 | { |
256 | { |
258 | variableCall.dirty = false; |
257 | variableCall.dirty = false; |
259 | $scope.$apply(); |
258 | $scope.$apply(); |
260 | }); |
259 | }); |
261 | 260 | ||
262 | } |
261 | } |
263 | } |
262 | } |
264 | } |
263 | } |
265 | } |
264 | } |
266 | for(var x in $scope.process.actorPools) |
265 | for(var x in $scope.process.actorPools) |
267 | { |
266 | { |
268 | var obj = $scope.process.actorPools[x]; |
267 | var obj = $scope.process.actorPools[x]; |
269 | if(obj.dirty == true) |
268 | if(obj.dirty == true) |
270 | { |
269 | { |
271 | 270 | ||
272 | } |
271 | } |
273 | } |
272 | } |
274 | } |
273 | } |
275 | 274 | ||
276 | 275 | ||
277 | 276 | ||
278 | 277 | ||
279 | /** Funções que interagem com directiva reutilizavel **/ |
278 | /** Funções que interagem com directiva reutilizavel **/ |
280 | $scope.save = function() { |
279 | $scope.save = function() { |
281 | $scope.$broadcast('show-errors-check-validity'); |
280 | $scope.$broadcast('show-errors-check-validity'); |
282 | 281 | ||
283 | if (!$scope.processoForm.$invalid) { |
282 | if (!$scope.processoForm.$invalid) { |
284 | alert('User saved'); |
283 | alert('User saved'); |
285 | //$scope.reset(); |
284 | //$scope.reset(); |
286 | } |
285 | } |
287 | else |
286 | else |
288 | { |
287 | { |
289 | alert("Existem erros no form"); |
288 | alert("Existem erros no form"); |
290 | } |
289 | } |
291 | }; |
290 | }; |
292 | $scope.reset = function() { |
291 | $scope.reset = function() { |
293 | $scope.$broadcast('show-errors-reset'); |
292 | $scope.$broadcast('show-errors-reset'); |
294 | $scope.user = { name: '', email: '' }; |
293 | $scope.user = { name: '', email: '' }; |
295 | } |
294 | } |
296 | /** Fim de Funções que interagem com directiva reutilizavel **/ |
295 | /** Fim de Funções que interagem com directiva reutilizavel **/ |
297 | 296 | ||
298 | 297 | ||
299 | /* |
298 | /* |
300 | * Funcoes e variaveis especificas do Processo |
299 | * Funcoes e variaveis especificas do Processo |
301 | * |
300 | * |
302 | * */ |
301 | * */ |
303 | 302 | ||
304 | $scope.process = <%=process.toJson()%>; |
303 | $scope.process = <%=process.toJson()%>; |
305 | 304 | ||
306 | $scope.removeActorPool = function(poolId,$index) |
305 | $scope.removeActorPool = function(poolId,$index) |
307 | { |
306 | { |
308 | var pool = $filter('filter')($scope.process.actorPools, {id: poolId })[0]; |
307 | var pool = $filter('filter')($scope.process.actorPools, {id: poolId })[0]; |
309 | if(pool.flowComponents && pool.flowComponents.length > 0) |
308 | if(pool.flowComponents && pool.flowComponents.length > 0) |
310 | { |
309 | { |
311 | alert("Não pode apagar esta pool com atividades no seu interior"); |
310 | alert("Não pode apagar esta pool com atividades no seu interior"); |
312 | } |
311 | } |
313 | else |
312 | else |
314 | { |
313 | { |
315 | $scope.callSimpleService("removeActorPool",{"poolId":pool.id},function() |
314 | $scope.callSimpleService("removeActorPool",{"poolId":pool.id},function() |
316 | { |
315 | { |
317 | $scope.process.actorPools.splice($index,1); |
316 | $scope.process.actorPools.splice($index,1); |
318 | }); |
317 | }); |
319 | } |
318 | } |
320 | } |
319 | } |
321 | 320 | ||
322 | $scope.removeTask = function (poolId,taskId,$index) |
321 | $scope.removeTask = function (poolId,taskId,$index) |
323 | { |
322 | { |
324 | $scope.callSimpleService("removeTask",{"poolId":poolId,"taskId":taskId},function() |
323 | $scope.callSimpleService("removeTask",{"poolId":poolId,"taskId":taskId},function() |
325 | { |
324 | { |
326 | var pool = $filter('filter')($scope.process.actorPools, {id: poolId })[0]; |
325 | var pool = $filter('filter')($scope.process.actorPools, {id: poolId })[0]; |
327 | pool.flowComponents.splice($index,1); |
326 | pool.flowComponents.splice($index,1); |
328 | var taskInAllFlows = $filter('filter')($scope.allFlowComponents, {id: taskId })[0]; |
327 | var taskInAllFlows = $filter('filter')($scope.allFlowComponents, {id: taskId })[0]; |
329 | var index = $scope.allFlowComponents.indexOf(taskInAllFlows ); |
328 | var index = $scope.allFlowComponents.indexOf(taskInAllFlows ); |
330 | $scope.allFlowComponents.splice(index,1); |
329 | $scope.allFlowComponents.splice(index,1); |
331 | }); |
330 | }); |
332 | } |
331 | } |
333 | 332 | ||
334 | $scope.removeConnector = function (connectorId,taskId,poolId,$index) |
333 | $scope.removeConnector = function (connectorId,taskId,poolId,$index) |
335 | { |
334 | { |
336 | $scope.callSimpleService("removeConnector",{"taskId":taskId,"connectorId":connectorId},function() |
335 | $scope.callSimpleService("removeConnector",{"taskId":taskId,"connectorId":connectorId},function() |
337 | { |
336 | { |
338 | var pool = $filter('filter')($scope.process.actorPools, {id: poolId })[0]; |
337 | var pool = $filter('filter')($scope.process.actorPools, {id: poolId })[0]; |
339 | var task = $filter('filter')(pool.flowComponents, {id: taskId })[0]; |
338 | var task = $filter('filter')(pool.flowComponents, {id: taskId })[0]; |
340 | task.flowConnectors.splice($index,1); |
339 | task.flowConnectors.splice($index,1); |
341 | }); |
340 | }); |
342 | } |
341 | } |
343 | 342 | ||
344 | $scope.setDirty = function(obj) |
343 | $scope.setDirty = function(obj) |
345 | { |
344 | { |
346 | obj.dirty = true; |
345 | obj.dirty = true; |
347 | $scope.autoSavesObjects.push(obj); |
346 | $scope.autoSavesObjects.push(obj); |
348 | } |
347 | } |
349 | 348 | ||
350 | $scope.selected = null; |
349 | $scope.selected = null; |
351 | $scope.select = function(node) |
350 | $scope.select = function(node) |
352 | { |
351 | { |
353 | if($scope.selected) |
352 | if($scope.selected) |
354 | { |
353 | { |
355 | delete $scope.selected.selected; |
354 | delete $scope.selected.selected; |
356 | } |
355 | } |
357 | $scope.selected = node; |
356 | $scope.selected = node; |
358 | node.selected = true; |
357 | node.selected = true; |
359 | } |
358 | } |
360 | 359 | ||
361 | 360 | ||
362 | $scope.startTooltips = function() |
361 | $scope.startTooltips = function() |
363 | { |
362 | { |
364 | $("[data-toggle='tooltip']").tooltip(); |
363 | $("[data-toggle='tooltip']").tooltip(); |
365 | } |
364 | } |
366 | 365 | ||
367 | $scope.newActorPool = function() |
366 | $scope.newActorPool = function() |
368 | { |
367 | { |
369 | $scope.callService("addActorPool",{"processId":$scope.process.id},function(actorPool) |
368 | $scope.callService("addActorPool",{"processId":$scope.process.id},function(actorPool) |
370 | { |
369 | { |
371 | if($scope.process.actorPools == null) |
370 | if($scope.process.actorPools == null) |
372 | $scope.process.actorPools = []; |
371 | $scope.process.actorPools = []; |
373 | $scope.process.actorPools.push(actorPool); |
372 | $scope.process.actorPools.push(actorPool); |
374 | $scope.$apply(); |
373 | $scope.$apply(); |
375 | invokeChosenSelects("#bpmnPools"); |
374 | invokeChosenSelects("#bpmnPools"); |
376 | }); |
375 | }); |
377 | } |
376 | } |
378 | 377 | ||
379 | $scope.addTaskActor = function(pool) |
378 | $scope.addTaskActor = function(pool) |
380 | { |
379 | { |
381 | $scope.callService("addTaskActor",{"poolId":pool.id},function(taskActor) |
380 | $scope.callService("addTaskActor",{"poolId":pool.id},function(taskActor) |
382 | { |
381 | { |
383 | if(pool.flowComponents == null) |
382 | if(pool.flowComponents == null) |
384 | pool.flowComponents = []; |
383 | pool.flowComponents = []; |
385 | pool.flowComponents.push(taskActor); |
384 | pool.flowComponents.push(taskActor); |
386 | $scope.allFlowComponents.push(taskActor); |
385 | $scope.allFlowComponents.push(taskActor); |
387 | $scope.$apply(); |
386 | $scope.$apply(); |
388 | //invokeChosenSelects("#bpmnPools"); |
387 | //invokeChosenSelects("#bpmnPools"); |
389 | }); |
388 | }); |
390 | } |
389 | } |
391 | 390 | ||
392 | $scope.addConnector = function(task) |
391 | $scope.addConnector = function(task) |
393 | { |
392 | { |
394 | $scope.callService("addConnector",{"taskId":task.id},function(connector) |
393 | $scope.callService("addConnector",{"taskId":task.id},function(connector) |
395 | { |
394 | { |
396 | //connector = orderKeys(connector); |
395 | //connector = orderKeys(connector); |
397 | if(task.flowConnectors == null) |
396 | if(task.flowConnectors == null) |
398 | task.flowConnectors = []; |
397 | task.flowConnectors = []; |
399 | task.flowConnectors.push(connector); |
398 | task.flowConnectors.push(connector); |
400 | $scope.$apply(); |
399 | $scope.$apply(); |
401 | //invokeChosenSelects("#bpmnPools"); |
400 | //invokeChosenSelects("#bpmnPools"); |
402 | }); |
401 | }); |
403 | } |
402 | } |
404 | 403 | ||
405 | /** |
404 | /** |
406 | * |
405 | * |
407 | * |
406 | * |
408 | * |
407 | * |
409 | * OPERACOES PARA MODAL PARA CRIAR/EDITAR TODOS |
408 | * OPERACOES PARA MODAL PARA CRIAR/EDITAR TODOS |
410 | * Operacoes Comuns a Operações Todos |
409 | * Operacoes Comuns a Operações Todos |
411 | * |
410 | * |
412 | * |
411 | * |
413 | * |
412 | * |
414 | * *******/ |
413 | * *******/ |
415 | 414 | ||
416 | 415 | ||
417 | $scope.createNewTodo = function(a_class) |
416 | $scope.createNewTodo = function(a_class) |
418 | { |
417 | { |
419 | var methodCallTarget = |
418 | var methodCallTarget = |
420 | { |
419 | { |
421 | "@class": a_class |
420 | "@class": a_class |
422 | }; |
421 | }; |
423 | $scope.newMethodCallTarget = methodCallTarget; |
422 | $scope.newMethodCallTarget = methodCallTarget; |
424 | if(!$scope.selected.todos) |
423 | if(!$scope.selected.todos) |
425 | $scope.selected.todos = { |
424 | $scope.selected.todos = { |
426 | "@class": "<%=Todos.class.getName()%>" |
425 | "@class": "<%=Todos.class.getName()%>" |
427 | }; |
426 | }; |
428 | if(!$scope.selected.todos.todos) |
427 | if(!$scope.selected.todos.todos) |
429 | $scope.selected.todos.todos = []; |
428 | $scope.selected.todos.todos = []; |
430 | 429 | ||
431 | $scope.selected.todos.todos.push(methodCallTarget); |
430 | $scope.selected.todos.todos.push(methodCallTarget); |
432 | return methodCallTarget; |
431 | return methodCallTarget; |
433 | } |
432 | } |
434 | 433 | ||
435 | $scope.createNewTodoAtor = function(a_class){ |
434 | $scope.createNewTodoAtor = function(a_class){ |
436 | var methodCallTarget = |
435 | var methodCallTarget = |
437 | { |
436 | { |
438 | "@class": a_class |
437 | "@class": a_class |
439 | }; |
438 | }; |
440 | if(!$scope.selected.afterUserTodos) |
439 | if(!$scope.selected.afterUserTodos) |
441 | $scope.selected.afterUserTodos = |
440 | $scope.selected.afterUserTodos = |
442 | { |
441 | { |
443 | "@class": "<%=Todos.class.getName()%>" |
442 | "@class": "<%=Todos.class.getName()%>" |
444 | }; |
443 | }; |
445 | if(!$scope.selected.afterUserTodos.todos) |
444 | if(!$scope.selected.afterUserTodos.todos) |
446 | $scope.selected.afterUserTodos.todos = []; |
445 | $scope.selected.afterUserTodos.todos = []; |
447 | 446 | ||
448 | $scope.selected.afterUserTodos.todos.push(methodCallTarget); |
447 | $scope.selected.afterUserTodos.todos.push(methodCallTarget); |
449 | return methodCallTarget; |
448 | return methodCallTarget; |
450 | } |
449 | } |
451 | 450 | ||
452 | /** |
451 | /** |
453 | * Recebe uma Operação de chamada de metodo ou soa previamente selecionada |
452 | * Recebe uma Operação de chamada de metodo ou soa previamente selecionada |
454 | * e coloca na variavel auxiliar methodChoosed o método que estava escolhido |
453 | * e coloca na variavel auxiliar methodChoosed o método que estava escolhido |
455 | * a partir da lista de metodos disponiveis no servico/classe selecionada |
454 | * a partir da lista de metodos disponiveis no servico/classe selecionada |
456 | */ |
455 | */ |
457 | $scope.prepareTodoToEdit = function(selectedTodo,methods) |
456 | $scope.prepareTodoToEdit = function(selectedTodo,methods) |
458 | { |
457 | { |
459 | for(var m in methods) |
458 | for(var m in methods) |
460 | { |
459 | { |
461 | var method = methods[m]; |
460 | var method = methods[m]; |
462 | if(method.name == selectedTodo.methodName && |
461 | if(method.name == selectedTodo.methodName && |
463 | method.returnType == selectedTodo.checkReturnType) |
462 | method.returnType == selectedTodo.checkReturnType) |
464 | { |
463 | { |
465 | var hasMethodArguments = method.arguments && method.arguments.length > 0; |
464 | var hasMethodArguments = method.arguments && method.arguments.length > 0; |
466 | var hasSoaMethodArguments = selectedTodo.arguments && selectedTodo.arguments.length > 0; |
465 | var hasSoaMethodArguments = selectedTodo.arguments && selectedTodo.arguments.length > 0; |
467 | if(!hasMethodArguments && !hasSoaMethodArguments) |
466 | if(!hasMethodArguments && !hasSoaMethodArguments) |
468 | { |
467 | { |
469 | selectedTodo.methodChoosed = method; |
468 | selectedTodo.methodChoosed = method; |
470 | break; |
469 | break; |
471 | } |
470 | } |
472 | else if(hasMethodArguments != hasSoaMethodArguments) |
471 | else if(hasMethodArguments != hasSoaMethodArguments) |
473 | { |
472 | { |
474 | continue; |
473 | continue; |
475 | } |
474 | } |
476 | else if(selectedTodo.arguments.length != method.arguments.length) |
475 | else if(selectedTodo.arguments.length != method.arguments.length) |
477 | { |
476 | { |
478 | continue; |
477 | continue; |
479 | } |
478 | } |
480 | else |
479 | else |
481 | { |
480 | { |
482 | //Methods are equal in arguments |
481 | //Methods are equal in arguments |
483 | var found = true; |
482 | var found = true; |
484 | for(var a in method.arguments) |
483 | for(var a in method.arguments) |
485 | { |
484 | { |
486 | var argumentMethod = method.arguments[a].className; |
485 | var argumentMethod = method.arguments[a].className; |
487 | var soaArgument = selectedTodo.arguments[a].className; |
486 | var soaArgument = selectedTodo.arguments[a].className; |
488 | if(argumentMethod != soaArgument) |
487 | if(argumentMethod != soaArgument) |
489 | { |
488 | { |
490 | found = false; |
489 | found = false; |
491 | break; |
490 | break; |
492 | } |
491 | } |
493 | } |
492 | } |
494 | if(found) |
493 | if(found) |
495 | { |
494 | { |
496 | selectedTodo.methodChoosed = method; |
495 | selectedTodo.methodChoosed = method; |
497 | break; |
496 | break; |
498 | } |
497 | } |
499 | } |
498 | } |
500 | } |
499 | } |
501 | } |
500 | } |
502 | } |
501 | } |
503 | $scope.salvarTodoEdit = function(modalId) |
502 | $scope.salvarTodoEdit = function(modalId) |
504 | { |
503 | { |
505 | var modal = $("#" + modalId); |
504 | var modal = $("#" + modalId); |
506 | var task = $scope.selected; |
505 | var task = $scope.selected; |
507 | $scope.setDirty(task); |
506 | $scope.setDirty(task); |
508 | modal.modal("hide"); |
507 | modal.modal("hide"); |
509 | } |
508 | } |
510 | 509 | ||
511 | 510 | ||
512 | /** |
511 | /** |
513 | * |
512 | * |
514 | * |
513 | * |
515 | * OPERACOES PARA MODAL DE CHAMADA DE METODO SOBRE VARIAVEL |
514 | * OPERACOES PARA MODAL DE CHAMADA DE METODO SOBRE VARIAVEL |
516 | * |
515 | * |
517 | * |
516 | * |
518 | * **/ |
517 | * **/ |
519 | 518 | ||
520 | /* chamadas para abrir modal*/ |
519 | /* chamadas para abrir modal*/ |
521 | $scope.openMethodCallModal = function(methodCallTarget) |
520 | $scope.openMethodCallModal = function(methodCallTarget) |
522 | { |
521 | { |
523 | if(!methodCallTarget) |
522 | if(!methodCallTarget) |
524 | { |
523 | { |
525 | methodCallTarget = $scope.createNewTodo("<%=OperationMethodCall.class.getName()%>"); |
524 | methodCallTarget = $scope.createNewTodo("<%=OperationMethodCall.class.getName()%>"); |
526 | $scope.newMethodCall = methodCallTarget; |
525 | $scope.newMethodCall = methodCallTarget; |
527 | methodCallTarget.usaDadosAtorDoFormulario = false; |
526 | methodCallTarget.usaDadosAtorDoFormulario = false; |
528 | $("#methodCallModalSelector").modal("show"); |
527 | $("#methodCallModalSelector").modal("show"); |
529 | } |
528 | } |
530 | else |
529 | else |
531 | { |
530 | { |
532 | $scope.newMethodCall = methodCallTarget; |
531 | $scope.newMethodCall = methodCallTarget; |
533 | $scope.callService("loadClassMethods", |
532 | $scope.callService("loadClassMethods", |
534 | { "className" : methodCallTarget.className}, |
533 | { "className" : methodCallTarget.className}, |
535 | function(classDescription){ |
534 | function(classDescription){ |
536 | $scope.methodsClassSelected = classDescription.methods; |
535 | $scope.methodsClassSelected = classDescription.methods; |
537 | $scope.prepareTodoToEdit(methodCallTarget,classDescription.methods); |
536 | $scope.prepareTodoToEdit(methodCallTarget,classDescription.methods); |
538 | methodCallTarget.usaDadosAtorDoFormulario = false; |
537 | methodCallTarget.usaDadosAtorDoFormulario = false; |
539 | $("#methodCallModalSelector").modal("show"); |
538 | $("#methodCallModalSelector").modal("show"); |
540 | }); |
539 | }); |
541 | } |
540 | } |
542 | 541 | ||
543 | } |
542 | } |
544 | 543 | ||
545 | $scope.openMethodCallModalAtor = function(methodCallTarget) |
544 | $scope.openMethodCallModalAtor = function(methodCallTarget) |
546 | { |
545 | { |
547 | if(!methodCallTarget) |
546 | if(!methodCallTarget) |
548 | { |
547 | { |
549 | methodCallTarget = $scope.createNewTodoAtor("<%=OperationMethodCall.class.getName()%>"); |
548 | methodCallTarget = $scope.createNewTodoAtor("<%=OperationMethodCall.class.getName()%>"); |
550 | $scope.newMethodCall = methodCallTarget; |
549 | $scope.newMethodCall = methodCallTarget; |
551 | methodCallTarget.usaDadosAtorDoFormulario = true; |
550 | methodCallTarget.usaDadosAtorDoFormulario = true; |
552 | $("#methodCallModalSelector").modal("show"); |
551 | $("#methodCallModalSelector").modal("show"); |
553 | } |
552 | } |
554 | else |
553 | else |
555 | { |
554 | { |
556 | $scope.newMethodCall = methodCallTarget; |
555 | $scope.newMethodCall = methodCallTarget; |
557 | $scope.callService("loadClassMethods", |
556 | $scope.callService("loadClassMethods", |
558 | { "className" : methodCallTarget.className}, |
557 | { "className" : methodCallTarget.className}, |
559 | function(classDescription){ |
558 | function(classDescription){ |
560 | $scope.methodsClassSelected = classDescription.methods; |
559 | $scope.methodsClassSelected = classDescription.methods; |
561 | $scope.prepareTodoToEdit(methodCallTarget,classDescription.methods); |
560 | $scope.prepareTodoToEdit(methodCallTarget,classDescription.methods); |
562 | methodCallTarget.usaDadosAtorDoFormulario = true; |
561 | methodCallTarget.usaDadosAtorDoFormulario = true; |
563 | $("#methodCallModalSelector").modal("show"); |
562 | $("#methodCallModalSelector").modal("show"); |
564 | }); |
563 | }); |
565 | } |
564 | } |
566 | 565 | ||
567 | } |
566 | } |
568 | 567 | ||
569 | 568 | ||
570 | /** |
569 | /** |
571 | * Chamada do ng-change da combo da classe da variavel escolhida |
570 | * Chamada do ng-change da combo da classe da variavel escolhida |
572 | * O ciclo repeat da modal de metodos difere do ciclo da dos soa |
571 | * O ciclo repeat da modal de metodos difere do ciclo da dos soa |
573 | * porque irá fazer as options dos metodos com base directa nos |
572 | * porque irá fazer as options dos metodos com base directa nos |
574 | * methodsClassSelected.methods em vez de os obter desta função |
573 | * methodsClassSelected.methods em vez de os obter desta função |
575 | * que foi feita a partir do $scope.getServiceMethods |
574 | * que foi feita a partir do $scope.getServiceMethods |
576 | * */ |
575 | * */ |
577 | $scope.changeMethodClassTarget = function() |
576 | $scope.changeMethodClassTarget = function() |
578 | { |
577 | { |
579 | var varSelected = $filter('filter')($scope.getAllVariables(), {"name": $scope.newMethodCall.name },true)[0]; |
578 | var varSelected = $filter('filter')($scope.getAllVariables(), {"name": $scope.newMethodCall.name },true)[0]; |
580 | $scope.methodsClassSelected = []; |
579 | $scope.methodsClassSelected = []; |
581 | $scope.newMethodCall.className = varSelected.type.className; |
580 | $scope.newMethodCall.className = varSelected.type.className; |
582 | $scope.newMethodCall.methodName = ""; |
581 | $scope.newMethodCall.methodName = ""; |
583 | $scope.callService("loadClassMethods", |
582 | $scope.callService("loadClassMethods", |
584 | { "className" : $scope.newMethodCall.className}, |
583 | { "className" : $scope.newMethodCall.className}, |
585 | function(classDescription){ |
584 | function(classDescription){ |
586 | $scope.methodsClassSelected = classDescription.methods; |
585 | $scope.methodsClassSelected = classDescription.methods; |
587 | //$scope.prepareTodoToEdit(classDescription,classDescription.methods); |
586 | //$scope.prepareTodoToEdit(classDescription,classDescription.methods); |
588 | //methodCallTarget.usaDadosAtorDoFormulario = true; |
587 | //methodCallTarget.usaDadosAtorDoFormulario = true; |
589 | //$("#methodCallModalSelector").modal("show"); |
588 | //$("#methodCallModalSelector").modal("show"); |
590 | }); |
589 | }); |
591 | } |
590 | } |
592 | 591 | ||
593 | /** |
592 | /** |
594 | * chamada de mudanca de metodo |
593 | * chamada de mudanca de metodo |
595 | */ |
594 | */ |
596 | $scope.setArgumentsNewMethodCallMethod = function() |
595 | $scope.setArgumentsNewMethodCallMethod = function() |
597 | { |
596 | { |
598 | var method = $scope.newMethodCall.methodChoosed; |
597 | var method = $scope.newMethodCall.methodChoosed; |
599 | var arguments = []; |
598 | var arguments = []; |
600 | for(var a in method.arguments) |
599 | for(var a in method.arguments) |
601 | { |
600 | { |
602 | var newArgument = |
601 | var newArgument = |
603 | { |
602 | { |
604 | "@class" : "<%=Argument.class.getName()%>", |
603 | "@class" : "<%=Argument.class.getName()%>", |
605 | "name" : method.arguments[a].name, |
604 | "name" : method.arguments[a].name, |
606 | "varName" : "", |
605 | "varName" : "", |
607 | "className" : method.arguments[a].className |
606 | "className" : method.arguments[a].className |
608 | }; |
607 | }; |
609 | if( method.arguments[a].classNameSuperClasses) |
608 | if( method.arguments[a].classNameSuperClasses) |
610 | newArgument.classNameSuperClasses = method.arguments[a].classNameSuperClasses; |
609 | newArgument.classNameSuperClasses = method.arguments[a].classNameSuperClasses; |
611 | arguments.push(newArgument); |
610 | arguments.push(newArgument); |
612 | } |
611 | } |
613 | $scope.newMethodCall.methodName = method.name; |
612 | $scope.newMethodCall.methodName = method.name; |
614 | $scope.newMethodCall.arguments = arguments; |
613 | $scope.newMethodCall.arguments = arguments; |
615 | $scope.newMethodCall.checkReturnType = method.returnType; |
614 | $scope.newMethodCall.checkReturnType = method.returnType; |
616 | if(method.returnTypeSuperClasses) |
615 | if(method.returnTypeSuperClasses) |
617 | $scope.newMethodCall.checkReturnTypeSuperClasses = method.returnTypeSuperClasses; |
616 | $scope.newMethodCall.checkReturnTypeSuperClasses = method.returnTypeSuperClasses; |
618 | } |
617 | } |
619 | 618 | ||
620 | 619 | ||
621 | /** |
620 | /** |
622 | * |
621 | * |
623 | * |
622 | * |
624 | * OPERACOES PARA MODAL DE CONNECTOR SOA |
623 | * OPERACOES PARA MODAL DE CONNECTOR SOA |
625 | * |
624 | * |
626 | * |
625 | * |
627 | * **/ |
626 | * **/ |
628 | 627 | ||
629 | $scope.openSoaModal = function(soaTarget) |
628 | $scope.openSoaModal = function(soaTarget) |
630 | { |
629 | { |
631 | if(!soaTarget) |
630 | if(!soaTarget) |
632 | { |
631 | { |
633 | soaTarget = $scope.createNewTodo("<%=ConnectorSoa.class.getName()%>"); |
632 | soaTarget = $scope.createNewTodo("<%=ConnectorSoa.class.getName()%>"); |
634 | $scope.newSoa = soaTarget; |
633 | $scope.newSoa = soaTarget; |
635 | } |
634 | } |
636 | else |
635 | else |
637 | { |
636 | { |
638 | $scope.newSoa = soaTarget; |
637 | $scope.newSoa = soaTarget; |
639 | $scope.prepareTodoToEdit(soaTarget,$scope.getServiceMethods(soaTarget.className)); |
638 | $scope.prepareTodoToEdit(soaTarget,$scope.getServiceMethods(soaTarget.className)); |
640 | } |
639 | } |
641 | soaTarget.usaDadosAtorDoFormulario = false; |
640 | soaTarget.usaDadosAtorDoFormulario = false; |
642 | $("#soaModalSelector").modal("show"); |
641 | $("#soaModalSelector").modal("show"); |
643 | } |
642 | } |
644 | 643 | ||
645 | $scope.openSoaModalAtor = function(soaTarget) |
644 | $scope.openSoaModalAtor = function(soaTarget) |
646 | { |
645 | { |
647 | if(!soaTarget) |
646 | if(!soaTarget) |
648 | { |
647 | { |
649 | soaTarget = $scope.createNewTodoAtor("<%=ConnectorSoa.class.getName()%>"); |
648 | soaTarget = $scope.createNewTodoAtor("<%=ConnectorSoa.class.getName()%>"); |
650 | $scope.newSoa = soaTarget; |
649 | $scope.newSoa = soaTarget; |
651 | } |
650 | } |
652 | else |
651 | else |
653 | { |
652 | { |
654 | $scope.newSoa = soaTarget; |
653 | $scope.newSoa = soaTarget; |
655 | $scope.prepareTodoToEdit(soaTarget,$scope.getServiceMethods(soaTarget.className)); |
654 | $scope.prepareTodoToEdit(soaTarget,$scope.getServiceMethods(soaTarget.className)); |
656 | } |
655 | } |
657 | soaTarget.usaDadosAtorDoFormulario = true; |
656 | soaTarget.usaDadosAtorDoFormulario = true; |
658 | $("#soaModalSelector").modal("show"); |
657 | $("#soaModalSelector").modal("show"); |
659 | } |
658 | } |
660 | 659 | ||
661 | 660 | ||
662 | 661 | ||
663 | 662 | ||
664 | $scope.getService = function(classname) |
663 | $scope.getService = function(classname) |
665 | { |
664 | { |
666 | if(classname) |
665 | if(classname) |
667 | { |
666 | { |
668 | var service = $filter('filter')($scope.servicesSoa, {"className": classname },true)[0]; |
667 | var service = $filter('filter')($scope.servicesSoa, {"className": classname },true)[0]; |
669 | return service; |
668 | return service; |
670 | } |
669 | } |
671 | } |
670 | } |
672 | $scope.getServiceMethods = function(classname) |
671 | $scope.getServiceMethods = function(classname) |
673 | { |
672 | { |
674 | if(classname) |
673 | if(classname) |
675 | { |
674 | { |
676 | var service = $filter('filter')($scope.servicesSoa, {"className": classname },true)[0]; |
675 | var service = $filter('filter')($scope.servicesSoa, {"className": classname },true)[0]; |
677 | return service.methods; |
676 | return service.methods; |
678 | } |
677 | } |
679 | } |
678 | } |
680 | 679 | ||
681 | $scope.deleteTodo = function(task,index) |
680 | $scope.deleteTodo = function(task,index) |
682 | { |
681 | { |
683 | task.todos.todos.splice(index,1); |
682 | task.todos.todos.splice(index,1); |
684 | $scope.setDirty(task); |
683 | $scope.setDirty(task); |
685 | } |
684 | } |
686 | $scope.deleteAfterUserTodo = function(task,index) |
685 | $scope.deleteAfterUserTodo = function(task,index) |
687 | { |
686 | { |
688 | task.afterUserTodos.todos.splice(index,1); |
687 | task.afterUserTodos.todos.splice(index,1); |
689 | $scope.setDirty(task); |
688 | $scope.setDirty(task); |
690 | } |
689 | } |
691 | 690 | ||
692 | $scope.getServiceMethod = function() |
691 | $scope.getServiceMethod = function() |
693 | { |
692 | { |
694 | return $scope.newSoa.methodChoosed; |
693 | return $scope.newSoa.methodChoosed; |
695 | } |
694 | } |
696 | 695 | ||
697 | $scope.setArgumentsNewSoa = function() |
696 | $scope.setArgumentsNewSoa = function() |
698 | { |
697 | { |
699 | var method = $scope.newSoa.methodChoosed; |
698 | var method = $scope.newSoa.methodChoosed; |
700 | var arguments = []; |
699 | var arguments = []; |
701 | for(var a in method.arguments) |
700 | for(var a in method.arguments) |
702 | { |
701 | { |
703 | var newArgument = { |
702 | var newArgument = { |
704 | "@class" : "<%=Argument.class.getName()%>", |
703 | "@class" : "<%=Argument.class.getName()%>", |
705 | "name" : method.arguments[a].name, |
704 | "name" : method.arguments[a].name, |
706 | "varName" : "", |
705 | "varName" : "", |
707 | "className" : method.arguments[a].className |
706 | "className" : method.arguments[a].className |
708 | } |
707 | } |
709 | if( method.arguments[a].classNameSuperClasses) |
708 | if( method.arguments[a].classNameSuperClasses) |
710 | newArgument.classNameSuperClasses = method.arguments[a].classNameSuperClasses; |
709 | newArgument.classNameSuperClasses = method.arguments[a].classNameSuperClasses; |
711 | arguments.push(newArgument); |
710 | arguments.push(newArgument); |
712 | } |
711 | } |
713 | $scope.newSoa.methodName = method.name; |
712 | $scope.newSoa.methodName = method.name; |
714 | $scope.newSoa.arguments = arguments; |
713 | $scope.newSoa.arguments = arguments; |
715 | $scope.newSoa.checkReturnType = method.returnType; |
714 | $scope.newSoa.checkReturnType = method.returnType; |
716 | if(method.returnTypeSuperClasses) |
715 | if(method.returnTypeSuperClasses) |
717 | $scope.newSoa.checkReturnTypeSuperClasses = method.returnTypeSuperClasses; |
716 | $scope.newSoa.checkReturnTypeSuperClasses = method.returnTypeSuperClasses; |
718 | } |
717 | } |
719 | 718 | ||
720 | 719 | ||
721 | 720 | ||
722 | 721 | ||
723 | /** |
722 | /** |
724 | * |
723 | * |
725 | * |
724 | * |
726 | * |
725 | * |
727 | * */ |
726 | * */ |
728 | 727 | ||
729 | 728 | ||
730 | $scope.getSimpleClassName = function(classname) |
729 | $scope.getSimpleClassName = function(classname) |
731 | { |
730 | { |
732 | if(classname && classname != "") |
731 | if(classname && classname != "") |
733 | { |
732 | { |
734 | var lastDot = classname.lastIndexOf("."); |
733 | var lastDot = classname.lastIndexOf("."); |
735 | if(lastDot >= 0) |
734 | if(lastDot >= 0) |
736 | return classname.substring(lastDot + 1); |
735 | return classname.substring(lastDot + 1); |
737 | return classname; |
736 | return classname; |
738 | } |
737 | } |
739 | return ""; |
738 | return ""; |
740 | } |
739 | } |
741 | 740 | ||
742 | $scope.soaServiceSelector = function() |
741 | $scope.soaServiceSelector = function() |
743 | { |
742 | { |
744 | setTimeout(function() { $("#SoaServiceSelector").chosen(); }, 500); |
743 | setTimeout(function() { $("#SoaServiceSelector").chosen(); }, 500); |
745 | // $("#SoaServiceSelector").chosen(); |
744 | // $("#SoaServiceSelector").chosen(); |
746 | } |
745 | } |
747 | 746 | ||
748 | 747 | ||
749 | 748 | ||
750 | $scope.newRoleForPool = function(item) |
749 | $scope.newRoleForPool = function(item) |
751 | { |
750 | { |
752 | $scope.idTemp--; |
751 | $scope.idTemp--; |
753 | if(item.roles == null) |
752 | if(item.roles == null) |
754 | { |
753 | { |
755 | item.roles = []; |
754 | item.roles = []; |
756 | } |
755 | } |
757 | item.roles.push( |
756 | item.roles.push( |
758 | { |
757 | { |
759 | "role" : "", |
758 | "role" : "", |
760 | "trans" : "" |
759 | "trans" : "" |
761 | } |
760 | } |
762 | ); |
761 | ); |
763 | //O chosen está off para que na primeira interação nao actue sobre |
762 | //O chosen está off para que na primeira interação nao actue sobre |
764 | //o option padrão que está sempre presente para preenchimento pelo Angular |
763 | //o option padrão que está sempre presente para preenchimento pelo Angular |
765 | setTimeout(function() { invokeChosenSelects("#bpmnPools"); }, 100); |
764 | setTimeout(function() { invokeChosenSelects("#bpmnPools"); }, 100); |
766 | } |
765 | } |
767 | 766 | ||
768 | $scope.newProcessVar = function() |
767 | $scope.newProcessVar = function() |
769 | { |
768 | { |
770 | $scope.callService("newProcessVar",{"processId":$scope.process.id},function(processVariable) |
769 | $scope.callService("newProcessVar",{"processId":$scope.process.id},function(processVariable) |
771 | { |
770 | { |
772 | if(!$scope.process.processVariables) |
771 | if(!$scope.process.processVariables) |
773 | $scope.process.processVariables = []; |
772 | $scope.process.processVariables = []; |
774 | $scope.process.processVariables.push(processVariable); |
773 | $scope.process.processVariables.push(processVariable); |
775 | $scope.$apply(); |
774 | $scope.$apply(); |
776 | }); |
775 | }); |
777 | } |
776 | } |
778 | 777 | ||
779 | $scope.removeProcessVar = function(variableId,$index) |
778 | $scope.removeProcessVar = function(variableId,$index) |
780 | { |
779 | { |
781 | $scope.callSimpleService("removeProcessVar",{"processId":$scope.process.id,"variableId":variableId},function() |
780 | $scope.callSimpleService("removeProcessVar",{"processId":$scope.process.id,"variableId":variableId},function() |
782 | { |
781 | { |
783 | $scope.process.processVariables.splice($index,1); |
782 | $scope.process.processVariables.splice($index,1); |
784 | $scope.$apply(); |
783 | $scope.$apply(); |
785 | }); |
784 | }); |
786 | } |
785 | } |
787 | 786 | ||
788 | $scope.newLocalVar = function(task) |
787 | $scope.newLocalVar = function(task) |
789 | { |
788 | { |
790 | $scope.callService("newLocalVar",{"taskId":task.id},function(taskVariable) |
789 | $scope.callService("newLocalVar",{"taskId":task.id},function(taskVariable) |
791 | { |
790 | { |
792 | if(!task.localVariables) |
791 | if(!task.localVariables) |
793 | task.localVariables = []; |
792 | task.localVariables = []; |
794 | task.localVariables.push(taskVariable); |
793 | task.localVariables.push(taskVariable); |
795 | $scope.$apply(); |
794 | $scope.$apply(); |
796 | }); |
795 | }); |
797 | } |
796 | } |
798 | 797 | ||
799 | $scope.removeLocalVar = function(variableId,$index) |
798 | $scope.removeLocalVar = function(variableId,$index) |
800 | { |
799 | { |
801 | $scope.callSimpleService("removeLocalVar",{"variableId":variableId,"taskId":$scope.selected.id},function() |
800 | $scope.callSimpleService("removeLocalVar",{"variableId":variableId,"taskId":$scope.selected.id},function() |
802 | { |
801 | { |
803 | var task = $scope.selected; |
802 | var task = $scope.selected; |
804 | task.localVariables.splice($index,1); |
803 | task.localVariables.splice($index,1); |
805 | $scope.$apply(); |
804 | $scope.$apply(); |
806 | }); |
805 | }); |
807 | } |
806 | } |
808 | 807 | ||
809 | $scope.pushArray = function(arrayDestiny,arraySource) |
808 | $scope.pushArray = function(arrayDestiny,arraySource) |
810 | { |
809 | { |
811 | for(var a in arraySource) |
810 | for(var a in arraySource) |
812 | { |
811 | { |
813 | arrayDestiny.push(arraySource[a]); |
812 | arrayDestiny.push(arraySource[a]); |
814 | } |
813 | } |
815 | } |
814 | } |
816 | 815 | ||
817 | $scope.getAllVariables = function() |
816 | $scope.getAllVariables = function() |
818 | { |
817 | { |
819 | var allVariables = []; |
818 | var allVariables = []; |
820 | if($scope.process.processVariables) |
819 | if($scope.process.processVariables) |
821 | $scope.pushArray(allVariables,$scope.process.processVariables); |
820 | $scope.pushArray(allVariables,$scope.process.processVariables); |
822 | var task = $scope.selected; |
821 | var task = $scope.selected; |
823 | if(task) |
822 | if(task) |
824 | { |
823 | { |
825 | if(task.localVariables) |
824 | if(task.localVariables) |
826 | $scope.pushArray(allVariables,task.localVariables); |
825 | $scope.pushArray(allVariables,task.localVariables); |
827 | var isActorTask = task["@class"].startsWith("<%=pt.estgp.estgweb.domain.BpmnFlowComponentTaskActor.class.getName()%>"); |
826 | var isActorTask = task["@class"].startsWith("<%=pt.estgp.estgweb.domain.BpmnFlowComponentTaskActor.class.getName()%>"); |
828 | if(isActorTask) |
827 | if(isActorTask) |
829 | $scope.pushArray(allVariables,$scope.constantVariablesActorTask); |
828 | $scope.pushArray(allVariables,$scope.constantVariablesActorTask); |
830 | else |
829 | else |
831 | $scope.pushArray(allVariables,$scope.constantVariables); |
830 | $scope.pushArray(allVariables,$scope.constantVariables); |
832 | } |
831 | } |
833 | return allVariables; |
832 | return allVariables; |
834 | } |
833 | } |
835 | 834 | ||
836 | /** |
835 | /** |
837 | * @classe class to match |
836 | * @classe class to match |
838 | * @superClasses array of strings |
837 | * @superClasses array of strings |
839 | * */ |
838 | * */ |
840 | $scope.contains = function(superClasses,classe) |
839 | $scope.contains = function(superClasses,classe) |
841 | { |
840 | { |
842 | if(superClasses) |
841 | if(superClasses) |
843 | { |
842 | { |
844 | for(var i in superClasses) |
843 | for(var i in superClasses) |
845 | { |
844 | { |
846 | if(classe == superClasses[i]) |
845 | if(classe == superClasses[i]) |
847 | return true; |
846 | return true; |
848 | } |
847 | } |
849 | } |
848 | } |
850 | return false; |
849 | return false; |
851 | } |
850 | } |
852 | 851 | ||
853 | 852 | ||
854 | /** |
853 | /** |
855 | * Return variables that match the given attribute className |
854 | * Return variables that match the given attribute className |
856 | * If attribution = true means that readonly process variables are not allowded |
855 | * If attribution = true means that readonly process variables are not allowded |
857 | * |
856 | * |
858 | 857 | ||
859 | A verificação de variáveis possíveis de Atribuir considera duas situações |
858 | A verificação de variáveis possíveis de Atribuir considera duas situações |
860 | Chamado em duas Situações, |
859 | Chamado em duas Situações, |
861 | 1) a escolha de variável para a atribuição |
860 | 1) a escolha de variável para a atribuição |
862 | 2) a escolha de variável para argumento de um método |
861 | 2) a escolha de variável para argumento de um método |
863 | 862 | ||
864 | 1) Definição com Exemplo |
863 | 1) Definição com Exemplo |
865 | User metodo(…); |
864 | User metodo(…); |
866 | returnType = User |
865 | returnType = User |
867 | returnTypeSuperClasses = [SigesUser,GenericUser,DomainObject] |
866 | returnTypeSuperClasses = [SigesUser,GenericUser,DomainObject] |
868 | 867 | ||
869 | var1 Teacher |
868 | var1 Teacher |
870 | className=Teacher |
869 | className=Teacher |
871 | classNameSuperTypes = [User,SigesUser,GenericUser,DomainObject,Object] |
870 | classNameSuperTypes = [User,SigesUser,GenericUser,DomainObject,Object] |
872 | var2 DomainObject |
871 | var2 DomainObject |
873 | className= DomainObject |
872 | className= DomainObject |
874 | classNameSuperTypes = [DomainObject,Object] |
873 | classNameSuperTypes = [DomainObject,Object] |
875 | 874 | ||
876 | Para poder ser feita uma atribuição, ou seja para a variável var1 e/ou var2 ser uma das possíveis |
875 | Para poder ser feita uma atribuição, ou seja para a variável var1 e/ou var2 ser uma das possíveis |
877 | tem de respeitar a seguinte condição |
876 | tem de respeitar a seguinte condição |
878 | returnType instanceOf varN é possivel |
877 | returnType instanceOf varN é possivel |
879 | O que significa executar o seguinte algoritmo com resposta positiva |
878 | O que significa executar o seguinte algoritmo com resposta positiva |
880 | 879 | ||
881 | varN.className == returnType || returnTypeSuperClasses contains varN.className |
880 | varN.className == returnType || returnTypeSuperClasses contains varN.className |
882 | neste sentido a var 2 pode ser usada na atribuição e a var 1 não |
881 | neste sentido a var 2 pode ser usada na atribuição e a var 1 não |
883 | 882 | ||
884 | 883 | ||
885 | 2) Definição com Exemplo |
884 | 2) Definição com Exemplo |
886 | ... metodo(User); |
885 | ... metodo(User); |
887 | argument.className = User |
886 | argument.className = User |
888 | argument.classNameSuperClasses = [SigesUser,GenericUser,DomainObject] |
887 | argument.classNameSuperClasses = [SigesUser,GenericUser,DomainObject] |
889 | 888 | ||
890 | var1 Teacher |
889 | var1 Teacher |
891 | className=Teacher |
890 | className=Teacher |
892 | classNameSuperTypes = [User,SigesUser,GenericUser,DomainObject,Object] |
891 | classNameSuperTypes = [User,SigesUser,GenericUser,DomainObject,Object] |
893 | var2 DomainObject |
892 | var2 DomainObject |
894 | className= DomainObject |
893 | className= DomainObject |
895 | classNameSuperTypes = [DomainObject,Object] |
894 | classNameSuperTypes = [DomainObject,Object] |
896 | 895 | ||
897 | Para poder ser feita uma atribuição, ou seja para a variável var1 e/ou var2 ser uma das possíveis |
896 | Para poder ser feita uma atribuição, ou seja para a variável var1 e/ou var2 ser uma das possíveis |
898 | tem de respeitar a seguinte condição |
897 | tem de respeitar a seguinte condição |
899 | 898 | ||
900 | varN instanceOf argument.className é possivel (A condicao é ao contrario da anterior em 1) |
899 | varN instanceOf argument.className é possivel (A condicao é ao contrario da anterior em 1) |
901 | 900 | ||
902 | O que significa executar o seguinte algoritmo com resposta positiva |
901 | O que significa executar o seguinte algoritmo com resposta positiva |
903 | 902 | ||
904 | varN.className == argument.className || varN.classNameSuperClasses contains argument.className |
903 | varN.className == argument.className || varN.classNameSuperClasses contains argument.className |
905 | neste sentido a var 1 pode ser usada na atribuição e a var 2 não |
904 | neste sentido a var 1 pode ser usada na atribuição e a var 2 não |
906 | 905 | ||
907 | 906 | ||
908 | 907 | ||
909 | * */ |
908 | * */ |
910 | $scope.getPossibleVariables = function(className,classNameSuperClasses,forAttribution,afterUserCalls) |
909 | $scope.getPossibleVariables = function(className,classNameSuperClasses,forAttribution,afterUserCalls) |
911 | { |
910 | { |
912 | if(!$scope.selected || !className) |
911 | if(!$scope.selected || !className) |
913 | return; |
912 | return; |
914 | var isActorTask = $scope.selected["@class"].startsWith("<%=pt.estgp.estgweb.domain.BpmnFlowComponentTaskActor.class.getName()%>"); |
913 | var isActorTask = $scope.selected["@class"].startsWith("<%=pt.estgp.estgweb.domain.BpmnFlowComponentTaskActor.class.getName()%>"); |
915 | var possibleVars = []; |
914 | var possibleVars = []; |
916 | var task = $scope.selected; |
915 | var task = $scope.selected; |
917 | 916 | ||
918 | for(var v in $scope.process.processVariables) |
917 | for(var v in $scope.process.processVariables) |
919 | { |
918 | { |
920 | var processVariable = $scope.process.processVariables[v]; |
919 | var processVariable = $scope.process.processVariables[v]; |
921 | if(className == processVariable.type.className) |
920 | if(className == processVariable.type.className) |
922 | { |
921 | { |
923 | possibleVars.push(processVariable); |
922 | possibleVars.push(processVariable); |
924 | } |
923 | } |
925 | else if(forAttribution && $scope.contains(classNameSuperClasses,processVariable.type.className)) |
924 | else if(forAttribution && $scope.contains(classNameSuperClasses,processVariable.type.className)) |
926 | { |
925 | { |
927 | possibleVars.push(processVariable); |
926 | possibleVars.push(processVariable); |
928 | } |
927 | } |
929 | else if(!forAttribution && $scope.contains(processVariable.type.classNameSuperClasses,className)) |
928 | else if(!forAttribution && $scope.contains(processVariable.type.classNameSuperClasses,className)) |
930 | { |
929 | { |
931 | possibleVars.push(processVariable); |
930 | possibleVars.push(processVariable); |
932 | } |
931 | } |
933 | } |
932 | } |
934 | for(var v in task.localVariables) |
933 | for(var v in task.localVariables) |
935 | { |
934 | { |
936 | var taskVariable = task.localVariables[v]; |
935 | var taskVariable = task.localVariables[v]; |
937 | if(className == taskVariable.type.className) |
936 | if(className == taskVariable.type.className) |
938 | { |
937 | { |
939 | possibleVars.push(taskVariable); |
938 | possibleVars.push(taskVariable); |
940 | } |
939 | } |
941 | else if(forAttribution && $scope.contains(classNameSuperClasses,taskVariable.type.className)) |
940 | else if(forAttribution && $scope.contains(classNameSuperClasses,taskVariable.type.className)) |
942 | { |
941 | { |
943 | possibleVars.push(taskVariable); |
942 | possibleVars.push(taskVariable); |
944 | } |
943 | } |
945 | else if(!forAttribution && $scope.contains(taskVariable.type.classNameSuperClasses,className)) |
944 | else if(!forAttribution && $scope.contains(taskVariable.type.classNameSuperClasses,className)) |
946 | { |
945 | { |
947 | possibleVars.push(taskVariable); |
946 | possibleVars.push(taskVariable); |
948 | } |
947 | } |
949 | } |
948 | } |
950 | //Estas variaveis só podem ser usadas, nunca alteradas |
949 | //Estas variaveis só podem ser usadas, nunca alteradas |
951 | if(!forAttribution) |
950 | if(!forAttribution) |
952 | { |
951 | { |
953 | /* |
952 | /* |
954 | Ator Antes |
953 | Ator Antes |
955 | Ator Depois |
954 | Ator Depois |
956 | Normal |
955 | Normal |
957 | */ |
956 | */ |
958 | var atorMasAntesDoForm = !afterUserCalls; // ATOR ANTES NAO VAI SER USADO SE QUISERMOS EXECUTAR TAREFAS EM BACKGROUND DEVERA SER CRIADA UmA TAREFA SERVIÇO PARA O EFEITO |
957 | var atorMasAntesDoForm = !afterUserCalls; // ATOR ANTES NAO VAI SER USADO SE QUISERMOS EXECUTAR TAREFAS EM BACKGROUND DEVERA SER CRIADA UmA TAREFA SERVIÇO PARA O EFEITO |
959 | var tarefaServicoNormal = !isActorTask; // NORMAL |
958 | var tarefaServicoNormal = !isActorTask; // NORMAL |
960 | /*|| atorMasAntesDoForm */ |
959 | /*|| atorMasAntesDoForm */ |
961 | if(tarefaServicoNormal ) // ve vars constantes normais de processo |
960 | if(tarefaServicoNormal ) // ve vars constantes normais de processo |
962 | { |
961 | { |
963 | for(var v in $scope.constantVariables) |
962 | for(var v in $scope.constantVariables) |
964 | { |
963 | { |
965 | var variable = $scope.constantVariables[v]; |
964 | var variable = $scope.constantVariables[v]; |
966 | if(className == variable.type.className) |
965 | if(className == variable.type.className) |
967 | { |
966 | { |
968 | possibleVars.push(variable); |
967 | possibleVars.push(variable); |
969 | } |
968 | } |
970 | else if($scope.contains(variable.type.classNameSuperClasses,className)) |
969 | else if($scope.contains(variable.type.classNameSuperClasses,className)) |
971 | { |
970 | { |
972 | possibleVars.push(variable); |
971 | possibleVars.push(variable); |
973 | } |
972 | } |
974 | } |
973 | } |
975 | } |
974 | } |
976 | else //ATOR DEPOIS Pode usar tudo |
975 | else //ATOR DEPOIS Pode usar tudo |
977 | { |
976 | { |
978 | for(var v in $scope.constantVariablesActorTask) |
977 | for(var v in $scope.constantVariablesActorTask) |
979 | { |
978 | { |
980 | var variable = $scope.constantVariablesActorTask[v]; |
979 | var variable = $scope.constantVariablesActorTask[v]; |
981 | if(className == variable.type.className) |
980 | if(className == variable.type.className) |
982 | { |
981 | { |
983 | possibleVars.push(variable); |
982 | possibleVars.push(variable); |
984 | } |
983 | } |
985 | else if($scope.contains(variable.type.classNameSuperClasses,className)) |
984 | else if($scope.contains(variable.type.classNameSuperClasses,className)) |
986 | { |
985 | { |
987 | possibleVars.push(variable); |
986 | possibleVars.push(variable); |
988 | } |
987 | } |
989 | } |
988 | } |
990 | } |
989 | } |
991 | } |
990 | } |
992 | return possibleVars; |
991 | return possibleVars; |
993 | } |
992 | } |
994 | 993 | ||
995 | }); |
994 | }); |
996 | /** |
995 | /** |
997 | Directiva showErrors reutilizavel para validação de forms groups |
996 | Directiva showErrors reutilizavel para validação de forms groups |
998 | Basta que um campo no form tenha a classe form-control* |
997 | Basta que um campo no form tenha a classe form-control* |
999 | 998 | ||
1000 | em cada campo onde quisermos validação é necessario colocar show-errors no container |
999 | em cada campo onde quisermos validação é necessario colocar show-errors no container |
1001 | e dar um nome unico ao input a validar e também a directiva required |
1000 | e dar um nome unico ao input a validar e também a directiva required |
1002 | 1001 | ||
1003 | é necessario dar o nome processoForm neste caso para o save atuar sobre a verificacao de validade da form |
1002 | é necessario dar o nome processoForm neste caso para o save atuar sobre a verificacao de validade da form |
1004 | é necessario definir a class .has-error .chosen-container com #a94442 e !important para se sobrebor nos selects do chosen |
1003 | é necessario definir a class .has-error .chosen-container com #a94442 e !important para se sobrebor nos selects do chosen |
1005 | */ |
1004 | */ |
1006 | 1005 | ||
1007 | /* |
1006 | /* |
1008 | processEditorModule.directive('showErrors', function($timeout) { |
1007 | processEditorModule.directive('showErrors', function($timeout) { |
1009 | return { |
1008 | return { |
1010 | restrict: 'A', |
1009 | restrict: 'A', |
1011 | require: '^form', |
1010 | require: '^form', |
1012 | link: function (scope, el, attrs, formCtrl) |
1011 | link: function (scope, el, attrs, formCtrl) |
1013 | { |
1012 | { |
1014 | scope.initOk = function(scope, el, attrs, formCtrl) { |
1013 | scope.initOk = function(scope, el, attrs, formCtrl) { |
1015 | 1014 | ||
1016 | var inputEl = el[0].querySelector("[name]"); |
1015 | var inputEl = el[0].querySelector("[name]"); |
1017 | var inputNgEl = angular.element(inputEl); |
1016 | var inputNgEl = angular.element(inputEl); |
1018 | 1017 | ||
1019 | var inputName = inputNgEl.attr('name'); |
1018 | var inputName = inputNgEl.attr('name'); |
1020 | 1019 | ||
1021 | var blurred = false; |
1020 | var blurred = false; |
1022 | // only apply the has-error class after the user leaves the text box |
1021 | // only apply the has-error class after the user leaves the text box |
1023 | inputNgEl.bind('blur', function() { |
1022 | inputNgEl.bind('blur', function() { |
1024 | blurred = true; |
1023 | blurred = true; |
1025 | el.toggleClass('has-error', formCtrl[inputName].$invalid); |
1024 | el.toggleClass('has-error', formCtrl[inputName].$invalid); |
1026 | }); |
1025 | }); |
1027 | 1026 | ||
1028 | scope.$watch(function() { |
1027 | scope.$watch(function() { |
1029 | return formCtrl[inputName].$invalid |
1028 | return formCtrl[inputName].$invalid |
1030 | }, |
1029 | }, |
1031 | function(invalid) { |
1030 | function(invalid) { |
1032 | // we only want to toggle the has-error class after the blur |
1031 | // we only want to toggle the has-error class after the blur |
1033 | // event or if the control becomes valid |
1032 | // event or if the control becomes valid |
1034 | if (!blurred && invalid) { return } |
1033 | if (!blurred && invalid) { return } |
1035 | el.toggleClass('has-error', invalid); |
1034 | el.toggleClass('has-error', invalid); |
1036 | 1035 | ||
1037 | }); |
1036 | }); |
1038 | 1037 | ||
1039 | 1038 | ||
1040 | scope.$on('show-errors-check-validity', function() { |
1039 | scope.$on('show-errors-check-validity', function() { |
1041 | el.toggleClass('has-error', formCtrl[inputName].$invalid); |
1040 | el.toggleClass('has-error', formCtrl[inputName].$invalid); |
1042 | }); |
1041 | }); |
1043 | 1042 | ||
1044 | scope.$on('show-errors-reset', function() { |
1043 | scope.$on('show-errors-reset', function() { |
1045 | $timeout(function() { |
1044 | $timeout(function() { |
1046 | el.removeClass('has-error'); |
1045 | el.removeClass('has-error'); |
1047 | }, 0, false); |
1046 | }, 0, false); |
1048 | }); |
1047 | }); |
1049 | } |
1048 | } |
1050 | scope.initClean = function(scope, el, attrs, formCtrl) { |
1049 | scope.initClean = function(scope, el, attrs, formCtrl) { |
1051 | 1050 | ||
1052 | 1051 | ||
1053 | var inputEl = el[0].querySelector("[name]"); |
1052 | var inputEl = el[0].querySelector("[name]"); |
1054 | var inputNgEl = angular.element(inputEl); |
1053 | var inputNgEl = angular.element(inputEl); |
1055 | 1054 | ||
1056 | //scope.$watch("processoForm", function( newValue, oldValue ) { |
1055 | //scope.$watch("processoForm", function( newValue, oldValue ) { |
1057 | if ( inputNgEl.attr('name').indexOf("{")>=0 ) { |
1056 | if ( inputNgEl.attr('name').indexOf("{")>=0 ) { |
1058 | console.log( "Sujo..." + inputNgEl.attr('name')); |
1057 | console.log( "Sujo..." + inputNgEl.attr('name')); |
1059 | $timeout(function() { |
1058 | $timeout(function() { |
1060 | scope.initClean(scope, el, attrs, formCtrl); |
1059 | scope.initClean(scope, el, attrs, formCtrl); |
1061 | } |
1060 | } |
1062 | , 100); |
1061 | , 100); |
1063 | return; |
1062 | return; |
1064 | } |
1063 | } |
1065 | else{ |
1064 | else{ |
1066 | console.log("LIMPO..." + inputNgEl.attr('name')); |
1065 | console.log("LIMPO..." + inputNgEl.attr('name')); |
1067 | scope.initOk(scope, el, attrs, formCtrl); |
1066 | scope.initOk(scope, el, attrs, formCtrl); |
1068 | } |
1067 | } |
1069 | //}); |
1068 | //}); |
1070 | }; |
1069 | }; |
1071 | 1070 | ||
1072 | scope.initClean(scope, el, attrs, formCtrl); |
1071 | scope.initClean(scope, el, attrs, formCtrl); |
1073 | } |
1072 | } |
1074 | } |
1073 | } |
1075 | }); |
1074 | }); |
1076 | */ |
1075 | */ |
1077 | 1076 | ||
1078 | </script> |
1077 | </script> |
1079 | 1078 | ||
1080 | <%--####################################################### |
1079 | <%--####################################################### |
1081 | ####################################################### |
1080 | ####################################################### |
1082 | MODAL PARA OPERACOES SOA |
1081 | MODAL PARA OPERACOES SOA |
1083 | ####################################################### |
1082 | ####################################################### |
1084 | ####################################################### |
1083 | ####################################################### |
1085 | --%> |
1084 | --%> |
1086 | <div class="modal fade" id="soaModalSelector" role="dialog" > |
1085 | <div class="modal fade" id="soaModalSelector" role="dialog" > |
1087 | <div class="modal-dialog" data-width="1024" style="display: block; width: 1024px; margin-top: 50px;" aria-hidden="false"> |
1086 | <div class="modal-dialog" data-width="1024" style="display: block; width: 1024px; margin-top: 50px;" aria-hidden="false"> |
1088 | 1087 | ||
1089 | <!-- Modal content--> |
1088 | <!-- Modal content--> |
1090 | <div class="modal-content"> |
1089 | <div class="modal-content"> |
1091 | <div class="modal-header clearfix"> |
1090 | <div class="modal-header clearfix"> |
1092 | <h3 class="modal-title"> |
1091 | <h3 class="modal-title"> |
1093 | <label class="title-wrap">Selector de connector SOA</label> |
1092 | <label class="title-wrap">Selector de connector SOA</label> |
1094 | <button type="button" class="btn btn-danger btn-xs pull-right" data-dismiss="modal"><span class="glyphicon glyphicon-remove small"></span></button> |
1093 | <button type="button" class="btn btn-danger btn-xs pull-right" data-dismiss="modal"><span class="glyphicon glyphicon-remove small"></span></button> |
1095 | </h3> |
1094 | </h3> |
1096 | </div> |
1095 | </div> |
1097 | <div class="modal-body"> |
1096 | <div class="modal-body"> |
1098 | 1097 | ||
1099 | <div class="row"> |
1098 | <div class="row"> |
1100 | <div class="col-md-5"> |
1099 | <div class="col-md-5"> |
1101 | <div class="form-group"> |
1100 | <div class="form-group"> |
1102 | <label class="control-label">Serviço SOA</label> |
1101 | <label class="control-label">Serviço SOA</label> |
1103 | <div> |
1102 | <div> |
1104 | <select class="chosenOff form-control" ng-model="newSoa.className" ng-options="soa.className as soa.serviceRelativeName for soa in servicesSoa"></select> |
1103 | <select class="chosenOff form-control" ng-model="newSoa.className" ng-options="soa.className as soa.serviceRelativeName for soa in servicesSoa"></select> |
1105 | </div> |
1104 | </div> |
1106 | </div> |
1105 | </div> |
1107 | <div ng-show="newSoa.className" class="form-group"> |
1106 | <div ng-show="newSoa.className" class="form-group"> |
1108 | <label class="control-label">Método</label> |
1107 | <label class="control-label">Método</label> |
1109 | <div> |
1108 | <div> |
1110 | <select ng-change="setArgumentsNewSoa()" class="chosenOff form-control" ng-model="newSoa.methodChoosed" ng-options="m as showMethodSign(m) for m in getServiceMethods(newSoa.className)"></select> |
1109 | <select ng-change="setArgumentsNewSoa()" class="chosenOff form-control" ng-model="newSoa.methodChoosed" ng-options="m as showMethodSign(m) for m in getServiceMethods(newSoa.className)"></select> |
1111 | </div> |
1110 | </div> |
1112 | 1111 | ||
1113 | 1112 | ||
1114 | <div ng-show="newSoa.methodName"> |
1113 | <div ng-show="newSoa.methodName"> |
1115 | <div class="form-group"> |
1114 | <div class="form-group"> |
1116 | <label class="control-label">Resultado</label> |
1115 | <label class="control-label">Resultado</label> |
1117 | <div> |
1116 | <div> |
1118 | <select class="chosenOff form-control" ng-model="newSoa.localObjectHolderName" ng-options="v.name as v.name for v in getPossibleVariables(newSoa.checkReturnType,newSoa.checkReturnTypeSuperClasses,true,false)"> |
1117 | <select class="chosenOff form-control" ng-model="newSoa.localObjectHolderName" ng-options="v.name as v.name for v in getPossibleVariables(newSoa.checkReturnType,newSoa.checkReturnTypeSuperClasses,true,false)"> |
1119 | 1118 | ||
1120 | </select> |
1119 | </select> |
1121 | </div> |
1120 | </div> |
1122 | </div> |
1121 | </div> |
1123 | <table class="table"> |
1122 | <table class="table"> |
1124 | <thead> |
1123 | <thead> |
1125 | <tr> |
1124 | <tr> |
1126 | <th>Nome</th> |
1125 | <th>Nome</th> |
1127 | <th>Variavel Valor</th> |
1126 | <th>Variavel Valor</th> |
1128 | </tr> |
1127 | </tr> |
1129 | </thead> |
1128 | </thead> |
1130 | <tbody> |
1129 | <tbody> |
1131 | <tr ng-repeat="arg in newSoa.arguments"> |
1130 | <tr ng-repeat="arg in newSoa.arguments"> |
1132 | <td><label class="control-label">{{arg.name}} = </label></td> |
1131 | <td><label class="control-label">{{arg.name}} = </label></td> |
1133 | <td> |
1132 | <td> |
1134 | <select class="form-control chosenOff" ng-model="arg.varName" ng-options="v.name as v.name for v in getPossibleVariables(arg.className,arg.classNameSuperClasses,false,newSoa.usaDadosAtorDoFormulario)"></select> |
1133 | <select class="form-control chosenOff" ng-model="arg.varName" ng-options="v.name as v.name for v in getPossibleVariables(arg.className,arg.classNameSuperClasses,false,newSoa.usaDadosAtorDoFormulario)"></select> |
1135 | </td> |
1134 | </td> |
1136 | </tr> |
1135 | </tr> |
1137 | </tbody> |
1136 | </tbody> |
1138 | </table> |
1137 | </table> |
1139 | </div> |
1138 | </div> |
1140 | 1139 | ||
1141 | </div> |
1140 | </div> |
1142 | 1141 | ||
1143 | 1142 | ||
1144 | </div> |
1143 | </div> |
1145 | <div class="col-md-7"> |
1144 | <div class="col-md-7"> |
1146 | <label ng-show="newSoa.className" class="well well-sm">Módulo: {{getService(newSoa.className).serviceModule}}</label> |
1145 | <label ng-show="newSoa.className" class="well well-sm">Módulo: {{getService(newSoa.className).serviceModule}}</label> |
1147 | <label ng-show="newSoa.className" class="well well-sm">Serviço: {{getService(newSoa.className).subServiceName}}</label> |
1146 | <label ng-show="newSoa.className" class="well well-sm">Serviço: {{getService(newSoa.className).subServiceName}}</label> |
1148 | <label ng-show="newSoa.methodName" class="well well-sm">Método: {{newSoa.methodName}}</label> |
1147 | <label ng-show="newSoa.methodName" class="well well-sm">Método: {{newSoa.methodName}}</label> |
1149 | 1148 | ||
1150 | <div ng-show="newSoa.methodName"> |
1149 | <div ng-show="newSoa.methodName"> |
1151 | <pre ng-show="getServiceMethod().document" class="code">{{getServiceMethod().document}}</pre> |
1150 | <pre ng-show="getServiceMethod().document" class="code">{{getServiceMethod().document}}</pre> |
1152 | <table class="table"> |
1151 | <table class="table"> |
1153 | <tbody> |
1152 | <tbody> |
1154 | <tr> |
1153 | <tr> |
1155 | <td>Retorno</td> |
1154 | <td>Retorno</td> |
1156 | <td>{{getServiceMethod().returnType}}</td> |
1155 | <td>{{getServiceMethod().returnType}}</td> |
1157 | </tr> |
1156 | </tr> |
1158 | </tbody> |
1157 | </tbody> |
1159 | </table> |
1158 | </table> |
1160 | <table class="table"> |
1159 | <table class="table"> |
1161 | <thead> |
1160 | <thead> |
1162 | <tr> |
1161 | <tr> |
1163 | <th>Parametro</th> |
1162 | <th>Parametro</th> |
1164 | <th>Tipo</th> |
1163 | <th>Tipo</th> |
1165 | </tr> |
1164 | </tr> |
1166 | </thead> |
1165 | </thead> |
1167 | <tbody> |
1166 | <tbody> |
1168 | <tr ng-repeat="a in getServiceMethod().arguments"> |
1167 | <tr ng-repeat="a in getServiceMethod().arguments"> |
1169 | <td>{{a.name}}</td> |
1168 | <td>{{a.name}}</td> |
1170 | <td>{{a.className}}</td> |
1169 | <td>{{a.className}}</td> |
1171 | </tr> |
1170 | </tr> |
1172 | </tbody> |
1171 | </tbody> |
1173 | </table> |
1172 | </table> |
1174 | </div> |
1173 | </div> |
1175 | </div> |
1174 | </div> |
1176 | </div> |
1175 | </div> |
1177 | <button ng-show="newSoa.methodName" ng-click="salvarTodoEdit('soaModalSelector')" class="btn btn-success">Salvar</button> |
1176 | <button ng-show="newSoa.methodName" ng-click="salvarTodoEdit('soaModalSelector')" class="btn btn-success">Salvar</button> |
1178 | <button type="button" class="btn btn-danger pull-right" data-dismiss="modal">Sair</button> |
1177 | <button type="button" class="btn btn-danger pull-right" data-dismiss="modal">Sair</button> |
1179 | </div> |
1178 | </div> |
1180 | </div> |
1179 | </div> |
1181 | </div> |
1180 | </div> |
1182 | </div> |
1181 | </div> |
1183 | 1182 | ||
1184 | 1183 | ||
1185 | 1184 | ||
1186 | <%--####################################################### |
1185 | <%--####################################################### |
1187 | ####################################################### |
1186 | ####################################################### |
1188 | MODAL PARA OPERACOES CHAMADA DE FUNÇÃO |
1187 | MODAL PARA OPERACOES CHAMADA DE FUNÇÃO |
1189 | ####################################################### |
1188 | ####################################################### |
1190 | ####################################################### |
1189 | ####################################################### |
1191 | --%> |
1190 | --%> |
1192 | <div class="modal fade" id="methodCallModalSelector" role="dialog" > |
1191 | <div class="modal fade" id="methodCallModalSelector" role="dialog" > |
1193 | <div class="modal-dialog" data-width="1024" style="display: block; width: 1024px; margin-top: 50px;" aria-hidden="false"> |
1192 | <div class="modal-dialog" data-width="1024" style="display: block; width: 1024px; margin-top: 50px;" aria-hidden="false"> |
1194 | 1193 | ||
1195 | <!-- Modal content--> |
1194 | <!-- Modal content--> |
1196 | <div class="modal-content"> |
1195 | <div class="modal-content"> |
1197 | <div class="modal-header clearfix"> |
1196 | <div class="modal-header clearfix"> |
1198 | <h3 class="modal-title"> |
1197 | <h3 class="modal-title"> |
1199 | <label class="title-wrap">Chamada de um método sobre um Variavel</label> |
1198 | <label class="title-wrap">Chamada de um método sobre um Variavel</label> |
1200 | <button type="button" class="btn btn-danger btn-xs pull-right" data-dismiss="modal"><span class="glyphicon glyphicon-remove small"></span></button> |
1199 | <button type="button" class="btn btn-danger btn-xs pull-right" data-dismiss="modal"><span class="glyphicon glyphicon-remove small"></span></button> |
1201 | </h3> |
1200 | </h3> |
1202 | </div> |
1201 | </div> |
1203 | <div class="modal-body"> |
1202 | <div class="modal-body"> |
1204 | 1203 | ||
1205 | <div class="row"> |
1204 | <div class="row"> |
1206 | <div class="col-md-5"> |
1205 | <div class="col-md-5"> |
1207 | <div class="form-group"> |
1206 | <div class="form-group"> |
1208 | <label class="control-label">Variavel</label> |
1207 | <label class="control-label">Variavel</label> |
1209 | <div> |
1208 | <div> |
1210 | <select class="chosenOff form-control" ng-change="changeMethodClassTarget()" ng-model="newMethodCall.name" ng-options="var.name as var.name for var in getAllVariables()"></select> |
1209 | <select class="chosenOff form-control" ng-change="changeMethodClassTarget()" ng-model="newMethodCall.name" ng-options="var.name as var.name for var in getAllVariables()"></select> |
1211 | </div> |
1210 | </div> |
1212 | </div> |
1211 | </div> |
1213 | <div ng-show="newMethodCall.name" class="form-group"> |
1212 | <div ng-show="newMethodCall.name" class="form-group"> |
1214 | <label class="control-label">Método</label> |
1213 | <label class="control-label">Método</label> |
1215 | <div> |
1214 | <div> |
1216 | <select ng-change="setArgumentsNewMethodCallMethod()" class="chosenOff form-control" ng-model="newMethodCall.methodChoosed" ng-options="m as showMethodSign(m) for m in methodsClassSelected"></select> |
1215 | <select ng-change="setArgumentsNewMethodCallMethod()" class="chosenOff form-control" ng-model="newMethodCall.methodChoosed" ng-options="m as showMethodSign(m) for m in methodsClassSelected"></select> |
1217 | </div> |
1216 | </div> |
1218 | 1217 | ||
1219 | 1218 | ||
1220 | <div ng-show="newMethodCall.methodName"> |
1219 | <div ng-show="newMethodCall.methodName"> |
1221 | <div class="form-group"> |
1220 | <div class="form-group"> |
1222 | <label class="control-label">Resultado</label> |
1221 | <label class="control-label">Resultado</label> |
1223 | <div> |
1222 | <div> |
1224 | <select class="chosenOff form-control" ng-model="newMethodCall.localObjectHolderName" ng-options="v.name as v.name for v in getPossibleVariables(newMethodCall.checkReturnType,newMethodCall.checkReturnTypeSuperClasses,true,false)"> |
1223 | <select class="chosenOff form-control" ng-model="newMethodCall.localObjectHolderName" ng-options="v.name as v.name for v in getPossibleVariables(newMethodCall.checkReturnType,newMethodCall.checkReturnTypeSuperClasses,true,false)"> |
1225 | 1224 | ||
1226 | </select> |
1225 | </select> |
1227 | </div> |
1226 | </div> |
1228 | </div> |
1227 | </div> |
1229 | <table class="table"> |
1228 | <table class="table"> |
1230 | <thead> |
1229 | <thead> |
1231 | <tr> |
1230 | <tr> |
1232 | <th>Nome</th> |
1231 | <th>Nome</th> |
1233 | <th>Variavel Valor</th> |
1232 | <th>Variavel Valor</th> |
1234 | </tr> |
1233 | </tr> |
1235 | </thead> |
1234 | </thead> |
1236 | <tbody> |
1235 | <tbody> |
1237 | <tr ng-repeat="arg in newMethodCall.arguments"> |
1236 | <tr ng-repeat="arg in newMethodCall.arguments"> |
1238 | <td><label class="control-label">{{arg.name}} = </label></td> |
1237 | <td><label class="control-label">{{arg.name}} = </label></td> |
1239 | <td> |
1238 | <td> |
1240 | <select class="form-control chosenOff" ng-model="arg.varName" ng-options="v.name as v.name for v in getPossibleVariables(arg.className,arg.classNameSuperClasses,false,newMethodCall.usaDadosAtorDoFormulario)"></select> |
1239 | <select class="form-control chosenOff" ng-model="arg.varName" ng-options="v.name as v.name for v in getPossibleVariables(arg.className,arg.classNameSuperClasses,false,newMethodCall.usaDadosAtorDoFormulario)"></select> |
1241 | </td> |
1240 | </td> |
1242 | </tr> |
1241 | </tr> |
1243 | </tbody> |
1242 | </tbody> |
1244 | </table> |
1243 | </table> |
1245 | </div> |
1244 | </div> |
1246 | 1245 | ||
1247 | </div> |
1246 | </div> |
1248 | 1247 | ||
1249 | 1248 | ||
1250 | </div> |
1249 | </div> |
1251 | <div class="col-md-7"> |
1250 | <div class="col-md-7"> |
1252 | <label ng-show="newMethodCall.name" class="well well-sm">Variável: {{newMethodCall.name}}</label> |
1251 | <label ng-show="newMethodCall.name" class="well well-sm">Variável: {{newMethodCall.name}}</label> |
1253 | <label ng-show="newMethodCall.className" class="well well-sm">Classe: {{newMethodCall.className}}</label> |
1252 | <label ng-show="newMethodCall.className" class="well well-sm">Classe: {{newMethodCall.className}}</label> |
1254 | <label ng-show="newMethodCall.methodName" class="well well-sm">Método: {{newMethodCall.methodName}}</label> |
1253 | <label ng-show="newMethodCall.methodName" class="well well-sm">Método: {{newMethodCall.methodName}}</label> |
1255 | 1254 | ||
1256 | <div ng-show="newMethodCall.methodName"> |
1255 | <div ng-show="newMethodCall.methodName"> |
1257 | <table class="table"> |
1256 | <table class="table"> |
1258 | <tbody> |
1257 | <tbody> |
1259 | <tr> |
1258 | <tr> |
1260 | <td>Retorno</td> |
1259 | <td>Retorno</td> |
1261 | <td>{{newMethodCall.checkReturnType}}</td> |
1260 | <td>{{newMethodCall.checkReturnType}}</td> |
1262 | </tr> |
1261 | </tr> |
1263 | </tbody> |
1262 | </tbody> |
1264 | </table> |
1263 | </table> |
1265 | <table class="table"> |
1264 | <table class="table"> |
1266 | <thead> |
1265 | <thead> |
1267 | <tr> |
1266 | <tr> |
1268 | <th>Parametro</th> |
1267 | <th>Parametro</th> |
1269 | <th>Tipo</th> |
1268 | <th>Tipo</th> |
1270 | </tr> |
1269 | </tr> |
1271 | </thead> |
1270 | </thead> |
1272 | <tbody> |
1271 | <tbody> |
1273 | <tr ng-repeat="a in newMethodCall.arguments"> |
1272 | <tr ng-repeat="a in newMethodCall.arguments"> |
1274 | <td>{{a.name}}</td> |
1273 | <td>{{a.name}}</td> |
1275 | <td>{{a.className}}</td> |
1274 | <td>{{a.className}}</td> |
1276 | </tr> |
1275 | </tr> |
1277 | </tbody> |
1276 | </tbody> |
1278 | </table> |
1277 | </table> |
1279 | </div> |
1278 | </div> |
1280 | </div> |
1279 | </div> |
1281 | </div> |
1280 | </div> |
1282 | <button ng-show="newMethodCall.methodName" ng-click="salvarTodoEdit('methodCallModalSelector')" class="btn btn-success">Salvar</button> |
1281 | <button ng-show="newMethodCall.methodName" ng-click="salvarTodoEdit('methodCallModalSelector')" class="btn btn-success">Salvar</button> |
1283 | <button type="button" class="btn btn-danger pull-right" data-dismiss="modal">Sair</button> |
1282 | <button type="button" class="btn btn-danger pull-right" data-dismiss="modal">Sair</button> |
1284 | </div> |
1283 | </div> |
1285 | </div> |
1284 | </div> |
1286 | </div> |
1285 | </div> |
1287 | </div> |
1286 | </div> |
1288 | 1287 | ||
1289 | 1288 | ||
1290 | <!--TODO TIRAR DAQUI--> |
1289 | <!--TODO TIRAR DAQUI--> |
1291 | <select ng-model="jsp" class="chosenOff angularChosen" ng-options="o for o in jsps"></select> |
1290 | <select ng-model="jsp" class="chosenOff angularChosen" ng-options="o for o in jsps"></select> |
1292 | 1291 | ||
1293 | <style> |
1292 | <style> |
1294 | body{ height: 100vh !important } |
1293 | body{ height: 100vh !important } |
1295 | </style> |
1294 | </style> |
1296 | <div class="web-messages"></div> |
1295 | <div class="web-messages"></div> |
1297 | 1296 | ||
1298 | <%--####################################################### |
1297 | <%--####################################################### |
1299 | ####################################################### |
1298 | ####################################################### |
1300 | INTERFACE INICIO |
1299 | INTERFACE INICIO |
1301 | ####################################################### |
1300 | ####################################################### |
1302 | ####################################################### |
1301 | ####################################################### |
1303 | --%> |
1302 | --%> |
1304 | 1303 | ||
1305 | <%--PAINEL PRINCIPAL--%> |
1304 | <%--PAINEL PRINCIPAL--%> |
1306 | <form style="height: 80vh" class="row" name="processoForm"> |
1305 | <form style="height: 80vh" class="row" name="processoForm"> |
1307 | 1306 | ||
1308 | <%-- ####################################################### |
1307 | <%-- ####################################################### |
1309 | PAINEL PRINCIPAL ESQUERDA--%> |
1308 | PAINEL PRINCIPAL ESQUERDA--%> |
1310 | <div style="height: 80vh;overflow-y: auto;" class="col-md-6 form-horizontal"> |
1309 | <div style="height: 80vh;overflow-y: auto;" class="col-md-6 form-horizontal"> |
1311 | 1310 | ||
1312 | 1311 | ||
1313 | 1312 | ||
1314 | <div class="panel panel-info panel-block" id="bpmnPools"> |
1313 | <div class="panel panel-info panel-block" id="bpmnPools"> |
1315 | <div class="panel-heading clearfix"> |
1314 | <div class="panel-heading clearfix"> |
1316 | <span class="glyphicon glyphicon-users"></span> |
1315 | <span class="glyphicon glyphicon-users"></span> |
1317 | Pools de Atores |
1316 | Pools de Atores |
1318 | <button class="btn btn-xs btn-success pull-right" type="button" ng-click="newActorPool()"><span class="glyphicon glyphicon-plus"></span></button> |
1317 | <button class="btn btn-xs btn-success pull-right" type="button" ng-click="newActorPool()"><span class="glyphicon glyphicon-plus"></span></button> |
1319 | </div> |
1318 | </div> |
1320 | 1319 | ||
1321 | <div ng-repeat="a in process.actorPools" class="panel-body gutter-0"> |
1320 | <div ng-repeat="a in process.actorPools" class="panel-body gutter-0"> |
1322 | <div class="panel panel-default" ng-class="{ dirty: a.dirty==true }"> |
1321 | <div class="panel panel-default" ng-class="{ dirty: a.dirty==true }"> |
1323 | <div class="panel-heading clearfix"> |
1322 | <div class="panel-heading clearfix"> |
1324 | <a class="pull-right btn btn-default btn-xs bpmnTask" data-nodrag ng-click="addTaskActor(a)" style="margin-right: 8px;"> |
1323 | <a class="pull-right btn btn-default btn-xs bpmnTask" data-nodrag ng-click="addTaskActor(a)" style="margin-right: 8px;"> |
1325 | <span class="glyphicon glyphicon-user"></span><span class="bpmn-icon-task"></span></a> |
1324 | <span class="glyphicon glyphicon-user"></span><span class="bpmn-icon-task"></span></a> |
1326 | <a class="pull-right btn btn-default btn-xs bpmnGateway" data-nodrag ng-click="newFlowComponent('bpmnGateway')" style="margin-right: 8px;"> |
1325 | <a class="pull-right btn btn-default btn-xs bpmnGateway" data-nodrag ng-click="newFlowComponent('bpmnGateway')" style="margin-right: 8px;"> |
1327 | <span class="bpmn-icon-gateway-none"></span></a> |
1326 | <span class="bpmn-icon-gateway-none"></span></a> |
1328 | <a class="pull-right btn btn-default btn-xs bpmnEndEvent" data-nodrag ng-click="newFlowComponent('bpmnEndEvent')" style="margin-right: 8px;"> |
1327 | <a class="pull-right btn btn-default btn-xs bpmnEndEvent" data-nodrag ng-click="newFlowComponent('bpmnEndEvent')" style="margin-right: 8px;"> |
1329 | <span class="bpmn-icon-end-event-none"></span></a> |
1328 | <span class="bpmn-icon-end-event-none"></span></a> |
1330 | </div> |
1329 | </div> |
1331 | <div class="panel-body"> |
1330 | <div class="panel-body"> |
1332 | <div class="col-md-1"> |
1331 | <div class="col-md-1"> |
1333 | <span class="glyphicon glyphicon-user"></span> |
1332 | <span class="glyphicon glyphicon-user"></span> |
1334 | </div> |
1333 | </div> |
1335 | <div class="col-md-5"> |
1334 | <div class="col-md-5"> |
1336 | <input ng-keyup="setDirty(a)" placeholder="Coloque aqui o nome do ator" class="form-control" ng-model="a.name"> |
1335 | <input ng-keyup="setDirty(a)" placeholder="Coloque aqui o nome do ator" class="form-control" ng-model="a.name"> |
1337 | </div> |
1336 | </div> |
1338 | <div class="col-md-1"> |
1337 | <div class="col-md-1"> |
1339 | <button class="btn btn-xs btn-success pull-right" type="button" ng-click="newRoleForPool(a)"><span class="glyphicon glyphicon-plus"></span>Papel</button> |
1338 | <button class="btn btn-xs btn-success pull-right" type="button" ng-click="newRoleForPool(a)"><span class="glyphicon glyphicon-plus"></span>Papel</button> |
1340 | </div> |
1339 | </div> |
1341 | <div class="col-md-4"> |
1340 | <div class="col-md-4"> |
1342 | <label ng-if="a.roles.length == 0">Não obrigatórios</label> |
1341 | <label ng-if="a.roles.length == 0">Não obrigatórios</label> |
1343 | <div ng-repeat="r in a.roles" class="gutter-0"> |
1342 | <div ng-repeat="r in a.roles" class="gutter-0"> |
1344 | <div class="col-md-2"> |
1343 | <div class="col-md-2"> |
1345 | <a class="btn btn-danger btn-xs" data-nodrag ng-click="a.roles.splice($index, 1)"><span |
1344 | <a class="btn btn-danger btn-xs" data-nodrag ng-click="a.roles.splice($index, 1)"><span |
1346 | class="glyphicon glyphicon-remove"></span></a> |
1345 | class="glyphicon glyphicon-remove"></span></a> |
1347 | </div> |
1346 | </div> |
1348 | <div class="col-md-10"> |
1347 | <div class="col-md-10"> |
1349 | 1348 | ||
1350 | <select class="chosenOff" ng-model="r.role" class="form-control"> |
1349 | <select class="chosenOff" ng-model="r.role" class="form-control"> |
1351 | <% |
1350 | <% |
1352 | for(String role: UserRoleProxy.getUserRoles()) |
1351 | for(String role: UserRoleProxy.getUserRoles()) |
1353 | { |
1352 | { |
1354 | request.setAttribute("role",role); |
1353 | request.setAttribute("role",role); |
1355 | %> |
1354 | %> |
1356 | <option value="${role}" ng-selected="{{r.role == '${role}'}}"><bean:message key="user.role.${role}"/></option> |
1355 | <option value="${role}" ng-selected="{{r.role == '${role}'}}"><bean:message key="user.role.${role}"/></option> |
1357 | <% |
1356 | <% |
1358 | } |
1357 | } |
1359 | %> |
1358 | %> |
1360 | </select> |
1359 | </select> |
1361 | </div> |
1360 | </div> |
1362 | 1361 | ||
1363 | </div> |
1362 | </div> |
1364 | </div> |
1363 | </div> |
1365 | <div class="col-md-1"> |
1364 | <div class="col-md-1"> |
1366 | <bacoTags:confirm msg="Tem a certeza que deseja remover a pool {{a.name}}" targetFunction="angular.element($('#processEditorModule')).scope().removeActorPool({{a.id}},{{$index}});angular.element($('#processEditorModule')).scope().$apply();" btnClass="btn btn-danger btn-xs pull-right" icon="glyphicon glyphicon-remove"/> |
1365 | <bacoTags:confirm msg="Tem a certeza que deseja remover a pool {{a.name}}" targetFunction="angular.element($('#processEditorModule')).scope().removeActorPool({{a.id}},{{$index}});angular.element($('#processEditorModule')).scope().$apply();" btnClass="btn btn-danger btn-xs pull-right" icon="glyphicon glyphicon-remove"/> |
1367 | 1366 | ||
1368 | </div> |
1367 | </div> |
1369 | </div> |
1368 | </div> |
1370 | <div class="panel-body"> |
1369 | <div class="panel-body"> |
1371 | <div ui-tree="treeOptions" id="page-content-root"> |
1370 | <div ui-tree="treeOptions" id="page-content-root"> |
1372 | <div class="form-group"> |
1371 | <div class="form-group"> |
1373 | <label class="control-label"> Pesquisar:</label> |
1372 | <label class="control-label"> Pesquisar:</label> |
1374 | <div class="col-md-4"> |
1373 | <div class="col-md-4"> |
1375 | <input class="form-control" ng-model="a.searchText"> |
1374 | <input class="form-control" ng-model="a.searchText"> |
1376 | </div> |
1375 | </div> |
1377 | </div> |
1376 | </div> |
1378 | 1377 | ||
1379 | <ol ui-tree-nodes ng-model="a.flowComponents"> |
1378 | <ol ui-tree-nodes ng-model="a.flowComponents"> |
1380 | <li ng-repeat="node in a.flowComponents | filter:a.searchText" ui-tree-node ng-include="'flowComponent_renderer.html'" ng-init="pool=a"></li> |
1379 | <li ng-repeat="node in a.flowComponents | filter:a.searchText" ui-tree-node ng-include="'flowComponent_renderer.html'" ng-init="pool=a"></li> |
1381 | </ol> |
1380 | </ol> |
1382 | </div> |
1381 | </div> |
1383 | </div> |
1382 | </div> |
1384 | </div> |
1383 | </div> |
1385 | 1384 | ||
1386 | </div> |
1385 | </div> |
1387 | 1386 | ||
1388 | </div> |
1387 | </div> |
1389 | </div> |
1388 | </div> |
1390 | 1389 | ||
1391 | 1390 | ||
1392 | <%-- |
1391 | <%-- |
1393 | ################################################################################ |
1392 | ################################################################################ |
1394 | Painel DIREITA |
1393 | Painel DIREITA |
1395 | Painel de Propriedades |
1394 | Painel de Propriedades |
1396 | ################################################################################ |
1395 | ################################################################################ |
1397 | --%> |
1396 | --%> |
1398 | <div class="col-md-6" style="height: 80vh;overflow-y: auto;" > |
1397 | <div class="col-md-6" style="height: 80vh;overflow-y: auto;" > |
1399 | <ul class="nav nav-tabs"> |
1398 | <ul class="nav nav-tabs"> |
1400 | <li class="active"><a data-toggle="tab" href="#processo">Processo</a></li> |
1399 | <li class="active"><a data-toggle="tab" href="#processo">Processo</a></li> |
1401 | <li><a data-toggle="tab" href="#operacoes">Operações</a></li> |
1400 | <li><a data-toggle="tab" href="#operacoes">Operações</a></li> |
1402 | <li><a data-toggle="tab" href="#variaveis">Variaveis</a></li> |
1401 | <li><a data-toggle="tab" href="#variaveis">Variaveis</a></li> |
1403 | <li><a data-toggle="tab" href="#debug">Debug</a></li> |
1402 | <li><a data-toggle="tab" href="#debug">Debug</a></li> |
1404 | </ul> |
1403 | </ul> |
1405 | 1404 | ||
1406 | <%--PROCESSO--%> |
1405 | <%--PROCESSO--%> |
1407 | 1406 | ||
1408 | <div class="tab-content"> |
1407 | <div class="tab-content"> |
1409 | <div id="processo" class="tab-pane fade in active"> |
1408 | <div id="processo" class="tab-pane fade in active"> |
1410 | <div class="panel panel-primary"> |
1409 | <div class="panel panel-primary"> |
1411 | <div class="panel-heading"> |
1410 | <div class="panel-heading"> |
1412 | Identificação do Processo |
1411 | Identificação do Processo |
1413 | </div> |
1412 | </div> |
1414 | <div class="panel-body"> |
1413 | <div class="panel-body"> |
1415 | <div class="form-group" show-errors> |
1414 | <div class="form-group" show-errors> |
1416 | <label class="col-md-2 control-label">Nome:</label> |
1415 | <label class="col-md-2 control-label">Nome:</label> |
1417 | <div class="col-md-10"><input name="process.name" required class="form-control" ng-model="process.name"></div> |
1416 | <div class="col-md-10"><input name="process.name" required class="form-control" ng-model="process.name"></div> |
1418 | </div> |
1417 | </div> |
1419 | <div class="form-group" show-errors> |
1418 | <div class="form-group" show-errors> |
1420 | <label class="col-md-2 control-label">Description:</label> |
1419 | <label class="col-md-2 control-label">Description:</label> |
1421 | <div class="col-md-10"><textarea required rows="5" class="form-control" ng-model="process.description"></textarea></div> |
1420 | <div class="col-md-10"><textarea required rows="5" class="form-control" ng-model="process.description"></textarea></div> |
1422 | </div> |
1421 | </div> |
1423 | 1422 | ||
1424 | <div id="controloAtividadeDocente" ng-if="process.class == 'BpmnProcessControloAtividadeDocenteImpl'"> |
1423 | <div id="controloAtividadeDocente" ng-if="process.class == 'BpmnProcessControloAtividadeDocenteImpl'"> |
1425 | <div class="well well-sm"> |
1424 | <div class="well well-sm"> |
1426 | Controlo de Atividade Docente |
1425 | Controlo de Atividade Docente |
1427 | <a class="pull-right btn btn-success btn-xs" data-nodrag ng-click="newAtividadePontuada()" style="margin-right: 8px;"> |
1426 | <a class="pull-right btn btn-success btn-xs" data-nodrag ng-click="newAtividadePontuada()" style="margin-right: 8px;"> |
1428 | <span class="glyphicon glyphicon-plus"></span></a> |
1427 | <span class="glyphicon glyphicon-plus"></span></a> |
1429 | </div> |
1428 | </div> |
1430 | <table class="table"> |
1429 | <table class="table"> |
1431 | <thead> |
1430 | <thead> |
1432 | <tr> |
1431 | <tr> |
1433 | <th>Chave ID</th> |
1432 | <th>Chave ID</th> |
1434 | <th style="width: 50%">Papel Validador</th> |
1433 | <th style="width: 50%">Papel Validador</th> |
1435 | <th>Pontos</th> |
1434 | <th>Pontos</th> |
1436 | <th>Tipo de Atividade</th> |
1435 | <th>Tipo de Atividade</th> |
1437 | </tr> |
1436 | </tr> |
1438 | </thead> |
1437 | </thead> |
1439 | <tbody> |
1438 | <tbody> |
1440 | <tr ng-repeat="a in process.esquemaPontos.atividades"> |
1439 | <tr ng-repeat="a in process.esquemaPontos.atividades"> |
1441 | <td show-errors><input name="process.esquemaPontos.atividades[{{$index}}].tipoAtividadeChave" required type="text" class="form-control" ng-model="a.tipoAtividadeChave"></td> |
1440 | <td show-errors><input name="process.esquemaPontos.atividades[{{$index}}].tipoAtividadeChave" required type="text" class="form-control" ng-model="a.tipoAtividadeChave"></td> |
1442 | <td show-errors> |
1441 | <td show-errors> |
1443 | <select name="process.esquemaPontos.atividades[{{$index}}].papelValidador" required class="chosenOff form-control" ng-model="a.papelValidador" class="form-control"> |
1442 | <select name="process.esquemaPontos.atividades[{{$index}}].papelValidador" required class="chosenOff form-control" ng-model="a.papelValidador" class="form-control"> |
1444 | <% |
1443 | <% |
1445 | for(String role: UserRoleProxy.getUserRoles()) |
1444 | for(String role: UserRoleProxy.getUserRoles()) |
1446 | { |
1445 | { |
1447 | request.setAttribute("role",role); |
1446 | request.setAttribute("role",role); |
1448 | %> |
1447 | %> |
1449 | <option value="${role}" ng-selected="{{a.papelValidador == '${role}'}}"><bean:message key="user.role.${role}"/></option> |
1448 | <option value="${role}" ng-selected="{{a.papelValidador == '${role}'}}"><bean:message key="user.role.${role}"/></option> |
1450 | <% |
1449 | <% |
1451 | } |
1450 | } |
1452 | %> |
1451 | %> |
1453 | </select> |
1452 | </select> |
1454 | </td> |
1453 | </td> |
1455 | <td show-errors><input name="process.esquemaPontos.atividades[{{$index}}].pontos" required type="text" class="form-control" ng-model="a.pontos"></td> |
1454 | <td show-errors><input name="process.esquemaPontos.atividades[{{$index}}].pontos" required type="text" class="form-control" ng-model="a.pontos"></td> |
1456 | <td show-errors><input name="process.esquemaPontos.atividades[{{$index}}].tipoAtividadeNome" required type="text" class="form-control" ng-model="a.tipoAtividadeNome"></td> |
1455 | <td show-errors><input name="process.esquemaPontos.atividades[{{$index}}].tipoAtividadeNome" required type="text" class="form-control" ng-model="a.tipoAtividadeNome"></td> |
1457 | </tr> |
1456 | </tr> |
1458 | </tbody> |
1457 | </tbody> |
1459 | </table> |
1458 | </table> |
1460 | </div> |
1459 | </div> |
1461 | </div> |
1460 | </div> |
1462 | </div> |
1461 | </div> |
1463 | </div> |
1462 | </div> |
1464 | 1463 | ||
1465 | <%--OPERACOES--%> |
1464 | <%--OPERACOES--%> |
1466 | <div id="operacoes" class="tab-pane fade"> |
1465 | <div id="operacoes" class="tab-pane fade"> |
1467 | <div ng-show="!selected" > |
1466 | <div ng-show="!selected" > |
1468 | <div class="alert alert-warning"> |
1467 | <div class="alert alert-warning"> |
1469 | Clique numa Tarefa para atribuir operações |
1468 | Clique numa Tarefa para atribuir operações |
1470 | </div> |
1469 | </div> |
1471 | </div> |
1470 | </div> |
1472 | <div ng-init="startTooltips()" ng-show="selected['@class'].startsWith('<%=BpmnFlowComponentTask.class.getName()%>')" class="panel panel-info panel-block bpmnActorTask" ng-class="{dirty: selected.dirty==true}" > |
1471 | <div ng-init="startTooltips()" ng-show="selected['@class'].startsWith('<%=BpmnFlowComponentTask.class.getName()%>')" class="panel panel-info panel-block bpmnActorTask" ng-class="{dirty: selected.dirty==true}" > |
1473 | <div class="panel-heading clearfix"> |
1472 | <div class="panel-heading clearfix"> |
1474 | <span class="glyphicon glyphicon-users"></span> |
1473 | <span class="glyphicon glyphicon-users"></span> |
1475 | Tarefa de Utilizador <input ng-keyup="setDirty(selected)" data-nodrag class="form-control" ng-model="selected.title"> |
1474 | Tarefa de Utilizador <input ng-keyup="setDirty(selected)" data-nodrag class="form-control" ng-model="selected.title"> |
1476 | </div> |
1475 | </div> |
1477 | <div class="panel-body"> |
1476 | <div class="panel-body"> |
1478 | <div class="panel panel-default"> |
1477 | <div class="panel panel-default"> |
1479 | <div class="panel-heading clearfix"> |
1478 | <div class="panel-heading clearfix"> |
1480 | Operações de entrada na tarefa |
1479 | Operações de entrada na tarefa |
1481 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Chamar Servico SOA" ng-click="openSoaModal()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-cog"></span></button> |
1480 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Chamar Servico SOA" ng-click="openSoaModal()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-cog"></span></button> |
1482 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Atribuir variável" ng-click="openMethodCallModal()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-flag"></span></button> |
1481 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Atribuir variável" ng-click="openMethodCallModal()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-flag"></span></button> |
1483 | </div> |
1482 | </div> |
1484 | <div class="panel-body"> |
1483 | <div class="panel-body"> |
1485 | 1484 | ||
1486 | <div class="panel panel-primary"> |
1485 | <div class="panel panel-primary"> |
1487 | <div class="panel-body"> |
1486 | <div class="panel-body"> |
1488 | 1487 | ||
1489 | </div> |
1488 | </div> |
1490 | </div> |
1489 | </div> |
1491 | 1490 | ||
1492 | 1491 | ||
1493 | <div ng-repeat="todo in selected.todos.todos"> |
1492 | <div ng-repeat="todo in selected.todos.todos"> |
1494 | <div ng-if="todo['@class']== '<%=ConnectorSoa.class.getName()%>'"> |
1493 | <div ng-if="todo['@class']== '<%=ConnectorSoa.class.getName()%>'"> |
1495 | <button ng-click="openSoaModal(todo)" class="btn btn-default"> |
1494 | <button ng-click="openSoaModal(todo)" class="btn btn-default"> |
1496 | <span class="glyphicon glyphicon-cog"></span> |
1495 | <span class="glyphicon glyphicon-cog"></span> |
1497 | </button> |
1496 | </button> |
1498 | <label class="label label-primary" style="font-size: 1.0em"> |
1497 | <label class="label label-primary" style="font-size: 1.0em"> |
1499 | {{getSimpleClassName(todo.className)}} |
1498 | {{getSimpleClassName(todo.className)}} |
1500 | </label> |
1499 | </label> |
1501 | <label class="label label-info" style="font-size: 1.0em"> |
1500 | <label class="label label-info" style="font-size: 1.0em"> |
1502 | {{todo.methodName}} |
1501 | {{todo.methodName}} |
1503 | </label> |
1502 | </label> |
1504 | <span class="glyphicon glyphicon-arrow-right"></span> |
1503 | <span class="glyphicon glyphicon-arrow-right"></span> |
1505 | <label class="label label-success" style="font-size: 1.0em"> |
1504 | <label class="label label-success" style="font-size: 1.0em"> |
1506 | {{todo.localObjectHolderName}} |
1505 | {{todo.localObjectHolderName}} |
1507 | </label> |
1506 | </label> |
1508 | 1507 | ||
1509 | <button ng-click="deleteTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1508 | <button ng-click="deleteTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1510 | <span class="glyphicon glyphicon-remove small"></span> |
1509 | <span class="glyphicon glyphicon-remove small"></span> |
1511 | </button> |
1510 | </button> |
1512 | </div> |
1511 | </div> |
1513 | 1512 | ||
1514 | <div ng-if="todo['@class']== '<%=OperationMethodCall.class.getName()%>'"> |
1513 | <div ng-if="todo['@class']== '<%=OperationMethodCall.class.getName()%>'"> |
1515 | <button ng-click="openMethodCallModal(todo)" class="btn btn-default"> |
1514 | <button ng-click="openMethodCallModal(todo)" class="btn btn-default"> |
1516 | <span class="glyphicon glyphicon-flag"></span> |
1515 | <span class="glyphicon glyphicon-flag"></span> |
1517 | </button> |
1516 | </button> |
1518 | <label class="label label-success" style="font-size: 1.0em"> |
1517 | <label class="label label-success" style="font-size: 1.0em"> |
1519 | {{todo.name}} |
1518 | {{todo.name}} |
1520 | </label> |
1519 | </label> |
1521 | <label class="label label-info" style="font-size: 1.0em"> |
1520 | <label class="label label-info" style="font-size: 1.0em"> |
1522 | {{todo.methodName}} |
1521 | {{todo.methodName}} |
1523 | </label> |
1522 | </label> |
1524 | ( |
1523 | ( |
1525 | <span class="label-info" ng-repeat="arg in todo.arguments"> |
1524 | <span class="label-info" ng-repeat="arg in todo.arguments"> |
1526 | {{arg.varName}} |
1525 | {{arg.varName}} |
1527 | </span> |
1526 | </span> |
1528 | ) |
1527 | ) |
1529 | <span class="glyphicon glyphicon-arrow-right"></span> |
1528 | <span class="glyphicon glyphicon-arrow-right"></span> |
1530 | <label class="label label-success" style="font-size: 1.0em"> |
1529 | <label class="label label-success" style="font-size: 1.0em"> |
1531 | {{todo.localObjectHolderName}} |
1530 | {{todo.localObjectHolderName}} |
1532 | </label> |
1531 | </label> |
1533 | 1532 | ||
1534 | <button ng-click="deleteTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1533 | <button ng-click="deleteTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1535 | <span class="glyphicon glyphicon-remove small"></span> |
1534 | <span class="glyphicon glyphicon-remove small"></span> |
1536 | </button> |
1535 | </button> |
1537 | </div> |
1536 | </div> |
1538 | 1537 | ||
1539 | </div> |
1538 | </div> |
1540 | </div> |
1539 | </div> |
1541 | </div> |
1540 | </div> |
1542 | <div ng-if="selected['@class'].startsWith('<%=BpmnFlowComponentTaskActor.class.getName()%>')" class="panel panel-info panel-block" ng-class="{dirty: selected.dirty==true}" > |
1541 | <div ng-if="selected['@class'].startsWith('<%=BpmnFlowComponentTaskActor.class.getName()%>')" class="panel panel-info panel-block" ng-class="{dirty: selected.dirty==true}" > |
1543 | <div class="panel-heading clearfix"> |
1542 | <div class="panel-heading clearfix"> |
1544 | <span class="glyphicon glyphicon-users"></span> |
1543 | <span class="glyphicon glyphicon-users"></span> |
1545 | Operações de saida da tarefa |
1544 | Operações de saida da tarefa |
1546 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Chamar Servico SOA" ng-click="openSoaModalAtor()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-cog"></span></button> |
1545 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Chamar Servico SOA" ng-click="openSoaModalAtor()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-cog"></span></button> |
1547 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Atribuir variável" ng-click="openMethodCallModalAtor()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-flag"></span></button> |
1546 | <button ng-init="startTooltips(this)" data-toggle="tooltip" title="Atribuir variável" ng-click="openMethodCallModalAtor()" class="btn btn-default pull-right"><span class="glyphicon glyphicon-flag"></span></button> |
1548 | </div> |
1547 | </div> |
1549 | <div class="panel-body"> |
1548 | <div class="panel-body"> |
1550 | 1549 | ||
1551 | <div ng-repeat="todo in selected.afterUserTodos.todos"> |
1550 | <div ng-repeat="todo in selected.afterUserTodos.todos"> |
1552 | <div ng-if="todo['@class']== '<%=ConnectorSoa.class.getName()%>'"> |
1551 | <div ng-if="todo['@class']== '<%=ConnectorSoa.class.getName()%>'"> |
1553 | <button ng-click="openSoaModalAtor(todo)" class="btn btn-default"> |
1552 | <button ng-click="openSoaModalAtor(todo)" class="btn btn-default"> |
1554 | <span class="glyphicon glyphicon-cog"></span> |
1553 | <span class="glyphicon glyphicon-cog"></span> |
1555 | </button> |
1554 | </button> |
1556 | <label class="label label-primary" style="font-size: 1.0em"> |
1555 | <label class="label label-primary" style="font-size: 1.0em"> |
1557 | {{getSimpleClassName(todo.className)}} |
1556 | {{getSimpleClassName(todo.className)}} |
1558 | </label> |
1557 | </label> |
1559 | <label class="label label-info" style="font-size: 1.0em"> |
1558 | <label class="label label-info" style="font-size: 1.0em"> |
1560 | {{todo.methodName}} |
1559 | {{todo.methodName}} |
1561 | </label> |
1560 | </label> |
1562 | <span class="glyphicon glyphicon-arrow-right"></span> |
1561 | <span class="glyphicon glyphicon-arrow-right"></span> |
1563 | <label class="label label-success" style="font-size: 1.0em"> |
1562 | <label class="label label-success" style="font-size: 1.0em"> |
1564 | {{todo.localObjectHolderName}} |
1563 | {{todo.localObjectHolderName}} |
1565 | </label> |
1564 | </label> |
1566 | 1565 | ||
1567 | <button ng-click="deleteAfterUserTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1566 | <button ng-click="deleteAfterUserTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1568 | <span class="glyphicon glyphicon-remove small"></span> |
1567 | <span class="glyphicon glyphicon-remove small"></span> |
1569 | </button> |
1568 | </button> |
1570 | </div> |
1569 | </div> |
1571 | 1570 | ||
1572 | <div ng-if="todo['@class']== '<%=OperationMethodCall.class.getName()%>'"> |
1571 | <div ng-if="todo['@class']== '<%=OperationMethodCall.class.getName()%>'"> |
1573 | <button ng-click="openMethodCallModalAtor(todo)" class="btn btn-default"> |
1572 | <button ng-click="openMethodCallModalAtor(todo)" class="btn btn-default"> |
1574 | <span class="glyphicon glyphicon-flag"></span> |
1573 | <span class="glyphicon glyphicon-flag"></span> |
1575 | </button> |
1574 | </button> |
1576 | <label class="label label-success" style="font-size: 1.0em"> |
1575 | <label class="label label-success" style="font-size: 1.0em"> |
1577 | {{todo.name}} |
1576 | {{todo.name}} |
1578 | </label> |
1577 | </label> |
1579 | <label class="label label-info" style="font-size: 1.0em"> |
1578 | <label class="label label-info" style="font-size: 1.0em"> |
1580 | {{todo.methodName}} |
1579 | {{todo.methodName}} |
1581 | </label> |
1580 | </label> |
1582 | ( |
1581 | ( |
1583 | <span class="label-info" ng-repeat="arg in todo.arguments"> |
1582 | <span class="label-info" ng-repeat="arg in todo.arguments"> |
1584 | {{arg.varName}} |
1583 | {{arg.varName}} |
1585 | </span> |
1584 | </span> |
1586 | ) |
1585 | ) |
1587 | <span class="glyphicon glyphicon-arrow-right"></span> |
1586 | <span class="glyphicon glyphicon-arrow-right"></span> |
1588 | <label class="label label-success" style="font-size: 1.0em"> |
1587 | <label class="label label-success" style="font-size: 1.0em"> |
1589 | {{todo.localObjectHolderName}} |
1588 | {{todo.localObjectHolderName}} |
1590 | </label> |
1589 | </label> |
1591 | 1590 | ||
1592 | <button ng-click="deleteAfterUserTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1591 | <button ng-click="deleteAfterUserTodo(selected,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1593 | <span class="glyphicon glyphicon-remove small"></span> |
1592 | <span class="glyphicon glyphicon-remove small"></span> |
1594 | </button> |
1593 | </button> |
1595 | </div> |
1594 | </div> |
1596 | 1595 | ||
1597 | </div> |
1596 | </div> |
1598 | </div> |
1597 | </div> |
1599 | </div> |
1598 | </div> |
1600 | </div> |
1599 | </div> |
1601 | </div> |
1600 | </div> |
1602 | 1601 | ||
1603 | <%--VARIAVEIS--%> |
1602 | <%--VARIAVEIS--%> |
1604 | <div ng-if="selected['@class'].startsWith('<%=BpmnFlowConnector.class.getName()%>')" class="panel panel-info panel-block bpmnConnector" ng-class="{dirty: selected.dirty==true}"> |
1603 | <div ng-if="selected['@class'].startsWith('<%=BpmnFlowConnector.class.getName()%>')" class="panel panel-info panel-block bpmnConnector" ng-class="{dirty: selected.dirty==true}"> |
1605 | <div class="panel-heading clearfix"> |
1604 | <div class="panel-heading clearfix"> |
1606 | <span class="bpmn-icon-connection control-label"></span> |
1605 | <span class="bpmn-icon-connection control-label"></span> |
1607 | Connector - |
1606 | Connector - |
1608 | <input ng-keyup="setDirty(selected)" data-nodrag class="form-control" ng-model="selected.nameConnection"> |
1607 | <input ng-keyup="setDirty(selected)" data-nodrag class="form-control" ng-model="selected.nameConnection"> |
1609 | </div> |
1608 | </div> |
1610 | 1609 | ||
1611 | 1610 | ||
1612 | <div class="panel-body"> |
1611 | <div class="panel-body"> |
1613 | 1612 | ||
1614 | </div> |
1613 | </div> |
1615 | </div> |
1614 | </div> |
1616 | </div> |
1615 | </div> |
1617 | <div id="variaveis" class="tab-pane fade"> |
1616 | <div id="variaveis" class="tab-pane fade"> |
1618 | <div class="panel panel-primary panel-block"> |
1617 | <div class="panel panel-primary panel-block"> |
1619 | <div class="panel-heading clearfix"> |
1618 | <div class="panel-heading clearfix"> |
1620 | <span class="glyphicon glyphicon-flag"></span> |
1619 | <span class="glyphicon glyphicon-flag"></span> |
1621 | Variaveis de Processo |
1620 | Variaveis de Processo |
1622 | 1621 | ||
1623 | <button type="button" class="pull-right btn btn-success btn-xs" ng-click="newProcessVar()" style="margin-right: 8px;"> |
1622 | <button type="button" class="pull-right btn btn-success btn-xs" ng-click="newProcessVar()" style="margin-right: 8px;"> |
1624 | <span class="glyphicon glyphicon-plus"></span> |
1623 | <span class="glyphicon glyphicon-plus"></span> |
1625 | </button> |
1624 | </button> |
1626 | </div> |
1625 | </div> |
1627 | <div class="panel-body"> |
1626 | <div class="panel-body"> |
1628 | <table class="table"> |
1627 | <table class="table"> |
1629 | <thead> |
1628 | <thead> |
1630 | <tr> |
1629 | <tr> |
1631 | <th>Nome da variavel</th> |
1630 | <th>Nome da variavel</th> |
1632 | <th>Tipo</th> |
1631 | <th>Tipo</th> |
1633 | <th></th> |
1632 | <th></th> |
1634 | </tr> |
1633 | </tr> |
1635 | </thead> |
1634 | </thead> |
1636 | <tbody> |
1635 | <tbody> |
1637 | <tr ng-class="{ dirty: v.dirty==true }" ng-repeat="v in process.processVariables"> |
1636 | <tr ng-class="{ dirty: v.dirty==true }" ng-repeat="v in process.processVariables"> |
1638 | <td> |
1637 | <td> |
1639 | <input ng-keyup="setDirty(v)" ng-model="v.name" class="form-control"></td> |
1638 | <input ng-keyup="setDirty(v)" ng-model="v.name" class="form-control"></td> |
1640 | <td> |
1639 | <td> |
1641 | <select ng-change="setDirty(v)" class="form-control chosenOff" ng-model="v.type" ng-options="vT as vT.shortName for vT in processVariableTypes track by vT.className" > |
1640 | <select ng-change="setDirty(v)" class="form-control chosenOff" ng-model="v.type" ng-options="vT as vT.shortName for vT in processVariableTypes track by vT.className" > |
1642 | 1641 | ||
1643 | </select> |
1642 | </select> |
1644 | </td> |
1643 | </td> |
1645 | <td> |
1644 | <td> |
1646 | <button ng-click="removeProcessVar(v.id,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1645 | <button ng-click="removeProcessVar(v.id,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1647 | <span class="glyphicon glyphicon-remove small"></span> |
1646 | <span class="glyphicon glyphicon-remove small"></span> |
1648 | </button> |
1647 | </button> |
1649 | </td> |
1648 | </td> |
1650 | </tr> |
1649 | </tr> |
1651 | </tbody> |
1650 | </tbody> |
1652 | </table> |
1651 | </table> |
1653 | </div> |
1652 | </div> |
1654 | </div> |
1653 | </div> |
1655 | 1654 | ||
1656 | 1655 | ||
1657 | <div class="panel panel-info panel-block bpmnActorTask" ng-show="selected['@class'].startsWith('<%=BpmnFlowComponentTask.class.getName()%>')"> |
1656 | <div class="panel panel-info panel-block bpmnActorTask" ng-show="selected['@class'].startsWith('<%=BpmnFlowComponentTask.class.getName()%>')"> |
1658 | <div class="panel-heading clearfix"> |
1657 | <div class="panel-heading clearfix"> |
1659 | <span class="glyphicon glyphicon-flag"></span> |
1658 | <span class="glyphicon glyphicon-flag"></span> |
1660 | Variaveis Locais {{selected.title}} |
1659 | Variaveis Locais {{selected.title}} |
1661 | <button type="button" class="pull-right btn btn-success btn-xs" ng-click="newLocalVar(selected)" style="margin-right: 8px;"> |
1660 | <button type="button" class="pull-right btn btn-success btn-xs" ng-click="newLocalVar(selected)" style="margin-right: 8px;"> |
1662 | <span class="glyphicon glyphicon-plus"></span> |
1661 | <span class="glyphicon glyphicon-plus"></span> |
1663 | </button> |
1662 | </button> |
1664 | </div> |
1663 | </div> |
1665 | <div class="panel-body"> |
1664 | <div class="panel-body"> |
1666 | <table class="table"> |
1665 | <table class="table"> |
1667 | <thead> |
1666 | <thead> |
1668 | <tr> |
1667 | <tr> |
1669 | <th>Nome da variavel</th> |
1668 | <th>Nome da variavel</th> |
1670 | <th>Tipo</th> |
1669 | <th>Tipo</th> |
1671 | <th></th> |
1670 | <th></th> |
1672 | </tr> |
1671 | </tr> |
1673 | </thead> |
1672 | </thead> |
1674 | <tbody> |
1673 | <tbody> |
1675 | <tr ng-class="{ dirty: v.dirty==true }" ng-repeat="v in selected.localVariables"> |
1674 | <tr ng-class="{ dirty: v.dirty==true }" ng-repeat="v in selected.localVariables"> |
1676 | <td> |
1675 | <td> |
1677 | <input ng-keyup="setDirty(v)" ng-model="v.name" class="form-control"></td> |
1676 | <input ng-keyup="setDirty(v)" ng-model="v.name" class="form-control"></td> |
1678 | <td> |
1677 | <td> |
1679 | <select ng-change="setDirty(v)" class="form-control chosenOff" ng-model="v.type" ng-options="vT as vT.shortName for vT in localVariableTypes track by vT.className" > |
1678 | <select ng-change="setDirty(v)" class="form-control chosenOff" ng-model="v.type" ng-options="vT as vT.shortName for vT in localVariableTypes track by vT.className" > |
1680 | 1679 | ||
1681 | </select> |
1680 | </select> |
1682 | </td> |
1681 | </td> |
1683 | <td> |
1682 | <td> |
1684 | <button ng-click="removeLocalVar(v.id,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1683 | <button ng-click="removeLocalVar(v.id,$index)" type="button" class="btn btn-danger btn-xs pull-right"> |
1685 | <span class="glyphicon glyphicon-remove small"></span> |
1684 | <span class="glyphicon glyphicon-remove small"></span> |
1686 | </button> |
1685 | </button> |
1687 | </td> |
1686 | </td> |
1688 | </tr> |
1687 | </tr> |
1689 | </tbody> |
1688 | </tbody> |
1690 | </table> |
1689 | </table> |
1691 | </div> |
1690 | </div> |
1692 | </div> |
1691 | </div> |
1693 | </div> |
1692 | </div> |
1694 | 1693 | ||
1695 | <%--DEBUG--%> |
1694 | <%--DEBUG--%> |
1696 | <div id="debug" class="tab-pane fade"> |
1695 | <div id="debug" class="tab-pane fade"> |
1697 | <h2>Debug</h2> |
1696 | <h2>Debug</h2> |
1698 | 1697 | ||
1699 | <a href="#Tiposdevariaveldeprocesso">Tiposdevariaveldeprocesso</a> |
1698 | <a href="#Tiposdevariaveldeprocesso">Tiposdevariaveldeprocesso</a> |
1700 | <a href="#Tiposdevariavellocal">Tiposdevariavellocal</a> |
1699 | <a href="#Tiposdevariavellocal">Tiposdevariavellocal</a> |
1701 | <a href="#AllFlowComponents">AllFlowComponents</a> |
1700 | <a href="#AllFlowComponents">AllFlowComponents</a> |
1702 | <a href="#ProcessoJson">ProcessoJson</a> |
1701 | <a href="#ProcessoJson">ProcessoJson</a> |
1703 | <a href="#newSoa">newSoa</a> |
1702 | <a href="#newSoa">newSoa</a> |
1704 | <a href="#ServicesSoa">ServicesSoa</a> |
1703 | <a href="#ServicesSoa">ServicesSoa</a> |
1705 | <a href="#newMethodCall">newMethodCall</a> |
1704 | <a href="#newMethodCall">newMethodCall</a> |
1706 | <a href="#methodsClassSelected">methodsClassSelected</a> |
1705 | <a href="#methodsClassSelected">methodsClassSelected</a> |
1707 | <a href="#methodsClassSelected">methodsClassSelected</a> |
1706 | <a href="#methodsClassSelected">methodsClassSelected</a> |
1708 | 1707 | ||
1709 | <a name="Tiposdevariaveldeprocesso"></a> |
1708 | <a name="Tiposdevariaveldeprocesso"></a> |
1710 | <h2>Tipos de variavel de processo</h2> |
1709 | <h2>Tipos de variavel de processo</h2> |
1711 | <pre class="code">{{ processVariableTypes | json }}</pre> |
1710 | <pre class="code">{{ processVariableTypes | json }}</pre> |
1712 | 1711 | ||
1713 | <a name="Tiposdevariavellocal"></a> |
1712 | <a name="Tiposdevariavellocal"></a> |
1714 | <h2>Tipos de variavel local</h2> |
1713 | <h2>Tipos de variavel local</h2> |
1715 | <pre class="code">{{ localVariableTypes | json }}</pre> |
1714 | <pre class="code">{{ localVariableTypes | json }}</pre> |
1716 | 1715 | ||
1717 | <a name="AllFlowComponents"></a> |
1716 | <a name="AllFlowComponents"></a> |
1718 | <h2>All Flow Components</h2> |
1717 | <h2>All Flow Components</h2> |
1719 | <pre class="code">{{ allFlowComponents | json }}</pre> |
1718 | <pre class="code">{{ allFlowComponents | json }}</pre> |
1720 | 1719 | ||
1721 | <a name="ProcessoJson"></a> |
1720 | <a name="ProcessoJson"></a> |
1722 | <h2>Processo Json</h2> |
1721 | <h2>Processo Json</h2> |
1723 | <pre class="code">{{ process | json }}</pre> |
1722 | <pre class="code">{{ process | json }}</pre> |
1724 | 1723 | ||
1725 | <a name="newSoa"></a> |
1724 | <a name="newSoa"></a> |
1726 | <h2>newSoa</h2> |
1725 | <h2>newSoa</h2> |
1727 | <pre class="code">{{ newSoa | json }}</pre> |
1726 | <pre class="code">{{ newSoa | json }}</pre> |
1728 | 1727 | ||
1729 | <a name="ServicesSoa"></a> |
1728 | <a name="ServicesSoa"></a> |
1730 | <h2>Services Soa</h2> |
1729 | <h2>Services Soa</h2> |
1731 | <pre class="code">{{ servicesSoa | json }}</pre> |
1730 | <pre class="code">{{ servicesSoa | json }}</pre> |
1732 | 1731 | ||
1733 | <a name="newMethodCall"></a> |
1732 | <a name="newMethodCall"></a> |
1734 | <h2>newMethodCall</h2> |
1733 | <h2>newMethodCall</h2> |
1735 | <pre class="code">{{newMethodCall | json}}</pre> |
1734 | <pre class="code">{{newMethodCall | json}}</pre> |
1736 | 1735 | ||
1737 | <a name="methodsClassSelected"></a> |
1736 | <a name="methodsClassSelected"></a> |
1738 | <h2>methodsClassSelected</h2> |
1737 | <h2>methodsClassSelected</h2> |
1739 | <pre class="code">{{methodsClassSelected | json}}</pre> |
1738 | <pre class="code">{{methodsClassSelected | json}}</pre> |
1740 | </div> |
1739 | </div> |
1741 | </div> |
1740 | </div> |
1742 | 1741 | ||
1743 | 1742 | ||
1744 | </div> |
1743 | </div> |
1745 | </form> |
1744 | </form> |
1746 | 1745 | ||
1747 | 1746 | ||
1748 | 1747 | ||
1749 | 1748 | ||
1750 | <style> |
1749 | <style> |
1751 | table.tableHeading |
1750 | table.tableHeading |
1752 | { |
1751 | { |
1753 | border: 0; |
1752 | border: 0; |
1754 | width: 100%; |
1753 | width: 100%; |
1755 | } |
1754 | } |
1756 | table.tableHeading td |
1755 | table.tableHeading td |
1757 | { |
1756 | { |
1758 | padding: 5px; |
1757 | padding: 5px; |
1759 | 1758 | ||
1760 | } |
1759 | } |
1761 | table.tableHeading td.headingTitle |
1760 | table.tableHeading td.headingTitle |
1762 | { |
1761 | { |
1763 | width: 50%; |
1762 | width: 50%; |
1764 | } |
1763 | } |
1765 | 1764 | ||
1766 | </style> |
1765 | </style> |
1767 | 1766 | ||
1768 | 1767 | ||
1769 | <script type="text/ng-template" id="flowComponent_renderer.html"> |
1768 | <script type="text/ng-template" id="flowComponent_renderer.html"> |
1770 | <!-- Coloquei aqui o predicado no NGClass que quando existe uma property nodrop = true o angular coloca nodrop na class o que faz o elemento ficar a vermelho e nao permite drop--> |
1769 | <!-- Coloquei aqui o predicado no NGClass que quando existe uma property nodrop = true o angular coloca nodrop na class o que faz o elemento ficar a vermelho e nao permite drop--> |
1771 | <div ng-click="select(node)" class="panel panel-default panel-block tree-node tree-node-content nodrop" ng-class="{selected: node.selected == true, bpmnActorTask: node['@class'] == '<%=BpmnFlowComponentTaskActorImpl.class.getName()%>',dirty: node.dirty==true,nodrop: node.nodrop, nodrag: node.nodrag, moved: node.moved}"> |
1770 | <div ng-click="select(node)" class="panel panel-default panel-block tree-node tree-node-content nodrop" ng-class="{selected: node.selected == true, bpmnActorTask: node['@class'] == '<%=BpmnFlowComponentTaskActorImpl.class.getName()%>',dirty: node.dirty==true,nodrop: node.nodrop, nodrag: node.nodrag, moved: node.moved}"> |
1772 | <!--<div class="panel-heading clearfix" ng-class="node.type"> |
1771 | <!--<div class="panel-heading clearfix" ng-class="node.type"> |
1773 | <div class="row gutter-0"> |
1772 | <div class="row gutter-0"> |
1774 | <div class="col-md-12"> |
1773 | <div class="col-md-12"> |
1775 | 1774 | ||
1776 | 1775 | ||
1777 | 1776 | ||
1778 | 1777 | ||
1779 | 1778 | ||
1780 | 1779 | ||
1781 | </div> |
1780 | </div> |
1782 | </div> |
1781 | </div> |
1783 | </div>--> |
1782 | </div>--> |
1784 | <div class="panel-body"> |
1783 | <div class="panel-body"> |
1785 | <table class="tableHeading"> |
1784 | <table class="tableHeading"> |
1786 | <tr> |
1785 | <tr> |
1787 | <td><i class="glyphicon glyphicon-resize-vertical" ui-tree-handle></i></td> |
1786 | <td><i class="glyphicon glyphicon-resize-vertical" ui-tree-handle></i></td> |
1788 | <td> |
1787 | <td> |
1789 | <span ng-if="node['@class'] == '<%=BpmnFlowComponentTaskActorImpl.class.getName()%>'"> |
1788 | <span ng-if="node['@class'] == '<%=BpmnFlowComponentTaskActorImpl.class.getName()%>'"> |
1790 | <span class="glyphicon glyphicon-user"></span><span class="bpmn-icon-task"></span> |
1789 | <span class="glyphicon glyphicon-user"></span><span class="bpmn-icon-task"></span> |
1791 | </span> |
1790 | </span> |
1792 | <span ng-if="node.type == 'bpmnGateway'" class="bpmn-icon-gateway-none"></span> |
1791 | <span ng-if="node.type == 'bpmnGateway'" class="bpmn-icon-gateway-none"></span> |
1793 | <span ng-if="node.type == 'bpmnEndEvent'" class="bpmn-icon-end-event-none"></span> |
1792 | <span ng-if="node.type == 'bpmnEndEvent'" class="bpmn-icon-end-event-none"></span> |
1794 | <label ng-if="node['@class'] == '<%=BpmnFlowComponentTaskActorImpl.class.getName()%>'" class="control-label">Tarefa Actor</label> |
1793 | <label ng-if="node['@class'] == '<%=BpmnFlowComponentTaskActorImpl.class.getName()%>'" class="control-label">Tarefa Actor</label> |
1795 | <label ng-if="node.type == 'bpmnGateway'" class="control-label">Gateway</label> |
1794 | <label ng-if="node.type == 'bpmnGateway'" class="control-label">Gateway</label> |
1796 | <label ng-if="node.type == 'bpmnEndEvent'" class="control-label">EventoFim</label> |
1795 | <label ng-if="node.type == 'bpmnEndEvent'" class="control-label">EventoFim</label> |
1797 | </td> |
1796 | </td> |
1798 | <td class="headingTitle"> |
1797 | <td class="headingTitle"> |
1799 | <input ng-keyup="setDirty(node)" data-nodrag class="form-control" ng-model="node.title"> |
1798 | <input ng-keyup="setDirty(node)" data-nodrag class="form-control" ng-model="node.title"> |
1800 | </td> |
1799 | </td> |
1801 | <td> |
1800 | <td> |
1802 | <bacoTags:confirm msg="Tem a certeza que deseja remover a atividade {{node.name}}" targetFunction="angular.element($('#processEditorModule')).scope().removeTask({{pool.id}},{{node.id}},{{$index}});angular.element($('#processEditorModule')).scope().$apply();" btnClass="btn btn-danger btn-xs pull-right" icon="glyphicon glyphicon-remove"/> |
1801 | <bacoTags:confirm msg="Tem a certeza que deseja remover a atividade {{node.name}}" targetFunction="angular.element($('#processEditorModule')).scope().removeTask({{pool.id}},{{node.id}},{{$index}});angular.element($('#processEditorModule')).scope().$apply();" btnClass="btn btn-danger btn-xs pull-right" icon="glyphicon glyphicon-remove"/> |
1803 | </td> |
1802 | </td> |
1804 | </tr> |
1803 | </tr> |
1805 | </table> |
1804 | </table> |
1806 | <%-- |
1805 | <%-- |
1807 | <div class="form-group"> |
1806 | <div class="form-group"> |
1808 | <div class="col-md-2"> |
1807 | <div class="col-md-2"> |
1809 | <span class="glyphicon glyphicon-user"></span> Actor Pool |
1808 | <span class="glyphicon glyphicon-user"></span> Actor Pool |
1810 | </div> |
1809 | </div> |
1811 | <div class="col-md-10"> |
1810 | <div class="col-md-10"> |
1812 | <select ng-change="setDirty(node)" class="chosenOff form-control" ng-model="node.actorPool" class="form-control"> |
1811 | <select ng-change="setDirty(node)" class="chosenOff form-control" ng-model="node.actorPool" class="form-control"> |
1813 | <option ng-repeat="a in process.actorPools" value="{{a.id}}" ng-selected="{{a.id == node.actorPool}}">{{a.name}}</option> |
1812 | <option ng-repeat="a in process.actorPools" value="{{a.id}}" ng-selected="{{a.id == node.actorPool}}">{{a.name}}</option> |
1814 | </select> |
1813 | </select> |
1815 | </div> |
1814 | </div> |
1816 | </div> |
1815 | </div> |
1817 | --%> |
1816 | --%> |
1818 | </div> |
1817 | </div> |
1819 | <div class="panel-footer clearfix"> |
1818 | <div class="panel-footer clearfix"> |
1820 | <a class="btn btn-success btn-xs" ng-if="node.flowConnectors && node.flowConnectors.length > 0" data-nodrag ng-click="toggle(this)"> |
1819 | <a class="btn btn-success btn-xs" ng-if="node.flowConnectors && node.flowConnectors.length > 0" data-nodrag ng-click="toggle(this)"> |
1821 | <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span> |
1820 | <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span> |
1822 | </a> |
1821 | </a> |
1823 | 1822 | ||
1824 | <a class="pull-right btn btn-default btn-xs" data-nodrag ng-click="addConnector(node)" style="margin-right: 8px;"><span |
1823 | <a class="pull-right btn btn-default btn-xs" data-nodrag ng-click="addConnector(node)" style="margin-right: 8px;"><span |
1825 | class="bpmn-icon-connection"></span></a> |
1824 | class="bpmn-icon-connection"></span></a> |
1826 | 1825 | ||
1827 | </div> |
1826 | </div> |
1828 | </div> |
1827 | </div> |
1829 | 1828 | ||
1830 | <ol ui-tree-nodes="" data-nodrop-enabled="true" ng-model="node.flowConnectors" ng-class="{hidden: collapsed}" ng-init="task=node"> |
1829 | <ol ui-tree-nodes="" data-nodrop-enabled="true" ng-model="node.flowConnectors" ng-class="{hidden: collapsed}" ng-init="task=node"> |
1831 | <li ng-repeat="node in node.flowConnectors" ui-tree-node ng-include="'connector_renderer.html'"> |
1830 | <li ng-repeat="node in node.flowConnectors" ui-tree-node ng-include="'connector_renderer.html'"> |
1832 | </li> |
1831 | </li> |
1833 | </ol> |
1832 | </ol> |
1834 | </script> |
1833 | </script> |
1835 | 1834 | ||
1836 | 1835 | ||
1837 | <script type="text/ng-template" id="connector_renderer.html"> |
1836 | <script type="text/ng-template" id="connector_renderer.html"> |
1838 | <!-- Coloquei aqui o predicado no NGClass que quando existe uma property nodrop = true o angular coloca nodrop na class o que faz o elemento ficar a vermelho e nao permite drop--> |
1837 | <!-- Coloquei aqui o predicado no NGClass que quando existe uma property nodrop = true o angular coloca nodrop na class o que faz o elemento ficar a vermelho e nao permite drop--> |
1839 | 1838 | ||
1840 | 1839 | ||
1841 | <div ng-click="select(node)" class="panel panel-info panel-block tree-node tree-node-content bpmnConnector" data-nodrag ng-class="{dirty: node.dirty==true, selected: node.selected == true,nodrop: node.nodrop, nodrag: node.nodrag, moved: node.moved}"> |
1840 | <div ng-click="select(node)" class="panel panel-info panel-block tree-node tree-node-content bpmnConnector" data-nodrag ng-class="{dirty: node.dirty==true, selected: node.selected == true,nodrop: node.nodrop, nodrag: node.nodrag, moved: node.moved}"> |
1842 | <div class="panel-heading clearfix" ng-class="node.type"> |
1841 | <div class="panel-heading clearfix" ng-class="node.type"> |
1843 | <div class="row gutter-0"> |
1842 | <div class="row gutter-0"> |
1844 | <table class="tableHeading"> |
1843 | <table class="tableHeading"> |
1845 | <tr> |
1844 | <tr> |
1846 | <!--<td><i class="glyphicon glyphicon-resize-vertical" ui-tree-handle></i></td>--> |
1845 | <!--<td><i class="glyphicon glyphicon-resize-vertical" ui-tree-handle></i></td>--> |
1847 | <td> |
1846 | <td> |
1848 | <span class="bpmn-icon-connection control-label"></span> Conector |
1847 | <span class="bpmn-icon-connection control-label"></span> Conector |
1849 | </td> |
1848 | </td> |
1850 | <td class="headingTitle"> |
1849 | <td class="headingTitle"> |
1851 | <input ng-keyup="setDirty(node)" data-nodrag class="form-control" ng-model="node.nameConnection"> |
1850 | <input ng-keyup="setDirty(node)" data-nodrag class="form-control" ng-model="node.nameConnection"> |
1852 | </td> |
1851 | </td> |
1853 | <td> |
1852 | <td> |
1854 | <bacoTags:confirm msg="Tem a certeza que deseja remover o connector {{node.name}}" targetFunction="angular.element($('#processEditorModule')).scope().removeConnector({{node.id}},{{task.id}},{{pool.id}},{{$index}});angular.element($('#processEditorModule')).scope().$apply();" btnClass="btn btn-danger btn-xs pull-right" icon="glyphicon glyphicon-remove"/> |
1853 | <bacoTags:confirm msg="Tem a certeza que deseja remover o connector {{node.name}}" targetFunction="angular.element($('#processEditorModule')).scope().removeConnector({{node.id}},{{task.id}},{{pool.id}},{{$index}});angular.element($('#processEditorModule')).scope().$apply();" btnClass="btn btn-danger btn-xs pull-right" icon="glyphicon glyphicon-remove"/> |
1855 | </td> |
1854 | </td> |
1856 | </tr> |
1855 | </tr> |
1857 | </table> |
1856 | </table> |
1858 | </div> |
1857 | </div> |
1859 | </div> |
1858 | </div> |
1860 | <div class="panel-body"> |
1859 | <div class="panel-body"> |
1861 | <div class="form-group"> |
1860 | <div class="form-group"> |
1862 | <div class="col-md-2"> |
1861 | <div class="col-md-2"> |
1863 | <span class="glyphicon glyphicon-arrow-right"></span> Ligação |
1862 | <span class="glyphicon glyphicon-arrow-right"></span> Ligação |
1864 | </div> |
1863 | </div> |
1865 | <div class="col-md-10"> |
1864 | <div class="col-md-10"> |
1866 | <select ng-change="setDirty(node)" data-nodrag class="form-control" ng-model="node.flowComponentId" |
1865 | <select ng-change="setDirty(node)" data-nodrag class="form-control" ng-model="node.flowComponentId" |
1867 | ng-options="f.id as f.title for f in allFlowComponents"> |
1866 | ng-options="f.id as f.title for f in allFlowComponents"> |
1868 | </select> |
1867 | </select> |
1869 | </div> |
1868 | </div> |
1870 | </div> |
1869 | </div> |
1871 | <div class="form-group"> |
1870 | <div class="form-group"> |
1872 | <div class="col-md-2"> |
1871 | <div class="col-md-2"> |
1873 | <span class="glyphicon glyphicon-tag"></span> Chave |
1872 | <span class="glyphicon glyphicon-tag"></span> Chave |
1874 | </div> |
1873 | </div> |
1875 | <div class="col-md-10"> |
1874 | <div class="col-md-10"> |
1876 | <input type="text" ng-keyup="setDirty(node)" data-nodrag class="form-control" ng-model="node.keyValue"> |
1875 | <input type="text" ng-keyup="setDirty(node)" data-nodrag class="form-control" ng-model="node.keyValue"> |
1877 | </div> |
1876 | </div> |
1878 | </div> |
1877 | </div> |
1879 | <div class="form-group"> |
1878 | <div class="form-group"> |
1880 | <div class="col-md-2"> |
1879 | <div class="col-md-2"> |
1881 | <span class="glyphicon glyphicon-envelope"></span> Enviar Emails |
1880 | <span class="glyphicon glyphicon-envelope"></span> Enviar Emails |
1882 | </div> |
1881 | </div> |
1883 | <div class="col-md-2"> |
1882 | <div class="col-md-2"> |
1884 | <select class="form-control chosenOff" ng-change="setDirty(node)" ng-model="node.sendEmail" ng-options="o.v as o.n for o in [{ n: 'Sim', v: true }, { n: 'Não', v: false }]"> |
1883 | <select class="form-control chosenOff" ng-change="setDirty(node)" ng-model="node.sendEmail" ng-options="o.v as o.n for o in [{ n: 'Sim', v: true }, { n: 'Não', v: false }]"> |
1885 | </select> |
1884 | </select> |
1886 | </div> |
1885 | </div> |
1887 | </div> |
1886 | </div> |
1888 | <div class="form-group" ng-show="node.sendEmail==true"> |
1887 | <div class="form-group" ng-show="node.sendEmail==true"> |
1889 | <div class="col-md-2"> |
1888 | <div class="col-md-2"> |
1890 | Mensagem |
1889 | Mensagem |
1891 | </div> |
1890 | </div> |
1892 | <div class="col-md-10"> |
1891 | <div class="col-md-10"> |
1893 | <textarea ng-keyup="setDirty(node)" rows="3" class="form-control" ng-model="node.msgEmail"></textarea> |
1892 | <textarea ng-keyup="setDirty(node)" rows="3" class="form-control" ng-model="node.msgEmail"></textarea> |
1894 | </div> |
1893 | </div> |
1895 | </div> |
1894 | </div> |
1896 | </div> |
1895 | </div> |
1897 | </div> |
1896 | </div> |
1898 | 1897 | ||
1899 | 1898 | ||
1900 | 1899 | ||
1901 | </script> |
1900 | </script> |
1902 | 1901 | ||
1903 | 1902 | ||
1904 | 1903 | ||
1905 | <!--Estilos CSS do Exemplo do Overview Nem olhei para eles copy paste e pronto--> |
1904 | <!--Estilos CSS do Exemplo do Overview Nem olhei para eles copy paste e pronto--> |
1906 | <style> |
1905 | <style> |
1907 | 1906 | ||
1908 | .panel-block .panel-heading, .panel-block .panel-footer |
1907 | .panel-block .panel-heading, .panel-block .panel-footer |
1909 | { |
1908 | { |
1910 | padding:5px; |
1909 | padding:5px; |
1911 | } |
1910 | } |
1912 | 1911 | ||
1913 | /* remove */ |
1912 | /* remove */ |
1914 | .gutter-0.row { |
1913 | .gutter-0.row { |
1915 | margin-right: -0px !important; |
1914 | margin-right: -0px !important; |
1916 | margin-left: -0px !important; |
1915 | margin-left: -0px !important; |
1917 | } |
1916 | } |
1918 | .gutter-0 > [class*="col-"]{ |
1917 | .gutter-0 > [class*="col-"]{ |
1919 | padding-right: 0px !important; |
1918 | padding-right: 0px !important; |
1920 | padding-left: 0px !important; |
1919 | padding-left: 0px !important; |
1921 | } |
1920 | } |
1922 | 1921 | ||
1923 | /* customize */ |
1922 | /* customize */ |
1924 | .gutter-6.row { |
1923 | .gutter-6.row { |
1925 | margin-right: -3px !important; |
1924 | margin-right: -3px !important; |
1926 | margin-left: -3px !important; |
1925 | margin-left: -3px !important; |
1927 | } |
1926 | } |
1928 | .gutter-6 > [class*="col-"] { |
1927 | .gutter-6 > [class*="col-"] { |
1929 | padding-right: 3px !important; |
1928 | padding-right: 3px !important; |
1930 | padding-left: 3px !important; |
1929 | padding-left: 3px !important; |
1931 | } |
1930 | } |
1932 | 1931 | ||
1933 | 1932 | ||
1934 | 1933 | ||
1935 | 1934 | ||
1936 | .panel-info.bpmnActorTask > .panel-heading, .bpmnActorTask{ background-color: #fff2c3 !important;border-color: #c69763 !important } |
1935 | .panel-info.bpmnActorTask > .panel-heading, .bpmnActorTask{ background-color: #fff2c3 !important;border-color: #c69763 !important } |
1937 | .bpmnTask { background-color: #fff2c3 !important;border-color: #c69763 !important } |
1936 | .bpmnTask { background-color: #fff2c3 !important;border-color: #c69763 !important } |
1938 | .bpmnStartEvent { background-color: #EEF1CA !important; border-color: #A5CF84 !important } |
1937 | .bpmnStartEvent { background-color: #EEF1CA !important; border-color: #A5CF84 !important } |
1939 | .bpmnMiddleEvent { background-color: #A7BBCF !important ;border-color: #4F87B0 !important} |
1938 | .bpmnMiddleEvent { background-color: #A7BBCF !important ;border-color: #4F87B0 !important} |
1940 | .bpmnEndEvent { background-color: #FDE6E2 !important; border-color: #8C121D; !important } |
1939 | .bpmnEndEvent { background-color: #FDE6E2 !important; border-color: #8C121D; !important } |
1941 | .bpmnGateway { background-color: #ffcf53 !important; border-color: #ffa42a !important} |
1940 | .bpmnGateway { background-color: #ffcf53 !important; border-color: #ffa42a !important} |
1942 | .bpmnFase { background-color: #ECECF4 !important; border-color: #276E9F !important} |
1941 | .bpmnFase { background-color: #ECECF4 !important; border-color: #276E9F !important} |
1943 | .panel-info.bpmnConnector > .panel-heading , .bpmnConnector { background-color: white !important; ;border-color: #b7bdbb !important } |
1942 | .panel-info.bpmnConnector > .panel-heading , .bpmnConnector { background-color: white !important; ;border-color: #b7bdbb !important } |
1944 | 1943 | ||
1945 | 1944 | ||
1946 | 1945 | ||
1947 | .panel-info.bpmnActorTask.selected > .panel-heading,.bpmnActorTask.selected { background-color: #e7daac !important;border-color: #c69763 !important } |
1946 | .panel-info.bpmnActorTask.selected > .panel-heading,.bpmnActorTask.selected { background-color: #e7daac !important;border-color: #c69763 !important } |
1948 | .bpmnTask { background-color: #fff2c3 !important;border-color: #c69763 !important } |
1947 | .bpmnTask { background-color: #fff2c3 !important;border-color: #c69763 !important } |
1949 | .bpmnStartEvent { background-color: #EEF1CA !important; border-color: #A5CF84 !important } |
1948 | .bpmnStartEvent { background-color: #EEF1CA !important; border-color: #A5CF84 !important } |
1950 | .bpmnMiddleEvent { background-color: #A7BBCF !important ;border-color: #4F87B0 !important} |
1949 | .bpmnMiddleEvent { background-color: #A7BBCF !important ;border-color: #4F87B0 !important} |
1951 | .bpmnEndEvent { background-color: #FDE6E2 !important; border-color: #8C121D; !important } |
1950 | .bpmnEndEvent { background-color: #FDE6E2 !important; border-color: #8C121D; !important } |
1952 | .bpmnGateway { background-color: #ffcf53 !important; border-color: #ffa42a !important} |
1951 | .bpmnGateway { background-color: #ffcf53 !important; border-color: #ffa42a !important} |
1953 | .bpmnFase { background-color: #ECECF4 !important; border-color: #276E9F !important} |
1952 | .bpmnFase { background-color: #ECECF4 !important; border-color: #276E9F !important} |
1954 | .panel-info.bpmnConnector.selected > .panel-heading , .bpmnConnector.selected { background-color: #dadada !important; ;border-color: #b7bdbb !important } |
1953 | .panel-info.bpmnConnector.selected > .panel-heading , .bpmnConnector.selected { background-color: #dadada !important; ;border-color: #b7bdbb !important } |
1955 | 1954 | ||
1956 | .btn { |
1955 | .btn { |
1957 | margin-right: 8px; |
1956 | margin-right: 8px; |
1958 | } |
1957 | } |
1959 | 1958 | ||
1960 | 1959 | ||
1961 | .angular-ui-tree-handle { |
1960 | .angular-ui-tree-handle { |
1962 | background: #f8faff; |
1961 | background: #f8faff; |
1963 | border: 1px solid #dae2ea; |
1962 | border: 1px solid #dae2ea; |
1964 | color: #7c9eb2; |
1963 | color: #7c9eb2; |
1965 | padding: 0; |
1964 | padding: 0; |
1966 | } |
1965 | } |
1967 | 1966 | ||
1968 | .angular-ui-tree-handle:hover { |
1967 | .angular-ui-tree-handle:hover { |
1969 | color: #438eb9; |
1968 | color: #438eb9; |
1970 | background: #f4f6f7; |
1969 | background: #f4f6f7; |
1971 | border-color: #dce2e8; |
1970 | border-color: #dce2e8; |
1972 | } |
1971 | } |
1973 | 1972 | ||
1974 | .angular-ui-tree-placeholder { |
1973 | .angular-ui-tree-placeholder { |
1975 | background: #f0f9ff; |
1974 | background: #f0f9ff; |
1976 | border: 2px dashed #bed2db; |
1975 | border: 2px dashed #bed2db; |
1977 | -webkit-box-sizing: border-box; |
1976 | -webkit-box-sizing: border-box; |
1978 | -moz-box-sizing: border-box; |
1977 | -moz-box-sizing: border-box; |
1979 | box-sizing: border-box; |
1978 | box-sizing: border-box; |
1980 | } |
1979 | } |
1981 | 1980 | ||
1982 | tr.angular-ui-tree-empty { |
1981 | tr.angular-ui-tree-empty { |
1983 | height:100px |
1982 | height:100px |
1984 | } |
1983 | } |
1985 | 1984 | ||
1986 | .group-title { |
1985 | .group-title { |
1987 | background-color: #687074 !important; |
1986 | background-color: #687074 !important; |
1988 | color: #FFF !important; |
1987 | color: #FFF !important; |
1989 | } |
1988 | } |
1990 | 1989 | ||
1991 | 1990 | ||
1992 | /* --- Tree --- */ |
1991 | /* --- Tree --- */ |
1993 | .tree-node { |
1992 | .tree-node { |
1994 | border: 1px solid #dae2ea; |
1993 | border: 1px solid #dae2ea; |
1995 | background: #f8faff; |
1994 | background: #f8faff; |
1996 | color: #7c9eb2; |
1995 | color: #7c9eb2; |
1997 | } |
1996 | } |
1998 | 1997 | ||
1999 | .nodrop { |
1998 | .nodrop { |
2000 | background-color: #f2dede; |
1999 | background-color: #f2dede; |
2001 | } |
2000 | } |
2002 | 2001 | ||
2003 | 2002 | ||
2004 | .nodrag { |
2003 | .nodrag { |
2005 | background-color: #f2eec1; |
2004 | background-color: #f2eec1; |
2006 | } |
2005 | } |
2007 | 2006 | ||
2008 | .tree-node-content { |
2007 | .tree-node-content { |
2009 | margin: 10px; |
2008 | margin: 10px; |
2010 | } |
2009 | } |
2011 | .tree-handle { |
2010 | .tree-handle { |
2012 | /*padding: 10px;*/ |
2011 | /*padding: 10px;*/ |
2013 | background: #428bca; |
2012 | background: #428bca; |
2014 | color: #FFF; |
2013 | color: #FFF; |
2015 | margin-right: 15px; |
2014 | margin-right: 15px; |
2016 | } |
2015 | } |
2017 | 2016 | ||
2018 | .angular-ui-tree-handle:hover { |
2017 | .angular-ui-tree-handle:hover { |
2019 | } |
2018 | } |
2020 | 2019 | ||
2021 | .angular-ui-tree-placeholder { |
2020 | .angular-ui-tree-placeholder { |
2022 | background: #f0f9ff; |
2021 | background: #f0f9ff; |
2023 | border: 2px dashed #bed2db; |
2022 | border: 2px dashed #bed2db; |
2024 | -webkit-box-sizing: border-box; |
2023 | -webkit-box-sizing: border-box; |
2025 | -moz-box-sizing: border-box; |
2024 | -moz-box-sizing: border-box; |
2026 | box-sizing: border-box; |
2025 | box-sizing: border-box; |
2027 | } |
2026 | } |
2028 | 2027 | ||
2029 | /*Estilo adicionado por mim para os movidos*/ |
2028 | /*Estilo adicionado por mim para os movidos*/ |
2030 | .moved |
2029 | .moved |
2031 | { |
2030 | { |
2032 | border: 2px solid blue !important; |
2031 | border: 2px solid blue !important; |
2033 | } |
2032 | } |
2034 | </style> |
2033 | </style> |
2035 | </div> |
2034 | </div> |
2036 | 2035 | ||
2037 | <% |
2036 | <% |
2038 | AbstractDao.getCurrentSession().getTransaction().commit(); |
2037 | AbstractDao.getCurrentSession().getTransaction().commit(); |
2039 | %> |
2038 | %> |