Make WordPress Core

Changeset 27513 for trunk


Ignore:
Timestamp:
03/12/2014 08:18:56 AM (10 years ago)
Author:
azaozz
Message:

TinyMCE modals: re-enable the Close button in charmap, fix arrows in listboxes, add and position dashicons to the menu (when visible), see #26952

Location:
trunk/src/wp-includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/css/editor.css

    r27510 r27513  
    3232    border-bottom: 1px solid #dfdfdf;
    3333    padding: 0;
    34     min-height: 40px;
     34    min-height: 36px;
    3535}
    3636
    3737.mce-window .mce-window-head .mce-title {
    38     font-size: 22px;
     38    font-size: 20px;
    3939    font-weight: 600;
    40     line-height: 40px;
     40    line-height: 36px;
    4141    margin: 0;
    42     padding: 0 40px 0 16px;
     42    padding: 0 36px 0 16px;
    4343}
    4444
     
    4747    top: 0;
    4848    right: 0;
    49     width: 40px;
    50     height: 40px;
    51     line-height: 40px;
     49    width: 36px;
     50    height: 36px;
     51    line-height: 36px;
    5252    text-align: center;
    5353}
    5454
    5555.mce-window .mce-window-head .mce-close:before {
    56     font: normal 20px/2 'dashicons';
     56    font: normal 20px/36px 'dashicons';
    5757    text-align: center;
    5858    color: #666;
    59     width: 40px;
    60     height: 40px;
     59    width: 36px;
     60    height: 36px;
    6161    display: block;
    6262}
     
    6767
    6868.mce-window .mce-window-head .mce-dragh {
    69     width: -webkit-calc( 100% - 40px );
    70     width: calc( 100% - 40px );
     69    width: -webkit-calc( 100% - 36px );
     70    width: calc( 100% - 36px );
    7171}
    7272
     
    215215
    216216.mce-toolbar .mce-colorbutton .mce-preview {
    217     margin-left: -18px;
     217    margin-left: -17px;
    218218    padding: 0;
    219219    width: 18px;
     
    236236}
    237237
    238 
    239 .mce-toolbar .mce-btn .mce-caret {
    240     border: none;
    241     margin: 0 0 0 -5px;
    242     width: 16px;
    243 }
    244 
    245 .mce-toolbar .mce-listbox .mce-caret {
    246     margin-top: 0;
    247     padding: 2px 0 0;
    248     right: 0;
    249     top: 0;
    250     width: 16px;
    251 }
    252 
    253 .mce-toolbar .mce-listbox .mce-caret:before {
    254     margin-left: -6px;
     238.mce-panel .mce-btn i.mce-caret {
     239    border-top: 6px solid #777;
     240}
     241
     242.mce-panel .mce-btn:hover i.mce-caret {
     243    border-top-color: #333;
     244}
     245
     246.mce-panel .mce-active i.mce-caret {
     247    border-top: 0;
     248    border-bottom: 6px solid #333;
     249    margin-top: 7px;
     250}
     251
     252.mce-listbox.mce-active i.mce-caret {
     253    margin-top: -3px;
    255254}
    256255
     
    306305    margin-right: 0;
    307306    padding-left: 3px;
     307}
     308
     309.mce-menu-has-icons i.mce-ico:before {
     310    margin-left: -2px;
    308311}
    309312
     
    413416
    414417@media screen and ( max-width: 782px ) {
     418    .mce-toolbar .mce-btn button {
     419        padding: 5px 6px;
     420    }
     421
     422    #wp-fullscreen-buttons .mce-btn,
     423    .mce-toolbar .mce-btn-group .mce-btn {
     424        margin: 0 3px;
     425    }
     426
     427    .mce-toolbar .mce-colorbutton .mce-preview {
     428        margin-left: -20px;
     429    }
     430
    415431    .mce-window .mce-btn {
    416         padding: 10px 14px;
    417         line-height: 1;
    418         font-size: 14px;
    419         vertical-align: middle;
    420         height: auto;
    421         margin-bottom: 4px;
     432        padding: 2px 0;
    422433    }
    423434}
     
    457468
    458469/* TinyMCE icons */
    459 .mce-toolbar .mce-ico,
    460 .mce-toolbar .mce-caret {
     470.mce-toolbar .mce-ico {
    461471    color: #777;
    462472    line-height: 20px;
     
    465475    text-align: center;
    466476    text-shadow: none;
     477    margin: 0;
     478    padding: 0;
    467479}
    468480
     
    476488.mce-toolbar .mce-btn.mce-active .mce-open {
    477489    border-left-color: #bdbdbd;
     490}
     491
     492.mce-toolbar .mce-btn .mce-open {
     493    line-height: 20px;
    478494}
    479495
     
    510526i.mce-i-ltr,
    511527i.mce-i-wp_page,
    512 i.mce-caret,
    513528.mce-close {
    514529    font: normal 20px/1 'dashicons';
     
    518533    -webkit-font-smoothing: antialiased;
    519534    -moz-osx-font-smoothing: grayscale;
     535    margin-left: -2px;
     536    padding-right: 2px;
    520537}
    521538
     
    636653i.mce-i-wp_page:before {
    637654    content: '\f105';
    638 }
    639 
    640 i.mce-caret:before {
    641     content: '\f140';
    642 }
    643 
    644 .mce-active i.mce-caret:before {
    645     content: '\f142';
    646655}
    647656
  • trunk/src/wp-includes/js/tinymce/plugins/charmap/plugin.js

    r27387 r27513  
    343343                }
    344344            ],
    345             buttons: [] // WP, see #27107
     345            buttons: [
     346                {text: "Close", onclick: function() {
     347                    win.close();
     348                }}
     349            ]
    346350        });
    347351    }
  • trunk/src/wp-includes/js/tinymce/plugins/charmap/plugin.min.js

    r27387 r27513  
    1 tinymce.PluginManager.add("charmap",function(a){function b(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var d,e,f,g;d='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var h=25;for(f=0;10>f;f++){for(d+="<tr>",e=0;h>e;e++){var i=c[f*h+e];d+='<td title="'+i[1]+'"><div tabindex="-1" title="'+i[1]+'" role="button">'+(i?String.fromCharCode(parseInt(i[0],10)):"&nbsp;")+"</div></td>"}d+="</tr>"}d+="</tbody></table>";var j={type:"container",html:d,onclick:function(b){var c=b.target;/^(TD|DIV)$/.test(c.nodeName)&&(a.execCommand("mceInsertContent",!1,tinymce.trim(c.innerText||c.textContent)),b.ctrlKey||g.close())},onmouseover:function(a){var c=b(a.target);c&&g.find("#preview").text(c.firstChild.firstChild.data)}};g=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[j,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[]})}var c=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];a.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:b}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:b,context:"insert"})});
     1tinymce.PluginManager.add("charmap",function(e){function a(){function a(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var i,r,o,n;i='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var l=25;for(o=0;10>o;o++){for(i+="<tr>",r=0;l>r;r++){var s=t[o*l+r];i+='<td title="'+s[1]+'"><div tabindex="-1" title="'+s[1]+'" role="button">'+(s?String.fromCharCode(parseInt(s[0],10)):"&nbsp;")+"</div></td>"}i+="</tr>"}i+="</tbody></table>";var c={type:"container",html:i,onclick:function(a){var t=a.target;/^(TD|DIV)$/.test(t.nodeName)&&(e.execCommand("mceInsertContent",!1,tinymce.trim(t.innerText||t.textContent)),a.ctrlKey||n.close())},onmouseover:function(e){var t=a(e.target);t&&n.find("#preview").text(t.firstChild.firstChild.data)}};n=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[c,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){n.close()}}]})}var t=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];e.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:a}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:a,context:"insert"})});
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r27460 r27513  
    238238        editor.addMenuItem( 'add_media', {
    239239            text: 'Add Media',
     240            icon: 'wp-media-library',
    240241            context: 'insert',
    241242            cmd: 'WP_Medialib'
     
    246247    editor.addMenuItem( 'wp_more', {
    247248        text: 'Insert Read More tag',
     249        icon: 'wp_more',
    248250        context: 'insert',
    249251        onclick: function() {
     
    255257    editor.addMenuItem( 'wp_page', {
    256258        text: 'Page break',
     259        icon: 'wp_page',
    257260        context: 'insert',
    258261        onclick: function() {
  • trunk/src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js

    r26880 r27513  
    9797    editor.addMenuItem( 'wp_fullscreen', {
    9898        text: 'Distraction Free Writing',
     99        icon: 'wp_fullscreen',
    99100        shortcut: 'Alt+Shift+W',
    100101        context: 'view',
Note: See TracChangeset for help on using the changeset viewer.