Lines 17-22
Link Here
|
17 |
browser.show(); |
17 |
browser.show(); |
18 |
|
18 |
|
19 |
$(document).ready(function(){ |
19 |
$(document).ready(function(){ |
|
|
20 |
var view_menu = $("#menu"); |
21 |
view_menu.hide(); |
22 |
var menu_html = view_menu.find("ul").html(); |
23 |
$("#item_edit_view_menu").append( menu_html ); |
20 |
|
24 |
|
21 |
// Remove the onclick event defined in browser.js, |
25 |
// Remove the onclick event defined in browser.js, |
22 |
// otherwise the deletion confirmation will not work correctly |
26 |
// otherwise the deletion confirmation will not work correctly |
Lines 133-142
function confirm_deletion() {
Link Here
|
133 |
[% Asset.css("css/addbiblio.css") %] |
137 |
[% Asset.css("css/addbiblio.css") %] |
134 |
|
138 |
|
135 |
[% INCLUDE 'select2.inc' %] |
139 |
[% INCLUDE 'select2.inc' %] |
136 |
<script type="text/javascript"> |
140 |
<script> |
137 |
$(document).ready(function() { |
141 |
$(document).ready(function() { |
138 |
$('.subfield_line select').select2(); |
142 |
$("#addItemModal").on("shown.bs.modal", function(e){ |
139 |
}); |
143 |
$('.subfield_line select').select2(); |
|
|
144 |
}); |
145 |
}); |
140 |
</script> |
146 |
</script> |
141 |
|
147 |
|
142 |
[% IF ( bidi ) %] |
148 |
[% IF ( bidi ) %] |
Lines 159-164
function confirm_deletion() {
Link Here
|
159 |
<div id="bd"> |
165 |
<div id="bd"> |
160 |
<div id="yui-main"> |
166 |
<div id="yui-main"> |
161 |
|
167 |
|
|
|
168 |
<div id="toolbar"> |
169 |
<div class="btn-group"> |
170 |
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#addItemModal"><i class="fa fa-plus"></i> Add items</button> |
171 |
</div> |
172 |
<div class="btn-group"> |
173 |
<button class="btn btn-default btn-sm dropdown-toggle" id="item_edit_view" data-toggle="dropdown"> |
174 |
<i class="fa fa-eye"></i> View <span class="caret"></span> |
175 |
</button> |
176 |
<ul class="dropdown-menu" id="item_edit_view_menu"> |
177 |
</ul> |
178 |
</div> |
179 |
</div> |
180 |
|
162 |
<h1>Items for [% title |html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber %])</h1> |
181 |
<h1>Items for [% title |html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber %])</h1> |
163 |
|
182 |
|
164 |
[% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %] |
183 |
[% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %] |
Lines 245-379
function confirm_deletion() {
Link Here
|
245 |
[% INCLUDE 'biblio-view-menu.inc' %] |
264 |
[% INCLUDE 'biblio-view-menu.inc' %] |
246 |
</div> |
265 |
</div> |
247 |
<div class="yui-u"> |
266 |
<div class="yui-u"> |
248 |
<div id="cataloguing_additem_newitem"> |
|
|
249 |
<form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl" name="f"> |
250 |
<input type="hidden" name="op" value="[% op %]" /> |
251 |
[% IF (popup) %] |
252 |
<input type="hidden" name="popup" value="1" /> |
253 |
[% END %] |
254 |
<input type="hidden" name="biblionumber" value="[% biblionumber %]" /> |
255 |
[% IF ( opisadd ) %] |
256 |
<h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2> |
257 |
[% ELSE %] |
258 |
<h2 id="edititem">Edit Item #[% itemnumber %][% IF ( barcode ) %] / Barcode [% barcode %][% END %]</h2> |
259 |
[% END %] |
260 |
<fieldset class="rows"> |
261 |
<ol> |
262 |
[% FOREACH ite IN item %] |
263 |
<li><div class="subfield_line" style="[% ite.visibility %]" id="subfield[% ite.tag %][% ite.subfield %][% ite.random %]"> |
264 |
[% IF ( ite.mandatory ) %] |
265 |
<label class="required">[% ite.subfield %] - [% ite.marc_lib %]</label> |
266 |
[% ELSE %] |
267 |
<label>[% ite.subfield %] - [% ite.marc_lib %]</label> |
268 |
[% END %] |
269 |
|
267 |
|
270 |
[% SET mv = ite.marc_value %] |
268 |
[% INCLUDE 'item-add-form.inc' %] |
271 |
[% IF ( mv.type == 'hidden' ) %] |
|
|
272 |
<input type="hidden" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]"> |
273 |
[% ELSIF ( mv.type == 'select' ) %] |
274 |
[% IF ( mv.readonly ) %] |
275 |
<select name="field_value" id="[%- mv.id -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled"> |
276 |
[% ELSE %] |
277 |
<select name="field_value" id="[%- mv.id -%]" size="1" class="input_marceditor"> |
278 |
[% END %] |
279 |
[% FOREACH aval IN mv.values %] |
280 |
[% IF aval == mv.default %] |
281 |
<option value="[%- aval -%]" selected="selected">[%- mv.labels.$aval -%]</option> |
282 |
[% ELSE %] |
283 |
<option value="[%- aval -%]">[%- mv.labels.$aval -%]</option> |
284 |
[% END %] |
285 |
[% END %] |
286 |
</select> |
287 |
[% ELSIF ( mv.type == 'text_auth' ) %] |
288 |
[% IF mv.readonly %] |
289 |
<input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" readonly="readonly" /> |
290 |
[% ELSE %] |
291 |
<input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" /> |
292 |
[% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %] |
293 |
<a href="#" class="buttonDot" onclick="[%- dopop -%]; return false;" title="Tag editor">...</a> |
294 |
[% END %] |
295 |
[% ELSIF ( mv.type == 'text_plugin' ) %] |
296 |
[% IF mv.readonly %] |
297 |
<input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" readonly="readonly" /> |
298 |
[% ELSE %] |
299 |
<input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" /> |
300 |
[% IF ( mv.nopopup ) %] |
301 |
<a href="#" id="buttonDot_[%- mv.id -%]" class="[%- mv.class -%]" title="No popup">...</a> |
302 |
[% ELSE %] |
303 |
<a href="#" id="buttonDot_[%- mv.id -%]" class="[%- mv.class -%]" title="Tag editor">...</a> |
304 |
[% END %] |
305 |
[%- mv.javascript -%] |
306 |
[% END %] |
307 |
[% ELSIF ( mv.type == 'text' ) %] |
308 |
[% IF mv.readonly %] |
309 |
<input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" readonly="readonly" /> |
310 |
[% ELSE %] |
311 |
<input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" /> |
312 |
[% END %] |
313 |
[% ELSIF ( mv.type == 'textarea' ) %] |
314 |
[% IF mv.readonly %] |
315 |
<textarea id="[%- mv.id -%]" name="field_value" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value %]</textarea> |
316 |
[% ELSE %] |
317 |
<textarea id="[%- mv.id -%]" name="field_value" class="input_marceditor" rows="5" cols="64" >[% mv.value %]</textarea> |
318 |
[% END %] |
319 |
[% END %] |
320 |
|
269 |
|
321 |
<input type="hidden" name="tag" value="[% ite.tag %]" /> |
|
|
322 |
<input type="hidden" name="subfield" value="[% ite.subfield %]" /> |
323 |
<input type="hidden" name="mandatory" value="[% ite.mandatory %]" /> |
324 |
[% IF ( ite.repeatable ) %] |
325 |
<a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode); return false;"> |
326 |
<img src="[% interface %]/[% theme %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
327 |
</a> |
328 |
[% END %] |
329 |
[% IF ( ite.mandatory ) %] <span class="required">Required</span>[% END %] |
330 |
</div></li> |
331 |
[% END %] |
332 |
</ol> |
333 |
</fieldset> |
334 |
<input type="hidden" name="indicator" value=" " /> |
335 |
<input type="hidden" name="indicator" value=" " /> |
336 |
<input type="hidden" name="itemnumber" value="[% itemnumber %]" /> |
337 |
|
338 |
<fieldset class="action"> [% IF ( opisadd ) %] |
339 |
<input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" /> |
340 |
<!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe they validated the adding of multiple items |
341 |
when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button. |
342 |
It is a bit tricky, but necessary in the sake of UI correctness. |
343 |
--> |
344 |
<span id="addsingle"> |
345 |
<input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" /> |
346 |
<input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" /> |
347 |
</span> |
348 |
<span id="addmultiple"> |
349 |
<input type="button" name="add_multiple_copies" id="add_multiple_copies" value="Add multiple copies of this item" /> |
350 |
</span> |
351 |
<fieldset id="add_multiple_copies_span"> |
352 |
<label for="number_of_copies">Number of copies of this item to add: </label> |
353 |
<input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" /> |
354 |
<input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) && CheckMultipleAdd(this.form.number_of_copies.value);" /> <a href="#" id="cancel_add_multiple" class="cancel">Cancel</a> |
355 |
<div class="hint"><p>The barcode you enter will be incremented for each additional item.</p></div> |
356 |
</fieldset> |
357 |
|
358 |
[% ELSE %] |
359 |
<input type="hidden" name="tag" value="[% itemtagfield %]" /> |
360 |
<input type="hidden" name="subfield" value="[% itemtagsubfield %]" /> |
361 |
<input type="hidden" name="field_value" value="[% itemnumber %]" /> |
362 |
<input type="submit" value="Save changes" onclick="return Check(this.form)"> |
363 |
<input type="button" id="addnewitem" value="Add a new item"> |
364 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">Cancel</a> |
365 |
[% END %]</fieldset> |
366 |
|
367 |
[%# Fields for fast cataloging %] |
368 |
<input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" /> |
369 |
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> |
370 |
<input type="hidden" name="barcode" value="[% barcode %]" /> |
371 |
<input type="hidden" name="duedatespec" value="[% duedatespec %]" /> |
372 |
[%# End fields for fast cataloging %] |
373 |
|
374 |
|
375 |
</form> |
376 |
</div> |
377 |
</div><!-- /yui-u --> |
270 |
</div><!-- /yui-u --> |
378 |
</div><!-- /yui-gf --> |
271 |
</div><!-- /yui-gf --> |
379 |
|
272 |
|
380 |
- |
|
|