Followup to bug 355064 to update the spelling items last to hack around the editor context menu hacks r=IanN
git-svn-id: svn://10.0.0.236/trunk@215844 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4314b5ca79
commit
6236d3bd6a
@ -42,19 +42,6 @@ function EditorFillContextMenu(event, contextMenuNode)
|
||||
if ( event.target != contextMenuNode )
|
||||
return;
|
||||
|
||||
// if we have a mispelled word, show spellchecker context
|
||||
// menuitems as well as the usual context menu
|
||||
InlineSpellCheckerUI.clearSuggestionsFromMenu();
|
||||
InlineSpellCheckerUI.initFromEvent(document.popupRangeParent, document.popupRangeOffset);
|
||||
var onMisspelling = InlineSpellCheckerUI.overMisspelling;
|
||||
document.getElementById('spellCheckSuggestionsSeparator').hidden = !onMisspelling;
|
||||
document.getElementById('spellCheckAddToDictionary').hidden = !onMisspelling;
|
||||
document.getElementById('spellCheckIgnoreWord').hidden = !onMisspelling;
|
||||
var separator = document.getElementById('spellCheckAddSep');
|
||||
separator.hidden = !onMisspelling;
|
||||
document.getElementById('spellCheckNoSuggestions').hidden = !onMisspelling ||
|
||||
InlineSpellCheckerUI.addSuggestionsToMenu(contextMenuNode, separator, 5);
|
||||
|
||||
// Setup object property menuitem
|
||||
var objectName = InitObjectPropertiesMenuitem("objectProperties_cm");
|
||||
var isInLink = objectName == "href";
|
||||
@ -130,6 +117,19 @@ function EditorFillContextMenu(event, contextMenuNode)
|
||||
ShowMenuItem("tableInsertMenu_cm", inCell);
|
||||
ShowMenuItem("tableSelectMenu_cm", inCell);
|
||||
ShowMenuItem("tableDeleteMenu_cm", inCell);
|
||||
|
||||
// if we have a mispelled word, show spellchecker context
|
||||
// menuitems as well as the usual context menu
|
||||
InlineSpellCheckerUI.clearSuggestionsFromMenu();
|
||||
InlineSpellCheckerUI.initFromEvent(document.popupRangeParent, document.popupRangeOffset);
|
||||
var onMisspelling = InlineSpellCheckerUI.overMisspelling;
|
||||
document.getElementById('spellCheckSuggestionsSeparator').hidden = !onMisspelling;
|
||||
document.getElementById('spellCheckAddToDictionary').hidden = !onMisspelling;
|
||||
document.getElementById('spellCheckIgnoreWord').hidden = !onMisspelling;
|
||||
var separator = document.getElementById('spellCheckAddSep');
|
||||
separator.hidden = !onMisspelling;
|
||||
document.getElementById('spellCheckNoSuggestions').hidden = !onMisspelling ||
|
||||
InlineSpellCheckerUI.addSuggestionsToMenu(contextMenuNode, separator, 5);
|
||||
}
|
||||
|
||||
function IsItemOrCommandEnabled( item )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user