Bugzilla – Attachment 69419 Details for
Bug 19710
Move plugins templates javascript to the footer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19710: Move plugins templates javascript to the footer
Bug-19710-Move-plugins-templates-javascript-to-the.patch (text/plain), 3.17 KB, created by
Owen Leonard
on 2017-11-28 19:17:09 UTC
(
hide
)
Description:
Bug 19710: Move plugins templates javascript to the footer
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-11-28 19:17:09 UTC
Size:
3.17 KB
patch
obsolete
>From 4eefcaf6dad550403c5708aef65224bce65a2b8f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 28 Nov 2017 19:04:43 +0000 >Subject: [PATCH] Bug 19710: Move plugins templates javascript to the footer > >This patch modifies the staff client plugins template so that >JavaScript is included in the footer instead of the header. > >To test, apply the patch and test the JavaScript-driven features of >the modified template: > >- The plugins link should be bold in the sidebar menu. >- Choosing "Uninstall" for an installed plugin should trigger a > confirmation alert. >--- > .../prog/en/modules/plugins/plugins-home.tt | 24 +++++++++++++--------- > koha-tmpl/intranet-tmpl/prog/js/tools-menu.js | 2 ++ > 2 files changed, 16 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >index 29b9d75..0507e15 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >@@ -1,17 +1,8 @@ > [% USE KohaDates %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Plugins </title> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-<script type="text/javascript"> >- $(document).ready(function(){ >- $(".uninstall_plugin").on("click", function(){ >- $(".dropdown").removeClass("open"); >- var plugin_name = $(this).data("plugin-name"); >- return confirmDelete( _("Are you sure you want to uninstall the plugin %s?").format( plugin_name ) ); >- }); >- }); >-</script> > </head> > > <body id="plugins_plugins_home" class="plugins"> >@@ -142,5 +133,18 @@ > </div> > </div> > >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script> >+ [% INCLUDE 'calendar.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function(){ >+ $(".uninstall_plugin").on("click", function(){ >+ $(".dropdown").removeClass("open"); >+ var plugin_name = $(this).data("plugin-name"); >+ return confirmDelete( _("Are you sure you want to uninstall the plugin %s?").format( plugin_name ) ); >+ }); >+ }); >+ </script> >+[% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js >index 6a73363..1c2c64f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/tools-menu.js >@@ -8,6 +8,8 @@ > $('#navmenulist a[href$="/cgi-bin/koha/patron_lists/lists.pl"]').css('font-weight','bold'); > } else if ((path+location.search).indexOf("batchMod.pl?del=1") >= 0 ) { > $('#navmenulist a[href$="/cgi-bin/koha/tools/batchMod.pl?del=1"]').css('font-weight','bold'); >+ } else if (path.indexOf("plugins") >= 0 ) { >+ $('#navmenulist a[href$="/cgi-bin/koha/plugins/plugins-home.pl?method=tool"]').css('font-weight','bold'); > } else { > $('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold'); > } >-- >2.1.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 19710
:
69419
|
69421
|
69561