Browse Source

Fix product attached image styles

Vova Tkach 5 years ago
parent
commit
2238827d8e

+ 4 - 0
assets/cp.styles.css

@@ -995,6 +995,10 @@ ul.pagination {
 	border-radius: .25rem;
 	border-radius: .25rem;
 }
 }
 
 
+#list-images .attached-img a {
+	display: block;
+}
+
 #list-images .attached-img a img {
 #list-images .attached-img a img {
 	width: 100px;
 	width: 100px;
 	height: 100px;
 	height: 100px;

File diff suppressed because it is too large
+ 0 - 0
assets/cp.styles.css.go


+ 1 - 1
modules/module_shop.go

@@ -241,7 +241,7 @@ func (this *Modules) shop_GetAllProductImages(wrap *wrapper.Wrapper, product_id
 		for rows.Next() {
 		for rows.Next() {
 			err = rows.Scan(scan...)
 			err = rows.Scan(scan...)
 			if err == nil {
 			if err == nil {
-				result += `<div class="attached-img"><a href="/products/images/` + html.EscapeString(string(values[0])) + `/` + html.EscapeString(string(values[1])) + `" title="` + html.EscapeString(string(values[1])) + `" target="_blank"><img src="/products/images/` + string(values[0]) + `/thumb-0-` + string(values[1]) + `" onerror="fave.ShopProductsRetryImage(this);" /></a>, <a href="javascript:fave.ShopProductsDeleteImage(this, ` + html.EscapeString(string(values[0])) + `, '` + html.EscapeString(string(values[1])) + `');">Delete</a></div>`
+				result += `<div class="attached-img"><a href="/products/images/` + html.EscapeString(string(values[0])) + `/` + html.EscapeString(string(values[1])) + `" title="` + html.EscapeString(string(values[1])) + `" target="_blank"><img src="/products/images/` + string(values[0]) + `/thumb-0-` + string(values[1]) + `" onerror="fave.ShopProductsRetryImage(this);" /></a><a href="javascript:fave.ShopProductsDeleteImage(this, ` + html.EscapeString(string(values[0])) + `, '` + html.EscapeString(string(values[1])) + `');">Delete</a></div>`
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
modules/module_shop_act_upload_image.go

@@ -74,7 +74,7 @@ func (this *Modules) RegisterAction_ShopUploadImage() *Action {
 									}
 									}
 									return nil
 									return nil
 								}); err == nil {
 								}); err == nil {
-									wrap.Write(`$('#list-images').append('<div class="attached-img"><a href="/products/images/` + pf_id + `/` + target_file_name + `" title="` + target_file_name + `" target="_blank"><img src="/products/images/` + pf_id + `/thumb-0-` + target_file_name + `" onerror="fave.ShopProductsRetryImage(this);" /></a>, <a href="javascript:fave.ShopProductsDeleteImage(this, ` + pf_id + `, \'` + target_file_name + `\');">Delete</a></div>');`)
+									wrap.Write(`$('#list-images').append('<div class="attached-img"><a href="/products/images/` + pf_id + `/` + target_file_name + `" title="` + target_file_name + `" target="_blank"><img src="/products/images/` + pf_id + `/thumb-0-` + target_file_name + `" onerror="fave.ShopProductsRetryImage(this);" /></a><a href="javascript:fave.ShopProductsDeleteImage(this, ` + pf_id + `, \'` + target_file_name + `\');">Delete</a></div>');`)
 								}
 								}
 							}
 							}
 						}
 						}

Some files were not shown because too many files changed in this diff