Lines 2-7
Link Here
|
2 |
[% USE AuthorisedValues %] |
2 |
[% USE AuthorisedValues %] |
3 |
[% USE KohaDates %] |
3 |
[% USE KohaDates %] |
4 |
[% USE Price %] |
4 |
[% USE Price %] |
|
|
5 |
[% SET footerjs = 1 %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>Koha › Acquisitions › |
7 |
<title>Koha › Acquisitions › |
7 |
[% IF ( op_save ) %] |
8 |
[% IF ( op_save ) %] |
Lines 17-201
Link Here
|
17 |
[% END %] |
18 |
[% END %] |
18 |
</title> |
19 |
</title> |
19 |
[% INCLUDE 'doc-head-close.inc' %] |
20 |
[% INCLUDE 'doc-head-close.inc' %] |
20 |
[% INCLUDE 'calendar.inc' %] |
|
|
21 |
[% IF ( op == 'show' || op_else ) %] |
22 |
<script type="text/javascript"> |
23 |
// <![CDATA[ |
24 |
$(document).ready(function(){ |
25 |
$(".deletesuggestion").on("click",function(){ |
26 |
return confirm(_("Are you sure you want to delete this suggestion?")); |
27 |
}); |
28 |
}); |
29 |
// ]]> |
30 |
</script> |
31 |
[% END %] |
32 |
[% IF ( op_else ) %] |
21 |
[% IF ( op_else ) %] |
33 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
22 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
34 |
[% INCLUDE 'datatables.inc' %] |
|
|
35 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
36 |
<script type="text/javascript"> |
37 |
// <![CDATA[ |
38 |
/** |
39 |
* displayOther. |
40 |
* This function display the select or an textaera to write a reason. |
41 |
*/ |
42 |
function displayOther(id,show,hide){ |
43 |
$("#"+hide+id).hide(); |
44 |
$("#"+show+id).show(); |
45 |
} |
46 |
$(document).ready(function() { |
47 |
$('#suggestiontabs').tabs({ |
48 |
// Correct table sizing for tables hidden in tabs |
49 |
// http://www.datatables.net/examples/api/tabs_and_scrolling.html |
50 |
"activate": function(event, ui) { |
51 |
$( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust(); |
52 |
} |
53 |
}); |
54 |
$(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { |
55 |
"aoColumnDefs": [ |
56 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
57 |
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] } |
58 |
], |
59 |
"sPaginationType": "four_button" |
60 |
})); |
61 |
[% FOREACH suggestion IN suggestions %] |
62 |
// functions for [% suggestion.suggestiontype %] interactions |
63 |
$("#CheckAll[% suggestion.suggestiontype %]").click(function(e){ |
64 |
$("#[% suggestion.suggestiontype %]t").checkCheckboxes(); |
65 |
e.preventDefault(); |
66 |
}); |
67 |
$("#UncheckAll[% suggestion.suggestiontype %]").click(function(e){ |
68 |
$("#[% suggestion.suggestiontype %]t").unCheckCheckboxes(); |
69 |
e.preventDefault(); |
70 |
}); |
71 |
$("#other_reason[% suggestion.suggestiontype %]").hide(); |
72 |
$("#reason[% suggestion.suggestiontype %]").change(function(){ |
73 |
if($(this).val() == "other"){ |
74 |
$(this).hide(); |
75 |
$("#other_reason[% suggestion.suggestiontype %]").show(); |
76 |
} |
77 |
}); |
78 |
$("#[% suggestion.suggestiontype %]delete").change(function(){ |
79 |
if(this.checked){ |
80 |
$("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","delete"); |
81 |
} else { |
82 |
$("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","change"); |
83 |
} |
84 |
}); |
85 |
|
86 |
[% END %] |
23 |
[% END %] |
87 |
$("a[href*=back]").click(function(){ |
24 |
[% IF ( op_else ) %] |
88 |
var sid = $(this).attr("href").replace(/#back/,""); |
25 |
<style type="text/css"> |
89 |
$("#reason"+sid).show().find("option[value='']").attr("selected","selected"); |
26 |
h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; } |
90 |
$("#other_reason"+sid).hide(); |
27 |
.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%; } |
91 |
}); |
28 |
</style> |
92 |
$("h4.local_collapse a").click(function(){ |
|
|
93 |
$(this).parent().parent().find("ol").toggle(); |
94 |
return false; |
95 |
}); |
96 |
// http://jqueryui.com/demos/datepicker/#date-range |
97 |
var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({ |
98 |
changeMonth: true, |
99 |
numberOfMonths: 1, |
100 |
onSelect: function( selectedDate ) { |
101 |
var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate", |
102 |
instance = $( this ).data( "datepicker" ); |
103 |
date = $.datepicker.parseDate( |
104 |
instance.settings.dateFormat || |
105 |
$.datepicker._defaults.dateFormat, |
106 |
selectedDate, instance.settings ); |
107 |
dates.not( this ).datepicker( "option", option, date ); |
108 |
} |
109 |
}); |
110 |
var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({ |
111 |
changeMonth: true, |
112 |
numberOfMonths: 1, |
113 |
onSelect: function( selectedDate ) { |
114 |
var option = this.id == "manageddate_from" ? "minDate" : "maxDate", |
115 |
instance = $( this ).data( "datepicker" ); |
116 |
date = $.datepicker.parseDate( |
117 |
instance.settings.dateFormat || |
118 |
$.datepicker._defaults.dateFormat, |
119 |
selectedDate, instance.settings ); |
120 |
datesMD.not( this ).datepicker( "option", option, date ); |
121 |
} |
122 |
}); |
123 |
var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({ |
124 |
changeMonth: true, |
125 |
numberOfMonths: 1, |
126 |
onSelect: function( selectedDate ) { |
127 |
var option = this.id == "accepteddate_from" ? "minDate" : "maxDate", |
128 |
instance = $( this ).data( "datepicker" ); |
129 |
date = $.datepicker.parseDate( |
130 |
instance.settings.dateFormat || |
131 |
$.datepicker._defaults.dateFormat, |
132 |
selectedDate, instance.settings ); |
133 |
datesAD.not( this ).datepicker( "option", option, date ); |
134 |
} |
135 |
}); |
136 |
|
137 |
$("form.update_suggestions").on("submit", function(e){ |
138 |
var form = this; |
139 |
var action_delete_selected = $(this).find("input[value='delete']").is(":checked"); |
140 |
if ( action_delete_selected ) { |
141 |
var suggestions_to_delete = $(this).find("input[name='edit_field']:checked"); |
142 |
if ( suggestions_to_delete.length == 0 ) { |
143 |
alert(_("Please select at least one suggestion to delete")); |
144 |
e.preventDefault(); |
145 |
return false; |
146 |
} else if ( suggestions_to_delete.length == 1 ) { |
147 |
if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) { |
148 |
e.preventDefault(); |
149 |
return false; |
150 |
} |
151 |
} else if ( suggestions_to_delete.length > 1 ) { |
152 |
if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) { |
153 |
e.preventDefault(); |
154 |
return false; |
155 |
} |
156 |
} |
157 |
} |
158 |
return true; |
159 |
}); |
160 |
}); |
161 |
// ]]> |
162 |
</script> |
163 |
<style type="text/css"> |
164 |
h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; } |
165 |
.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%; } |
166 |
</style>[% END %] |
167 |
[% IF ( op_save ) %] |
168 |
<script type="text/javascript"> |
169 |
// <![CDATA[ |
170 |
$(document).ready(function(){ |
171 |
calcNewsuggTotal(); |
172 |
$("#quantity,#price,#currency").on("change",function(){ |
173 |
calcNewsuggTotal(); |
174 |
}); |
175 |
|
176 |
[% IF other_reason %] |
177 |
$(".select-reason").hide(); |
178 |
$(".select-reason").find("option[value='other']").attr("selected","selected"); |
179 |
$("#other_reason").show(); |
180 |
[% ELSE %] |
181 |
$("#other_reason").hide(); |
182 |
[% END %] |
183 |
$(".select-reason").change(function(){ |
184 |
if($(this).val() == "other"){ |
185 |
$(this).hide(); |
186 |
$("#other_reason").show(); |
187 |
} |
188 |
}); |
189 |
$("a[href*=back]").click(function(){ |
190 |
$(".select-reason").show().find("option[value='']").attr("selected","selected"); |
191 |
$("#other_reason").hide(); |
192 |
}); |
193 |
}); |
194 |
// ]]> |
195 |
</script> |
196 |
[% END %] |
29 |
[% END %] |
197 |
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script> |
|
|
198 |
</head> |
30 |
</head> |
|
|
31 |
|
199 |
<body id="acq_suggestion" class="acq"> |
32 |
<body id="acq_suggestion" class="acq"> |
200 |
[% INCLUDE 'header.inc' %] |
33 |
[% INCLUDE 'header.inc' %] |
201 |
[% INCLUDE 'cat-search.inc' %] |
34 |
[% INCLUDE 'cat-search.inc' %] |
Lines 912-916
h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
Link Here
|
912 |
[% END %] |
745 |
[% END %] |
913 |
</div> |
746 |
</div> |
914 |
[% END %] |
747 |
[% END %] |
|
|
748 |
|
749 |
[% MACRO jsinclude BLOCK %] |
750 |
[% INCLUDE 'calendar.inc' %] |
751 |
[% IF ( op == 'show' || op_else ) %] |
752 |
<script type="text/javascript"> |
753 |
$(document).ready(function(){ |
754 |
$(".deletesuggestion").on("click",function(){ |
755 |
return confirm(_("Are you sure you want to delete this suggestion?")); |
756 |
}); |
757 |
}); |
758 |
</script> |
759 |
[% END %] |
760 |
[% IF ( op_else ) %] |
761 |
[% INCLUDE 'datatables.inc' %] |
762 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
763 |
<script type="text/javascript"> |
764 |
/** |
765 |
* displayOther. |
766 |
* This function display the select or an textaera to write a reason. |
767 |
*/ |
768 |
function displayOther(id,show,hide){ |
769 |
$("#"+hide+id).hide(); |
770 |
$("#"+show+id).show(); |
771 |
} |
772 |
$(document).ready(function() { |
773 |
$('#suggestiontabs').tabs({ |
774 |
// Correct table sizing for tables hidden in tabs |
775 |
// http://www.datatables.net/examples/api/tabs_and_scrolling.html |
776 |
"activate": function(event, ui) { |
777 |
$( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust(); |
778 |
} |
779 |
}); |
780 |
$(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { |
781 |
"aoColumnDefs": [ |
782 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
783 |
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] } |
784 |
], |
785 |
"sPaginationType": "four_button" |
786 |
})); |
787 |
[% FOREACH suggestion IN suggestions %] |
788 |
// functions for [% suggestion.suggestiontype %] interactions |
789 |
$("#CheckAll[% suggestion.suggestiontype %]").click(function(e){ |
790 |
$("#[% suggestion.suggestiontype %]t").checkCheckboxes(); |
791 |
e.preventDefault(); |
792 |
}); |
793 |
$("#UncheckAll[% suggestion.suggestiontype %]").click(function(e){ |
794 |
$("#[% suggestion.suggestiontype %]t").unCheckCheckboxes(); |
795 |
e.preventDefault(); |
796 |
}); |
797 |
$("#other_reason[% suggestion.suggestiontype %]").hide(); |
798 |
$("#reason[% suggestion.suggestiontype %]").change(function(){ |
799 |
if($(this).val() == "other"){ |
800 |
$(this).hide(); |
801 |
$("#other_reason[% suggestion.suggestiontype %]").show(); |
802 |
} |
803 |
}); |
804 |
$("#[% suggestion.suggestiontype %]delete").change(function(){ |
805 |
if(this.checked){ |
806 |
$("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","delete"); |
807 |
} else { |
808 |
$("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","change"); |
809 |
} |
810 |
}); |
811 |
|
812 |
[% END %] |
813 |
$("a[href*=back]").click(function(){ |
814 |
var sid = $(this).attr("href").replace(/#back/,""); |
815 |
$("#reason"+sid).show().find("option[value='']").attr("selected","selected"); |
816 |
$("#other_reason"+sid).hide(); |
817 |
}); |
818 |
$("h4.local_collapse a").click(function(){ |
819 |
$(this).parent().parent().find("ol").toggle(); |
820 |
return false; |
821 |
}); |
822 |
// http://jqueryui.com/demos/datepicker/#date-range |
823 |
var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({ |
824 |
changeMonth: true, |
825 |
numberOfMonths: 1, |
826 |
onSelect: function( selectedDate ) { |
827 |
var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate", |
828 |
instance = $( this ).data( "datepicker" ); |
829 |
date = $.datepicker.parseDate( |
830 |
instance.settings.dateFormat || |
831 |
$.datepicker._defaults.dateFormat, |
832 |
selectedDate, instance.settings ); |
833 |
dates.not( this ).datepicker( "option", option, date ); |
834 |
} |
835 |
}); |
836 |
var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({ |
837 |
changeMonth: true, |
838 |
numberOfMonths: 1, |
839 |
onSelect: function( selectedDate ) { |
840 |
var option = this.id == "manageddate_from" ? "minDate" : "maxDate", |
841 |
instance = $( this ).data( "datepicker" ); |
842 |
date = $.datepicker.parseDate( |
843 |
instance.settings.dateFormat || |
844 |
$.datepicker._defaults.dateFormat, |
845 |
selectedDate, instance.settings ); |
846 |
datesMD.not( this ).datepicker( "option", option, date ); |
847 |
} |
848 |
}); |
849 |
var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({ |
850 |
changeMonth: true, |
851 |
numberOfMonths: 1, |
852 |
onSelect: function( selectedDate ) { |
853 |
var option = this.id == "accepteddate_from" ? "minDate" : "maxDate", |
854 |
instance = $( this ).data( "datepicker" ); |
855 |
date = $.datepicker.parseDate( |
856 |
instance.settings.dateFormat || |
857 |
$.datepicker._defaults.dateFormat, |
858 |
selectedDate, instance.settings ); |
859 |
datesAD.not( this ).datepicker( "option", option, date ); |
860 |
} |
861 |
}); |
862 |
|
863 |
$("form.update_suggestions").on("submit", function(e){ |
864 |
var form = this; |
865 |
var action_delete_selected = $(this).find("input[value='delete']").is(":checked"); |
866 |
if ( action_delete_selected ) { |
867 |
var suggestions_to_delete = $(this).find("input[name='edit_field']:checked"); |
868 |
if ( suggestions_to_delete.length == 0 ) { |
869 |
alert(_("Please select at least one suggestion to delete")); |
870 |
e.preventDefault(); |
871 |
return false; |
872 |
} else if ( suggestions_to_delete.length == 1 ) { |
873 |
if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) { |
874 |
e.preventDefault(); |
875 |
return false; |
876 |
} |
877 |
} else if ( suggestions_to_delete.length > 1 ) { |
878 |
if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) { |
879 |
e.preventDefault(); |
880 |
return false; |
881 |
} |
882 |
} |
883 |
} |
884 |
return true; |
885 |
}); |
886 |
}); |
887 |
</script> |
888 |
[% END %] |
889 |
[% IF ( op_save ) %] |
890 |
<script type="text/javascript"> |
891 |
$(document).ready(function(){ |
892 |
calcNewsuggTotal(); |
893 |
$("#quantity,#price,#currency").on("change",function(){ |
894 |
calcNewsuggTotal(); |
895 |
}); |
896 |
|
897 |
[% IF other_reason %] |
898 |
$(".select-reason").hide(); |
899 |
$(".select-reason").find("option[value='other']").attr("selected","selected"); |
900 |
$("#other_reason").show(); |
901 |
[% ELSE %] |
902 |
$("#other_reason").hide(); |
903 |
[% END %] |
904 |
$(".select-reason").change(function(){ |
905 |
if($(this).val() == "other"){ |
906 |
$(this).hide(); |
907 |
$("#other_reason").show(); |
908 |
} |
909 |
}); |
910 |
$("a[href*=back]").click(function(){ |
911 |
$(".select-reason").show().find("option[value='']").attr("selected","selected"); |
912 |
$("#other_reason").hide(); |
913 |
}); |
914 |
}); |
915 |
</script> |
916 |
[% END %] |
917 |
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script> |
918 |
[% END %] |
919 |
|
915 |
[% INCLUDE 'intranet-bottom.inc' %] |
920 |
[% INCLUDE 'intranet-bottom.inc' %] |
916 |
|
921 |
|