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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt (-27 / +35 lines)
Lines 14-46 var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% Link Here
14
for( x=0; x<allColumns.length; x++ ){
14
for( x=0; x<allColumns.length; x++ ){
15
  allColumns[x] = Number(allColumns[x]) + 2;
15
  allColumns[x] = Number(allColumns[x]) + 2;
16
}
16
}
17
$("#itemst").tablesorter({ widgets : ['zebra'], headers: {0:{sorter: false}} });
17
$(document).ready(function(){
18
$("#selectallbutton").click(function() {
18
  $("#itemst").tablesorter({ widgets : ['zebra'], headers: {0:{sorter: false}} });
19
    $("#itemst").find("input:checkbox").each(function() {
19
  $("#selectallbutton").click(function() {
20
 $(this).attr("checked", "checked");
20
      $("#itemst").find("input:checkbox").each(function() {
21
    });
21
   $(this).attr("checked", "checked");
22
      });
23
  });
24
  $("#clearallbutton").click(function() {
25
      $("#itemst").find("input:checkbox").each(function() {
26
   $(this).removeAttr("checked");
27
      });
28
  });
29
  $("input[name='disable_input']").click(function() {
30
      var row = $(this).attr("id");
31
      row = row.replace("row","hint");
32
      var subfield = $(this).next();
33
      if ($(this).is(":checked")){
34
          $(this).val($(this).siblings("[name='subfield']").val());
35
          $(subfield).attr('disabled',true);
36
          $("#"+row).html(_("This subfield will be deleted"));
37
      } else {
38
          $(subfield).removeAttr('disabled');
39
          $("#"+row).html("");
40
      }
41
  });
22
});
42
});
23
$("#clearallbutton").click(function() {
24
    $("#itemst").find("input:checkbox").each(function() {
25
 $(this).removeAttr("checked");
26
    });
27
});
28
$("input[name='disable_input']").click(function() {
29
    if ($(this).is(":checked")){
30
 $(this).val($(this).siblings("[name='subfield']").val());
31
 $(this).siblings().attr('disabled',true);
32
    }
33
    else {
34
 $(this).siblings().removeAttr('disabled');
35
    }
36
});
37
38
//]]>
43
//]]>
39
</script>
44
</script>
40
<script type="text/javascript" src="[% themelang %]/js/pages/batchMod.js"></script>
45
<script type="text/javascript" src="[% themelang %]/js/pages/batchMod.js"></script>
41
<!--[if IE]>
46
<!--[if IE]>
42
<style type="text/css">#selections { display: none; }</style>
47
<style type="text/css">#selections { display: none; }</style>
43
<![endif]-->
48
<![endif]-->
49
<style type="text/css">input[type=checkbox]{ margin : 0 .5em; }</style>
44
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
50
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
45
</head>
51
</head>
46
<body id="tools_batchMod-edit" class="tools">
52
<body id="tools_batchMod-edit" class="tools">
Lines 138-154 $("input[name='disable_input']").click(function() { Link Here
138
144
139
<div id="cataloguing_additem_newitem">
145
<div id="cataloguing_additem_newitem">
140
        <h2>Edit Items</h2>
146
        <h2>Edit Items</h2>
141
        <div class="hint">Checking the box right next the subfield label will disable the entry and delete the values of that subfield on all selected items</div>
147
        <div class="hint">Checking the box right next the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div>
142
  <fieldset class="rows">
148
  <fieldset class="rows">
143
  <ol>
149
  <ol>
144
        [% FOREACH ite IN item %]
150
        [% FOREACH ite IN item %]
145
               <li><div class="subfield_line" style="[% ite.visibility %]" id="subfield[% ite.tag %][% ite.subfield %][% ite.random %]">
151
               <li><div class="subfield_line" style="[% ite.visibility %]" id="subfield[% ite.tag %][% ite.subfield %][% ite.random %]">
146
               <label>[% ite.subfield %] - 
152
              [% IF ( ite.mandatory ) %]
147
          [% IF ( ite.mandatory ) %]<b>[% END %]
153
              <label class="required" for="tag_[% ite.tag %]_subfield_[% ite.subfield %]_[% ite.random %]">
154
              [% ELSE %]
155
              <label for="tag_[% ite.tag %]_subfield_[% ite.subfield %]_[% ite.random %]">
156
              [% END %]
157
              [% ite.subfield %] -
148
          [% ite.marc_lib %]
158
          [% ite.marc_lib %]
149
          [% IF ( ite.mandatory ) %] *</b>[% END %]
150
         </label>
159
         </label>
151
                <input type="checkbox" title="check to delete subfield [% ite.subfield %]" name="disable_input" value="[% ite.subfield %]" />
160
                [% UNLESS ( ite.mandatory ) %]<input type="checkbox" id="row[% ite.tag %][% ite.subfield %][% ite.random %]" title="Check to delete subfield [% ite.subfield %]" name="disable_input" value="[% ite.subfield %]" />[% ELSE %]<span class="required">Required</span>[% END %]
152
                [% ite.marc_value %]
161
                [% ite.marc_value %]
153
                <input type="hidden" name="tag"       value="[% ite.tag %]" />
162
                <input type="hidden" name="tag"       value="[% ite.tag %]" />
154
                <input type="hidden" name="subfield"       value="[% ite.subfield %]" />
163
                <input type="hidden" name="subfield"       value="[% ite.subfield %]" />
Lines 156-162 $("input[name='disable_input']").click(function() { Link Here
156
                [% IF ( ite.repeatable ) %]
165
                [% IF ( ite.repeatable ) %]
157
                    <span class="buttonPlus" onclick="CloneSubfield('subfield[% ite.tag %][% ite.subfield %][% ite.random %]')">+</span>
166
                    <span class="buttonPlus" onclick="CloneSubfield('subfield[% ite.tag %][% ite.subfield %][% ite.random %]')">+</span>
158
                [% END %]
167
                [% END %]
159
   
168
                <span class="hint" id="hint[% ite.tag %][% ite.subfield %][% ite.random %]"></span>
160
            </div></li>
169
            </div></li>
161
        [% END %]
170
        [% END %]
162
    </ol>
171
    </ol>
163
- 

Return to bug 7784