@@ -2603,6 +2603,47 @@ ClassMethod GetSourceControlInclude(prefix As %String = {%request.URLPrefix}) As
26032603 1 : " " )
26042604}
26052605
2606+ XData ProductionConfigScript [ MimeType = text /javascript ]
2607+ {
2608+ function checkProductionConfigLoad () {
2609+ timerState (false );
2610+ }
2611+
2612+ function checkProductionConfigUnload () {
2613+ timerState (true );
2614+ }
2615+
2616+ function timerState (start ) {
2617+ if (window .parent && window .parent .opener && window .parent .opener .zenPage ) {
2618+ if (start && window .parent .opener .zenPage .startTimers ) {
2619+ window .parent .opener .zenPage .startTimers ();
2620+ }
2621+ if (!start && window .parent .opener .zenPage .stopTimers ) {
2622+ window .parent .opener .zenPage .stopTimers ();
2623+ }
2624+ }
2625+ }
2626+ }
2627+
2628+ ClassMethod ProductionConfigScript () As %String [ CodeMode = objectgenerator ]
2629+ {
2630+ do %code .WriteLine (" set html = " " <script type='text/javascript'>" " _$c(13,10)" )
2631+ set xdata = ##class (%Dictionary.XDataDefinition ).IDKEYOpen (%compiledclass .Name ,%compiledmethod .Name ,,.sc )
2632+ $$$ThrowOnError(sc )
2633+ while 'xdata .Data .AtEnd {
2634+ set line = xdata .Data .ReadLine ()
2635+ do %code .WriteLine (" set html = html_" _$$Quote ^%qcr (line )_" _$c(13,10)" )
2636+ }
2637+ do %code .WriteLine (" set html = html_$c(13,10)_" " </script>" " " )
2638+ do %code .WriteLine (" quit html" )
2639+ quit $$$OK
2640+ }
2641+
2642+ ClassMethod ProductionConfigBodyAttributes () As %String [ CodeMode = expression ]
2643+ {
2644+ " onload='checkProductionConfigLoad()' onbeforeunload='checkProductionConfigUnload()'"
2645+ }
2646+
26062647ClassMethod UncommittedWithAction () As %Library .DynamicObject
26072648{
26082649 do ##class (SourceControl.Git.Change ).RefreshUncommitted ()
0 commit comments