1 | //==== autosize remplace $(... avec jQuery( ==== |
---|
2 | /* |
---|
3 | * A faire Compatibilité entre LLGBO GMAPS |
---|
4 | * Luciano rv_gmaps |
---|
5 | */ |
---|
6 | var d1 = 0; |
---|
7 | var init_tb = 0; |
---|
8 | //=================================================== |
---|
9 | function $(element, nc) { |
---|
10 | return conflit(element, nc) |
---|
11 | } |
---|
12 | //=================================================== |
---|
13 | function conflit(element, nc) { |
---|
14 | var retour=(getStackTrace()); |
---|
15 | var ret_element = ""; |
---|
16 | if (retour.match(RegExp("jQuery", "gi"))) { |
---|
17 | ret_element = jQuery(element); |
---|
18 | } else if (retour.match(RegExp("pamooramics", "gi"))) { |
---|
19 | ret_element = jQuery().$Pamoorama(element); |
---|
20 | } else if (retour.match(RegExp("luciano", "gi"))) { |
---|
21 | ret_element = jQuery().$Luciano(element); |
---|
22 | } else if (retour.match(RegExp("rv_gmaps", "gi"))) { |
---|
23 | ret_element = jQuery().$Prototype(element); |
---|
24 | }else if (retour.match(RegExp("GMaps", "gi"))) { |
---|
25 | ret_element = jQuery(element); |
---|
26 | }else if (retour.match(RegExp("jQuery", "gi"))) { |
---|
27 | ret_element = jQuery(element); |
---|
28 | } |
---|
29 | |
---|
30 | if (ret_element != "") |
---|
31 | return ret_element; |
---|
32 | |
---|
33 | if (DEBUG==true) |
---|
34 | alert(retour); |
---|
35 | return jQuery(element); |
---|
36 | } |
---|
37 | |
---|
38 | //============================================================ |
---|
39 | jQuery(document).ready( |
---|
40 | function (jQuery) { |
---|
41 | jQuery(window).load(function () { |
---|
42 | function $(element, nc) { |
---|
43 | return conflit(element, nc); |
---|
44 | } |
---|
45 | |
---|
46 | if (theme.match("gally", "gi")) |
---|
47 | if (isFunction(inittoolbar)) { |
---|
48 | if (typeof (currentTab) == "undefined") inittoolbar(); |
---|
49 | else initializeImageMode("resize"); |
---|
50 | }; |
---|
51 | |
---|
52 | p1 = jQuery("#theImage").css("position"); |
---|
53 | if (p1 != "static") { |
---|
54 | //==== compatibilité Gally/LLGBO === |
---|
55 | //--- passage relative ==> static ===/ |
---|
56 | jQuery("#theImage").css( {position:"static", |
---|
57 | opacity: '0', filter: 'alpha(opacity= 0)' |
---|
58 | } |
---|
59 | |
---|
60 | ); |
---|
61 | jQuery("#imageToolBar").css({ position: "relative", top: "0px" }); |
---|
62 | } |
---|
63 | |
---|
64 | jQuery(window).resize(); |
---|
65 | |
---|
66 | }); |
---|
67 | |
---|
68 | }) |
---|
69 | ; |
---|
70 | |
---|
71 | function isFunction(fn) { |
---|
72 | tpfn = typeof (fn); |
---|
73 | if (tpfn == "function") return true; |
---|
74 | } |
---|
75 | //========================================================= |
---|
76 | (function ($2) { |
---|
77 | $2.fn.panorama2 = |
---|
78 | function (height, width) { |
---|
79 | var src =jQuery(this); |
---|
80 | return ; |
---|
81 | } |
---|
82 | |
---|
83 | |
---|
84 | })(jQuery); |
---|
85 | |
---|
86 | |
---|
87 | jQuery.fn.extend({ |
---|
88 | //---------------- luciano ------------------------------- |
---|
89 | $Luciano: function (el, nc) { |
---|
90 | return document.id(el, nc, this.document); |
---|
91 | }, |
---|
92 | //=============== PaMOOramics =========================== |
---|
93 | |
---|
94 | $Pamoorama: function (B) { |
---|
95 | if (!B) { |
---|
96 | if (typeof (B) == "boolean") return null; |
---|
97 | return jQuery(); |
---|
98 | } |
---|
99 | if (B.htmlElement) { |
---|
100 | return Garbage.collect(B); |
---|
101 | |
---|
102 | } |
---|
103 | if ([window, document].contains(B)) { return B; } |
---|
104 | var A = $type(B); |
---|
105 | if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; } |
---|
106 | if (A != "element") { |
---|
107 | return null; |
---|
108 | } |
---|
109 | if (B.htmlElement) { return Garbage.collect(B); } |
---|
110 | if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; } |
---|
111 | $extend(B, Element.prototype); |
---|
112 | B.htmlElement = function () { }; |
---|
113 | try{ return Garbage.collect(B);}catch(e){ |
---|
114 | return ; |
---|
115 | } |
---|
116 | |
---|
117 | }, |
---|
118 | //=================================================== |
---|
119 | $Prototype: function (element) { |
---|
120 | //======== prototype.js ===================== |
---|
121 | if (arguments.length > 1) { |
---|
122 | for (var i = 0, elements = [], length = arguments.length; i < length; i++) |
---|
123 | elements.push($(arguments[i])); |
---|
124 | return elements; |
---|
125 | } |
---|
126 | if (typeof element == "string") |
---|
127 | element = document.getElementById(element); |
---|
128 | |
---|
129 | return Element.extend(element); |
---|
130 | |
---|
131 | try { |
---|
132 | new_element = Element.extend(element); |
---|
133 | } catch (e) { |
---|
134 | return new_element; |
---|
135 | } |
---|
136 | return new_element; |
---|
137 | } |
---|
138 | //========================================================= |
---|
139 | }); // fin extend |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | /* |
---|
144 | * mootools.js version: "1.11" |
---|
145 | * pamoorama0.3.js |
---|
146 | * |
---|
147 | * main.js (google maps) |
---|
148 | * prototype.js(mootool version: "1.62") |
---|
149 | * windows.js |
---|
150 | * |
---|
151 | */ |
---|
152 | function getStackTrace() { |
---|
153 | var callstack = []; |
---|
154 | var isCallstackPopulated = false; |
---|
155 | try { |
---|
156 | i.dont.exist += 0; //doesn't exist- that's the point |
---|
157 | } catch (e) { |
---|
158 | var retcallstack = []; |
---|
159 | var e_message = e.message; |
---|
160 | var e_stack = e.stack; |
---|
161 | if (e_stack) { //Firefox Opera 3.6 |
---|
162 | //=== test fichier source ============= |
---|
163 | var lines = e.stack.split("\n"); |
---|
164 | for (var i = 0, len = lines.length; i < len; i++) { |
---|
165 | var Src_Match = lines[i]; |
---|
166 | if (Src_Match.match(/conflit.js/)) { |
---|
167 | // |
---|
168 | } else { |
---|
169 | if (Src_Match.match(/^\s*[A-Za-z0-9\-_\$]+\(/)) { |
---|
170 | callstack.push(Src_Match); //php? |
---|
171 | } else { |
---|
172 | callstack.push(Src_Match); |
---|
173 | } |
---|
174 | if (Src_Match.match("rv_gmaps", "gi")) { |
---|
175 | callstack.push("rv_gmaps"); |
---|
176 | isCallstackPopulated = true; |
---|
177 | break; |
---|
178 | } |
---|
179 | if (Src_Match.match("paMOOramics")) { |
---|
180 | isCallstackPopulated = true; |
---|
181 | callstack.push("paMOOramics"); |
---|
182 | break; |
---|
183 | } |
---|
184 | if (Src_Match.match("Luciano","gi")) { |
---|
185 | callstack.push("Luciano"); |
---|
186 | isCallstackPopulated = true; |
---|
187 | break; |
---|
188 | } |
---|
189 | if (Src_Match.match("main")) { |
---|
190 | alert(Src_Match) |
---|
191 | callstack.push("main"); |
---|
192 | isCallstackPopulated = true; |
---|
193 | break; |
---|
194 | } |
---|
195 | if (Src_Match.match("GMaps|applyMap")) { |
---|
196 | callstack.push("GMaps"); |
---|
197 | isCallstackPopulated = true; |
---|
198 | break; |
---|
199 | } |
---|
200 | if (Src_Match.match("jQuery")) { |
---|
201 | callstack.push("jQuery"); |
---|
202 | isCallstackPopulated = true; |
---|
203 | break; |
---|
204 | } |
---|
205 | } |
---|
206 | } |
---|
207 | //callstack.shift(); |
---|
208 | } |
---|
209 | if (window.opera && e.message && isCallstackPopulated == false) { |
---|
210 | callstack = []; |
---|
211 | //Opera ================================= |
---|
212 | var lines = e.message.split("\n"); |
---|
213 | for (var i = 0, len = lines.length; i < len; i++) { |
---|
214 | if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) { |
---|
215 | var entry = lines[i]; |
---|
216 | //Append next line also since it has the file info |
---|
217 | if (lines[i + 1]) { |
---|
218 | entry += " at " + lines[i + 1]; |
---|
219 | i++; |
---|
220 | } |
---|
221 | callstack.push(entry); |
---|
222 | isCallstackPopulated = true; |
---|
223 | } |
---|
224 | } |
---|
225 | |
---|
226 | } |
---|
227 | //===== fin Opera====================================== |
---|
228 | } |
---|
229 | if (!isCallstackPopulated) { //IE and Safari |
---|
230 | var currentFunction = arguments.callee.caller; |
---|
231 | //next |
---|
232 | callstack = []; |
---|
233 | all_functions = []; |
---|
234 | if (currentFunction == null) { |
---|
235 | return (""); |
---|
236 | } |
---|
237 | |
---|
238 | currentFunction = currentFunction.caller; |
---|
239 | //$family |
---|
240 | while (currentFunction) { |
---|
241 | var fn = currentFunction.toString(); |
---|
242 | |
---|
243 | |
---|
244 | var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " "; |
---|
245 | if (fname != " $") { |
---|
246 | callstack.push(fn); |
---|
247 | // if (fname != " $") callstack.push(fn); |
---|
248 | if (fn.match(RegExp("jquery|switchmenu|gmaps|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) { |
---|
249 | callstack.push('jQuery'); |
---|
250 | break; |
---|
251 | } |
---|
252 | |
---|
253 | //====================== |
---|
254 | if (fn.match(RegExp("_footer|ie_ready|makeDraggable", "gi"))) { |
---|
255 | callstack.push('paMOOramics'); |
---|
256 | break; |
---|
257 | } |
---|
258 | if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { |
---|
259 | callstack.push('rv_gmaps'); |
---|
260 | break; |
---|
261 | } |
---|
262 | //? bubble |
---|
263 | Expression = new RegExp("\$", "gi") |
---|
264 | if (fn.match(Expression)) { |
---|
265 | if (fn.match(RegExp("rateForm", "gi"))) { |
---|
266 | callstack.push('Luciano'); |
---|
267 | break; |
---|
268 | } |
---|
269 | } |
---|
270 | if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano |
---|
271 | callstack.push('Luciano'); |
---|
272 | break; |
---|
273 | } |
---|
274 | |
---|
275 | } |
---|
276 | |
---|
277 | currentFunction = currentFunction.caller; |
---|
278 | } |
---|
279 | |
---|
280 | } |
---|
281 | |
---|
282 | return callstack.join('\n'); |
---|
283 | } |
---|