mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
fix bugs #56139 and (partially) #57206; r=cmanske; sr=kin; remove table height until css support for it is provided; always write valign until we know how to search up the tree
This commit is contained in:
parent
55ae8fb03f
commit
6ba1558722
@ -51,10 +51,8 @@ function Startup()
|
||||
dialog.rowsInput = document.getElementById("rowsInput");
|
||||
dialog.columnsInput = document.getElementById("columnsInput");
|
||||
dialog.widthInput = document.getElementById("widthInput");
|
||||
dialog.heightInput = document.getElementById("heightInput");
|
||||
dialog.borderInput = document.getElementById("borderInput");
|
||||
dialog.widthPixelOrPercentMenulist = document.getElementById("widthPixelOrPercentMenulist");
|
||||
dialog.heightPixelOrPercentMenulist = document.getElementById("heightPixelOrPercentMenulist");
|
||||
|
||||
// Make a copy to use for AdvancedEdit
|
||||
globalElement = tableElement.cloneNode(false);
|
||||
@ -94,7 +92,6 @@ function InitDialog()
|
||||
// Get the width attribute of the element, stripping out "%"
|
||||
// This sets contents of menu combobox list
|
||||
dialog.widthInput.value = InitPixelOrPercentMenulist(globalElement, tableElement, "widthInput","widthPixelOrPercentMenulist", gPercent);
|
||||
dialog.heightInput.value = InitPixelOrPercentMenulist(globalElement, tableElement, "heightInput","heightPixelOrPercentMenulist", gPixel);
|
||||
dialog.borderInput.value = globalElement.getAttribute("border");
|
||||
}
|
||||
|
||||
@ -160,25 +157,6 @@ function ValidateData()
|
||||
globalElement.setAttribute("width", widthText);
|
||||
}
|
||||
|
||||
isPercent = (dialog.heightPixelOrPercentMenulist.selectedIndex == 1);
|
||||
var heightText = TrimString(dialog.heightInput.value);
|
||||
if (heightText.length > 0)
|
||||
{
|
||||
if (isPercent)
|
||||
maxLimit = 100;
|
||||
else
|
||||
// Upper limit when using pixels
|
||||
maxLimit = maxPixels;
|
||||
|
||||
heightText = ValidateNumberString(heightText, 1, maxLimit);
|
||||
if (heightText.length == 0)
|
||||
return false;
|
||||
|
||||
if (isPercent)
|
||||
heightText += "%";
|
||||
|
||||
globalElement.setAttribute("height", heightText);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -68,13 +68,6 @@
|
||||
<menulist id="widthPixelOrPercentMenulist"><menupopup/></menulist>
|
||||
<!-- child elements are appended by JS -->
|
||||
</row>
|
||||
<row valign="middle" text-align="right" autostretch="never">
|
||||
<text class="label align-right" value="&heightEditField.label;"
|
||||
tooltip="aTooltip" tooltiptext="&heightEditField.tooltip;" />
|
||||
<textfield class="narrow" id="heightInput" onkeyup="forceInteger(this.id)" />
|
||||
<menulist id="heightPixelOrPercentMenulist"><menupopup/></menulist>
|
||||
<!-- child elements are appended by JS -->
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<spring class="spacer"/>
|
||||
|
@ -99,8 +99,6 @@ function Startup()
|
||||
// Get dialog widgets - Table Panel
|
||||
dialog.TableRowsInput = document.getElementById("TableRowsInput");
|
||||
dialog.TableColumnsInput = document.getElementById("TableColumnsInput");
|
||||
dialog.TableHeightInput = document.getElementById("TableHeightInput");
|
||||
dialog.TableHeightUnits = document.getElementById("TableHeightUnits");
|
||||
dialog.TableWidthInput = document.getElementById("TableWidthInput");
|
||||
dialog.TableWidthUnits = document.getElementById("TableWidthUnits");
|
||||
dialog.BorderWidthInput = document.getElementById("BorderWidthInput");
|
||||
@ -259,7 +257,6 @@ function InitDialog()
|
||||
// Get Table attributes
|
||||
dialog.TableRowsInput.value = rowCount;
|
||||
dialog.TableColumnsInput.value = colCount;
|
||||
dialog.TableHeightInput.value = InitPixelOrPercentMenulist(globalTableElement, TableElement, "height", "TableHeightUnits", gPercent);
|
||||
dialog.TableWidthInput.value = InitPixelOrPercentMenulist(globalTableElement, TableElement, "width", "TableWidthUnits", gPercent);
|
||||
dialog.BorderWidthInput.value = globalTableElement.border;
|
||||
dialog.SpacingInput.value = globalTableElement.cellSpacing;
|
||||
@ -306,7 +303,7 @@ function InitCellPanel()
|
||||
dialog.CellHeightInput.value = InitPixelOrPercentMenulist(globalCellElement, CellElement, "height", "CellHeightUnits", gPercent);
|
||||
dialog.CellHeightCheckbox.checked = AdvancedEditUsed && previousValue != dialog.CellHeightInput.value;
|
||||
|
||||
previousValue= dialog.CellHeightInput.value;
|
||||
previousValue= dialog.CellWidthInput.value;
|
||||
dialog.CellWidthInput.value = InitPixelOrPercentMenulist(globalCellElement, CellElement, "width", "CellWidthUnits", gPixel);
|
||||
dialog.CellWidthCheckbox.checked = AdvancedEditUsed && previousValue != dialog.CellWidthInput.value;
|
||||
|
||||
@ -847,11 +844,6 @@ function ValidateTableData()
|
||||
if (error) return false;
|
||||
|
||||
|
||||
ValidateNumber("TableHeightInput", dialog.TableHeightUnits,
|
||||
1, maxPixels, globalTableElement, "height");
|
||||
if (error) return false;
|
||||
|
||||
|
||||
ValidateNumber("TableWidthInput", dialog.TableWidthUnits,
|
||||
1, maxPixels, globalTableElement, "width");
|
||||
if (error) return false;
|
||||
@ -937,7 +929,8 @@ function ValidateCellData()
|
||||
}
|
||||
|
||||
if (dialog.CellVAlignCheckbox.checked)
|
||||
SetAlign("CellVAlignList", defVAlign, globalCellElement, "valign");
|
||||
SetAlign("CellVAlignList", "", globalCellElement, "valign");
|
||||
// SetAlign("CellVAlignList", defVAlign, globalCellElement, "valign");
|
||||
|
||||
if (dialog.TextWrapCheckbox.checked)
|
||||
{
|
||||
@ -1221,7 +1214,6 @@ function ApplyTableAttributes()
|
||||
}
|
||||
}
|
||||
|
||||
CloneAttribute(TableElement, globalTableElement, "height");
|
||||
CloneAttribute(TableElement, globalTableElement, "width");
|
||||
CloneAttribute(TableElement, globalTableElement, "border");
|
||||
CloneAttribute(TableElement, globalTableElement, "cellspacing");
|
||||
|
@ -73,11 +73,6 @@
|
||||
<grid>
|
||||
<columns><column/><column/><column/></columns>
|
||||
<rows>
|
||||
<row valign="middle">
|
||||
<text class="label" value="&tableHeight.label;"/>
|
||||
<textfield class="narrow" id="TableHeightInput" onkeyup="forceInteger(this.id);"/>
|
||||
<menulist id="TableHeightUnits"/>
|
||||
</row>
|
||||
<row valign="middle">
|
||||
<text class="label" value="&tableWidth.label;"/>
|
||||
<textfield class="narrow" id="TableWidthInput" onkeyup="forceInteger(this.id);"/>
|
||||
|
@ -27,8 +27,6 @@
|
||||
<!ENTITY numRowsEditField.label "Rows:">
|
||||
<!ENTITY numColumnsEditField.label "Columns:">
|
||||
<!ENTITY widthEditField.label "Width:">
|
||||
<!ENTITY heightEditField.label "Height:">
|
||||
<!ENTITY heightEditField.tooltip "Type a number, then choose pixels or a percentage of the window or parent cell">
|
||||
<!ENTITY borderEditField.label "Border:">
|
||||
<!ENTITY borderEditField.tooltip "Type a number for the table's border, or type zero (0) for no border">
|
||||
<!ENTITY pixels.label "pixels">
|
||||
|
Loading…
Reference in New Issue
Block a user