Update: Quick Log & Queue Support
This commit is contained in:
@@ -258,7 +258,6 @@
|
||||
|
||||
$deviceHeld.change(validateQuickLog);
|
||||
$jobTypes.change(validateQuickLog);
|
||||
$('#createJob_SubTypes').on('change', 'input', validateQuickLog);
|
||||
validateQuickLog();
|
||||
|
||||
function validateQuickLog() {
|
||||
@@ -275,11 +274,7 @@
|
||||
case 'SImg':
|
||||
case 'SOS':
|
||||
case 'UMgmt':
|
||||
// If Job-Queues are configured for a Sub-Type, don't allow quick-log.
|
||||
if ($('#createJob_SubType_' + $jobTypes.filter(':checked').val()).find('input:checked').closest('li').has('i.queue').length == 0)
|
||||
quickLogAllowed = true;
|
||||
else
|
||||
quickLogAllowed = false;
|
||||
quickLogAllowed = true;
|
||||
break;
|
||||
default:
|
||||
quickLogAllowed = false;
|
||||
@@ -301,8 +296,10 @@
|
||||
$quickLog.change(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$quickLogTaskTimeContainer.slideDown();
|
||||
$('#createJob_SubTypes').addClass('isQuickLog');
|
||||
} else {
|
||||
$quickLogTaskTimeContainer.slideUp();
|
||||
$('#createJob_SubTypes').removeClass('isQuickLog');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34003
|
||||
// Runtime Version:4.0.30319.34011
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -701,43 +701,40 @@ WriteLiteral("\r\n //#region QuickLog\r\n var $quickLog =
|
||||
"teJob_TaskTimeOtherMinutes\');\r\n var $quickLogTaskTimeValidationMessag" +
|
||||
"e = $quickLogTaskTimeContainer.find(\'[data-valmsg-for=\"QuickLogTaskTimeMinutes\"]" +
|
||||
"\');\r\n\r\n $deviceHeld.change(validateQuickLog);\r\n $jobTypes." +
|
||||
"change(validateQuickLog);\r\n $(\'#createJob_SubTypes\').on(\'change\', \'in" +
|
||||
"put\', validateQuickLog);\r\n validateQuickLog();\r\n\r\n functio" +
|
||||
"n validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
||||
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowed" +
|
||||
" = false;\r\n } else {\r\n // Allow Quick-Log only" +
|
||||
" for certain Job Types\r\n var selectedType = $jobTypes.filter(" +
|
||||
"\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
||||
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
||||
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
||||
" case \'UMgmt\':\r\n // If Job-Queues are configured for " +
|
||||
"a Sub-Type, don\'t allow quick-log.\r\n if ($(\'#createJo" +
|
||||
"b_SubType_\' + $jobTypes.filter(\':checked\').val()).find(\'input:checked\').closest(" +
|
||||
"\'li\').has(\'i.queue\').length == 0)\r\n quickLogAllow" +
|
||||
"ed = true;\r\n else\r\n qu" +
|
||||
"ickLogAllowed = false;\r\n break;\r\n " +
|
||||
" default:\r\n quickLogAllowed = false;\r\n " +
|
||||
" break;\r\n }\r\n }\r\n\r\n " +
|
||||
" if (quickLogAllowed) {\r\n $quickLogContainer.slideDown();\r" +
|
||||
"\n } else {\r\n if (init)\r\n " +
|
||||
" $quickLogContainer.hide();\r\n else\r\n " +
|
||||
"$quickLogContainer.slideUp();\r\n $quickLog.prop(\'checked\', fal" +
|
||||
"se).change();\r\n }\r\n }\r\n\r\n $quickLog.change(" +
|
||||
"function () {\r\n if ($(this).is(\':checked\')) {\r\n " +
|
||||
" $quickLogTaskTimeContainer.slideDown();\r\n } else {\r\n " +
|
||||
" $quickLogTaskTimeContainer.slideUp();\r\n }\r\n }" +
|
||||
");\r\n\r\n $quickLogTaskTimes.change(function () {\r\n if ($" +
|
||||
"quickLogTaskTimes.filter(\':checked\').val() === \"\") {\r\n $(\'#cr" +
|
||||
"eateJob_TaskTimeOtherMinutesContainer\').show();\r\n $quickLogTa" +
|
||||
"skTimeOtherMinutes.attr(\'disabled\', null).focus().select();\r\n } e" +
|
||||
"lse {\r\n $(\'#createJob_TaskTimeOtherMinutesContainer\').hide();" +
|
||||
"\r\n $quickLogTaskTimeOtherMinutes.attr(\'disabled\', \'disabled\')" +
|
||||
";\r\n }\r\n });\r\n //#endregion\r\n ");
|
||||
"change(validateQuickLog);\r\n validateQuickLog();\r\n\r\n functi" +
|
||||
"on validateQuickLog() {\r\n var quickLogAllowed = false;\r\n\r\n " +
|
||||
" if ($deviceHeld.val() === \'True\') {\r\n quickLogAllowe" +
|
||||
"d = false;\r\n } else {\r\n // Allow Quick-Log onl" +
|
||||
"y for certain Job Types\r\n var selectedType = $jobTypes.filter" +
|
||||
"(\':checked\').val();\r\n switch (selectedType) {\r\n " +
|
||||
" case \'HMisc\':\r\n case \'SApp\':\r\n " +
|
||||
" case \'SImg\':\r\n case \'SOS\':\r\n " +
|
||||
" case \'UMgmt\':\r\n quickLogAllowed = true;\r\n " +
|
||||
" break;\r\n default:\r\n " +
|
||||
" quickLogAllowed = false;\r\n break;\r\n " +
|
||||
" }\r\n }\r\n\r\n if (quickLogAllowed) {\r\n " +
|
||||
" $quickLogContainer.slideDown();\r\n } else {\r\n " +
|
||||
" if (init)\r\n $quickLogContainer.hide();\r\n " +
|
||||
" else\r\n $quickLogContainer.slideUp();\r\n " +
|
||||
" $quickLog.prop(\'checked\', false).change();\r\n }\r\n" +
|
||||
" }\r\n\r\n $quickLog.change(function () {\r\n if " +
|
||||
"($(this).is(\':checked\')) {\r\n $quickLogTaskTimeContainer.slide" +
|
||||
"Down();\r\n $(\'#createJob_SubTypes\').addClass(\'isQuickLog\');\r\n " +
|
||||
" } else {\r\n $quickLogTaskTimeContainer.slideUp(" +
|
||||
");\r\n $(\'#createJob_SubTypes\').removeClass(\'isQuickLog\');\r\n " +
|
||||
" }\r\n });\r\n\r\n $quickLogTaskTimes.change(functio" +
|
||||
"n () {\r\n if ($quickLogTaskTimes.filter(\':checked\').val() === \"\") " +
|
||||
"{\r\n $(\'#createJob_TaskTimeOtherMinutesContainer\').show();\r\n " +
|
||||
" $quickLogTaskTimeOtherMinutes.attr(\'disabled\', null).focus().s" +
|
||||
"elect();\r\n } else {\r\n $(\'#createJob_TaskTimeOt" +
|
||||
"herMinutesContainer\').hide();\r\n $quickLogTaskTimeOtherMinutes" +
|
||||
".attr(\'disabled\', \'disabled\');\r\n }\r\n });\r\n " +
|
||||
"//#endregion\r\n ");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 320 "..\..\Views\Job\Create.cshtml"
|
||||
#line 317 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user