mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 04:22:30 -10:00
Fixed Composer taskbar buttons. Changed Editorshell mouse listener so editorshell controls action, allowing selection of elements in All Tags mode with single click. Improved isCommandEnabled for Split cell command
This commit is contained in:
1 parent
1d737fcf75
commit
11416162eb
9 files changed
+234
-114
No files matched your search
@@ -4843,11 +4843,21 @@ nsEditorShell::DocumentIsRootDoc(nsIDocumentLoader* aLoader, PRBool& outIsRoot)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditorShell::EditElementProperties(nsIDOMElement *aElement, int x, int y)
|
||||
nsEditorShell::HandleMouseClickOnElement(nsIDOMElement *aElement, PRInt32 aClickCount,
|
||||
PRInt32 x, PRInt32 y, PRBool *_retval)
|
||||
{
|
||||
// Guess it's ok if we don't have an element
|
||||
if (!aElement) return NS_OK;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
if (!_retval) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
// We'll only look at single and double-click
|
||||
if (aClickCount > 2) return NS_OK;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
#if DEBUG_cmanske
|
||||
nsAutoString TagName;
|
||||
@@ -4855,25 +4865,55 @@ nsEditorShell::EditElementProperties(nsIDOMElement *aElement, int x, int y)
|
||||
TagName.ToLowerCase();
|
||||
char szTagName[64];
|
||||
TagName.ToCString(szTagName, 64);
|
||||
printf("***** DBLClick: TagName of element clicked on: %s\n", szTagName);
|
||||
printf("***** Element clicked on: %s, x=%d, y=%d\n", szTagName, x, y);
|
||||
#endif
|
||||
// Get the ComposerController:
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
if(!mContentWindow)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
nsCOMPtr<nsIDOMWindow> cwP = do_QueryReferent(mContentWindow);
|
||||
if (!cwP) return NS_ERROR_NOT_INITIALIZED;
|
||||
rv = cwP->GetControllers(getter_AddRefs(controllers));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controllers) return NS_ERROR_NULL_POINTER;
|
||||
if (mDisplayMode == eDisplayModeAllTags)
|
||||
{
|
||||
// Always select the element in AllTags mode
|
||||
// in other modes, clicking on images, hline, etc
|
||||
// already selects them correctly
|
||||
// Selection here is used to make clicking on the
|
||||
// background image in ShowAllTags mode select
|
||||
// contents of a element
|
||||
// TODO: It would be great if we could use x, y to restrict
|
||||
// where you click for easier caret placement near border with content,
|
||||
// but:
|
||||
// 1. We can get x,y, relative to either screen or "widget" (contentWindow)
|
||||
// origin, but not the element clicked on!
|
||||
// 2. we need to get the size of the element!
|
||||
|
||||
nsCOMPtr<nsIController> controller;
|
||||
rv = controllers->GetControllerAt(eComposerController, getter_AddRefs(controller));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controller) return NS_ERROR_NULL_POINTER;
|
||||
nsCOMPtr<nsIEditorController> composerController = do_QueryInterface(controller);
|
||||
rv = SelectElement(aElement);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
// Execute the command
|
||||
nsAutoString commandName(NS_ConvertASCIItoUCS2("cmd_advancedProperties"));
|
||||
return composerController->DoCommand(commandName.GetUnicode());
|
||||
// For double-click, edit element properties
|
||||
if (aClickCount == 2)
|
||||
{
|
||||
// Get the ComposerController:
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
if(!mContentWindow)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
nsCOMPtr<nsIDOMWindow> cwP = do_QueryReferent(mContentWindow);
|
||||
if (!cwP) return NS_ERROR_NOT_INITIALIZED;
|
||||
rv = cwP->GetControllers(getter_AddRefs(controllers));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controllers) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
// TODO: Don't use eComposerController index! must search
|
||||
// through controllers to find the one we want - UGH!
|
||||
nsCOMPtr<nsIController> controller;
|
||||
rv = controllers->GetControllerAt(eComposerController, getter_AddRefs(controller));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controller) return NS_ERROR_NULL_POINTER;
|
||||
nsCOMPtr<nsIEditorController> composerController = do_QueryInterface(controller);
|
||||
|
||||
// Execute the command
|
||||
nsAutoString commandName(NS_ConvertASCIItoUCS2("cmd_advancedProperties"));
|
||||
rv = composerController->DoCommand(commandName.GetUnicode());
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
*_retval = PR_FALSE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
@@ -129,30 +129,26 @@ nsEditorShellMouseListener::MouseUp(nsIDOMEvent* aMouseEvent)
|
||||
nsresult res = mouseEvent->GetClickCount(&clickCount);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// This is the XP way to detect double click
|
||||
if (clickCount == 2)
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
if (NS_SUCCEEDED(aMouseEvent->GetTarget(getter_AddRefs(node))) && node)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
if (NS_SUCCEEDED(aMouseEvent->GetTarget(getter_AddRefs(node))) && node)
|
||||
// We are only interested in elements, not text nodes
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(node);
|
||||
if (element)
|
||||
{
|
||||
// We are only interested in elements, not text nodes
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(node);
|
||||
if (element)
|
||||
{
|
||||
PRInt32 x,y;
|
||||
res = mouseEvent->GetClientX(&x);
|
||||
if (NS_FAILED(res)) return res;
|
||||
PRInt32 x,y;
|
||||
res = mouseEvent->GetClientX(&x);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = mouseEvent->GetClientY(&y);
|
||||
if (NS_FAILED(res)) return res;
|
||||
res = mouseEvent->GetClientY(&y);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// Set selection to node clicked on
|
||||
mEditorShell->SelectElement(element);
|
||||
// Let editor decide what to do with this
|
||||
PRBool handled;
|
||||
mEditorShell->HandleMouseClickOnElement(element, clickCount, x, y, &handled);
|
||||
|
||||
mEditorShell->EditElementProperties(element, x, y);
|
||||
// We are handling the event
|
||||
if (handled)
|
||||
return NS_ERROR_BASE; // consumed
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK; // didn't handle event
|
||||
|
||||
@@ -1326,17 +1326,26 @@ nsHTMLEditor::SplitTableCell()
|
||||
nsCOMPtr<nsIDOMElement> cell2;
|
||||
// PRInt32 startRowIndex2, startColIndex2, rowSpan2, colSpan2, actualRowSpan2, actualColSpan2;
|
||||
// PRBool isSelected2;
|
||||
nsAutoString tagName;
|
||||
PRInt32 selCount;
|
||||
nsresult res = GetSelectedOrParentTableElement(*getter_AddRefs(targetCell), tagName, selCount);
|
||||
if (NS_FAILED(res)) return res;
|
||||
// We're not in a cell, or there's > 1 selected
|
||||
if(!targetCell || selCount > 1) return NS_EDITOR_ELEMENT_NOT_FOUND;
|
||||
|
||||
nsAutoEditBatch beginBatching(this);
|
||||
|
||||
//Don't let Rules System change the selection
|
||||
nsAutoTxnsConserveSelection dontChangeSelection(this);
|
||||
|
||||
//////////////////////////////////////////////////// IN PROGRESS!
|
||||
|
||||
// Get cell, table, etc. at selection anchor node
|
||||
nsresult res = GetCellContext(nsnull,
|
||||
getter_AddRefs(table),
|
||||
getter_AddRefs(targetCell),
|
||||
nsnull, nsnull,
|
||||
&startRowIndex, &startColIndex);
|
||||
res = GetCellContext(nsnull,
|
||||
getter_AddRefs(table),
|
||||
getter_AddRefs(targetCell),
|
||||
nsnull, nsnull,
|
||||
&startRowIndex, &startColIndex);
|
||||
if (NS_FAILED(res)) return res;
|
||||
if(!table || !targetCell) return NS_EDITOR_ELEMENT_NOT_FOUND;
|
||||
|
||||
|
||||
@@ -4843,11 +4843,21 @@ nsEditorShell::DocumentIsRootDoc(nsIDocumentLoader* aLoader, PRBool& outIsRoot)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsEditorShell::EditElementProperties(nsIDOMElement *aElement, int x, int y)
|
||||
nsEditorShell::HandleMouseClickOnElement(nsIDOMElement *aElement, PRInt32 aClickCount,
|
||||
PRInt32 x, PRInt32 y, PRBool *_retval)
|
||||
{
|
||||
// Guess it's ok if we don't have an element
|
||||
if (!aElement) return NS_OK;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
if (!_retval) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
// We'll only look at single and double-click
|
||||
if (aClickCount > 2) return NS_OK;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
#if DEBUG_cmanske
|
||||
nsAutoString TagName;
|
||||
@@ -4855,25 +4865,55 @@ nsEditorShell::EditElementProperties(nsIDOMElement *aElement, int x, int y)
|
||||
TagName.ToLowerCase();
|
||||
char szTagName[64];
|
||||
TagName.ToCString(szTagName, 64);
|
||||
printf("***** DBLClick: TagName of element clicked on: %s\n", szTagName);
|
||||
printf("***** Element clicked on: %s, x=%d, y=%d\n", szTagName, x, y);
|
||||
#endif
|
||||
// Get the ComposerController:
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
if(!mContentWindow)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
nsCOMPtr<nsIDOMWindow> cwP = do_QueryReferent(mContentWindow);
|
||||
if (!cwP) return NS_ERROR_NOT_INITIALIZED;
|
||||
rv = cwP->GetControllers(getter_AddRefs(controllers));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controllers) return NS_ERROR_NULL_POINTER;
|
||||
if (mDisplayMode == eDisplayModeAllTags)
|
||||
{
|
||||
// Always select the element in AllTags mode
|
||||
// in other modes, clicking on images, hline, etc
|
||||
// already selects them correctly
|
||||
// Selection here is used to make clicking on the
|
||||
// background image in ShowAllTags mode select
|
||||
// contents of a element
|
||||
// TODO: It would be great if we could use x, y to restrict
|
||||
// where you click for easier caret placement near border with content,
|
||||
// but:
|
||||
// 1. We can get x,y, relative to either screen or "widget" (contentWindow)
|
||||
// origin, but not the element clicked on!
|
||||
// 2. we need to get the size of the element!
|
||||
|
||||
nsCOMPtr<nsIController> controller;
|
||||
rv = controllers->GetControllerAt(eComposerController, getter_AddRefs(controller));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controller) return NS_ERROR_NULL_POINTER;
|
||||
nsCOMPtr<nsIEditorController> composerController = do_QueryInterface(controller);
|
||||
rv = SelectElement(aElement);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
// Execute the command
|
||||
nsAutoString commandName(NS_ConvertASCIItoUCS2("cmd_advancedProperties"));
|
||||
return composerController->DoCommand(commandName.GetUnicode());
|
||||
// For double-click, edit element properties
|
||||
if (aClickCount == 2)
|
||||
{
|
||||
// Get the ComposerController:
|
||||
nsCOMPtr<nsIControllers> controllers;
|
||||
if(!mContentWindow)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
nsCOMPtr<nsIDOMWindow> cwP = do_QueryReferent(mContentWindow);
|
||||
if (!cwP) return NS_ERROR_NOT_INITIALIZED;
|
||||
rv = cwP->GetControllers(getter_AddRefs(controllers));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controllers) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
// TODO: Don't use eComposerController index! must search
|
||||
// through controllers to find the one we want - UGH!
|
||||
nsCOMPtr<nsIController> controller;
|
||||
rv = controllers->GetControllerAt(eComposerController, getter_AddRefs(controller));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (!controller) return NS_ERROR_NULL_POINTER;
|
||||
nsCOMPtr<nsIEditorController> composerController = do_QueryInterface(controller);
|
||||
|
||||
// Execute the command
|
||||
nsAutoString commandName(NS_ConvertASCIItoUCS2("cmd_advancedProperties"));
|
||||
rv = composerController->DoCommand(commandName.GetUnicode());
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
*_retval = PR_FALSE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
@@ -129,30 +129,26 @@ nsEditorShellMouseListener::MouseUp(nsIDOMEvent* aMouseEvent)
|
||||
nsresult res = mouseEvent->GetClickCount(&clickCount);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// This is the XP way to detect double click
|
||||
if (clickCount == 2)
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
if (NS_SUCCEEDED(aMouseEvent->GetTarget(getter_AddRefs(node))) && node)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
if (NS_SUCCEEDED(aMouseEvent->GetTarget(getter_AddRefs(node))) && node)
|
||||
// We are only interested in elements, not text nodes
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(node);
|
||||
if (element)
|
||||
{
|
||||
// We are only interested in elements, not text nodes
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(node);
|
||||
if (element)
|
||||
{
|
||||
PRInt32 x,y;
|
||||
res = mouseEvent->GetClientX(&x);
|
||||
if (NS_FAILED(res)) return res;
|
||||
PRInt32 x,y;
|
||||
res = mouseEvent->GetClientX(&x);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = mouseEvent->GetClientY(&y);
|
||||
if (NS_FAILED(res)) return res;
|
||||
res = mouseEvent->GetClientY(&y);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
// Set selection to node clicked on
|
||||
mEditorShell->SelectElement(element);
|
||||
// Let editor decide what to do with this
|
||||
PRBool handled;
|
||||
mEditorShell->HandleMouseClickOnElement(element, clickCount, x, y, &handled);
|
||||
|
||||
mEditorShell->EditElementProperties(element, x, y);
|
||||
// We are handling the event
|
||||
if (handled)
|
||||
return NS_ERROR_BASE; // consumed
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK; // didn't handle event
|
||||
|
||||
@@ -193,12 +193,11 @@ interface nsIEditorShell : nsISupports
|
||||
|
||||
/** Element insert and property editing */
|
||||
|
||||
/** Launch the "Advanced Edit" property dialog
|
||||
* for the supplied element
|
||||
* (Called by the DblClick handler in EditorShellMouseListener owned by EditorShell)
|
||||
* Use x and y are hints to allow different behavior near left and top borders, etc.
|
||||
/** Let editor handle clicking on a non-text element
|
||||
* to do selection, property editing, etc.
|
||||
* Returns true if we "consumed" the event
|
||||
*/
|
||||
void EditElementProperties(in nsIDOMElement element, in PRInt32 x, in PRInt32 y);
|
||||
boolean HandleMouseClickOnElement(in nsIDOMElement element, in PRInt32 clickCount, in PRInt32 x, in PRInt32 y);
|
||||
|
||||
/** Return an element only if it is the only node selected,
|
||||
* such as an image, horizontal rule, etc.
|
||||
|
||||
@@ -1326,17 +1326,26 @@ nsHTMLEditor::SplitTableCell()
|
||||
nsCOMPtr<nsIDOMElement> cell2;
|
||||
// PRInt32 startRowIndex2, startColIndex2, rowSpan2, colSpan2, actualRowSpan2, actualColSpan2;
|
||||
// PRBool isSelected2;
|
||||
nsAutoString tagName;
|
||||
PRInt32 selCount;
|
||||
nsresult res = GetSelectedOrParentTableElement(*getter_AddRefs(targetCell), tagName, selCount);
|
||||
if (NS_FAILED(res)) return res;
|
||||
// We're not in a cell, or there's > 1 selected
|
||||
if(!targetCell || selCount > 1) return NS_EDITOR_ELEMENT_NOT_FOUND;
|
||||
|
||||
nsAutoEditBatch beginBatching(this);
|
||||
|
||||
//Don't let Rules System change the selection
|
||||
nsAutoTxnsConserveSelection dontChangeSelection(this);
|
||||
|
||||
//////////////////////////////////////////////////// IN PROGRESS!
|
||||
|
||||
// Get cell, table, etc. at selection anchor node
|
||||
nsresult res = GetCellContext(nsnull,
|
||||
getter_AddRefs(table),
|
||||
getter_AddRefs(targetCell),
|
||||
nsnull, nsnull,
|
||||
&startRowIndex, &startColIndex);
|
||||
res = GetCellContext(nsnull,
|
||||
getter_AddRefs(table),
|
||||
getter_AddRefs(targetCell),
|
||||
nsnull, nsnull,
|
||||
&startRowIndex, &startColIndex);
|
||||
if (NS_FAILED(res)) return res;
|
||||
if(!table || !targetCell) return NS_EDITOR_ELEMENT_NOT_FOUND;
|
||||
|
||||
|
||||
@@ -720,9 +720,15 @@ var nsEditHTMLCommand =
|
||||
doCommand: function(aCommand)
|
||||
{
|
||||
if (gEditorDisplayMode === DisplayModeSource)
|
||||
{
|
||||
dump(" *** Switch back to HTML Source mode\n");
|
||||
SetEditMode(DisplayModeNormal);
|
||||
}
|
||||
else
|
||||
{
|
||||
dump(" *** Switch back to NORMAL\n");
|
||||
SetEditMode(DisplayModeSource);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -820,18 +826,36 @@ function goUpdateTableMenuItems(commandset)
|
||||
|
||||
function IsInTable()
|
||||
{
|
||||
dump("IsInTable?\n");
|
||||
return (window.editorShell && window.editorShell.documentEditable &&
|
||||
null != window.editorShell.GetElementOrParentByTagName("table", null));
|
||||
}
|
||||
|
||||
function IsInTableCell()
|
||||
{
|
||||
dump("IsInTableCell?\n");
|
||||
return (window.editorShell && window.editorShell.documentEditable &&
|
||||
null != window.editorShell.GetElementOrParentByTagName("td", null));
|
||||
}
|
||||
|
||||
function IsSelectionInOneCell()
|
||||
{
|
||||
var selection = window.editorShell.selection;
|
||||
if (selection && selection.rangeCount == 1)
|
||||
{
|
||||
// We have a "normal" single-range selection
|
||||
if (!selection.isCollapsed &&
|
||||
selection.anchorNode != selection.focusNode)
|
||||
{
|
||||
// Check if both nodes are within the same cell
|
||||
var anchorCell = window.editorShell.GetElementOrParentByTagName("td", selection.anchorNode);
|
||||
var focusCell = window.editorShell.GetElementOrParentByTagName("td", selection.focusNode);
|
||||
return (focusCell && anchorCell && focusCell == anchorCell);
|
||||
}
|
||||
// Collapsed selection or anchor == focus (thus must be in 1 cell)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Call this with insertAllowed = true to allow inserting if not in existing table,
|
||||
// else use false to do nothing if not in a table
|
||||
function EditorInsertOrEditTable(insertAllowed)
|
||||
@@ -1198,11 +1222,11 @@ var nsJoinTableCellsCommand =
|
||||
// We need a cell and either > 1 selected cell or a sibling cell to the right
|
||||
// (Note that editorShell returns "td" for "th" also)
|
||||
// (This is a pain! Editor and gecko use lowercase tagNames, JS uses uppercase!)
|
||||
if (cell && tagNameObj.value == "td")
|
||||
return ( (countObj.value > 1) ||
|
||||
(cell.nextSibling &&
|
||||
(cell.nextSibling.tagName == "TD" ||
|
||||
cell.nextSibling.tagName == "TH")) );
|
||||
return ( cell && (tagNameObj.value == "td") &&
|
||||
( (countObj.value > 1) ||
|
||||
(cell.nextSibling &&
|
||||
(cell.nextSibling.tagName == "TD" ||
|
||||
cell.nextSibling.tagName == "TH")) ) );
|
||||
}
|
||||
return false;
|
||||
},
|
||||
@@ -1211,6 +1235,7 @@ var nsJoinTableCellsCommand =
|
||||
if (this.isCommandEnabled(aCommand))
|
||||
{
|
||||
window.editorShell.JoinTableCells();
|
||||
dump(editorShell+" **** CAN WE ACCESS GLOBAL editorShell:???\n");
|
||||
window.content.focus();
|
||||
}
|
||||
}
|
||||
@@ -1223,8 +1248,15 @@ var nsSplitTableCellCommand =
|
||||
{
|
||||
if (window.editorShell && window.editorShell.documentEditable)
|
||||
{
|
||||
var cell = window.editorShell.GetElementOrParentByTagName("td", null);
|
||||
return (cell != null && (cell.colSpan > 1 || cell.rowSpan > 1));
|
||||
var tagNameObj = new Object;
|
||||
var countObj = new Object;
|
||||
var cell = window.editorShell.GetSelectedOrParentTableElement(tagNameObj, countObj);
|
||||
|
||||
// We need a cell parent and there's just 1 selected cell
|
||||
// or selection is entirely inside 1 cell
|
||||
return ( cell && (tagNameObj.value == "td") &&
|
||||
(countObj.value <= 1) &&
|
||||
IsSelectionInOneCell() );
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
@@ -697,35 +697,35 @@
|
||||
|
||||
<menupopup id="AlignmentPopup">
|
||||
<menuitem oncommand="EditorAlign('cmd_align', 'left')">
|
||||
<button class="borderless" id="text-align-left" align="left" value="&alignLeft.label;"/>
|
||||
<button class="plain" id="text-align-left" align="left" value="&alignLeft.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="EditorAlign('cmd_align', 'center')">
|
||||
<button class="borderless" id="text-align-center" align="left" value="&alignCenter.label;"/>
|
||||
<button class="plain" id="text-align-center" align="left" value="&alignCenter.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="EditorAlign('cmd_align', 'right')">
|
||||
<button class="borderless" id="text-align-right" align="left" value="&alignRight.label;"/>
|
||||
<button class="plain" id="text-align-right" align="left" value="&alignRight.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="EditorAlign('cmd_align', 'justify')">
|
||||
<button class="borderless" id="text-align-justify" align="left" value="&alignJustify.label;"/>
|
||||
<button class="plain" id="text-align-justify" align="left" value="&alignJustify.label;"/>
|
||||
</menuitem>
|
||||
</menupopup>
|
||||
|
||||
<!-- InsertPopup is used by messengercompose.xul -->
|
||||
<menupopup id="InsertPopup">
|
||||
<menuitem oncommand="goDoCommand('cmd_link')">
|
||||
<button class="borderless" id="linkButton-dark" darkcolor="true" align="left" value="&linkToolbarCmd.label;"/>
|
||||
<button class="plain" id="linkButton-dark" darkcolor="true" align="left" value="&linkToolbarCmd.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="goDoCommand('cmd_anchor')">
|
||||
<button class="borderless" id="namedAnchorButton-dark" align="left" value="&anchorToolbarCmd.label;"/>
|
||||
<button class="plain" id="namedAnchorButton-dark" align="left" value="&anchorToolbarCmd.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="goDoCommand('cmd_image')">
|
||||
<button class="borderless" id="imageButton-dark" align="left" value="&imageToolbarCmd.label;"/>
|
||||
<button class="plain" id="imageButton-dark" align="left" value="&imageToolbarCmd.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="goDoCommand('cmd_hline')">
|
||||
<button class="borderless" id="hlineButton-dark" align="left" value="&hruleToolbarCmd.label;"/>
|
||||
<button class="plain" id="hlineButton-dark" align="left" value="&hruleToolbarCmd.label;"/>
|
||||
</menuitem>
|
||||
<menuitem oncommand="goDoCommand('cmd_table')">
|
||||
<button class="borderless" id="tableButton-dark" align="left" value="&tableToolbarCmd.label;"/>
|
||||
<button class="plain" id="tableButton-dark" align="left" value="&tableToolbarCmd.label;"/>
|
||||
</menuitem>
|
||||
</menupopup>
|
||||
|
||||
@@ -860,15 +860,14 @@
|
||||
tooltip="aTooltip" tooltiptext="&AlignPopupButton.tooltip;"/>
|
||||
|
||||
<!-- Edit Mode toolbar -->
|
||||
<button id="NormalModeButton" class="EditModeButton plain" type="text" selected="1" value="&normalMode.label;" onclick="SetEditMode(1)"
|
||||
<button id="NormalModeButton" class="edit-mode plain" type="text" selected="1" value="&normalMode.label;" onclick="SetEditMode(1)"
|
||||
tooltip="aTooltip" tooltiptext="&normalMode.tooltip;"/>
|
||||
<button id="TagModeButton" class="EditModeButton plain" type="text" selected="0" value="&showAllTags.label;" onclick="SetEditMode(2)"
|
||||
<button id="TagModeButton" class="edit-mode plain" type="text" selected="0" value="&showAllTags.label;" onclick="SetEditMode(2)"
|
||||
tooltip="aTooltip" tooltiptext="&showAllTags.tooltip;"/>
|
||||
<button id="SourceModeButton" class="EditModeButton plain" type="text" selected="0" value="&sourceMode.label;" onclick="SetEditMode(3)"
|
||||
<button id="SourceModeButton" class="edit-mode plain" type="text" selected="0" value="&sourceMode.label;" onclick="SetEditMode(3)"
|
||||
tooltip="aTooltip" tooltiptext="&sourceMode.tooltip;"/>
|
||||
<button id="PreviewModeButton" class="EditModeButton plain" type="text" selected="0" value="&previewMode.label;" onclick="SetEditMode(0)"
|
||||
<button id="PreviewModeButton" class="edit-mode plain" type="text" selected="0" value="&previewMode.label;" onclick="SetEditMode(0)"
|
||||
tooltip="aTooltip" tooltiptext="&previewMode.tooltip;"/>
|
||||
<!-- button id="ToggleEditModeType" class="plain" onclick="ToggleEditModeType()"/ -->
|
||||
<image id="ToggleEditModeType" onclick="ToggleEditModeType()"
|
||||
tooltip="aTooltip" tooltiptext="&ToggleEditModeType.tooltip;"/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user