sync
This commit is contained in:
@ -81,8 +81,8 @@
|
||||
}
|
||||
|
||||
.question {
|
||||
min-height: 24px;
|
||||
line-height: 24px;
|
||||
/*min-height: 24px;*/
|
||||
/*line-height: 24px;*/
|
||||
padding-left: 70px;
|
||||
padding-right: 10px;
|
||||
font-size: 14px;
|
||||
@ -92,8 +92,8 @@
|
||||
}
|
||||
|
||||
.answer {
|
||||
min-height: 24px;
|
||||
line-height: 24px;
|
||||
/*min-height: 24px;*/
|
||||
/*line-height: 24px;*/
|
||||
padding-left: 90px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
@ -186,12 +186,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
.question_line {
|
||||
border-collapse: collapse;
|
||||
.question_line tr {
|
||||
border-top: 1px solid #dbdbdb;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_line {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.answer_line {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.question_table_grid {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
@ -200,10 +207,20 @@
|
||||
border: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_div_grid {
|
||||
.question_standard_table_line {
|
||||
border-top: 1px solid #dbdbdb;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_standard_table_grid {
|
||||
border: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.answer_div_grid {
|
||||
border-left: 1px solid #dbdbdb;
|
||||
border-right: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.mediacaption {
|
||||
text-align: center;
|
||||
clear: both;
|
||||
|
@ -60,7 +60,7 @@
|
||||
.page {
|
||||
/*background-color: #d3d3d3;*/
|
||||
/*height: 52px;*/
|
||||
line-height: 52px;
|
||||
line-height: 25px;
|
||||
margin-top: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
@ -72,7 +72,7 @@
|
||||
.section {
|
||||
/*background-color: #eaeaea;*/
|
||||
/*height: 40px;*/
|
||||
line-height: 40px;
|
||||
line-height: 20px;
|
||||
padding-left: 30px;
|
||||
padding-right: 10px;
|
||||
font-size: 20px;
|
||||
@ -81,8 +81,8 @@
|
||||
}
|
||||
|
||||
.question {
|
||||
min-height: 30px;
|
||||
line-height: 30px;
|
||||
min-height: 24px;
|
||||
line-height: 24px;
|
||||
padding-left: 70px;
|
||||
padding-right: 10px;
|
||||
font-size: 14px;
|
||||
@ -92,12 +92,21 @@
|
||||
}
|
||||
|
||||
.answer {
|
||||
min-height: 30px;
|
||||
line-height: 30px;
|
||||
min-height: 24px;
|
||||
line-height: 24px;
|
||||
padding-left: 90px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.table_content {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.pagedoublespace {
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.media {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
@ -176,6 +185,50 @@
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.question_line tr {
|
||||
border-top: 1px solid #dbdbdb;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_line {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.answer_line {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.question_table_grid {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.question_table_grid td {
|
||||
border: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_standard_table_line {
|
||||
border-top: 1px solid #dbdbdb;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_standard_table_grid {
|
||||
border: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.answer_div_grid {
|
||||
border-left: 1px solid #dbdbdb;
|
||||
border-right: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.mediacaption {
|
||||
text-align: center;
|
||||
clear: both;
|
||||
height: 25px;
|
||||
width: 120px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/controls.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/vue.min.js")%>"></script>
|
||||
@ -249,6 +302,19 @@
|
||||
<span id="button-print" class="sbutton iconprint" style="margin-right: 20px;" onclick="OnPrint();" data-lgid="P_IPT_PRINT">Print</span>
|
||||
</div>
|
||||
<div id="divreport" style="width: 1100px; margin: 0 auto;">
|
||||
<div v-if="report.ReportLayout!=null">
|
||||
<table class="maintable" style="width: 100%;">
|
||||
<tr class="assettr">
|
||||
<td style="width: 33%; text-align: left;">
|
||||
<img id="reportlayoutlogo" style="width: 100px; margin-top: 5px; display: none;" /></td>
|
||||
<td style="width: 33%; text-align: center;">
|
||||
<img id="reportlayoutcenterlogo" style="width: 100px; margin-top: 5px; display: none;" /></td>
|
||||
<td style="width: 33%; text-align: right;">
|
||||
<img id="reportlayoutrightlogo" style="width: 100px; margin-top: 5px; display: none;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<h1 style="text-align: center;" v-show="report.Template.DisplayInspectionTitle">{{report.Template.Name}}</h1>
|
||||
<div style="text-align: center; margin-bottom: 10px;"><span v-show="report.Template.DisplayCommitTime">{{report.CommitTimeLocalStr}}</span><span v-show="report.Template.DisplayCommitBy"> by {{report.CommitedByUserName}}</span></div>
|
||||
<table class="maintable">
|
||||
@ -361,7 +427,9 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="mask_bg" style="display: none;"><div class="loading c-spin"></div></div>
|
||||
<div id="mask_bg" style="display: none;">
|
||||
<div class="loading c-spin"></div>
|
||||
</div>
|
||||
<div id="right_popup" style="display: none; position: absolute; top: 0; right: 0; bottom: 0; background-color: white; overflow: auto;">
|
||||
</div>
|
||||
<iframe id="ifdiv" style="height: 1px; width: 1px; display: none;"></iframe>
|
||||
|
@ -5,7 +5,7 @@ require.config({
|
||||
//spectrum: "../../js/spectrum"
|
||||
},
|
||||
waitSeconds: 0,
|
||||
urlArgs: "v=455" //+ Math.random()
|
||||
urlArgs: "v=464" //+ Math.random()
|
||||
})
|
||||
|
||||
requirejs(['modules/pageloader'], function (loader) {
|
||||
|
@ -113,10 +113,10 @@
|
||||
_this.loading && _this.loading.fadeOut(100);
|
||||
return;
|
||||
}
|
||||
if (q.QuestionType === Question.types.AssetStatus) {
|
||||
a.Result = a.Comment;
|
||||
a.Comment = "";
|
||||
}
|
||||
//if (q.QuestionType === Question.types.AssetStatus) {
|
||||
// a.Result = a.Comment;
|
||||
// a.Comment = "";
|
||||
//}
|
||||
|
||||
answers.push(a);
|
||||
}
|
||||
|
@ -852,15 +852,15 @@
|
||||
content.append('<div style="clear: both"></div>');
|
||||
|
||||
cnt = $('<div style="margin: 6px 0 0 0px"></div>');
|
||||
var divComment = $('<div style="padding: 6px 0"></div>');
|
||||
var comment = $('<textarea class="form-control" style="width: 100%; box-sizing: border-box; height: 70px" placeholder="Comment"></textarea>');
|
||||
comment.attr('maxlength', 500);
|
||||
var divResult = $('<div style="padding: 6px 0"></div>');
|
||||
var rst = $('<textarea class="form-control" style="width: 100%; box-sizing: border-box; height: 70px"></textarea>');
|
||||
rst.attr('maxlength', 500);
|
||||
if (answer && answer.Result) {
|
||||
comment.val(answer.Result);
|
||||
rst.val(answer.Result);
|
||||
}
|
||||
this.ui.comment = comment;
|
||||
divComment.append(comment);
|
||||
cnt.append(divComment);
|
||||
this.ui.assetstatusresult = rst;
|
||||
divResult.append(rst);
|
||||
cnt.append(divResult);
|
||||
content.append(cnt);
|
||||
|
||||
return content;
|
||||
@ -874,12 +874,8 @@
|
||||
items.push(item);
|
||||
}
|
||||
answer.SelectedItems = items;
|
||||
if (items.length > 0) {
|
||||
answer.Result = items.map(function (i) { return i.Value || i.Text }).join('\n');
|
||||
//answer.SeverityLevel = items[0].SeverityLevel;
|
||||
} else {
|
||||
answer.Result = '';
|
||||
}
|
||||
answer.Result = this.ui.assetstatusresult.val();
|
||||
|
||||
return answer;
|
||||
};
|
||||
assetStatusQuestion.prototype.focus = function () {
|
||||
|
@ -573,7 +573,7 @@
|
||||
content.find('.layout-footers-middle .editor-content').val(info.PageFooterCenter);
|
||||
content.find('.layout-footers-right .editor-content').val(info.PageFooterRight);
|
||||
|
||||
content.find('#layout-style').val(info.Style);
|
||||
content.find('#layout-style').val(info.Style).change();
|
||||
content.find('#layout-spacing').val(info.Spacing);
|
||||
content.find('#layout-picturesdisplay').val(info.PicturesDisplay);
|
||||
content.find('#layout-captionimages').prop('checked', info.CaptionImages);
|
||||
|
@ -158,7 +158,7 @@ function showIdentifiedQuestions(questions) {
|
||||
var content = $('<div></div>');
|
||||
content.append($('<div class="catelog">IDENTIFIED ISSUES</div>'));
|
||||
if (questions && questions.length > 0) {
|
||||
createQuestionContent1(content, questions);
|
||||
createQuestionContent1(content, questions, true);
|
||||
}
|
||||
else
|
||||
content.append($('<div class="question"></div>').text(GetTextByKey("P_IPT_NOQUESTIONS", 'No Questions')));
|
||||
@ -210,8 +210,7 @@ function showSignature(report) {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_pic.addClass('question_div_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_pic.css('line-height', '30px');
|
||||
div_pic.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,8 +246,7 @@ function showMedias() {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
div_question.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
else if (layoutStyle == 2) {//Split
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
@ -279,8 +277,7 @@ function showMedias() {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
div_question.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
else {
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
@ -297,14 +294,13 @@ function showMedias() {
|
||||
}
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
div_question.addClass('question_standard_table_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
div_question.addClass('question_standard_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
div_question.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
|
||||
$('#divpages').append(content);
|
||||
}
|
||||
|
||||
@ -355,8 +351,7 @@ function createPage(page) {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
tabpage.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
tabpage.css('line-height', '30px');
|
||||
tabpage.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
else {
|
||||
var divpage = $('<div class="page"></div>');
|
||||
@ -404,8 +399,7 @@ function createSectionContent(page) {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
tabsection.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
tabsection.css('line-height', '30px');
|
||||
tabsection.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
|
||||
var qc = createQuestionContent(s);
|
||||
content.append(qc);
|
||||
@ -459,35 +453,36 @@ function createSectionContent(page) {
|
||||
function createQuestionContent(section) {
|
||||
var content = $('<div style="margin-bottom:30px;"></div>');
|
||||
if (section.Questions && section.Questions.length > 0) {
|
||||
createQuestionContent1(content, section.Questions);
|
||||
createQuestionContent1(content, section.Questions, false);
|
||||
}
|
||||
else
|
||||
content.append($('<div class="question"></div>').text(GetTextByKey("P_IPT_NOQUESTIONS", 'No Questions')));
|
||||
return content;
|
||||
}
|
||||
|
||||
function createQuestionContent1(content, questions) {
|
||||
function createQuestionContent1(content, questions, isidentified) {
|
||||
if (questions && questions.length > 0) {
|
||||
if (layoutStyle == 1) {//Compressed
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(div_question);
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var q = questions[i];
|
||||
if (ignoreQuestion(q, isidentified)) continue;
|
||||
|
||||
var tr_question = $('<tr style="width:100%;"></tr>');
|
||||
div_question.append(tr_question);
|
||||
tr_question.append($('<td style="width:33%;"></td>').text(q.DisplayText));
|
||||
var td_answer = $('<td style="width:33%;"></td>');
|
||||
tr_question.append(td_answer);
|
||||
createAnswerContent(td_answer, q);
|
||||
createAnswerContent(td_answer, q, isidentified);
|
||||
var td_comment = $('<td style="width:33%;"></td>');
|
||||
tr_question.append(td_comment);
|
||||
var comment = td_answer.data('comment');
|
||||
if (comment && comment != "") {
|
||||
td_comment.append($('<div class="answer"></div>').html(replaceHtmlText(comment)));
|
||||
}
|
||||
|
||||
if (q.IsImportant && layoutHighlightColor)
|
||||
tr_question.css('background-color', layoutHighlightColor);
|
||||
tr_question.css('color', layoutHighlightColor);
|
||||
}
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
@ -495,16 +490,18 @@ function createQuestionContent1(content, questions) {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
div_question.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
else if (layoutStyle == 2) {//Split
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(div_question);
|
||||
var tr_question = "";
|
||||
var qindex = 0;
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var q = questions[i];
|
||||
if (i % 2 == 0) {
|
||||
if (ignoreQuestion(q, isidentified)) continue;
|
||||
|
||||
if (qindex % 2 == 0) {
|
||||
tr_question = $('<tr style="width:100%;"></tr>');
|
||||
div_question.append(tr_question);
|
||||
}
|
||||
@ -512,13 +509,15 @@ function createQuestionContent1(content, questions) {
|
||||
tr_question.append(td_question);
|
||||
var td_answer = $('<td style="width:25%;"></td>');
|
||||
tr_question.append(td_answer);
|
||||
createAnswerContent(td_answer, q);
|
||||
createAnswerContent(td_answer, q, isidentified);
|
||||
if (q.IsImportant && layoutHighlightColor) {
|
||||
td_question.css('background-color', layoutHighlightColor);
|
||||
td_answer.css('background-color', layoutHighlightColor);
|
||||
td_question.css('color', layoutHighlightColor);
|
||||
td_answer.css('color', layoutHighlightColor);
|
||||
}
|
||||
|
||||
qindex++;
|
||||
}
|
||||
if (questions.length % 2 != 0) {
|
||||
if (qindex % 2 != 0) {
|
||||
tr_question.append($('<td style="width:25%;"></td><td style="width:25%;"></td>'));
|
||||
}
|
||||
if (layoutDivider == 1)//Line
|
||||
@ -526,16 +525,21 @@ function createQuestionContent1(content, questions) {
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
|
||||
div_question.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var q = questions[i];
|
||||
var div_question = $('<div class="question"></div>');
|
||||
content.append(div_question);
|
||||
if (ignoreQuestion(q, isidentified)) continue;
|
||||
|
||||
var tab_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(tab_question);
|
||||
var tr_question = $('<tr style="width:100%;"></tr>');
|
||||
tab_question.append(tr_question);
|
||||
var td_question = $('<td style="width:100%;"></td>');
|
||||
tr_question.append(td_question);
|
||||
var div_question = $('<div class="question"></div>');
|
||||
td_question.append(div_question);
|
||||
var div_title = $('<div style="width:320px;flex-grow:1;"></div>').text(q.DisplayText);
|
||||
div_question.append(div_title);
|
||||
if (q.StaticPictures && q.StaticPictures.length > 0) {
|
||||
@ -544,18 +548,23 @@ function createQuestionContent1(content, questions) {
|
||||
div_question.append(div_pic)
|
||||
}
|
||||
|
||||
createAnswerContent(content, q);
|
||||
tr_question = $('<tr style="width:100%;"></tr>');
|
||||
tab_question.append(tr_question);
|
||||
var td_answer = $('<td style="width:100%;"></td>');
|
||||
tr_question.append(td_answer);
|
||||
createAnswerContent(td_answer, q, isidentified);
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
tab_question.addClass('question_standard_table_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_div_grid');
|
||||
tab_question.addClass('question_standard_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
tab_question.css('line-height', layoutSpacing == 1 ? '32px' : '16px');
|
||||
|
||||
if (q.IsImportant && layoutHighlightColor)
|
||||
div_question.css('background-color', layoutHighlightColor);
|
||||
if (q.IsImportant && layoutHighlightColor) {
|
||||
tab_question.css('color', layoutHighlightColor);
|
||||
div_question.css('color', layoutHighlightColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -564,38 +573,12 @@ function createQuestionContent1(content, questions) {
|
||||
if (layoutStyle == 1 || layoutStyle == 2) {
|
||||
div_answer.addClass('table_content');
|
||||
}
|
||||
else {
|
||||
var isimportant = div_answer.data('isimportant');
|
||||
if (isimportant && layoutHighlightColor)
|
||||
div_answer.css('background-color', layoutHighlightColor);
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_answer.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_answer.addClass('question_div_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_answer.css('line-height', '30px');
|
||||
}
|
||||
});
|
||||
content.find('.div_media').each(function () {
|
||||
var div_media = $(this);
|
||||
if (layoutStyle == 1 || layoutStyle == 2) {
|
||||
div_media.css('padding-left', '3px');
|
||||
}
|
||||
else {
|
||||
var isimportant = div_media.data('isimportant');
|
||||
if (isimportant && layoutHighlightColor)
|
||||
div_media.css('background-color', layoutHighlightColor);
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_media.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_media.addClass('question_div_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_media.css('line-height', '30px');
|
||||
}
|
||||
});
|
||||
}
|
||||
return content;
|
||||
@ -612,8 +595,39 @@ function createPictures(pictures, p) {
|
||||
}
|
||||
return p;
|
||||
}
|
||||
function ignoreQuestion(q, isidentified) {
|
||||
var ignore = false;
|
||||
if (q.QuestionType == 10 || (q.QuestionType == 15 && q.SubType == 15)) {//Picture
|
||||
var hasPicture = false;
|
||||
if (reportdata && reportdata.Answers) {
|
||||
for (var i = 0; i < reportdata.Answers.length; i++) {
|
||||
var a = reportdata.Answers[i];
|
||||
if (a.QuestionId.toLowerCase() == q.Id.toLowerCase()) {
|
||||
if (reportdata.Medias && reportdata.Medias.length > 0) {
|
||||
for (var j = 0; j < reportdata.Medias.length; j++) {
|
||||
var m = reportdata.Medias[j];
|
||||
if (m.AnswerId.toLowerCase() == a.Id.toLowerCase()) {
|
||||
if (layoutPicturesDisplay == 1)//Displayed At Bottom
|
||||
{
|
||||
if (isidentified == false)
|
||||
mediasdata.push(m);
|
||||
}
|
||||
else
|
||||
hasPicture = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ignore = !hasPicture;
|
||||
}
|
||||
else
|
||||
ignore = false;
|
||||
return ignore;
|
||||
}
|
||||
|
||||
function createAnswerContent(p, q) {
|
||||
function createAnswerContent(p, q, isidentified) {
|
||||
var leveltext = showSeverityLevel(q.SeverityLevel);
|
||||
var label_level = $('<label class="label_level"></label>').text(leveltext);
|
||||
if (reportdata && reportdata.Answers) {
|
||||
@ -638,16 +652,19 @@ function createAnswerContent(p, q) {
|
||||
var div_answer = $('<div class="answer"></div>').data('isimportant', q.IsImportant);
|
||||
if (q.QuestionType == 1
|
||||
|| (q.QuestionType == 15 && q.SubType == 14))
|
||||
p.append(div_answer.html(replaceHtmlText(result))).append("<div style='clear:both;'></div>");
|
||||
p.append(div_answer.html(replaceHtmlText(result)));
|
||||
else if (q.QuestionType == 17 && q.TextToCompare != null && result.toLowerCase() != q.TextToCompare.toLowerCase()) // BarCodeValidate
|
||||
p.append(div_answer
|
||||
.append($('<span style="color:red"></span>').text(result))
|
||||
.append($('<span style="margin-left:6px"></span>').text('(' + q.TextToCompare + ')'))
|
||||
).append("<div style='clear:both;'></div>");
|
||||
);
|
||||
else
|
||||
p.append(div_answer.text(result)).append("<div style='clear:both;'></div>");
|
||||
p.append(div_answer.text(result));
|
||||
|
||||
div_answer.append(label_level);
|
||||
p.append(item);
|
||||
if (layoutStyle == 0)
|
||||
p.append("<div style='clear:both;'></div>");
|
||||
}
|
||||
else if (q.QuestionType == 5) {//YesOrNo
|
||||
if (a.SelectedItems && a.SelectedItems.length > 0) {
|
||||
@ -662,7 +679,10 @@ function createAnswerContent(p, q) {
|
||||
if (a.SelectedItems[0].BackgroundColor && a.SelectedItems[0].BackgroundColor != "") {
|
||||
div_bg.css('background-color', a.SelectedItems[0].BackgroundColor);
|
||||
}
|
||||
p.append(item).append("<div style='clear:both;'></div>");
|
||||
|
||||
p.append(item);
|
||||
if (layoutStyle == 0)
|
||||
p.append("<div style='clear:both;'></div>");
|
||||
}
|
||||
}
|
||||
else if (q.QuestionType == 8 || q.QuestionType == 9//DropDown、List
|
||||
@ -682,7 +702,10 @@ function createAnswerContent(p, q) {
|
||||
if (a.SelectedItems[j].BackgroundColor && a.SelectedItems[j].BackgroundColor != "") {
|
||||
div_bg.css('background-color', a.SelectedItems[j].BackgroundColor);
|
||||
}
|
||||
p.append(item).append("<div style='clear:both;'></div>");
|
||||
|
||||
p.append(item);
|
||||
if (layoutStyle == 0)
|
||||
p.append("<div style='clear:both;'></div>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -699,7 +722,9 @@ function createAnswerContent(p, q) {
|
||||
if (a.SelectedItems[0].BackgroundColor && a.SelectedItems[0].BackgroundColor != "") {
|
||||
div_bg.css('background-color', a.SelectedItems[0].BackgroundColor);
|
||||
}
|
||||
p.append(item).append("<div style='clear:both;'></div>");
|
||||
p.append(item);
|
||||
if (layoutStyle == 0)
|
||||
p.append("<div style='clear:both;'></div>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -726,7 +751,10 @@ function createAnswerContent(p, q) {
|
||||
var m = reportdata.Medias[j];
|
||||
if (m.AnswerId.toLowerCase() == a.Id.toLowerCase()) {
|
||||
if (layoutPicturesDisplay == 1)//Displayed At Bottom
|
||||
mediasdata.push(m);
|
||||
{
|
||||
if (isidentified == false)
|
||||
mediasdata.push(m);
|
||||
}
|
||||
else {//Displayed As Taken
|
||||
var media = createMedias(m);
|
||||
pics.append(media);
|
||||
@ -745,8 +773,10 @@ function createAnswerContent(p, q) {
|
||||
if (a.SelectedItems[0].BackgroundColor && a.SelectedItems[0].BackgroundColor != "") {
|
||||
div_bg.css('background-color', a.SelectedItems[0].BackgroundColor);
|
||||
}
|
||||
p.append(divanswer).append("<div style='clear:both;'></div>");
|
||||
|
||||
p.append(divanswer);
|
||||
if (layoutStyle == 0)
|
||||
p.append("<div style='clear:both;'></div>");
|
||||
}
|
||||
divanswer.append(label_level);
|
||||
if (layoutPicturesDisplay != 1) {//Displayed At Bottom
|
||||
@ -758,7 +788,10 @@ function createAnswerContent(p, q) {
|
||||
var m = reportdata.Medias[j];
|
||||
if (m.AnswerId.toLowerCase() == a.Id.toLowerCase()) {
|
||||
if (layoutPicturesDisplay == 1)//Displayed At Bottom
|
||||
mediasdata.push(m);
|
||||
{
|
||||
if (isidentified == false)
|
||||
mediasdata.push(m);
|
||||
}
|
||||
else {//Displayed As Taken
|
||||
var media = createMedias(m);
|
||||
pics.append(media);
|
||||
@ -767,17 +800,21 @@ function createAnswerContent(p, q) {
|
||||
}
|
||||
}
|
||||
if (a.Result && a.Result != "") {
|
||||
p.append($('<div class="answer" style="color:#808080"></div>').data('isimportant', q.IsImportant).html(replaceHtmlText(a.Result)));
|
||||
var divresult = $('<div class="answer"></div>').data('isimportant', q.IsImportant).html(replaceHtmlText(a.Result));
|
||||
p.append(divresult);
|
||||
if (q.IsImportant && layoutHighlightColor)
|
||||
divresult.css('color', layoutHighlightColor);
|
||||
}
|
||||
}
|
||||
if (layoutStyle != 1 && layoutStyle != 2 && a.Comment && a.Comment != "") {
|
||||
p.append($('<div class="answer" style="color:#808080"></div>').data('isimportant', q.IsImportant).html(replaceHtmlText(a.Comment)));
|
||||
var divcomment = $('<div class="answer" style="color:#808080"></div>').data('isimportant', q.IsImportant).html(replaceHtmlText(a.Comment));
|
||||
p.append(divcomment);
|
||||
if (q.IsImportant && layoutHighlightColor)
|
||||
divcomment.css('color', layoutHighlightColor);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
p.append($('<div class="answer"></div>').text(""));
|
||||
|
||||
|
||||
//public string Id { get; set; }
|
||||
@ -811,7 +848,6 @@ function createAnswerContent(p, q) {
|
||||
//如果AssetStatus类型,result存的是notes
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function convertUnits(u) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
//spectrum: "../../js/spectrum"
|
||||
},
|
||||
waitSeconds: 0,
|
||||
urlArgs: "v=38" //+ Math.random()
|
||||
urlArgs: "v=39" //+ Math.random()
|
||||
})
|
||||
|
||||
requirejs(['modules/inspects/editinspection'], function (EditModule) {
|
||||
|
Reference in New Issue
Block a user