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

(-)a/C4/Auth.pm (+2 lines)
Lines 302-307 sub get_template_and_user { Link Here
302
        $template->param(dateformat => C4::Context->preference('dateformat'))
302
        $template->param(dateformat => C4::Context->preference('dateformat'))
303
    }
303
    }
304
304
305
    $template->param(auth_forwarded_hash => $in->{'query'}->param('auth_forwarded_hash'));
306
305
    # these template parameters are set the same regardless of $in->{'type'}
307
    # these template parameters are set the same regardless of $in->{'type'}
306
    $template->param(
308
    $template->param(
307
            "BiblioDefaultView".C4::Context->preference("BiblioDefaultView")         => 1,
309
            "BiblioDefaultView".C4::Context->preference("BiblioDefaultView")         => 1,
(-)a/C4/Service.pm (-3 / +13 lines)
Lines 55-60 BEGIN { Link Here
55
55
56
our ( $query, $cookie );
56
our ( $query, $cookie );
57
57
58
sub _output {
59
    my ( $response, $status ) = @_;
60
61
    if ( $query->param( 'callback' ) ) {
62
        output_with_http_headers $query, $cookie, $query->param( 'callback' ) . '(' . $response->output . ');', 'js';
63
    } else {
64
        output_with_http_headers $query, $cookie, $response->output, 'json', $status;
65
    }
66
}
67
58
=head1 METHODS
68
=head1 METHODS
59
69
60
=head2 init
70
=head2 init
Lines 113-119 sub return_error { Link Here
113
    $response->param( message => $error ) if ( $error );
123
    $response->param( message => $error ) if ( $error );
114
    $response->param( type => $type, %flags );
124
    $response->param( type => $type, %flags );
115
125
116
    output_with_http_headers $query, $cookie, $response->output, 'json', '400 Bad Request';
126
    _output( $response, '400 Bad Request' );
117
    exit;
127
    exit;
118
}
128
}
119
129
Lines 159-165 sub return_multi { Link Here
159
        }
169
        }
160
170
161
        $response->param( 'multi' => JSON::true, responses => \@responses_formatted, @flags );
171
        $response->param( 'multi' => JSON::true, responses => \@responses_formatted, @flags );
162
        output_with_http_headers $query, $cookie, $response->output, 'json', '207 Multi-Status';
172
        _output( $response, '207 Multi-Status' );
163
    }
173
    }
164
174
165
    exit;
175
    exit;
Lines 177-183 exit with HTTP status 200. Link Here
177
sub return_success {
187
sub return_success {
178
    my ( $class, $response ) = @_;
188
    my ( $class, $response ) = @_;
179
189
180
    output_with_http_headers $query, $cookie, $response->output, 'json';
190
    _output( $response );
181
}
191
}
182
192
183
=head2 require_params
193
=head2 require_params
(-)a/C4/XSLT.pm (-15 / +24 lines)
Lines 42-47 BEGIN { Link Here
42
    $VERSION = 3.07.00.049;
42
    $VERSION = 3.07.00.049;
43
    @ISA = qw(Exporter);
43
    @ISA = qw(Exporter);
44
    @EXPORT = qw(
44
    @EXPORT = qw(
45
        &XSLTGetFilename
45
        &XSLTParse4Display
46
        &XSLTParse4Display
46
        &GetURI
47
        &GetURI
47
    );
48
    );
Lines 156-188 sub _get_best_default_xslt_filename { Link Here
156
    return $xslfilename;
157
    return $xslfilename;
157
}
158
}
158
159
159
sub XSLTParse4Display {
160
sub XSLTGetFilename {
160
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_;
161
    my ( $marcflavour, $xslsyspref ) = @_;
161
    my $xslfilename = C4::Context->preference($xslsyspref);
162
163
    my $xslfilename = $marcflavour eq C4::Context->preference('marcflavour') ? C4::Context->preference($xslsyspref) : 'default';
162
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
164
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
163
        my $htdocs;
165
        my $htdocs;
164
        my $theme;
166
        my $theme;
165
        my $lang = C4::Templates::_current_language();
167
        my $lang = C4::Templates::_current_language();
166
        my $xslfile;
168
        my $xslfile;
167
        if ($xslsyspref eq "XSLTDetailsDisplay") {
169
        if ($xslsyspref eq "XSLTDetailsDisplay") {
168
            $htdocs  = C4::Context->config('intrahtdocs');
170
            $htdocs = C4::Context->config('intrahtdocs');
169
            $theme   = C4::Context->preference("template");
171
            $theme = C4::Context->preference("template");
170
            $xslfile = C4::Context->preference('marcflavour') .
172
            $xslfile = $marcflavour .
171
                       "slim2intranetDetail.xsl";
173
                       "slim2intranetDetail.xsl";
172
        } elsif ($xslsyspref eq "XSLTResultsDisplay") {
174
        } elsif ($xslsyspref eq "XSLTResultsDisplay") {
173
            $htdocs  = C4::Context->config('intrahtdocs');
175
            $htdocs = C4::Context->config('intrahtdocs');
174
            $theme   = C4::Context->preference("template");
176
            $theme = C4::Context->preference("template");
175
            $xslfile = C4::Context->preference('marcflavour') .
177
            $xslfile = $marcflavour .
176
                        "slim2intranetResults.xsl";
178
                        "slim2intranetResults.xsl";
177
        } elsif ($xslsyspref eq "OPACXSLTDetailsDisplay") {
179
        } elsif ($xslsyspref eq "OPACXSLTDetailsDisplay") {
178
            $htdocs  = C4::Context->config('opachtdocs');
180
            $htdocs = C4::Context->config('opachtdocs');
179
            $theme   = C4::Context->preference("opacthemes");
181
            $theme = C4::Context->preference("opacthemes");
180
            $xslfile = C4::Context->preference('marcflavour') .
182
            $xslfile = $marcflavour .
181
                       "slim2OPACDetail.xsl";
183
                       "slim2OPACDetail.xsl";
182
        } elsif ($xslsyspref eq "OPACXSLTResultsDisplay") {
184
        } elsif ($xslsyspref eq "OPACXSLTResultsDisplay") {
183
            $htdocs  = C4::Context->config('opachtdocs');
185
            $htdocs = C4::Context->config('opachtdocs');
184
            $theme   = C4::Context->preference("opacthemes");
186
            $theme = C4::Context->preference("opacthemes");
185
            $xslfile = C4::Context->preference('marcflavour') .
187
            $xslfile = $marcflavour .
186
                       "slim2OPACResults.xsl";
188
                       "slim2OPACResults.xsl";
187
        }
189
        }
188
        $xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile);
190
        $xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile);
Lines 193-198 sub XSLTParse4Display { Link Here
193
        $xslfilename =~ s/\{langcode\}/$lang/;
195
        $xslfilename =~ s/\{langcode\}/$lang/;
194
    }
196
    }
195
197
198
    return $xslfilename;
199
}
200
201
sub XSLTParse4Display {
202
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_;
203
    my $xslfilename = XSLTGetFilename( C4::Context->preference( 'marcflavour' ), $xslsyspref );
204
196
    # grab the XML, run it through our stylesheet, push it out to the browser
205
    # grab the XML, run it through our stylesheet, push it out to the browser
197
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
206
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
198
    #return $record->as_formatted();
207
    #return $record->as_formatted();
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/humanmsg.css (-6 / +9 lines)
Lines 9-14 html, body { Link Here
9
}
9
}
10
10
11
.humanMsg {
11
.humanMsg {
12
    border-radius: 5px;
12
	font: normal 20px/50px Helvetica, Arial, Sans-Serif;
13
	font: normal 20px/50px Helvetica, Arial, Sans-Serif;
13
	letter-spacing: -1px;
14
	letter-spacing: -1px;
14
	position: fixed;
15
	position: fixed;
Lines 23-28 html, body { Link Here
23
	z-index: 100000;
24
	z-index: 100000;
24
}
25
}
25
26
27
.humanError {
28
	background-color: #400;
29
}
30
31
.humanSuccess {
32
	background-color: #040;
33
}
34
26
.humanMsg h3 {
35
.humanMsg h3 {
27
	margin: 0.3em;
36
	margin: 0.3em;
28
	margin-top: 0;
37
	margin-top: 0;
Lines 30-41 html, body { Link Here
30
	font-weight: bold;
39
	font-weight: bold;
31
}
40
}
32
41
33
.humanMsg .round {
34
    border-left: solid 2px white;
35
	border-right: solid 2px white;
36
    font-size: 1px; height: 2px;
37
	}
38
39
.humanMsg p {
42
.humanMsg p {
40
	margin: 0.3em;
43
	margin: 0.3em;
41
	}
44
	}
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-3 / +8 lines)
Lines 399-411 dd { Link Here
399
	font-weight : normal;
399
	font-weight : normal;
400
}
400
}
401
401
402
div#toolbar {
402
.btn-toolbar {
403
       background-color : #EDF4F6;
403
       background-color : #EDF4F6;
404
     padding: 5px 5px 5px 5px;
404
     padding: 5px 5px 5px 5px;
405
      border-radius: 5px 5px 0 0;
405
      border-radius: 5px 5px 0 0;
406
    border: 1px solid #E6F0F2;
406
    border: 1px solid #E6F0F2;
407
}
407
}
408
408
409
.btn-toolbar .yui-menu-button button,
410
.btn-toolbar .yui-button-button button {
411
	line-height : 1.7em;
412
}
413
409
ul.toolbar {
414
ul.toolbar {
410
	padding-left : 0;
415
	padding-left : 0;
411
}
416
}
Lines 2436-2443 video { Link Here
2436
    background-position:-48px -166px;
2441
    background-position:-48px -166px;
2437
}
2442
}
2438
2443
2439
#toolbar .btn,
2444
.btn-toolbar .btn,
2440
#toolbar .dropdown-menu {
2445
.btn-toolbar .dropdown-menu {
2441
    font-size: 13px;
2446
    font-size: 13px;
2442
}
2447
}
2443
a.btn:link,
2448
a.btn:link,
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js (-14 / +15 lines)
Lines 21-27 var humanMsg = { Link Here
21
		if (msgOpacity != undefined) humanMsg.msgOpacity = parseFloat(msgOpacity);
21
		if (msgOpacity != undefined) humanMsg.msgOpacity = parseFloat(msgOpacity);
22
22
23
		// Inject the message structure
23
		// Inject the message structure
24
		jQuery(appendTo).append('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><div id="'+humanMsg.msgID+'-contents"></div><div class="round"></div></div> <div id="'+humanMsg.logID+'"><p class="launcher">'+logName+'</p><ul></ul></div>')
24
		jQuery(appendTo).append('<div id="'+humanMsg.msgID+'" class="humanMsg"><div id="'+humanMsg.msgID+'-contents"></div></div> <div id="'+humanMsg.logID+'"><p class="launcher">'+logName+'</p><ul></ul></div>');
25
25
26
		jQuery('#'+humanMsg.logID+' p').click(
26
		jQuery('#'+humanMsg.logID+' p').click(
27
			function() { jQuery(this).siblings('ul').slideToggle() }
27
			function() { jQuery(this).siblings('ul').slideToggle() }
Lines 29-56 var humanMsg = { Link Here
29
	},
29
	},
30
30
31
	displayAlert: function(msg, options) {
31
	displayAlert: function(msg, options) {
32
		humanMsg.displayMsg(msg, options, true);
32
		humanMsg.displayMsg('<p>' + msg + '</p>', $.extend({log: false}, options), true);
33
	},
33
	},
34
34
35
	displayMsg: function(msg, options, is_alert) {
35
	displayMsg: function(msg, options) {
36
		if (msg == '')
36
		if (msg == '')
37
			return;
37
			return;
38
38
39
		if (options != undefined) {
39
        options = $.extend({
40
			delay = 'delay' in options ? parseInt(options.delay) * 1000 : 1000
40
            delay: 1000,
41
			life = 'life' in options ? parseInt(options.life) * 1000 : Infinity
41
            life: Infinity,
42
		} else {
42
            log: true,
43
			delay = 1000
43
            className: '',
44
			life = Infinity
44
        }, options);
45
		}
46
45
46
		clearTimeout(humanMsg.t1);
47
		clearTimeout(humanMsg.t2);
47
		clearTimeout(humanMsg.t2);
48
48
49
		// Inject message
49
		// Inject message
50
		jQuery('#'+humanMsg.msgID+'-contents').html(is_alert ? ('<p>' + msg + '</p>') : msg)
50
		jQuery('#'+humanMsg.msgID+'-contents').html(msg);
51
51
52
		// Show message
52
		// Show message
53
		jQuery('#'+humanMsg.msgID).show().animate({ opacity: humanMsg.msgOpacity}, 200, function() {
53
		jQuery('#'+humanMsg.msgID).attr('class', 'humanMsg ' + options.className).show().animate({ opacity: humanMsg.msgOpacity}, 200, function() {
54
            if ( !options.log ) return true;
54
			jQuery('#'+humanMsg.logID)
55
			jQuery('#'+humanMsg.logID)
55
				.show().children('ul').prepend('<li>'+msg+'</li>')	// Prepend message to log
56
				.show().children('ul').prepend('<li>'+msg+'</li>')	// Prepend message to log
56
				.children('li:first').slideDown(200)				// Slide it down
57
				.children('li:first').slideDown(200)				// Slide it down
Lines 64-72 var humanMsg = { Link Here
64
		})
65
		})
65
66
66
		// Watch for mouse & keyboard in `delay`
67
		// Watch for mouse & keyboard in `delay`
67
		humanMsg.t1 = setTimeout("humanMsg.bindEvents()", delay)
68
		humanMsg.t1 = setTimeout("humanMsg.bindEvents()", options.delay)
68
		// Remove message after `life`
69
		// Remove message after `life`
69
		humanMsg.t2 = setTimeout("humanMsg.removeMsg()", life)
70
		humanMsg.t2 = setTimeout("humanMsg.removeMsg()", options.life)
70
	},
71
	},
71
72
72
	bindEvents: function() {
73
	bindEvents: function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt (+8 lines)
Lines 78-81 Link Here
78
</div>
78
</div>
79
</div>
79
</div>
80
80
81
<script>
82
$(document).ready( function() {
83
    if ( document.location.hash ) {
84
        $( '#loginform' ).append( '<input name="auth_forwarded_hash" type="hidden" value="' + document.location.hash + '"/>' );
85
    }
86
} );
87
</script>
88
81
[% INCLUDE 'intranet-bottom.inc' %]
89
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (+1 lines)
Lines 5-10 Link Here
5
  xmlns:marc="http://www.loc.gov/MARC21/slim"
5
  xmlns:marc="http://www.loc.gov/MARC21/slim"
6
  xmlns:items="http://www.koha-community.org/items"
6
  xmlns:items="http://www.koha-community.org/items"
7
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
  xmlns="http://www.w3.org/1999/xhtml"
8
  exclude-result-prefixes="marc items">
9
  exclude-result-prefixes="marc items">
9
    <xsl:import href="MARC21slimUtils.xsl"/>
10
    <xsl:import href="MARC21slimUtils.xsl"/>
10
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
11
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-1 / +1 lines)
Lines 1-6 Link Here
1
<?xml version='1.0'?>
1
<?xml version='1.0'?>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
4
	<xsl:template name="datafield">
4
	<xsl:template name="datafield">
5
		<xsl:param name="tag"/>
5
		<xsl:param name="tag"/>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
(-)a/svc/bib (-2 / +1 lines)
Lines 62-68 sub fetch_bib { Link Here
62
    my $biblionumber = shift;
62
    my $biblionumber = shift;
63
    my $record = GetMarcBiblio( $biblionumber, $query->url_param('items') );
63
    my $record = GetMarcBiblio( $biblionumber, $query->url_param('items') );
64
    if  (defined $record) {
64
    if  (defined $record) {
65
        print $query->header(-type => 'text/xml');
65
        print $query->header(-type => 'text/xml', -charset => 'utf-8');
66
        print $record->as_xml_record();
66
        print $record->as_xml_record();
67
    } else {
67
    } else {
68
        print $query->header(-type => 'text/xml', -status => '404 Not Found');
68
        print $query->header(-type => 'text/xml', -status => '404 Not Found');
69
- 

Return to bug 11559