@@ -338,6 +338,7 @@ define([
338338
339339 var varType = varObj . type ;
340340 var varList = varObj . list ;
341+ var prevVarType = that . state . type ;
341342
342343 that . state . type = varType ;
343344 that . state . list = varList ;
@@ -437,22 +438,24 @@ define([
437438 // get target code
438439 var methodName = lastSplit . match ( / [ a - z A - Z _ ] + / i) [ 0 ] ;
439440 var targetCode = splitList . slice ( 0 , splitList . length - 1 ) . join ( '.' ) ;
440- if ( ( varType in instanceLibrary . INSTANCE_MATCHING_LIBRARY ) && ( methodName in instanceLibrary . INSTANCE_MATCHING_LIBRARY [ varType ] ) ) {
441+ if ( ( prevVarType in instanceLibrary . INSTANCE_MATCHING_LIBRARY ) && ( methodName in instanceLibrary . INSTANCE_MATCHING_LIBRARY [ prevVarType ] ) ) {
441442 // get target library
442- var targetLib = instanceLibrary . INSTANCE_MATCHING_LIBRARY [ varType ] [ methodName ] ;
443+ var targetLib = instanceLibrary . INSTANCE_MATCHING_LIBRARY [ prevVarType ] [ methodName ] ;
443444 var targetId = targetLib . target ;
444445 that . optionPopup = new LibraryComponent ( {
445446 [ targetId ] : targetCode ,
446447 config : {
447448 name : methodName , category : 'Instance' ,
449+ id : targetLib . id ,
448450 saveOnly : true ,
449- id : targetLib . id
451+ noOutput : true
450452 }
451453 } ,
452454 {
453455 pageThis : that ,
454456 useInputVariable : true ,
455457 targetSelector : that . pageThis . wrapSelector ( '#' + that . targetId ) ,
458+
456459 finish : function ( code ) {
457460 // TODO: save state
458461
@@ -475,7 +478,7 @@ define([
475478 // remove first/last brackets
476479 var parameter = lastBracket . substr ( 1 , lastBracket . length - 2 ) ;
477480 $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . val ( parameter ) ;
478- $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . show ( ) ;
481+ $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . prop ( 'disabled' , false ) ;
479482 if ( hasOption ) {
480483 if ( $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . hasClass ( 'disabled' ) ) {
481484 $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . removeClass ( 'disabled' ) ;
@@ -487,13 +490,13 @@ define([
487490 }
488491 } else {
489492 $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . val ( '' ) ;
490- $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . hide ( ) ;
493+ $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . prop ( 'disabled' , true ) ;
491494 if ( ! $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . hasClass ( 'disabled' ) ) {
492495 $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . addClass ( 'disabled' ) ;
493496 }
494497 }
495498 } else {
496- $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . hide ( ) ;
499+ $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . prop ( 'disabled' , true ) ;
497500 if ( ! $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . hasClass ( 'disabled' ) ) {
498501 $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . addClass ( 'disabled' ) ;
499502 }
0 commit comments