diff --git a/.gitignore b/.gitignore index 338fc95..cc4eb47 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,6 @@ db/shopping.db *.swp version.txt deploy/varnish/default.vcl -*.zip \ No newline at end of file +*.zip +shopping_app/uploads/.uploads +!shopping_app/uploads/* diff --git a/shopping_app/static/css/split/layout.css b/shopping_app/static/css/split/layout.css index 5693ef0..81bad2f 100644 --- a/shopping_app/static/css/split/layout.css +++ b/shopping_app/static/css/split/layout.css @@ -1739,6 +1739,28 @@ input[type="checkbox"].form-check-input, .drag-handle { display: none !important; + align-items: center; + justify-content: center; + flex: 0 0 1.25rem; + width: 1.25rem; + min-width: 1.25rem; + height: 2.35rem; + margin: 0 -.25rem 0 0; + padding: 0 !important; + border: 0 !important; + border-radius: 0 !important; + background: transparent !important; + box-shadow: none !important; + color: currentColor; + opacity: .78; + font: inherit; + font-size: 1.55rem; + font-weight: 700; + line-height: 1; + appearance: none; + -webkit-appearance: none; + user-select: none; + touch-action: none; cursor: grab; } @@ -1746,6 +1768,13 @@ body.sorting-active .drag-handle { display: inline-flex !important; } +body.sorting-active .drag-handle:hover, +body.sorting-active .drag-handle:focus-visible { + opacity: 1; + background: transparent !important; + box-shadow: none !important; +} + body.sorting-active .shopping-item-row { cursor: grab; } diff --git a/shopping_app/static/js/functions.js b/shopping_app/static/js/functions.js index 1aac9d1..a38deec 100644 --- a/shopping_app/static/js/functions.js +++ b/shopping_app/static/js/functions.js @@ -443,6 +443,9 @@ function renderItem(item, isShare = window.IS_SHARE, optionsOrShowEditOnly = fal const iconBtn = 'btn btn-outline-light btn-sm shopping-action-btn'; const wideBtn = 'btn btn-outline-light btn-sm shopping-action-btn shopping-action-btn--wide'; + const dragHandleButton = canEditListItem + ? `` + : ''; const itemNameHtml = canEditListItem ? `` - : ''; - actionButtons += ` - ${dragHandleButton} `; } @@ -486,6 +484,7 @@ function renderItem(item, isShare = window.IS_SHARE, optionsOrShowEditOnly = fal li.innerHTML = `