Changeset 26880
- Timestamp:
- 12/30/2013 01:53:25 AM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/css/editor.css
r26876 r26880 3 3 ------------------------------------------------------------------------------*/ 4 4 5 .mce-panel {5 div.mce-panel { 6 6 border: 0; 7 7 background: #fff; 8 } 9 10 .mce-toolbar-grp { 8 filter: none; 9 } 10 11 div.mce-toolbar-grp { 11 12 border-bottom: 1px solid #dedede; 12 13 background: #f5f5f5; … … 41 42 -webkit-border-radius: 2px; 42 43 border-radius: 2px; 44 filter: none; 43 45 } 44 46 … … 108 110 } 109 111 110 .mce-i-bold,111 .mce-i-italic,112 .mce-i-bullist,113 .mce-i-numlist,114 .mce-i-blockquote,115 .mce-i-alignleft,116 .mce-i-aligncenter,117 .mce-i-alignright,118 .mce-i-link,119 .mce-i-unlink,120 .mce-i-wp_more,121 .mce-i-strikethrough,122 .mce-i-spellchecker,123 .mce-i-fullscreen,124 .mce-i-wp_fullscreen,125 .mce-i-wp_adv,126 .mce-i-underline,127 .mce-i-alignjustify,128 .mce-i-forecolor,129 .mce-i-pastetext,130 .mce-i-pasteword,131 .mce-i-removeformat,132 .mce-i-charmap,133 .mce-i-outdent,134 .mce-i-indent,135 .mce-i-undo,136 .mce-i-redo,137 .mce-i-help,138 .mce-i-wp_help,139 .mce-i-wp-media-library,140 .mce-i-ltr {112 i.mce-i-bold, 113 i.mce-i-italic, 114 i.mce-i-bullist, 115 i.mce-i-numlist, 116 i.mce-i-blockquote, 117 i.mce-i-alignleft, 118 i.mce-i-aligncenter, 119 i.mce-i-alignright, 120 i.mce-i-link, 121 i.mce-i-unlink, 122 i.mce-i-wp_more, 123 i.mce-i-strikethrough, 124 i.mce-i-spellchecker, 125 i.mce-i-fullscreen, 126 i.mce-i-wp_fullscreen, 127 i.mce-i-wp_adv, 128 i.mce-i-underline, 129 i.mce-i-alignjustify, 130 i.mce-i-forecolor, 131 i.mce-i-pastetext, 132 i.mce-i-pasteword, 133 i.mce-i-removeformat, 134 i.mce-i-charmap, 135 i.mce-i-outdent, 136 i.mce-i-indent, 137 i.mce-i-undo, 138 i.mce-i-redo, 139 i.mce-i-help, 140 i.mce-i-wp_help, 141 i.mce-i-wp-media-library, 142 i.mce-i-ltr { 141 143 font: normal 20px/1 'dashicons'; 142 144 padding: 0; … … 147 149 } 148 150 149 .mce-i-bold:before {151 i.mce-i-bold:before { 150 152 content: '\f200'; 151 153 } 152 154 153 .mce-i-italic:before {155 i.mce-i-italic:before { 154 156 content: '\f201'; 155 157 } 156 158 157 .mce-i-bullist:before {159 i.mce-i-bullist:before { 158 160 content: '\f203'; 159 161 } 160 162 161 .mce-i-numlist:before {163 i.mce-i-numlist:before { 162 164 content: '\f204'; 163 165 } 164 166 165 .mce-i-blockquote:before {167 i.mce-i-blockquote:before { 166 168 content: '\f205'; 167 169 } 168 170 169 .mce-i-alignleft:before {171 i.mce-i-alignleft:before { 170 172 content: '\f206'; 171 173 } 172 174 173 .mce-i-aligncenter:before {175 i.mce-i-aligncenter:before { 174 176 content: '\f207'; 175 177 } 176 178 177 .mce-i-alignright:before {179 i.mce-i-alignright:before { 178 180 content: '\f208'; 179 181 } 180 182 181 .mce-i-link:before {183 i.mce-i-link:before { 182 184 content: '\f103'; 183 185 } 184 186 185 .mce-i-unlink:before {187 i.mce-i-unlink:before { 186 188 content: '\f225'; 187 189 } 188 190 189 .mce-i-wp_more:before {191 i.mce-i-wp_more:before { 190 192 content: '\f209'; 191 193 } 192 194 193 .mce-i-strikethrough:before {195 i.mce-i-strikethrough:before { 194 196 content: '\f224'; 195 197 } 196 198 197 .mce-i-spellchecker:before {199 i.mce-i-spellchecker:before { 198 200 content: '\f210'; 199 201 } 200 202 201 .mce-i-fullscreen:before,202 .mce-i-wp_fullscreen:before {203 i.mce-i-fullscreen:before, 204 i.mce-i-wp_fullscreen:before { 203 205 content: '\f211'; 204 206 } 205 207 206 .mce-i-wp_adv:before {208 i.mce-i-wp_adv:before { 207 209 content: '\f212'; 208 210 } 209 .mce-i-underline:before { 211 212 i.mce-i-underline:before { 210 213 content: '\f213'; 211 214 } 212 215 213 .mce-i-alignjustify:before {216 i.mce-i-alignjustify:before { 214 217 content: '\f214'; 215 218 } 216 219 217 .mce-i-forecolor:before {220 i.mce-i-forecolor:before { 218 221 content: '\f215'; 219 222 } 220 223 221 .mce-i-pastetext:before {224 i.mce-i-pastetext:before { 222 225 content: '\f217'; 223 226 } 224 227 225 .mce-i-removeformat:before {228 i.mce-i-removeformat:before { 226 229 content: '\f218'; 227 230 } 228 231 229 .mce-i-charmap:before {232 i.mce-i-charmap:before { 230 233 content: '\f220'; 231 234 } 232 235 233 .mce-i-outdent:before {236 i.mce-i-outdent:before { 234 237 content: '\f221'; 235 238 } 236 239 237 .mce-i-indent:before {240 i.mce-i-indent:before { 238 241 content: '\f222'; 239 242 } 240 243 241 .mce-i-undo:before {244 i.mce-i-undo:before { 242 245 content: '\f171'; 243 246 } 244 247 245 .mce-i-redo:before {248 i.mce-i-redo:before { 246 249 content: '\f172'; 247 250 } 248 251 249 .mce-i-help:before,250 .mce-i-wp_help:before {252 i.mce-i-help:before, 253 i.mce-i-wp_help:before { 251 254 content: '\f223'; 252 255 } 253 256 254 .mce-i-wp-media-library:before {257 i.mce-i-wp-media-library:before { 255 258 content: '\f104'; 256 259 } 257 260 258 .mce-i-ltr:before {261 i.mce-i-ltr:before { 259 262 content: '\f320'; 260 263 } … … 300 303 } 301 304 302 .quicktags-toolbar, 303 .wp_themeSkin tr.mceFirst td.mceToolbar { 305 .quicktags-toolbar { 304 306 border-bottom: 1px solid #dedede; 305 307 background: #f5f5f5; -
trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r26876 r26880 5 5 6 6 function toggleToolbars( state ) { 7 var iframe, 8 pixels = 0, 9 initial = state === 'hide', 10 toolbars = editor.theme.panel && editor.theme.panel.find('.toolbar'); 7 var iframe, initial, toolbars, 8 pixels = 0; 9 10 initial = ( state === 'hide' ); 11 12 if ( editor.theme.panel ) { 13 toolbars = editor.theme.panel.find('.toolbar'); 14 } 11 15 12 16 if ( ! toolbars || toolbars.length < 2 || ( state === 'hide' && ! toolbars[1].visible() ) ) { -
trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
r26876 r26880 50 50 function getShortcode( content ) { 51 51 return content.replace( /<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g, function( a, b ) { 52 if ( b.indexOf('<img ') === -1 ) { 53 // Broken caption. The user dragged the image out? 54 return ''; 55 } 56 52 57 var ret = b.replace( /<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function( a, b, c, cap ) { 53 58 var id, cls, w; … … 130 135 captionAlign = '', 131 136 captionWidth = '', 132 wrap, parent, html, P, imgId;137 wrap, parent, node, html, imgId; 133 138 134 139 // Temp image id so we can find the node later … … 179 184 180 185 if ( parent && parent.nodeName === 'P' ) { 181 wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );186 wrap = dom.create( 'div', { 'class': 'mceTemp', 'draggable': 'true' }, html ); 182 187 dom.insertAfter( wrap, parent ); 183 188 editor.selection.select( wrap ); … … 188 193 } 189 194 } else { 190 editor.selection.setContent( '<div class="mceTemp" >' + html + '</div>' );195 editor.selection.setContent( '<div class="mceTemp" draggable="true">' + html + '</div>' ); 191 196 } 192 197 } else { … … 245 250 246 251 if ( parent = dom.getParent( imgNode, 'p' ) ) { 247 wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );252 wrap = dom.create( 'div', { 'class': 'mceTemp', 'draggable': 'true' }, html ); 248 253 dom.insertAfter( wrap, parent ); 249 254 editor.selection.select( wrap ); … … 257 262 } 258 263 } else { 259 editor.selection.setContent( '<div class="mceTemp" >' + html + '</div>' );264 editor.selection.setContent( '<div class="mceTemp" draggable="true">' + html + '</div>' ); 260 265 } 261 266 } … … 285 290 editor.on( 'wpLoadImageData', function( e ) { 286 291 var parent, 287 data = e.imgData.data 292 data = e.imgData.data, 288 293 imgNode = e.imgData.node; 289 294 -
trunk/src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js
r26876 r26880 11 11 d = editor.getDoc(), 12 12 body = d.body, 13 de = d.documentElement, 14 DOM = tinymce.DOM 13 DOM = tinymce.DOM, 15 14 resizeHeight = 250; 16 15 17 if ( ( e && e.type == 'setcontent' && e.initial ) || editor.settings.inline ) {16 if ( ( e && e.type === 'setcontent' && e.initial ) || editor.settings.inline ) { 18 17 return; 19 18 } -
trunk/src/wp-includes/js/tinymce/plugins/wpgallery/plugin.js
r26876 r26880 1 1 /* global tinymce */ 2 tinymce.PluginManager.add('wpgallery', function( editor , url) {2 tinymce.PluginManager.add('wpgallery', function( editor ) { 3 3 4 4 function parseGallery( content ) { … … 70 70 */ 71 71 editor.on( 'mouseup', function( e ) { 72 if ( e.target.nodeName == 'IMG' && editor.dom.hasClass( e.target, 'wp-gallery' ) ) {72 if ( e.target.nodeName === 'IMG' && editor.dom.hasClass( e.target, 'wp-gallery' ) ) { 73 73 // Don't trigger on right-click 74 74 if ( e.button !== 2 ) { -
trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js
r26876 r26880 14 14 15 15 // Check if the `wp.mce` API exists. 16 if ( typeof wp === 'undefined' || ! wp.mce ) 16 if ( typeof wp === 'undefined' || ! wp.mce ) { 17 17 return; 18 } 18 19 19 20 editor.on( 'PreInit', function() { … … 27 28 // we'll wait to render the views. 28 29 editor.on( 'BeforeSetContent', function( e ) { 29 if ( ! e.content ) 30 if ( ! e.content ) { 30 31 return; 32 } 31 33 32 34 e.content = wp.mce.view.toViews( e.content ); … … 43 45 // When a view is selected, ensure content that is being pasted 44 46 // or inserted is added to a text node (instead of the view). 45 editor.on( 'BeforeSetContent', function( e) {47 editor.on( 'BeforeSetContent', function() { 46 48 var walker, target, 47 49 view = wpView.getParentView( selection.getNode() ); 48 50 49 51 // If the selection is not within a view, bail. 50 if ( ! view ) 52 if ( ! view ) { 51 53 return; 54 } 52 55 53 56 // If there are no additional nodes or the next node is a … … 73 76 // Runs on paste and on inserting nodes/html. 74 77 editor.on( 'SetContent', function( e ) { 75 if ( ! e.context ) 78 if ( ! e.context ) { 76 79 return; 80 } 77 81 78 82 var node = selection.getNode(); 79 83 80 if ( ! node.innerHTML ) 84 if ( ! node.innerHTML ) { 81 85 return; 86 } 82 87 83 88 node.innerHTML = wp.mce.view.toViews( node.innerHTML ); … … 89 94 // transform any views back to their text representations. 90 95 editor.on( 'PostProcess', function( e ) { 91 if ( ( ! e.get && ! e.save ) || ! e.content ) 96 if ( ( ! e.get && ! e.save ) || ! e.content ) { 92 97 return; 98 } 93 99 94 100 e.content = wp.mce.view.toText( e.content ); … … 98 104 // Add the event handler to the top of the stack. 99 105 editor.on( 'NodeChange', function( e ) { 100 var view = wpView.getParentView( node);106 var view = wpView.getParentView( e.element ); 101 107 102 108 // Update the selected view. … … 118 124 119 125 // If a view isn't selected, let the event go on its merry way. 120 if ( ! selected ) 126 if ( ! selected ) { 121 127 return; 128 } 122 129 123 130 // If the caret is not within the selected view, deselect the 124 131 // view and bail. 125 view = wpView.getParentView( selection.getNode() );132 view = wpView.getParentView( editor.selection.getNode() ); 126 133 if ( view !== selected ) { 127 134 wpView.deselect(); … … 139 146 // Let keypresses that involve the command or control keys through. 140 147 // Also, let any of the F# keys through. 141 if ( event.metaKey || event.ctrlKey || ( keyCode >= 112 && keyCode <= 123 ) ) 148 if ( event.metaKey || event.ctrlKey || ( keyCode >= 112 && keyCode <= 123 ) ) { 142 149 return; 150 } 143 151 144 152 event.preventDefault(); … … 148 156 getParentView : function( node ) { 149 157 while ( node ) { 150 if ( this.isView( node ) ) 158 if ( this.isView( node ) ) { 151 159 return node; 160 } 152 161 153 162 node = node.parentNode; … … 160 169 161 170 select : function( view ) { 162 if ( view === selected ) 171 if ( view === selected ) { 163 172 return; 173 } 164 174 165 175 this.deselect(); … … 169 179 170 180 deselect : function() { 171 if ( selected ) 181 if ( selected ) { 172 182 wp.mce.view.deselect( selected ); 183 } 184 173 185 selected = null; 174 186 } -
trunk/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
r26876 r26880 51 51 } 52 52 53 .wp-caption img, 54 .wp-caption a { 53 div.mceTemp { 54 -ms-user-select: element; 55 } 56 57 dl.wp-caption, 58 dl.wp-caption * { 55 59 -webkit-user-drag: none; 56 60 }
Note: See TracChangeset
for help on using the changeset viewer.