[Koha-bugs] [Bug 13943] Cancelling the deletion process of an item deletes item anyway

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 22 04:11:17 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13943

--- Comment #5 from David Cook <dcook at prosentient.com.au> ---
So Liz Rea is a genius! She pointed out that the problem only arises if the
screen is using the result browser!

For instance:

http://192.168.1.61:2112/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&searchid=scs_1429666452994

Deletes item after "Cancel".

http://192.168.1.61:2112/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1

Doesn't delete item after "Cancel".

--

The cause is in "koha-tmpl/intranet-tmpl/js/browser.js":

$('a[href*="biblionumber="]').click(function (ev) {
                        ev.preventDefault();
                        window.location = $(this).attr('href') + '&searchid=' +
me.searchid;
                    });

Basically, this is rewriting the URL for all the other links on the page, so
that when you click... "Edit", "Delete", "Normal", etc. you still have that
searchid parameter.

Now... it seems to me that the thing to do is either be more sophisticated with
the Javascript magic (i.e. parse the href, find the query string, add the
key=value appropriately, then set the href for the element before it browser
acts on it), or... handle it server-side.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list