From 7012121d082e1587c82fa5d9f0f4669ce2664ca5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 29 Apr 2016 19:01:10 +0100 Subject: [PATCH] Bug 16400: Let's hack the fixFloat plugin to fix our needs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On comment bug 11088 comment 2, Owen explained the problem with the fixFloat toolbar. Since we have a hidden div, the plugin does not manage to place the toolbar correctly. In order to make it work, this patch adds some changes to the plugin to add the ability to define our own offset. When the div is extended (+, filteraction_on), the offset should be updated to move the toolbar. Same when the div is folded (-, filteraction_off) Signed-off-by: Owen Leonard Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit c1f101e86c717ceaccf781de0f1c05dc23c8272a) Signed-off-by: Frédéric Demians --- .../lib/jquery/plugins/jquery.fixFloat.js | 11 +++-- .../prog/en/modules/members/memberentrygen.tt | 47 +++++++++++++------ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js index db0454c0c8..fb9ffcf344 100644 --- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js +++ b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.fixFloat.js @@ -3,13 +3,16 @@ */ (function ($, window) { "use strict"; - $.fn.fixFloat = function (options) { + $.fn.fixFloat = function (options={}) { + var tbh = $(this); var defaults = { - enabled: true + enabled: true, + originalOffset: tbh.position().top }; + var originalOffset = typeof options.originalOffset === 'undefined' + ? defaults.originalOffset + : options.originalOffset; options = $.extend(defaults, options); - var tbh = $(this); - var originalOffset = tbh.position().top; if (tbh.css('position') !== 'absolute') { var tbhBis = tbh.clone(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 12c1e83e37..9786cf325d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -3,10 +3,26 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %]) [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'calendar.inc' %]