From abe1a442ad99c93694652201e03ad9b1b951a606 Mon Sep 17 00:00:00 2001 From: Mateus Machado Luna Date: Mon, 11 Mar 2019 19:02:10 -0300 Subject: [PATCH] Marginless items grid when no title exists. Fetch only for loading items. --- .../css/tainacan-gutenberg-blocks-style.css | 13 +++++++++++++ .../css/tainacan-gutenberg-blocks-style.css.map | 2 +- .../tainacan-items/items-list/index.js | 13 +++++++++---- .../tainacan-items/items-list/items-list.scss | 17 +++++++++++++++-- 4 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/assets/css/tainacan-gutenberg-blocks-style.css b/src/assets/css/tainacan-gutenberg-blocks-style.css index 26209954c..e8d3f2a96 100644 --- a/src/assets/css/tainacan-gutenberg-blocks-style.css +++ b/src/assets/css/tainacan-gutenberg-blocks-style.css @@ -223,6 +223,19 @@ display: flex; flex-direction: row; justify-content: center; } + .wp-block-tainacan-items-list ul.items-list.items-list-without-margin, + .wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin { + grid-template-columns: repeat(auto-fill, 185px) !important; + justify-content: center !important; + grid-template-rows: auto !important; } + .wp-block-tainacan-items-list ul.items-list.items-list-without-margin li, + .wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin li { + margin: 0 !important; + height: 185px !important; } + .wp-block-tainacan-items-list ul.items-list.items-list-without-margin li img, + .wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin li img { + height: 185px !important; + margin-bottom: 0px !important; } .wp-block-tainacan-items-list ul.items-list.items-layout-grid, .wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid { padding: 0; diff --git a/src/assets/css/tainacan-gutenberg-blocks-style.css.map b/src/assets/css/tainacan-gutenberg-blocks-style.css.map index d51451abd..b05d2d1fb 100644 --- a/src/assets/css/tainacan-gutenberg-blocks-style.css.map +++ b/src/assets/css/tainacan-gutenberg-blocks-style.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAAA,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAGhB,iDAAoB;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ACd,YAAY,EAAE,IAAI;EAG1B,kDAAoB;IAChB,UAAU,EAAE,iBAAiB;IAC7B,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,QAAQ;IACrB,eAAe,EAAE,aAAa;IAC9B,OAAO,EAAE,gBAAgB;IACzB,MAAM,EAAE,OAAO", "sources": ["../../gutenberg-blocks/tainacan-terms/terms-list/terms-list.scss","../../gutenberg-blocks/tainacan-items/items-list/items-list.scss"], "names": [], "file": "tainacan-gutenberg-blocks-style.css" diff --git a/src/gutenberg-blocks/tainacan-items/items-list/index.js b/src/gutenberg-blocks/tainacan-items/items-list/index.js index 9013c9d43..88bc7fb74 100644 --- a/src/gutenberg-blocks/tainacan-items/items-list/index.js +++ b/src/gutenberg-blocks/tainacan-items/items-list/index.js @@ -318,6 +318,7 @@ registerBlockType('tainacan/items-list', { @@ -554,7 +556,7 @@ registerBlockType('tainacan/items-list', { isLoadingItems: isLoadingItems }); - let endpoint = '/collection/'+ collectionId + '/items/?perpage=' + itemsPerPage; + let endpoint = '/collection/'+ collectionId + '/items/?fetch_only=title,thumbnail&perpage=' + itemsPerPage; if (title != undefined && title != '') endpoint += '&search=' + title; @@ -590,7 +592,7 @@ registerBlockType('tainacan/items-list', { if (itemsPage <= 1) modalItems = []; - let endpoint = '/collection/'+ collectionId + '/items/?&perpage=' + itemsPerPage + '&paged=' + itemsPage; + let endpoint = '/collection/'+ collectionId + '/items/?fetch_only=title,thumbnail&perpage=' + itemsPerPage + '&paged=' + itemsPage; isLoadingItems = true; itemsPage++; @@ -634,10 +636,12 @@ registerBlockType('tainacan/items-list', { function resetCollections() { collectionId = null; collectionPage = 1; + modalItems = []; setAttributes({ collectionId: collectionId, - collectionPage: collectionPage + collectionPage: collectionPage, + modalItems: false }); fetchModalCollections(); } @@ -825,10 +829,11 @@ registerBlockType('tainacan/items-list', { { isModalOpen && ( collectionId != null && collectionId != undefined ? renderItemsModalContent() : renderCollectionModalContent() ) } - +
diff --git a/src/gutenberg-blocks/tainacan-items/items-list/items-list.scss b/src/gutenberg-blocks/tainacan-items/items-list/items-list.scss index 5b2618d8b..d1b1b524b 100644 --- a/src/gutenberg-blocks/tainacan-items/items-list/items-list.scss +++ b/src/gutenberg-blocks/tainacan-items/items-list/items-list.scss @@ -15,8 +15,21 @@ } // Grid View Mode ---------------------------------------------------- - ul.items-list.items-list-without-margin { - + ul.items-list.items-list-without-margin, + ul.items-list-edit.items-list-without-margin { + grid-template-columns: repeat(auto-fill, 185px) !important; + justify-content: center !important; + grid-template-rows: auto !important; + + li { + margin: 0 !important; + height: 185px !important; + + img { + height: 185px !important; + margin-bottom: 0px !important; + } + } } ul.items-list.items-layout-grid, ul.items-list-edit.items-layout-grid {