зеркало из https://github.com/mozilla/pjs.git
Bug 354580 Add "Ignore word" to inline spellchecker used for editable elements for SM and conflicting accesskey for /browser
p=me r=neil/gavin.sharp sr=mscott
This commit is contained in:
Родитель
964d378a24
Коммит
8f88596186
|
@ -375,7 +375,7 @@
|
|||
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
|
||||
|
||||
<!ENTITY spellAddToDictionary.label "Add to dictionary">
|
||||
<!ENTITY spellAddToDictionary.accesskey "t">
|
||||
<!ENTITY spellAddToDictionary.accesskey "o">
|
||||
<!ENTITY spellEnable.label "Spell check this field">
|
||||
<!ENTITY spellEnable.accesskey "S">
|
||||
<!ENTITY spellNoSuggestions.label "(No spelling suggestions)">
|
||||
|
|
|
@ -75,10 +75,15 @@
|
|||
<menuitem id="spell-no-suggestions"
|
||||
disabled="true"
|
||||
label="&spellNoSuggestions.label;"/>
|
||||
<menuseparator id="spell-add-separator"/>
|
||||
<menuitem id="spell-add-to-dictionary"
|
||||
label="&spellAddToDictionary.label;"
|
||||
accesskey="&spellAddToDictionary.accesskey;"
|
||||
oncommand="InlineSpellCheckerUI.addToDictionary();"/>
|
||||
<menuitem id="spell-ignore-word"
|
||||
label="&spellIgnoreWord.label;"
|
||||
accesskey="&spellIgnoreWord.accesskey;"
|
||||
oncommand="InlineSpellCheckerUI.ignoreWord();"/>
|
||||
<menuseparator id="spell-suggestions-separator"/>
|
||||
<menuitem id="context-openlink"
|
||||
label="&openLinkCmd.label;"
|
||||
|
|
|
@ -230,12 +230,14 @@ nsContextMenu.prototype = {
|
|||
document.getElementById("spell-check-enabled").setAttribute("checked",
|
||||
InlineSpellCheckerUI.enabled);
|
||||
this.showItem("spell-add-to-dictionary", onMisspelling);
|
||||
this.showItem("spell-ignore-word", onMisspelling);
|
||||
|
||||
// suggestion list
|
||||
this.showItem("spell-add-separator", onMisspelling);
|
||||
this.showItem("spell-suggestions-separator", onMisspelling);
|
||||
if (onMisspelling) {
|
||||
var menu = document.getElementById("contentAreaContextMenu");
|
||||
var suggestionsSeparator = document.getElementById("spell-add-to-dictionary");
|
||||
var suggestionsSeparator = document.getElementById("spell-add-separator");
|
||||
var numsug = InlineSpellCheckerUI.addSuggestionsToMenu(menu, suggestionsSeparator, 5);
|
||||
this.showItem("spell-no-suggestions", numsug == 0);
|
||||
} else {
|
||||
|
|
|
@ -100,7 +100,9 @@
|
|||
<!ENTITY bidiSwitchTextDirectionItem.label "Switch Text Direction">
|
||||
<!ENTITY bidiSwitchTextDirectionItem.accesskey "w">
|
||||
<!ENTITY spellAddToDictionary.label "Add to dictionary">
|
||||
<!ENTITY spellAddToDictionary.accesskey "t">
|
||||
<!ENTITY spellAddToDictionary.accesskey "o">
|
||||
<!ENTITY spellIgnoreWord.label "Ignore word">
|
||||
<!ENTITY spellIgnoreWord.accesskey "w">
|
||||
<!ENTITY spellEnable.label "Spell check this field">
|
||||
<!ENTITY spellEnable.accesskey "S">
|
||||
<!ENTITY spellNoSuggestions.label "(No spelling suggestions)">
|
||||
|
|
|
@ -279,5 +279,9 @@ var InlineSpellCheckerUI = {
|
|||
addToDictionary: function()
|
||||
{
|
||||
this.mInlineSpellChecker.addWordToDictionary(this.mMisspelling);
|
||||
},
|
||||
ignoreWord: function()
|
||||
{
|
||||
this.mInlineSpellChecker.ignoreWord(this.mMisspelling);
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче