From ae13f80c7c926535bb865f541d86c1fe8f4e8e05 Mon Sep 17 00:00:00 2001 From: Donghuang Date: Fri, 24 Jun 2022 23:06:34 +0800 Subject: [PATCH] local product create bug fixes --- web/app/templates/local-product/create.hbs | 29 +++++++++++----------- web/package.json | 1 + 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/web/app/templates/local-product/create.hbs b/web/app/templates/local-product/create.hbs index 6ba6f83..6457fe5 100644 --- a/web/app/templates/local-product/create.hbs +++ b/web/app/templates/local-product/create.hbs @@ -8,23 +8,23 @@
- {{#each model.images as |image i|}} + {{#each model.images as |image index|}}
- {{input name=(concat 'imageTitles[' i ']') class='width-80' placeholder='Image title' value=image.title}} + {{input name=(concat 'imageTitles[' index ']') class='width-80' placeholder='Image title' value=image.title}}   - + {{#a-btn data-rel="tooltip" title="Remove Image" click=(route-action 'removeImage' image)}} - + {{/a-btn}}
- {{image-input name=(concat 'images[' i ']') image=image}} + {{image-input name=(concat 'images[' index ']') image=image}}
{{/each}}
@@ -36,24 +36,23 @@
- {{#each model.attachments as |attachment i|}} + {{#each model.attachments as |attachment index|}}
- {{input name=(concat 'attachmentTitles[' i ']') class='width-80' placeholder='Attachment name' value=image.title}} + {{input name=(concat 'attachmentTitles[' index ']') class='width-80' placeholder='Attachment name' value=image.title}}   - + {{#a-btn data-rel="tooltip" title="Remove Attachment" click=(route-action 'removeAttachment' attachment)}} - + {{/a-btn}}
- {{!input type='file'}} - {{file-input name=(concat 'attachments[' i ']') file=attachment}} + {{file-input name=(concat 'attachments[' index ']') file=attachment}}
{{/each}}
diff --git a/web/package.json b/web/package.json index b7ec519..049810c 100644 --- a/web/package.json +++ b/web/package.json @@ -16,6 +16,7 @@ "author": "Shaun Chyxion", "license": "MIT", "devDependencies": { + "@ember/jquery": "1.1.0", "@ember/optional-features": "^1.3.0", "@ember/test-helpers": "^2.8.1", "bootbox": "5.1.3",