diff --git a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/parent-sample-selector-module.js b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/parent-sample-selector-module.js index f9f2d05e..972f279b 100644 --- a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/parent-sample-selector-module.js +++ b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/parent-sample-selector-module.js @@ -9,10 +9,10 @@ this.ckan.module('parent-sample-selector-module', function ($, _) { initializeSelect2: function () { var self = this; - + this.org_id = this.options.group; this.inputElement.select2({ placeholder: "Select Parent of Sample", - minimumInputLength: 3, + minimumInputLength: 0, ajax: { url: '/api/3/action/package_search', dataType: 'json', @@ -20,7 +20,8 @@ this.ckan.module('parent-sample-selector-module', function ($, _) { data: function (term, page) { return { q: term, - include_private: true + include_private: true, + fq: 'owner_org:' + self.org_id // filter query for organization id }; }, results: function (data, page) { diff --git a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/scheming/form_snippets/sample_parent_field.html b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/scheming/form_snippets/sample_parent_field.html index 7ab450e0..b3895aa3 100644 --- a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/scheming/form_snippets/sample_parent_field.html +++ b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/scheming/form_snippets/sample_parent_field.html @@ -1,4 +1,8 @@ -