@@ -67,7 +67,6 @@ function detectAll(selectorType) {
6767 // simple_value_2. However, if either "B" or "C" are selected in either selector,
6868 // we want to change both.
6969
70- console . log ( "type:" + selectorType ) ;
7170 $ ( "p." + selectorType + "-selector" ) . addClass ( selectorType + "-item" ) ;
7271 var prevSpans = [ ] ;
7372 $ ( "span" ) . each ( function ( ) {
@@ -91,6 +90,28 @@ function detectAll(selectorType) {
9190 $ ( this ) . text ( "PROJECT_NAME" ) ;
9291 }
9392 }
93+ if ( text == '_get_executor_instance' ) {
94+ // replace _get_executor_instance(execparams, job) with selector value
95+ // the spans are: "_get_executor_instance", "(", "execparams", ",", "job", ")"
96+ // we need: "JobExecutor", ".", "get_instance", "(", selector, ")"
97+ // the classes happen to match, so just replace the text
98+ // also, remove the space after the comma, which is rendered by sphinx as a text
99+ // node rather than span like everything else
100+ var crt = $ ( this ) ;
101+ var space = $ ( this ) . next ( ) . next ( ) . next ( ) . get ( 0 ) . nextSibling ;
102+ if ( space . nodeType == 3 ) {
103+ space . nodeValue = "" ;
104+ }
105+ else {
106+ console . log ( "Expected a text node: " , space ) ;
107+ }
108+ var newText = [ "JobExecutor" , "." , "get_instance" , "(" ] ;
109+ for ( var i = 0 ; i < 4 ; i ++ ) {
110+ crt . text ( newText [ i ] ) ;
111+ crt = crt . next ( ) ;
112+ }
113+ crt . addClass ( selectorType + "-item" ) . addClass ( "psij-selector-value" ) ;
114+ }
94115 prevSpans . push ( $ ( this ) ) ;
95116 if ( prevSpans . length > 2 ) {
96117 prevSpans . shift ( ) ;
0 commit comments