[Koha-patches] [PATCH] Bug 12116 - Move fixFloat jQuery plugin outside of language-specific directory

Owen Leonard oleonard at myacpl.org
Mon Apr 21 18:44:23 CEST 2014


This patch moves the fixFloat jQuery plugin to
intranet-tmpl/prog/lib/jquery/plugins so that it will not be duplicated
for each set of translated templates.

This patch also includes a change to staff-global.css to override some
style the floating toolbar inherited when we added Bootstrap widgets.

To test, apply the patch and confirm that the toolbar "sticks" to the
top of the screen when scrolling down on the following pages:

- System preferences
- Authorities editor (Authorities -> New authority)
- Cataloging editor (Cataloging -> New record)
- List contents view (Lists -> View a list's contents)
---
 .../en => }/lib/jquery/plugins/jquery.fixFloat.js  |    0
 .../intranet-tmpl/prog/en/css/staff-global.css     |    7 +++++++
 .../prog/en/modules/admin/preferences.tt           |    2 +-
 .../prog/en/modules/authorities/authorities.tt     |    2 +-
 .../prog/en/modules/cataloguing/addbiblio.tt       |    2 +-
 .../prog/en/modules/virtualshelves/shelves.tt      |    2 +-
 6 files changed, 11 insertions(+), 4 deletions(-)
 rename koha-tmpl/intranet-tmpl/{prog/en => }/lib/jquery/plugins/jquery.fixFloat.js (100%)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js
similarity index 100%
rename from koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js
rename to koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js
diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
index 8abe90d..1db0427 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -2611,11 +2611,18 @@ fieldset.rows table.mceListBox {
 }
 
 /* Class to be added to toolbar when it starts being fixed at the top of the screen*/
+
 .floating {
     -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
     box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
 }
 
+div#toolbar.floating,
+#searchheader.floating {
+    border-radius: 0;
+    margin-top: 0;
+}
+
 .inline {
     display : inline;
 }
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
index f81f1a9..63ecaaf 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
@@ -7,7 +7,7 @@
 [% IF ( bidi ) %]
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" />
 [% END %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript">
 //<![CDATA[
     [% UNLESS ( searchfield ) %]$(document).ready(function(){
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
index ae61553..e8afb18 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
@@ -1,7 +1,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha › Authorities › [% IF ( authid ) %]Modify authority #[% authid %] ([% authtypetext %])[% ELSE %]Adding authority ([% authtypetext %])[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
 
 <script type="text/javascript">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
index 286e8b7..5ebc0e1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
@@ -2,7 +2,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha › Cataloging › [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
 [% INCLUDE 'browser-strings.inc' %]
 <!--[if lt IE 9]>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
index 453f108..d9ee3d1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
@@ -3,7 +3,7 @@
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( viewshelf ) %]
     <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
-    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 [% END %]
 <script type="text/javascript">
 //<![CDATA[ 
-- 
1.7.9.5


More information about the Koha-patches mailing list