r52471 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52470‎ | r52471 | r52472 >
Date:17:51, 26 June 2009
Author:shinjiman
Status:deferred
Tags:
Comment:
Fix the path variables for specific browser like Internet Explorer to prevent the "Invalid character" error which was rendered.
Update the dtree icons.
Modified paths:
  • /trunk/extensions/TreeAndMenu/TreeAndMenu.php (modified) (history)
  • /trunk/extensions/TreeAndMenu/dtree.js (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/base.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/cd.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/folder.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/folderopen.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/globe.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/imgfolder.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/minus.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/minusbottom.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/musicfolder.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/nolines_minus.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/nolines_plus.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/page.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/plus.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/plusbottom.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/question.gif (modified) (history)
  • /trunk/extensions/TreeAndMenu/img/trash.gif (modified) (history)

Diff [purge]

Index: trunk/extensions/TreeAndMenu/img/folder.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/musicfolder.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/page.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/minusbottom.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/trash.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/nolines_minus.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/plus.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/cd.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/globe.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/minus.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/folderopen.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/question.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/imgfolder.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/plusbottom.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/nolines_plus.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/img/base.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/extensions/TreeAndMenu/TreeAndMenu.php
@@ -43,6 +43,7 @@
4444 var $uniqname = 'tam'; # input name for uniqid
4545 var $id = ''; # id for specific tree
4646 var $baseDir = ''; # internal absolute path to treeview directory
 47+ var $baseRelDir = ''; # internal relative path to treeview directory
4748 var $baseUrl = ''; # external URL to treeview directory (relative to domain)
4849 var $images = ''; # internal JS to update dTree images
4950 var $useLines = true; # internal variable determining whether to render connector lines
@@ -63,6 +64,9 @@
6465
6566 # Update general tree paths and properties
6667 $this->baseDir = dirname( __FILE__ );
 68+ $this->baseRelDir = strstr( $this->baseDir, 'extensions');
 69+ $this->baseRelDir = str_replace( '\\', '/',$this->baseRelDir );
 70+ $this->baseRelDir = $wgScriptPath . '/' . $this->baseRelDir;
6771 $this->baseUrl = str_replace( '\\', '/', $this->baseDir );
6872 $this->baseUrl = preg_replace( '|^.+(?=/ext)|', $wgScriptPath, $this->baseDir );
6973 $this->useLines = $wgTreeViewShowLines ? 'true' : 'false';
@@ -77,7 +81,7 @@
7882 }
7983
8084 # Add link to output to load dtree.js script
81 - $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"{$this->baseUrl}/dtree.js\"><!-- TreeAndMenu --></script>\n" );
 85+ $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"{$this->baseRelDir}/dtree.js\"><!-- TreeAndMenu --></script>\n" );
8286 }
8387
8488
@@ -229,7 +233,7 @@
230234 <script type=\"$wgJsMimeType\">/*<![CDATA[*/
231235 // TreeAndMenu{$this->version}
232236 tree = new dTree('$objid');
233 - for (i in tree.icon) tree.icon[i] = '{$this->baseUrl}/'+tree.icon[i];{$this->images}
 237+ for (i in tree.icon) tree.icon[i] = '{$this->baseRelDir}/'+tree.icon[i];{$this->images}
234238 tree.config.useLines = {$this->useLines};
235239 $add
236240 $objid = tree;
Index: trunk/extensions/TreeAndMenu/dtree.js
@@ -1,693 +1,347 @@
22 /*--------------------------------------------------|
3 -
43 | dTree 2.05 | www.destroydrop.com/javascript/tree/ |
5 -
64 |---------------------------------------------------|
7 -
85 | Copyright (c) 2002-2003 Geir Landrö |
9 -
106 | |
11 -
127 | This script can be used freely as long as all |
13 -
148 | copyright messages are intact. |
15 -
169 | |
17 -
1810 | Updated: 17.04.2003 |
19 -
2011 |--------------------------------------------------*/
2112
22 -
23 -
2413 // Node object
25 -
2614 function Node(id, pid, name, url, title, target, icon, iconOpen, open) {
27 -
2815 this.id = id;
29 -
3016 this.pid = pid;
31 -
3217 this.name = name;
33 -
3418 this.url = url;
35 -
3619 this.title = title;
37 -
3820 this.target = target;
39 -
4021 this.icon = icon;
41 -
4222 this.iconOpen = iconOpen;
43 -
4423 this._io = open || false;
45 -
4624 this._is = false;
47 -
4825 this._ls = false;
49 -
5026 this._hc = false;
51 -
5227 this._ai = 0;
53 -
5428 this._p;
55 -
5629 };
5730
58 -
59 -
6031 // Tree object
61 -
6232 function dTree(objName) {
63 -
6433 this.config = {
65 -
6634 target : null,
67 -
6835 folderLinks : true,
69 -
7036 useSelection : true,
71 -
7237 useCookies : true,
73 -
7438 useLines : true,
75 -
7639 useIcons : true,
77 -
7840 useStatusText : false,
79 -
8041 closeSameLevel : false,
81 -
8242 inOrder : false
83 -
8443 }
85 -
8644 this.icon = {
87 -
8845 root : 'img/base.gif',
89 -
9046 folder : 'img/folder.gif',
91 -
9247 folderOpen : 'img/folderopen.gif',
93 -
9448 node : 'img/page.gif',
95 -
9649 empty : 'img/empty.gif',
97 -
9850 line : 'img/line.gif',
99 -
10051 join : 'img/join.gif',
101 -
10252 joinBottom : 'img/joinbottom.gif',
103 -
10453 plus : 'img/plus.gif',
105 -
10654 plusBottom : 'img/plusbottom.gif',
107 -
10855 minus : 'img/minus.gif',
109 -
11056 minusBottom : 'img/minusbottom.gif',
111 -
11257 nlPlus : 'img/nolines_plus.gif',
113 -
11458 nlMinus : 'img/nolines_minus.gif'
115 -
11659 };
117 -
11860 this.obj = objName;
119 -
12061 this.aNodes = [];
121 -
12262 this.aIndent = [];
123 -
12463 this.root = new Node(-1);
125 -
12664 this.selectedNode = null;
127 -
12865 this.selectedFound = false;
129 -
13066 this.completed = false;
131 -
13267 };
13368
134 -
135 -
13669 // Adds a new node to the node array
137 -
13870 dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {
139 -
14071 this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
141 -
14272 };
14373
144 -
145 -
14674 // Open/close all nodes
147 -
14875 dTree.prototype.openAll = function() {
149 -
15076 this.oAll(true);
151 -
15277 };
153 -
15478 dTree.prototype.closeAll = function() {
155 -
15679 this.oAll(false);
157 -
15880 };
15981
160 -
161 -
16282 // Outputs the tree to the page
163 -
16483 dTree.prototype.toString = function() {
165 -
16684 var str = '<div class="dtree">\n';
167 -
16885 if (document.getElementById) {
169 -
17086 if (this.config.useCookies) this.selectedNode = this.getSelected();
171 -
17287 str += this.addNode(this.root);
173 -
17488 } else str += 'Browser not supported.';
175 -
17689 str += '</div>';
177 -
17890 if (!this.selectedFound) this.selectedNode = null;
179 -
18091 this.completed = true;
181 -
18292 return str;
183 -
18493 };
18594
186 -
187 -
18895 // Creates the tree structure
189 -
19096 dTree.prototype.addNode = function(pNode) {
191 -
19297 var str = '';
193 -
19498 var n=0;
195 -
19699 if (this.config.inOrder) n = pNode._ai;
197 -
198100 for (n; n<this.aNodes.length; n++) {
199 -
200101 if (this.aNodes[n].pid == pNode.id) {
201 -
202102 var cn = this.aNodes[n];
203 -
204103 cn._p = pNode;
205 -
206104 cn._ai = n;
207 -
208105 this.setCS(cn);
209 -
210106 if (!cn.target && this.config.target) cn.target = this.config.target;
211 -
212107 if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
213 -
214108 if (!this.config.folderLinks && cn._hc) cn.url = null;
215 -
216109 if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
217 -
218110 cn._is = true;
219 -
220111 this.selectedNode = n;
221 -
222112 this.selectedFound = true;
223 -
224113 }
225 -
226114 str += this.node(cn, n);
227 -
228115 if (cn._ls) break;
229 -
230116 }
231 -
232117 }
233 -
234118 return str;
235 -
236119 };
237120
238 -
239 -
240121 // Creates the node icon, url and text
241 -
242122 dTree.prototype.node = function(node, nodeId) {
243 -
244123 var str = '<div class="dTreeNode">' + this.indent(node, nodeId);
245 -
246124 if (this.config.useIcons) {
247 -
248125 if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
249 -
250126 if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
251 -
252127 if (this.root.id == node.pid) {
253 -
254128 node.icon = this.icon.root;
255 -
256129 node.iconOpen = this.icon.root;
257 -
258130 }
259 -
260131 str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
261 -
262132 }
263 -
264133 if (node.url) {
265 -
266134 str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
267 -
268135 if (node.title) str += ' title="' + node.title + '"';
269 -
270136 if (node.target) str += ' target="' + node.target + '"';
271 -
272137 if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
273 -
274138 if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
275 -
276139 str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
277 -
278140 str += '>';
279 -
280141 }
281 -
282142 else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
283 -
284143 str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
285 -
286144 str += node.name;
287 -
288145 if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
289 -
290146 str += '</div>';
291 -
292147 if (node._hc) {
293 -
294148 str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
295 -
296149 str += this.addNode(node);
297 -
298150 str += '</div>';
299 -
300151 }
301 -
302152 this.aIndent.pop();
303 -
304153 return str;
305 -
306154 };
307155
308 -
309 -
310156 // Adds the empty and line icons
311 -
312157 dTree.prototype.indent = function(node, nodeId) {
313 -
314158 var str = '';
315 -
316159 if (this.root.id != node.pid) {
317 -
318160 for (var n=0; n<this.aIndent.length; n++)
319 -
320161 str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
321 -
322162 (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
323 -
324163 if (node._hc) {
325 -
326164 str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';
327 -
328165 if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
329 -
330166 else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
331 -
332167 str += '" alt="" /></a>';
333 -
334168 } else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';
335 -
336169 }
337 -
338170 return str;
339 -
340171 };
341172
342 -
343 -
344173 // Checks if a node has any children and if it is the last sibling
345 -
346174 dTree.prototype.setCS = function(node) {
347 -
348175 var lastId;
349 -
350176 for (var n=0; n<this.aNodes.length; n++) {
351 -
352177 if (this.aNodes[n].pid == node.id) node._hc = true;
353 -
354178 if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
355 -
356179 }
357 -
358180 if (lastId==node.id) node._ls = true;
359 -
360181 };
361182
362 -
363 -
364183 // Returns the selected node
365 -
366184 dTree.prototype.getSelected = function() {
367 -
368185 var sn = this.getCookie('cs' + this.obj);
369 -
370186 return (sn) ? sn : null;
371 -
372187 };
373188
374 -
375 -
376189 // Highlights the selected node
377 -
378190 dTree.prototype.s = function(id) {
379 -
380191 if (!this.config.useSelection) return;
381 -
382192 var cn = this.aNodes[id];
383 -
384193 if (cn._hc && !this.config.folderLinks) return;
385 -
386194 if (this.selectedNode != id) {
387 -
388195 if (this.selectedNode || this.selectedNode==0) {
389 -
390196 eOld = document.getElementById("s" + this.obj + this.selectedNode);
391 -
392197 eOld.className = "node";
393 -
394198 }
395 -
396199 eNew = document.getElementById("s" + this.obj + id);
397 -
398200 eNew.className = "nodeSel";
399 -
400201 this.selectedNode = id;
401 -
402202 if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
403 -
404203 }
405 -
406204 };
407205
408 -
409 -
410206 // Toggle Open or close
411 -
412207 dTree.prototype.o = function(id) {
413 -
414208 var cn = this.aNodes[id];
415 -
416209 this.nodeStatus(!cn._io, id, cn._ls);
417 -
418210 cn._io = !cn._io;
419 -
420211 if (this.config.closeSameLevel) this.closeLevel(cn);
421 -
422212 if (this.config.useCookies) this.updateCookie();
423 -
424213 };
425214
426 -
427 -
428215 // Open or close all nodes
429 -
430216 dTree.prototype.oAll = function(status) {
431 -
432217 for (var n=0; n<this.aNodes.length; n++) {
433 -
434218 if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
435 -
436219 this.nodeStatus(status, n, this.aNodes[n]._ls)
437 -
438220 this.aNodes[n]._io = status;
439 -
440221 }
441 -
442222 }
443 -
444223 if (this.config.useCookies) this.updateCookie();
445 -
446224 };
447225
448 -
449 -
450226 // Opens the tree to a specific node
451 -
452227 dTree.prototype.openTo = function(nId, bSelect, bFirst) {
453 -
454228 if (!bFirst) {
455 -
456229 for (var n=0; n<this.aNodes.length; n++) {
457 -
458230 if (this.aNodes[n].id == nId) {
459 -
460231 nId=n;
461 -
462232 break;
463 -
464233 }
465 -
466234 }
467 -
468235 }
469 -
470236 var cn=this.aNodes[nId];
471 -
472237 if (cn.pid==this.root.id || !cn._p) return;
473 -
474238 cn._io = true;
475 -
476239 cn._is = bSelect;
477 -
478240 if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
479 -
480241 if (this.completed && bSelect) this.s(cn._ai);
481 -
482242 else if (bSelect) this._sn=cn._ai;
483 -
484243 this.openTo(cn._p._ai, false, true);
485 -
486244 };
487245
488 -
489 -
490246 // Closes all nodes on the same level as certain node
491 -
492247 dTree.prototype.closeLevel = function(node) {
493 -
494248 for (var n=0; n<this.aNodes.length; n++) {
495 -
496249 if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
497 -
498250 this.nodeStatus(false, n, this.aNodes[n]._ls);
499 -
500251 this.aNodes[n]._io = false;
501 -
502252 this.closeAllChildren(this.aNodes[n]);
503 -
504253 }
505 -
506254 }
507 -
508255 }
509256
510 -
511 -
512257 // Closes all children of a node
513 -
514258 dTree.prototype.closeAllChildren = function(node) {
515 -
516259 for (var n=0; n<this.aNodes.length; n++) {
517 -
518260 if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
519 -
520261 if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
521 -
522262 this.aNodes[n]._io = false;
523 -
524263 this.closeAllChildren(this.aNodes[n]);
525 -
526264 }
527 -
528265 }
529 -
530266 }
531267
532 -
533 -
534268 // Change the status of a node(open or closed)
535 -
536269 dTree.prototype.nodeStatus = function(status, id, bottom) {
537 -
538270 eDiv = document.getElementById('d' + this.obj + id);
539 -
540271 eJoin = document.getElementById('j' + this.obj + id);
541 -
542272 if (this.config.useIcons) {
543 -
544273 eIcon = document.getElementById('i' + this.obj + id);
545 -
546274 eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
547 -
548275 }
549 -
550276 eJoin.src = (this.config.useLines)?
551 -
552277 ((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
553 -
554278 ((status)?this.icon.nlMinus:this.icon.nlPlus);
555 -
556279 eDiv.style.display = (status) ? 'block': 'none';
557 -
558280 };
559281
560282
561 -
562 -
563 -
564283 // [Cookie] Clears a cookie
565 -
566284 dTree.prototype.clearCookie = function() {
567 -
568285 var now = new Date();
569 -
570286 var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
571 -
572287 this.setCookie('co'+this.obj, 'cookieValue', yesterday);
573 -
574288 this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
575 -
576289 };
577290
578 -
579 -
580291 // [Cookie] Sets value in a cookie
581 -
582292 dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
583 -
584293 document.cookie =
585 -
586294 escape(cookieName) + '=' + escape(cookieValue)
587 -
588295 + (expires ? '; expires=' + expires.toGMTString() : '')
589 -
590296 + (path ? '; path=' + path : '')
591 -
592297 + (domain ? '; domain=' + domain : '')
593 -
594298 + (secure ? '; secure' : '');
595 -
596299 };
597300
598 -
599 -
600301 // [Cookie] Gets a value from a cookie
601 -
602302 dTree.prototype.getCookie = function(cookieName) {
603 -
604303 var cookieValue = '';
605 -
606304 var posName = document.cookie.indexOf(escape(cookieName) + '=');
607 -
608305 if (posName != -1) {
609 -
610306 var posValue = posName + (escape(cookieName) + '=').length;
611 -
612307 var endPos = document.cookie.indexOf(';', posValue);
613 -
614308 if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
615 -
616309 else cookieValue = unescape(document.cookie.substring(posValue));
617 -
618310 }
619 -
620311 return (cookieValue);
621 -
622312 };
623313
624 -
625 -
626314 // [Cookie] Returns ids of open nodes as a string
627 -
628315 dTree.prototype.updateCookie = function() {
629 -
630316 var str = '';
631 -
632317 for (var n=0; n<this.aNodes.length; n++) {
633 -
634318 if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
635 -
636319 if (str) str += '.';
637 -
638320 str += this.aNodes[n].id;
639 -
640321 }
641 -
642322 }
643 -
644323 this.setCookie('co' + this.obj, str);
645 -
646324 };
647325
648 -
649 -
650326 // [Cookie] Checks if a node id is in a cookie
651 -
652327 dTree.prototype.isOpen = function(id) {
653 -
654328 var aOpen = this.getCookie('co' + this.obj).split('.');
655 -
656329 for (var n=0; n<aOpen.length; n++)
657 -
658330 if (aOpen[n] == id) return true;
659 -
660331 return false;
661 -
662332 };
663333
664 -
665 -
666334 // If Push and pop is not implemented by the browser
667 -
668335 if (!Array.prototype.push) {
669 -
670336 Array.prototype.push = function array_push() {
671 -
672337 for(var i=0;i<arguments.length;i++)
673 -
674338 this[this.length]=arguments[i];
675 -
676339 return this.length;
677 -
678340 }
679 -
680341 };
681 -
682342 if (!Array.prototype.pop) {
683 -
684343 Array.prototype.pop = function array_pop() {
685 -
686344 lastElement = this[this.length-1];
687 -
688345 this.length = Math.max(this.length-1,0);
689 -
690346 return lastElement;
691 -
692347 }
693 -
694348 };

Follow-up revisions

RevisionCommit summaryAuthorDate
r52472follow up r52471, bump the version number.shinjiman17:55, 26 June 2009

Status & tagging log