Bug 10309 - New OPAC theme based on Bootstrap
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / js / global.js
1 function confirmDelete(message) {
2     return (confirm(message) ? true : false);
3 }
4
5 function Dopop(link) {
6     newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes,resizeable=yes');
7 }
8
9 jQuery.fn.preventDoubleFormSubmit = function() {
10     jQuery(this).submit(function() {
11         if (this.beenSubmitted)
12             return false;
13         else
14             this.beenSubmitted = true;
15     });
16 };
17
18 function prefixOf (s, tok) {
19     var index = s.indexOf(tok);
20     return s.substring(0, index);
21 }
22 function suffixOf (s, tok) {
23     var index = s.indexOf(tok);
24     return s.substring(index + 1);
25 }