diff --git a/src/admin/js/main.js b/src/admin/js/main.js index 270747774..a61c2beb9 100644 --- a/src/admin/js/main.js +++ b/src/admin/js/main.js @@ -33,6 +33,8 @@ import FilterTaginput from '../../classes/filter-types/taginput/Taginput.vue'; import FilterTaxonomyCheckbox from '../../classes/filter-types/taxonomy/Checkbox.vue'; import FilterTaxonomyTaginput from '../../classes/filter-types/taxonomy/Taginput.vue'; +import FormNumeric from '../../classes/filter-types/numeric/FormNumeric.vue'; + import TainacanFormItem from '../../classes/metadata-types/tainacan-form-item.vue'; import TainacanFiltersList from '../../classes/filter-types/tainacan-filter-item.vue'; @@ -65,7 +67,7 @@ Vue.component('tainacan-numeric', Numeric); Vue.component('tainacan-date', Date); Vue.component('tainacan-relationship', Relationship); Vue.component('tainacan-taxonomy', Taxonomy); - +/* Metadata Option forms */ Vue.component('tainacan-form-relationship', FormRelationship); Vue.component('tainacan-form-taxonomy', FormTaxonomy); Vue.component('tainacan-form-selectbox', FormSelectbox); @@ -81,6 +83,8 @@ Vue.component('tainacan-filter-checkbox', FilterCheckbox); Vue.component('tainacan-filter-taginput', FilterTaginput); Vue.component('tainacan-filter-taxonomy-checkbox', FilterTaxonomyCheckbox); Vue.component('tainacan-filter-taxonomy-taginput', FilterTaxonomyTaginput); +/* Filter Metadata Option forms */ +Vue.component('tainacan-filter-form-numeric', FormNumeric); /* Others */ Vue.component('help-button', HelpButton); diff --git a/src/admin/js/theme-main.js b/src/admin/js/theme-main.js index 4235f0c65..3078c6ad3 100644 --- a/src/admin/js/theme-main.js +++ b/src/admin/js/theme-main.js @@ -5,18 +5,6 @@ import VTooltip from 'v-tooltip'; import VueMasonry from 'vue-masonry-css'; // Custom elements -import Text from '../../classes/metadata-types/text/Text.vue'; -import Textarea from '../../classes/metadata-types/textarea/Textarea.vue'; -import Selectbox from '../../classes/metadata-types/selectbox/Selectbox.vue'; -import Numeric from '../../classes/metadata-types/numeric/Numeric.vue'; -import Date from '../../classes/metadata-types/date/Date.vue'; -import Relationship from '../../classes/metadata-types/relationship/Relationship.vue'; -import Taxonomy from '../../classes/metadata-types/taxonomy/Taxonomy.vue'; - -import FormRelationship from '../../classes/metadata-types/relationship/FormRelationship.vue'; -import FormTaxonomy from '../../classes/metadata-types/taxonomy/FormTaxonomy.vue'; -import FormSelectbox from '../../classes/metadata-types/selectbox/FormSelectbox.vue'; - import FilterCustomInterval from '../../classes/filter-types/custom-interval/CustomInterval.vue'; import FilterNumeric from '../../classes/filter-types/numeric/Numeric.vue'; import FilterSelectbox from '../../classes/filter-types/selectbox/Selectbox.vue'; @@ -27,7 +15,6 @@ import FilterTaginput from '../../classes/filter-types/taginput/Taginput.vue'; import FilterTaxonomyCheckbox from '../../classes/filter-types/taxonomy/Checkbox.vue'; import FilterTaxonomyTaginput from '../../classes/filter-types/taxonomy/Taginput.vue'; -import TaincanFormItem from '../../classes/metadata-types/tainacan-form-item.vue'; import TaincanFiltersList from '../../classes/filter-types/tainacan-filter-item.vue'; import ItemsPage from '../pages/lists/items-page.vue'; import TermItemsPage from '../pages/lists/term-items-page.vue'; @@ -38,8 +25,6 @@ import ViewModeMasonry from '../../theme-helper/view-mode-masonry.vue'; import ViewModeSlideshow from '../../theme-helper/view-mode-slideshow.vue'; // Remaining imports -import HelpButton from '../components/other/help-button.vue'; -import draggable from 'vuedraggable' import store from '../../js/store/store' import routerTheme from './theme-router.js' import eventBusSearch from '../../js/event-bus-search'; @@ -54,19 +39,7 @@ Vue.use(UserPrefsPlugin); Vue.use(RouterHelperPlugin); Vue.use(ConsolePlugin, {visual: false}); -/* Metadata */ -Vue.component('tainacan-text', Text); -Vue.component('tainacan-textarea', Textarea); -Vue.component('tainacan-selectbox', Selectbox); -Vue.component('tainacan-numeric', Numeric); -Vue.component('tainacan-date', Date); -Vue.component('tainacan-relationship', Relationship); -Vue.component('tainacan-taxonomy', Taxonomy); -Vue.component('tainacan-form-relationship', FormRelationship); -Vue.component('tainacan-form-taxonomy', FormTaxonomy); -Vue.component('tainacan-form-selectbox', FormSelectbox); -Vue.component('tainacan-form-item', TaincanFormItem); Vue.component('tainacan-filter-item', TaincanFiltersList); /* Filters */ @@ -80,8 +53,6 @@ Vue.component('tainacan-filter-taxonomy-checkbox', FilterTaxonomyCheckbox); Vue.component('tainacan-filter-taxonomy-taginput', FilterTaxonomyTaginput); /* Others */ -Vue.component('help-button', HelpButton); -Vue.component('draggable', draggable); Vue.component('items-page', ItemsPage); Vue.component('term-items-page', TermItemsPage); diff --git a/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php b/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php index 28c150617..5663155ca 100644 --- a/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php +++ b/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php @@ -8,12 +8,10 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); */ class Autocomplete extends Filter_Type { - //protected $default_max_options = -1; - protected $use_max_options = false; - function __construct(){ $this->set_supported_types(['string','long_string','item']); $this->set_component('tainacan-filter-autocomplete'); + $this->set_use_max_options(false); $this->set_preview_template('