Changeset 21300
- Timestamp:
- 07/22/2012 02:33:53 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r21212 r21300 313 313 <div id="postdivrich" class="postarea"> 314 314 315 <?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabindex' => 1 ) ); ?>315 <?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabindex' => 1, 'tabfocus_elements' => 'sample-permalink,post-preview') ); ?> 316 316 317 317 <table id="post-status-info" cellspacing="0"><tbody><tr> -
trunk/wp-admin/includes/post.php
r21189 r21300 1092 1092 1093 1093 if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { 1094 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" >' . $permalink . "</span>\n";1094 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n"; 1095 1095 if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) 1096 1096 $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; … … 1121 1121 $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); 1122 1122 $return = '<strong>' . __('Permalink:') . "</strong>\n"; 1123 $return .= '<span id="sample-permalink" >' . $display_link . "</span>\n";1123 $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n"; 1124 1124 $return .= '‎'; // Fix bi-directional text display defect in RTL languages. 1125 1125 $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n"; -
trunk/wp-includes/class-wp-editor.php
r21218 r21300 35 35 'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..." 36 36 'tabindex' => '', 37 'tabfocus_elements' => ':prev,:next', // the previous and next element ID to move the focus to when pressing the Tab key in TinyMCE 37 38 'editor_css' => '', // intended for extra styles for both visual and Text editors buttons, needs to include the <style> tags, can use "scoped". 38 39 'editor_class' => '', // add extra class(es) to the editor textarea … … 312 313 'entities' => '38,amp,60,lt,62,gt', 313 314 'accessibility_focus' => true, 314 'tabfocus_elements' => 'title,publish',315 315 'media_strict' => false, 316 316 'paste_remove_styles' => true, … … 399 399 'theme_advanced_buttons3' => implode($mce_buttons_3, ','), 400 400 'theme_advanced_buttons4' => implode($mce_buttons_4, ','), 401 'tabfocus_elements' => $set['tabfocus_elements'], 401 402 'body_class' => $body_class 402 403 ); -
trunk/wp-includes/js/autosave.dev.js
r19593 r21300 2 2 3 3 jQuery(document).ready( function($) { 4 var dotabkey = true;5 4 6 5 autosaveLast = $('#post #title').val() + $('#post #content').val(); … … 30 29 31 30 window.onbeforeunload = function(){ 32 var mce = typeof(tiny MCE) != 'undefined' ? tinyMCE.activeEditor : false, title, content;31 var mce = typeof(tinymce) != 'undefined' ? tinymce.activeEditor : false, title, content; 33 32 34 33 if ( mce && !mce.isHidden() ) { … … 98 97 } 99 98 100 // This code is meant to allow tabbing from Title to Post if tinyMCE is defined. 101 if ( typeof tinyMCE != 'undefined' ) { 102 $('#title')[$.browser.opera ? 'keypress' : 'keydown'](function (e) { 103 if ( e.which == 9 && !e.shiftKey && !e.controlKey && !e.altKey ) { 104 if ( ($('#auto_draft').val() == '1') && ($("#title").val().length > 0) ) { autosave(); } 105 if ( tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden() && dotabkey ) { 106 e.preventDefault(); 107 dotabkey = false; 108 tinyMCE.activeEditor.focus(); 109 return false; 110 } 99 // This code is meant to allow tabbing from Title to Post if tinymce is defined. 100 if ( typeof tinymce != 'undefined' ) { 101 $('#title').bind('keydown.focus-tinymce', function(e) { 102 if ( e.which != 9 ) 103 return; 104 105 if ( !e.ctrlKey && !e.altKey && !e.shiftKey && tinymce.activeEditor && !tinymce.activeEditor.isHidden() ) { 106 $('td.mceToolbar > a').focus(); 107 e.preventDefault(); 111 108 } 112 109 }); … … 245 242 // (bool) is rich editor enabled and active 246 243 blockSave = true; 247 var rich = (typeof tiny MCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden(),244 var rich = (typeof tinymce != "undefined") && tinymce.activeEditor && !tinymce.activeEditor.isHidden(), 248 245 post_data, doAutoSave, ed, origStatus, successCallback; 249 246 … … 270 267 doAutoSave = false; 271 268 272 /* Gotta do this up here so we can check the length when tiny MCEis in use */269 /* Gotta do this up here so we can check the length when tinymce is in use */ 273 270 if ( rich && doAutoSave ) { 274 ed = tiny MCE.activeEditor;275 // Don't run while the TinyMCEspellcheck is on. It resets all found words.271 ed = tinymce.activeEditor; 272 // Don't run while the tinymce spellcheck is on. It resets all found words. 276 273 if ( ed.plugins.spellchecker && ed.plugins.spellchecker.active ) { 277 274 doAutoSave = false; 278 275 } else { 279 276 if ( 'mce_fullscreen' == ed.id || 'wp_mce_fullscreen' == ed.id ) 280 tiny MCE.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'});281 tiny MCE.triggerSave();277 tinymce.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'}); 278 tinymce.triggerSave(); 282 279 } 283 280 } -
trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js
r21228 r21300 1 (function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e); if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})();1 (function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);f.onKeyDown.add(h);if(tinymce.isGecko){f.onKeyPress.add(e)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); -
trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js
r21228 r21300 98 98 99 99 ed.onKeyUp.add(tabCancel); 100 ed.onKeyDown.add(tabHandler); 100 101 101 if (tinymce.isGecko) { 102 ed.onKeyPress.add(tabHandler); 103 ed.onKeyDown.add(tabCancel); 104 } else 105 ed.onKeyDown.add(tabHandler); 106 102 if (tinymce.isGecko) 103 ed.onKeyPress.add(tabCancel); 107 104 }, 108 105
Note: See TracChangeset
for help on using the changeset viewer.