зеркало из https://github.com/mozilla/pjs.git
Fixed bugs 6278, 9758, 17014, 17071, 17160. r=sfraser,mjudge
This commit is contained in:
Родитель
6f8e40e9a3
Коммит
712a9be961
|
@ -1151,10 +1151,11 @@ nsEditorShell::Open()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditorShell::CheckAndSaveDocument(PRBool *_retval)
|
||||
nsEditorShell::CheckAndSaveDocument(const PRUnichar *reasonToSave, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
nsAutoString ReasonToSave(reasonToSave);
|
||||
nsCOMPtr<nsIDOMDocument> theDoc;
|
||||
nsresult rv = GetEditorDocument(getter_AddRefs(theDoc));
|
||||
if (NS_SUCCEEDED(rv) && theDoc)
|
||||
|
@ -1175,7 +1176,16 @@ nsEditorShell::CheckAndSaveDocument(PRBool *_retval)
|
|||
nsAutoString tmp2 = GetString("DontSave");
|
||||
nsAutoString title;
|
||||
GetDocumentTitle(title);
|
||||
nsAutoString saveMsg = GetString("SaveFilePrompt")+" "+"\""+title+"\""+GetString("QuestionMark");
|
||||
nsAutoString saveMsg = GetString("SaveFilePrompt")+" "+"\""+title+"\"";
|
||||
if (ReasonToSave.Length() > 0)
|
||||
{
|
||||
saveMsg += " ";
|
||||
saveMsg += ReasonToSave;
|
||||
saveMsg += GetString("QuestionMark");
|
||||
} else {
|
||||
saveMsg += GetString("QuestionMark");
|
||||
}
|
||||
|
||||
EConfirmResult result = ConfirmWithCancel(GetString("SaveDocument"), saveMsg,
|
||||
&tmp1, &tmp2);
|
||||
if (result == eCancel)
|
||||
|
@ -1234,8 +1244,8 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
nsString title;
|
||||
res = HTMLDoc->GetTitle(title);
|
||||
|
||||
// Prompt for title ONLY for a new blank doc (no filespec yet)
|
||||
if (noFileSpec && NS_SUCCEEDED(res) && title.Length() == 0)
|
||||
// Prompt for title if it's empty or user selected "Save As"
|
||||
if (NS_SUCCEEDED(res) && (saveAs || title.Length() == 0))
|
||||
{
|
||||
// Use a "prompt" common dialog to get title string from user
|
||||
NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &res);
|
||||
|
@ -1246,7 +1256,7 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
nsAutoString msg = GetString("NeedDocTitle");
|
||||
PRBool retVal = PR_FALSE;
|
||||
res = dialog->Prompt(mContentWindow, caption.GetUnicode(), msg.GetUnicode(),
|
||||
nsnull, &titleUnicode, &retVal);
|
||||
title.GetUnicode(), &titleUnicode, &retVal);
|
||||
|
||||
if( retVal == PR_FALSE)
|
||||
{
|
||||
|
@ -1277,13 +1287,13 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
nsAutoString fileName;
|
||||
nsFileSpec parentPath;
|
||||
|
||||
titles = new nsString[2];
|
||||
titles = new nsString[3];
|
||||
if (!titles)
|
||||
{
|
||||
res = NS_ERROR_OUT_OF_MEMORY;
|
||||
goto SkipFilters;
|
||||
}
|
||||
filters = new nsString[2];
|
||||
filters = new nsString[3];
|
||||
if (!filters)
|
||||
{
|
||||
res = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -1301,7 +1311,9 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
*nextFilter++ = "*.htm; *.html; *.shtml";
|
||||
*nextTitle++ = TextFiles;
|
||||
*nextFilter++ = "*.txt";
|
||||
fileWidget->SetFilterList(2, titles, filters);
|
||||
*nextTitle++ = GetString("AllFiles");
|
||||
*nextFilter++ = "*.*";
|
||||
fileWidget->SetFilterList(3, titles, filters);
|
||||
|
||||
if (noFileSpec)
|
||||
{
|
||||
|
@ -1313,14 +1325,14 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
PRUnichar dot = (PRUnichar)'.';
|
||||
PRUnichar bslash = (PRUnichar)'\\';
|
||||
PRUnichar fslash = (PRUnichar)'/';
|
||||
PRUnichar amp = (PRUnichar)'@';
|
||||
PRUnichar at = (PRUnichar)'@';
|
||||
PRUnichar colon = (PRUnichar)':';
|
||||
PRUnichar underscore = (PRUnichar)'_';
|
||||
title = title.ReplaceChar(space, underscore);
|
||||
title = title.ReplaceChar(dot, underscore);
|
||||
title = title.ReplaceChar(bslash, underscore);
|
||||
title = title.ReplaceChar(fslash, underscore);
|
||||
title = title.ReplaceChar(amp, underscore);
|
||||
title = title.ReplaceChar(at, underscore);
|
||||
title = title.ReplaceChar(colon, underscore);
|
||||
fileName = title + nsString(".html");
|
||||
}
|
||||
|
@ -1405,7 +1417,7 @@ nsEditorShell::CloseWindow()
|
|||
{
|
||||
nsresult rv = NS_OK;
|
||||
PRBool result;
|
||||
rv = CheckAndSaveDocument(&result);
|
||||
rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),&result);
|
||||
|
||||
// Don't close the window if there was an error saving file or
|
||||
// user canceled an action along the way
|
||||
|
@ -1436,7 +1448,7 @@ NS_IMETHODIMP
|
|||
nsEditorShell::Exit()
|
||||
{
|
||||
PRBool result;
|
||||
nsresult rv = CheckAndSaveDocument(&result);
|
||||
nsresult rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),&result);
|
||||
// Don't shutdown if there was an error saving file or
|
||||
// user canceled an action along the way
|
||||
if (NS_SUCCEEDED(rv) && result)
|
||||
|
@ -1455,9 +1467,9 @@ nsEditorShell::Exit()
|
|||
NS_IMETHODIMP
|
||||
nsEditorShell::GetLocalFileURL(nsIDOMWindow *parent, const PRUnichar *filterType, PRUnichar **_retval)
|
||||
{
|
||||
nsAutoString aFilterType(filterType);
|
||||
PRBool htmlFilter = aFilterType.EqualsIgnoreCase("html");
|
||||
PRBool imgFilter = aFilterType.EqualsIgnoreCase("img");
|
||||
nsAutoString FilterType(filterType);
|
||||
PRBool htmlFilter = FilterType.EqualsIgnoreCase("html");
|
||||
PRBool imgFilter = FilterType.EqualsIgnoreCase("img");
|
||||
|
||||
*_retval = nsnull;
|
||||
|
||||
|
@ -2475,7 +2487,7 @@ nsEditorShell::GetDocumentLength(PRInt32 *aDocumentLength)
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditorShell::InsertList(const PRUnichar *listType)
|
||||
nsEditorShell::MakeOrChangeList(const PRUnichar *listType)
|
||||
{
|
||||
nsresult err = NS_NOINTERFACE;
|
||||
|
||||
|
@ -2484,14 +2496,24 @@ nsEditorShell::InsertList(const PRUnichar *listType)
|
|||
switch (mEditorType)
|
||||
{
|
||||
case eHTMLTextEditorType:
|
||||
err = mEditor->InsertList(aListType);
|
||||
if (aListType == "")
|
||||
{
|
||||
err = mEditor->RemoveList("ol");
|
||||
if(NS_SUCCEEDED(err))
|
||||
{
|
||||
err = mEditor->RemoveList("ul");
|
||||
if(NS_SUCCEEDED(err))
|
||||
err = mEditor->RemoveList("dl");
|
||||
}
|
||||
}
|
||||
else
|
||||
err = mEditor->MakeOrChangeList(aListType);
|
||||
break;
|
||||
|
||||
case ePlainTextEditorType:
|
||||
default:
|
||||
err = NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -2506,7 +2528,18 @@ nsEditorShell::RemoveList(const PRUnichar *listType)
|
|||
switch (mEditorType)
|
||||
{
|
||||
case eHTMLTextEditorType:
|
||||
err = mEditor->RemoveList(aListType);
|
||||
if (aListType == "")
|
||||
{
|
||||
err = mEditor->RemoveList("ol");
|
||||
if(NS_SUCCEEDED(err))
|
||||
{
|
||||
err = mEditor->RemoveList("ul");
|
||||
if(NS_SUCCEEDED(err))
|
||||
err = mEditor->RemoveList("dl");
|
||||
}
|
||||
}
|
||||
else
|
||||
err = mEditor->RemoveList(aListType);
|
||||
break;
|
||||
|
||||
case ePlainTextEditorType:
|
||||
|
|
|
@ -1695,9 +1695,12 @@ NS_IMETHODIMP nsHTMLEditor::SetParagraphFormat(const nsString& aParagraphFormat)
|
|||
{
|
||||
res = InsertBasicBlock("p");
|
||||
}
|
||||
//XXX: TODO: Do we really want to support setting list types here?
|
||||
// If yes, we need to add "dd", "dt" for <dl> support
|
||||
else if (tag == "li")
|
||||
{
|
||||
res = InsertList("ul");
|
||||
//XXX: Why do we assume "ul" What about "ol"? This will change an OL into a UL list!
|
||||
res = MakeOrChangeList("ul");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1949,7 +1952,7 @@ nsHTMLEditor::RemoveParent(const nsString &aParentTag)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditor::InsertList(const nsString& aListType)
|
||||
nsHTMLEditor::MakeOrChangeList(const nsString& aListType)
|
||||
{
|
||||
nsresult res;
|
||||
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
NS_IMETHOD ReplaceBlockParent(nsString& aParentTag);
|
||||
NS_IMETHOD RemoveParent(const nsString &aParentTag);
|
||||
|
||||
NS_IMETHOD InsertList(const nsString& aListType);
|
||||
NS_IMETHOD MakeOrChangeList(const nsString& aListType);
|
||||
NS_IMETHOD RemoveList(const nsString& aListType);
|
||||
NS_IMETHOD InsertBasicBlock(const nsString& aBlockType);
|
||||
NS_IMETHOD Indent(const nsString& aIndent);
|
||||
|
|
|
@ -488,7 +488,7 @@ nsHTMLEditorLog::SetBodyAttribute(const nsString& aAttr, const nsString& aValue)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditorLog::InsertList(const nsString& aListType)
|
||||
nsHTMLEditorLog::MakeOrChangeList(const nsString& aListType)
|
||||
{
|
||||
nsAutoHTMLEditorLogLock logLock(this);
|
||||
|
||||
|
@ -496,13 +496,13 @@ nsHTMLEditorLog::InsertList(const nsString& aListType)
|
|||
{
|
||||
PrintSelection();
|
||||
|
||||
Write("window.editorShell.InsertList(\"");
|
||||
Write("window.editorShell.MakeOrChangeList(\"");
|
||||
PrintUnicode(aListType);
|
||||
Write("\");\n");
|
||||
Flush();
|
||||
}
|
||||
|
||||
return nsHTMLEditor::InsertList(aListType);
|
||||
return nsHTMLEditor::MakeOrChangeList(aListType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
NS_IMETHOD SetBackgroundColor(const nsString& aColor);
|
||||
NS_IMETHOD SetBodyAttribute(const nsString& aAttr, const nsString& aValue);
|
||||
NS_IMETHOD InsertList(const nsString& aListType);
|
||||
NS_IMETHOD MakeOrChangeList(const nsString& aListType);
|
||||
NS_IMETHOD Indent(const nsString& aIndent);
|
||||
NS_IMETHOD Align(const nsString& aAlign);
|
||||
NS_IMETHOD InsertElementAtSelection(nsIDOMElement* aElement, PRBool aDeleteSelection);
|
||||
|
|
|
@ -1151,10 +1151,11 @@ nsEditorShell::Open()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditorShell::CheckAndSaveDocument(PRBool *_retval)
|
||||
nsEditorShell::CheckAndSaveDocument(const PRUnichar *reasonToSave, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
nsAutoString ReasonToSave(reasonToSave);
|
||||
nsCOMPtr<nsIDOMDocument> theDoc;
|
||||
nsresult rv = GetEditorDocument(getter_AddRefs(theDoc));
|
||||
if (NS_SUCCEEDED(rv) && theDoc)
|
||||
|
@ -1175,7 +1176,16 @@ nsEditorShell::CheckAndSaveDocument(PRBool *_retval)
|
|||
nsAutoString tmp2 = GetString("DontSave");
|
||||
nsAutoString title;
|
||||
GetDocumentTitle(title);
|
||||
nsAutoString saveMsg = GetString("SaveFilePrompt")+" "+"\""+title+"\""+GetString("QuestionMark");
|
||||
nsAutoString saveMsg = GetString("SaveFilePrompt")+" "+"\""+title+"\"";
|
||||
if (ReasonToSave.Length() > 0)
|
||||
{
|
||||
saveMsg += " ";
|
||||
saveMsg += ReasonToSave;
|
||||
saveMsg += GetString("QuestionMark");
|
||||
} else {
|
||||
saveMsg += GetString("QuestionMark");
|
||||
}
|
||||
|
||||
EConfirmResult result = ConfirmWithCancel(GetString("SaveDocument"), saveMsg,
|
||||
&tmp1, &tmp2);
|
||||
if (result == eCancel)
|
||||
|
@ -1234,8 +1244,8 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
nsString title;
|
||||
res = HTMLDoc->GetTitle(title);
|
||||
|
||||
// Prompt for title ONLY for a new blank doc (no filespec yet)
|
||||
if (noFileSpec && NS_SUCCEEDED(res) && title.Length() == 0)
|
||||
// Prompt for title if it's empty or user selected "Save As"
|
||||
if (NS_SUCCEEDED(res) && (saveAs || title.Length() == 0))
|
||||
{
|
||||
// Use a "prompt" common dialog to get title string from user
|
||||
NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &res);
|
||||
|
@ -1246,7 +1256,7 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
nsAutoString msg = GetString("NeedDocTitle");
|
||||
PRBool retVal = PR_FALSE;
|
||||
res = dialog->Prompt(mContentWindow, caption.GetUnicode(), msg.GetUnicode(),
|
||||
nsnull, &titleUnicode, &retVal);
|
||||
title.GetUnicode(), &titleUnicode, &retVal);
|
||||
|
||||
if( retVal == PR_FALSE)
|
||||
{
|
||||
|
@ -1277,13 +1287,13 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
nsAutoString fileName;
|
||||
nsFileSpec parentPath;
|
||||
|
||||
titles = new nsString[2];
|
||||
titles = new nsString[3];
|
||||
if (!titles)
|
||||
{
|
||||
res = NS_ERROR_OUT_OF_MEMORY;
|
||||
goto SkipFilters;
|
||||
}
|
||||
filters = new nsString[2];
|
||||
filters = new nsString[3];
|
||||
if (!filters)
|
||||
{
|
||||
res = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -1301,7 +1311,9 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
*nextFilter++ = "*.htm; *.html; *.shtml";
|
||||
*nextTitle++ = TextFiles;
|
||||
*nextFilter++ = "*.txt";
|
||||
fileWidget->SetFilterList(2, titles, filters);
|
||||
*nextTitle++ = GetString("AllFiles");
|
||||
*nextFilter++ = "*.*";
|
||||
fileWidget->SetFilterList(3, titles, filters);
|
||||
|
||||
if (noFileSpec)
|
||||
{
|
||||
|
@ -1313,14 +1325,14 @@ nsEditorShell::SaveDocument(PRBool saveAs, PRBool saveCopy, PRBool *_retval)
|
|||
PRUnichar dot = (PRUnichar)'.';
|
||||
PRUnichar bslash = (PRUnichar)'\\';
|
||||
PRUnichar fslash = (PRUnichar)'/';
|
||||
PRUnichar amp = (PRUnichar)'@';
|
||||
PRUnichar at = (PRUnichar)'@';
|
||||
PRUnichar colon = (PRUnichar)':';
|
||||
PRUnichar underscore = (PRUnichar)'_';
|
||||
title = title.ReplaceChar(space, underscore);
|
||||
title = title.ReplaceChar(dot, underscore);
|
||||
title = title.ReplaceChar(bslash, underscore);
|
||||
title = title.ReplaceChar(fslash, underscore);
|
||||
title = title.ReplaceChar(amp, underscore);
|
||||
title = title.ReplaceChar(at, underscore);
|
||||
title = title.ReplaceChar(colon, underscore);
|
||||
fileName = title + nsString(".html");
|
||||
}
|
||||
|
@ -1405,7 +1417,7 @@ nsEditorShell::CloseWindow()
|
|||
{
|
||||
nsresult rv = NS_OK;
|
||||
PRBool result;
|
||||
rv = CheckAndSaveDocument(&result);
|
||||
rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),&result);
|
||||
|
||||
// Don't close the window if there was an error saving file or
|
||||
// user canceled an action along the way
|
||||
|
@ -1436,7 +1448,7 @@ NS_IMETHODIMP
|
|||
nsEditorShell::Exit()
|
||||
{
|
||||
PRBool result;
|
||||
nsresult rv = CheckAndSaveDocument(&result);
|
||||
nsresult rv = CheckAndSaveDocument(GetString("BeforeClosing").GetUnicode(),&result);
|
||||
// Don't shutdown if there was an error saving file or
|
||||
// user canceled an action along the way
|
||||
if (NS_SUCCEEDED(rv) && result)
|
||||
|
@ -1455,9 +1467,9 @@ nsEditorShell::Exit()
|
|||
NS_IMETHODIMP
|
||||
nsEditorShell::GetLocalFileURL(nsIDOMWindow *parent, const PRUnichar *filterType, PRUnichar **_retval)
|
||||
{
|
||||
nsAutoString aFilterType(filterType);
|
||||
PRBool htmlFilter = aFilterType.EqualsIgnoreCase("html");
|
||||
PRBool imgFilter = aFilterType.EqualsIgnoreCase("img");
|
||||
nsAutoString FilterType(filterType);
|
||||
PRBool htmlFilter = FilterType.EqualsIgnoreCase("html");
|
||||
PRBool imgFilter = FilterType.EqualsIgnoreCase("img");
|
||||
|
||||
*_retval = nsnull;
|
||||
|
||||
|
@ -2475,7 +2487,7 @@ nsEditorShell::GetDocumentLength(PRInt32 *aDocumentLength)
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditorShell::InsertList(const PRUnichar *listType)
|
||||
nsEditorShell::MakeOrChangeList(const PRUnichar *listType)
|
||||
{
|
||||
nsresult err = NS_NOINTERFACE;
|
||||
|
||||
|
@ -2484,14 +2496,24 @@ nsEditorShell::InsertList(const PRUnichar *listType)
|
|||
switch (mEditorType)
|
||||
{
|
||||
case eHTMLTextEditorType:
|
||||
err = mEditor->InsertList(aListType);
|
||||
if (aListType == "")
|
||||
{
|
||||
err = mEditor->RemoveList("ol");
|
||||
if(NS_SUCCEEDED(err))
|
||||
{
|
||||
err = mEditor->RemoveList("ul");
|
||||
if(NS_SUCCEEDED(err))
|
||||
err = mEditor->RemoveList("dl");
|
||||
}
|
||||
}
|
||||
else
|
||||
err = mEditor->MakeOrChangeList(aListType);
|
||||
break;
|
||||
|
||||
case ePlainTextEditorType:
|
||||
default:
|
||||
err = NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -2506,7 +2528,18 @@ nsEditorShell::RemoveList(const PRUnichar *listType)
|
|||
switch (mEditorType)
|
||||
{
|
||||
case eHTMLTextEditorType:
|
||||
err = mEditor->RemoveList(aListType);
|
||||
if (aListType == "")
|
||||
{
|
||||
err = mEditor->RemoveList("ol");
|
||||
if(NS_SUCCEEDED(err))
|
||||
{
|
||||
err = mEditor->RemoveList("ul");
|
||||
if(NS_SUCCEEDED(err))
|
||||
err = mEditor->RemoveList("dl");
|
||||
}
|
||||
}
|
||||
else
|
||||
err = mEditor->RemoveList(aListType);
|
||||
break;
|
||||
|
||||
case ePlainTextEditorType:
|
||||
|
|
|
@ -114,8 +114,11 @@ interface nsIEditorShell : nsISupports
|
|||
* return value:
|
||||
* false ONLY if user executed "Cancel" in the SaveAs dialog
|
||||
* true if no changes in doc, or file was saved successfully
|
||||
* @param reasonToSave
|
||||
* A string to append after "Save changes to <URL>"
|
||||
* If null, just the question mark will be appended
|
||||
*/
|
||||
boolean CheckAndSaveDocument();
|
||||
boolean CheckAndSaveDocument(in wstring reasonToSave);
|
||||
|
||||
void CloseWindow();
|
||||
void Print();
|
||||
|
@ -158,7 +161,7 @@ interface nsIEditorShell : nsISupports
|
|||
void InsertSource(in wstring textToInsert);
|
||||
void InsertBreak();
|
||||
|
||||
void InsertList(in wstring listType);
|
||||
void MakeOrChangeList(in wstring listType);
|
||||
void RemoveList(in wstring listType);
|
||||
void Indent(in wstring indent);
|
||||
void Align(in wstring align);
|
||||
|
|
|
@ -1695,9 +1695,12 @@ NS_IMETHODIMP nsHTMLEditor::SetParagraphFormat(const nsString& aParagraphFormat)
|
|||
{
|
||||
res = InsertBasicBlock("p");
|
||||
}
|
||||
//XXX: TODO: Do we really want to support setting list types here?
|
||||
// If yes, we need to add "dd", "dt" for <dl> support
|
||||
else if (tag == "li")
|
||||
{
|
||||
res = InsertList("ul");
|
||||
//XXX: Why do we assume "ul" What about "ol"? This will change an OL into a UL list!
|
||||
res = MakeOrChangeList("ul");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1949,7 +1952,7 @@ nsHTMLEditor::RemoveParent(const nsString &aParentTag)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditor::InsertList(const nsString& aListType)
|
||||
nsHTMLEditor::MakeOrChangeList(const nsString& aListType)
|
||||
{
|
||||
nsresult res;
|
||||
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
NS_IMETHOD ReplaceBlockParent(nsString& aParentTag);
|
||||
NS_IMETHOD RemoveParent(const nsString &aParentTag);
|
||||
|
||||
NS_IMETHOD InsertList(const nsString& aListType);
|
||||
NS_IMETHOD MakeOrChangeList(const nsString& aListType);
|
||||
NS_IMETHOD RemoveList(const nsString& aListType);
|
||||
NS_IMETHOD InsertBasicBlock(const nsString& aBlockType);
|
||||
NS_IMETHOD Indent(const nsString& aIndent);
|
||||
|
|
|
@ -488,7 +488,7 @@ nsHTMLEditorLog::SetBodyAttribute(const nsString& aAttr, const nsString& aValue)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLEditorLog::InsertList(const nsString& aListType)
|
||||
nsHTMLEditorLog::MakeOrChangeList(const nsString& aListType)
|
||||
{
|
||||
nsAutoHTMLEditorLogLock logLock(this);
|
||||
|
||||
|
@ -496,13 +496,13 @@ nsHTMLEditorLog::InsertList(const nsString& aListType)
|
|||
{
|
||||
PrintSelection();
|
||||
|
||||
Write("window.editorShell.InsertList(\"");
|
||||
Write("window.editorShell.MakeOrChangeList(\"");
|
||||
PrintUnicode(aListType);
|
||||
Write("\");\n");
|
||||
Flush();
|
||||
}
|
||||
|
||||
return nsHTMLEditor::InsertList(aListType);
|
||||
return nsHTMLEditor::MakeOrChangeList(aListType);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
NS_IMETHOD SetBackgroundColor(const nsString& aColor);
|
||||
NS_IMETHOD SetBodyAttribute(const nsString& aAttr, const nsString& aValue);
|
||||
NS_IMETHOD InsertList(const nsString& aListType);
|
||||
NS_IMETHOD MakeOrChangeList(const nsString& aListType);
|
||||
NS_IMETHOD Indent(const nsString& aIndent);
|
||||
NS_IMETHOD Align(const nsString& aAlign);
|
||||
NS_IMETHOD InsertElementAtSelection(nsIDOMElement* aElement, PRBool aDeleteSelection);
|
||||
|
|
|
@ -283,7 +283,7 @@ public:
|
|||
* Document me!
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD InsertList(const nsString& aListType)=0;
|
||||
NS_IMETHOD MakeOrChangeList(const nsString& aListType)=0;
|
||||
|
||||
/**
|
||||
* Document me!
|
||||
|
|
|
@ -243,20 +243,12 @@ function EditorOpen()
|
|||
|
||||
function EditorNewPlaintext()
|
||||
{
|
||||
dump("In EditorNewPlaintext..\n");
|
||||
window.openDialog( "chrome://editor/content/TextEditorAppShell.xul",
|
||||
"_blank",
|
||||
"chrome,dialog=no,all",
|
||||
"chrome://editor/content/EditorInitPagePlain.html" );
|
||||
"chrome://editor/content/EditorInitPagePlain.html");
|
||||
}
|
||||
|
||||
function EditorNewBrowser()
|
||||
{
|
||||
dump("In EditorNewBrowser..\n");
|
||||
window.open( "chrome://navigator/content/", "_blank", "chrome" );
|
||||
}
|
||||
|
||||
|
||||
function EditorSave()
|
||||
{
|
||||
dump("In EditorSave...\n");
|
||||
|
@ -392,11 +384,6 @@ function EditorListProperties()
|
|||
contentWindow.focus();
|
||||
}
|
||||
|
||||
function EditorSetListStyle(listType)
|
||||
{
|
||||
// Write me! Replace EditorInsertList when working?
|
||||
}
|
||||
|
||||
function EditorSetFontSize(size)
|
||||
{
|
||||
if( size == "0" || size == "normal" ||
|
||||
|
@ -469,7 +456,7 @@ function EditorToggleStyle(styleName)
|
|||
// which is the appropriate button
|
||||
// cmanske: I don't think we should depend on button state!
|
||||
// (this won't work for other list styles, anyway)
|
||||
// We need to get list type from document (See EditorSetListStyle)
|
||||
// We need to get list type from document
|
||||
var theButton = document.getElementById(styleName + "Button");
|
||||
dump("Toggling style " + styleName + "\n");
|
||||
if (theButton)
|
||||
|
@ -744,7 +731,7 @@ function EditorDeleteTableCell()
|
|||
contentWindow.focus();
|
||||
}
|
||||
|
||||
function EditorInsertList(listType)
|
||||
function EditorMakeOrChangeList(listType)
|
||||
{
|
||||
// check the observer node,
|
||||
// which is the appropriate button
|
||||
|
@ -759,7 +746,7 @@ function EditorInsertList(listType)
|
|||
editorShell.RemoveList(listType);
|
||||
}
|
||||
else
|
||||
editorShell.InsertList(listType);
|
||||
editorShell.MakeOrChangeList(listType);
|
||||
|
||||
contentWindow.focus();
|
||||
}
|
||||
|
|
|
@ -28,8 +28,9 @@
|
|||
*/
|
||||
|
||||
a[name] {
|
||||
/* TEMPORARY TO COMPENSATE FOR BUG */
|
||||
padding-left: 20px;
|
||||
background: url(chrome://editor/skin/images/anchor.gif) 5px 50% no-repeat;
|
||||
background: url(chrome://editor/skin/images/anchor.gif);
|
||||
}
|
||||
|
||||
table {
|
||||
|
|
|
@ -30,10 +30,12 @@
|
|||
|
||||
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorAppShell.dtd">
|
||||
|
||||
<!-- NOTE: If we don't have "title" set, text editor doesn't work! -->
|
||||
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="TextEditorOnLoad()"
|
||||
onunload="EditorShutdown()"
|
||||
onunload="EditorShutdown()"
|
||||
title="&textEditorWindow.titlemodifier;"
|
||||
titlemodifier="&textEditorWindow.titlemodifier;"
|
||||
titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
|
||||
align="vertical"
|
||||
|
|
|
@ -165,6 +165,7 @@
|
|||
<broadcaster id="Editor:InsertHTML" value="&insertHTMLSourceCmd.label;" disabled="false" oncommand="EditorInsertHTML()"/>
|
||||
<broadcaster id="Editor:InsertBreak" value="&insertLineBreakCmd.label;" disabled="false" oncommand="_EditorNotImplemented()"/>
|
||||
<broadcaster id="Editor:InsertBreakAll" value="&insertBreakBelowImagesCmd.label;" disabled="false" oncommand="_EditorNotImplemented()"/>
|
||||
<broadcaster id="cmd_preferences"/>
|
||||
</broadcasterset>
|
||||
|
||||
<!-- Editor menu items -->
|
||||
|
@ -215,6 +216,9 @@
|
|||
<menuitem accesskey="&editfindnext.accesskey;" key="findnextkb" observes="Editor:FindNext"/>
|
||||
<menuseparator />
|
||||
<menuitem accesskey="&editcheckspelling.accesskey;" key="checkspellingkb" observes="Editor:CheckSpelling"/>
|
||||
<menuseparator />
|
||||
<!-- TODO: PREF PANELS FOR EDITOR. Replace pref-publish with pref-editor -->
|
||||
<menuitem id="menu_preferences" oncommand="goPreferences('navigator.xul', 'chrome://pref/content/pref-publish.xul')"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
|
@ -496,17 +500,6 @@
|
|||
<!-- List Style (opens dialog) -->
|
||||
<menuitem id="listProps" value="&listProps.label;" accesskey="&formatlistmenu.accesskey;" oncommand="EditorListProperties()"/>
|
||||
|
||||
<!-- We used a menu in 4.x, but we had list stuff in Paragraph Properties
|
||||
Since we killed that, make list item bring up new List Properties dialog
|
||||
<menu id="listMenu" value="&listMenu.label;" accesskey="&formatlistmenu.accesskey;">
|
||||
<menupopup>
|
||||
<menuitem value="&listNoneCmd.label;" accesskey="&listnone.accesskey;" oncommand="EditorSetListStyle('')"/>
|
||||
<menuitem value="&listBullettedCmd.label;" accesskey="&listbulletted.accesskey;" oncommand="EditorSetListStyle('ul')"/>
|
||||
<menuitem value="&listNumberedCmd.label;" accesskey="&listnumbered.accesskey;" oncommand="EditorSetListStyle('ol')"/>
|
||||
<menuitem value="&listDefinitionCmd.label;" accesskey="&listdefinition.accesskey;" oncommand="EditorSetListStyle('dl')"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
-->
|
||||
<!-- Stylesheet submenu -->
|
||||
<menu id="stylesheetMenu" value="&stylesheetMenu.label;" accesskey="&formatstylesheetmenu.accesskey;">
|
||||
<menupopup>
|
||||
|
@ -657,11 +650,11 @@
|
|||
<observes element="Editor:Underline" attribute="underline" onbroadcast="onStyleChange('underline')"/>
|
||||
</titledbutton>
|
||||
|
||||
<titledbutton id="ulButton" src="&bulletListIcon.url;" align="bottom" onclick="EditorInsertList('ul')">
|
||||
<titledbutton id="ulButton" src="&bulletListIcon.url;" align="bottom" onclick="EditorMakeOrChangeList('ul')">
|
||||
<observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ul')"/>
|
||||
</titledbutton>
|
||||
|
||||
<titledbutton id="olButton" src="&numberListIcon.url;" align="bottom" onclick="EditorInsertList('ol')">
|
||||
<titledbutton id="olButton" src="&numberListIcon.url;" align="bottom" onclick="EditorMakeOrChangeList('ol')">
|
||||
<observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ol')"/>
|
||||
</titledbutton>
|
||||
|
||||
|
@ -673,7 +666,8 @@
|
|||
<!-- DEBUG only -->
|
||||
<menu id="debugMenu" value="&debugMenu.label;">
|
||||
<menupopup>
|
||||
<menuitem value="Composer with Test Page" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
|
||||
<menuitem value="&newEditorTestPage.label;" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
|
||||
<menuitem value="&textEditorCmd.label;" oncommand="EditorNewPlaintext();" />
|
||||
<menuitem value="&outputTextCmd.label;"
|
||||
oncommand="EditorGetText()"/>
|
||||
<menuitem value="&outputHTMLCmd.label;"
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#
|
||||
# moved from content/
|
||||
#
|
||||
# Note: embeded "\n" translate into breaks (<br>)
|
||||
# Don't tranalate!!!
|
||||
#
|
||||
Yes=Yes
|
||||
No=No
|
||||
Cancel=Cancel
|
||||
|
@ -8,6 +11,7 @@ Save=Save
|
|||
DontSave=Don't Save
|
||||
More=More
|
||||
Fewer=Fewer
|
||||
Less=Less
|
||||
None=None
|
||||
none=none
|
||||
OpenHTMLFile=Open HTML File
|
||||
|
@ -26,10 +30,11 @@ IMGFiles=Image Files
|
|||
TextFiles=Text Files
|
||||
AllFiles=All Files
|
||||
SaveFilePrompt=Save changes to
|
||||
BeforeClosing=\nbefore closing
|
||||
QuestionMark=?
|
||||
SaveFileFailed=Saving file failed!
|
||||
DocumentTitle=Document Title
|
||||
NeedDocTitle=Enter a title for the current page./nThe title identifies the page in the window title and bookmarks.
|
||||
NeedDocTitle=Enter a title for the current page.\/nThe title identifies the page in the window title and bookmarks.
|
||||
AttributesFor=Current attributes for:
|
||||
MissingImageError=Please enter or choose an image<br>of type gif, jpg or png.
|
||||
EmptyHREFError=You must enter or choose<br>a location (URL) to create a new link.
|
||||
|
@ -44,7 +49,7 @@ DuplicateAnchorNameError=already exists in this page.<br>Please enter a differen
|
|||
BulletStyle=Bullet Style:
|
||||
SolidCircle=Solid circle
|
||||
OpenCircle=Open circle
|
||||
OpenSquare=Open square
|
||||
SolidSquare=Solid square
|
||||
NumberStyle=Number Style:
|
||||
Automatic=Automatic
|
||||
Style_1=1,2,3...
|
||||
|
@ -57,6 +62,5 @@ Percent=percent
|
|||
PercentOfCell=% of cell
|
||||
PercentOfWindow=% of window
|
||||
untitled=untitled
|
||||
ComposerCaptionSuffix=- Composer
|
||||
NoNamedAnchors=(No named anchors in this page)
|
||||
NoHeadings=(No headings in this page)
|
||||
NoHeadings=(No headings without anchors)
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
<!ENTITY paragraphdesc.accesskey "d">
|
||||
|
||||
<!-- List menu items -->
|
||||
<!ENTITY listProps.label "List">
|
||||
<!ENTITY listProps.label "List...">
|
||||
<!ENTITY formatlistmenu.accesskey "l">
|
||||
<!ENTITY listNoneCmd.label "None">
|
||||
<!ENTITY listnone.accesskey "o">
|
||||
|
@ -391,6 +391,8 @@
|
|||
|
||||
<!-- debug menu items -->
|
||||
<!ENTITY debugMenu.label "Debug">
|
||||
<!ENTITY newEditorTestPage.label "Composer with Test Page">
|
||||
<!ENTITY textEditorCmd.label "Plaintext Editor">
|
||||
<!ENTITY outputTextCmd.label "Output Text">
|
||||
<!ENTITY outputHTMLCmd.label "Output HTML">
|
||||
<!ENTITY outputXIFCmd.label "Output XIF">
|
||||
|
|
|
@ -36,23 +36,18 @@
|
|||
align="vertical" flex="100%">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js">
|
||||
</script>
|
||||
<script language="JavaScript" src="chrome://editor/content/EdInsSrc.js">
|
||||
</script>
|
||||
<script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
|
||||
<script language="JavaScript" src="chrome://editor/content/EdInsSrc.js"/>
|
||||
<script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
|
||||
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
<xul:keyset id="keyset"/>
|
||||
|
||||
<xul:box>
|
||||
<label id="srcMessage"/>
|
||||
</xul:box>
|
||||
<xul:box>
|
||||
<textarea rows="6" cols="50" id="srcInput" />
|
||||
</xul:box>
|
||||
|
||||
<xul:spring flex="100%"/>
|
||||
<label id="srcMessage" for="srcInput">&sourceEditField.label;</label>
|
||||
<textarea rows="6" cols="50" id="srcInput" />
|
||||
<div>&example.label;</div>
|
||||
<xul:spring class="spacer"/>
|
||||
<div class="separator" align="horizontal"/>
|
||||
<!-- from global dialogOverlay -->
|
||||
<xul:box id="okCancelButtons"/>
|
||||
</xul:window>
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<label for="border"> &borderEditField.label; </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="borderInput" size="4" onkeyup="forceInteger('border')"/>
|
||||
<input type="text" id="borderInput" size="4" onkeyup="forceInteger('borderInput')"/>
|
||||
</td>
|
||||
<!-- THIS IS DUMB Can't figure out how to put "pixels" after the
|
||||
input box and make them center vertically. Used another TD instead -->
|
||||
|
|
|
@ -34,6 +34,10 @@ var NamedAnchorList = 0;
|
|||
var HNodeArray;
|
||||
var haveNamedAnchors = false;
|
||||
var haveHeadings = false;
|
||||
var MoreSection;
|
||||
var MoreFewerButton;
|
||||
var SeeMore = false;
|
||||
var AdvancedEditSection;
|
||||
|
||||
// NOTE: Use "href" instead of "a" to distinguish from Named Anchor
|
||||
// The returned node is has an "a" tagName
|
||||
|
@ -54,6 +58,9 @@ function Startup()
|
|||
hrefInput = document.getElementById("hrefInput");
|
||||
NamedAnchorList = document.getElementById("NamedAnchorList");
|
||||
HeadingsList = document.getElementById("HeadingsList");
|
||||
MoreSection = document.getElementById("MoreSection");
|
||||
MoreFewerButton = document.getElementById("MoreFewerButton");
|
||||
AdvancedEditSection = document.getElementById("AdvancedEditButton");
|
||||
|
||||
// Get a single selected anchor element
|
||||
anchorElement = editorShell.GetSelectedElement(tagName);
|
||||
|
@ -165,8 +172,10 @@ function Startup()
|
|||
linkTextInput = null;
|
||||
}
|
||||
}
|
||||
|
||||
window.sizeToContent();
|
||||
//TODO; We should get the current state of the "More" area from a pref
|
||||
// Initialize to true, but calling onMoreFewer will toggle to "Fewer"
|
||||
SeeMore = true;
|
||||
onMoreFewer();
|
||||
}
|
||||
|
||||
// Set dialog widgets with attribute data
|
||||
|
@ -220,9 +229,10 @@ function FillListboxes()
|
|||
// (this may miss nearby anchors, but at least we don't insert another
|
||||
// under the same heading)
|
||||
var child = heading.firstChild;
|
||||
dump(child.nodeName+" = Heading's first child nodeName\n");
|
||||
if (child && child.nodeName == "a" && child.name && child.name.length > 0)
|
||||
dump(child.name+" = Child.name. Length="+child.name.length+"\n");
|
||||
if (child && child.nodeName == "A" && child.name && (child.name.length>0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var range = editorShell.editorDocument.createRange();
|
||||
range.setStart(heading,0);
|
||||
|
@ -256,8 +266,10 @@ function FillListboxes()
|
|||
|
||||
function GetExistingHeadingIndex(text)
|
||||
{
|
||||
dump("Heading text: "+text+"\n");
|
||||
for (i=0; i < HeadingsList.length; i++) {
|
||||
if (HeadingsList[i].name == name)
|
||||
dump("HeadingListItem"+i+": "+HeadingsList.options[i].value+"\n");
|
||||
if (HeadingsList.options[i].value == text)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
|
@ -277,6 +289,33 @@ function SelectHeading()
|
|||
}
|
||||
}
|
||||
|
||||
function onMoreFewer()
|
||||
{
|
||||
if (SeeMore)
|
||||
{
|
||||
// This doesn't work very well - lots of layout bugs
|
||||
// MoreSection.setAttribute("style","visibility:collapse");
|
||||
MoreSection.setAttribute("style","display: none");
|
||||
MoreFewerButton.setAttribute("value",GetString("More"));
|
||||
MoreFewerButton.removeAttribute("more");
|
||||
//AdvancedEditSection.setAttribute("style","display: none");
|
||||
dump("Set button text\n");
|
||||
|
||||
SeeMore = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// MoreSection.setAttribute("style","visibility: inherit");
|
||||
MoreSection.setAttribute("style","display: inherit");
|
||||
MoreFewerButton.setAttribute("value",GetString("Fewer"));
|
||||
MoreFewerButton.setAttribute("more","1");
|
||||
//AdvancedEditSection.setAttribute("style","display: inherit");
|
||||
SeeMore = true;
|
||||
}
|
||||
window.sizeToContent();
|
||||
}
|
||||
|
||||
|
||||
// Get and validate data from widgets.
|
||||
// Set attributes on globalElement so they can be accessed by AdvancedEdit()
|
||||
function ValidateData()
|
||||
|
@ -290,6 +329,7 @@ function ValidateData()
|
|||
} else if (insertNew) {
|
||||
// We must have a URL to insert a new link
|
||||
//NOTE: WE ACCEPT AN EMPTY HREF TO ALLOW REMOVING AN EXISTING LINK,
|
||||
dump("Empty HREF error\n");
|
||||
ShowInputErrorMessage(GetString("EmptyHREFError"));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -29,55 +29,58 @@
|
|||
|
||||
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorLinkProperties.dtd">
|
||||
|
||||
<xul:window title="&windowTitle.label;"
|
||||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical">
|
||||
<window title="&windowTitle.label;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" >
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js">
|
||||
</script>
|
||||
<script language="JavaScript" src="chrome://editor/content/EdLinkProps.js">
|
||||
</script>
|
||||
<script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
|
||||
<html:script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
|
||||
<html:script language="JavaScript" src="chrome://editor/content/EdLinkProps.js"/>
|
||||
<html:script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
|
||||
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
<xul:keyset id="keyset"/>
|
||||
<broadcaster id="args" value=""/>
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<xul:box align="vertical" style="min-width: 20em">
|
||||
<label id="linkTextCaption" for="linkTextMessage"> &LinkText.label; </label>
|
||||
<div id="linkTextMessage" style="margin-left: 3em">[replace this]</div>
|
||||
<input type="text" size="25" length="25" id="linkTextInput"/>
|
||||
<xul:spring class="spacer"/>
|
||||
<box align="vertical" style="min-width: 20em">
|
||||
<html:label id="linkTextCaption" for="linkTextMessage"> &LinkText.label; </html:label>
|
||||
<html:div id="linkTextMessage" style="margin-left: 3em">[replace this]</html:div>
|
||||
<html:input type="text" size="25" length="25" id="linkTextInput"/>
|
||||
<spring class="spacer"/>
|
||||
|
||||
<fieldset><legend align="left"> &LinkURLFieldset.label; </legend>
|
||||
<xul:box align="vertical" style="width: 100%; height: 100%">
|
||||
<xul:box align="horizontal">
|
||||
<div> &LinkURLEditField.label;</div>
|
||||
<xul:spring flex="100%"/>
|
||||
<div><xul:titledbutton id="RemoveLink" onclick="RemoveLink()" value="&RemoveLinkButton.label;"/>
|
||||
</div>
|
||||
</xul:box>
|
||||
<xul:box align="horizontal">
|
||||
<input type="text" size="25" length="25" id="hrefInput"></input>
|
||||
<xul:spring flex="100%"/>
|
||||
<!-- The div prevents button from being the same height as the input field -->
|
||||
<div><xul:titledbutton id="ChooseFile1" onclick="ChooseFile()" value="&LinkChooseFileButton.label;"/></div>
|
||||
</xul:box>
|
||||
</xul:box>
|
||||
<xul:spring class="spacer"/>
|
||||
<div>&NamedAnchorMsg.label;</div>
|
||||
<select id="NamedAnchorList" style="width: 15em;" size="3" onchange="SelectNamedAnchor()"/>
|
||||
<xul:spring class="spacer"/>
|
||||
<div>&HeadingMsg.label;</div>
|
||||
<select id="HeadingsList" style="width: 15em;" size="3" onchange="SelectHeading()"/>
|
||||
<div>&HeadingMsg2.label;</div>
|
||||
</fieldset>
|
||||
</xul:box>
|
||||
<html:fieldset><html:legend align="left"> &LinkURLFieldset.label; </html:legend>
|
||||
<box align="vertical" style="width: 100%; height: 100%">
|
||||
<box align="vertical">
|
||||
<box align="horizontal">
|
||||
<html:div> &LinkURLEditField.label;</html:div>
|
||||
<spring flex="100%"/>
|
||||
<html:div><titledbutton id="RemoveLink" onclick="RemoveLink()" value="&RemoveLinkButton.label;"/>
|
||||
</html:div>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<html:input type="text" size="25" length="25" id="hrefInput"></html:input>
|
||||
<spring flex="100%"/>
|
||||
<!-- The div prevents button from being the same height as the input field -->
|
||||
<html:div><titledbutton id="ChooseFile" onclick="ChooseFile()" value="&LinkChooseFileButton.label;"/></html:div>
|
||||
</box>
|
||||
</box>
|
||||
<!-- ***** The style: width setting is need to cover a bug in button width resizing when text changes ***** -->
|
||||
<html:div><titledbutton id="MoreFewerButton" align="left" style="width: 6em" onclick="onMoreFewer()"/></html:div>
|
||||
<box id="MoreSection" align="vertical">
|
||||
<spring class="spacer"/>
|
||||
<html:div>&NamedAnchorMsg.label;</html:div>
|
||||
<html:select id="NamedAnchorList" size="3" style="min-width: 1em" onchange="SelectNamedAnchor()"/>
|
||||
<spring class="spacer"/>
|
||||
<html:div>&HeadingMsg.label;</html:div>
|
||||
<html:select id="HeadingsList" size="3" style="min-width: 1em" onchange="SelectHeading()"/>
|
||||
<html:div>&HeadingMsg2.label;</html:div>
|
||||
</box>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
</box>
|
||||
|
||||
<!-- from EdDialogOverlay -->
|
||||
<xul:box id="AdvancedEditButton"/>
|
||||
<box id="AdvancedEditButton"/>
|
||||
<!-- from global dialogOverlay -->
|
||||
<xul:box id="okCancelButtons"/>
|
||||
</xul:window>
|
||||
<box id="okCancelButtons"/>
|
||||
</window>
|
||||
|
|
|
@ -24,14 +24,16 @@
|
|||
//Cancel() is in EdDialogCommon.js
|
||||
var insertNew = true;
|
||||
var tagname = "TAG NAME"
|
||||
var ListStyleList;
|
||||
var ListTypeList;
|
||||
var BulletStyleList;
|
||||
var BulletStyleLabel;
|
||||
var StartingNumberInput;
|
||||
var StartingNumberLabel;
|
||||
var BulletStyleIndex = 0;
|
||||
var NumberStyleIndex = 0;
|
||||
var ListStyle = "";
|
||||
var ListElement = 0;
|
||||
var ListType = "";
|
||||
var AdvancedEditButton;
|
||||
|
||||
// dialog initialization code
|
||||
function Startup()
|
||||
|
@ -41,43 +43,46 @@ function Startup()
|
|||
|
||||
doSetOKCancel(onOK, null);
|
||||
|
||||
ListStyleList = document.getElementById("ListStyle");
|
||||
ListTypeList = document.getElementById("ListType");
|
||||
BulletStyleList = document.getElementById("BulletStyle");
|
||||
BulletStyleLabel = document.getElementById("BulletStyleLabel");
|
||||
StartingNumberInput = document.getElementById("StartingNumber");
|
||||
StartingNumberLabel = document.getElementById("StartingNumberLabel");
|
||||
|
||||
AdvancedEditButton = document.getElementById("AdvancedEditButton");
|
||||
|
||||
// Try to get an existing list
|
||||
//
|
||||
ListElement = editorShell.GetElementOrParentByTagName("list",null);
|
||||
|
||||
// The copy to use in AdvancedEdit
|
||||
if (ListElement)
|
||||
globalElement = ListElement.cloneNode(false);
|
||||
|
||||
dump("List and global elements: "+ListElement+globalElement+"\n");
|
||||
|
||||
InitDialog();
|
||||
ListStyleList.focus();
|
||||
|
||||
ListTypeList.focus();
|
||||
}
|
||||
|
||||
function InitDialog()
|
||||
{
|
||||
//TODO: Get the current list style and set in ListStyle variable
|
||||
ListStyle = "ul";
|
||||
if (ListElement)
|
||||
ListType = ListElement.nodeName.toLowerCase();
|
||||
else
|
||||
ListType = "";
|
||||
|
||||
BuildBulletStyleList();
|
||||
/*
|
||||
if(!element)
|
||||
{
|
||||
dump("Failed to get selected element or create a new one!\n");
|
||||
window.close();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function BuildBulletStyleList()
|
||||
{
|
||||
// Put methods on the object if I can figure out its name!
|
||||
// (SELECT and HTMLSelect don't work!)
|
||||
//BulletStyleList.clear();
|
||||
|
||||
ClearList(BulletStyleList);
|
||||
var label = "";
|
||||
var selectedIndex = -1;
|
||||
|
||||
if (ListStyle == "ul")
|
||||
dump("List Type: "+ListType+" globalElement: "+globalElement+"\n");
|
||||
|
||||
if (ListType == "ul")
|
||||
{
|
||||
BulletStyleList.removeAttribute("disabled");
|
||||
BulletStyleLabel.removeAttribute("disabled");
|
||||
|
@ -87,11 +92,12 @@ function BuildBulletStyleList()
|
|||
|
||||
AppendStringToListByID(BulletStyleList,"SolidCircle");
|
||||
AppendStringToListByID(BulletStyleList,"OpenCircle");
|
||||
AppendStringToListByID(BulletStyleList,"OpenSquare");
|
||||
AppendStringToListByID(BulletStyleList,"SolidSquare");
|
||||
|
||||
BulletStyleList.selectedIndex = BulletStyleIndex;
|
||||
ListStyleList.selectedIndex = 1;
|
||||
} else if (ListStyle == "ol")
|
||||
ListTypeList.selectedIndex = 1;
|
||||
}
|
||||
else if (ListType == "ol")
|
||||
{
|
||||
BulletStyleList.removeAttribute("disabled");
|
||||
BulletStyleLabel.removeAttribute("disabled");
|
||||
|
@ -106,59 +112,135 @@ function BuildBulletStyleList()
|
|||
AppendStringToListByID(BulletStyleList,"Style_a");
|
||||
|
||||
BulletStyleList.selectedIndex = NumberStyleIndex;
|
||||
ListStyleList.selectedIndex = 2;
|
||||
} else {
|
||||
ListTypeList.selectedIndex = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
BulletStyleList.setAttribute("disabled", "true");
|
||||
BulletStyleLabel.setAttribute("disabled", "true");
|
||||
StartingNumberInput.setAttribute("disabled", "true");
|
||||
StartingNumberLabel.setAttribute("disabled", "true");
|
||||
|
||||
if (ListStyle == "dl")
|
||||
ListStyleList.selectedIndex = 3;
|
||||
if (ListType == "dl")
|
||||
ListTypeList.selectedIndex = 3;
|
||||
else
|
||||
ListStyleList.selectedIndex = 0;
|
||||
ListTypeList.selectedIndex = 0;
|
||||
}
|
||||
|
||||
// Disable advanced edit button if changing to "normal"
|
||||
if (ListType == "")
|
||||
AdvancedEditButton.setAttribute("disabled","true");
|
||||
else
|
||||
AdvancedEditButton.removeAttribute("disabled");
|
||||
|
||||
if (label)
|
||||
{
|
||||
BulletStyleLabel.value = label;
|
||||
if (BulletStyleLabel.hasChildNodes())
|
||||
{
|
||||
dump("BulletStyleLabel.firstChild: "+BulletStyleLabel.firstChild+"\n");
|
||||
BulletStyleLabel.removeChild(BulletStyleLabel.firstChild);
|
||||
}
|
||||
|
||||
var textNode = document.createTextNode(label);
|
||||
BulletStyleLabel.appendChild(textNode);
|
||||
}
|
||||
}
|
||||
|
||||
function SelectListStyle()
|
||||
function SelectListType()
|
||||
{
|
||||
switch (ListStyleList.selectedIndex)
|
||||
switch (ListTypeList.selectedIndex)
|
||||
{
|
||||
case 1:
|
||||
ListStyle = "ul";
|
||||
NewType = "ul";
|
||||
break;
|
||||
case 2:
|
||||
ListStyle = "ol";
|
||||
NewType = "ol";
|
||||
break;
|
||||
case 3:
|
||||
ListStyle = "dl";
|
||||
NewType = "dl";
|
||||
break;
|
||||
default:
|
||||
ListStyle = "";
|
||||
NewType = "";
|
||||
break;
|
||||
}
|
||||
if (ListType != NewType)
|
||||
{
|
||||
ListType = NewType;
|
||||
|
||||
// Create a newlist object for Advanced Editing
|
||||
if (ListType != "")
|
||||
globalElement = editorShell.CreateElementWithDefaults(ListType);
|
||||
|
||||
BuildBulletStyleList();
|
||||
}
|
||||
BuildBulletStyleList();
|
||||
}
|
||||
|
||||
// Save the selected index
|
||||
function SelectBulleStyle()
|
||||
function SelectBulletStyle()
|
||||
{
|
||||
if (ListStyle == "ul")
|
||||
// Save the selected index so when user changes
|
||||
// list style, restore index to associated list
|
||||
if (ListType == "ul")
|
||||
BulletStyleIndex = BulletStyleList.selectedIndex;
|
||||
else if (ListStyle == "ol")
|
||||
else if (ListType == "ol")
|
||||
NumberStyleIndex = BulletStyleList.selectedIndex;
|
||||
}
|
||||
|
||||
function ValidateData()
|
||||
{
|
||||
var type = 0;
|
||||
// globalElement should already be of the correct type
|
||||
dump("Global List element="+globalElement+" should be type: "+ListType+"\n");
|
||||
|
||||
if (globalElement)
|
||||
{
|
||||
if (ListType == "ul")
|
||||
{
|
||||
switch (BulletStyleList.selectedIndex)
|
||||
{
|
||||
// Index 0 = "disc", the default, so we don't set it explicitly
|
||||
case 1:
|
||||
type = "circle";
|
||||
break;
|
||||
case 2:
|
||||
type = "square";
|
||||
break;
|
||||
}
|
||||
if (type)
|
||||
globalElement.setAttribute("type",type);
|
||||
else
|
||||
globalElement.removeAttribute("type");
|
||||
|
||||
} else if (ListType == "ol")
|
||||
{
|
||||
switch (BulletStyleList.selectedIndex)
|
||||
{
|
||||
// Index 0 = "1", the default, so we don't set it explicitly
|
||||
case 1:
|
||||
type = "I";
|
||||
break;
|
||||
case 2:
|
||||
type = "i";
|
||||
break;
|
||||
case 3:
|
||||
type = "A";
|
||||
break;
|
||||
case 4:
|
||||
type = "a";
|
||||
break;
|
||||
}
|
||||
if (type)
|
||||
globalElement.setAttribute("type",type);
|
||||
else
|
||||
globalElement.removeAttribute("type");
|
||||
|
||||
var startingNumber = StartingNumberInput.value.trimString();
|
||||
if (startingNumber)
|
||||
globalElement.setAttribute("start",startingNumber);
|
||||
else
|
||||
globalElement.removeAttribute("start");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -166,7 +248,21 @@ function onOK()
|
|||
{
|
||||
if (ValidateData())
|
||||
{
|
||||
// Coalesce into one undo transaction
|
||||
editorShell.BeginBatchChanges();
|
||||
|
||||
// Making a list is tricky!
|
||||
// First, make the list
|
||||
editorShell.MakeOrChangeList(ListType);
|
||||
|
||||
// Now we need to get ALL of the list nodes in the current selection
|
||||
// For now, let's get just the one at the anchor
|
||||
listElement = editorShell.GetElementOrParentByTagName("list",null);
|
||||
// Set the list attributes
|
||||
if (listElement)
|
||||
editorShell.CloneAttributes(listElement, globalElement);
|
||||
|
||||
editorShell.EndBatchChanges();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
|
||||
<xul:keyset id="keyset"/>
|
||||
|
||||
<label for="ListStyle">&listStyle.label;</label>
|
||||
<select class="ComboBox" id="ListStyle" onchange="SelectListStyle()">
|
||||
<label for="ListType">&ListType.label;</label>
|
||||
<select class="ComboBox" id="ListType" onchange="SelectListType()">
|
||||
<option>&none.value;</option>
|
||||
<option>&bulletList.value;</option>
|
||||
<option>&numberList.value;</option>
|
||||
|
@ -53,13 +53,13 @@
|
|||
<!-- message text and list items are set in JS
|
||||
bulletStyle.label should be identical to string with id=BulletStyle in editor.properties -->
|
||||
<div id="BulletStyleLabel">&bulletStyle.label;</div>
|
||||
<select class="ComboBox" id="BulletStyle" style="min-width: 10em"/>
|
||||
<select class="ComboBox" id="BulletStyle" style="min-width: 10em" onchange="SelectBulletStyle()"/>
|
||||
<xul:spring class="spacer"/>
|
||||
|
||||
<xul:box align="horizontal">
|
||||
<label id="StartingNumberLabel" for="StartingNumber">&startingNumber.label;</label>
|
||||
<xul:spring class="spacer"/>
|
||||
<input type="text" id="StartingNumber" size="3"/>
|
||||
<input type="text" id="StartingNumber" size="3" onkeyup="forceInteger('StartingNumber')"/>
|
||||
<xul:spring/>
|
||||
</xul:box>
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
|
|
|
@ -38,9 +38,12 @@
|
|||
</html:script>
|
||||
|
||||
<broadcaster id="args" value=""/>
|
||||
<!-- text node(s) with message text will be appended as children to this -->
|
||||
<html:div id="message" flex="100%" style="width: 20em;"/>
|
||||
<spring style="height: 15px"/>
|
||||
<box align="horizontal" style="margin: 10px">
|
||||
<html:img src="chrome://global/skin/alert-icon.gif"/>
|
||||
<!-- text node(s) with message text will be appended as children to this -->
|
||||
<html:div id="message" flex="100%"/>
|
||||
</box>
|
||||
<!-- spring style="height: 15px"/ -->
|
||||
<box align="horizontal" style="margin: 10px">
|
||||
<spring flex="100%"/>
|
||||
<titledbutton class="MsgButton" id="button1" onclick="onButton(1)"/>
|
||||
|
|
|
@ -23,4 +23,4 @@
|
|||
<!-- Window title -->
|
||||
<!ENTITY windowTitle.label "Insert HTML">
|
||||
<!ENTITY sourceEditField.label "Enter HTML tags and text:">
|
||||
<!ENTITY example.label "Hello World!">
|
||||
<!ENTITY example.label "Example: <b><i>Hello World!</i></b>">
|
||||
|
|
|
@ -24,10 +24,11 @@
|
|||
<!-- Window title -->
|
||||
<!ENTITY windowTitle.label "List Properties">
|
||||
|
||||
<!ENTITY listStyle.label "List Style">
|
||||
<!ENTITY ListType.label "List Type:">
|
||||
<!ENTITY bulletStyle.label "Bullet Style:">
|
||||
<!ENTITY startingNumber.label "Starting number:">
|
||||
<!ENTITY none.value "None (normal paragraph)">
|
||||
<!ENTITY bulletList.value "Bullet (Unnumbered) List">
|
||||
<!ENTITY numberList.value "Numbered List">
|
||||
<!ENTITY definitionList.value "Definition List">
|
||||
<!ENTITY mixedListType.value "(mixed types)">
|
||||
|
|
|
@ -37,17 +37,23 @@ tab {
|
|||
|
||||
/*
|
||||
titledbutton[class=~spaced] {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
titledbutton {
|
||||
padding: 2px 5px;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
*/
|
||||
titledbutton#MoreFewerButton {
|
||||
list-style-image: url(chrome://global/skin/scroll-down.gif)
|
||||
}
|
||||
titledbutton#MoreFewerButton[more="1"] {
|
||||
list-style-image: url(chrome://global/skin/scroll-up.gif);
|
||||
}
|
||||
|
||||
select.SpellCheckList, select.SpellCheckLanguage, input.SpellCheckWord {
|
||||
width: 20em;
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
/* HTML ELEMENTS */
|
||||
|
@ -57,122 +63,126 @@ td, table { border: 0px;}
|
|||
|
||||
/* Use to center vertically in a table cell */
|
||||
.vcenter {
|
||||
vertical-align: middle;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Messenger uses this -- IT SHOULD BE IN XUL.CSS */
|
||||
spring.spacer {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
spring.bigspacer {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
div.spacer [align~=horizontal] {
|
||||
border : 1px inset white;
|
||||
height : 2px;
|
||||
border: 1px inset white;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
div#message {
|
||||
width: 20em;
|
||||
margin-left: 10px
|
||||
|
||||
}
|
||||
/* Rest are from Ben Goodger for Advanced Edit dialog
|
||||
These need reviewing and eliminate all but essential attributes */
|
||||
|
||||
div.tagname {
|
||||
font-weight : bold;
|
||||
font-size : 17px;
|
||||
font-weight: bold;
|
||||
font-size : 17px;
|
||||
}
|
||||
|
||||
div#tagLabel {
|
||||
font-weight : bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* styles for an attribute tree-table */
|
||||
tree.AttributesTree {
|
||||
min-width : 200px;
|
||||
min-height : 200px;
|
||||
border : 1px inset white;
|
||||
min-width : 200px;
|
||||
min-height: 200px;
|
||||
border : 1px inset white;
|
||||
}
|
||||
|
||||
tree.AttributesTree treecell {
|
||||
color : black;
|
||||
padding-left : 10px;
|
||||
padding-top : 2px;
|
||||
padding-bottom : 2px;
|
||||
padding-right : 2px;
|
||||
color : black;
|
||||
padding-left : 10px;
|
||||
padding-top : 2px;
|
||||
padding-bottom: 2px;
|
||||
padding-right : 2px;
|
||||
}
|
||||
|
||||
tree.AttributesTree > treehead > treerow > treecell {
|
||||
border : 1px outset white;
|
||||
background-color : #CCCCDD;
|
||||
border : 1px outset white;
|
||||
background-color: #CCCCDD;
|
||||
}
|
||||
|
||||
tree.AttributesTree > treehead > treerow > treecell:active {
|
||||
border-left : 1px inset white; /*inset white;*/
|
||||
border-top : 1px inset white;
|
||||
border-right : 1px solid #CCCCDD;
|
||||
border-bottom : 1px solid #CCCCDD;
|
||||
padding-left : 11px;
|
||||
padding-top : 3px;
|
||||
padding-right : 1px;
|
||||
padding-bottom : 1px;
|
||||
border-left : 1px inset white; /*inset white;*/
|
||||
border-top : 1px inset white;
|
||||
border-right : 1px solid #CCCCDD;
|
||||
border-bottom : 1px solid #CCCCDD;
|
||||
padding-left : 11px;
|
||||
padding-top : 3px;
|
||||
padding-right : 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
|
||||
/* FILES/MOZILLAE/M96/BIN/chrome/editor/content/default/EdAdvancedEdit.xul */
|
||||
tree.AttributesTree treechildren > treeitem > treerow > treecell {
|
||||
border-right : 1px solid #CCCCDD;
|
||||
border-bottom : 1px solid #CCCCDD;
|
||||
color : black;
|
||||
background-color : #FFFFFF;
|
||||
padding-left : 10px;
|
||||
padding-top : 2px;
|
||||
padding-bottom : 2px;
|
||||
padding-right : 2px;
|
||||
border-right : 1px solid #CCCCDD;
|
||||
border-bottom : 1px solid #CCCCDD;
|
||||
color : black;
|
||||
background-color: #FFFFFF;
|
||||
padding-left : 10px;
|
||||
padding-top : 2px;
|
||||
padding-bottom : 2px;
|
||||
padding-right : 2px;
|
||||
}
|
||||
|
||||
tree.AttributesTree treechildren > treeitem > treerow > treecell.value {
|
||||
border-bottom : 1px solid #CCCCDD;
|
||||
color : black;
|
||||
background-color : #FFFFFF;
|
||||
padding-left : 0px;
|
||||
padding-top : 0px;
|
||||
padding-bottom : 0px;
|
||||
padding-right : 0px;
|
||||
margin-left : 0px;
|
||||
border-bottom : 1px solid #CCCCDD;
|
||||
color : black;
|
||||
background-color: #FFFFFF;
|
||||
padding-left : 0px;
|
||||
padding-top : 0px;
|
||||
padding-bottom : 0px;
|
||||
padding-right : 0px;
|
||||
margin-left : 0px;
|
||||
}
|
||||
|
||||
|
||||
tree.AttributesTree treechildren > treeitem > treerow [selected ~= false] {
|
||||
color : black;
|
||||
background-color : #FFFFFF;
|
||||
color : black;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
tree.AttributesTree treechildren > treeitem > treerow [selected ~= true] {
|
||||
color : white;
|
||||
background-color : #666699;
|
||||
color : white;
|
||||
background-color: #666699;
|
||||
}
|
||||
|
||||
input.AttributesCell {
|
||||
width : 95%;
|
||||
border : none;
|
||||
height : 100%;
|
||||
width : 95%;
|
||||
border: none;
|
||||
height: 100%;
|
||||
}
|
||||
/*
|
||||
input.AttributesCell:active {
|
||||
border: 1px white inset;
|
||||
border: 1px white inset;
|
||||
}
|
||||
|
||||
input.AttributesCell:hover {
|
||||
border: 1px white inset;
|
||||
border: 1px white inset;
|
||||
}
|
||||
*/
|
||||
|
||||
treecell input:hover {
|
||||
background-color : #ECECEC;
|
||||
font-weight : bold;
|
||||
border : 2px solid #666699;
|
||||
background-color: #ECECEC;
|
||||
font-weight : bold;
|
||||
border : 2px solid #666699;
|
||||
}
|
||||
|
||||
box.tabpanel {
|
||||
|
|
|
@ -30,10 +30,12 @@
|
|||
|
||||
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorAppShell.dtd">
|
||||
|
||||
<!-- NOTE: If we don't have "title" set, text editor doesn't work! -->
|
||||
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="TextEditorOnLoad()"
|
||||
onunload="EditorShutdown()"
|
||||
onunload="EditorShutdown()"
|
||||
title="&textEditorWindow.titlemodifier;"
|
||||
titlemodifier="&textEditorWindow.titlemodifier;"
|
||||
titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
|
||||
align="vertical"
|
||||
|
|
Загрузка…
Ссылка в новой задаче