Browse Source

[minor][fix] Image view gallery (#4388)

version-14
Faris Ansari 7 years ago
committed by GitHub
parent
commit
dd5bd8ef11
2 changed files with 4 additions and 3 deletions
  1. +4
    -1
      frappe/public/js/frappe/views/image/image_view.js
  2. +0
    -2
      frappe/public/less/list.less

+ 4
- 1
frappe/public/js/frappe/views/image/image_view.js View File

@@ -202,7 +202,10 @@ frappe.views.GalleryView = Class.extend({


this.pswp.listen('afterChange', function() { this.pswp.listen('afterChange', function() {
const images = images_map[this.currItem.name]; const images = images_map[this.currItem.name];
if (!images || images.length === 1) return;
if (!images || images.length === 1) {
$more_items.html('');
return;
}


hide_more_items_after_2s(); hide_more_items_after_2s();
const html = images.map(img_html).join(""); const html = images.map(img_html).join("");


+ 0
- 2
frappe/public/less/list.less View File

@@ -492,8 +492,6 @@
bottom: 12px; bottom: 12px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);

background-color: @bg
} }


.pswp__more-item { .pswp__more-item {


Loading…
Cancel
Save