Update: Quick Log & Queue Support

This commit is contained in:
Gary Sharp
2014-02-18 17:26:03 +11:00
parent 0db43d9200
commit 6ac87633ac
7 changed files with 75 additions and 65 deletions
+31 -34
View File
@@ -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"
}