Lines 4-10
if ( KOHA === undefined ) var KOHA = {};
Link Here
|
4 |
function _(s) { return s; } // dummy function for gettext |
4 |
function _(s) { return s; } // dummy function for gettext |
5 |
|
5 |
|
6 |
// http://stackoverflow.com/questions/1038746/equivalent-of-string-format-in-jquery/5341855#5341855 |
6 |
// http://stackoverflow.com/questions/1038746/equivalent-of-string-format-in-jquery/5341855#5341855 |
7 |
String.prototype.format = function() { return formatstr(this, arguments) } |
7 |
String.prototype.format = function() { return formatstr(this, arguments); }; |
8 |
function formatstr(str, col) { |
8 |
function formatstr(str, col) { |
9 |
col = typeof col === 'object' ? col : Array.prototype.slice.call(arguments, 1); |
9 |
col = typeof col === 'object' ? col : Array.prototype.slice.call(arguments, 1); |
10 |
var idx = 0; |
10 |
var idx = 0; |
Lines 13-19
function formatstr(str, col) {
Link Here
|
13 |
if (m == "%s") { return col[idx++]; } |
13 |
if (m == "%s") { return col[idx++]; } |
14 |
return col[n]; |
14 |
return col[n]; |
15 |
}); |
15 |
}); |
16 |
}; |
16 |
} |
17 |
|
17 |
|
18 |
|
18 |
|
19 |
// http://stackoverflow.com/questions/14859281/select-tab-by-name-in-jquery-ui-1-10-0/16550804#16550804 |
19 |
// http://stackoverflow.com/questions/14859281/select-tab-by-name-in-jquery-ui-1-10-0/16550804#16550804 |
Lines 96-106
function openWindow(link,name,width,height) {
Link Here
|
96 |
name = (typeof name == "undefined")?'popup':name; |
96 |
name = (typeof name == "undefined")?'popup':name; |
97 |
width = (typeof width == "undefined")?'600':width; |
97 |
width = (typeof width == "undefined")?'600':width; |
98 |
height = (typeof height == "undefined")?'400':height; |
98 |
height = (typeof height == "undefined")?'400':height; |
|
|
99 |
var newwin; |
99 |
//IE <= 9 can't handle a "name" with whitespace |
100 |
//IE <= 9 can't handle a "name" with whitespace |
100 |
try { |
101 |
try { |
101 |
var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); |
102 |
newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); |
102 |
} catch(e) { |
103 |
} catch(e) { |
103 |
var newin=window.open(link,null,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); |
104 |
newin=window.open(link,null,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); |
104 |
} |
105 |
} |
105 |
} |
106 |
} |
106 |
|
107 |
|
Lines 122-128
function confirmDelete(message) {
Link Here
|
122 |
} |
123 |
} |
123 |
|
124 |
|
124 |
function playSound( sound ) { |
125 |
function playSound( sound ) { |
125 |
if ( ! ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) { |
126 |
if ( ! ( sound.indexOf('http://') === 0 || sound.indexOf('https://') === 0 ) ) { |
126 |
sound = AUDIO_ALERT_PATH + sound; |
127 |
sound = AUDIO_ALERT_PATH + sound; |
127 |
} |
128 |
} |
128 |
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; |
129 |
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; |
129 |
- |
|
|