[Koha-bugs] [Bug 21016] New: Plugins: Expand usage of opac_js method, or create intranet_js

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 29 11:54:48 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21016

            Bug ID: 21016
           Summary: Plugins: Expand usage of opac_js method, or create
                    intranet_js
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: andrew.isherwood at ptfs-europe.com
        QA Contact: testopia at bugs.koha-community.org

There is an opac_js method which gives the opportunity for a plugin to return
some Javascript to be embedded in the OPAC. I propose that we either make this
method more generic, perhaps, plugin_js, so it can reasonably be used for JS
for either the OPAC or intranet, or we add an intranet_js method for embedding
JS in plugins that touch the staff client.

I suspect there's a use case for a plugin wanting to return different JS for
the OPAC and staff client, so the latter idea might be preferable.

The inspiration for this proposal is the CLA Check Permissions plugin (Bug
20968), the current workflow is a bit clunky with the button on the Bib toolbar
taking the user to a page generated by the plugin, on which the main Javascript
is run, opening a modal. The plugin has no use for the additional page, but is
necessary to run the Javascript. The proposal would allow us to run the
Javascript directly in the Bib view, which would make for a better UX.

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


More information about the Koha-bugs mailing list