Revision 1458
Added by Dietmar almost 13 years ago
jquery-plugins.js | ||
---|---|---|
1 |
$(document).ready(function() |
|
2 |
{ |
|
3 |
|
|
4 |
if($(".jcalendar").length) { |
|
5 |
$.insert(WB_URL+"/include/jscalendar/calendar-system.css"); |
|
6 |
} |
|
7 |
|
|
8 |
if($(".jsadmin").length) { |
|
9 |
$.insert(WB_URL+"/modules/jsadmin/backend.css"); |
|
10 |
} |
|
11 |
//Add external link class to external links - |
|
12 |
$('a[href^="http://"]').filter(function() { |
|
13 |
//Compare the anchor tag's host name with location's host name |
|
14 |
return this.hostname && this.hostname !== location.hostname; |
|
15 |
}).addClass("external").attr("target", "_blank"); |
|
16 |
|
|
17 |
/* Add internal link class to external links - */ |
|
18 |
$('a[href^="http://"]').filter(function() { |
|
19 |
//Compare the anchor tag's host name with location's host name |
|
20 |
return this.hostname && this.hostname == location.hostname; |
|
21 |
}).addClass("internal"); |
|
22 |
|
|
23 |
$('form').attr('autocomplete', 'off'); |
|
24 |
|
|
1 |
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 |
|
|
25 | 47 |
}); |
Also available in: Unified diff
Ticket 833 fixed markup for table cells in view.php
change themes.css to make style more flexible in success.htt and error.htt
backend themes: add js function redirect_to_page(url, timer) to redirect without message