|
@@ -37,16 +37,17 @@ class MultipleSelectTable extends SelectTable
|
|
|
|
|
|
Admin::script(
|
|
|
<<<JS
|
|
|
-{$this->dialog->getScript()}
|
|
|
-
|
|
|
-Dcat.grid.SelectTable({
|
|
|
- dialog: '#{$this->dialog->id()}',
|
|
|
- container: '#{$this->id}',
|
|
|
- input: '#hidden-{$this->id}',
|
|
|
- multiple: true,
|
|
|
- max: {$this->max},
|
|
|
- values: {$options},
|
|
|
-});
|
|
|
+Dcat.init('#{$this->id}', function (self) {
|
|
|
+ var dialogId = self.parent().find('{$this->dialog->getElementSelector()}').attr('id');
|
|
|
+ Dcat.grid.SelectTable({
|
|
|
+ dialog: '[data-id="' + dialogId + '"]',
|
|
|
+ container: '#{$this->id}',
|
|
|
+ input: '#hidden-{$this->id}',
|
|
|
+ multiple: true,
|
|
|
+ max: {$this->max},
|
|
|
+ values: {$options},
|
|
|
+ });
|
|
|
+})
|
|
|
JS
|
|
|
);
|
|
|
}
|