Bugzilla – Attachment 25036 Details for
Bug 11676
Loading shelving locations based on the item's homebranch instead of the user's logged-in branch.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Javascript bits.
Bug-11676---Loading-shelving-locations-based-on-th.patch (text/plain), 2.09 KB, created by
Olli-Antti Kivilahti
on 2014-02-04 17:41:50 UTC
(
hide
)
Description:
Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Javascript bits.
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-02-04 17:41:50 UTC
Size:
2.09 KB
patch
obsolete
>From a0c6f5df3fd58f22c84a7250692a4613104bc166 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Tue, 4 Feb 2014 19:39:02 +0200 >Subject: [PATCH] Bug 11676 - Loading shelving locations based on the item's > homebranch instead of the user's logged-in branch. Javascript bits. > >Makes the Shelving locations automatically refresh when the "Permanent location" (homebranch) >changes. >--- > .../prog/en/modules/cataloguing/additem.tt | 29 ++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 2e3ddc3..ae26576 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -14,7 +14,36 @@ > var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10)); > browser.show(); > >+//Fetch the Shelving locations using AJAX >+//Build the replacement HTML for the shelving location options >+//Then replace the existing HTML with this. >+function reloadShelvingLocations(homebranch) { >+ >+ $.ajax({ >+ url: "/cgi-bin/koha/svc/getAuthorisedValues.pl", >+ type: "POST", >+ dataType: 'json', >+ data: { 'category' : 'LOC', 'branch_limit' : homebranch }, >+ success: function(data, textStatus, jqXHR) { >+ >+ var html_replacement = '<option value="" selected="selected"></option>\n'; >+ for (var i in data) { >+ html_replacement += '<option value="'+data[i].authorised_value+'">'+data[i].lib+'</option>\n'; >+ } >+ $("select[id*='tag_952_subfield_c']").html(html_replacement); >+ } >+ }); >+} >+ >+ > $(document).ready(function(){ >+ >+ //Reload shelving location with AJAX if the "Permanent location" (homebranch) changes. >+ $("select[id*='tag_952_subfield_a']").change(function() { >+ reloadShelvingLocations(this.value); >+ }); >+ >+ > [% IF (popup) %] > [% IF (opisadd) %] > window.close(); >-- >1.8.1.2
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 11676
:
25034
|
25035
|
25036
|
25060
|
25061
|
25062
|
25064
|
25065
|
26796
|
26965