Changeset 559
- Timestamp:
- 08/25/06 16:52:10 (7 years ago)
- Files:
-
- 1 modified
-
trunk/plugins/ContextMenu/context-menu.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ContextMenu/context-menu.js
r506 r559 45 45 46 46 var selection = editor.hasSelectedText(); 47 if (selection) 48 menu.push([ HTMLArea._lc("Cut", "ContextMenu"), function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ], 49 [ HTMLArea._lc("Copy", "ContextMenu"), function() { editor.execCommand("copy"); }, null, config.btnList["copy"][1] ]); 50 menu.push([ HTMLArea._lc("Paste", "ContextMenu"), function() { editor.execCommand("paste"); }, null, config.btnList["paste"][1] ]); 51 47 if (!HTMLArea.is_gecko) { 48 if (selection) { 49 menu.push([ HTMLArea._lc("Cut", "ContextMenu"), function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ], 50 [ HTMLArea._lc("Copy", "ContextMenu"), function() { editor.execCommand("copy"); }, null, config.btnList["copy"][1] ]); 51 menu.push([ HTMLArea._lc("Paste", "ContextMenu"), function() { editor.execCommand("paste"); }, null, config.btnList["paste"][1] ]); 52 } 53 } 52 54 var currentTarget = target; 53 55 var elmenus = []; … … 132 134 HTMLArea._lc("Show the Table Cell Properties dialog", "ContextMenu"), 133 135 config.btnList["TO-cell-prop"][1] ], 134 136 135 137 [ HTMLArea._lc("Insert Cell After", "ContextMenu"), 136 138 function() { tableOperation("TO-cell-insert-after"); }, 137 139 HTMLArea._lc("Insert Cell After", "ContextMenu"), 138 140 config.btnList["TO-cell-insert-after"][1] ], 139 141 140 142 [ HTMLArea._lc("Insert Cell Before", "ContextMenu"), 141 143 function() { tableOperation("TO-cell-insert-before"); }, 142 144 HTMLArea._lc("Insert Cell After", "ContextMenu"), 143 145 config.btnList["TO-cell-insert-before"][1] ], 144 146 145 147 [ HTMLArea._lc("Delete Cell", "ContextMenu"), 146 148 function() { tableOperation("TO-cell-delete"); }, 147 149 HTMLArea._lc("Delete Cell", "ContextMenu"), 148 150 config.btnList["TO-cell-delete"][1] ], 149 151 150 152 [ HTMLArea._lc("Merge Cells", "ContextMenu"), 151 153 function() { tableOperation("TO-cell-merge"); }, 152 154 HTMLArea._lc("Merge Cells", "ContextMenu"), 153 config.btnList["TO-cell-merge"][1] ] 155 config.btnList["TO-cell-merge"][1] ] 154 156 ); 155 157 break; … … 264 266 HTMLArea._lc("Insert a paragraph after the current node", "ContextMenu") ] 265 267 ); 268 if (!menu[0]) menu.shift(); //If the menu begins with a separator, remove it for cosmetical reasons 266 269 return menu; 267 270 };
