Project

General

Profile

« Previous | Next » 

Revision 1458

Added by Dietmar almost 13 years ago

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

View differences:

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

  
12
	//Add external link class to external links -
13
	$('a[href^="http://"]').filter(function() {
14
		//Compare the anchor tag's host name with location's host name
15
	    return this.hostname && this.hostname !== location.hostname;
16
	  }).addClass("external").attr("target", "_blank");
17

  
18
	/* Add internal link class to external links -   */
19
	$('a[href^="http://"]').filter(function() {
20
		//Compare the anchor tag's host name with location's host name
21
	    return this.hostname && this.hostname == location.hostname;
22
	  }).addClass("internal");
23

  
24
	$('form').attr('autocomplete', 'off');
25

  
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

  
34
	//Add external link class to external links -
35
	$('a[href^="http://"]').filter(function() {
36
		//Compare the anchor tag's host name with location's host name
37
	    return this.hostname && this.hostname !== location.hostname;
38
	  }).addClass("external").attr("target", "_blank");
39

  
40
	/* Add internal link class to external links -   */
41
	$('a[href^="http://"]').filter(function() {
42
		//Compare the anchor tag's host name with location's host name
43
	    return this.hostname && this.hostname == location.hostname;
44
	  }).addClass("internal");
45

  
46
	$('form').attr('autocomplete', 'off');
47

  
26 48
});

Also available in: Unified diff