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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-15 / +19 lines)
Lines 97-103 $(document).ready(function() { Link Here
97
        }
97
        }
98
    });
98
    });
99
    $( "#transport-types" ).accordion({ collapsible: true, active:false, animate: 200 });
99
    $( "#transport-types" ).accordion({ collapsible: true, active:false, animate: 200 });
100
}); 
100
    $(".insert").on("click",function(){
101
        var containerid = $(this).data("containerid");
102
        insertValueQuery( containerid );
103
    })
104
});
101
[% IF add_form or copy_form %]
105
[% IF add_form or copy_form %]
102
	
106
	
103
    function cancel(f) {
107
    function cancel(f) {
Lines 129-145 $(document).ready(function() { Link Here
129
            var myListBox = $(fieldset).find('select[name="SQLfieldname"]');
133
            var myListBox = $(fieldset).find('select[name="SQLfieldname"]');
130
134
131
            if($(myListBox).find('option').length > 0) {
135
            if($(myListBox).find('option').length > 0) {
132
                var chaineAj = "";
133
                var NbSelect = 0;
134
                $(myListBox).find('option').each( function (){
136
                $(myListBox).find('option').each( function (){
135
                    if ( $(this).attr('selected') ) {
137
                    if ( $(this).attr('selected') ) {
136
                        NbSelect++;
138
                        $(myQuery).insertAtCaret("<<" + $(this).val() + ">>");
137
                        if (NbSelect > 1)
138
                            chaineAj += ", ";
139
                        chaineAj += $(this).val();
140
                    }
139
                    }
141
                } );
140
                });
142
                $(myQuery).insertAtCaret("<<" + chaineAj + ">>");
143
            }
141
            }
144
        }
142
        }
145
	[% END %]
143
	[% END %]
Lines 274-281 $(document).ready(function() { Link Here
274
            [% ELSE %]
272
            [% ELSE %]
275
            <li>
273
            <li>
276
274
277
                <label for="branch">Library:</label>
278
                [% IF adding %]
275
                [% IF adding %]
276
                    <label for="branch">Library:</label>
279
                    <select name="branchcode" id="branch" style="width:20em;">
277
                    <select name="branchcode" id="branch" style="width:20em;">
280
                        <option value="">All libraries</option>
278
                        <option value="">All libraries</option>
281
                    [% FOREACH branchloo IN branchloop %]
279
                    [% FOREACH branchloo IN branchloop %]
Lines 283-290 $(document).ready(function() { Link Here
283
                    [% END %]
281
                    [% END %]
284
                    </select>
282
                    </select>
285
                [% ELSE %]
283
                [% ELSE %]
284
                    <span class="label">Library:</span>
286
                    <input type="hidden" id="branch" name="branchcode" value="[% branchcode %]" />
285
                    <input type="hidden" id="branch" name="branchcode" value="[% branchcode %]" />
287
                    [% Branches.GetName( branchcode ) %]
286
                    [% IF ( branchcode ) %]
287
                       [% Branches.GetName( branchcode ) %]
288
                    [% ELSE %]
289
                        All libraries
290
                    [% END %]
288
                [% END %]
291
                [% END %]
289
            </li>
292
            </li>
290
            [% END %]
293
            [% END %]
Lines 349-356 $(document).ready(function() { Link Here
349
                  <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
352
                  <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
350
                  <span class="required">Required</span>
353
                  <span class="required">Required</span>
351
              [% ELSE %]
354
              [% ELSE %]
352
                  <label for="code">Code:</label>
355
                  <span class="label">Code:</span>
353
                  <input type="hidden" id="code" name="code" size="20" maxlength="20" value="[% code %]" required="required"/>
356
                  <input type="hidden" id="code" name="code" value="[% code %]" />
354
                  [% code %]
357
                  [% code %]
355
              [% END %]
358
              [% END %]
356
            </li>
359
            </li>
Lines 415-421 $(document).ready(function() { Link Here
415
                          [% END %]
418
                          [% END %]
416
                        </select>
419
                        </select>
417
                      </td>
420
                      </td>
418
                      <td><input type="button" name="insert" value="&gt;&gt;" onclick="insertValueQuery('[% letter.message_transport_type %]')" title="Insert" /></td>
421
                        <td class="actions">
422
                            <button type="button" data-containerid="[% letter.message_transport_type %]" class="btn btn-small insert">Insert <i class="fa fa-long-arrow-right"></i></button>
423
                        </td>
419
                      <td><textarea name="content" id="content_[% letter.message_transport_type %]" cols="80" rows="15">[% letter.content %]</textarea></td>
424
                      <td><textarea name="content" id="content_[% letter.message_transport_type %]" cols="80" rows="15">[% letter.content %]</textarea></td>
420
                    </tr>
425
                    </tr>
421
                  </table>
426
                  </table>
422
- 

Return to bug 1859