svn_wc_tree 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/ChangeLog +4 -0
  2. data/LICENSE +165 -0
  3. data/Manifest +57 -0
  4. data/README.rdoc +333 -0
  5. data/bin/svn_wc_tree +190 -0
  6. data/cgi/svn_wc_broker.cgi +38 -0
  7. data/lib/svn_wc_broker.rb +161 -0
  8. data/lib/svn_wc_client.rb +266 -0
  9. data/svn_conf.yaml +9 -0
  10. data/svn_wc_tree/css/swt.css +4 -0
  11. data/svn_wc_tree/img/swt_spinner.gif +0 -0
  12. data/svn_wc_tree/index.html +137 -0
  13. data/svn_wc_tree/index.php +29 -0
  14. data/svn_wc_tree/js/jquery-1.3.2.js +4376 -0
  15. data/svn_wc_tree/js/jquery.blockUI-2.31.js +477 -0
  16. data/svn_wc_tree/js/jquery.cookie.js +96 -0
  17. data/svn_wc_tree/js/jquery.tree.checkbox.js +75 -0
  18. data/svn_wc_tree/js/jquery.tree.js +2058 -0
  19. data/svn_wc_tree/js/source/jquery.tree.js +2058 -0
  20. data/svn_wc_tree/js/source/jquery.tree.min.js +1 -0
  21. data/svn_wc_tree/js/source/lib/jquery.cookie.js +96 -0
  22. data/svn_wc_tree/js/source/lib/jquery.hotkeys.js +244 -0
  23. data/svn_wc_tree/js/source/lib/jquery.js +19 -0
  24. data/svn_wc_tree/js/source/lib/jquery.metadata.js +122 -0
  25. data/svn_wc_tree/js/source/lib/sarissa.js +110 -0
  26. data/svn_wc_tree/js/source/plugins/_jquery.tree.rtl.js +32 -0
  27. data/svn_wc_tree/js/source/plugins/jquery.tree.checkbox.js +75 -0
  28. data/svn_wc_tree/js/source/plugins/jquery.tree.contextmenu.js +129 -0
  29. data/svn_wc_tree/js/source/plugins/jquery.tree.cookie.js +70 -0
  30. data/svn_wc_tree/js/source/plugins/jquery.tree.hotkeys.js +78 -0
  31. data/svn_wc_tree/js/source/plugins/jquery.tree.metadata.js +17 -0
  32. data/svn_wc_tree/js/source/plugins/jquery.tree.themeroller.js +33 -0
  33. data/svn_wc_tree/js/source/plugins/jquery.tree.xml_flat.js +123 -0
  34. data/svn_wc_tree/js/source/plugins/jquery.tree.xml_nested.js +124 -0
  35. data/svn_wc_tree/js/source/themes/apple/bg.jpg +0 -0
  36. data/svn_wc_tree/js/source/themes/apple/dot_for_ie.gif +0 -0
  37. data/svn_wc_tree/js/source/themes/apple/icons.png +0 -0
  38. data/svn_wc_tree/js/source/themes/apple/style.css +34 -0
  39. data/svn_wc_tree/js/source/themes/apple/throbber.gif +0 -0
  40. data/svn_wc_tree/js/source/themes/checkbox/dot_for_ie.gif +0 -0
  41. data/svn_wc_tree/js/source/themes/checkbox/icons.png +0 -0
  42. data/svn_wc_tree/js/source/themes/checkbox/style.css +38 -0
  43. data/svn_wc_tree/js/source/themes/checkbox/throbber.gif +0 -0
  44. data/svn_wc_tree/js/source/themes/classic/dot_for_ie.gif +0 -0
  45. data/svn_wc_tree/js/source/themes/classic/icons.png +0 -0
  46. data/svn_wc_tree/js/source/themes/classic/style.css +31 -0
  47. data/svn_wc_tree/js/source/themes/classic/throbber.gif +0 -0
  48. data/svn_wc_tree/js/source/themes/default/dot_for_ie.gif +0 -0
  49. data/svn_wc_tree/js/source/themes/default/icons.png +0 -0
  50. data/svn_wc_tree/js/source/themes/default/style.css +30 -0
  51. data/svn_wc_tree/js/source/themes/default/throbber.gif +0 -0
  52. data/svn_wc_tree/js/source/themes/themeroller/dot_for_ie.gif +0 -0
  53. data/svn_wc_tree/js/source/themes/themeroller/icons.png +0 -0
  54. data/svn_wc_tree/js/source/themes/themeroller/style.css +39 -0
  55. data/svn_wc_tree/js/source/themes/themeroller/throbber.gif +0 -0
  56. data/svn_wc_tree/js/swt.js +534 -0
  57. data/svn_wc_tree.conf +9 -0
  58. metadata +122 -0
@@ -0,0 +1,477 @@
1
+ /*!
2
+ * jQuery blockUI plugin
3
+ * Version 2.31 (06-JAN-2010)
4
+ * @requires jQuery v1.2.3 or later
5
+ *
6
+ * Examples at: http://malsup.com/jquery/block/
7
+ * Copyright (c) 2007-2008 M. Alsup
8
+ * Dual licensed under the MIT and GPL licenses:
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ * http://www.gnu.org/licenses/gpl.html
11
+ *
12
+ * Thanks to Amir-Hossein Sobhi for some excellent contributions!
13
+ */
14
+
15
+ ;(function($) {
16
+
17
+ if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
18
+ alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
19
+ return;
20
+ }
21
+
22
+ $.fn._fadeIn = $.fn.fadeIn;
23
+
24
+ var noOp = function() {};
25
+
26
+ // this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
27
+ // retarded userAgent strings on Vista)
28
+ var mode = document.documentMode || 0;
29
+ var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
30
+ var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
31
+
32
+ // global $ methods for blocking/unblocking the entire page
33
+ $.blockUI = function(opts) { install(window, opts); };
34
+ $.unblockUI = function(opts) { remove(window, opts); };
35
+
36
+ // convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
37
+ $.growlUI = function(title, message, timeout, onClose) {
38
+ var $m = $('<div class="growlUI"></div>');
39
+ if (title) $m.append('<h1>'+title+'</h1>');
40
+ if (message) $m.append('<h2>'+message+'</h2>');
41
+ if (timeout == undefined) timeout = 3000;
42
+ $.blockUI({
43
+ message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
44
+ timeout: timeout, showOverlay: false,
45
+ onUnblock: onClose,
46
+ css: $.blockUI.defaults.growlCSS
47
+ });
48
+ };
49
+
50
+ // plugin method for blocking element content
51
+ $.fn.block = function(opts) {
52
+ return this.unblock({ fadeOut: 0 }).each(function() {
53
+ if ($.css(this,'position') == 'static')
54
+ this.style.position = 'relative';
55
+ if ($.browser.msie)
56
+ this.style.zoom = 1; // force 'hasLayout'
57
+ install(this, opts);
58
+ });
59
+ };
60
+
61
+ // plugin method for unblocking element content
62
+ $.fn.unblock = function(opts) {
63
+ return this.each(function() {
64
+ remove(this, opts);
65
+ });
66
+ };
67
+
68
+ $.blockUI.version = 2.31; // 2nd generation blocking at no extra cost!
69
+
70
+ // override these in your code to change the default behavior and style
71
+ $.blockUI.defaults = {
72
+ // message displayed when blocking (use null for no message)
73
+ message: '<h1>Please wait...</h1>',
74
+
75
+ title: null, // title string; only used when theme == true
76
+ draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
77
+
78
+ theme: false, // set to true to use with jQuery UI themes
79
+
80
+ // styles for the message when blocking; if you wish to disable
81
+ // these and use an external stylesheet then do this in your code:
82
+ // $.blockUI.defaults.css = {};
83
+ css: {
84
+ padding: 0,
85
+ margin: 0,
86
+ width: '30%',
87
+ top: '40%',
88
+ left: '35%',
89
+ textAlign: 'center',
90
+ color: '#000',
91
+ border: '3px solid #aaa',
92
+ backgroundColor:'#fff',
93
+ cursor: 'wait'
94
+ },
95
+
96
+ // minimal style set used when themes are used
97
+ themedCSS: {
98
+ width: '30%',
99
+ top: '40%',
100
+ left: '35%'
101
+ },
102
+
103
+ // styles for the overlay
104
+ overlayCSS: {
105
+ backgroundColor: '#000',
106
+ opacity: 0.6,
107
+ cursor: 'wait'
108
+ },
109
+
110
+ // styles applied when using $.growlUI
111
+ growlCSS: {
112
+ width: '350px',
113
+ top: '10px',
114
+ left: '',
115
+ right: '10px',
116
+ border: 'none',
117
+ padding: '5px',
118
+ opacity: 0.6,
119
+ cursor: 'default',
120
+ color: '#fff',
121
+ backgroundColor: '#000',
122
+ '-webkit-border-radius': '10px',
123
+ '-moz-border-radius': '10px'
124
+ },
125
+
126
+ // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
127
+ // (hat tip to Jorge H. N. de Vasconcelos)
128
+ iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
129
+
130
+ // force usage of iframe in non-IE browsers (handy for blocking applets)
131
+ forceIframe: false,
132
+
133
+ // z-index for the blocking overlay
134
+ baseZ: 1000,
135
+
136
+ // set these to true to have the message automatically centered
137
+ centerX: true, // <-- only effects element blocking (page block controlled via css above)
138
+ centerY: true,
139
+
140
+ // allow body element to be stetched in ie6; this makes blocking look better
141
+ // on "short" pages. disable if you wish to prevent changes to the body height
142
+ allowBodyStretch: true,
143
+
144
+ // enable if you want key and mouse events to be disabled for content that is blocked
145
+ bindEvents: true,
146
+
147
+ // be default blockUI will supress tab navigation from leaving blocking content
148
+ // (if bindEvents is true)
149
+ constrainTabKey: true,
150
+
151
+ // fadeIn time in millis; set to 0 to disable fadeIn on block
152
+ fadeIn: 200,
153
+
154
+ // fadeOut time in millis; set to 0 to disable fadeOut on unblock
155
+ fadeOut: 400,
156
+
157
+ // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
158
+ timeout: 0,
159
+
160
+ // disable if you don't want to show the overlay
161
+ showOverlay: true,
162
+
163
+ // if true, focus will be placed in the first available input field when
164
+ // page blocking
165
+ focusInput: true,
166
+
167
+ // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
168
+ applyPlatformOpacityRules: true,
169
+
170
+ // callback method invoked when fadeIn has completed and blocking message is visible
171
+ onBlock: null,
172
+
173
+ // callback method invoked when unblocking has completed; the callback is
174
+ // passed the element that has been unblocked (which is the window object for page
175
+ // blocks) and the options that were passed to the unblock call:
176
+ // onUnblock(element, options)
177
+ onUnblock: null,
178
+
179
+ // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
180
+ quirksmodeOffsetHack: 4
181
+ };
182
+
183
+ // private data and functions follow...
184
+
185
+ var pageBlock = null;
186
+ var pageBlockEls = [];
187
+
188
+ function install(el, opts) {
189
+ var full = (el == window);
190
+ var msg = opts && opts.message !== undefined ? opts.message : undefined;
191
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
192
+ opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
193
+ var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
194
+ var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
195
+ msg = msg === undefined ? opts.message : msg;
196
+
197
+ // remove the current block (if there is one)
198
+ if (full && pageBlock)
199
+ remove(window, {fadeOut:0});
200
+
201
+ // if an existing element is being used as the blocking content then we capture
202
+ // its current place in the DOM (and current display style) so we can restore
203
+ // it when we unblock
204
+ if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
205
+ var node = msg.jquery ? msg[0] : msg;
206
+ var data = {};
207
+ $(el).data('blockUI.history', data);
208
+ data.el = node;
209
+ data.parent = node.parentNode;
210
+ data.display = node.style.display;
211
+ data.position = node.style.position;
212
+ if (data.parent)
213
+ data.parent.removeChild(node);
214
+ }
215
+
216
+ var z = opts.baseZ;
217
+
218
+ // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
219
+ // layer1 is the iframe layer which is used to supress bleed through of underlying content
220
+ // layer2 is the overlay layer which has opacity and a wait cursor (by default)
221
+ // layer3 is the message content that is displayed while blocking
222
+
223
+ var lyr1 = ($.browser.msie || opts.forceIframe)
224
+ ? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
225
+ : $('<div class="blockUI" style="display:none"></div>');
226
+ var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
227
+
228
+ var lyr3;
229
+ if (opts.theme && full) {
230
+ var s = '<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">' +
231
+ '<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
232
+ '<div class="ui-widget-content ui-dialog-content"></div>' +
233
+ '</div>';
234
+ lyr3 = $(s);
235
+ }
236
+ else {
237
+ lyr3 = full ? $('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>')
238
+ : $('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');
239
+ }
240
+
241
+ // if we have a message, style it
242
+ if (msg) {
243
+ if (opts.theme) {
244
+ lyr3.css(themedCSS);
245
+ lyr3.addClass('ui-widget-content');
246
+ }
247
+ else
248
+ lyr3.css(css);
249
+ }
250
+
251
+ // style the overlay
252
+ if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))
253
+ lyr2.css(opts.overlayCSS);
254
+ lyr2.css('position', full ? 'fixed' : 'absolute');
255
+
256
+ // make iframe layer transparent in IE
257
+ if ($.browser.msie || opts.forceIframe)
258
+ lyr1.css('opacity',0.0);
259
+
260
+ //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
261
+ var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
262
+ $.each(layers, function() {
263
+ this.appendTo($par);
264
+ });
265
+
266
+ if (opts.theme && opts.draggable && $.fn.draggable) {
267
+ lyr3.draggable({
268
+ handle: '.ui-dialog-titlebar',
269
+ cancel: 'li'
270
+ });
271
+ }
272
+
273
+ // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
274
+ var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
275
+ if (ie6 || expr) {
276
+ // give body 100% height
277
+ if (full && opts.allowBodyStretch && $.boxModel)
278
+ $('html,body').css('height','100%');
279
+
280
+ // fix ie6 issue when blocked element has a border width
281
+ if ((ie6 || !$.boxModel) && !full) {
282
+ var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
283
+ var fixT = t ? '(0 - '+t+')' : 0;
284
+ var fixL = l ? '(0 - '+l+')' : 0;
285
+ }
286
+
287
+ // simulate fixed position
288
+ $.each([lyr1,lyr2,lyr3], function(i,o) {
289
+ var s = o[0].style;
290
+ s.position = 'absolute';
291
+ if (i < 2) {
292
+ full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
293
+ : s.setExpression('height','this.parentNode.offsetHeight + "px"');
294
+ full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
295
+ : s.setExpression('width','this.parentNode.offsetWidth + "px"');
296
+ if (fixL) s.setExpression('left', fixL);
297
+ if (fixT) s.setExpression('top', fixT);
298
+ }
299
+ else if (opts.centerY) {
300
+ if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
301
+ s.marginTop = 0;
302
+ }
303
+ else if (!opts.centerY && full) {
304
+ var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
305
+ var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
306
+ s.setExpression('top',expression);
307
+ }
308
+ });
309
+ }
310
+
311
+ // show the message
312
+ if (msg) {
313
+ if (opts.theme)
314
+ lyr3.find('.ui-widget-content').append(msg);
315
+ else
316
+ lyr3.append(msg);
317
+ if (msg.jquery || msg.nodeType)
318
+ $(msg).show();
319
+ }
320
+
321
+ if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
322
+ lyr1.show(); // opacity is zero
323
+ if (opts.fadeIn) {
324
+ var cb = opts.onBlock ? opts.onBlock : noOp;
325
+ var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
326
+ var cb2 = msg ? cb : noOp;
327
+ if (opts.showOverlay)
328
+ lyr2._fadeIn(opts.fadeIn, cb1);
329
+ if (msg)
330
+ lyr3._fadeIn(opts.fadeIn, cb2);
331
+ }
332
+ else {
333
+ if (opts.showOverlay)
334
+ lyr2.show();
335
+ if (msg)
336
+ lyr3.show();
337
+ if (opts.onBlock)
338
+ opts.onBlock();
339
+ }
340
+
341
+ // bind key and mouse events
342
+ bind(1, el, opts);
343
+
344
+ if (full) {
345
+ pageBlock = lyr3[0];
346
+ pageBlockEls = $(':input:enabled:visible',pageBlock);
347
+ if (opts.focusInput)
348
+ setTimeout(focus, 20);
349
+ }
350
+ else
351
+ center(lyr3[0], opts.centerX, opts.centerY);
352
+
353
+ if (opts.timeout) {
354
+ // auto-unblock
355
+ var to = setTimeout(function() {
356
+ full ? $.unblockUI(opts) : $(el).unblock(opts);
357
+ }, opts.timeout);
358
+ $(el).data('blockUI.timeout', to);
359
+ }
360
+ };
361
+
362
+ // remove the block
363
+ function remove(el, opts) {
364
+ var full = (el == window);
365
+ var $el = $(el);
366
+ var data = $el.data('blockUI.history');
367
+ var to = $el.data('blockUI.timeout');
368
+ if (to) {
369
+ clearTimeout(to);
370
+ $el.removeData('blockUI.timeout');
371
+ }
372
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
373
+ bind(0, el, opts); // unbind events
374
+
375
+ var els;
376
+ if (full) // crazy selector to handle odd field errors in ie6/7
377
+ els = $('body').children().filter('.blockUI').add('body > .blockUI');
378
+ else
379
+ els = $('.blockUI', el);
380
+
381
+ if (full)
382
+ pageBlock = pageBlockEls = null;
383
+
384
+ if (opts.fadeOut) {
385
+ els.fadeOut(opts.fadeOut);
386
+ setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
387
+ }
388
+ else
389
+ reset(els, data, opts, el);
390
+ };
391
+
392
+ // move blocking element back into the DOM where it started
393
+ function reset(els,data,opts,el) {
394
+ els.each(function(i,o) {
395
+ // remove via DOM calls so we don't lose event handlers
396
+ if (this.parentNode)
397
+ this.parentNode.removeChild(this);
398
+ });
399
+
400
+ if (data && data.el) {
401
+ data.el.style.display = data.display;
402
+ data.el.style.position = data.position;
403
+ if (data.parent)
404
+ data.parent.appendChild(data.el);
405
+ $(el).removeData('blockUI.history');
406
+ }
407
+
408
+ if (typeof opts.onUnblock == 'function')
409
+ opts.onUnblock(el,opts);
410
+ };
411
+
412
+ // bind/unbind the handler
413
+ function bind(b, el, opts) {
414
+ var full = el == window, $el = $(el);
415
+
416
+ // don't bother unbinding if there is nothing to unbind
417
+ if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
418
+ return;
419
+ if (!full)
420
+ $el.data('blockUI.isBlocked', b);
421
+
422
+ // don't bind events when overlay is not in use or if bindEvents is false
423
+ if (!opts.bindEvents || (b && !opts.showOverlay))
424
+ return;
425
+
426
+ // bind anchors and inputs for mouse and key events
427
+ var events = 'mousedown mouseup keydown keypress';
428
+ b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
429
+
430
+ // former impl...
431
+ // var $e = $('a,:input');
432
+ // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
433
+ };
434
+
435
+ // event handler to suppress keyboard/mouse events when blocking
436
+ function handler(e) {
437
+ // allow tab navigation (conditionally)
438
+ if (e.keyCode && e.keyCode == 9) {
439
+ if (pageBlock && e.data.constrainTabKey) {
440
+ var els = pageBlockEls;
441
+ var fwd = !e.shiftKey && e.target == els[els.length-1];
442
+ var back = e.shiftKey && e.target == els[0];
443
+ if (fwd || back) {
444
+ setTimeout(function(){focus(back)},10);
445
+ return false;
446
+ }
447
+ }
448
+ }
449
+ // allow events within the message content
450
+ if ($(e.target).parents('div.blockMsg').length > 0)
451
+ return true;
452
+
453
+ // allow events for content that is not being blocked
454
+ return $(e.target).parents().children().filter('div.blockUI').length == 0;
455
+ };
456
+
457
+ function focus(back) {
458
+ if (!pageBlockEls)
459
+ return;
460
+ var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
461
+ if (e)
462
+ e.focus();
463
+ };
464
+
465
+ function center(el, x, y) {
466
+ var p = el.parentNode, s = el.style;
467
+ var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
468
+ var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
469
+ if (x) s.left = l > 0 ? (l+'px') : '0';
470
+ if (y) s.top = t > 0 ? (t+'px') : '0';
471
+ };
472
+
473
+ function sz(el, p) {
474
+ return parseInt($.css(el,p))||0;
475
+ };
476
+
477
+ })(jQuery);
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Cookie plugin
3
+ *
4
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
5
+ * Dual licensed under the MIT and GPL licenses:
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ * http://www.gnu.org/licenses/gpl.html
8
+ *
9
+ */
10
+
11
+ /**
12
+ * Create a cookie with the given name and value and other optional parameters.
13
+ *
14
+ * @example $.cookie('the_cookie', 'the_value');
15
+ * @desc Set the value of a cookie.
16
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
17
+ * @desc Create a cookie with all available options.
18
+ * @example $.cookie('the_cookie', 'the_value');
19
+ * @desc Create a session cookie.
20
+ * @example $.cookie('the_cookie', null);
21
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
22
+ * used when the cookie was set.
23
+ *
24
+ * @param String name The name of the cookie.
25
+ * @param String value The value of the cookie.
26
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
27
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
28
+ * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
29
+ * If set to null or omitted, the cookie will be a session cookie and will not be retained
30
+ * when the the browser exits.
31
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
32
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
33
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
34
+ * require a secure protocol (like HTTPS).
35
+ * @type undefined
36
+ *
37
+ * @name $.cookie
38
+ * @cat Plugins/Cookie
39
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
40
+ */
41
+
42
+ /**
43
+ * Get the value of a cookie with the given name.
44
+ *
45
+ * @example $.cookie('the_cookie');
46
+ * @desc Get the value of a cookie.
47
+ *
48
+ * @param String name The name of the cookie.
49
+ * @return The value of the cookie.
50
+ * @type String
51
+ *
52
+ * @name $.cookie
53
+ * @cat Plugins/Cookie
54
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
55
+ */
56
+ jQuery.cookie = function(name, value, options) {
57
+ if (typeof value != 'undefined') { // name and value given, set cookie
58
+ options = options || {};
59
+ if (value === null) {
60
+ value = '';
61
+ options.expires = -1;
62
+ }
63
+ var expires = '';
64
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
65
+ var date;
66
+ if (typeof options.expires == 'number') {
67
+ date = new Date();
68
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
69
+ } else {
70
+ date = options.expires;
71
+ }
72
+ expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
73
+ }
74
+ // CAUTION: Needed to parenthesize options.path and options.domain
75
+ // in the following expressions, otherwise they evaluate to undefined
76
+ // in the packed version for some reason...
77
+ var path = options.path ? '; path=' + (options.path) : '';
78
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
79
+ var secure = options.secure ? '; secure' : '';
80
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
81
+ } else { // only name given, get cookie
82
+ var cookieValue = null;
83
+ if (document.cookie && document.cookie != '') {
84
+ var cookies = document.cookie.split(';');
85
+ for (var i = 0; i < cookies.length; i++) {
86
+ var cookie = jQuery.trim(cookies[i]);
87
+ // Does this cookie string begin with the name we want?
88
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
89
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
90
+ break;
91
+ }
92
+ }
93
+ }
94
+ return cookieValue;
95
+ }
96
+ };
@@ -0,0 +1,75 @@
1
+ (function ($) {
2
+ $.extend($.tree.plugins, {
3
+ "checkbox" : {
4
+ defaults : {
5
+ three_state : true
6
+ },
7
+ get_checked : function (t) {
8
+ if(!t) t = $.tree.focused();
9
+ return t.container.find("a.checked").parent();
10
+ },
11
+ get_undeterminded : function (t) {
12
+ if(!t) t = $.tree.focused();
13
+ return t.container.find("a.undetermined").parent();
14
+ },
15
+ get_unchecked : function (t) {
16
+ if(!t) t = $.tree.focused();
17
+ return t.container.find("a:not(.checked, .undetermined)").parent();
18
+ },
19
+
20
+ check : function (n) {
21
+ if(!n) return false;
22
+ var t = $.tree.reference(n);
23
+ n = t.get_node(n);
24
+ if(n.children("a").hasClass("checked")) return true;
25
+
26
+ var opts = $.extend(true, {}, $.tree.plugins.checkbox.defaults, t.settings.plugins.checkbox);
27
+ if(opts.three_state) {
28
+ n.find("li").andSelf().children("a").removeClass("unchecked undetermined").addClass("checked");
29
+ n.parents("li").each(function () {
30
+ if($(this).children("ul").find("a:not(.checked):eq(0)").size() > 0) {
31
+ $(this).parents("li").andSelf().children("a").removeClass("unchecked checked").addClass("undetermined");
32
+ return false;
33
+ }
34
+ else $(this).children("a").removeClass("unchecked undetermined").addClass("checked");
35
+ });
36
+ }
37
+ else n.children("a").removeClass("unchecked").addClass("checked");
38
+ return true;
39
+ },
40
+ uncheck : function (n) {
41
+ if(!n) return false;
42
+ var t = $.tree.reference(n);
43
+ n = t.get_node(n);
44
+ if(n.children("a").hasClass("unchecked")) return true;
45
+
46
+ var opts = $.extend(true, {}, $.tree.plugins.checkbox.defaults, t.settings.plugins.checkbox);
47
+ if(opts.three_state) {
48
+ n.find("li").andSelf().children("a").removeClass("checked undetermined").addClass("unchecked");
49
+ n.parents("li").each(function () {
50
+ if($(this).find("a.checked, a.undetermined").size() - 1 > 0) {
51
+ $(this).parents("li").andSelf().children("a").removeClass("unchecked checked").addClass("undetermined");
52
+ return false;
53
+ }
54
+ else $(this).children("a").removeClass("checked undetermined").addClass("unchecked");
55
+ });
56
+ }
57
+ else n.children("a").removeClass("checked").addClass("unchecked");
58
+ return true;
59
+ },
60
+ toggle : function (n) {
61
+ if(!n) return false;
62
+ var t = $.tree.reference(n);
63
+ n = t.get_node(n);
64
+ if(n.children("a").hasClass("checked")) $.tree.plugins.checkbox.uncheck(n);
65
+ else $.tree.plugins.checkbox.check(n);
66
+ },
67
+
68
+ callbacks : {
69
+ onchange : function(n, t) {
70
+ $.tree.plugins.checkbox.toggle(n);
71
+ }
72
+ }
73
+ }
74
+ });
75
+ })(jQuery);