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