Lines 7-12
Link Here
|
7 |
› Batch list |
7 |
› Batch list |
8 |
[% END %] |
8 |
[% END %] |
9 |
</title> |
9 |
</title> |
|
|
10 |
[% INCLUDE 'greybox.inc' %] |
10 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
11 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
11 |
[% INCLUDE 'doc-head-close.inc' %] |
12 |
[% INCLUDE 'doc-head-close.inc' %] |
12 |
[% INCLUDE 'datatables.inc' %] |
13 |
[% INCLUDE 'datatables.inc' %] |
Lines 17-22
Link Here
|
17 |
[% IF (dateformat == 'metric') %] |
18 |
[% IF (dateformat == 'metric') %] |
18 |
dt_add_type_uk_date(); |
19 |
dt_add_type_uk_date(); |
19 |
[% END %] |
20 |
[% END %] |
|
|
21 |
|
20 |
$(document).ready(function() { |
22 |
$(document).ready(function() { |
21 |
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
23 |
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
22 |
"aoColumns": [ |
24 |
"aoColumns": [ |
Lines 32-46
Link Here
|
32 |
$("select[name='budget_id']").change(function(){ |
34 |
$("select[name='budget_id']").change(function(){ |
33 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
35 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
34 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
36 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
35 |
var destination_sort1 = $(this).siblings('span.sort1').find('input[name="sort1"]'); |
37 |
var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); |
36 |
var sort1 = $(destination_sort1).val(); |
38 |
var sort1 = $(destination_sort1).val() || ""; |
37 |
if ( destination_sort1.length < 1 ) { |
39 |
if ( destination_sort1.length < 1 ) { |
38 |
destination_sort1 = $(this).siblings('span.sort1').find('select[name="sort1"]'); |
40 |
destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]'); |
39 |
} |
41 |
} |
40 |
var destination_sort2 = $(this).siblings('span.sort2').find('input[name="sort2"]'); |
42 |
var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]'); |
41 |
var sort2 = $(destination_sort2).val(); |
43 |
var sort2 = $(destination_sort2).val() || ""; |
42 |
if ( destination_sort2.length < 1 ) { |
44 |
if ( destination_sort2.length < 1 ) { |
43 |
destination_sort2 = $(this).siblings('span.sort2').find('select[name="sort2"]'); |
45 |
destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]'); |
44 |
} |
46 |
} |
45 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
47 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
46 |
|
48 |
|
Lines 68-80
Link Here
|
68 |
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); |
70 |
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); |
69 |
} ); |
71 |
} ); |
70 |
|
72 |
|
|
|
73 |
$("#records_to_import fieldset.rows ol").hide(); |
71 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
74 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
|
|
75 |
var container = $(this).parents("fieldset"); |
72 |
if ( $(this).is(':checked') ) { |
76 |
if ( $(this).is(':checked') ) { |
73 |
$(this).parent().addClass("selected"); |
77 |
$(container).addClass("selected"); |
74 |
$(this).parent().removeClass("unselected"); |
78 |
$(container).removeClass("unselected"); |
|
|
79 |
$(container).find("ol").toggle(); |
75 |
} else { |
80 |
} else { |
76 |
$(this).parent().addClass("unselected"); |
81 |
$(container).addClass("unselected"); |
77 |
$(this).parent().removeClass("selected"); |
82 |
$(container).removeClass("selected"); |
|
|
83 |
$(container).find("ol").toggle(); |
78 |
} |
84 |
} |
79 |
} ); |
85 |
} ); |
80 |
|
86 |
|
Lines 93-98
Link Here
|
93 |
return false; |
99 |
return false; |
94 |
}); |
100 |
}); |
95 |
|
101 |
|
|
|
102 |
$("#Aform").on("submit", function(){ |
103 |
if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { |
104 |
alert("There is no record selected"); |
105 |
return false; |
106 |
} |
107 |
|
108 |
var error = 0; |
109 |
$("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ |
110 |
if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { |
111 |
error++; |
112 |
} |
113 |
}); |
114 |
if ( error > 0 ) { |
115 |
alert(error + " quantity values are not filled or not a number"); |
116 |
return false; |
117 |
} |
118 |
|
119 |
return disableUnchecked($(this)); |
120 |
}); |
96 |
}); |
121 |
}); |
97 |
|
122 |
|
98 |
function disableUnchecked(form){ |
123 |
function disableUnchecked(form){ |
Lines 100-106
Link Here
|
100 |
$(this).find('select').attr('disabled', 'disabled'); |
125 |
$(this).find('select').attr('disabled', 'disabled'); |
101 |
$(this).find('input').attr('disabled', 'disabled'); |
126 |
$(this).find('input').attr('disabled', 'disabled'); |
102 |
}); |
127 |
}); |
103 |
form.submit(); |
128 |
return 1; |
104 |
} |
129 |
} |
105 |
//]]> |
130 |
//]]> |
106 |
</script> |
131 |
</script> |
Lines 118-126
Link Here
|
118 |
([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %]) |
143 |
([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %]) |
119 |
</h1> |
144 |
</h1> |
120 |
<div> |
145 |
<div> |
|
|
146 |
<div id="records_to_import"> |
121 |
<span class="checkall"><a id="checkAll" href="#">Check All</a></span> |
147 |
<span class="checkall"><a id="checkAll" href="#">Check All</a></span> |
122 |
<span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span> |
148 |
<span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span> |
123 |
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform" onsubmit="disableUnchecked(this); return false;"> |
149 |
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform"> |
124 |
<input type="hidden" name="op" value="import_records"/> |
150 |
<input type="hidden" name="op" value="import_records"/> |
125 |
<input type="hidden" name="basketno" value="[% basketno %]" /> |
151 |
<input type="hidden" name="basketno" value="[% basketno %]" /> |
126 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
152 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
Lines 132-161
Link Here
|
132 |
[% END %] |
158 |
[% END %] |
133 |
|
159 |
|
134 |
[% FOREACH biblio IN biblio_list %] |
160 |
[% FOREACH biblio IN biblio_list %] |
135 |
<div class="biblio unselected" style="border-radius: 5px 5px; -moz-border-radius: 5px; padding: 5px; margin:5px; border-style : solid; border-color : grey; border-width:1px;"> |
161 |
<fieldset class="biblio unselected rows"> |
136 |
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> |
162 |
<legend> |
137 |
<input type="hidden" value="[% biblio.rrp %]" name="rrp" /> |
163 |
<label for="record_[% biblio.import_record_id %]" style="width:auto;"> |
138 |
<label for="record_[% biblio.import_record_id %]"><span class="citation" style="font-weight:bold;">[% biblio.citation %]</span></label> |
164 |
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> |
139 |
<span class="match" style="display:block;">[% biblio.overlay_status %]</span> |
165 |
<span class="citation">[% biblio.citation %]</span> |
140 |
[% IF ( biblio.match_biblionumber ) %] |
166 |
</label> |
141 |
Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a> |
167 |
( Show <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">Card</a> ) |
142 |
[% END %] |
168 |
|
143 |
<span class="quantity" style="display:block;"> |
169 |
</legend> |
144 |
Quantity: <input type="text" value="[% biblio.quantity %]" name="quantity" /> |
170 |
<input type="hidden" value="[% biblio.rrp %]" name="rrp" /> |
145 |
</span> |
171 |
<ol> |
146 |
<span class="price" style="display:block;"> |
172 |
<li class="status"> |
147 |
Price: <input type="text" value="[% biblio.price %]" name="price" /> |
173 |
<span class="match"> |
148 |
</span> |
174 |
[% IF biblio.overlay_status == 'no_match' %] |
149 |
<span class="discount" style="display:block;"> |
175 |
There is no matching biblio for this records. |
150 |
Discount: <input type="text" value="[% biblio.discount %]" name="discount" /> |
176 |
[% ELSE %] |
151 |
</span> |
177 |
This record matches existing biblio. |
152 |
<span class="budget" style="display:block;"> |
178 |
[% END %] |
|
|
179 |
[% IF ( biblio.match_biblionumber ) %] |
180 |
Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a> |
181 |
[% END %] |
182 |
</span> |
183 |
</li> |
184 |
<li class="quantity"> |
185 |
<label for="quantity_record_[% biblio.import_record_id %]" class="required">Quantity: </label> |
186 |
<input id="quantity_record_[% biblio.import_record_id %]" type="text" value="[% biblio.quantity %]" name="quantity" /> |
187 |
</li> |
188 |
<li class="price"> |
189 |
<label for="price_record_[% biblio.import_record_id %]">Price: </label> |
190 |
<input id="price_record_[% biblio.import_record_id %]" type="text" value="[% biblio.price %]" name="price" /> |
191 |
</li> |
192 |
<li class="discount"> |
193 |
<label for="discount_record_[% biblio.import_record_id %]">Discount: </label> |
194 |
<input id="discount_record_[% biblio.import_record_id %]" type="text" value="[% biblio.discount %]" name="discount" /> |
195 |
</li> |
196 |
<li class="budget"> |
197 |
<label for="fund_record_[% biblio.import_record_id %]">Fund: </label> |
153 |
[% IF ( close ) %] |
198 |
[% IF ( close ) %] |
154 |
<span class="label">Budget: </span> |
199 |
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] |
155 |
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] |
|
|
156 |
[% ELSE %] |
200 |
[% ELSE %] |
157 |
<label for="budget_id">Budget: </label> |
201 |
<select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id"> |
158 |
<select size="1" name="budget_id"> |
|
|
159 |
<option value=""></option> |
202 |
<option value=""></option> |
160 |
[% FOREACH budget IN budget_loop %] |
203 |
[% FOREACH budget IN budget_loop %] |
161 |
[% IF ( budget.b_id == biblio.budget_id ) %] |
204 |
[% IF ( budget.b_id == biblio.budget_id ) %] |
Lines 164-183
Link Here
|
164 |
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> |
207 |
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> |
165 |
[% END %] |
208 |
[% END %] |
166 |
[% END %] |
209 |
[% END %] |
167 |
</select> |
210 |
</select> |
168 |
[% END %] |
211 |
[% END %] |
169 |
<span class="sort1"> |
212 |
</li> |
170 |
<label for="sort1">Planning value1: </label> |
213 |
<li class="sort1"> |
171 |
<input type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" /> |
214 |
<label for="sort1_record_[% biblio.import_record_id %]">Planning value1: </label> |
172 |
</span> |
215 |
<input id="sort1_record_[% biblio.import_record_id %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" /> |
173 |
<span class="sort2"> |
216 |
</li> |
174 |
<label for="sort2">Planning value2: </label> |
217 |
<li class="sort2"> |
175 |
<input type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" /> |
218 |
<label for="sort2_record_[% biblio.import_record_id %]">Planning value2: </label> |
176 |
</span> |
219 |
<input id="sort2_record_[% biblio.import_record_id %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" /> |
177 |
</span> |
220 |
</li> |
178 |
</div> |
221 |
</ol> |
|
|
222 |
</fieldset> |
179 |
[% END %] |
223 |
[% END %] |
180 |
<div> |
224 |
</div> |
|
|
225 |
<div id="import_all"> |
181 |
<h2>Import all</h2> |
226 |
<h2>Import all</h2> |
182 |
<p>Import all the lines in the basket with the following parameters:</p> |
227 |
<p>Import all the lines in the basket with the following parameters:</p> |
183 |
|
228 |
|
184 |
- |
|
|