This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Adiciona as classes indicadas a um elemento HTML | |
*/ | |
class TagClassTransform extends HTMLPurifier_TagTransform | |
{ | |
/** | |
* @var array | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use AdobeConnectClient\Connection\Curl\Connection; | |
use AdobeConnectClient\Client; | |
$connection = new Connection('https://hostname.adobeconnect.com'); | |
$client = new Client($connection); | |
$client->login('username', 'password'); | |
// Creating a User | |
$principal = Principal::instance() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Exemplo de como consultar pai filho em dataset | |
*/ | |
/** | |
* Itens da Solicitação de Material de Expediente | |
* | |
* @param {string[]} fields Campos para retornar | |
* @param {Constraint[]} constraints Filtros | |
* @param {string[]} sortFields Campos para ordenar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Teste do Serviço | |
* | |
* @param {string[]} fields Campos a retornar | |
* @param {Constraint[]} constraints Filtros | |
* @param {string[]} sortFields Campos da ordenação | |
*/ | |
function createDataset(fields, constraints, sortFields) { | |
var SERVICE_NAME = "ECMWorkflowEngineService", // Nome do Serviço cadastrado no Fluig | |
SERVICE_PATH = "com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Tenho uma Pai Filho com os seguintes campos Zoom: | |
* - ccProjeto | |
* - ccAcao | |
* - ccUnidade | |
* | |
* Comportamento desejado: | |
* | |
* - Quando houver uma seleção em ccProjeto o Zoom ccAcao recarregue usando o Projeto como filtro. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch(urlDoArquivo) | |
.then(response => response.blob()) | |
.then(blob => { | |
const reader = new FileReader(); | |
reader.readAsDataURL(blob); | |
reader.onloadend = function() { | |
// reader.result é o base64 | |
console.log(reader.result); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Criar a pasta <instalação do fluig>\appserver\modules\system\layers\base\org\postgresql\main | |
Colocar o .jar do jdbc nessa pasta. | |
Utilizei o postgresql-42.2.20.jar, então deve-se indicar a versão correta no path de resource-root. | |
Criar o arquivo "module.xml" nesta pasta com o seguinte conteúdo: | |
--> | |
<?xml version="1.0" encoding="UTF-8"?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const response = await fetch( | |
`${WCMAPI.serverURL}/webdesk/ECMCardService?wsdl`, | |
{ | |
method: "POST", | |
redirect: "follow", | |
credentials: "omit", | |
headers: { | |
"Content-Type": "text/xml;charset=utf-8" | |
}, | |
body: createItemXml(documentId, novoIndice, conteudoDoItem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pega um dataset | |
* | |
* Wrapper para tornar a DatasetFactory.getDataset (da lib vcXMLRPC.js) em Promise. | |
* | |
* @param {string} dataset Nome do Dataset | |
* @param {string[]} fields Campos para retornar (pode ser null pra retornar todos) | |
* @param {Constraint[]} constraints Os filtros a aplicar ou null se não filtrar nada | |
* @param {string[]} sorters Campos para ordenar ou null para não ordenar. Pode colocar ;desc no campo para ordenar decrescente | |
* @returns {Promise<{columns: string[], values: object[]}>} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fluigUsername = "username"; | |
var fluigPassword = "password"; | |
var fluigEmpresa = 1; | |
var documentId = 0; | |
var documentVersion = "1000"; | |
var documentDescription = "arquivo.pdf"; | |
var mimeType = "application/pdf"; | |
var ECMDocumentServiceProvider = ServiceManager.getServiceInstance("ECMDocumentService"); | |
var ECMDocumentServiceLocator = ECMDocumentServiceProvider.instantiate("com.totvs.technology.ecm.dm.ws.ECMDocumentServiceService"); |
OlderNewer