Skip to content

Instantly share code, notes, and snippets.

@mozrat
mozrat / background.script.js
Created December 19, 2017 16:29
ServiceNow PDF Generation
var UP3PDF = Class.create();
UP3PDF.prototype = Object.extendsObject(AbstractAjaxProcessor, {
_document : null,
createPDF : function(html, table, sys_id, filename) {
var pdfDoc = new GeneralPDF.Document(null, null, null, null, null, null);
this._document = new GeneralPDF(pdfDoc);
this._document.startHTMLParser();
this._document.addHTML(html);
@mozrat
mozrat / CSS
Created January 18, 2017 06:38
Approvals widget
.row.info-row:hover {
background-color: #f0f0f0;
}
.fa-2x {
font-size: 1.5em;
margin-top: -3px;
}
@mozrat
mozrat / Client script
Created January 17, 2017 21:12
I'm affected too button
function ($scope, spUtil, snRecordWatcher, $rootScope) {
var c = this;
$scope.standalone = $scope.options.standalone == 'true' || $scope.options.standalone == true;
var q = "cmdb_ci.sys_class_name=cmdb_ci_service";
if ($scope.data.outageIDs != "")
q += "^NQ" + $scope.data.outageIDs;
snRecordWatcher.initList("cmdb_ci_outage", q);