зеркало из https://github.com/mozilla/pjs.git
Fixed editor dialogs to work with now-fixed autosizing window. Changed buttons to titledbuttons for better layout. Reviewed by sfraser, approved by chofmann
This commit is contained in:
Родитель
dca858b78d
Коммит
883427f419
|
@ -7,13 +7,14 @@
|
|||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" flex="100%">
|
||||
align="vertical">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
</script>
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdHLineProps.js">
|
||||
</script>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
@ -56,22 +57,17 @@
|
|||
<label><input type="checkbox" id="3dShading"/>3-D Shading</label>
|
||||
</td>
|
||||
<td align="right">
|
||||
<button class="spaced" id="SaveDefault" onclick="onSaveDefault()">Save settings</button>
|
||||
<xul:titledbutton class="spaced" id="SaveDefault" onclick="onSaveDefault()" value="Save settings"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr width="100%"/>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<button class="spaced" id="Advanced" onclick="onAdvanced()">More Attributes...</button>
|
||||
</td>
|
||||
<td align="right">
|
||||
<button class="spaced" id="OK" onclick="onOK()">OK</button>
|
||||
<button class="spaced" id="Cancel" onclick="onCancel()">Cancel</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<xul:box>
|
||||
<xul:titledbutton class="spaced" id="Advanced" onclick="onAdvanced()" value="More Attributes..."/>
|
||||
<xul:spring flex="100%"/>
|
||||
<xul:titledbutton class="spaced" id="OK" onclick="onOK()" value="OK"/>
|
||||
<xul:titledbutton class="spaced" id="Cancel" onclick="onCancel()" value="Cancel"/>
|
||||
</xul:box>
|
||||
|
||||
<xul:popup id="PixelOrPercentMenu">
|
||||
<xul:menu>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" flex="100%">
|
||||
align="vertical">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
|
@ -17,6 +17,7 @@
|
|||
</script>
|
||||
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
<?xml-stylesheet href="chrome://editordlgs/skin/EditorDialog.css" type="text/css"?>
|
||||
<!DOCTYPE window>
|
||||
|
||||
<xul:window width="320" height="255" title="Insert HTML"
|
||||
<xul:window title="Insert HTML"
|
||||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()">
|
||||
onload = "Startup()"
|
||||
align="vertical">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
|
@ -15,7 +16,6 @@
|
|||
</script>
|
||||
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -30,8 +30,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align = "right">
|
||||
<button class="spaced" id="OK" onclick="onOK()" width="50">OK</button>
|
||||
<button class="spaced" id="Cancel" onclick="onCancel()" width="50">Cancel</button>
|
||||
<xul:titledbutton class="spaced" id="OK" onclick="onOK()" value="OK"/>
|
||||
<xul:titledbutton class="spaced" id="Cancel" onclick="onCancel()" value="Cancel"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -59,14 +59,12 @@ function onOK()
|
|||
for (i = 0; i < rows; i++)
|
||||
{
|
||||
newRow = editorShell.CreateElementWithDefaults("tr");
|
||||
dump("New row "+i+": "+newRow+"\n");
|
||||
if (newRow)
|
||||
{
|
||||
tableElement.appendChild(newRow);
|
||||
for (j = 0; j < columns; j++)
|
||||
{
|
||||
newCell = editorShell.CreateElementWithDefaults("td");
|
||||
dump("New cell "+j+": "+newCell+"\n");
|
||||
if (newCell)
|
||||
{
|
||||
newRow.appendChild(newCell);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" flex="100%">
|
||||
align="vertical">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
|
@ -34,15 +34,10 @@
|
|||
</tr>
|
||||
</table>
|
||||
<hr width="100%"/>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<button class="spaced" id="Advanced" onclick="onAdvanced()">More Attributes...</button>
|
||||
</td>
|
||||
<td align="right">
|
||||
<button class="spaced" id="OK" onclick="onOK()">OK</button>
|
||||
<button class="spaced" id="Cancel" onclick="onCancel()">Cancel</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<xul:box>
|
||||
<xul:titledbutton class="spaced" id="Advanced" onclick="onAdvanced()" value="More Attributes..."/>
|
||||
<xul:spring flex="100%"/>
|
||||
<xul:titledbutton class="spaced" id="OK" onclick="onOK()" value="OK"/>
|
||||
<xul:titledbutton class="spaced" id="Cancel" onclick="onCancel()" value="Cancel"/>
|
||||
</xul:box>
|
||||
</xul:window>
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" flex="100%">
|
||||
align="vertical">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
</script>
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdLinkProps.js">
|
||||
</script>
|
||||
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
<table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<fieldset><legend align="left">Link source </legend>
|
||||
|
@ -35,16 +35,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<button class="spaced" id="Advanced" onclick="onAdvanced()">More Attributes...</button>
|
||||
</td>
|
||||
<td align="right">
|
||||
<button class="spaced" id="OK" onclick="onOK()">OK</button>
|
||||
<button class="spaced" id="Cancel" onclick="onCancel()">Cancel</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<xul:box>
|
||||
<xul:titledbutton class="spaced" id="Advanced" onclick="onAdvanced()" value="More Attributes..."/>
|
||||
<xul:spring flex="100%"/>
|
||||
<xul:titledbutton class="spaced" id="OK" onclick="onOK()" value="OK"/>
|
||||
<xul:titledbutton class="spaced" id="Cancel" onclick="onCancel()" value="Cancel"/>
|
||||
</xul:box>
|
||||
</xul:window>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" flex="100%">
|
||||
align="vertical">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
|
@ -25,16 +25,20 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- A classic case of box layout fighting what I want to do!
|
||||
<xul:box flex="100%">
|
||||
<div class="spacedtext">
|
||||
Enter a name for this target:
|
||||
</div>
|
||||
<input type="text" id="name" size="30"/>
|
||||
</xul:box>
|
||||
-->
|
||||
<hr width="100%"/>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<button class="spaced" id="Advanced" onclick="onAdvanced()">More Attributes...</button>
|
||||
</td>
|
||||
<td align="right">
|
||||
<button class="spaced" id="OK" onclick="onOK()">OK</button>
|
||||
<button class="spaced" id="Cancel" onclick="onCancel()">Cancel</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<xul:box>
|
||||
<xul:titledbutton class="spaced" id="Advanced" onclick="onAdvanced()" value="More Attributes..."/>
|
||||
<xul:spring flex="100%"/>
|
||||
<xul:titledbutton class="spaced" id="OK" onclick="onOK()" value="OK"/>
|
||||
<xul:titledbutton class="spaced" id="Cancel" onclick="onCancel()" value="Cancel"/>
|
||||
</xul:box>
|
||||
|
||||
</xul:window>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns="http://www.w3.org/TR/REC-html40"
|
||||
onload = "Startup()"
|
||||
align="vertical" flex="100%">
|
||||
align="vertical">
|
||||
|
||||
<script language="JavaScript" src="chrome://editordlgs/content/EdDialogCommon.js">
|
||||
</script>
|
||||
|
@ -15,6 +15,7 @@
|
|||
</script>
|
||||
<!-- The argument to ShowWindowWithArgs (the editor appCore name) is placed here -->
|
||||
<xul:broadcaster id="args" value=""/>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
|
@ -26,7 +27,7 @@
|
|||
<input type="text" class="SpellCheckWord" id="Word" size="10"/>
|
||||
</td>
|
||||
<td>
|
||||
<button width="30" id="CheckWord" onclick="CheckWord()">Check word</button>
|
||||
<xul:titledbutton class="SizeToCell" id="CheckWord" onclick="CheckWord()" value="Check word"/>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
|
@ -50,18 +51,18 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button width="30" id="Ignore" onclick="Ignore()">Ignore</button>
|
||||
<xul:titledbutton class="SizeToCell" id="Ignore" onclick="Ignore()" value="Ignore"/>
|
||||
</td>
|
||||
<td>
|
||||
<button width="30" id="IgnoreAll" onclick="IgnoreAll()">Ignore All</button>
|
||||
<xul:titledbutton class="SizeToCell" id="IgnoreAll" onclick="IgnoreAll()" value="Ignore All"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button width="30" id="Replace" onclick="Replace()">Change</button>
|
||||
<xul:titledbutton class="SizeToCell" id="Replace" onclick="Replace()" value="Change"/>
|
||||
</td>
|
||||
<td>
|
||||
<button width="30" id="ReplaceAll" onclick="ReplaceAll()">Change All</button>
|
||||
<xul:titledbutton class="SizeToCell" id="ReplaceAll" onclick="ReplaceAll()" value="Change All"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -71,10 +72,10 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button width="30" id="AddToDictionary" onclick="AddToDictionary()">Add</button>
|
||||
<xul:titledbutton class="SizeToCell" id="AddToDictionary" onclick="AddToDictionary()" value="Add"/>
|
||||
</td>
|
||||
<td>
|
||||
<button width="30" id="EditDictionary" onclick="EditDictionary()">Edit</button>
|
||||
<xul:titledbutton class="SizeToCell" id="EditDictionary" onclick="EditDictionary()" value="Edit"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -90,7 +91,7 @@
|
|||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button id="Close" onclick="Close()">Close</button>
|
||||
<xul:titledbutton class="SizeToCell" id="Close" onclick="Close()" value="Close"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -148,6 +148,9 @@ titledbutton.PixelOrPercent {
|
|||
min-width: 7em;
|
||||
}
|
||||
|
||||
titledbutton.SizeToCell {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 2px;
|
||||
|
|
Загрузка…
Ссылка в новой задаче