View | Details | Raw Unified | Return to bug 29965
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt (-19 / +1 lines)
Lines 97-122 Link Here
97
        var authtypecode = "[% authtypecode | html %]";
97
        var authtypecode = "[% authtypecode | html %]";
98
    </script>
98
    </script>
99
    [% Asset.js("js/auth-finder-search.js") | $raw %]
99
    [% Asset.js("js/auth-finder-search.js") | $raw %]
100
    [% Asset.js("js/authorities-detail-modal.js") | $raw %]
100
    <script>
101
    <script>
101
        $(document).ready(function(){
102
            $(".authorizedheading a").on("click", function(e){
103
                e.preventDefault();
104
                var authid = $(this).data("authid");
105
106
                $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
107
                    var auth_detail = $(data).find("#authoritiestabs");
108
                    auth_detail.find("ul").remove();
109
                    $("#authorityDetail .modal-title").html(_("Authority") + " " + authid );
110
                    $("#authorityDetail .modal-body").html( auth_detail );
111
                });
112
113
                $("#authorityDetail").modal("show");
114
            });
115
            $("#authorityDetail").on("hidden.bs.modal", function(){
116
                $("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
117
                $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>");
118
            });
119
        });
120
        function jumpfull(page){
102
        function jumpfull(page){
121
            window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top');
103
            window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top');
122
        }
104
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt (-21 / +1 lines)
Lines 103-129 Link Here
103
103
104
[% MACRO jsinclude BLOCK %]
104
[% MACRO jsinclude BLOCK %]
105
    [% INCLUDE 'authorities_js.inc' %]
105
    [% INCLUDE 'authorities_js.inc' %]
106
    <script>
106
    [% Asset.js("js/authorities-detail-modal.js") | $raw %]
107
        $(document).ready(function(){
108
            $(".authorizedheading a").on("click", function(e){
109
                e.preventDefault();
110
                var authid = $(this).data("authid");
111
112
                $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
113
                    var auth_detail = $(data).find("#authoritiestabs");
114
                    auth_detail.find("ul").remove();
115
                    $("#authorityDetail .modal-title").html(_("Authority") + " " + authid );
116
                    $("#authorityDetail .modal-body").html( auth_detail );
117
                });
118
119
                $("#authorityDetail").modal("show");
120
            });
121
            $("#authorityDetail").on("hidden.bs.modal", function(){
122
                $("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
123
                $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>");
124
            });
125
        });
126
    </script>
127
[% END %]
107
[% END %]
128
108
129
[% INCLUDE 'intranet-bottom.inc' %]
109
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/authorities-detail-modal.js (-1 / +19 lines)
Line 0 Link Here
0
- 
1
$(document).ready(function(){
2
    $(".authorizedheading a").on("click", function(e){
3
        e.preventDefault();
4
        var authid = $(this).data("authid");
5
6
        $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
7
            var auth_detail = $(data).find("#authoritiestabs");
8
            auth_detail.find("ul").remove();
9
            $("#authorityDetail .modal-title").html(_("Authority") + " " + authid );
10
            $("#authorityDetail .modal-body").html( auth_detail );
11
        });
12
13
        $("#authorityDetail").modal("show");
14
    });
15
    $("#authorityDetail").on("hidden.bs.modal", function(){
16
        $("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
17
        $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>");
18
    });
19
});

Return to bug 29965