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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/error-messages.inc (-108 lines)
Lines 1-108 Link Here
1
[% IF ( error ) %]
2
<script type='text/javascript'>
3
// Gratuitiously copied from http://dhtmlpopups.webarticles.org/basics.php
4
// Determine how much the visitor had scrolled
5
6
var scrolledX, scrolledY;
7
if( self.pageYOffset ) {
8
  scrolledX = self.pageXOffset;
9
  scrolledY = self.pageYOffset;
10
} else if( document.documentElement && document.documentElement.scrollTop ) {
11
  scrolledX = document.documentElement.scrollLeft;
12
  scrolledY = document.documentElement.scrollTop;
13
} else if( document.body ) {
14
  scrolledX = document.body.scrollLeft;
15
  scrolledY = document.body.scrollTop;
16
}
17
18
// Determine the coordinates of the center of the page
19
20
var centerX, centerY;
21
if( self.innerHeight ) {
22
  centerX = self.innerWidth;
23
  centerY = self.innerHeight;
24
} else if( document.documentElement && document.documentElement.clientHeight ) {
25
  centerX = document.documentElement.clientWidth;
26
  centerY = document.documentElement.clientHeight;
27
} else if( document.body ) {
28
  centerX = document.body.clientWidth;
29
  centerY = document.body.clientHeight;
30
}
31
32
function myPopupRelocate() {
33
 var scrolledX, scrolledY;
34
 if( self.pageYOffset ) {
35
   scrolledX = self.pageXOffset;
36
   scrolledY = self.pageYOffset;
37
 } else if( document.documentElement && document.documentElement.scrollTop ) {
38
   scrolledX = document.documentElement.scrollLeft;
39
   scrolledY = document.documentElement.scrollTop;
40
 } else if( document.body ) {
41
   scrolledX = document.body.scrollLeft;
42
   scrolledY = document.body.scrollTop;
43
 }
44
45
 var centerX, centerY;
46
 if( self.innerHeight ) {
47
   centerX = self.innerWidth;
48
   centerY = self.innerHeight;
49
 } else if( document.documentElement && document.documentElement.clientHeight ) {
50
   centerX = document.documentElement.clientWidth;
51
   centerY = document.documentElement.clientHeight;
52
 } else if( document.body ) {
53
   centerX = document.body.clientWidth;
54
   centerY = document.body.clientHeight;
55
 }
56
57
 var leftOffset = scrolledX + (centerX - 250) / 2;
58
 var topOffset = scrolledY + (centerY - 200) / 2;
59
60
 document.getElementById("mypopup").style.top = topOffset + "px";
61
 document.getElementById("mypopup").style.left = leftOffset + "px";
62
}
63
64
window.onload=function(){
65
 myPopupRelocate();
66
 document.getElementById("mypopup").style.display = "block";
67
 document.body.onscroll = myPopupRelocate;
68
 window.onscroll = myPopupRelocate;
69
}
70
</script>
71
<div id='mypopup' name='mypopup' style='position: absolute; width: 400px; height: 131px; display: none; background: #FFC url(/intranet-tmpl/prog/img/alert-bg.gif) repeat-x left 0; border: 1px solid #bcbcbc; right: 0px; top: 500px'>
72
    <span id="message" style="position: absolute; top: 5px; left: 5px;">
73
    <strong style="color: #900;">WARNING:</strong>
74
        [% IF ( 101 ) %]
75
        The database returned an error while [% IF ( card_element ) %]saving [% card_element %] [% element_id %][% ELSE %]attempting a save operation[% END %]. Please have your system administrator check the error log for details.
76
        [% ELSIF ( 102 ) %]
77
        The database returned an error while [% IF ( card_element ) %]deleting [% card_element %] [% element_id %][% ELSIF ( image_ids ) %][% image_ids %][% ELSE %]attempting a delete operation[% END %]. Please have your system administrator check the error log for details.
78
        [% ELSIF ( 201 ) %]
79
        An unsupported operation was attempted[% IF ( element_id ) %] on [% card_element %] [% element_id %][% END %]. Please have your system administrator check the error log for details.
80
        [% ELSIF ( 202 ) %]
81
        An error has occurred. Please ask your system administrator to check the error log for more details.
82
        [% ELSIF ( 203 ) %]
83
        A non-existent or invalid library code was supplied. Please <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">verify</a> that you have a library selected.
84
        [% ELSIF ( 301 ) %]
85
        An error has occurred while attempting to upload the image file. Please ask you system administrator to check the error log for more details.
86
        [% ELSIF ( 302 ) %]
87
        Image exceeds 500KB. Please resize and import again.
88
        [% ELSIF ( 303 ) %]
89
        The database image quota currently only allows a maximum of [% image_limit %] images to be stored at any one time. Please delete one or more images to free up quota space.
90
        [% ELSIF ( 401 ) %]
91
        An error has occurred and the item(s) was not added to batch [% batch_id %]. Please have your system administrator check the error log for details.
92
        [% ELSIF ( 402 ) %]
93
        The item(s) was not added because the library is not set. Please set your library before adding items to a batch.
94
        [% ELSIF ( 403 ) %]
95
        An error has occurred and the item(s) was not removed from batch [% batch_id %]. Please have your system administrator check the error log for details.
96
        [% ELSIF ( 404 ) %]
97
        An error has occurred and batch [% batch_id %] was not deleted.  Please have your system administrator check the error log for details.
98
        [% ELSIF ( 405 ) %]
99
        An error has occurred and batch [% batch_id %] not fully de-duplicated.
100
        [% ELSE %]
101
        [% END %]
102
    </span>
103
    <span id="close" style="position: absolute; top: 100px; left: 175px;">
104
        <input type='submit' value='Close' onClick='document.getElementById("mypopup").style.display = "none"'>
105
    </span>
106
</div>
107
[% END %]
108
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc (+35 lines)
Line 0 Link Here
1
[% IF ( error ) %]
2
<div class="dialog alert">
3
  <p>
4
    <strong>WARNING:</strong>
5
        [% IF ( 101 ) %]
6
        The database returned an error while [% IF ( card_element ) %]saving [% card_element %] [% element_id %][% ELSE %]attempting a save operation[% END %]. Please have your system administrator check the error log for details.
7
        [% ELSIF ( 102 ) %]
8
        The database returned an error while [% IF ( card_element ) %]deleting [% card_element %] [% element_id %][% ELSIF ( image_ids ) %][% image_ids %][% ELSE %]attempting a delete operation[% END %]. Please have your system administrator check the error log for details.
9
        [% ELSIF ( 201 ) %]
10
        An unsupported operation was attempted[% IF ( element_id ) %] on [% card_element %] [% element_id %][% END %]. Please have your system administrator check the error log for details.
11
        [% ELSIF ( 202 ) %]
12
        An error has occurred. Please ask your system administrator to check the error log for more details.
13
        [% ELSIF ( 203 ) %]
14
        A non-existent or invalid library code was supplied. Please <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">verify</a> that you have a library selected.
15
        [% ELSIF ( 301 ) %]
16
        An error has occurred while attempting to upload the image file. Please ask you system administrator to check the error log for more details.
17
        [% ELSIF ( 302 ) %]
18
        Image exceeds 500KB. Please resize and import again.
19
        [% ELSIF ( 303 ) %]
20
        The database image quota currently only allows a maximum of [% image_limit %] images to be stored at any one time. Please delete one or more images to free up quota space.
21
        [% ELSIF ( 401 ) %]
22
        An error has occurred and the item(s) was not added to batch [% batch_id %]. Please have your system administrator check the error log for details.
23
        [% ELSIF ( 402 ) %]
24
        The item(s) was not added because the library is not set. Please set your library before adding items to a batch.
25
        [% ELSIF ( 403 ) %]
26
        An error has occurred and the item(s) was not removed from batch [% batch_id %]. Please have your system administrator check the error log for details.
27
        [% ELSIF ( 404 ) %]
28
        An error has occurred and batch [% batch_id %] was not deleted.  Please have your system administrator check the error log for details.
29
        [% ELSIF ( 405 ) %]
30
        An error has occurred and batch [% batch_id %] not fully de-duplicated.
31
        [% ELSE %]
32
        [% END %]
33
  </p>
34
</div>
35
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-1 / +2 lines)
Lines 152-158 Link Here
152
                </div>
152
                </div>
153
153
154
154
155
                    [% INCLUDE 'error-messages.inc' %]
155
                    [% INCLUDE 'patroncards-batches-toolbar.inc' %]
156
                    [% INCLUDE 'patroncards-errors.inc' %]
156
                    <div class="yui-g">
157
                    <div class="yui-g">
157
                        <div class="yui-u first" id="manage-patroncard-batches">
158
                        <div class="yui-u first" id="manage-patroncard-batches">
158
                            <div class="hint">Current library: [% LoginBranchname %]</div>
159
                            <div class="hint">Current library: [% LoginBranchname %]</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-1 / +1 lines)
Lines 56-62 Link Here
56
    <div id="bd">
56
    <div id="bd">
57
        <div id="yui-main">
57
        <div id="yui-main">
58
            <div class="yui-b">
58
            <div class="yui-b">
59
                [% INCLUDE 'error-messages.inc' %]
59
                [% INCLUDE 'patroncards-errors.inc' %]
60
                <div class="yui-g">
60
                <div class="yui-g">
61
                    <div class="yui-u first">
61
                    <div class="yui-u first">
62
                        <h1>Upload Images</h1>
62
                        <h1>Upload Images</h1>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-2 / +1 lines)
Lines 108-114 Link Here
108
            <div id="yui-main">
108
            <div id="yui-main">
109
                <div class="yui-b">
109
                <div class="yui-b">
110
                    [% INCLUDE 'patroncards-toolbar.inc' %]
110
                    [% INCLUDE 'patroncards-toolbar.inc' %]
111
                    [% INCLUDE 'error-messages.inc' %]
111
                    [% INCLUDE 'patroncards-errors.inc' %]
112
                    <div class="yui-gc">
112
                    <div class="yui-gc">
113
                        <div class="yui-u first" id="manage-patroncards-layouts">
113
                        <div class="yui-u first" id="manage-patroncards-layouts">
114
                            <div class="hint">Current library: [% LoginBranchname %]</div>
114
                            <div class="hint">Current library: [% LoginBranchname %]</div>
115
- 

Return to bug 9924