-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackend_body.js
More file actions
141 lines (116 loc) · 3.3 KB
/
Copy pathbackend_body.js
File metadata and controls
141 lines (116 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
Module developed for the Open Source Content Management System Website Baker
(http://websitebaker.org)
Copyright (c) 2010, Ralf Hertsch
Contact me: ralf.hertsch@phpManufaktur.de, http://phpManufaktur.de
This module is free software. You can redistribute it and/or modify it
under the terms of the GNU General Public License - version 2 or later,
as published by the Free Software Foundation: http://www.gnu.org/licenses/gpl.html.
This module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
$Id$
**/
/*
* by Petko D. Petkov; pdp (architect)
* http://www.gnucitizen.org
* http://www.gnucitizen.org/projects/jquery-include/
*/
jQuery.extend({
/*
* included scripts
*/
includedScripts: {},
/*
* include timer
*/
includeTimer: null,
/*
* include
*/
include: function (url, onload) {
if (jQuery.includedScripts[url] != undefined) {
return;
}
jQuery.isReady = false;
if (jQuery.readyList == null) {
jQuery.readyList = [];
}
var script = document.createElement('script');
script.type = 'text/javascript';
script.onload = function () {
jQuery.includedScripts[url] = true;
if (typeof onload == 'function') {
onload.apply(jQuery(script), arguments);
}
};
script.onreadystatechange = function () {
if (script.readyState == 'complete') {
jQuery.includedScripts[url] = true;
if (typeof onload == 'function') {
onload.apply(jQuery(script), arguments);
}
}
};
script.src = url;
jQuery.includedScripts[url] = false;
document.getElementsByTagName('head')[0].appendChild(script);
if (!jQuery.includeTimer) {
jQuery.includeTimer = window.setInterval(function () {
jQuery.ready();
}, 10);
}
}
});
/*
* replacement of jQuery.ready
*/
jQuery.extend({
/*
* hijack jQuery.ready
*/
_ready: jQuery.ready,
/*
* jQuery.ready replacement
*/
ready: function () {
isReady = true;
for (var script in jQuery.includedScripts) {
if (jQuery.includedScripts[script] == false) {
isReady = false;
break;
}
}
if (isReady) {
window.clearInterval(jQuery.includeTimer);
jQuery._ready.apply(jQuery, arguments);
}
}
});
//var basisURL = window.location.protocol+'//' + window.location.hostname;
$.include(WB_URL + '/modules/kit/include/jquery/ui/ui.core.js');
$.include(WB_URL + '/modules/kit/include/jquery/ui/ui.accordion.js');
$.include(WB_URL + '/modules/kit/include/jquery/ui/ui.datepicker.js');
if (isNaN(document.getElementById('language'))) {
lang = document.getElementById('language').value;
if (lang != 'en') {
$.include(WB_URL + '/modules/kit/include/jquery/ui/i18n/ui.datepicker-'+lang+'.js');
}
}
$(document).ready(function() {
$('#accordion').accordion({
header: '.accordion_tab',
autoHeight: false
});
if (isNaN(document.getElementById('language'))) {
$('#datepicker').datepicker({ });
$('#datepicker_2').datepicker({ });
$('#datepicker_3').datepicker({ });
$('#datepicker_4').datepicker({ });
$('#datepicker_5').datepicker({ });
}
});
// OpenStreetMap
//$.include('http://www.openlayers.org/api/OpenLayers.js');
//$.include('http://www.openstreetmap.org/openlayers/OpenStreetMap.js');