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