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

(-)a/C4/Auth.pm (+2 lines)
Lines 354-359 sub get_template_and_user { Link Here
354
        $template->param( dateformat => C4::Context->preference('dateformat') );
354
        $template->param( dateformat => C4::Context->preference('dateformat') );
355
    }
355
    }
356
356
357
    $template->param(auth_forwarded_hash => $in->{'query'}->param('auth_forwarded_hash'));
358
357
    # these template parameters are set the same regardless of $in->{'type'}
359
    # these template parameters are set the same regardless of $in->{'type'}
358
360
359
    # Set the using_https variable for templates
361
    # Set the using_https variable for templates
(-)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/koha-tmpl/intranet-tmpl/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/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 411-423 dd { Link Here
411
	font-weight : normal;
411
	font-weight : normal;
412
}
412
}
413
413
414
div#toolbar {
414
.btn-toolbar {
415
       background-color : #EDF4F6;
415
       background-color : #EDF4F6;
416
     padding: 5px 5px 5px 5px;
416
     padding: 5px 5px 5px 5px;
417
      border-radius: 5px 5px 0 0;
417
      border-radius: 5px 5px 0 0;
418
    border: 1px solid #E6F0F2;
418
    border: 1px solid #E6F0F2;
419
}
419
}
420
420
421
.btn-toolbar .yui-menu-button button,
422
.btn-toolbar .yui-button-button button {
423
	line-height : 1.7em;
424
}
425
421
ul.toolbar {
426
ul.toolbar {
422
	padding-left : 0;
427
	padding-left : 0;
423
}
428
}
Lines 2408-2415 video { Link Here
2408
    background-position:-48px -166px;
2413
    background-position:-48px -166px;
2409
}
2414
}
2410
2415
2411
#toolbar .btn,
2416
.btn-toolbar .btn,
2412
#toolbar .dropdown-menu {
2417
.btn-toolbar .dropdown-menu {
2413
    font-size: 13px;
2418
    font-size: 13px;
2414
}
2419
}
2415
a.btn:link,
2420
a.btn:link,
(-)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/svc/bib (-2 / +1 lines)
Lines 68-74 sub fetch_bib { Link Here
68
    my $biblionumber = shift;
68
    my $biblionumber = shift;
69
    my $record = GetMarcBiblio( $biblionumber, $query->url_param('items') );
69
    my $record = GetMarcBiblio( $biblionumber, $query->url_param('items') );
70
    if  (defined $record) {
70
    if  (defined $record) {
71
        print $query->header(-type => 'text/xml');
71
        print $query->header(-type => 'text/xml', -charset => 'utf-8');
72
        print $record->as_xml_record();
72
        print $record->as_xml_record();
73
    } else {
73
    } else {
74
        print $query->header(-type => 'text/xml', -status => '404 Not Found');
74
        print $query->header(-type => 'text/xml', -status => '404 Not Found');
75
- 

Return to bug 11559