Clicking on the "Close window" button on the print order page has no effect.

Files: 
CommentFileSizeAuthor
#11 1822582-admin-close-invoice.patch544 byteslongwave
PASSED: [[SimpleTest]]: [MySQL] 2,103 pass(es).
[ View ]
#6 1822582-admin-print-invoice-6.patch2.17 KBlongwave
PASSED: [[SimpleTest]]: [MySQL] 2,103 pass(es).
[ View ]
#5 1822582-admin-print-invoice.patch595 byteslongwave
PASSED: [[SimpleTest]]: [MySQL] 2,103 pass(es).
[ View ]
print-order-close-windows-button.png6.36 KBBegun

Comments

Status:Active» Postponed (maintainer needs more info)

Works for me in both Firefox and Chrome, what browser are you testing with?

The code is simple - it just uses onclick="window.close();" - so it should work in all browsers, unless you have JavaScript disabled or blocking this action for some reason.

Category:bug» support

Also tested this in IE, you get a popup warning you that the window is about to be closed, but there is nothing we can do about that.

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)

No further info provided. Perhaps a theming or JavaScript issue on this particular site.

Status:Closed (cannot reproduce)» Active

Actually, what happens for me in all browsers is that the "Printable Invoice" link found in the secondary tabs at admin/store/orders/%order/invoice just takes me to admin/store/orders/%order/invoice/print in the same window that I'm already in - it *doesn't* open a pop-up. In this case, the "Close window" button can't do anything. I'm using Seven as my admin theme. I never liked that pop-up, and I think I remember the pop-up never worked in the D7 port. I never brought that up as an issue because I like it better without the pop-up. I guess we could remove the close button though.

From the image in the original post, it seems the OP doesn't get a pop-up either.

It would be interesting to know why the pop-up works for longwave, as I can't find any code that would be responsible for that ...

Status:Active» Needs review
StatusFileSize
new595 bytes
PASSED: [[SimpleTest]]: [MySQL] 2,103 pass(es).
[ View ]

Forgot there are two different ways to get to this page.

For normal users, at e.g. /user/1/orders/1 they see a link with "Click to open a window with a printable invoice". This link opens a new window with JavaScript and the button works as expected here.

For admins, there is a link at /admin/store/orders/1/invoice which does not open in a new window, so the button does not work here.

The attached patch removes the link from the admin view. Alternatively we could force the admin link to open in a new window with one of the menu alter hooks, but I think removing the button is better.

StatusFileSize
new2.17 KB
PASSED: [[SimpleTest]]: [MySQL] 2,103 pass(es).
[ View ]

Improved version that doesn't rely on checking arg()

Status:Needs review» Needs work

The last submitted patch, 1822582-admin-print-invoice-6.patch, failed testing.

Unrelated fail in credit card test case

Raw "Your order is almost complete." found Other uc_store.test 153 UbercartTestHelper->checkout()
Found the Submit order button Other uc_store.test 156 UbercartTestHelper->checkout()

Status:Needs work» Needs review

#6: 1822582-admin-print-invoice-6.patch queued for re-testing.

...but this still doesn't work if you open the invoice from the action icon in the table at /user/1/orders.

Maybe we should just remove "Close window" altogether? It's not like users don't already know how to close a popup.

StatusFileSize
new544 bytes
PASSED: [[SimpleTest]]: [MySQL] 2,103 pass(es).
[ View ]

Sometimes the simplest patches are probably the best.

Status:Needs review» Fixed

Committed #11.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.