');" aclick += "printWindow.document.querySelector('body').style.marginLeft='50px';" aclick += "printWindow.document.querySelector('body').style.marginTop='50px';" aclick += "printWindow.document.close();" aclick += "setTimeout(function(){" aclick += "printWindow.print();" aclick += "}, 500);" aclick += "\">View Response" return aclick; } $scope.gridDocResponse = { enableFilter: true, enableSorting: true, enableColResize: true, rowSelection: 'single', rowClass: 'ag-grid-selectable' }; $scope.columnsDocResponse = [ { field: "Title", headerName: "Title", cellRenderer: function (params) { return $scope.renderData(params.value); } }, { field: "RowGuid", headerName: "", width: 200, cellRenderer: function (params) { return "View Response"; } }, ]; $scope.load = function () { //Get the details $(".communication-entry").ngHttp($http, $scope, { property: 'detailResponse', url: '/public/DTSCResponse/?id=' + $scope.communicationId + "&isEmail=" + $scope.isEmail, postSuccess: function (response) { if ($scope.isEmail == "emailResponse") { //view email and print to pdf //pass the data to window object window.$_emaillink = {}; $_emaillink.value = $_emaillink.value || response.data[0].content; document.getElementById("email-response").style.display = "block"; //var el = document.createRange().createContextualFragment(response.data[0].content); //[title, subtitle] = [ // el.querySelectorAll('[class*="workflow-header-label"]'), // el.querySelectorAll('[class*="workflow-header-label"] + td') //]; //var emailinfor = ('' + title[5].innerText + ' ' + subtitle[5].innerText + ''); //var emailinfor = ('' + title[0] + ' ' + subtitle[0] + ''); //document.querySelector('.e-content').innerHTML = emailinfor; $scope.gridEmailResponse.api.setColumnDefs($scope.columnsEmailResponse); $scope.gridEmailResponse.api.setRowData($scope.detailResponse.data); $scope.gridEmailResponse.api.sizeColumnsToFit(); $(".related-response .grid-container").height($(".related-response .ag-body-container").outerHeight() + 100); //Bread Crumb //Create a bool variable to show/hide
  • when url parameter isEmail=emailResponse $scope.emailResponse = true; } else { document.getElementById("document-response").style.display = "block"; $scope.gridDocResponse.api.setColumnDefs($scope.columnsDocResponse); $scope.gridDocResponse.api.setRowData($scope.detailResponse.data.Files); $scope.gridEmailResponse.api.sizeColumnsToFit(); $(".related-response .grid-container").height($(".related-response .ag-body-container").outerHeight() + 100); } //Bread Crumb //Parse the suburl's id only //Only shows when url parameter has isEmail=docResponse let str = response.data.SubmittalUrl.toString(); var subURL = str.substring(str.lastIndexOf("/")); $scope.submittalID = subURL.replace("/","=") } }); }; $scope.load(); });

    {{detailResponse.data[0].subject}}

    Responsible Entity: {{detailResponse.data[0].entityName}}
    Submittal:
    Date: {{detailResponse.data[0].date}}
    Response Type: {{detailResponse.data[0].name}}
    Attachments:

    {{detailResponse.data.Name}}

    Responsible Entity: {{detailResponse.data.rename}}
    Submittal:
    Date: {{detailResponse.data.Date | date:"MM/dd/yyyy"}}
    Response Type: {{detailResponse.data.Type}}