@@ -338,6 +338,7 @@ define([
338
338
339
339
var varType = varObj . type ;
340
340
var varList = varObj . list ;
341
+ var prevVarType = that . state . type ;
341
342
342
343
that . state . type = varType ;
343
344
that . state . list = varList ;
@@ -437,22 +438,24 @@ define([
437
438
// get target code
438
439
var methodName = lastSplit . match ( / [ a - z A - Z _ ] + / i) [ 0 ] ;
439
440
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 ] ) ) {
441
442
// get target library
442
- var targetLib = instanceLibrary . INSTANCE_MATCHING_LIBRARY [ varType ] [ methodName ] ;
443
+ var targetLib = instanceLibrary . INSTANCE_MATCHING_LIBRARY [ prevVarType ] [ methodName ] ;
443
444
var targetId = targetLib . target ;
444
445
that . optionPopup = new LibraryComponent ( {
445
446
[ targetId ] : targetCode ,
446
447
config : {
447
448
name : methodName , category : 'Instance' ,
449
+ id : targetLib . id ,
448
450
saveOnly : true ,
449
- id : targetLib . id
451
+ noOutput : true
450
452
}
451
453
} ,
452
454
{
453
455
pageThis : that ,
454
456
useInputVariable : true ,
455
457
targetSelector : that . pageThis . wrapSelector ( '#' + that . targetId ) ,
458
+
456
459
finish : function ( code ) {
457
460
// TODO: save state
458
461
@@ -475,7 +478,7 @@ define([
475
478
// remove first/last brackets
476
479
var parameter = lastBracket . substr ( 1 , lastBracket . length - 2 ) ;
477
480
$ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . val ( parameter ) ;
478
- $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . show ( ) ;
481
+ $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . prop ( 'disabled' , false ) ;
479
482
if ( hasOption ) {
480
483
if ( $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . hasClass ( 'disabled' ) ) {
481
484
$ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . removeClass ( 'disabled' ) ;
@@ -487,13 +490,13 @@ define([
487
490
}
488
491
} else {
489
492
$ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . val ( '' ) ;
490
- $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . hide ( ) ;
493
+ $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . prop ( 'disabled' , true ) ;
491
494
if ( ! $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . hasClass ( 'disabled' ) ) {
492
495
$ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . addClass ( 'disabled' ) ;
493
496
}
494
497
}
495
498
} else {
496
- $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . hide ( ) ;
499
+ $ ( that . wrapSelector ( '.' + VP_INS_PARAMETER ) ) . prop ( 'disabled' , true ) ;
497
500
if ( ! $ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . hasClass ( 'disabled' ) ) {
498
501
$ ( that . wrapSelector ( '.vp-ins-opt-button' ) ) . addClass ( 'disabled' ) ;
499
502
}
0 commit comments