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

(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/search.js (-1 / +3 lines)
Lines 75-80 define( [ 'marc-record' ], function( MARC ) { Link Here
75
                if ( info.checked ) Search.includedServers.push( id );
75
                if ( info.checked ) Search.includedServers.push( id );
76
            } );
76
            } );
77
77
78
            if ( Search.includedServers.length == 0 ) return false;
79
78
            $.get(
80
            $.get(
79
                '/cgi-bin/koha/svc/cataloguing/metasearch',
81
                '/cgi-bin/koha/svc/cataloguing/metasearch',
80
                {
82
                {
Lines 106-112 define( [ 'marc-record' ], function( MARC ) { Link Here
106
        Fetch: function( options ) {
108
        Fetch: function( options ) {
107
            if ( !_last ) return;
109
            if ( !_last ) return;
108
            $.extend( _last.options, options );
110
            $.extend( _last.options, options );
109
            Search.Run( _last.servers, _last.q, _last.options );
111
            return Search.Run( _last.servers, _last.q, _last.options );
110
        }
112
        }
111
    };
113
    };
112
114
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-8 / +10 lines)
Lines 962-974 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
962
        } );
962
        } );
963
963
964
        $( document ).on( 'click', 'a.search-nav', function() {
964
        $( document ).on( 'click', 'a.search-nav', function() {
965
            $("#search-overlay").show();
965
            if ( Search.Fetch( { offset: $( this ).data( 'offset' ) } ) ) {
966
            Search.Fetch( { offset: $( this ).data( 'offset' ) } );
966
                $("#search-overlay").show();
967
            }
968
967
            return false;
969
            return false;
968
        });
970
        });
969
971
970
        $( document ).on( 'click', 'th[data-sort-label]', function() {
972
        $( document ).on( 'click', 'th[data-sort-label]', function() {
971
            $("#search-overlay").show();
972
            var direction;
973
            var direction;
973
974
974
            if ( $( this ).hasClass( 'sorting_asc' ) ) {
975
            if ( $( this ).hasClass( 'sorting_asc' ) ) {
Lines 977-985 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
977
                direction = 'asc';
978
                direction = 'asc';
978
            }
979
            }
979
980
980
            showSearchSorting( $( this ).data( 'sort-label' ), direction );
981
            if ( Search.Fetch( { sort_key: $( this ).data( 'sort-label' ), sort_direction: direction } ) ) {
982
                showSearchSorting( $( this ).data( 'sort-label' ), direction );
983
984
                $("#search-overlay").show();
985
            }
981
986
982
            Search.Fetch( { sort_key: $( this ).data( 'sort-label' ), sort_direction: direction } );
983
            return false;
987
            return false;
984
        });
988
        });
985
989
Lines 987-995 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
987
            var server = z3950Servers[ $( this ).closest('li').data('server-id') ];
991
            var server = z3950Servers[ $( this ).closest('li').data('server-id') ];
988
            server.checked = this.checked;
992
            server.checked = this.checked;
989
993
990
            if ( $('#search-results-ui').is( ':visible' ) ) {
994
            if ( $('#search-results-ui').is( ':visible' ) && Search.Fetch() ) {
991
                $("#search-overlay").show();
995
                $("#search-overlay").show();
992
                Search.Fetch();
993
            }
996
            }
994
        } );
997
        } );
995
998
996
- 

Return to bug 11559