Changeset 29878
- Timestamp:
- 10/12/2014 12:46:26 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/quicktags.js
r27857 r29878 321 321 * @param string|function arg1 Required. Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked. 322 322 * @param string arg2 Optional. Ending tag like "</span>" 323 * @param string access_key Optional. Access key for the button.323 * @param string access_key Deprecated Not used 324 324 * @param string title Optional. Button's title="..." 325 325 * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc. … … 401 401 t.id = id; 402 402 t.display = display; 403 t.access = access;403 t.access = ''; 404 404 t.title = title || ''; 405 405 t.instance = instance || ''; 406 406 }; 407 407 qt.Button.prototype.html = function(idPrefix) { 408 var access = this.access ? ' accesskey="' + this.access + '"' : ''; 408 var title = this.title ? ' title="' + this.title + '"' : ''; 409 409 410 if ( this.id === 'fullscreen' ) { 410 return '<button type="button" id="' + idPrefix + this.id + '" ' + access + ' class="ed_button qt-fullscreen" title="' + this.title + '"></button>';411 } 412 return '<input type="button" id="' + idPrefix + this.id + '" ' + access + ' class="ed_button button button-small" title="' + this.title + '"value="' + this.display + '" />';411 return '<button type="button" id="' + idPrefix + this.id + '" class="ed_button qt-fullscreen"' + title + '></button>'; 412 } 413 return '<input type="button" id="' + idPrefix + this.id + '" class="ed_button button button-small"' + title + ' value="' + this.display + '" />'; 413 414 }; 414 415 qt.Button.prototype.callback = function(){}; … … 564 565 // the link button 565 566 qt.LinkButton = function() { 566 qt.TagButton.call(this, 'link', 'link', '', '</a>' , 'a');567 qt.TagButton.call(this, 'link', 'link', '', '</a>'); 567 568 }; 568 569 qt.LinkButton.prototype = new qt.TagButton(); … … 592 593 // the img button 593 594 qt.ImgButton = function() { 594 qt.TagButton.call(this, 'img', 'img', '', '' , 'm');595 qt.TagButton.call(this, 'img', 'img', '', ''); 595 596 }; 596 597 qt.ImgButton.prototype = new qt.TagButton(); … … 636 637 637 638 // ensure backward compatibility 638 edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>' ,'b');639 edButtons[20] = new qt.TagButton('em','i','<em>','</em>' ,'i'),639 edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>'); 640 edButtons[20] = new qt.TagButton('em','i','<em>','</em>'), 640 641 edButtons[30] = new qt.LinkButton(), // special case 641 edButtons[40] = new qt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n' ,'q'),642 edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>' ,'d'),643 edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>' ,'s'),642 edButtons[40] = new qt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n'), 643 edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>'), 644 edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>'), 644 645 edButtons[70] = new qt.ImgButton(), // special case 645 edButtons[80] = new qt.TagButton('ul','ul','<ul>\n','</ul>\n\n' ,'u'),646 edButtons[90] = new qt.TagButton('ol','ol','<ol>\n','</ol>\n\n' ,'o'),647 edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n' ,'l'),648 edButtons[110] = new qt.TagButton('code','code','<code>','</code>' ,'c'),649 edButtons[120] = new qt.TagButton('more','more','<!--more-->\n\n','' ,'t'),646 edButtons[80] = new qt.TagButton('ul','ul','<ul>\n','</ul>\n\n'), 647 edButtons[90] = new qt.TagButton('ol','ol','<ol>\n','</ol>\n\n'), 648 edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n'), 649 edButtons[110] = new qt.TagButton('code','code','<code>','</code>'), 650 edButtons[120] = new qt.TagButton('more','more','<!--more-->\n\n',''), 650 651 edButtons[140] = new qt.CloseButton(); 651 652
Note: See TracChangeset
for help on using the changeset viewer.