<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[18575] trunk/wp-includes: Fix the "close tags" button in quicktags, props SergeyBiryukov, see #16695</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/18575">18575</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-08-19 21:23:31 +0000 (Fri, 19 Aug 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix the "close tags" button in quicktags, props SergeyBiryukov, see <a href="http://core.trac.wordpress.org/ticket/16695">#16695</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjsquicktagsdevjs">trunk/wp-includes/js/quicktags.dev.js</a></li>
<li><a href="#trunkwpincludesjsquicktagsjs">trunk/wp-includes/js/quicktags.js</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjsquicktagsdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/quicktags.dev.js (18574 => 18575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/quicktags.dev.js        2011-08-19 17:04:16 UTC (rev 18574)
+++ trunk/wp-includes/js/quicktags.dev.js        2011-08-19 21:23:31 UTC (rev 18575)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * Adds a button to all instances of the editor
</span><span class="cx"> *
</span><del>- * Added for back compatibility
</del><ins>+ * Added for back compatibility, use QTags.addButton() as it gives more flexibility like type of button, button placement, etc.
</ins><span class="cx"> * @see QTags.addButton()
</span><span class="cx"> */
</span><span class="cx"> function edButton(id, display, tagStart, tagEnd, access, open) {
</span><span class="lines">@@ -232,6 +232,10 @@
</span><span class="cx">                         tb.attachEvent('onclick', onclick);
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                t.getButton = function(id) {
+                        return buttons[id];
+                };
+
</ins><span class="cx">                 if ( !qt.instances[0] )
</span><span class="cx">                         qt.instances[0] = t;
</span><span class="cx">
</span><span class="lines">@@ -252,7 +256,7 @@
</span><span class="cx">          * Main API function for adding a button to Quicktags
</span><span class="cx">          *
</span><span class="cx">          * Adds qt.Button or qt.TagButton depending on the args. The first three args are always required.
</span><del>-         * For TagButton arg2 is also required. To be able to add button(s) to Quicktags, your script
</del><ins>+         * For TagButton the 4th or the 5th argument is also required. To be able to add button(s) to Quicktags, your script
</ins><span class="cx">          * should be enqueued as dependant on "quicktags" and outputted in the footer. If you are echoing JS
</span><span class="cx">          * directly from PHP, use add_action( 'admin_print_footer_scripts', 'output_my_js', 100 ) or add_action( 'wp_footer', 'output_my_js', 100 )
</span><span class="cx">          *
</span><span class="lines">@@ -263,21 +267,21 @@
</span><span class="cx">          * Minimun required to add a button that inserts a tag:
</span><span class="cx">          * QTags.addButton( 'my_id', 'my button', '<span>', '</span>' );
</span><span class="cx">          *
</span><del>-         * @param id string required button HTML ID
-         * @param display string required button's value="..."
-         * @param arg1 string || function required either a starting tag to be inserted like "<span>" or a callback that is executed when the button is pressed
-         * @param arg2 string ending tag like "</span>"
-         * @param arg3 int set to -1 if the inserted tag is self-closing
-         * @param access string access key for the button
-         * @param title string button's title="..."
-         * @param priority int number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
-         * @return bool TRUE on success FALSE on failure
</del><ins>+         * @param id string required Button HTML ID
+         * @param display string required Button's value="..."
+         * @param arg1 string || function required Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is pressed
+         * @param arg2 string Ending tag like "</span>"
+         * @param arg3 int Set to -1 if the inserted tag is self-closing
+         * @param access string Access key for the button
+         * @param title string Button's title="..."
+         * @param priority int Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
+         * @return null This is needed for back-compat as the common method of adding a button was to manually add it to the buttons array
</ins><span class="cx">          */                                   
</span><span class="cx">         qt.addButton = function( id, display, arg1, arg2, arg3, access, title, priority ) {
</span><span class="cx">                 var btn;
</span><span class="cx">                 
</span><span class="cx">                 if ( !id || !display )
</span><del>-                        return false;
</del><ins>+                        return;
</ins><span class="cx">
</span><span class="cx">                 if ( typeof(arg1) == 'function' ) {
</span><span class="cx">                         btn = new qt.Button(id, display, access, title);
</span><span class="lines">@@ -285,7 +289,7 @@
</span><span class="cx">                 } else if ( typeof(arg1) == 'string' && arg1 && arg2 ) {
</span><span class="cx">                         btn = new qt.TagButton(id, display, arg1, arg2, access, arg3, title);
</span><span class="cx">                 } else {
</span><del>-                        return false;
</del><ins>+                        return;
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ( priority ) {
</span><span class="lines">@@ -297,8 +301,6 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         edButtons[edButtons.length] = btn;
</span><span class="cx">                 }
</span><del>-                
-                return true;
</del><span class="cx">         };
</span><span class="cx">
</span><span class="cx">         qt.insertContent = function(content) {
</span><span class="lines">@@ -343,7 +345,7 @@
</span><span class="cx">                 var access = this.access ? ' accesskey="' + this.access + '"' : '';
</span><span class="cx">                 return '<input type="button" id="' + idPrefix + this.id + '"' + access + ' class="ed_button" title="' + this.title + '" value="' + this.display + '" />';
</span><span class="cx">         };
</span><del>-        qt.Button.prototype.callback = function(canvas) {};
</del><ins>+        qt.Button.prototype.callback = function(){};
</ins><span class="cx">
</span><span class="cx">         // a button that inserts HTML tag
</span><span class="cx">         qt.TagButton = function(id, display, tagStart, tagEnd, access, open, title) {
</span></span></pre></div>
<a id="trunkwpincludesjsquicktagsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/quicktags.js (18574 => 18575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/quicktags.js        2011-08-19 17:04:16 UTC (rev 18574)
+++ trunk/wp-includes/js/quicktags.js        2011-08-19 21:23:31 UTC (rev 18575)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var QTags,edButtons=[],edCanvas;function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,d,a)}(function(){var c=function(h){var g,f,e;if(typeof jQuery!="undefined"){jQuery(document).ready(h)}else{g=c;g.funcs=[];g.ready=function(){if(!g.isReady){g.isReady=true;for(f=0;f<g.funcs.length;f++){g.funcs[f]()}}};if(g.isReady){h()}else{g.funcs.push(h)}if(!g.eventAttached){if(document.addEventListener){e=function(){document.removeEventListener("DOMContentLoaded",e,false);g.ready()};document.addEventListener("DOMContentLoaded",e,false);window.addEventListener("load",g.ready,false)}else{if(document.attachEvent){e=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",e);g.ready()}};document.attachEvent("onreadystatechange",e);window.attachEvent("onload",
g.ready);(function(){try{document.documentElement.doScroll("left")}catch(i){setTimeout(arguments.callee,50);return}g.ready()})()}}g.eventAttached=true}}},a=(function(){var e=new Date(),f;f=function(g){var h=g.toString();if(h.length<2){h="0"+h}return h};return e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"+00:00"})(),b={},d;d=QTags=function(k){if(typeof(k)=="string"){k={id:k}}else{if(typeof(k)!="object"){return false}}var s=this,g=k.id,q={},p={},j=document.getElementById(g),e="qt_"+g,o="",n,l,m,h,r,f;if(!g||!j){return false}s.name=e;s.id=g;for(n in edButtons){if(!edButtons[n]){continue}q[edButtons[n].id]=edButtons[n]}if(g=="content"&&adminpage&&(adminpage=="post-new-php"||adminpage=="post-php")){q.fullscreen=new d.Ful
lscreenButton()}for(n in s._customButtons){q[n]=new s._customButtons[n]()}if(k.buttons){m=k.buttons.split(",");for(n in m){h=m[n];if(q[h]){p[h]=q[h]}}}else{p=q}if(k.disabled_buttons){m=k.disabled_buttons.split(",");for(n in m){h=m[n];if(p[h]){delete (p[h])}}}for(n in p){o+=p[n].html(e+"_")}if(g=="content"&&!d.instances[0]){edCanvas=j;f="ed_toolbar"}else{f=e+"_toolbar"}l=document.createElement("div");l.id=f;l.className="quicktags-toolbar";j.parentNode.insertBefore(l,j);l.innerHTML=o;s.toolbar=l;r=function(v){v=v||window.event;var u=v.target||v.srcElement,t;if(/\s+ed_button\s+/.test(" "+u.className+" ")){s.canvas=j=document.getElementById(g);t=u.id.replace(e+"_","");if(p[t]){p[t].callback.call(p[t],u,j,s)}}};if(l.addEventListener){l.addEventListener("click",r,false)}else{if(l.attachEvent){l.attachEvent("onclick",r)}}if(!d.instances
[0]){d.instances[0]=s}d.instances[g]=s};d.instances={};d.registerButton=function(f,e){b[f]=e};d.getInstance=function(e){return d.instances[e]};d.addButton=function(e,k,j,i,h,g,l,m){var f;if(!e||!k){return false}if(typeof(j)=="function"){f=new d.Button(e,k,g,l);f.callback=j}else{if(typeof(j)=="string"&&j&&i){f=new d.TagButton(e,k,j,i,g,h,l)}else{return false}}if(m){while(typeof(edButtons[m])!="undefined"){m++}edButtons[m]=f}else{edButtons[edButtons.length]=f}return true};d.insertContent=function(h){var i,g,f,j,k,e=document.getElementById(wpActiveEditor);if(!e){return false}if(document.selection){e.focus();i=document.selection.createRange();i.text=h;e.focus()}else{if(e.selectionStart||e.selectionStart=="0"){k=e.value;g=e.selectionStart;f=e.selectionEnd;j=e.scrollTop;e.value=k.substring(0,g)+h+k.substring(f,k.length);e.focus();e.selectionStart=g+h.length;e.selectionEnd=g+h.length;e.scrollTop=j}else{e.value+=h;e.focus()}}re
turn true};d.Button=function(i,g,e,h){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||""};d.Button.prototype.html=function(f){var e=this.access?' accesskey="'+this.access+'"':"";return'<input type="button" id="'+f+this.id+'"'+e+' class="ed_button" title="'+this.title+'" value="'+this.display+'" />'};d.Button.prototype.callback=function(e){};d.TagButton=function(l,j,g,f,e,h,k){var i=this;d.Button.call(i,l,j,e,k);i.tagStart=g;i.tagEnd=f;i.open=h};d.TagButton.prototype=new d.Button();d.TagButton.prototype.openTag=function(h,f){var g=this;if(!f.openTags){f.openTags=[]}if(g.tagEnd){f.openTags.push(g.id);h.value="/"+h.value}};d.TagButton.prototype.closeTag=function(j,f){var h=this,g=h.isOpen(f);if(g!==false){f.openTags.splice(g,1)}j.value=h.display};d.TagButton.prototype.isOpen=function(e){var h=this,g=0,f=false;if(e.openTags){while(f===false&&g<e.openTags.length){f=e.ope
nTags[g]==h.id?g:false;g++}}else{f=false}return f};d.TagButton.prototype.callback=function(o,j,q){var u=this,p,f,m,h,s,k,e,n,g;s=j.value;if(document.selection){j.focus();g=document.selection.createRange();if(g.text.length>0){g.text=u.tagStart+g.text+u.tagEnd}else{if(u.isOpen(q)===false||u.tagEnd===""){g.text=u.tagStart;u.openTag(o,q)}else{g.text=u.tagEnd;u.closeTag(o,q)}}j.focus()}else{if(j.selectionStart||j.selectionStart=="0"){p=j.selectionStart;f=j.selectionEnd;m=f;h=j.scrollTop;k=s.substring(0,p);e=s.substring(f,s.length);n=s.substring(p,f);if(p!=f){j.value=k+u.tagStart+n+u.tagEnd+e;if(u.tagEnd===""){m=p}m+=u.tagStart.length+u.tagEnd.length}else{if(u.isOpen(q)===false||u.tagEnd===""){j.value=k+u.tagStart+e;u.openTag(o,q);m=p+u.tagStart.length}else{j.value=k+u.tagEnd+e;m=p+u.tagEnd.length;u.closeTag(o,q)}}j.focus();j.selectionStart=m;j.selectionEnd=m;j.scrollTop=h}else{if(u.isOpen(q)!==false||u.tagEnd===""){j.value+=u.t
agStart;u.openTag(o,q)}else{j.value+=u.tagEnd;u.closeTag(o,q)}j.focus()}}};d.SpellButton=function(){d.Button.call(this,"spell",quicktagsL10n.lookup,"",quicktagsL10n.dictionaryLookup)};d.SpellButton.prototype=new d.Button();d.SpellButton.prototype.callback=function(h,g,i){var k="",j,f,e;if(document.selection){g.focus();j=document.selection.createRange();if(j.text.length>0){k=j.text}}else{if(g.selectionStart||g.selectionStart=="0"){f=g.selectionStart;e=g.selectionEnd;if(f!=e){k=g.value.substring(f,e)}}}if(k===""){k=prompt(quicktagsL10n.wordLookup,"")}if(k!==null&&/^\w[\w ]*$/.test(k)){window.open("http://www.answers.com/"+encodeURIComponent(k))}};d.CloseButton=function(){d.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};d.CloseButton.prototype=new d.Button();d.CloseButton.prototype.callback=function(j,k,f){var h,g,i=f.openTags;if(i){while(i.
length>0){h=f.getButton(i[i.length-1]);g=document.getElementById(f.name+"_"+h.id);h.callback.call(h,g,k,f)}}};d.prototype.closeAllTags=function(){var e=this.getButton("close");e.callback.call(e,"",this.canvas,this.toolbar)};d.LinkButton=function(){d.TagButton.call(this,"link","link","","</a>","a")};d.LinkButton.prototype=new d.TagButton();d.LinkButton.prototype.callback=function(j,k,h,g){var f,i=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!g){g="http://"}if(i.isOpen(h)===false){f=prompt(quicktagsL10n.enterURL,g);if(f){i.tagStart='<a href="'+f+'">';d.TagButton.prototype.callback.call(i,j,k,h)}}else{d.TagButton.prototype.callback.call(i,j,k,h)}};d.ImgButton=function(){d.TagButton.call(this,"img","img","","","m",-1)};d.ImgButton.prototype=new d.TagButton();d.ImgButton.prototype.callback=fu
nction(i,k,g,f){if(!f){f="http://"}var j=prompt(quicktagsL10n.enterImageURL,f),h;if(j){h=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart='<img src="'+j+'" alt="'+h+'" />';d.TagButton.prototype.callback.call(this,i,k,g)}};d.FullscreenButton=function(){d.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};d.FullscreenButton.prototype=new d.Button();d.FullscreenButton.prototype.callback=function(f,g){if(g.id!="content"||typeof(fullscreen)=="undefined"){return}fullscreen.on()};edButtons[10]=new d.TagButton("strong","b","<strong>","</strong>","b");edButtons[20]=new d.TagButton("em","i","<em>","</em>","i"),edButtons[30]=new d.LinkButton(),edButtons[40]=new d.TagButton("block","b-quote","\n\n<blo
ckquote>","</blockquote>\n\n","q"),edButtons[50]=new d.TagButton("del","del",'<del datetime="'+a+'">',"</del>","d"),edButtons[60]=new d.TagButton("ins","ins",'<ins datetime="'+a+'">',"</ins>","s"),edButtons[70]=new d.ImgButton(),edButtons[80]=new d.TagButton("ul","ul","<ul>\n","</ul>\n\n","u"),edButtons[90]=new d.TagButton("ol","ol","<ol>\n","</ol>\n\n","o"),edButtons[100]=new d.TagButton("li","li","\t<li>","</li>\n","l"),edButtons[110]=new d.TagButton("code","code","<code>","</code>","c"),edButtons[120]=new d.TagButton("more","more","<!--more-->
","","t",-1),edButtons[130]=new d.SpellButton(),edButtons[140]=new d.CloseButton()})();
</del><span class="cx">\ No newline at end of file
</span><ins>+var QTags,edButtons=[],edCanvas;function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,d,a)}(function(){var c=function(h){var g,f,e;if(typeof jQuery!="undefined"){jQuery(document).ready(h)}else{g=c;g.funcs=[];g.ready=function(){if(!g.isReady){g.isReady=true;for(f=0;f<g.funcs.length;f++){g.funcs[f]()}}};if(g.isReady){h()}else{g.funcs.push(h)}if(!g.eventAttached){if(document.addEventListener){e=function(){document.removeEventListener("DOMContentLoaded",e,false);g.ready()};document.addEventListener("DOMContentLoaded",e,false);window.addEventListener("load",g.ready,false)}else{if(document.attachEvent){e=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",e);g.ready()}};document.attachEvent("onreadystatechange",e);window.attachEvent("onload",
g.ready);(function(){try{document.documentElement.doScroll("left")}catch(i){setTimeout(arguments.callee,50);return}g.ready()})()}}g.eventAttached=true}}},a=(function(){var e=new Date(),f;f=function(g){var h=g.toString();if(h.length<2){h="0"+h}return h};return e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"+00:00"})(),b={},d;d=QTags=function(k){if(typeof(k)=="string"){k={id:k}}else{if(typeof(k)!="object"){return false}}var s=this,g=k.id,q={},p={},j=document.getElementById(g),e="qt_"+g,o="",n,l,m,h,r,f;if(!g||!j){return false}s.name=e;s.id=g;for(n in edButtons){if(!edButtons[n]){continue}q[edButtons[n].id]=edButtons[n]}if(g=="content"&&adminpage&&(adminpage=="post-new-php"||adminpage=="post-php")){q.fullscreen=new d.Ful
lscreenButton()}for(n in s._customButtons){q[n]=new s._customButtons[n]()}if(k.buttons){m=k.buttons.split(",");for(n in m){h=m[n];if(q[h]){p[h]=q[h]}}}else{p=q}if(k.disabled_buttons){m=k.disabled_buttons.split(",");for(n in m){h=m[n];if(p[h]){delete (p[h])}}}for(n in p){o+=p[n].html(e+"_")}if(g=="content"&&!d.instances[0]){edCanvas=j;f="ed_toolbar"}else{f=e+"_toolbar"}l=document.createElement("div");l.id=f;l.className="quicktags-toolbar";j.parentNode.insertBefore(l,j);l.innerHTML=o;s.toolbar=l;r=function(v){v=v||window.event;var u=v.target||v.srcElement,t;if(/\s+ed_button\s+/.test(" "+u.className+" ")){s.canvas=j=document.getElementById(g);t=u.id.replace(e+"_","");if(p[t]){p[t].callback.call(p[t],u,j,s)}}};if(l.addEventListener){l.addEventListener("click",r,false)}else{if(l.attachEvent){l.attachEvent("onclick",r)}}s.getButton=fun
ction(i){return q[i]};if(!d.instances[0]){d.instances[0]=s}d.instances[g]=s};d.instances={};d.registerButton=function(f,e){b[f]=e};d.getInstance=function(e){return d.instances[e]};d.addButton=function(e,k,j,i,h,g,l,m){var f;if(!e||!k){return}if(typeof(j)=="function"){f=new d.Button(e,k,g,l);f.callback=j}else{if(typeof(j)=="string"&&j&&i){f=new d.TagButton(e,k,j,i,g,h,l)}else{return}}if(m){while(typeof(edButtons[m])!="undefined"){m++}edButtons[m]=f}else{edButtons[edButtons.length]=f}};d.insertContent=function(h){var i,g,f,j,k,e=document.getElementById(wpActiveEditor);if(!e){return false}if(document.selection){e.focus();i=document.selection.createRange();i.text=h;e.focus()}else{if(e.selectionStart||e.selectionStart=="0"){k=e.value;g=e.selectionStart;f=e.selectionEnd;j=e.scrollTop;e.value=k.substring(0,g)+h+k.substring(f,k.length);e.focus();e.selectionStart=g+h.length;e.selectionEnd=g+h.length;e.scrollTop=j}else{e.value+=h
;e.focus()}}return true};d.Button=function(i,g,e,h){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||""};d.Button.prototype.html=function(f){var e=this.access?' accesskey="'+this.access+'"':"";return'<input type="button" id="'+f+this.id+'"'+e+' class="ed_button" title="'+this.title+'" value="'+this.display+'" />'};d.Button.prototype.callback=function(){};d.TagButton=function(l,j,g,f,e,h,k){var i=this;d.Button.call(i,l,j,e,k);i.tagStart=g;i.tagEnd=f;i.open=h};d.TagButton.prototype=new d.Button();d.TagButton.prototype.openTag=function(h,f){var g=this;if(!f.openTags){f.openTags=[]}if(g.tagEnd){f.openTags.push(g.id);h.value="/"+h.value}};d.TagButton.prototype.closeTag=function(j,f){var h=this,g=h.isOpen(f);if(g!==false){f.openTags.splice(g,1)}j.value=h.display};d.TagButton.prototype.isOpen=function(e){var h=this,g=0,f=false;if(e.openTags){while(f===false&&g<e.openTags.le
ngth){f=e.openTags[g]==h.id?g:false;g++}}else{f=false}return f};d.TagButton.prototype.callback=function(o,j,q){var u=this,p,f,m,h,s,k,e,n,g;s=j.value;if(document.selection){j.focus();g=document.selection.createRange();if(g.text.length>0){g.text=u.tagStart+g.text+u.tagEnd}else{if(u.isOpen(q)===false||u.tagEnd===""){g.text=u.tagStart;u.openTag(o,q)}else{g.text=u.tagEnd;u.closeTag(o,q)}}j.focus()}else{if(j.selectionStart||j.selectionStart=="0"){p=j.selectionStart;f=j.selectionEnd;m=f;h=j.scrollTop;k=s.substring(0,p);e=s.substring(f,s.length);n=s.substring(p,f);if(p!=f){j.value=k+u.tagStart+n+u.tagEnd+e;if(u.tagEnd===""){m=p}m+=u.tagStart.length+u.tagEnd.length}else{if(u.isOpen(q)===false||u.tagEnd===""){j.value=k+u.tagStart+e;u.openTag(o,q);m=p+u.tagStart.length}else{j.value=k+u.tagEnd+e;m=p+u.tagEnd.length;u.closeTag(o,q)}}j.focus();j.selectionStart=m;j.selectionEnd=m;j.scrollTop=h}else{if(u.isOpen(q)!==false||u.tagEnd==="")
{j.value+=u.tagStart;u.openTag(o,q)}else{j.value+=u.tagEnd;u.closeTag(o,q)}j.focus()}}};d.SpellButton=function(){d.Button.call(this,"spell",quicktagsL10n.lookup,"",quicktagsL10n.dictionaryLookup)};d.SpellButton.prototype=new d.Button();d.SpellButton.prototype.callback=function(h,g,i){var k="",j,f,e;if(document.selection){g.focus();j=document.selection.createRange();if(j.text.length>0){k=j.text}}else{if(g.selectionStart||g.selectionStart=="0"){f=g.selectionStart;e=g.selectionEnd;if(f!=e){k=g.value.substring(f,e)}}}if(k===""){k=prompt(quicktagsL10n.wordLookup,"")}if(k!==null&&/^\w[\w ]*$/.test(k)){window.open("http://www.answers.com/"+encodeURIComponent(k))}};d.CloseButton=function(){d.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};d.CloseButton.prototype=new d.Button();d.CloseButton.prototype.callback=function(j,k,f){var h,g,i=f.openTags;i
f(i){while(i.length>0){h=f.getButton(i[i.length-1]);g=document.getElementById(f.name+"_"+h.id);h.callback.call(h,g,k,f)}}};d.prototype.closeAllTags=function(){var e=this.getButton("close");e.callback.call(e,"",this.canvas,this.toolbar)};d.LinkButton=function(){d.TagButton.call(this,"link","link","","</a>","a")};d.LinkButton.prototype=new d.TagButton();d.LinkButton.prototype.callback=function(j,k,h,g){var f,i=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!g){g="http://"}if(i.isOpen(h)===false){f=prompt(quicktagsL10n.enterURL,g);if(f){i.tagStart='<a href="'+f+'">';d.TagButton.prototype.callback.call(i,j,k,h)}}else{d.TagButton.prototype.callback.call(i,j,k,h)}};d.ImgButton=function(){d.TagButton.call(this,"img","img","","","m",-1)};d.ImgButton.prototype=new d.TagButton();d.ImgButton.prototyp
e.callback=function(i,k,g,f){if(!f){f="http://"}var j=prompt(quicktagsL10n.enterImageURL,f),h;if(j){h=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart='<img src="'+j+'" alt="'+h+'" />';d.TagButton.prototype.callback.call(this,i,k,g)}};d.FullscreenButton=function(){d.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};d.FullscreenButton.prototype=new d.Button();d.FullscreenButton.prototype.callback=function(f,g){if(g.id!="content"||typeof(fullscreen)=="undefined"){return}fullscreen.on()};edButtons[10]=new d.TagButton("strong","b","<strong>","</strong>","b");edButtons[20]=new d.TagButton("em","i","<em>","</em>","i"),edButtons[30]=new d.LinkButton(),edButtons[40]=new d.TagButton("block","b-quote",&quo
t;\n\n<blockquote>","</blockquote>\n\n","q"),edButtons[50]=new d.TagButton("del","del",'<del datetime="'+a+'">',"</del>","d"),edButtons[60]=new d.TagButton("ins","ins",'<ins datetime="'+a+'">',"</ins>","s"),edButtons[70]=new d.ImgButton(),edButtons[80]=new d.TagButton("ul","ul","<ul>\n","</ul>\n\n","u"),edButtons[90]=new d.TagButton("ol","ol","<ol>\n","</ol>\n\n","o"),edButtons[100]=new d.TagButton("li","li","\t<li>","</li>\n","l"),edButtons[110]=new d.TagButton("code","code","<code>","</code>","c"),edButtons[120]=new d.TagButton("more","more","<
!--more-->","","t",-1),edButtons[130]=new d.SpellButton(),edButtons[140]=new d.CloseButton()})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (18574 => 18575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-08-19 17:04:16 UTC (rev 18574)
+++ trunk/wp-includes/script-loader.php        2011-08-19 21:23:31 UTC (rev 18575)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">
</span><span class="cx">         $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 );
</span><span class="cx">
</span><del>-        $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110804', 1 );
</del><ins>+        $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110819', 1 );
</ins><span class="cx">         $scripts->add_script_data( 'quicktags', 'quicktagsL10n', array(
</span><span class="cx">                 'wordLookup' => __('Enter a word to look up:'),
</span><span class="cx">                 'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
</span></span></pre>
</div>
</div>
</body>
</html>