Lines 63-68
function verify_images() {
Link Here
|
63 |
if ( this.deleted == 1 ) { |
63 |
if ( this.deleted == 1 ) { |
64 |
$('#imagenumber-' + this.imagenumber).remove(); |
64 |
$('#imagenumber-' + this.imagenumber).remove(); |
65 |
} |
65 |
} |
|
|
66 |
if ( $('ul.thumbnails > li').length == 0 ) { |
67 |
showNoImageMessage(); |
68 |
} |
66 |
}); |
69 |
}); |
67 |
}, |
70 |
}, |
68 |
error: function(data) { |
71 |
error: function(data) { |
Lines 72-77
function verify_images() {
Link Here
|
72 |
|
75 |
|
73 |
} |
76 |
} |
74 |
|
77 |
|
|
|
78 |
function showNoImageMessage() { |
79 |
|
80 |
var no_images_msg = _("No images have been uploaded for this bibliographic record yet."); |
81 |
no_images_msg = '<p>' + no_images_msg + '</p>'; |
82 |
[% IF ( CAN_user_tools_upload_local_cover_images ) %] |
83 |
var please_upload = _("Please %supload%s one.").format( |
84 |
"<a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image'>", |
85 |
"</a>"); |
86 |
no_images_msg += "<p>" + please_upload + '</p>'; |
87 |
[% END %] |
88 |
|
89 |
$('#images').html(no_images_msg); |
90 |
} |
91 |
|
75 |
[% IF StaffDetailItemSelection %] |
92 |
[% IF StaffDetailItemSelection %] |
76 |
function selectAllItems(div) { |
93 |
function selectAllItems(div) { |
77 |
$("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked'); |
94 |
$("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked'); |
Lines 141-147
function verify_images() {
Link Here
|
141 |
}); |
158 |
}); |
142 |
[% END %] |
159 |
[% END %] |
143 |
|
160 |
|
144 |
$(document).ready(function() { |
161 |
$(document).ready(function() { |
145 |
$('#bibliodetails').tabs(); |
162 |
$('#bibliodetails').tabs(); |
146 |
$('#search-form').focus(); |
163 |
$('#search-form').focus(); |
147 |
$('.thumbnails > li > a > span.remove').click(function() { |
164 |
$('.thumbnails > li > a > span.remove').click(function() { |
Lines 154-159
function verify_images() {
Link Here
|
154 |
|
171 |
|
155 |
return false; |
172 |
return false; |
156 |
}); |
173 |
}); |
|
|
174 |
[%# inject no images message %] |
175 |
[% IF ( LocalCoverImages && ! localimages.0 ) %] |
176 |
showNoImageMessage(); |
177 |
[% END %] |
157 |
}); |
178 |
}); |
158 |
|
179 |
|
159 |
[% IF ( AmazonCoverImages ) %]$(window).load(function() { |
180 |
[% IF ( AmazonCoverImages ) %]$(window).load(function() { |
Lines 940-949
function verify_images() {
Link Here
|
940 |
[% END %] |
961 |
[% END %] |
941 |
[% END %] |
962 |
[% END %] |
942 |
</ul> |
963 |
</ul> |
943 |
[% ELSE %] |
964 |
[%# ELSE - No image passed JavaScript takes care %] |
944 |
[% IF ( CAN_user_tools_upload_local_cover_images ) %] |
|
|
945 |
<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image'>upload</a> one.</p> |
946 |
[% END %] |
947 |
[% END %] |
965 |
[% END %] |
948 |
</div> |
966 |
</div> |
949 |
[% END %] |
967 |
[% END %] |
950 |
- |
|
|