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
<!DOCTYPE html> | |
<HTML LANG="en-US"> | |
<HEAD> | |
<META http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<script>var csThemeSupportPath = "/img/style/images/";</script> | |
<LINK REL="stylesheet" TYPE="text/css" HREF="/img/style/screen.css?v=1404.0" id="primaryCSS"> |
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
<!DOCTYPE html> | |
<HTML LANG="en-US"> | |
<HEAD> | |
<meta charset="utf-8"> | |
<!-- What I am adding to make it more Smart View --> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="/img/csui/themes/carbonfiber/init.css"> | |
<link rel="stylesheet" href="/img/csui/themes/carbonfiber/theme.css"> |
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
function parseFuncValues() { | |
// LL_FUNC_VALUES | |
let values = document.getElementById('WorkflowValues').getAttribute('value'); | |
let funcValues = {}; | |
values = values.replace('A<1,?,', ''); | |
values = values.substring(0, values.length - 1); | |
values = values.split(',') | |
values = values.map((value) => { | |
value = value.split('='); | |
funcValues[value[0].replace(/\'/g, '')] = value[1].replace(/\'/g, '') |
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
// HTTP Requests | |
function httpRequest(method, url, ticket, body, options) { | |
return new Promise((ok, fail) => { | |
if (options === 'undefined' || options === null) { | |
options = { | |
fileupload: false | |
} | |
} | |
let request = new XMLHttpRequest(); | |
request.open(method, url); |
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
function ready(fn) { | |
if (document.readyState != 'loading') { | |
fn(); | |
} else { | |
document.addEventListener('DOMContentLoaded', fn); | |
} | |
} | |
ready(() => { | |
const workflowSettings = parseFuncValues(); |
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
// File Upload Functions | |
function uploadFileClick() { | |
const fileControl = document.getElementById('attachDocument').click(); | |
} | |
async function processAttachments(files, attachmentid, otcsticket) { | |
// Async Function to wrap the asynchronous actions | |
try { |
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
async function displayAttachments(attachmentid, otcsticket) { | |
const url = `/otcs/cs.exe/api/v2/nodes/${attachmentid}/nodes?fields=properties{id,name, mime_type}`; | |
const noAttachments = document.getElementById('noAttachments'); | |
const displayAttachments = document.getElementById('displayAttachments'); | |
const loading = document.getElementById('loadingAttachments'); | |
// Set Initiatial State | |
loading.style.display = ''; | |
noAttachments.style.display = 'none'; | |
displayAttachments.style.display = 'none'; |
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
// Interactive Validation | |
function validateField(event) { | |
const value = event.target.value; | |
const errorValue = `${event.target.getAttribute('id')}Validate`; | |
const errorMessage = document.getElementById(errorValue); | |
if (!value) { | |
// Trigger Error (this would be easier with something like Angular) | |
errorMessage.style.display = ''; | |
} else { | |
errorMessage.style.display = 'none'; |
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
export interface MsalConfig { | |
auth: { | |
clientId: string; | |
authority: string; | |
clientSecret: string; | |
graphendpoint: string; | |
} | |
} |
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
export class DLAuthenticationProvider implements AuthenticationProvider { | |
config: MsalConfig = { | |
auth: { | |
clientId: '', | |
authority: '', | |
clientSecret: '', | |
graphendpoint: '', | |
} | |
}; | |
tokenrequest: any; |
OlderNewer