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

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js (-6 / +5 lines)
Lines 660-672 function updateCosts(){ Link Here
660
660
661
function calcNewsuggTotal(){
661
function calcNewsuggTotal(){
662
    //collect values
662
    //collect values
663
    var quantity = new Number(document.getElementById('quantity').value);
663
    var quantity = Number(document.getElementById('quantity').value);
664
//    var currency = f.currency.value;
664
    var currcode = String(document.getElementById('currency').value);
665
    var currcode = new String(document.getElementById('currency').value);
665
    var price   =  Number(document.getElementById('price').value);
666
    var price   =  new Number(document.getElementById('price').value);
666
    var exchangerate =  Number(document.getElementById('currency_rate_'+currcode).value);
667
    var exchangerate =  new Number(document.getElementById('currency_rate_'+currcode).value);
668
667
669
    var total =  new Number(quantity*price*exchangerate);
668
    var total =  Number(quantity*price*exchangerate);
670
669
671
    document.getElementById('total').value = total.toFixed(2);
670
    document.getElementById('total').value = total.toFixed(2);
672
    document.getElementById('price').value =  price.toFixed(2);
671
    document.getElementById('price').value =  price.toFixed(2);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-21 / +44 lines)
Lines 3-23 Link Here
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Acquisitions  &rsaquo;
4
<title>Koha &rsaquo; Acquisitions  &rsaquo;
5
    [% IF ( op_save ) %]
5
    [% IF ( op_save ) %]
6
        [% IF ( suggestionid) %]
6
        [% IF ( suggestionid ) %]
7
            [% IF ( op == 'show' ) %]
7
            Suggestions &rsaquo;  Edit suggestion #[% suggestionid %]
8
                Show purchase suggestion #[% suggestionid %]
9
            [% ELSE %]
10
                Edit purchase suggestion #[% suggestionid %]
11
            [% END %]
12
        [% ELSE %]
8
        [% ELSE %]
13
            Enter a new purchase suggestion
9
            Suggestions &rsaquo; Add suggestion
14
        [% END %]
10
        [% END %]
11
    [% ELSIF ( op == 'show' ) %]
12
           Suggestions &rsaquo; Show suggestion #[% suggestionid %]
15
    [% ELSE %]
13
    [% ELSE %]
16
        Suggestions management
14
        Suggestions management
17
    [% END %]
15
    [% END %]
18
</title>
16
</title>
19
[% INCLUDE 'doc-head-close.inc' %]
17
[% INCLUDE 'doc-head-close.inc' %]
20
[% INCLUDE 'calendar.inc' %]
18
[% INCLUDE 'calendar.inc' %]
19
[% IF ( op == 'show' ) %]
20
<script type="text/javascript">
21
    // <![CDATA[
22
    $(document).ready(function(){
23
        $("#deletesuggestion").on("click",function(){
24
            var is_confirmed = confirm(_("Are you sure you want to delete this suggestion?"));
25
            if (is_confirmed) {
26
                return true;
27
            } else {
28
                return false;
29
            }
30
        });
31
    });
32
    // ]]>
33
</script>
34
[% END %]
21
[% IF ( op_else ) %]
35
[% IF ( op_else ) %]
22
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
36
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
23
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
37
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
Lines 135-146 $(document).ready(function() { Link Here
135
<style type="text/css">
149
<style type="text/css">
136
h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
150
h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
137
.overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } .note { -moz-border-radius: 3px; border-radius:3px; background: transparent url("[% interface %]/[% theme %]/img/famfamfam/silk/comment.png") top left no-repeat; padding : 1px 3px 1px 18px; font-size : 90%; }
151
.overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } .note { -moz-border-radius: 3px; border-radius:3px; background: transparent url("[% interface %]/[% theme %]/img/famfamfam/silk/comment.png") top left no-repeat; padding : 1px 3px 1px 18px; font-size : 90%; }
138
</style>[% ELSE %]
152
</style>[% END %]
139
<script type="text/javascript">
153
[% IF ( op_save )  %]
140
// <![CDATA[
154
    <script type="text/javascript">
141
$(document).ready(function() { calcNewsuggTotal(); });
155
        // <![CDATA[
142
// ]]>
156
        $(document).ready(function() { calcNewsuggTotal(); });
143
</script>
157
        // ]]>
158
    </script>
144
[% END %]
159
[% END %]
145
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
160
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
146
</head>
161
</head>
Lines 150-161 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
150
<div id="breadcrumbs">
165
<div id="breadcrumbs">
151
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
166
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
152
    [% IF ( op_save ) %]
167
    [% IF ( op_save ) %]
153
        <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;
168
        [% IF ( suggestionid ) %]
154
        [% IF ( op == 'show' ) %]
169
            <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;  Edit suggestion #[% suggestionid %]
155
            Show suggestion #[% suggestionid %]
156
        [% ELSE %]
170
        [% ELSE %]
157
            Suggestion edit #[% suggestionid %]
171
            <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Add suggestion
158
        [% END %]
172
        [% END %]
173
    [% ELSIF ( op == 'show' ) %]
174
           <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Show suggestion #[% suggestionid %]
159
    [% ELSE %]
175
    [% ELSE %]
160
        Suggestions management
176
        Suggestions management
161
    [% END %]
177
    [% END %]
Lines 167-172 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
167
    <div id="yui-main">
183
    <div id="yui-main">
168
    <div class="yui-b">
184
    <div class="yui-b">
169
185
186
    <div id="toolbar" class="btn-toolbar">
187
        <a class="btn btn-small" id="editsuggestion" href="suggestion.pl?op=edit&amp;suggestionid=[% suggestionid %]"><i class="icon-pencil"></i> Edit</a>
188
        <a class="btn btn-small" id="deletesuggestion" href="suggestion.pl?op=delete&amp;edit_field=[% suggestionid %]"><i class="icon-remove"></i> Delete</a>
189
    </div>
190
170
    <fieldset class="rows">
191
    <fieldset class="rows">
171
      <legend>Bibliographic information</legend>
192
      <legend>Bibliographic information</legend>
172
      <ol>
193
      <ol>
Lines 265-271 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
265
      </ol>
286
      </ol>
266
    </fieldset>
287
    </fieldset>
267
288
268
    <a class="cancel" href="suggestion.pl">&lt;&lt;Back to the list</a>
289
    <fieldset class="action">
290
        <a href="suggestion.pl">&lt;&lt; Back to suggestions</a>
291
    </fieldset>
269
292
270
    </div>
293
    </div>
271
    </div>
294
    </div>
Lines 310-316 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
310
       <ol>
333
       <ol>
311
            [% IF ( suggestionid ) %]
334
            [% IF ( suggestionid ) %]
312
                <li>
335
                <li>
313
                    <label for="status">Status:</label>
336
                    <label for="STATUS">Status:</label>
314
                    <select id="STATUS" name="STATUS">
337
                    <select id="STATUS" name="STATUS">
315
                        <option value="">No Status</option>
338
                        <option value="">No Status</option>
316
339
Lines 386-391 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
386
			<input type="text" size="10" id="quantity" name="quantity" value="[% quantity %]" onchange="calcNewsuggTotal();" />
409
			<input type="text" size="10" id="quantity" name="quantity" value="[% quantity %]" onchange="calcNewsuggTotal();" />
387
                </li><li><label for="currency">Currency:</label>
410
                </li><li><label for="currency">Currency:</label>
388
		        [% FOREACH loop_currenc IN loop_currency %]
411
		        [% FOREACH loop_currenc IN loop_currency %]
412
                    <input type="hidden" value="[% loop_currenc.rate %]" id="currency_rate_[% loop_currenc.currcode %]" name="currency_rate_[% loop_currenc.currcode %]" />
389
		            <input type="hidden" id="[% loop_currenc.currcode %]" name="[% loop_currenc.currcode %]" value="[% loop_currenc.rate %]" />
413
		            <input type="hidden" id="[% loop_currenc.currcode %]" name="[% loop_currenc.currcode %]" value="[% loop_currenc.rate %]" />
390
		        [% END %]
414
		        [% END %]
391
            <select name="currency" id="currency" onchange="calcNewsuggTotal();">
415
            <select name="currency" id="currency" onchange="calcNewsuggTotal();">
Lines 398-404 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
398
			<input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total %]"/>
422
			<input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total %]"/>
399
                </li></ol>
423
                </li></ol>
400
    </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby %][% ELSE %]noone[% END %]"/>
424
    </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby %][% ELSE %]noone[% END %]"/>
401
    <fieldset class="action"><input type="hidden" name="op" value="[% op %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit Your Suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %]
425
    <fieldset class="action"><input type="hidden" name="op" value="[% op %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit your suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %]
402
    </fieldset>
426
    </fieldset>
403
    </form>
427
    </form>
404
[% END %]
428
[% END %]
405
- 

Return to bug 10668