Bug 17056 - Remove event attributes from various templates

This patch removes event attributes from several templates, moving event
definitions into the JavaScript instead.

To test, apply the patch and:

- View the MARC detail page for any bibliographic record. Changing the
  framework selection should reload the display using the selected
  framework.

- Perform the same test on the labeled MARC view. (Set the
  viewLabeledMARC system preference to "Allow" if necessary).

- To test the changes to Reports you should have at least one report
  group and at least one report subgroup.
  - Create a new saved SQL report.
  - Select a report group. Doing so should trigger the display of report
    subgroups. Deselecting the report group should hide the subgroups.

- In Acquisitions -> Suggestions, create a new suggestion.
  - In the 'Acquisition information' section, changing values for
    copies, currency, and price should change the value in the total
    field.

- In Circulation -> Upload offline circulation file:
  - My patch for Bug 16602 added the required code but forgot to remove
    the corresponding onclick attributes.
  - Browse for an offline circulation file.
  - Clicking the 'Upload file' button should work correctly.
    - After uploading a file, both the 'Add to offline circulation
      queue' and 'Apply directly' buttons should work to trigger their
      corresponding processes (keeping Bug 16603 in mind).

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2016-08-04 14:36:41 -04:00 committed by Kyle M Hall
parent 5e0f55fac8
commit 3d84252c04
5 changed files with 24 additions and 8 deletions

View file

@ -19,6 +19,9 @@
$(document).ready(function() {
$('#bibliotabs').tabs();
$("#Frameworks").on("change",function(){
Changefwk(this);
});
});
function Changefwk(FwkList) {
@ -58,7 +61,7 @@ function Changefwk(FwkList) {
[% END %]
<p><b>With framework : <select name="Frameworks" id="Frameworks" onchange="Changefwk(this);">
<p><b>With framework : <select name="Frameworks" id="Frameworks">
<option value="">Default</option>
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
[% IF ( frameworkcodeloo.selected ) %]<option value="[% frameworkcodeloo.value %]" selected="selected">[% frameworkcodeloo.frameworktext %]</option>[% ELSE %]<option value="[% frameworkcodeloo.value %]">[% frameworkcodeloo.frameworktext %]</option>[% END %]

View file

@ -19,6 +19,11 @@
//<![CDATA[
var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
browser.show();
$(document).ready(function() {
$("#Frameworks").on("change",function(){
Changefwk(this);
});
});
function Changefwk(FwkList)
{
var fwk = FwkList.options[FwkList.selectedIndex].value;

View file

@ -111,14 +111,14 @@ function CheckForm(f) {
<form action="enqueue_koc.pl" id="processfile" method="post" enctype="multipart/form-data">
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
<input type="submit" value="Add to offline circulation queue" onclick="return CheckForm(this.form);" id="queueformsubmit" />
<input type="submit" value="Add to offline circulation queue" id="queueformsubmit" />
</form>
<form action="process_koc.pl" id="enqueuefile" method="post" enctype="multipart/form-data">
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
<input type="hidden" name="runinbackground" id="runinbackground" value="" />
<input type="hidden" name="completedJobID" id="completedJobID" value="" />
<input type="submit" value="Apply directly" onclick="return CheckForm(this.form);" id="mainformsubmit" />
<input type="submit" value="Apply directly" id="mainformsubmit" />
<div id="jobstatus" style="display:none">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
<div id="jobfailed" style="display:none"></div>
</form>

View file

@ -227,6 +227,9 @@ $("#delColumn").on("click",function(){
});
$("#select_group").change();
$("#select_subgroup").change();
$("#group_select").on("change",function(){
load_group_subgroups();
});
[% END %]
});
//]]>
@ -1087,7 +1090,7 @@ $("#column_submit").submit(function() {
<input type="radio" name="select_or_create_group"
id="select_group" checked="checked" />
<label for="select_group" style="float:none">Select</label>
<select name="group" onChange="load_group_subgroups();" id="group_select">
<select name="group" id="group_select">
<option value="">(None)</option>
[% FOREACH group IN groups_with_subgroups %]
[% IF (group.selected) %]

View file

@ -167,7 +167,12 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
[% IF ( op_save ) %]
<script type="text/javascript">
// <![CDATA[
$(document).ready(function() { calcNewsuggTotal(); });
$(document).ready(function(){
calcNewsuggTotal();
$("#quantity,#price,#currency").on("change",function(){
calcNewsuggTotal();
});
});
// ]]>
</script>
[% END %]
@ -435,7 +440,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
[% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id %]" selected="selected">[% budgetsloo.budget_name %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id %]">[% budgetsloo.budget_name %]</option>[% END %][% END %]
</select>
</li><li><label for="quantity">Copies:</label>
<input type="text" size="10" id="quantity" name="quantity" value="[% quantity %]" onchange="calcNewsuggTotal();" />
<input type="text" size="10" id="quantity" name="quantity" value="[% quantity %]" />
</li>
<li>
<label for="currency">Currency:</label>
@ -444,7 +449,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
<input type="hidden" id="[% c.currency %]" name="[% c.currency %]" value="[% c.rate %]" />
[% END %]
<select name="currency" id="currency" onchange="calcNewsuggTotal();">
<select name="currency" id="currency">
[% FOREACH c IN currencies %]
[% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
<option value="[% c.currency %]" selected="selected">[% c.currency %]</option>
@ -455,7 +460,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
</select>
</li>
<li><label for="price">Price:</label>
<input type="text" size="20" name="price" id="price" value="[% price %]" onchange="calcNewsuggTotal();" />
<input type="text" size="20" name="price" id="price" value="[% price %]" />
</li><li><label for="total">Total: </label>
<input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total %]"/>
</li></ol>