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