1 |
1458
|
Luisehahne
|
function include_file(filename, filetype) {
|
2 |
|
|
|
3 |
|
|
if(!filetype)
|
4 |
|
|
var filetype = 'js'; //js default filetype
|
5 |
|
|
|
6 |
|
|
var th = document.getElementsByTagName('head')[0];
|
7 |
|
|
var s = document.createElement((filetype == "js") ? 'script' : 'link');
|
8 |
|
|
|
9 |
|
|
s.setAttribute('type',(filetype == "js") ? 'text/javascript' : 'text/css');
|
10 |
|
|
|
11 |
|
|
if (filetype == "css")
|
12 |
|
|
s.setAttribute('rel','stylesheet');
|
13 |
|
|
|
14 |
|
|
s.setAttribute((filetype == "js") ? 'src' : 'href', filename);
|
15 |
|
|
th.appendChild(s);
|
16 |
|
|
|
17 |
|
|
}
|
18 |
|
|
|
19 |
|
|
function redirect_to_page (url, timer) {
|
20 |
|
|
setTimeout('self.location.href="'+url+'"', timer);
|
21 |
|
|
}
|
22 |
|
|
|
23 |
|
|
$(document).ready(function()
|
24 |
|
|
{
|
25 |
|
|
|
26 |
|
|
if($(".jcalendar").length) {
|
27 |
|
|
$.insert(WB_URL+"/include/jscalendar/calendar-system.css");
|
28 |
|
|
}
|
29 |
|
|
|
30 |
|
|
if($(".jsadmin").length) {
|
31 |
|
|
$.insert(WB_URL+"/modules/jsadmin/backend.css");
|
32 |
|
|
}
|
33 |
|
|
//Add external link class to external links -
|
34 |
|
|
$('a[href^="http://"]').filter(function() {
|
35 |
|
|
//Compare the anchor tag's host name with location's host name
|
36 |
|
|
return this.hostname && this.hostname !== location.hostname;
|
37 |
|
|
}).addClass("external").attr("target", "_blank");
|
38 |
|
|
|
39 |
|
|
/* Add internal link class to external links - */
|
40 |
|
|
$('a[href^="http://"]').filter(function() {
|
41 |
|
|
//Compare the anchor tag's host name with location's host name
|
42 |
|
|
return this.hostname && this.hostname == location.hostname;
|
43 |
|
|
}).addClass("internal");
|
44 |
|
|
|
45 |
|
|
$('form').attr('autocomplete', 'off');
|
46 |
|
|
|
47 |
1188
|
Luisehahne
|
});
|