Changeset 26667
- Timestamp:
- 12/05/2013 04:04:59 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r26616 r26667 137 137 options: { 138 138 processContent: function( src ) { 139 return src.replace( /([^/]+)\.css/gi, "$1-rtl.css");139 return src.replace( /([^/]+)\.css/gi, '$1-rtl.css' ); 140 140 } 141 141 }, -
trunk/src/wp-admin/js/wp-fullscreen.js
r26649 r26667 1 /* global ajaxurl, deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit, wp_fullscreen_settings, wpActiveEditor:true, wpLink */ 1 2 /** 2 3 * PubSub … … 64 65 65 66 (function($){ 66 var api, ps, bounder, s ;67 var api, ps, bounder, s, timer, block, set_title_hint; 67 68 68 69 // Initialize the fullscreen/api object … … 81 82 timer : 0, 82 83 toolbar_shown : false 83 } 84 }; 84 85 85 86 /** … … 157 158 api.ui.init(); 158 159 159 s.is_mce_on = s.has_tinymce && typeof( tiny MCE.get(s.editor_id) ) != 'undefined';160 s.is_mce_on = s.has_tinymce && typeof( tinymce.get(s.editor_id) ) != 'undefined'; 160 161 161 162 api.ui.fade( 'show', 'showing', 'shown' ); … … 228 229 229 230 hidden.val(old); 230 } 231 }; 231 232 232 233 api.savecontent = function() { … … 236 237 $('#' + s.title_id).val( $('#wp-fullscreen-title').val() ); 237 238 238 if ( s.mode === 'tinymce' && (ed = tiny MCE.get('wp_mce_fullscreen')) ) {239 if ( s.mode === 'tinymce' && (ed = tinymce.get('wp_mce_fullscreen')) ) { 239 240 content = ed.save(); 240 241 } else { … … 244 245 $('#' + s.editor_id).val( content ); 245 246 $(document).triggerHandler('wpcountwords', [ content ]); 246 } 247 }; 247 248 248 249 set_title_hint = function( title ) { … … 251 252 else 252 253 title.siblings('label').css( 'visibility', 'hidden' ); 253 } 254 }; 254 255 255 256 api.dfw_width = function(n) { … … 269 270 el.width( w ); 270 271 setUserSetting('dfw_width', w); 271 } 272 }; 272 273 273 274 ps.subscribe( 'showToolbar', function() { … … 306 307 307 308 if ( s.has_tinymce && s.mode === 'tinymce' ) 308 tiny MCE.execCommand('wpFullScreenInit');309 tinymce.execCommand('wpFullScreenInit'); 309 310 310 311 s.orig_y = $(window).scrollTop(); … … 350 351 351 352 tinymce.onAddEditor.add(interim_init); 352 tiny MCE.init(tinyMCEPreInit.mceInit[s.editor_id]);353 tinymce.init(tinyMCEPreInit.mceInit[s.editor_id]); 353 354 354 355 s.is_mce_on = true; … … 374 375 375 376 if ( s.has_tinymce && s.mode === 'tinymce' ) 376 tiny MCE.execCommand('wpFullScreenSave');377 tinymce.execCommand('wpFullScreenSave'); 377 378 378 379 if ( s.title_id ) … … 394 395 395 396 if ( s.has_tinymce && s.is_mce_on ) 396 tiny MCE.execCommand('wpFullScreenClose');397 tinymce.execCommand('wpFullScreenClose'); 397 398 398 399 s.textarea_obj.value = ''; … … 407 408 return; 408 409 409 ed = tiny MCE.get('wp_mce_fullscreen');410 ed = tinymce.get('wp_mce_fullscreen'); 410 411 411 412 if ( from === 'html' && to === 'tinymce' ) { 412 413 413 if ( tiny MCE.get(s.editor_id).getParam('wpautop') && typeof(switchEditors) != 'undefined' )414 if ( tinymce.get(s.editor_id).getParam('wpautop') && typeof(switchEditors) != 'undefined' ) 414 415 s.textarea_obj.value = switchEditors.wpautop( s.textarea_obj.value ); 415 416 416 417 if ( 'undefined' == typeof(ed) ) 417 tiny MCE.execCommand('wpFullScreenInit');418 tinymce.execCommand('wpFullScreenInit'); 418 419 else 419 420 ed.show(); … … 437 438 api.b = function() { 438 439 if ( s.has_tinymce && 'tinymce' === s.mode ) 439 tiny MCE.execCommand('Bold');440 } 440 tinymce.execCommand('Bold'); 441 }; 441 442 442 443 api.i = function() { 443 444 if ( s.has_tinymce && 'tinymce' === s.mode ) 444 tiny MCE.execCommand('Italic');445 } 445 tinymce.execCommand('Italic'); 446 }; 446 447 447 448 api.ul = function() { 448 449 if ( s.has_tinymce && 'tinymce' === s.mode ) 449 tiny MCE.execCommand('InsertUnorderedList');450 } 450 tinymce.execCommand('InsertUnorderedList'); 451 }; 451 452 452 453 api.ol = function() { 453 454 if ( s.has_tinymce && 'tinymce' === s.mode ) 454 tiny MCE.execCommand('InsertOrderedList');455 } 455 tinymce.execCommand('InsertOrderedList'); 456 }; 456 457 457 458 api.link = function() { 458 459 if ( s.has_tinymce && 'tinymce' === s.mode ) 459 tiny MCE.execCommand('WP_Link');460 tinymce.execCommand('WP_Link'); 460 461 else 461 462 wpLink.open(); 462 } 463 }; 463 464 464 465 api.unlink = function() { 465 466 if ( s.has_tinymce && 'tinymce' === s.mode ) 466 tiny MCE.execCommand('unlink');467 } 467 tinymce.execCommand('unlink'); 468 }; 468 469 469 470 api.atd = function() { 470 471 if ( s.has_tinymce && 'tinymce' === s.mode ) 471 tiny MCE.execCommand('mceWritingImprovementTool');472 } 472 tinymce.execCommand('mceWritingImprovementTool'); 473 }; 473 474 474 475 api.help = function() { 475 476 if ( s.has_tinymce && 'tinymce' === s.mode ) 476 tiny MCE.execCommand('WP_Help');477 } 477 tinymce.execCommand('WP_Help'); 478 }; 478 479 479 480 api.blockquote = function() { 480 481 if ( s.has_tinymce && 'tinymce' === s.mode ) 481 tiny MCE.execCommand('mceBlockQuote');482 } 482 tinymce.execCommand('mceBlockQuote'); 483 }; 483 484 484 485 api.medialib = function() { 485 486 if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) 486 487 wp.media.editor.open(s.editor_id); 487 } 488 }; 488 489 489 490 api.refresh_buttons = function( fade ) { … … 510 511 $('#wp-fullscreen-button-bar').removeClass('wp-html-mode'); 511 512 } 512 } 513 }; 513 514 514 515 /** … … 592 593 } 593 594 594 topbar.mouseenter(function( e){595 topbar.mouseenter(function(){ 595 596 s.toolbars.addClass('fullscreen-make-sticky'); 596 597 $( document ).unbind( '.fullscreen' ); 597 598 clearTimeout( s.timer ); 598 599 s.timer = 0; 599 }).mouseleave(function( e){600 }).mouseleave(function(){ 600 601 s.toolbars.removeClass('fullscreen-make-sticky'); 601 602 … … 620 621 if ( after ) 621 622 ps.publish( after ); 622 }) 623 }); 623 624 }); 624 625 } … … 713 714 setTimeout( api.resize_textarea, 200 ); 714 715 }); 715 } 716 }; 716 717 717 718 api.oldheight = 0;
Note: See TracChangeset
for help on using the changeset viewer.