.
This commit is contained in:
@ -214,12 +214,12 @@
|
||||
function showRightPopup(state) {
|
||||
if (state) {
|
||||
$('#content').css('overflow', 'hidden');
|
||||
$("#mask_bg").show();
|
||||
showmaskbg(true);
|
||||
$("#right_popup").css("left", $("#set_left").width()).show();
|
||||
}
|
||||
else {
|
||||
$('#content').css('overflow', '');
|
||||
$("#mask_bg").hide();
|
||||
showmaskbg(false);
|
||||
$("#right_popup").hide();
|
||||
}
|
||||
}
|
||||
@ -355,7 +355,7 @@
|
||||
{ name: 'UID', caption: GetTextByKey("P_IPT_CONTACTNAME", "Contact Name"), valueIndex: 'UID', css: { 'width': 320, 'text-align': 'left' } },
|
||||
//{ name: 'ContactType', caption: GetTextByKey("P_IPT_CONTACTTYPE", "Contact Type"), valueIndex: 'ContactType', css: { 'width': 148, 'text-align': 'left' } },
|
||||
//{ name: 'Text', caption: GetTextByKey("P_MV_TEXT", "Text"), valueIndex: 'Text', type: 3, css: { 'width': 45, 'text-align': 'center' } },
|
||||
{ name: 'Selected', caption: GetTextByKey("P_IPT_EMAIL", "Email"), valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } }
|
||||
{ name: 'Selected', caption: GetTextByKey("P_IPT_EMAIL", "Email"), valueIndex: 'Selected', type: 3, css: { 'width': 60, 'text-align': 'center' } }
|
||||
];
|
||||
var columns = [];
|
||||
// head
|
||||
@ -428,7 +428,7 @@
|
||||
GetFuelReport();
|
||||
|
||||
$('#dialog_sendemail').dialog(function () {
|
||||
$('#mask_bg').hide();
|
||||
showmaskbg(false);
|
||||
});
|
||||
|
||||
$('#sendlocation_search').bind('input propertychange', function () {
|
||||
@ -510,6 +510,7 @@
|
||||
emails.push(m);
|
||||
}
|
||||
}
|
||||
emails = emails.sort(function (a, b) { return (b.Selected ? 1 : 0) - (a.Selected ? 1 : 0) })
|
||||
showEmailList(emails);
|
||||
}
|
||||
}
|
||||
@ -526,9 +527,8 @@
|
||||
|
||||
$('#sendlocation_otheremailaddress').val('');
|
||||
$('#sendlocation_desc').val('');
|
||||
$('#mask_bg').show();
|
||||
$('#dialog_sendemail .dialog-title span.title').text(GetTextByKey("P_IPT_SENDEMAIL", 'Send Email'));
|
||||
//$('#mask_bg').show();
|
||||
showmaskbg(true);
|
||||
$('#dialog_sendemail')
|
||||
.attr('act', 'edit')
|
||||
.css({
|
||||
@ -546,7 +546,7 @@
|
||||
function onSendEmail() {
|
||||
if (grid_dtemail.source.length == 0) {
|
||||
$('#dialog_sendemail').hideDialog();
|
||||
$('#mask_bg').hide();
|
||||
showmaskbg(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -570,7 +570,7 @@
|
||||
|
||||
if (emailaddress.length == 0) {
|
||||
$('#dialog_sendemail').hideDialog();
|
||||
$('#mask_bg').hide();
|
||||
showmaskbg(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -582,7 +582,7 @@
|
||||
else {
|
||||
//showAlert(GetTextByKey("P_IPT_MESSAGESENT", 'Message sent.'), GetTextByKey("P_IPT_SENDEMAIL", 'Send Email'));
|
||||
$('#dialog_sendemail').hideDialog();
|
||||
$('#mask_bg').hide();
|
||||
showmaskbg(false);
|
||||
}
|
||||
|
||||
}, function (err) {
|
||||
|
@ -96,11 +96,11 @@
|
||||
|
||||
function showRightPopup(state) {
|
||||
if (state) {
|
||||
$("#mask_bg").show();
|
||||
showmaskbg(true);
|
||||
$("#right_popup").css("left", $("#set_left").width()).show();
|
||||
}
|
||||
else {
|
||||
$("#mask_bg").hide();
|
||||
showmaskbg(false);
|
||||
$("#right_popup").hide();
|
||||
}
|
||||
}
|
||||
@ -122,6 +122,34 @@
|
||||
iframe.contentWindow.print();
|
||||
}
|
||||
|
||||
function openPrintFrame(rid) {
|
||||
if (navigator.userAgent.indexOf('Firefox') >= 0 ||
|
||||
navigator.userAgent.indexOf('Opera') >= 0) {
|
||||
setTimeout(function () {
|
||||
window.open("Inspection.aspx?rt=f&t=2&id=" + rid + "&team=" + (teamintelligence ? 1 : 0), '_blank');
|
||||
});
|
||||
}
|
||||
else {
|
||||
var frame = $("<iframe style='display:none;'></iframe>");
|
||||
$(document.body).after(frame);
|
||||
frame.attr('src', "Inspection.aspx?rt=f&t=2&id=" + rid);
|
||||
frame.on('load', function () {
|
||||
setTimeout(function () {
|
||||
frame[0].contentWindow.print();
|
||||
});
|
||||
setTimeout(function () {
|
||||
frame.remove();
|
||||
}, 60000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function openDownloadFrame(rid) {
|
||||
setTimeout(function () {
|
||||
window.open("Inspection.aspx?rt=f&t=1&id=" + rid + "&team=" + (teamintelligence ? 1 : 0), '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
function createSubMenus(items) {
|
||||
var maintenancesubmenu = $("#inspectsubmenu").empty();
|
||||
var ulsubmenus = $('<ul class="lefttitlemenu_ul" style="line-height:32px;"></ul>');
|
||||
@ -145,8 +173,8 @@
|
||||
return;
|
||||
}
|
||||
var items = [{ ID: 'templates/0', Title: GetTextByKey("P_DRAFT", "Draft") },
|
||||
{ ID: 'templates/1', Title: GetTextByKey("P_PUBLISHED", "Published") },
|
||||
{ ID: 'layouts/0', Title: GetTextByKey("P_LAYOUTS", "Layouts") }];
|
||||
{ ID: 'templates/1', Title: GetTextByKey("P_PUBLISHED", "Published") },
|
||||
{ ID: 'layouts/0', Title: GetTextByKey("P_LAYOUTS", "Layouts") }];
|
||||
createSubMenus(items);
|
||||
|
||||
var left = $(this).offset().left;
|
||||
@ -172,7 +200,7 @@
|
||||
return;
|
||||
}
|
||||
var items = [{ ID: 'exportpackages', Title: GetTextByKey("P_IPT_EXPORTPACKAGES", "Export Packages") },
|
||||
{ ID: 'importpackages', Title: GetTextByKey("P_IPT_IMPORTPACKAGES", "Import Packages") }];
|
||||
{ ID: 'importpackages', Title: GetTextByKey("P_IPT_IMPORTPACKAGES", "Import Packages") }];
|
||||
createSubMenus(items);
|
||||
|
||||
var left = $(this).offset().left;
|
||||
@ -190,6 +218,25 @@
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav_temparrow').click(function () {
|
||||
var flag = !$('#nav_temparrow').prop('isexpanded');
|
||||
var left_flag = !$('#set_left').prop('isexpanded');
|
||||
$('#nav_temparrow').stop()
|
||||
.prop('isexpanded', flag);
|
||||
if (flag)
|
||||
$('#set_left').find(".tempdesign").show();
|
||||
else
|
||||
$('#set_left').find(".tempdesign").hide();
|
||||
|
||||
if (left_flag)
|
||||
$('#span_tempdesign').hide();
|
||||
|
||||
$('#nav_temparrow div').attr('class', 'icn')
|
||||
.addClass(flag ? 'expand' : 'collapse');
|
||||
});
|
||||
|
||||
$('#nav_temparrow').click();
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@ -199,9 +246,44 @@
|
||||
<li id="nav_arrow">
|
||||
<div class="icn collapse"></div>
|
||||
</li>
|
||||
<%if (ShowReport)
|
||||
{%>
|
||||
<li class="nav_item" data-module="inspections" data-title-lgid="P_INSPECTIONS"><a href="#inspections">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-report"></em>
|
||||
</div>
|
||||
<span data-lgid="P_INSPECTIONS">Inspections</span></a>
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowFuelLog)
|
||||
{%>
|
||||
<li class="nav_item" data-module="fuellog" data-title-lgid="P_IPT_FUELLOG"><a href="#fuellog">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-fuellog"></em>
|
||||
</div>
|
||||
<span data-lgid="P_IPT_FUELLOG">Fuel Log</span></a>
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowReport || ShowFuelLog)
|
||||
{%>
|
||||
<li style="height: 10px;">
|
||||
<hr style="background-color: #d8d8d8; border: none; height: 1px;" />
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowGlobalSections || ShowTemplate)
|
||||
{%>
|
||||
<li id="nav_temparrow">
|
||||
<div class="icn expand"></div>
|
||||
<span id="span_tempdesign" class="subitem" data-lgid="P_XXX" style="margin-left: 15px; font-weight: bold;">Template Design</span>
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowGlobalSections)
|
||||
{%>
|
||||
<li class="nav_item" data-module="globalsections" data-title-lgid="P_GLOBALSECTIONS"><a href="#globalsections">
|
||||
<li class="nav_item tempdesign" data-module="globalsections" data-title-lgid="P_GLOBALSECTIONS"><a href="#globalsections" style="padding-left: 10px;">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-sections"></em>
|
||||
</div>
|
||||
@ -210,23 +292,23 @@
|
||||
<%} %>
|
||||
<%if (ShowTemplate)
|
||||
{%>
|
||||
<li class="nav_item" data-title-lgid="P_TEMPLATES"><a id="atemplates">
|
||||
<li id="litem" class="nav_item tempdesign" data-title-lgid="P_TEMPLATES"><a id="atemplates" style="padding-left: 10px;">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-templates"></em>
|
||||
</div>
|
||||
<span data-lgid="P_TEMPLATES">Templates</span></a>
|
||||
</li>
|
||||
<li class="nav_item subitem" data-module="templates/0" data-title-lgid="P_DRAFT" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/0">
|
||||
<li class="nav_item subitem tempdesign" data-module="templates/0" data-title-lgid="P_DRAFT" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/0">
|
||||
<div style="width: 64px;">
|
||||
</div>
|
||||
<span style="color: #666;" data-lgid="P_DRAFT">Draft</span></a>
|
||||
</li>
|
||||
<li class="nav_item subitem" data-module="templates/1" data-title-lgid="P_PUBLISHED" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/1">
|
||||
<li class="nav_item subitem tempdesign" data-module="templates/1" data-title-lgid="P_PUBLISHED" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/1">
|
||||
<div style="width: 64px;">
|
||||
</div>
|
||||
<span style="color: #666;" data-lgid="P_PUBLISHED">Published</span></a>
|
||||
</li>
|
||||
<li class="nav_item subitem" data-module="layouts/0" data-title-lgid="P_LAYOUTS" style="height: 32px; line-height: 32px; display: none;"><a href="#layouts/0">
|
||||
<li class="nav_item subitem tempdesign" data-module="layouts/0" data-title-lgid="P_LAYOUTS" style="height: 32px; line-height: 32px; display: none;"><a href="#layouts/0">
|
||||
<div style="width: 64px;">
|
||||
</div>
|
||||
<span style="color: #666;" data-lgid="P_LAYOUTS">Layouts</span></a>
|
||||
@ -256,32 +338,6 @@
|
||||
</li>
|
||||
<%} %>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowReport || ShowFuelLog)
|
||||
{%>
|
||||
<li style="height: 10px;">
|
||||
<hr style="background-color: #d8d8d8; border: none; height: 1px;" />
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowReport)
|
||||
{%>
|
||||
<li class="nav_item" data-module="inspections" data-title-lgid="P_INSPECTIONS"><a href="#inspections">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-report"></em>
|
||||
</div>
|
||||
<span data-lgid="P_INSPECTIONS">Inspections</span></a>
|
||||
</li>
|
||||
<%} %>
|
||||
<%if (ShowFuelLog)
|
||||
{%>
|
||||
<li class="nav_item" data-module="fuellog" data-title-lgid="P_IPT_FUELLOG"><a href="#fuellog">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-fuellog"></em>
|
||||
</div>
|
||||
<span data-lgid="P_IPT_FUELLOG">Fuel Log</span></a>
|
||||
</li>
|
||||
<%} %>
|
||||
</ul>
|
||||
<div class="hostmask maskbg" style="display: none;"></div>
|
||||
</div>
|
||||
@ -297,7 +353,9 @@
|
||||
<div class="trigle white" style="left: -12px; right: auto;"></div>
|
||||
</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; left: 250px; top: 0; right: 0; bottom: 0; background-color: white; overflow: auto;">
|
||||
</div>
|
||||
<div id="right_popup1" style="display: none; position: absolute; left: 250px; top: 0; right: 0; bottom: 0; background-color: white; overflow: auto;"></div>
|
||||
|
@ -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,33 @@
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.question_line {
|
||||
border-collapse: collapse;
|
||||
border-top: 1px solid #dbdbdb;
|
||||
border-bottom: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_table_grid {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.question_table_grid td {
|
||||
border: 1px solid #dbdbdb;
|
||||
}
|
||||
|
||||
.question_div_grid {
|
||||
border: 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>
|
||||
@ -196,12 +232,12 @@
|
||||
function showRightPopup(state) {
|
||||
if (state) {
|
||||
$('#content').css('overflow', 'hidden');
|
||||
$("#mask_bg").show();
|
||||
showmaskbg(true);
|
||||
$("#right_popup").css("left", $("#set_left").width()).show();
|
||||
}
|
||||
else {
|
||||
$('#content').css('overflow', '');
|
||||
$("#mask_bg").hide();
|
||||
showmaskbg(false);
|
||||
$("#right_popup").hide();
|
||||
}
|
||||
}
|
||||
@ -249,7 +285,19 @@
|
||||
<span id="spPrint" 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;">
|
||||
<img id="reportlayoutlogo" style="width: 100px; margin-top: 5px; display: none;" />
|
||||
<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">
|
||||
@ -362,7 +410,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>
|
||||
|
@ -196,12 +196,12 @@
|
||||
function showRightPopup(state) {
|
||||
if (state) {
|
||||
$('#content').css('overflow', 'hidden');
|
||||
$("#mask_bg").show();
|
||||
showmaskbg(true);
|
||||
$("#right_popup").css("left", $("#set_left").width()).show();
|
||||
}
|
||||
else {
|
||||
$('#content').css('overflow', '');
|
||||
$("#mask_bg").hide();
|
||||
showmaskbg(false);
|
||||
$("#right_popup").hide();
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@
|
||||
var ShowTemplate =<%=ShowTemplate ?"true":"false"%>;
|
||||
var ShowReport =<%=ShowReport ?"true":"false"%>;
|
||||
var ReportReadonly =<%=ReportReadonly ?"true":"false"%>;
|
||||
var IsCustomerRecord = false;
|
||||
var IsCustomerRecord = false;
|
||||
|
||||
function inspectionrequest(method, param, callback, error) {
|
||||
_network.request("Inspection/Inspection.aspx", -1, method, param, callback, error || function (e) {
|
||||
@ -89,11 +89,11 @@
|
||||
|
||||
function showRightPopup(state) {
|
||||
if (state) {
|
||||
$("#mask_bg").show();
|
||||
showmaskbg(true);
|
||||
$("#right_popup").css("left", $("#set_left").width()).show();
|
||||
}
|
||||
else {
|
||||
$("#mask_bg").hide();
|
||||
showmaskbg(false);
|
||||
$("#right_popup").hide();
|
||||
}
|
||||
}
|
||||
@ -115,6 +115,34 @@
|
||||
iframe.contentWindow.print();
|
||||
}
|
||||
|
||||
function openPrintFrame(rid) {
|
||||
if (navigator.userAgent.indexOf('Firefox') >= 0 ||
|
||||
navigator.userAgent.indexOf('Opera') >= 0) {
|
||||
setTimeout(function () {
|
||||
window.open("Inspection.aspx?rt=f&t=2&id=" + rid + "&team=" + (teamintelligence ? 1 : 0), '_blank');
|
||||
});
|
||||
}
|
||||
else {
|
||||
var frame = $("<iframe style='display:none;'></iframe>");
|
||||
$(document.body).after(frame);
|
||||
frame.attr('src', "Inspection.aspx?rt=f&t=2&id=" + rid);
|
||||
frame.on('load', function () {
|
||||
setTimeout(function () {
|
||||
frame[0].contentWindow.print();
|
||||
});
|
||||
setTimeout(function () {
|
||||
frame.remove();
|
||||
}, 60000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function openDownloadFrame(rid) {
|
||||
setTimeout(function () {
|
||||
window.open("Inspection.aspx?rt=f&t=1&id=" + rid + "&team=" + (teamintelligence ? 1 : 0), '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
function createSubMenus(items) {
|
||||
var maintenancesubmenu = $("#inspectsubmenu").empty();
|
||||
var ulsubmenus = $('<ul class="lefttitlemenu_ul" style="line-height:32px;"></ul>');
|
||||
@ -183,6 +211,26 @@
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav_temparrow').click(function () {
|
||||
var flag = !$('#nav_temparrow').prop('isexpanded');
|
||||
var left_flag = !$('#set_left').prop('isexpanded');
|
||||
$('#nav_temparrow').stop()
|
||||
.prop('isexpanded', flag);
|
||||
if (flag)
|
||||
$('#set_left').find(".tempdesign").show();
|
||||
else
|
||||
$('#set_left').find(".tempdesign").hide();
|
||||
|
||||
if (left_flag)
|
||||
$('#span_tempdesign').hide();
|
||||
|
||||
$('#nav_temparrow div').attr('class', 'icn')
|
||||
.addClass(flag ? 'expand' : 'collapse');
|
||||
});
|
||||
|
||||
$('#nav_temparrow').click();
|
||||
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@ -192,9 +240,35 @@
|
||||
<li id="nav_arrow">
|
||||
<div class="icn collapse"></div>
|
||||
</li>
|
||||
|
||||
<%if (ShowReport)
|
||||
{%>
|
||||
<li class="nav_item" data-module="inspections" data-title-lgid="P_INSPECTIONS"><a href="#inspections">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-report"></em>
|
||||
</div>
|
||||
<span data-lgid="P_INSPECTIONS">Inspections</span></a>
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowReport)
|
||||
{%>
|
||||
<li style="height: 10px;">
|
||||
<hr style="background-color: #d8d8d8; border: none; height: 1px;" />
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (IsSupperAdmin || ShowTemplate)
|
||||
{%>
|
||||
<li id="nav_temparrow">
|
||||
<div class="icn expand"></div>
|
||||
<span id="span_tempdesign" class="subitem" data-lgid="P_XXX" style="margin-left: 15px; font-weight: bold;">Template Design</span>
|
||||
</li>
|
||||
<%} %>
|
||||
|
||||
<%if (IsSupperAdmin)
|
||||
{%>
|
||||
<li class="nav_item" data-module="globalsections" data-title-lgid="P_GLOBALSECTIONS"><a href="#globalsections">
|
||||
<li class="nav_item tempdesign" data-module="globalsections" data-title-lgid="P_GLOBALSECTIONS"><a href="#globalsections" style="padding-left: 10px;">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-sections"></em>
|
||||
</div>
|
||||
@ -203,23 +277,23 @@
|
||||
<%} %>
|
||||
<%if (ShowTemplate)
|
||||
{%>
|
||||
<li class="nav_item" data-title-lgid="P_TEMPLATES"><a id="atemplates">
|
||||
<li class="nav_item tempdesign" data-title-lgid="P_TEMPLATES"><a id="atemplates" style="padding-left: 10px;">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-templates"></em>
|
||||
</div>
|
||||
<span data-lgid="P_TEMPLATES">Templates</span></a>
|
||||
</li>
|
||||
<li class="nav_item subitem" data-module="templates/0" data-title-lgid="P_DRAFT" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/0">
|
||||
<li class="nav_item subitem tempdesign" data-module="templates/0" data-title-lgid="P_DRAFT" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/0">
|
||||
<div style="width: 64px;">
|
||||
</div>
|
||||
<span style="color: #666;" data-lgid="P_DRAFT">Draft</span></a>
|
||||
</li>
|
||||
<li class="nav_item subitem" data-module="templates/1" data-title-lgid="Published" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/1">
|
||||
<li class="nav_item subitem tempdesign" data-module="templates/1" data-title-lgid="Published" style="height: 32px; line-height: 32px; display: none;"><a href="#templates/1">
|
||||
<div style="width: 64px;">
|
||||
</div>
|
||||
<span style="color: #666;" data-lgid="P_PUBLISHED">Published</span></a>
|
||||
</li>
|
||||
<li class="nav_item subitem" data-module="layouts/1" data-title-lgid="P_LAYOUTS" style="height: 32px; line-height: 32px; display: none;"><a href="#layouts/1">
|
||||
<li class="nav_item subitem tempdesign" data-module="layouts/1" data-title-lgid="P_LAYOUTS" style="height: 32px; line-height: 32px; display: none;"><a href="#layouts/1">
|
||||
<div style="width: 64px;">
|
||||
</div>
|
||||
<span style="color: #666;" data-lgid="P_LAYOUTS">Layouts</span></a>
|
||||
@ -249,16 +323,6 @@
|
||||
</li>
|
||||
<%} %>
|
||||
<%} %>
|
||||
|
||||
<%if (ShowReport)
|
||||
{%>
|
||||
<li class="nav_item" data-module="inspections" data-title-lgid="P_INSPECTIONS"><a href="#inspections">
|
||||
<div>
|
||||
<em class="fa icon-menu icon-report"></em>
|
||||
</div>
|
||||
<span data-lgid="P_INSPECTIONS">Inspections</span></a>
|
||||
</li>
|
||||
<%} %>
|
||||
</ul>
|
||||
<div class="hostmask maskbg" style="display: none;"></div>
|
||||
</div>
|
||||
|
@ -14,11 +14,13 @@
|
||||
.section-holder {
|
||||
background: #e9e9e9;
|
||||
font-size: 16px;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
.section-holder:hover {
|
||||
background-color: #d9d9d9;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.section-holder:hover {
|
||||
background-color: #d9d9d9;
|
||||
}
|
||||
|
||||
.section-input {
|
||||
padding: 2px 6px;
|
||||
min-height: 20px;
|
||||
@ -27,30 +29,36 @@
|
||||
border: 1px solid #e9e9e9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.section-input:hover{
|
||||
border: 1px solid #666;
|
||||
}
|
||||
.section-input:disabled{
|
||||
background: rgba(255,255,255,0);
|
||||
border-color: rgba(255,255,255,0);
|
||||
}
|
||||
|
||||
.section-input:hover {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
.section-input:disabled {
|
||||
background: rgba(255,255,255,0);
|
||||
border-color: rgba(255,255,255,0);
|
||||
}
|
||||
|
||||
|
||||
.question-holder .question-icon,
|
||||
.section-holder .section-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.question-holder .question-icon em {
|
||||
/*cursor: row-resize;*/
|
||||
/*margin-left: 6px;*/
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.question-holder .question-icon em {
|
||||
/*cursor: row-resize;*/
|
||||
/*margin-left: 6px;*/
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.holder-even {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.question-holder:hover {
|
||||
background-color: #d9d9d9;
|
||||
}
|
||||
|
||||
.question-input {
|
||||
padding: 2px 6px;
|
||||
min-height: 20px;
|
||||
@ -58,17 +66,21 @@
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.question-input:hover {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
.question-input:disabled {
|
||||
background: rgba(255,255,255,0);
|
||||
border-color: rgba(255,255,255,0);
|
||||
}
|
||||
|
||||
.question-input:hover {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
.question-input:disabled {
|
||||
background: rgba(255,255,255,0);
|
||||
border-color: rgba(255,255,255,0);
|
||||
}
|
||||
|
||||
.question-holder .question-notes {
|
||||
flex-grow: 1;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.question-holder .question-name span:hover,
|
||||
.question-holder .template-name span:hover,
|
||||
.question-holder .question-display span:hover,
|
||||
@ -77,6 +89,7 @@
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.question-holder .question-cell,
|
||||
.section-holder .section-cell {
|
||||
display: inline-block;
|
||||
@ -84,23 +97,29 @@
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.question-holder .question-cell.fa,
|
||||
.section-holder .section-cell .fa {
|
||||
line-height: 40px;
|
||||
}
|
||||
.question-holder .question-cell.value-true::before {
|
||||
content: '\f00c';
|
||||
}
|
||||
.section-holder .section-cell .add {
|
||||
cursor: pointer;
|
||||
}
|
||||
.section-holder .section-cell .add::before {
|
||||
content: '\f0fe';
|
||||
}
|
||||
|
||||
.question-holder .question-cell.fa,
|
||||
.section-holder .section-cell .fa {
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.question-holder .question-cell.value-true::before {
|
||||
content: '\f00c';
|
||||
}
|
||||
|
||||
.section-holder .section-cell .add {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.section-holder .section-cell .add::before {
|
||||
content: '\f0fe';
|
||||
}
|
||||
|
||||
.rowdrag {
|
||||
font-size: 14px;
|
||||
cursor:move;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
/*display: block;
|
||||
width: 100%;*/
|
||||
@ -137,6 +156,7 @@
|
||||
flex-direction: row;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.editor-top > span {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@ -146,14 +166,14 @@
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.editor-toolbar a[data-edit],
|
||||
.svg-button {
|
||||
display: inline-block;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
.editor-toolbar a[data-edit],
|
||||
.svg-button {
|
||||
display: inline-block;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.editor-toolbar a[data-edit] > svg,
|
||||
.svg-button > svg {
|
||||
@ -206,4 +226,26 @@
|
||||
.img-icon-filename {
|
||||
max-width: 100px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.img-icon-centerfilename {
|
||||
max-width: 100px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.img-icon-rightfilename {
|
||||
max-width: 100px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
|
||||
.select-layout-name {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.select-layout {
|
||||
border: 1px solid #a9a9a9;
|
||||
margin-left: 4px;
|
||||
width: 100px;
|
||||
height: 18px;
|
||||
}
|
||||
|
@ -81,7 +81,6 @@ define(function () {
|
||||
};
|
||||
|
||||
$.fn.showDialog = function (selfmask) {
|
||||
//$('#mask_bg').height($(document).outerHeight(false)).width($(document).outerWidth(false));
|
||||
if (this.attr("init") !== "1") {
|
||||
this.attr("init", "1");
|
||||
var _this = this;
|
||||
@ -92,7 +91,6 @@ define(function () {
|
||||
this.before(mask);
|
||||
}
|
||||
$(window).resize(function () {
|
||||
//_this.height(_this.parent().outerHeight(false) - 64).width(_this.parent().outerWidth(false) - left - 2);
|
||||
if (_this.mask)
|
||||
_this.mask.height($(document).outerHeight(false) - 64).width($(document).outerWidth(false));
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ require.config({
|
||||
//spectrum: "../../js/spectrum"
|
||||
},
|
||||
waitSeconds: 0,
|
||||
urlArgs: "v=437" //+ Math.random()
|
||||
urlArgs: "v=455" //+ Math.random()
|
||||
})
|
||||
|
||||
requirejs(['modules/pageloader'], function (loader) {
|
||||
@ -25,8 +25,9 @@ requirejs(['modules/pageloader'], function (loader) {
|
||||
.animate({ 'width': flag ? 250 : 50 }, ANIMATION_DURATION)
|
||||
//.find('li a').css('display', flag ? 'none' : '')
|
||||
;
|
||||
if (flag)
|
||||
if (flag) {
|
||||
$('#set_left').find(".subitem").show();
|
||||
}
|
||||
else
|
||||
$('#set_left').find(".subitem").hide();
|
||||
|
||||
|
@ -188,16 +188,15 @@ define([], function () {
|
||||
};
|
||||
var p = [false, htmlencode(JSON.stringify(item))];
|
||||
inspectionrequest('UpdateFuelReportHeaderFooter', JSON.stringify(p), function (r) {
|
||||
loading.hide();
|
||||
if (r == 'OK') {
|
||||
showAlert(GetTextByKey("P_MV_SAVSUCCESSFULLY", 'Saved successfully.'), alerttitle, null, function () {
|
||||
loading.fadeOut(100);
|
||||
if (exit) {
|
||||
showRightPopup(false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
showAlert(GetTextByKey("P_IPT_FUELRPT_SAVEERROR", 'Failed to save fuel report page settings.'), alerttitle, null, function () {
|
||||
loading.fadeOut(100);
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
|
@ -46,12 +46,12 @@ define(['modules/sections/section', 'modules/sections/addsection'], function (Se
|
||||
dataheader.append('<div style="width:60px; flex-shrink: 0"></div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 200px">' + GetTextByKey("P_IPT_NAME", "Name") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 310px">' + GetTextByKey("P_IPT_DISPLAYTEXT", "Display Text") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 420px">' + GetTextByKey("P_IPT_TYPE", "Type") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 400px">' + GetTextByKey("P_IPT_TYPE", "Type") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 80px; text-align: center">' + GetTextByKey("P_IPT_REQUIRED", "Required") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 100px; text-align: center">' + GetTextByKey("P_IPT_CANCOMMENT", "Can Comment") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 100px; text-align: center">' + GetTextByKey("P_IPT_ISIMPORTANT", "Is Important") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 140px">' + GetTextByKey("P_IPT_CUSTOMERVISIBLE", "Customer Visible") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 140px">' + GetTextByKey("P_IPT_SEVERITYLEVEL", "Severity Level") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 65px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_XXX", "Include Comment") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 70px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_ISIMPORTANT", "Is Important") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 70px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_CUSTOMERVISIBLE", "Customer Visible") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 80px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_SEVERITYLEVEL", "Severity Level") + '</div>');
|
||||
dataheader.append('<div style="flex-grow: 1" style="width: 160px">' + GetTextByKey("P_IPT_NOTES", "Notes") + '</div>');
|
||||
if (sectiontype === 0)
|
||||
dataheader.append('<div class="question-cell" style="width: 120px;">' + GetTextByKey("P_IPT_CREATEDBY", "Created By") + '</div>');
|
||||
|
@ -27,7 +27,7 @@
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
var list_columns = [
|
||||
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 30, 'text-align': 'center' } },
|
||||
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
|
||||
{ name: 'TemplateName', caption: GetTextByKey("P_TEMPLATE", "Template"), valueIndex: 'Name', css: { 'width': 320, 'text-align': 'left' } },
|
||||
{ name: 'AssetName', caption: GetTextByKey("P_IPT_NOTES", "Notes"), valueIndex: 'Notes', css: { 'width': 400, 'text-align': 'left' } }
|
||||
];
|
||||
@ -84,7 +84,7 @@
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
var list_columns = [
|
||||
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 30, 'text-align': 'center' } },
|
||||
{ name: 'Selected', caption: "", valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } },
|
||||
{ name: 'SectionName', caption: GetTextByKey("P_IPT_SECTION", "Section"), valueIndex: 'ItemName', css: { 'width': 320, 'text-align': 'left' } },
|
||||
{ name: 'AssetName', caption: GetTextByKey("P_IPT_NOTES", "Notes"), valueIndex: 'Notes', css: { 'width': 400, 'text-align': 'left' } }
|
||||
];
|
||||
@ -247,10 +247,12 @@
|
||||
this.content = content;
|
||||
var funcs = $('<div class="function_title"></div>');
|
||||
var btn = $('<span class="sbutton iconsave">' + GetTextByKey('P_IPT_IMPORT', 'Import') + '</span>').click(function () {
|
||||
showConfirm(GetTextByKey("P_IPT_DOYOUWANTTOOVERWRITETHEITEMSWHICHHAVEANEWERVERSION", 'Do you want to overwrite the items which have a higher version?'), GetTextByKey("P_IPT_IMPORTPACKAGE", 'Import Package'), function () {
|
||||
showConfirmYesNoCancel(GetTextByKey("P_IPT_DOYOUWANTTOOVERWRITETHEITEMSWHICHHAVEANEWERVERSION", 'Do you want to overwrite the items which have a higher version?'), GetTextByKey("P_IPT_IMPORTPACKAGE", 'Import Package'), function () {
|
||||
onImport(_this, 1);
|
||||
}, function () {
|
||||
onImport(_this, 0);
|
||||
}, function () {
|
||||
return;
|
||||
});
|
||||
});
|
||||
funcs.append(btn);
|
||||
|
@ -85,6 +85,33 @@ define(['modules/inspects/inspect', 'modules/inspects/editinspection'], function
|
||||
}
|
||||
});
|
||||
func.append(iconResetPivots);
|
||||
|
||||
var iconprints = $('<span class="sbutton iconprint">' + GetTextByKey("P_IPT_XXXXXX", "Print") + '</span>').click(function () {
|
||||
for (var i = 0; i < grid_dt.source.length; i++) {
|
||||
var inspect = grid_dt.source[i].Values;
|
||||
if (inspect.Selected) {
|
||||
if (navigator.userAgent.indexOf('Firefox') >= 0 ||
|
||||
navigator.userAgent.indexOf('Opera') >= 0) {
|
||||
window.open("Inspection.aspx?rt=f&t=2&id=" + inspect.Id + "&team=" + (teamintelligence ? 1 : 0), '_blank');
|
||||
}
|
||||
else
|
||||
openPrintFrame(inspect.Id);
|
||||
}
|
||||
}
|
||||
});
|
||||
func.append(iconprints);
|
||||
|
||||
var icondownloads = $('<span class="sbutton icondownload">' + GetTextByKey("P_IPT_XXXXXX", "Download") + '</span>').click(function () {
|
||||
for (var i = 0; i < grid_dt.source.length; i++) {
|
||||
var inspect = grid_dt.source[i].Values;
|
||||
if (inspect.Selected) {
|
||||
openDownloadFrame(inspect.Id);
|
||||
}
|
||||
}
|
||||
});
|
||||
func.append(icondownloads);
|
||||
|
||||
|
||||
header.append(func)
|
||||
|
||||
return header;
|
||||
@ -121,7 +148,18 @@ define(['modules/inspects/inspect', 'modules/inspects/editinspection'], function
|
||||
{ name: 'Print', caption: "", css: { 'width': 30, 'text-align': 'center' } },
|
||||
{ name: 'ViewChangeHistory', caption: "", css: { 'width': 30, 'text-align': 'center' } }
|
||||
];
|
||||
var columns = [];
|
||||
var columns = [
|
||||
{
|
||||
// checkbox
|
||||
name: 'check',
|
||||
key: 'Selected',
|
||||
width: 45,
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
allcheck: true,
|
||||
type: 3
|
||||
}
|
||||
];
|
||||
// head
|
||||
for (var hd in list_columns) {
|
||||
var col = {};
|
||||
@ -246,7 +284,7 @@ define(['modules/inspects/inspect', 'modules/inspects/editinspection'], function
|
||||
if (item.Id === "")
|
||||
return htmldecode(item.WorkOrderNumber);
|
||||
|
||||
var div = $('<div class="dropdown" style="width: 200px;"></div>');
|
||||
var div = $('<div class="dropdown" style="width: 185px;"></div>');
|
||||
div.dropdown(item.WorkOrders || [{ Id: -1, WorkOrderNumber: "Not Assigned" }], {
|
||||
search: false,
|
||||
textKey: 'WorkOrderNumber',
|
||||
|
@ -273,7 +273,7 @@
|
||||
$('<option value="[Model]">Model</option>'),
|
||||
$('<option value="[VIN]">VIN/SN</option>'),
|
||||
$('<option value="[Work_Order_Number]">Work Order Number</option>'),
|
||||
$('<option value="[Work_Order_Type]">Work Order Type</option>'),
|
||||
$('<option value="[Work_Order_Type]">Work Order Type</option>'),
|
||||
$('<option value="[Parts_Order_Number]">Parts Order Number</option>'),
|
||||
$('<option value="[Year]">Year</option>')
|
||||
);
|
||||
@ -318,9 +318,12 @@
|
||||
}
|
||||
|
||||
function editLayout(info) {
|
||||
$('#right_popup').load('js/modules/layouts/addlayout.html?v=2', function () {
|
||||
$('#right_popup').load('js/modules/layouts/addlayout.html?v=5', function () {
|
||||
var modified = false;
|
||||
var deleteIcon = false;
|
||||
var deleteCenterIcon = false;
|
||||
var deleteRightIcon = false;
|
||||
initColorCtrl();
|
||||
var content = $(this).applyFleetLanguageText(true);
|
||||
content.find('.button-exit').on('click', function () {
|
||||
if (modified) {
|
||||
@ -342,7 +345,7 @@
|
||||
}
|
||||
});
|
||||
content.find('.button-icon-upload').on('click', function () {
|
||||
content.find('.icon-file file').remove();
|
||||
content.find('.icon-file input[type="file"]').remove();
|
||||
$('<input type="file" accept="image/png,image/jpeg" />')
|
||||
.hide().appendTo(content.find('.icon-file'))
|
||||
.on('change', function () {
|
||||
@ -365,7 +368,78 @@
|
||||
content.find('.button-icon-delete').on('click', function () {
|
||||
deleteIcon = true;
|
||||
content.find('.img-icon-filename').remove();
|
||||
content.find('.icon-file input[type="file"]').remove();
|
||||
});
|
||||
|
||||
content.find('.button-icon-centerupload').on('click', function () {
|
||||
content.find('.icon-centerfile input[type="file"]').remove();
|
||||
$('<input type="file" accept="image/png,image/jpeg" />')
|
||||
.hide().appendTo(content.find('.icon-centerfile'))
|
||||
.on('change', function () {
|
||||
if (!/image\/\w+/.test(this.files[0].type)) {
|
||||
showAlert(GetTextByKey("P_LAYOUT_UPLOADICONTIPS", 'The file type for the logo is invalid. The file must be JPG or PNG.'), GetTextByKey('P_LAYOUT_SAVEINSPECTLAYOUT', 'Save Inspection Layout'));
|
||||
$(this).remove();
|
||||
return;
|
||||
}
|
||||
var file = this.files[0];
|
||||
var reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = function (e) {
|
||||
setTimeout(function () {
|
||||
content.find('.img-icon-centerfilename').remove();
|
||||
$('<img class="img-icon-centerfilename" />').attr('src', e.target.result).insertAfter(content.find('.icon-centerfile-title'));
|
||||
});
|
||||
};
|
||||
}).click();
|
||||
});
|
||||
content.find('.button-icon-centerdelete').on('click', function () {
|
||||
deleteCenterIcon = true;
|
||||
content.find('.img-icon-centerfilename').remove();
|
||||
content.find('.icon-centerfile input[type="file"]').remove();
|
||||
});
|
||||
|
||||
content.find('.button-icon-rightupload').on('click', function () {
|
||||
content.find('.icon-rightfile input[type="file"]').remove();
|
||||
$('<input type="file" accept="image/png,image/jpeg" />')
|
||||
.hide().appendTo(content.find('.icon-rightfile'))
|
||||
.on('change', function () {
|
||||
if (!/image\/\w+/.test(this.files[0].type)) {
|
||||
showAlert(GetTextByKey("P_LAYOUT_UPLOADICONTIPS", 'The file type for the logo is invalid. The file must be JPG or PNG.'), GetTextByKey('P_LAYOUT_SAVEINSPECTLAYOUT', 'Save Inspection Layout'));
|
||||
$(this).remove();
|
||||
return;
|
||||
}
|
||||
var file = this.files[0];
|
||||
var reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = function (e) {
|
||||
setTimeout(function () {
|
||||
content.find('.img-icon-rightfilename').remove();
|
||||
$('<img class="img-icon-rightfilename" />').attr('src', e.target.result).insertAfter(content.find('.icon-rightfile-title'));
|
||||
});
|
||||
};
|
||||
}).click();
|
||||
});
|
||||
content.find('.button-icon-rightdelete').on('click', function () {
|
||||
deleteRightIcon = true;
|
||||
content.find('.img-icon-rightfilename').remove();
|
||||
content.find('.icon-rightfile input[type="file"]').remove();
|
||||
});
|
||||
|
||||
content.find('#layout-style').on('change', function () {
|
||||
var style = $('#layout-style').val();
|
||||
if (parseInt(style) === 2) {
|
||||
$('#layout-picturesdisplay').val(1);
|
||||
$('#layout-picturesdisplay').prop('disabled', true);
|
||||
}
|
||||
else {
|
||||
$('#layout-picturesdisplay').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
content.find('#layout-highlightcolor-input').keyup(null, function () {
|
||||
$("#layout-highlightcolor-selector").spectrum("set", $('#layout-highlightcolor-input').val());
|
||||
})
|
||||
|
||||
|
||||
var save = function (exit) {
|
||||
return function () {
|
||||
var title = GetTextByKey('P_LAYOUT_SAVEINSPECTLAYOUT', 'Save Inspection Layout');
|
||||
@ -379,20 +453,26 @@
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
var layout = {
|
||||
Id: info && info.Id,
|
||||
Target: layouts.isteam ? 1 : 0,
|
||||
Name: name,
|
||||
IncludeLOGO: content.find('#layout-include-logo').prop('checked'),
|
||||
Notes: content.find('.text-layout-notes').val(),
|
||||
PageHeaderLeft: content.find('.layout-headers-left .editor-content').val(),
|
||||
PageHeaderCenter: content.find('.layout-headers-middle .editor-content').val(),
|
||||
PageHeaderRight: content.find('.layout-headers-right .editor-content').val(),
|
||||
PageFooterLeft: content.find('.layout-footers-left .editor-content').val(),
|
||||
PageFooterCenter: content.find('.layout-footers-middle .editor-content').val(),
|
||||
PageFooterRight: content.find('.layout-footers-right .editor-content').val()
|
||||
PageFooterRight: content.find('.layout-footers-right .editor-content').val(),
|
||||
Style: content.find('#layout-style').val(),
|
||||
Spacing: content.find('#layout-spacing').val(),
|
||||
PicturesDisplay: content.find('#layout-picturesdisplay').val(),
|
||||
CaptionImages: content.find('#layout-captionimages').prop('checked'),
|
||||
Divider: content.find('#layout-divider').val(),
|
||||
HighlightColor: content.find('#layout-highlightcolor-input').val()
|
||||
};
|
||||
if (layout.Style === "")
|
||||
layout.Style = -1;
|
||||
var data = new FormData();
|
||||
var files = content.find('.icon-file input[type="file"]').prop('files');
|
||||
if (files && files[0]) {
|
||||
@ -401,6 +481,23 @@
|
||||
var logo = content.find('.img-icon-filename').prop('src');
|
||||
layout.LOGO = logo.substr(logo.indexOf(';base64,') + 8);
|
||||
}
|
||||
|
||||
var centerfiles = content.find('.icon-centerfile input[type="file"]').prop('files');
|
||||
if (centerfiles && centerfiles[0]) {
|
||||
data.append('iconCenterFile', centerfiles && centerfiles[0]);
|
||||
} else if (!deleteCenterIcon) {
|
||||
var logo = content.find('.img-icon-centerfilename').prop('src');
|
||||
layout.CenterLOGO = logo.substr(logo.indexOf(';base64,') + 8);
|
||||
}
|
||||
|
||||
var rightfiles = content.find('.icon-rightfile input[type="file"]').prop('files');
|
||||
if (rightfiles && rightfiles[0]) {
|
||||
data.append('iconRightFile', rightfiles && rightfiles[0]);
|
||||
} else if (!deleteRightIcon) {
|
||||
var logo = content.find('.img-icon-rightfilename').prop('src');
|
||||
layout.RightLOGO = logo.substr(logo.indexOf(';base64,') + 8);
|
||||
}
|
||||
|
||||
data.append('MethodName', 'SaveInspectLayout');
|
||||
data.append('ClientData', encodeURIComponent(JSON.stringify(layout)));
|
||||
$.ajax({
|
||||
@ -459,10 +556,15 @@
|
||||
var onchange = function () { modified = true };
|
||||
if (info != null) {
|
||||
content.find('.text-layout-name').val(info.Name);
|
||||
content.find('#layout-include-logo').prop('checked', info.IncludeLOGO);
|
||||
if (info.LOGO != null) {
|
||||
content.find('.img-icon-filename').attr('src', 'data:image/png;base64,' + info.LOGO);
|
||||
}
|
||||
if (info.CenterLOGO != null) {
|
||||
content.find('.img-icon-centerfilename').attr('src', 'data:image/png;base64,' + info.CenterLOGO);
|
||||
}
|
||||
if (info.RightLOGO != null) {
|
||||
content.find('.img-icon-rightfilename').attr('src', 'data:image/png;base64,' + info.RightLOGO);
|
||||
}
|
||||
content.find('.text-layout-notes').val(info.Notes);
|
||||
content.find('.layout-headers-left .editor-content').val(info.PageHeaderLeft);
|
||||
content.find('.layout-headers-middle .editor-content').val(info.PageHeaderCenter);
|
||||
@ -470,9 +572,17 @@
|
||||
content.find('.layout-footers-left .editor-content').val(info.PageFooterLeft);
|
||||
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-spacing').val(info.Spacing);
|
||||
content.find('#layout-picturesdisplay').val(info.PicturesDisplay);
|
||||
content.find('#layout-captionimages').prop('checked', info.CaptionImages);
|
||||
content.find('#layout-divider').val(info.Divider);
|
||||
content.find('#layout-highlightcolor-input').val(info.HighlightColor);
|
||||
content.find('#layout-highlightcolor-selector').spectrum("set", info.HighlightColor);
|
||||
}
|
||||
content.find('.text-layout-name').on('change', onchange);
|
||||
content.find('#layout-include-logo').on('change', onchange);
|
||||
//content.find('#layout-style').on('change', onchange);
|
||||
content.find('.text-layout-notes').on('change', onchange);
|
||||
content.find('.layout-headers-left .editor-content').on('change', onchange);
|
||||
content.find('.layout-headers-middle .editor-content').on('change', onchange);
|
||||
@ -480,6 +590,12 @@
|
||||
content.find('.layout-footers-left .editor-content').on('change', onchange);
|
||||
content.find('.layout-footers-middle .editor-content').on('change', onchange);
|
||||
content.find('.layout-footers-right .editor-content').on('change', onchange);
|
||||
content.find('#layout-style').on('change', onchange);
|
||||
content.find('#layout-spacing').on('change', onchange);
|
||||
content.find('#layout-picturesdisplay').on('change', onchange);
|
||||
content.find('#layout-captionimages').on('change', onchange);
|
||||
content.find('#layout-divider').on('change', onchange);
|
||||
content.find('#layout-highlightcolor-input').on('change', onchange);
|
||||
|
||||
content.find('.text-layout-name').focus();
|
||||
});
|
||||
@ -509,5 +625,59 @@
|
||||
}
|
||||
});
|
||||
|
||||
function initColorCtrl() {
|
||||
$('#layout-highlightcolor-selector').spectrum({
|
||||
allowEmpty: true,
|
||||
color: "#FFF",
|
||||
showInput: true,
|
||||
containerClassName: "full-spectrum",
|
||||
showInitial: true,
|
||||
showPalette: true,
|
||||
showSelectionPalette: true,
|
||||
showAlpha: true,
|
||||
maxPaletteSize: 10,
|
||||
preferredFormat: "hex",
|
||||
localStorageKey: "spectrum.demo",
|
||||
chooseText: GetTextByKey("P_IPT_OK", "OK"),
|
||||
cancelText: GetTextByKey("P_IPT_CANCEL", "Cancel"),
|
||||
clearText: GetTextByKey("P_SPECTRUM_CLEARCOLORSELECTION", "Clear Color Selection"),
|
||||
noColorSelectedText: GetTextByKey("P_SPECTRUM_NOCOLORSELECTED", "No Color Selected"),
|
||||
move: function (color) {
|
||||
if (color)
|
||||
$('#layout-highlightcolor-input').val(color.toHexString().toUpperCase()); // #ff0000
|
||||
},
|
||||
show: function () {
|
||||
|
||||
},
|
||||
beforeShow: function () {
|
||||
|
||||
},
|
||||
hide: function (color) {
|
||||
if (color) {
|
||||
$('#layout-highlightcolor-input').val(color.toHexString().toUpperCase()); // #ff0000
|
||||
}
|
||||
},
|
||||
|
||||
palette: [
|
||||
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", /*"rgb(153, 153, 153)","rgb(183, 183, 183)",*/
|
||||
"rgb(204, 204, 204)", "rgb(217, 217, 217)", /*"rgb(239, 239, 239)", "rgb(243, 243, 243)",*/ "rgb(255, 255, 255)"],
|
||||
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||
/*"rgb(133, 32, 12)", "rgb(153, 0, 0)", "rgb(180, 95, 6)", "rgb(191, 144, 0)", "rgb(56, 118, 29)",
|
||||
"rgb(19, 79, 92)", "rgb(17, 85, 204)", "rgb(11, 83, 148)", "rgb(53, 28, 117)", "rgb(116, 27, 71)",*/
|
||||
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
return layouts;
|
||||
});
|
@ -8,30 +8,74 @@
|
||||
<span class="sbutton iconexit button-exit" data-lgid="P_IPT_SAVE2">Exit Without Saving</span>
|
||||
</div>
|
||||
<div class="page_title" data-lgid="P_LAYOUT_GENERAL">General</div>
|
||||
<div style="display: flex">
|
||||
<div class="settings-line">
|
||||
<span>
|
||||
<span data-lgid="P_LAYOUT_NAMECOLON">Layout Name:</span>
|
||||
<b style="color: red">*</b>
|
||||
<input type="text" class="text-layout-name" maxlength="200" />
|
||||
</span>
|
||||
<span>
|
||||
<label for="layout-include-logo" data-lgid="P_LAYOUT_INCLUDELOGO">Include Logo:</label>
|
||||
<input type="checkbox" id="layout-include-logo" />
|
||||
</span>
|
||||
<div class="settings-line">
|
||||
<span>
|
||||
<span data-lgid="P_LAYOUT_NAMECOLON">Layout Name:</span>
|
||||
<b style="color: red">*</b>
|
||||
<input type="text" class="text-layout-name" maxlength="200" />
|
||||
|
||||
<label data-lgid="P_LAYOUT_XXX" class="select-layout-name">Style:</label>
|
||||
<select id="layout-style" class="select-layout">
|
||||
<option value="0">Standard</option>
|
||||
<option value="1">Compressed</option>
|
||||
<option value="2">Split</option>
|
||||
</select>
|
||||
</span>
|
||||
<span>
|
||||
<span class="icon-file">
|
||||
<span class="icon-file-title" data-lgid="P_LAYOUT_ICONFILENAME">Logo file:</span>
|
||||
<span class="icon-file-title" data-lgid="P_LAYOUT_XX">Left Logo file:</span>
|
||||
<img class="img-icon-filename" />
|
||||
<span class="svg-button button-icon-upload"><svg><use href="#symbol-upload"></use></svg></span>
|
||||
<span class="svg-button button-icon-delete"><svg><use href="#symbol-close"></use></svg></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="settings-line" style="flex: 1 1 auto">
|
||||
<span style="display: flex">
|
||||
<span data-lgid="P_LAYOUT_NOTESCOLON" style="vertical-align:top; white-space:nowrap">Notes:</span>
|
||||
<textarea class="text-layout-notes" style="height:100px; width:100%; box-sizing:border-box; margin-left:8px"></textarea>
|
||||
<span class="icon-centerfile" style="margin-left:30px;">
|
||||
<span class="icon-centerfile-title" data-lgid="P_LAYOUT_XXX">Center Logo file:</span>
|
||||
<img class="img-icon-centerfilename" />
|
||||
<span class="svg-button button-icon-centerupload"><svg><use href="#symbol-upload"></use></svg></span>
|
||||
<span class="svg-button button-icon-centerdelete"><svg><use href="#symbol-close"></use></svg></span>
|
||||
</span>
|
||||
</div>
|
||||
<span class="icon-rightfile" style="margin-left:30px;">
|
||||
<span class="icon-rightfile-title" data-lgid="P_LAYOUT_XXX">Right Logo file:</span>
|
||||
<img class="img-icon-rightfilename" />
|
||||
<span class="svg-button button-icon-rightupload"><svg><use href="#symbol-upload"></use></svg></span>
|
||||
<span class="svg-button button-icon-rightdelete"><svg><use href="#symbol-close"></use></svg></span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span style="display: flex">
|
||||
<span data-lgid="P_LAYOUT_NOTESCOLON" style="vertical-align:top; white-space:nowrap">Notes:</span>
|
||||
<textarea class="text-layout-notes" style="height:100px; width:100%; box-sizing:border-box; margin-left:8px"></textarea>
|
||||
</span>
|
||||
</div>
|
||||
<div class="page_title" data-lgid="P_LAYOUT_XXX">Options</div>
|
||||
<div class="settings-line">
|
||||
<span>
|
||||
<span data-lgid="P_LAYOUT_XXX">Spacing:</span>
|
||||
<select id="layout-spacing" class="select-layout">
|
||||
<option value="0" data-lgid="P_XXX">Single Space</option>
|
||||
<option value="1" data-lgid="P_XXX">Double Space</option>
|
||||
</select>
|
||||
|
||||
<span data-lgid="P_LAYOUT_XXX" class="select-layout-name">Pictures:</span>
|
||||
<select id="layout-picturesdisplay" class="select-layout" style="width:140px;">
|
||||
<option value="0" data-lgid="P_XXX">Displayed As Taken</option>
|
||||
<option value="1" data-lgid="P_XXX">Displayed At Bottom</option>
|
||||
</select>
|
||||
|
||||
<span data-lgid="P_LAYOUT_XXX" class="select-layout-name">Caption Images:</span>
|
||||
<input type="checkbox" id="layout-captionimages" />
|
||||
|
||||
<span data-lgid="P_LAYOUT_XXX" class="select-layout-name">Divider:</span>
|
||||
<select id="layout-divider" class="select-layout" style="width:80px;">
|
||||
<option value="0" data-lgid="P_XXX">None</option>
|
||||
<option value="1" data-lgid="P_XXX">Line</option>
|
||||
<option value="2" data-lgid="P_XXX">Grid</option>
|
||||
</select>
|
||||
|
||||
<span data-lgid="P_LAYOUT_XXX" class="select-layout-name">VIP Questions/Section Highlight Color:</span>
|
||||
<input id="layout-highlightcolor-input" style="width:60px;" maxlength="7" />
|
||||
<input id="layout-highlightcolor-selector" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="page_title" data-lgid="P_IPT_FUELRPT_HEADER">Page Headers</div>
|
||||
|
@ -83,7 +83,7 @@ define(['common'], function (Common) {
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label">' + GetTextByKey("P_IPT_NAME_COLON", "Name:") + '<span class="redasterisk">*</span></td>');
|
||||
namecontrol = $('<input type="text" maxlength="100"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(namecontrol, _this.question);
|
||||
});
|
||||
@ -93,7 +93,7 @@ define(['common'], function (Common) {
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label">' + GetTextByKey("P_IPT_DISPLAYTEXT_COLON", "Display Text:") + '<span class="redasterisk">*</span></td>');
|
||||
displaytextcontrol = $('<input type="text" maxlength="1000" />');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(displaytextcontrol, _this.question);
|
||||
});
|
||||
@ -141,7 +141,7 @@ define(['common'], function (Common) {
|
||||
tr = $('<tr></tr>');
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label">Notes:</td>');
|
||||
notescontrol = $('<textarea id="dialog_notes" class="inputbox" maxlength="1000" style="width: 400px; margin-top: 6px;"></textarea>');
|
||||
notescontrol = $('<textarea id="dialog_notes" maxlength="1000" style="width: 400px; margin-top: 6px;"></textarea>');
|
||||
tr.append($('<td></td>').append(notescontrol));
|
||||
|
||||
return div_main;
|
||||
@ -187,7 +187,7 @@ define(['common'], function (Common) {
|
||||
tb.append(tr);
|
||||
var optext = $('<input type="text" style="width:240px;margin-left:5px;"/>');
|
||||
this.dialog_text = optext;
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(optext, _this.question);
|
||||
});
|
||||
|
@ -82,7 +82,7 @@ define(['common'], function (Common) {
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label" style="vertical-align:middle;">' + GetTextByKey("P_IPT_DISPLAYTEXT_COLON", "Display Text:") + '<span class="redasterisk">*</span></td>');
|
||||
displaytextcontrol = $('<input type="text" maxlength="200" autocomplete="off"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(displaytextcontrol, _this.section);
|
||||
});
|
||||
@ -91,7 +91,7 @@ define(['common'], function (Common) {
|
||||
tr = $('<tr></tr>');
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label">' + GetTextByKey("P_IPT_NOTES_COLON", "Notes:") + '</td>');
|
||||
notescontrol = $('<textarea id="dialog_notes" class="inputbox" maxlength="500" autocomplete="off" style="width: 400px; margin-top: 6px;"></textarea>');
|
||||
notescontrol = $('<textarea id="dialog_notes" maxlength="500" autocomplete="off" style="width: 400px; margin-top: 6px;"></textarea>');
|
||||
tr.append($('<td></td>').append(notescontrol));
|
||||
|
||||
return div_main;
|
||||
|
@ -48,7 +48,7 @@
|
||||
tb.append(tr);
|
||||
var optext = $('<input type="text" class="form-control" style="width:226px;margin-left:5px;"/>');
|
||||
this.dialog_text = optext;
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(optext);
|
||||
});
|
||||
|
@ -64,7 +64,7 @@ define(['modules/sections/addquestion', 'modules/sections/option', 'common', 'mo
|
||||
|
||||
if (this.index % 2 == 1)
|
||||
qholder.addClass('holder-even');
|
||||
var drag = $('<div class="question-icon" style="width:30px;"><em class="spanbtn iconmove rowdrag"></em></div>');
|
||||
var drag = $('<div class="question-icon" style="width:30px;" title="' + GetTextByKey("P_IPT_XXX", "Move Question") + '"><em class="spanbtn iconmove rowdrag"></em></div>');
|
||||
qholder.append(drag);
|
||||
if (!_this.section.IsLink && sectiontype == 1) {
|
||||
drag.attr('draggable', true);
|
||||
@ -108,14 +108,14 @@ define(['modules/sections/addquestion', 'modules/sections/option', 'common', 'mo
|
||||
|
||||
qholder.append('<div class="question-icon" style="width:30px;"><em class="fa"></em></div>');
|
||||
_this.txtName = $('<input type="text" class="question-input" maxlength="100" autocomplete="off" style="width:146px;" />');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(_this.txtName, _this.question);
|
||||
});
|
||||
qholder.append($('<div class="question-cell question-name" style="width: 190px;padding-left:10px;"></div>').append(this.txtName).append(addiText));
|
||||
|
||||
_this.txtDisplayText = $('<input type="text" class="question-input" maxlength="200" autocomplete="off" style="width:236px;" />');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(_this.txtDisplayText, _this.question);
|
||||
});
|
||||
@ -137,16 +137,16 @@ define(['modules/sections/addquestion', 'modules/sections/option', 'common', 'mo
|
||||
qholder.append($('<div class="question-cell question-required" style="width: 80px; text-align: center"></div>').append(this.chkIsRequired));
|
||||
|
||||
_this.chkCanComment = $('<input type="checkbox" />');
|
||||
qholder.append($('<div class="question-cell question-comment" style="width: 100px; text-align: center"></div>').append(this.chkCanComment));
|
||||
qholder.append($('<div class="question-cell question-comment" style="width: 65px; text-align: center"></div>').append(this.chkCanComment));
|
||||
|
||||
_this.chkIsImportant = $('<input type="checkbox" />');
|
||||
qholder.append($('<div class="question-cell question-important" style="width: 100px; text-align: center"></div>').append(this.chkIsImportant));
|
||||
qholder.append($('<div class="question-cell question-important" style="width: 70px; text-align: center"></div>').append(this.chkIsImportant));
|
||||
|
||||
_this.chkCustomerVisible = $('<input type="checkbox" />');
|
||||
qholder.append($('<div class="question-cell question-important" style="width: 140px; text-align: center"></div>').append(this.chkCustomerVisible));
|
||||
qholder.append($('<div class="question-cell question-important" style="width: 70px; text-align: center"></div>').append(this.chkCustomerVisible));
|
||||
|
||||
_this.selSeverityLevel = createSeverityLevel().addClass('question-input').css('width', 130);
|
||||
qholder.append($('<div class="question-cell question-security" style="width: 140px"></div>').append(this.selSeverityLevel));
|
||||
_this.selSeverityLevel = createSeverityLevel().addClass('question-input').css('width', 70);
|
||||
qholder.append($('<div class="question-cell question-security" style="width: 80px"></div>').append(this.selSeverityLevel));
|
||||
|
||||
_this.txtNotes = $('<textarea class="question-input" maxlength="500" autocomplete="off" style="width:95%;margin-top:5px;"></textarea>');
|
||||
qholder.append($('<div class="question-cell question-notes" style="width: 160px;white-space:normal;"></div>').append(this.txtNotes));
|
||||
@ -214,7 +214,7 @@ define(['modules/sections/addquestion', 'modules/sections/option', 'common', 'mo
|
||||
|
||||
td = $('<td></td>');
|
||||
tr.append(td);
|
||||
_this.btnoption = $('<span class="spanbtn iconangleleft" style="font-size:18px;"></span>');
|
||||
_this.btnoption = $('<span class="spanbtn iconangleleft" style="font-size:18px;" title="' + GetTextByKey("P_IPT_XXX","Display Options") + '"></span>');
|
||||
td.append(_this.btnoption);
|
||||
_this.btnoption.click(function () {
|
||||
var icon = $(this);
|
||||
|
@ -38,7 +38,7 @@ define(['modules/sections/question', 'modules/sections/addsection', 'modules/sec
|
||||
}
|
||||
|
||||
if (sectiontype == 1) {
|
||||
var drag = $('<div class="question-icon" style="width:30px;"><em class="spanbtn iconmove rowdrag"></em></div>');
|
||||
var drag = $('<div class="question-icon" style="width:30px;" title="' + GetTextByKey("P_IPT_XXX","Move Section") + '"><em class="spanbtn iconmove rowdrag"></em></div>');
|
||||
holder.append(drag);
|
||||
if (sectiontype == 1) {
|
||||
drag.attr('draggable', true);
|
||||
@ -106,7 +106,7 @@ define(['modules/sections/question', 'modules/sections/addsection', 'modules/sec
|
||||
this.txtName.change(function () {
|
||||
_this.onsave();
|
||||
});
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(_this.txtName, _this.section);
|
||||
});
|
||||
@ -116,7 +116,7 @@ define(['modules/sections/question', 'modules/sections/addsection', 'modules/sec
|
||||
this.txtDisplayText.change(function () {
|
||||
_this.onsave();
|
||||
});
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(_this.txtDisplayText, _this.section);
|
||||
});
|
||||
|
@ -174,7 +174,7 @@ define(['modules/templates/pages', 'modules/templates/filters', 'modules/templat
|
||||
tr = $('<tr class="templatetr"></tr>');
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label" style="width:160px;">' + GetTextByKey("P_IPT_NOTES_COLON", "Notes:") + '</td>');
|
||||
notescontrol = $('<textarea id="dialog_notes" class="inputbox form-control" maxlength="500" autocomplete="off" style="width: 540px; margin-top: 6px;height:80px;"></textarea>');
|
||||
notescontrol = $('<textarea id="dialog_notes" class="form-control" maxlength="500" autocomplete="off" style="width: 540px; margin-top: 6px;height:80px;"></textarea>');
|
||||
tr.append($('<td></td>').append(notescontrol));
|
||||
|
||||
//Email
|
||||
@ -240,7 +240,7 @@ define(['modules/templates/pages', 'modules/templates/filters', 'modules/templat
|
||||
{ name: 'UserName', caption: GetTextByKey("P_IPT_CONTACTNAME", "Contact Name"), valueIndex: 'UserName', css: { 'width': 180, 'text-align': 'left' } },
|
||||
{ name: 'ContactType', caption: GetTextByKey("P_IPT_CONTACTTYPE", "Contact Type"), valueIndex: 'ContactType', css: { 'width': 180, 'text-align': 'left' } },
|
||||
//{ name: 'Text', caption: "Text", valueIndex: 'Text', type: 3, css: { 'width': 45, 'text-align': 'center' } },
|
||||
{ name: 'Selected', caption: GetTextByKey("P_IPT_EMAIL", "Email"), valueIndex: 'Selected', type: 3, css: { 'width': 45, 'text-align': 'center' } }
|
||||
{ name: 'Selected', caption: GetTextByKey("P_IPT_EMAIL", "Email"), valueIndex: 'Selected', type: 3, css: { 'width': 60, 'text-align': 'center' } }
|
||||
];
|
||||
var columns = [];
|
||||
// head
|
||||
|
@ -28,7 +28,7 @@ define(['common'], function (Common) {
|
||||
// checkbox
|
||||
name: 'check',
|
||||
key: 'Selected',
|
||||
width: 30,
|
||||
width: 45,
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
allcheck: true,
|
||||
|
@ -28,7 +28,7 @@ define(['modules/sections/section', 'modules/sections/addsection', 'common', 'mo
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label" style="width:154px;">' + GetTextByKey("P_IPT_NAME_COLON", "Name:") + '<span class="redasterisk">*</span></td>');
|
||||
_this.namecontrol = $('<input type="text" class="form-control" maxlength="100" autocomplete="off"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
var addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(_this.namecontrol);
|
||||
});
|
||||
@ -40,14 +40,14 @@ define(['modules/sections/section', 'modules/sections/addsection', 'common', 'mo
|
||||
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label" style="width:154px;">' + GetTextByKey("P_IPT_NOTES_COLON", "Notes:") + '</td>');
|
||||
_this.notescontrol = $('<textarea id="dialog_notes" class="inputbox form-control" maxlength="500" autocomplete="off" style="width: 540px; margin-top:6px;height:55px;"></textarea>');
|
||||
_this.notescontrol = $('<textarea id="dialog_notes" class="form-control" maxlength="500" autocomplete="off" style="width: 540px; margin-top:6px;height:55px;"></textarea>');
|
||||
tr.append($('<td rowspan="2"></td>').append(_this.notescontrol));
|
||||
|
||||
tr = $('<tr></tr>');
|
||||
tb.append(tr);
|
||||
tr.append('<td class="label" style="width:154px;">' + GetTextByKey("P_IPT_DISPLAYTEXT_COLON", "Display Text:") + '<span class="redasterisk">*</span></td>');
|
||||
_this.displaytextcontrol = $('<input type="text" class="form-control" maxlength="200" autocomplete="off"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_ADDITIONALTEXTS", "Additional Texts") + '"/>');
|
||||
addiText = $('<span class="spanbtn iconmultitext" style="font-size:14px;" title="' + GetTextByKey("P_IPT_XXX", "Language Selection") + '"/>');
|
||||
addiText.click(function () {
|
||||
Common.createMultiTextDialog(_this.displaytextcontrol);
|
||||
});
|
||||
@ -65,7 +65,7 @@ define(['modules/sections/section', 'modules/sections/addsection', 'common', 'mo
|
||||
var header = $('<div></div>');
|
||||
//header.append($('<div class="page_title"></div>').text(gs.title));
|
||||
var func = $('<div class="function_title"></div>');
|
||||
var iconAdd = $('<span class="sbutton iconadd">' + GetTextByKey("P_IPT_ADD", "Add") + '</span>').click(function () {
|
||||
var iconAdd = $('<span class="sbutton iconadd">' + GetTextByKey("P_IPT_ADDSECTION", "Add Section") + '</span>').click(function () {
|
||||
//var s = new AddSection();
|
||||
//s.onsave = function (section) {
|
||||
// _this.page.Sections.push(section);
|
||||
@ -95,10 +95,10 @@ define(['modules/sections/section', 'modules/sections/addsection', 'common', 'mo
|
||||
dataheader.append('<div class="question-cell" style="width: 310px">' + GetTextByKey("P_IPT_DISPLAYTEXT", "Display Text") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 400px">' + GetTextByKey("P_IPT_TYPE", "Type") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 80px; text-align: center">' + GetTextByKey("P_IPT_REQUIRED", "Required") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 100px; text-align: center">' + GetTextByKey("P_IPT_CANCOMMENT", "Can Comment") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 100px; text-align: center">' + GetTextByKey("P_IPT_ISIMPORTANT", "Is Important") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 140px">' + GetTextByKey("P_IPT_CUSTOMERVISIBLE", "Customer Visible") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 140px">' + GetTextByKey("P_IPT_SEVERITYLEVEL", "Severity Level") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 65px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_XXX", "Include Comment") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 70px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_ISIMPORTANT", "Is Important") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 70px; text-align: center;white-space:normal;line-height:20px;"">' + GetTextByKey("P_IPT_CUSTOMERVISIBLE", "Customer Visible") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 80px; text-align: center;white-space:normal;line-height:20px;">' + GetTextByKey("P_IPT_SEVERITYLEVEL", "Severity Level") + '</div>');
|
||||
dataheader.append('<div style="flex-grow: 1" style="width: 160px">' + GetTextByKey("P_IPT_ST_NOTES", "Notes") + '</div>');
|
||||
dataheader.append('<div class="question-cell" style="width: 90px;padding-right:20px;"></div>');
|
||||
content.append(dataheader);
|
||||
|
@ -28,7 +28,7 @@ define(['common'], function (Common) {
|
||||
// checkbox
|
||||
name: 'check',
|
||||
key: 'Selected',
|
||||
width: 30,
|
||||
width: 45,
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
allcheck: true,
|
||||
|
@ -1,6 +1,14 @@
|
||||
|
||||
var vm;
|
||||
var reportdata;
|
||||
var reportlayout;
|
||||
var layoutStyle = 0;
|
||||
var layoutDivider = 0;
|
||||
var layoutSpacing = 0;
|
||||
var layoutPicturesDisplay = 0;
|
||||
var layoutCaptionImages = false;
|
||||
var layoutHighlightColor = "";
|
||||
var mediasdata = [];
|
||||
$(function () {
|
||||
$("#host_header").find(".button").remove();
|
||||
$("#spanUserName").remove();
|
||||
@ -62,11 +70,25 @@ function GetInspectionReport() {
|
||||
}
|
||||
else {
|
||||
reportdata = data;
|
||||
reportlayout = data.ReportLayout;
|
||||
if (reportlayout) {
|
||||
layoutStyle = parseInt(reportlayout.Style);
|
||||
layoutDivider = parseInt(reportlayout.Divider);
|
||||
layoutSpacing = parseInt(reportlayout.Spacing);
|
||||
layoutPicturesDisplay = parseInt(reportlayout.PicturesDisplay);
|
||||
layoutCaptionImages = reportlayout.CaptionImages;
|
||||
layoutHighlightColor = reportlayout.HighlightColor;
|
||||
if (layoutStyle == 2)
|
||||
layoutPicturesDisplay = 1;
|
||||
};
|
||||
vm.reload(data);
|
||||
showReportLayout(data.ReportLayout);
|
||||
showIdentifiedQuestions(data.IdentifiedQuestions);
|
||||
showPages(data);
|
||||
showSignature(data);
|
||||
if (layoutPicturesDisplay == 1 && mediasdata && mediasdata.length > 0) {
|
||||
showMedias();
|
||||
}
|
||||
}
|
||||
|
||||
showmaskbg(false);
|
||||
@ -77,6 +99,8 @@ function GetInspectionReport() {
|
||||
|
||||
function showReportLayout(layout) {
|
||||
$('#reportlayoutlogo').hide();
|
||||
$('#reportlayoutcenterlogo').hide();
|
||||
$('#reportlayoutrightlogo').hide();
|
||||
$('.td_pageheaderleft').html('');
|
||||
$('.td_pageheadercenter').html('');
|
||||
$('.td_pageheaderright').html('');
|
||||
@ -92,13 +116,29 @@ function showReportLayout(layout) {
|
||||
$('.td_pagefooterright').html(layout.PageFooterRight);
|
||||
|
||||
$('#reportlayoutlogo').show();
|
||||
if (layout.IncludeLOGO && layout.LOGO && layout.LOGO.length > 0) {
|
||||
$('#reportlayoutcenterlogo').show();
|
||||
$('#reportlayoutrightlogo').show();
|
||||
if (layout.LOGO && layout.LOGO.length > 0) {
|
||||
var jpeg = layout.LOGO;
|
||||
if (typeof (layout.LOGO) !== "string") {
|
||||
jpeg = arrayBufferToBase64(layout.LOGO);
|
||||
}
|
||||
$('#reportlayoutlogo').attr('src', 'data:image/png;base64,' + jpeg);
|
||||
}
|
||||
if (layout.CenterLOGO && layout.CenterLOGO.length > 0) {
|
||||
var jpeg = layout.CenterLOGO;
|
||||
if (typeof (layout.CenterLOGO) !== "string") {
|
||||
jpeg = arrayBufferToBase64(layout.CenterLOGO);
|
||||
}
|
||||
$('#reportlayoutcenterlogo').attr('src', 'data:image/png;base64,' + jpeg);
|
||||
}
|
||||
if (layout.RightLOGO && layout.RightLOGO.length > 0) {
|
||||
var jpeg = layout.RightLOGO;
|
||||
if (typeof (layout.RightLOGO) !== "string") {
|
||||
jpeg = arrayBufferToBase64(layout.RightLOGO);
|
||||
}
|
||||
$('#reportlayoutrightlogo').attr('src', 'data:image/png;base64,' + jpeg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,19 +158,7 @@ function showIdentifiedQuestions(questions) {
|
||||
var content = $('<div></div>');
|
||||
content.append($('<div class="catelog">IDENTIFIED ISSUES</div>'));
|
||||
if (questions && questions.length > 0) {
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var q = questions[i];
|
||||
var div_question = $('<div class="question"></div>');
|
||||
content.append(div_question);
|
||||
div_question.append($('<div style="width:320px;flex-grow:1;"></div>').text(q.DisplayText))
|
||||
if (q.StaticPictures && q.StaticPictures.length > 0) {
|
||||
var div_pic = $('<div style=""></div>');
|
||||
div_pic = createPictures(q.StaticPictures, div_pic);
|
||||
div_question.append(div_pic)
|
||||
}
|
||||
|
||||
createAnswerContent(content, q);
|
||||
}
|
||||
createQuestionContent1(content, questions);
|
||||
}
|
||||
else
|
||||
content.append($('<div class="question"></div>').text(GetTextByKey("P_IPT_NOQUESTIONS", 'No Questions')));
|
||||
@ -138,7 +166,11 @@ function showIdentifiedQuestions(questions) {
|
||||
$('#divquestions').append(content);
|
||||
}
|
||||
|
||||
|
||||
function showSeverityLevel(level) {
|
||||
if (layoutStyle == 1 || layoutStyle == 2)
|
||||
return "";
|
||||
|
||||
var levertext = GetTextByKey("P_IPT_SEVERITYLEVEL_COLON", "Severity Level: ");
|
||||
if (level === 0)
|
||||
levertext = "";
|
||||
@ -166,32 +198,185 @@ function showPages(report) {
|
||||
|
||||
function showSignature(report) {
|
||||
if (report && report.SignatureUrl && report.SignatureUrl != "") {
|
||||
$('#divsign').append($('<div style="border-bottom:1px solid #dbdbdb;"></div>'));
|
||||
$('#divsign').append($('<div class="catelog" style="margin-top:20px;">' + GetTextByKey("P_IPT_SIGNATURE", "Signature") + '</div>'));
|
||||
var divsign = $('#divsign');
|
||||
divsign.append($('<div class="catelog" style="margin-top:20px;">' + GetTextByKey("P_IPT_SIGNATURE", "Signature") + '</div>'));
|
||||
var div_pic = $('<div></div>');
|
||||
divsign.append(div_pic);
|
||||
var pic = $('<img style="height:320px; margin-left:70px;margin-right:10px;margin-bottom:10px;"></img>').attr('src', report.SignatureUrl);
|
||||
$('#divsign').append(pic);
|
||||
|
||||
div_pic.append(pic);
|
||||
if (layoutDivider == 1)//Line
|
||||
div_pic.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_pic.addClass('question_div_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_pic.css('line-height', '30px');
|
||||
}
|
||||
}
|
||||
|
||||
function showMedias() {
|
||||
var content = $('<div></div>');
|
||||
content.append($('<div class="catelog">Required Images</div>'));
|
||||
if (layoutStyle == 1) {//Compressed
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(div_question);
|
||||
var tr_question = "";
|
||||
for (var i = 0; i < mediasdata.length; i++) {
|
||||
var m = mediasdata[i];
|
||||
if (i % 3 == 0) {
|
||||
tr_question = $('<tr style="width:100%;"></tr>');
|
||||
div_question.append(tr_question);
|
||||
}
|
||||
|
||||
var td_pic = $('<td style="width:33%;"></td>');
|
||||
tr_question.append(td_pic);
|
||||
var piccontent = createMedias(m);
|
||||
td_pic.append(piccontent);
|
||||
}
|
||||
|
||||
var m_count = mediasdata.length % 3;
|
||||
if (m_count != 0) {
|
||||
for (var i = 0; i < 3 - m_count; i++) {
|
||||
tr_question.append($('<td style="width:33%;"></td>'));
|
||||
}
|
||||
}
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
}
|
||||
else if (layoutStyle == 2) {//Split
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(div_question);
|
||||
var tr_question = "";
|
||||
for (var i = 0; i < mediasdata.length; i++) {
|
||||
var m = mediasdata[i];
|
||||
if (i % 4 == 0) {
|
||||
tr_question = $('<tr style="width:100%;"></tr>');
|
||||
div_question.append(tr_question);
|
||||
}
|
||||
|
||||
var td_pic = $('<td style="width:25%;"></td>');
|
||||
tr_question.append(td_pic);
|
||||
var piccontent = createMedias(m);
|
||||
td_pic.append(piccontent);
|
||||
}
|
||||
|
||||
var m_count = mediasdata.length % 4;
|
||||
if (m_count != 0) {
|
||||
for (var i = 0; i < 4 - m_count; i++) {
|
||||
tr_question.append($('<td style="width:25%;"></td>'));
|
||||
}
|
||||
}
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
}
|
||||
else {
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(div_question);
|
||||
for (var i = 0; i < mediasdata.length; i++) {
|
||||
var m = mediasdata[i];
|
||||
var tr_question = $('<tr style="width:100%;"></tr>');
|
||||
div_question.append(tr_question);
|
||||
|
||||
var td_pic = $('<td style="width:100%;"></td>');
|
||||
tr_question.append(td_pic);
|
||||
var piccontent = createMedias(m);
|
||||
td_pic.append(piccontent);
|
||||
}
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
}
|
||||
|
||||
$('#divpages').append(content);
|
||||
}
|
||||
|
||||
function createMedias(m) {
|
||||
var piccontent = $('<div style="float:left;"></div>');
|
||||
if (['.mp4', '.mov'].indexOf(m.FileType.toLowerCase()) >= 0) {
|
||||
var v = $('<div class="media"><span class="video"></span></div>');
|
||||
v.click(m.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
piccontent.append(v);
|
||||
if (layoutCaptionImages) {
|
||||
var div_caption = $('<div class="mediacaption"></div>').attr('title', m.FileName);
|
||||
piccontent.append(div_caption);
|
||||
var span_caption = $('<span></span>').text(m.FileName);
|
||||
div_caption.append(span_caption);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var pic = $('<img class="media"></img>').attr('src', m.ThumbnailUrl);
|
||||
pic.click(m.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
piccontent.append(pic);
|
||||
if (layoutCaptionImages) {
|
||||
var div_caption = $('<div class="mediacaption"></div>').attr('title', m.FileName);;
|
||||
piccontent.append(div_caption);
|
||||
var span_caption = $('<span></span>').text(m.FileName);
|
||||
div_caption.append(span_caption);
|
||||
}
|
||||
}
|
||||
return piccontent;
|
||||
}
|
||||
|
||||
function createPage(page) {
|
||||
var content = $('<div style="padding:0px;"></div>');
|
||||
var divpage = $('<div class="page"></div>');
|
||||
content.append(divpage);
|
||||
if (layoutStyle == 1 || layoutStyle == 2) {
|
||||
var tabpage = $('<table class="question_table"style="width:100%;background-color:#a9a9a9" ></table>');
|
||||
content.append(tabpage);
|
||||
var trpage = $('<tr style="width:100%;text-align:center;" ></tr>');
|
||||
tabpage.append(trpage);
|
||||
var tdpage = $('<td style="width:100%;" ></td>');
|
||||
trpage.append(tdpage);
|
||||
tdpage.append($('<span></span>').text(page.DisplayText));
|
||||
|
||||
var btnpage = $('<em class="spanbtn iconangledown" style="font-size:22px;width:24px;"></em>');
|
||||
btnpage.click(function () {
|
||||
var icon = $(this);
|
||||
if (icon.hasClass('iconangleright')) {
|
||||
icon.removeClass('iconangleright').addClass('iconangledown');
|
||||
icon.parent().next().show();
|
||||
}
|
||||
else {
|
||||
icon.removeClass('iconangledown').addClass('iconangleright');
|
||||
icon.parent().next().hide();
|
||||
}
|
||||
});
|
||||
divpage.append(btnpage);
|
||||
divpage.append($('<span></span>').text(page.DisplayText));
|
||||
if (layoutDivider == 1)//Line
|
||||
tabpage.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
tabpage.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
tabpage.css('line-height', '30px');
|
||||
}
|
||||
else {
|
||||
var divpage = $('<div class="page"></div>');
|
||||
content.append(divpage);
|
||||
|
||||
var btnpage = $('<em class="spanbtn iconangledown" style="font-size:22px;width:24px;"></em>');
|
||||
btnpage.click(function () {
|
||||
var icon = $(this);
|
||||
if (icon.hasClass('iconangleright')) {
|
||||
icon.removeClass('iconangleright').addClass('iconangledown');
|
||||
icon.parent().next().show();
|
||||
}
|
||||
else {
|
||||
icon.removeClass('iconangledown').addClass('iconangleright');
|
||||
icon.parent().next().hide();
|
||||
}
|
||||
});
|
||||
divpage.append(btnpage);
|
||||
divpage.append($('<span></span>').text(page.DisplayText));
|
||||
}
|
||||
|
||||
var sectioncontent = createSectionContent(page);
|
||||
content.append(sectioncontent);
|
||||
@ -201,78 +386,225 @@ function createPage(page) {
|
||||
|
||||
function createSectionContent(page) {
|
||||
var content = $('<div style="margin-bottom:30px;"></div>');
|
||||
if (page.Sections && page.Sections.length > 0) {
|
||||
for (var i = 0; i < page.Sections.length; i++) {
|
||||
var s = page.Sections[i];
|
||||
var divsection = $('<div class="section"></div>');
|
||||
content.append(divsection);
|
||||
if (layoutStyle == 1 || layoutStyle == 2) {
|
||||
if (page.Sections && page.Sections.length > 0) {
|
||||
for (var i = 0; i < page.Sections.length; i++) {
|
||||
var s = page.Sections[i];
|
||||
|
||||
var btnsection = $('<em class="spanbtn iconangledown" style="font-size:18px;display:inline-block;"></em>');
|
||||
btnsection.click(function () {
|
||||
var icon = $(this);
|
||||
if (icon.hasClass('iconangleright')) {
|
||||
icon.removeClass('iconangleright').addClass('iconangledown');
|
||||
icon.parent().next().show();
|
||||
}
|
||||
else {
|
||||
icon.removeClass('iconangledown').addClass('iconangleright');
|
||||
icon.parent().next().hide();
|
||||
}
|
||||
});
|
||||
divsection.append(btnsection);
|
||||
var ispic = false;
|
||||
if (s.StaticPictures && s.StaticPictures.length > 0) {
|
||||
ispic = true;
|
||||
var div_pic = $('<span></span>');
|
||||
createPictures(s.StaticPictures, div_pic);
|
||||
divsection.append(div_pic);
|
||||
divsection.append('<br/>');
|
||||
var tabsection = $('<table class="question_table"style="width:100%;background-color:#cbcbcb;" ></table>');
|
||||
content.append(tabsection);
|
||||
var trsection = $('<tr style="width:100%;text-align:center;" ></tr>');
|
||||
tabsection.append(trsection);
|
||||
var tdsection = $('<td style="width:100%;" ></td>');
|
||||
trsection.append(tdsection);
|
||||
tdsection.append($('<span></span>').text(s.DisplayText));
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
tabsection.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
tabsection.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
tabsection.css('line-height', '30px');
|
||||
|
||||
var qc = createQuestionContent(s);
|
||||
content.append(qc);
|
||||
}
|
||||
var span_title = $('<span></span>').text(s.DisplayText);
|
||||
if (ispic)
|
||||
span_title.css('margin-left', 24);
|
||||
divsection.append(span_title);
|
||||
|
||||
var qc = createQuestionContent(s, i);
|
||||
content.append(qc);
|
||||
}
|
||||
}
|
||||
else
|
||||
content.append($('<div class="question"></div>').text('No Sections'));
|
||||
else {
|
||||
if (page.Sections && page.Sections.length > 0) {
|
||||
for (var i = 0; i < page.Sections.length; i++) {
|
||||
var s = page.Sections[i];
|
||||
var divsection = $('<div class="section"></div>');
|
||||
content.append(divsection);
|
||||
|
||||
var btnsection = $('<em class="spanbtn iconangledown" style="font-size:18px;display:inline-block;"></em>');
|
||||
btnsection.click(function () {
|
||||
var icon = $(this);
|
||||
if (icon.hasClass('iconangleright')) {
|
||||
icon.removeClass('iconangleright').addClass('iconangledown');
|
||||
icon.parent().next().show();
|
||||
}
|
||||
else {
|
||||
icon.removeClass('iconangledown').addClass('iconangleright');
|
||||
icon.parent().next().hide();
|
||||
}
|
||||
});
|
||||
divsection.append(btnsection);
|
||||
var ispic = false;
|
||||
if (s.StaticPictures && s.StaticPictures.length > 0) {
|
||||
ispic = true;
|
||||
var div_pic = $('<span></span>');
|
||||
createPictures(s.StaticPictures, div_pic);
|
||||
divsection.append(div_pic);
|
||||
divsection.append('<br/>');
|
||||
}
|
||||
var span_title = $('<span></span>').text(s.DisplayText);
|
||||
if (ispic)
|
||||
span_title.css('margin-left', 24);
|
||||
divsection.append(span_title);
|
||||
|
||||
var qc = createQuestionContent(s);
|
||||
|
||||
content.append(qc);
|
||||
}
|
||||
}
|
||||
else
|
||||
content.append($('<div class="question"></div>').text('No Sections'));
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
function createQuestionContent(section) {
|
||||
var content = $('<div style="margin-bottom:30px;"></div>');
|
||||
if (section.Questions && section.Questions.length > 0) {
|
||||
for (var i = 0; i < section.Questions.length; i++) {
|
||||
var q = section.Questions[i];
|
||||
var div_question = $('<div class="question"></div>');
|
||||
content.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) {
|
||||
var div_pic = $('<div style=""></div>');
|
||||
div_pic = createPictures(q.StaticPictures, div_pic);
|
||||
div_question.append(div_pic)
|
||||
}
|
||||
|
||||
createAnswerContent(content, q);
|
||||
|
||||
if (i != section.Questions.length - 1)
|
||||
content.append($('<div style="border-bottom:1px solid #dbdbdb;"></div>'));
|
||||
}
|
||||
createQuestionContent1(content, section.Questions);
|
||||
}
|
||||
else
|
||||
content.append($('<div class="question"></div>').text(GetTextByKey("P_IPT_NOQUESTIONS", 'No Questions')));
|
||||
return content;
|
||||
}
|
||||
|
||||
function createQuestionContent1(content, questions) {
|
||||
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];
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
}
|
||||
else if (layoutStyle == 2) {//Split
|
||||
var div_question = $('<table style="width:100%;" class="question_table"></table>');
|
||||
content.append(div_question);
|
||||
var tr_question = "";
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var q = questions[i];
|
||||
if (i % 2 == 0) {
|
||||
tr_question = $('<tr style="width:100%;"></tr>');
|
||||
div_question.append(tr_question);
|
||||
}
|
||||
var td_question = $('<td style="width:25%;"></td>').text(q.DisplayText);
|
||||
tr_question.append(td_question);
|
||||
var td_answer = $('<td style="width:25%;"></td>');
|
||||
tr_question.append(td_answer);
|
||||
createAnswerContent(td_answer, q);
|
||||
if (q.IsImportant && layoutHighlightColor) {
|
||||
td_question.css('background-color', layoutHighlightColor);
|
||||
td_answer.css('background-color', layoutHighlightColor);
|
||||
}
|
||||
}
|
||||
if (questions.length % 2 != 0) {
|
||||
tr_question.append($('<td style="width:25%;"></td><td style="width:25%;"></td>'));
|
||||
}
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_table_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var q = questions[i];
|
||||
var div_question = $('<div class="question"></div>');
|
||||
content.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) {
|
||||
var div_pic = $('<div style=""></div>');
|
||||
div_pic = createPictures(q.StaticPictures, div_pic);
|
||||
div_question.append(div_pic)
|
||||
}
|
||||
|
||||
createAnswerContent(content, q);
|
||||
|
||||
if (layoutDivider == 1)//Line
|
||||
div_question.addClass('question_line');
|
||||
else if (layoutDivider == 2)//Grid
|
||||
div_question.addClass('question_div_grid');
|
||||
|
||||
if (layoutSpacing == 1)//Double Space
|
||||
div_question.css('line-height', '30px');
|
||||
|
||||
if (q.IsImportant && layoutHighlightColor)
|
||||
div_question.css('background-color', layoutHighlightColor);
|
||||
}
|
||||
}
|
||||
|
||||
content.find('.answer').each(function () {
|
||||
var div_answer = $(this);
|
||||
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;
|
||||
}
|
||||
|
||||
function createPictures(pictures, p) {
|
||||
for (var i = 0; i < pictures.length; i++) {
|
||||
var pic = pictures[i];
|
||||
var img = $('<img style="width:40px;height:40px;margin-left:5px;"/>').attr('src', pic.Url).attr('title', pic.Name);
|
||||
var img = $('<img style="height:30px;margin-left:5px;"/>').attr('src', pic.Url).attr('title', pic.Name);
|
||||
img.click(pic.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
@ -288,6 +620,7 @@ function createAnswerContent(p, q) {
|
||||
for (var i = 0; i < reportdata.Answers.length; i++) {
|
||||
var a = reportdata.Answers[i];
|
||||
if (a.QuestionId.toLowerCase() == q.Id.toLowerCase()) {
|
||||
p.data('comment', a.Comment);
|
||||
if ([5, 8, 9, 10, 14, 15, 19].indexOf(q.QuestionType) < 0
|
||||
|| (q.QuestionType == 15 && q.SubType != 15)) {//except YesOrNo/DropDown/MultipleChoice/Picture/FuelRecords
|
||||
var result = a.Result;
|
||||
@ -302,7 +635,7 @@ function createAnswerContent(p, q) {
|
||||
|| (q.QuestionType == 15 && q.SubType == 10))//FuelRecords Quantity
|
||||
result += " " + convertUnits(a.Units);
|
||||
|
||||
var div_answer = $('<div class="answer"></div>');
|
||||
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>");
|
||||
@ -318,7 +651,7 @@ function createAnswerContent(p, q) {
|
||||
}
|
||||
else if (q.QuestionType == 5) {//YesOrNo
|
||||
if (a.SelectedItems && a.SelectedItems.length > 0) {
|
||||
var item = $('<div class="answer" ></div>');
|
||||
var item = $('<div class="answer" ></div>').data('isimportant', q.IsImportant);
|
||||
var div_bg = $('<div class="circle"></div>');
|
||||
var label = $('<label style="margin-left:5px;"></lable>').text(a.SelectedItems[0].Text);
|
||||
item.append(div_bg);
|
||||
@ -338,7 +671,7 @@ function createAnswerContent(p, q) {
|
||||
if (q.MultipleSelect) {
|
||||
if (a.SelectedItems && a.SelectedItems.length > 0) {
|
||||
for (var j = 0; j < a.SelectedItems.length; j++) {
|
||||
var item = $('<div class="answer"></div>');
|
||||
var item = $('<div class="answer"></div>').data('isimportant', q.IsImportant);
|
||||
var div_bg = $('<div class="circle"></div>');
|
||||
var label = $('<label style="margin-left:5px;"></lable>').text("" + (j + 1) + ". " + a.SelectedItems[j].Text);
|
||||
item.append(div_bg);
|
||||
@ -355,7 +688,7 @@ function createAnswerContent(p, q) {
|
||||
}
|
||||
else {
|
||||
if (a.SelectedItems && a.SelectedItems.length > 0) {
|
||||
var item = $('<div class="answer" ></div>');
|
||||
var item = $('<div class="answer"></div>').data('isimportant', q.IsImportant);
|
||||
var div_bg = $('<div class="circle"></div>');
|
||||
var label = $('<label style="margin-left:5px;"></lable>').text(a.SelectedItems[0].Text);
|
||||
item.append(div_bg);
|
||||
@ -373,7 +706,7 @@ function createAnswerContent(p, q) {
|
||||
else if (q.QuestionType == 14) {//Email (Drop Down)
|
||||
if (a.SelectedItems && a.SelectedItems.length > 0) {
|
||||
for (var j = 0; j < a.SelectedItems.length; j++) {
|
||||
var item = $('<div class="answer"></div>');
|
||||
var item = $('<div class="answer"></div>').data('isimportant', q.IsImportant);
|
||||
var label = $('<label style="margin-left:5px;"></lable>').text("" + (j + 1) + ". " + a.SelectedItems[j].Text + "<" + a.SelectedItems[j].Value + ">");
|
||||
item.append(label);
|
||||
item.append(label_level);
|
||||
@ -383,33 +716,27 @@ function createAnswerContent(p, q) {
|
||||
}
|
||||
else if (q.QuestionType == 10
|
||||
|| (q.QuestionType == 15 && q.SubType == 15)) {//Picture
|
||||
var pics = $('<div style="min-height:80px;overflow:auto;padding-left:90px;"></div>');
|
||||
p.append(pics);
|
||||
if (layoutPicturesDisplay != 1) {//Displayed At Bottom
|
||||
var pics = $('<div class="div_media" style="min-height:80px;overflow:auto;padding-left:90px;"></div>').data('isimportant', q.IsImportant);
|
||||
p.append(pics);
|
||||
}
|
||||
//pics.append(label_level);
|
||||
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 (['.mp4', '.mov'].indexOf(m.FileType.toLowerCase()) >= 0) {
|
||||
var v = $('<div class="media"><span class="video"></span></div>');
|
||||
v.click(m.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
pics.append(v);
|
||||
}
|
||||
else {
|
||||
var pic = $('<img class="media"></img>').attr('src', m.ThumbnailUrl);
|
||||
pic.click(m.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
pics.append(pic);
|
||||
if (layoutPicturesDisplay == 1)//Displayed At Bottom
|
||||
mediasdata.push(m);
|
||||
else {//Displayed As Taken
|
||||
var media = createMedias(m);
|
||||
pics.append(media);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (q.QuestionType == 19) {//Asset Status
|
||||
var divanswer = $('<div class="answer" ></div>');
|
||||
var divanswer = $('<div class="answer" ></div>').data('isimportant', q.IsImportant);
|
||||
if (a.SelectedItems && a.SelectedItems.length > 0) {
|
||||
var div_bg = $('<div class="circle"></div>');
|
||||
var label = $('<label style="margin-left:5px;"></lable>').text(a.SelectedItems[0].Text);
|
||||
@ -422,36 +749,29 @@ function createAnswerContent(p, q) {
|
||||
|
||||
}
|
||||
divanswer.append(label_level);
|
||||
|
||||
var pics = $('<div style="min-height:80px;overflow:auto;padding-left:90px;"></div>');
|
||||
p.append(pics);
|
||||
if (layoutPicturesDisplay != 1) {//Displayed At Bottom
|
||||
var pics = $('<div class="div_media" style="min-height:80px;overflow:auto;padding-left:90px;"></div>').data('isimportant', q.IsImportant);
|
||||
p.append(pics);
|
||||
}
|
||||
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 (['.mp4', '.mov'].indexOf(m.FileType.toLowerCase()) >= 0) {
|
||||
var v = $('<div class="media"><span class="video"></span></div>');
|
||||
v.click(m.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
pics.append(v);
|
||||
}
|
||||
else {
|
||||
var pic = $('<img class="media"></img>').attr('src', m.ThumbnailUrl);
|
||||
pic.click(m.Url, function (e) {
|
||||
window.open(e.data, "_blank")
|
||||
});
|
||||
pics.append(pic);
|
||||
if (layoutPicturesDisplay == 1)//Displayed At Bottom
|
||||
mediasdata.push(m);
|
||||
else {//Displayed As Taken
|
||||
var media = createMedias(m);
|
||||
pics.append(media);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a.Result && a.Result != "") {
|
||||
p.append($('<div class="answer" style="color:#808080"></div>').html(replaceHtmlText(a.Result)));
|
||||
p.append($('<div class="answer" style="color:#808080"></div>').data('isimportant', q.IsImportant).html(replaceHtmlText(a.Result)));
|
||||
}
|
||||
}
|
||||
if (a.Comment && a.Comment != "") {
|
||||
p.append($('<div class="answer" style="color:#808080"></div>').html(replaceHtmlText(a.Comment)));
|
||||
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)));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user