|
436 |
var found = false; |
416 |
var found = false; |
437 |
this._searchForm._widgets.superordinate.store.fetch( { onItem: lang.hitch( this, function( item ) { |
417 |
this._searchForm._widgets.superordinate.store.fetch( { onItem: lang.hitch( this, function( item ) { |
438 |
if ( this._searchForm._widgets.superordinate.store.getValue( item, 'id' ) == keys[ 0 ] ) { |
418 |
if ( this._searchForm._widgets.superordinate.store.getValue( item, 'id' ) == keys[ 0 ] ) { |
439 |
var handle = this._searchForm._widgets.objectPropertyValue.on('valuesLoaded', lang.hitch( this, function() { |
419 |
this._searchForm.getWidget('superordinate').set( 'value', keys[ 0 ] ); |
440 |
this.filter(this._searchForm.gatherFormValues()); |
|
|
441 |
this.disconnect(handle); |
442 |
} ) ); |
443 |
this._searchForm._widgets.superordinate.set( 'value', keys[ 0 ] ); |
444 |
found = true; |
420 |
found = true; |
445 |
return false; |
421 |
return false; |
446 |
} |
422 |
} |
|
780 |
} |
755 |
} |
781 |
|
756 |
|
782 |
// a superordinate has been selected and we do not have a 'up' button so far -> add the button |
757 |
// a superordinate has been selected and we do not have a 'up' button so far -> add the button |
783 |
this._upButton = this.own(new Button({ |
758 |
this._upButton = new Button({ |
784 |
label: label, |
759 |
label: label, |
785 |
iconClass: 'umcIconUp', |
760 |
iconClass: 'umcIconUp', |
786 |
callback: lang.hitch(this, function() { |
761 |
callback: lang.hitch(this, function() { |
787 |
this._searchForm.getWidget('superordinate').set('value', 'None'); |
762 |
this._searchForm.getWidget('superordinate').set('value', 'None'); |
788 |
|
|
|
789 |
// we can relaunch the search after all search form values |
790 |
// have been updated |
791 |
on.once(this._searchForm.getWidget('objectPropertyValue'), 'valuesLoaded', lang.hitch(this, 'filter')); |
792 |
}) |
763 |
}) |
793 |
}))[0]; |
764 |
}); |
794 |
this._grid._toolbar.addChild(this._upButton, 0); |
765 |
this._grid._toolbar.addChild(this._upButton, 0); |
795 |
} |
766 |
} |
|
|
767 |
// we can relaunch the search after all search form values |
768 |
// have been updated |
769 |
this._searchForm.ready().then(lang.hitch(this, 'filter')); |
796 |
}))); |
770 |
}))); |
797 |
} |
771 |
} |