diff --git a/build.sh b/build.sh index 2b75c8a86..57c66af03 100755 --- a/build.sh +++ b/build.sh @@ -73,6 +73,7 @@ rsync -axz --exclude='vendor/bin/phpc*' --exclude='vendor/squizlabs' --exclude=' --exclude='pdf-viewer/pdfjs-dist/web/compressed.tracemonkey-pldi-09.pdf' \ --exclude='vendor/tecnickcom/tcpdf/fonts' \ --exclude='vendor/smalot/pdfparser/src/Smalot/PdfParser/Tests/' \ + --exclude='vendor/tecnickcom/tcpdf/examples' \ src/* $wp_plugin_dir/ rm -rf $wp_plugin_dir/scss diff --git a/package-lock.json b/package-lock.json index 71ce1e51c..9e6ec88b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1951,9 +1951,9 @@ } }, "buefy": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.8.5.tgz", - "integrity": "sha512-yGQUhIsZWTodCx1rpfDTA32v5OjILpDIDAP+X6KoE6du3F3EZwJ/k5aT8D6Ba6AxNzVdDa2M7f0hzMddLbm38A==", + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.8.6.tgz", + "integrity": "sha512-7woxrdwANcnJbe7lofPxkJLGRRGIVwFXOo0kzEpiNB6alQj18NV6UrdAKse+LWCOADz+AeHe5gyc6qdgRjG5mw==", "requires": { "bulma": "0.7.5" } diff --git a/package.json b/package.json index 31ca65333..9adf8c99c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "axios": "^0.19.0", - "buefy": "^0.8.5", + "buefy": "^0.8.6", "bulma": "^0.7.5", "mdi": "^2.2.43", "moment": "^2.22.2", diff --git a/src/admin/class-tainacan-admin.php b/src/admin/class-tainacan-admin.php index 8f9527454..a692af8af 100644 --- a/src/admin/class-tainacan-admin.php +++ b/src/admin/class-tainacan-admin.php @@ -41,14 +41,14 @@ class Admin { array( &$this, 'admin_page' ), plugin_dir_url( __FILE__ ) . 'images/tainacan_logo_symbol.svg' ); - - add_submenu_page( - $this->menu_slug, - __('System check', 'tainacan'), - __('System check', 'tainacan'), - 'manage_options', - 'tainacan_systemcheck', - array( &$this, 'systemcheck_page' ) + + add_submenu_page( + $this->menu_slug, + __('System check', 'tainacan'), + __('System check', 'tainacan'), + 'manage_options', + 'tainacan_systemcheck', + array( &$this, 'systemcheck_page' ) ); add_action( 'load-' . $page_suffix, array( &$this, 'load_admin_page' ) ); @@ -57,6 +57,7 @@ class Admin { function load_admin_page() { add_action( 'admin_enqueue_scripts', array( &$this, 'add_admin_css' ), 90 ); add_action( 'admin_enqueue_scripts', array( &$this, 'add_admin_js' ), 90 ); + add_action( 'admin_enqueue_scripts', array(&$this, 'add_theme_files') ); } @@ -74,18 +75,18 @@ class Admin { function add_theme_files() { global $TAINACAN_BASE_URL; - + // wp_enqueue_style( 'style', $TAINACAN_BASE_URL . '/assets/css/fonts/materialdesignicons.css' ); wp_enqueue_style( 'tainacan-fonts', $TAINACAN_BASE_URL . '/assets/css/fonts/tainacanicons.css', [], TAINACAN_VERSION ); wp_enqueue_style( 'roboto-fonts', 'https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i', [], TAINACAN_VERSION ); wp_enqueue_script('underscore'); } - + function add_admin_css() { global $TAINACAN_BASE_URL; - + wp_enqueue_style( 'tainacan-admin-page', $TAINACAN_BASE_URL . '/assets/css/tainacan-admin.css', [], TAINACAN_VERSION ); - + // $undesired_wp_styles = [ // 'admin-menu', // 'admin-bar', @@ -119,14 +120,14 @@ class Admin { // // wp_dequeue_style( $undesired_wp_styles ); // wp_deregister_style( $undesired_wp_styles ); - + } - + function add_admin_js() { global $TAINACAN_BASE_URL; wp_enqueue_script( 'tainacan-user-admin', $TAINACAN_BASE_URL . '/assets/user_admin-components.js', ['underscore', 'media-editor', 'media-views', 'customize-controls'], TAINACAN_VERSION, true ); - + $settings = $this->get_admin_js_localization_params(); wp_localize_script( 'tainacan-user-admin', 'tainacan_plugin', $settings ); @@ -134,23 +135,23 @@ class Admin { wp_enqueue_script('underscore'); wp_enqueue_script('jcrop'); wp_enqueue_script( 'customize-controls' ); - + do_action('tainacan-enqueue-admin-scripts'); - + } - + /** * Also used by DevInterface */ function get_admin_js_localization_params() { global $TAINACAN_BASE_URL, $TAINACAN_API_MAX_ITEMS_PER_PAGE; - + $Tainacan_Collections = \Tainacan\Repositories\Collections::get_instance(); $Tainacan_Metadata = \Tainacan\Repositories\Metadata::get_instance(); $Tainacan_Filters = \Tainacan\Repositories\Filters::get_instance(); $Tainacan_Items = \Tainacan\Repositories\Items::get_instance(); $Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance(); - + $tainacan_admin_i18n = require( 'tainacan-admin-i18n.php' ); $entities_labels = [ @@ -222,33 +223,33 @@ class Admin { } $filter_types = $Tainacan_Filters->fetch_filter_types(); - + foreach ( $filter_types as $index => $filter_type){ $class = new $filter_type; $settings['i18n']['helpers_label'][$class->get_component()] = $class->get_form_labels(); } - + $settings['form_hooks'] = Admin_Hooks::get_instance()->get_registered_hooks(); - + $wp_post_types = get_post_types(['show_ui' => true], 'objects'); if (isset($wp_post_types['attachment'])) { unset($wp_post_types['attachment']); } - + $wp_post_types = array_map(function($i) { return [ 'slug' => $i->name, 'label' => $i->label ]; }, $wp_post_types); - + $settings['wp_post_types'] = $wp_post_types; - + // add an alternative to enable select all items in all pages while we temporarly disable bulk edit for all (see #199) - $settings['enable_select_all_items_pages'] = defined('TAINACAN_ENABLE_SELECT_ALL_ITEMS_PAGES') ? TAINACAN_ENABLE_SELECT_ALL_ITEMS_PAGES : false; - + $settings['enable_select_all_items_pages'] = defined('TAINACAN_ENABLE_SELECT_ALL_ITEMS_PAGES') ? TAINACAN_ENABLE_SELECT_ALL_ITEMS_PAGES : false; + return $settings; - + } function admin_body_class( $classes ) { @@ -334,7 +335,7 @@ class Admin { wp_die(); } - + public function systemcheck_page() { require_once('system-check/class-tainacan-system-check.php'); $check = new System_Check(); diff --git a/src/admin/components/advanced-search/advanced-search.vue b/src/admin/components/advanced-search/advanced-search.vue index fda56ef69..a57565a40 100644 --- a/src/admin/components/advanced-search/advanced-search.vue +++ b/src/admin/components/advanced-search/advanced-search.vue @@ -54,7 +54,7 @@ :value="`${metadatum.id}-${metadatum.metadata_type_options.taxonomy}-${metadatum.metadata_type_object.primitive_type}`" :key="metadatum.id" >{{ metadatum.name }} - + diff --git a/src/admin/components/bulk-edition/bulk-edition-modal.vue b/src/admin/components/bulk-edition/bulk-edition-modal.vue index f12fb76f8..98536d722 100644 --- a/src/admin/components/bulk-edition/bulk-edition-modal.vue +++ b/src/admin/components/bulk-edition/bulk-edition-modal.vue @@ -97,8 +97,6 @@ :maxtags="1" :class="{'is-field-history': bulkEditionProcedures[criterion].isDone}" :disabled="bulkEditionProcedures[criterion].isDone" - :id="getMetadataByID(bulkEditionProcedures[criterion].metadatumID).metadata_type_object.component + - '-' + getMetadataByID(bulkEditionProcedures[criterion].metadatumID).slug" :is="getMetadataByID(bulkEditionProcedures[criterion].metadatumID).metadata_type_object.component" :metadatum="{metadatum: getMetadataByID(bulkEditionProcedures[criterion].metadatumID)}" class="tainacan-bulk-edition-field" @@ -152,8 +150,6 @@ :maxtags="1" :class="{'is-field-history': bulkEditionProcedures[criterion].isDone}" :disabled="bulkEditionProcedures[criterion].isDone || bulkEditionProcedures[criterion].isExecuting" - :id="getMetadataByID(bulkEditionProcedures[criterion].metadatumID).metadata_type_object.component + - '-' + getMetadataByID(bulkEditionProcedures[criterion].metadatumID).slug" :is="getMetadataByID(bulkEditionProcedures[criterion].metadatumID).metadata_type_object.component" :metadatum="{metadatum: getMetadataByID(bulkEditionProcedures[criterion].metadatumID)}" class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last" diff --git a/src/admin/components/edition/collection-edition-form.vue b/src/admin/components/edition/collection-edition-form.vue index 4850da6b5..a9576a8b7 100644 --- a/src/admin/components/edition/collection-edition-form.vue +++ b/src/admin/components/edition/collection-edition-form.vue @@ -182,7 +182,7 @@
@@ -232,7 +232,7 @@ - + diff --git a/src/admin/components/edition/importer-edition-form.vue b/src/admin/components/edition/importer-edition-form.vue index 6fba81d86..f078d1f07 100644 --- a/src/admin/components/edition/importer-edition-form.vue +++ b/src/admin/components/edition/importer-edition-form.vue @@ -48,7 +48,7 @@ @@ -491,7 +491,7 @@ export default { .source-file-upload { width: 100%; - display: grid; + @include display-grid; } .selected-source-file { diff --git a/src/admin/components/edition/importer-mapping-form.vue b/src/admin/components/edition/importer-mapping-form.vue index 9a2472857..63b13d941 100644 --- a/src/admin/components/edition/importer-mapping-form.vue +++ b/src/admin/components/edition/importer-mapping-form.vue @@ -74,7 +74,7 @@ {{ metadatum.name }} - ({{ $i18n.get(metadatum.metadata_type_object.component) }}) {{ (metadatum.collection_id != collectionId) ? $i18n.get('label_inherited') : '' }} + ({{ metadatum.metadata_type_object.name }}) {{ (metadatum.collection_id != collectionId) ? $i18n.get('label_inherited') : '' }} @@ -93,7 +93,9 @@ + trap-focus + aria-modal + aria-role="dialog">
+ trap-focus + aria-modal + aria-role="dialog">

{{ $i18n.get('instruction_write_text') }}

@@ -250,11 +252,11 @@ :active.sync="isURLModalActive" :width="640" scroll="keep" - trap-focus - autofocus + trap-focus role="dialog" tabindex="-1" - aria-modal> + aria-modal + aria-role="dialog">

{{ $i18n.get('instruction_insert_url') }}

diff --git a/src/admin/components/edition/item-metadata-bulk-edition-form.vue b/src/admin/components/edition/item-metadata-bulk-edition-form.vue index d9abc1cc1..c3742fd6c 100644 --- a/src/admin/components/edition/item-metadata-bulk-edition-form.vue +++ b/src/admin/components/edition/item-metadata-bulk-edition-form.vue @@ -115,7 +115,7 @@ * - + @@ -132,8 +132,6 @@ :metadatum="{ metadatum: metadatum }" :value="itemMetadata[index].value" @input="clearErrorMessage(metadatum.id); bulkEdit($event, metadatum)"/> -
diff --git a/src/admin/components/edition/metadatum-edition-form.vue b/src/admin/components/edition/metadatum-edition-form.vue index 217194366..2c7eeb39e 100644 --- a/src/admin/components/edition/metadatum-edition-form.vue +++ b/src/admin/components/edition/metadatum-edition-form.vue @@ -150,7 +150,7 @@ - + diff --git a/src/admin/components/edition/term-edition-form.vue b/src/admin/components/edition/term-edition-form.vue index 60675b3bc..1b6b568e7 100644 --- a/src/admin/components/edition/term-edition-form.vue +++ b/src/admin/components/edition/term-edition-form.vue @@ -5,6 +5,15 @@ @submit.prevent="saveEdition(editForm)">
@@ -22,7 +31,7 @@ * + :message="$i18n.get('info_help_term_name')"/> @@ -181,16 +201,6 @@ {{ $i18n.get('cancel') }}
-
- - \ No newline at end of file diff --git a/src/classes/metadata-types/taxonomy/TaxonomyCheckbox.vue b/src/classes/metadata-types/taxonomy/TaxonomyCheckbox.vue index 2f709bce8..ffb53a8f8 100644 --- a/src/classes/metadata-types/taxonomy/TaxonomyCheckbox.vue +++ b/src/classes/metadata-types/taxonomy/TaxonomyCheckbox.vue @@ -3,7 +3,7 @@

- {{ $i18n.get('label_selected_terms') + ' :' }} + {{ $i18n.get('label_selected_terms') + ':' }}

- -
- - {{ option.name }} - -
+

+ {{ (isShowingAllTerms ? $i18n.get('label_available_terms') : $i18n.get('label_some_available_terms')) + ':' }} +

+ +
+ + {{ + $i18n.get('info_showing_terms') + 1 + + $i18n.get('info_to') + options.length + + $i18n.get('info_of') + totalTerms + '. ' + }} + + + {{ $i18n.get('label_view_all') + ' ' + totalTerms + '.' }} +
- diff --git a/src/classes/metadata-types/taxonomy/TaxonomyRadio.vue b/src/classes/metadata-types/taxonomy/TaxonomyRadio.vue index 79f5df3c6..23e57cce8 100644 --- a/src/classes/metadata-types/taxonomy/TaxonomyRadio.vue +++ b/src/classes/metadata-types/taxonomy/TaxonomyRadio.vue @@ -3,7 +3,7 @@

- {{ $i18n.get('label_selected_terms') + ' :' }} + {{ $i18n.get('label_selected_term') + ':' }}

+ @close="clearInput()"> {{ selectedTagsName[value] }}
@@ -24,43 +24,79 @@ v-if="isSelectedTermsLoading" class="control has-icons-right is-loading is-clearfix" /> - - {{ $i18n.get('clear_radio') }} - -
+

+ {{ (isShowingAllTerms ? $i18n.get('label_available_terms') : $i18n.get('label_some_available_terms')) + ':' }} +

+ +
+ + {{ + $i18n.get('info_showing_terms') + 1 + + $i18n.get('info_to') + options.length + + $i18n.get('info_of') + totalTerms + '. ' + }} + + + {{ $i18n.get('label_view_all') + ' ' + totalTerms + '.' }} +
\ No newline at end of file + + + \ No newline at end of file diff --git a/src/classes/metadata-types/taxonomy/TaxonomyTaginput.vue b/src/classes/metadata-types/taxonomy/TaxonomyTaginput.vue index 05a654d77..b3cc69d70 100644 --- a/src/classes/metadata-types/taxonomy/TaxonomyTaginput.vue +++ b/src/classes/metadata-types/taxonomy/TaxonomyTaginput.vue @@ -1,6 +1,7 @@