Bugzilla – Attachment 52526 Details for
Bug 16490
Add an "add to cart" link for each search results in the staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16490: Tidy updateLink and updateAllLinks
Bug-16490-Tidy-updateLink-and-updateAllLinks.patch (text/plain), 1.99 KB, created by
Jonathan Druart
on 2016-06-19 10:40:15 UTC
(
hide
)
Description:
Bug 16490: Tidy updateLink and updateAllLinks
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-19 10:40:15 UTC
Size:
1.99 KB
patch
obsolete
>From 0b5b84651a760ae8f6646a96b9724a4fcd1b22a3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 18 Jun 2016 16:39:45 +0100 >Subject: [PATCH] Bug 16490: Tidy updateLink and updateAllLinks >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Went through test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/js/basket.js | 25 +++++++++---------------- > 1 file changed, 9 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/basket.js b/koha-tmpl/intranet-tmpl/prog/js/basket.js >index f3b5b4a..7971397 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/basket.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/basket.js >@@ -455,23 +455,16 @@ function hideCart(){ > $("#cartDetails").fadeOut("fast"); > } > >-function updateLink(val,op,target){ >- if(target){ >- if(op == "add"){ >- target.$("#cart"+val).html(MSG_ITEM_IN_CART).addClass("incart"); >- target.$("#cartR"+val).show(); >- } else { >- target.$("#cart"+val).html(MSG_ITEM_NOT_IN_CART).removeClass("incart").addClass("addtocart"); >- target.$("#cartR"+val).hide(); >- } >+function updateLink(val, op, target){ >+ var cart = target ? target.$("#cart" + val) : $("#cart" + val); >+ var cartR = target ? target.$("#cartR" + val) : $("#cartR" + val); >+ >+ if(op == "add"){ >+ cart.html(MSG_ITEM_IN_CART).addClass("incart"); >+ cartR.show(); > } else { >- if(op == "add"){ >- $("#cart"+val).html(MSG_ITEM_IN_CART).addClass("incart"); >- $("#cartR"+val).show(); >- } else { >- $("#cart"+val).html(MSG_ITEM_NOT_IN_CART).removeClass("incart").addClass("addtocart"); >- $("#cartR"+val).hide(); >- } >+ cart.html(MSG_ITEM_NOT_IN_CART).removeClass("incart").addClass("addtocart"); >+ cartR.hide(); > } > } > >-- >2.8.1
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 16490
:
51383
|
51384
|
52520
|
52522
|
52525
|
52526
|
52797
|
52798