Project

General

Profile

« Previous | Next » 

Revision 1369

Added by Dietmar almost 14 years ago

add jquery-include.js (Tks to Stefek)
update bind jquery in frontend, jquery-include.js and jquery-insrt.js are included

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12

  
13 13
------------------------------------- 2.8.2 -------------------------------------
14
31 Dec-2010 Build 1369 Dietmar Woellbrink (Luisehahne)
15
+ add jquery-include.js (Tks to Stefek)
16
! update bind jquery in frontend, jquery-include.js and jquery-insrt.js are included
14 17
31 Dec-2010 Build 1368 Dietmar Woellbrink (Luisehahne)
15 18
- delete class.secureform.php
16 19
+ add newest SecureForm 
branches/2.8.x/wb/include/jquery/jquery-include.js
1
(function($){
2
/*
3
 * includeMany 1.2.2
4
 *
5
 * Copyright (c) 2009 Arash Karimzadeh (arashkarimzadeh.com)
6
 * Licensed under the MIT (MIT-LICENSE.txt)
7
 * http://www.opensource.org/licenses/mit-license.php
8
 *
9
 * Date: Dec 03 2009
10
 */
11
$.chainclude = function(urls,finaly){
12
	var onload = function(callback,data){
13
						if(typeof urls.length!='undefined'){
14
							if(urls.length==0)
15
								return $.isFunction(finaly)
16
											?finaly(data)
17
											:null;
18
							urls.shift();
19
							return $.chainclude.load(urls,onload);
20
						}
21
						for(var item in urls){
22
							urls[item](data);
23
							delete urls[item];
24
							var count = 0;
25
							for(var i in urls)
26
								count++;
27
							return (count==0)
28
										?$.isFunction(finaly)?finaly(data):null
29
										:$.chainclude.load(urls,onload);
30
						}
31
					}
32
	$.chainclude.load(urls,onload);
33
};
34
$.chainclude.load = function(urls,onload){
35
	if(typeof urls=='object' && typeof urls.length=='undefined')
36
		for(var item in urls)
37
			return $.include.load(item,onload,urls[item].callback);
38
	urls = $.makeArray(urls);
39
	$.include.load(urls[0],onload,null);
40
};
41
$.include = function(urls,finaly){
42
	var luid = $.include.luid++;
43
	var onload = function(callback,data){
44
						if($.isFunction(callback))
45
							callback(data);
46
						if(--$.include.counter[luid]==0&&$.isFunction(finaly))
47
							finaly();
48
					}
49
	if(typeof urls=='object' && typeof urls.length=='undefined'){
50
		$.include.counter[luid] = 0;
51
		for(var item in urls)
52
			$.include.counter[luid]++;
53
		return $.each(urls,function(url,callback){$.include.load(url,onload,callback);});
54
	}
55
	urls = $.makeArray(urls);
56
	$.include.counter[luid] = urls.length;
57
	$.each(urls,function(){$.include.load(this,onload,null);});
58
}
59
$.extend(
60
	$.include,
61
	{
62
		luid: 0,
63
		counter: [],
64
		load: function(url,onload,callback){
65
			url = url.toString();
66
			if($.include.exist(url))
67
				return onload(callback);
68
			if(/.css$/.test(url))
69
				$.include.loadCSS(url,onload,callback);
70
			else if(/.js$/.test(url))
71
				$.include.loadJS(url,onload,callback);
72
			else
73
				$.get(url,function(data){onload(callback,data)});
74
		},
75
		loadCSS: function(url,onload,callback){
76
			var css=document.createElement('link');
77
			css.setAttribute('type','text/css');
78
			css.setAttribute('rel','stylesheet');
79
			css.setAttribute('href',''+url);
80
			$('head').get(0).appendChild(css);
81
			$.browser.msie
82
				?$.include.IEonload(css,onload,callback)
83
				:onload(callback);//other browsers do not support it
84
		},
85
		loadJS: function(url,onload,callback){
86
			var js=document.createElement('script');
87
			js.setAttribute('type','text/javascript');
88
			js.setAttribute('src',''+url);
89
			$.browser.msie
90
				?$.include.IEonload(js,onload,callback)
91
				:js.onload = function(){onload(callback)};
92
			$('head').get(0).appendChild(js);
93
		},
94
		IEonload: function(elm,onload,callback){
95
			elm.onreadystatechange = 
96
					function(){
97
						if(this.readyState=='loaded'||this.readyState=='complete')
98
							onload(callback);
99
					}
100
		},
101
		exist: function(url){
102
			var fresh = false;
103
			$('head script').each(
104
								function(){
105
									if(/.css$/.test(url)&&this.href==url)
106
											return fresh=true;
107
									else if(/.js$/.test(url)&&this.src==url)
108
											return fresh=true;
109
								}
110
							);
111
			return fresh;
112
		}
113
	}
114
);
115
//
116
})(jQuery);
0 117

  
branches/2.8.x/wb/include/jscalendar/wb-setup.php
47 47
		$jscal_lang = 'en';
48 48
	}
49 49
	// today
50
	$jscal_today = gmdate('Y/m/d');
50
	$jscal_today = gmdate('Y/m/d H:i');
51 51
	// first-day-of-week
52 52
	$jscal_firstday = '1'; // monday
53 53
	if(LANGUAGE=='EN')
......
81 81
		$jscal_format .= ' H:i';
82 82
		$jscal_ifformat .= ' %H:%M';
83 83
	}
84

  
84 85
	// load scripts for jscalendar
85 86
?>
86 87
<script type="text/javascript" src="<?php echo WB_URL ?>/include/jscalendar/lang/calendar-<?php echo $jscal_lang ?>.js"></script>
branches/2.8.x/wb/admin/interface/version.php
52 52

  
53 53
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
54 54
if(!defined('VERSION')) define('VERSION', '2.8.2.RC3');
55
if(!defined('REVISION')) define('REVISION', '1368');
55
if(!defined('REVISION')) define('REVISION', '1369');
56 56

  
57 57
?>
branches/2.8.x/wb/framework/frontend.functions.php
421 421

  
422 422
			$jquery_links .= '<script src="'.WB_URL.'/include/jquery/jquery-min.js" type="text/javascript"></script>'."\n";
423 423
			$jquery_links .= '<script src="'.WB_URL.'/include/jquery/jquery-insert.js" type="text/javascript"></script>'."\n";
424
			$jquery_links .= '<script src="'.WB_URL.'/include/jquery/jquery-include.js" type="text/javascript"></script>'."\n";
424 425
            /* workout to insert ui.css and theme */
425 426
            $jquery_theme =  WB_PATH.'/modules/jquery/jquery_theme.js';
426 427
			$jquery_links .=  file_exists($jquery_theme)

Also available in: Unified diff