Bugzilla – Attachment 6571 Details for
Bug 6740
can add items at ordering but not remove items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6740: can add items at ordering/receiving but not remove
Bug-6740-can-add-items-at-orderingreceiving-but-no.patch (text/plain), 4.04 KB, created by
Katrin Fischer
on 2011-12-05 06:31:02 UTC
(
hide
)
Description:
Bug 6740: can add items at ordering/receiving but not remove
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-12-05 06:31:02 UTC
Size:
4.04 KB
patch
obsolete
>From 0b32c8460b76fda00ff6e79ff435dd71561a1e64 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Mon, 5 Dec 2011 07:18:21 +0100 >Subject: [PATCH] Bug 6740: can add items at ordering/receiving but not remove > >The problem was, that the script was looking for the first >and second <a> tag in the code. When using plugins in the framework >this can't work. The patch changes the script to select the correct ><a> tags by using a class. > >Also changes + and - to 'Add' and 'Delete' to make the meaning clearer >and clicking on them a bit easier. > >To test: >1) AcqCreateItem = order >- Create a basket >- Create an order line >- Create more than one item >- Delete items >- Check quantity is calculated correctly >- Check items are created correctly > >2) AcqCreateItem = receive >- Create basket >- Create 2 order lines, order >1 items >- Do a partial item by removing items from the receive form >- Receive all missing items >- Receive more items than ordered >--- > koha-tmpl/intranet-tmpl/prog/en/js/additem.js | 5 +++-- > .../prog/en/modules/acqui/neworderempty.tt | 4 ++-- > .../prog/en/modules/acqui/orderreceive.tt | 4 ++-- > 3 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >index 8658324..efcb8eb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/additem.js >@@ -17,9 +17,10 @@ function cloneItemBlock(index) { > var CloneButtonPlus; > var CloneButtonMinus; > // try{ >- CloneButtonPlus = clone.getElementsByTagName('a')[0]; >+ var jclone = $(clone); >+ CloneButtonPlus = $("a.addItem", jclone).get(0); > CloneButtonPlus.setAttribute('onclick',"cloneItemBlock('" + index + random + "')"); >- CloneButtonMinus = clone.getElementsByTagName('a')[1]; >+ CloneButtonMinus = $("a.delItem", jclone).get(0); > CloneButtonMinus.setAttribute('onclick',"deleteItemBlock('" + index + random + "')"); > CloneButtonMinus.setAttribute('style',"display:inline"); > // change itemids of the clone >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index 68c290a..d58582e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -337,8 +337,8 @@ $(document).ready(function() > </div></li> > [% END %] > </ol> >- <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">+</a> >- <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">-</a> >+ <a class="addItem" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">Add</a> >+ <a class="delItem" style="display:none;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">Delete</a> > </div><!-- /iteminformation --> > </div> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 7147b19..ac39141 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -62,8 +62,8 @@ > </div></li> > [% END %] > </ol> >- <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">+</a> >- <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">-</a> >+ <a class="addItem" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">Add</a> >+ <a class="delItem" style="display:none;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">Delete</a> > </div><!-- /iteminformation --> > </div> > >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6740
:
6067
|
6127
|
6129
|
6571
|
6581