Remove workarounds in publish dialog for menulist sizing problem (bug 131481). patch from cmanske, r=bryner, sr=jag.
git-svn-id: svn://10.0.0.236/trunk@119192 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -208,11 +208,7 @@ function FillSiteList()
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
var name = gPublishSiteData[i].siteName;
|
||||
// XXX Bug 131481: Using "max-width" style and "crop" attribute
|
||||
// don't constrain grid width properly, resulting in cut-off buttons
|
||||
// We'll truncate label strings to prevent this problem
|
||||
var menuitem = AppendLabelAndValueToMenulist(gDialog.SiteList,
|
||||
TruncateStringAtWordEnd(name, 30, true), name);
|
||||
var menuitem = AppendStringToMenulist(gDialog.SiteList, name);
|
||||
// Highlight the default site
|
||||
if (name == gDefaultSiteName)
|
||||
{
|
||||
@@ -349,10 +345,6 @@ function SwitchPanel(panel)
|
||||
gDialog.SettingsTab.selected = null;
|
||||
}
|
||||
gCurrentPanel = panel;
|
||||
|
||||
// XXX Another hack to workaround bug 131481
|
||||
// Resize dialog to be sure buttons are not cut off the right
|
||||
window.sizeToContent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,14 +501,8 @@ function ValidateSettings()
|
||||
var selectedItem = gDialog.SiteList.selectedItem;
|
||||
if (selectedItem && selectedItem.getAttribute("label") != siteName)
|
||||
{
|
||||
// XXX More hacks to workaround bug 131481
|
||||
// The real sitename
|
||||
selectedItem.setAttribute("value", siteName);
|
||||
|
||||
// Truncate string to show in the menulist
|
||||
var truncatedName = TruncateStringAtWordEnd(siteName, 30, true);
|
||||
selectedItem.setAttribute("label", truncatedName);
|
||||
gDialog.SiteList.setAttribute("label", truncatedName);
|
||||
selectedItem.setAttribute("label", siteName);
|
||||
gDialog.SiteList.setAttribute("label", siteName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,9 +64,8 @@
|
||||
<row align="center">
|
||||
<label value="&siteList.label;"/>
|
||||
<!-- Contents filled in at runtime -->
|
||||
<!-- XXX Hack: max-width set to workaroung bug 131481 -->
|
||||
<menulist id="SiteList"
|
||||
style="min-width:15em; max-width:30em;" crop="right"
|
||||
style="min-width:18em; max-width:18em;" crop="right"
|
||||
oncommand="SelectSiteList();"/>
|
||||
<hbox>
|
||||
<button label="&newSiteButton.label;" oncommand="AddNewSite();"/>
|
||||
@@ -130,7 +129,7 @@
|
||||
<!-- SETTINGS PANEL -->
|
||||
<hbox id="SettingsPanel">
|
||||
<!-- from EditorPublishOverlay.xul -->
|
||||
<vbox id="PublishSettingsInputs"/>
|
||||
<vbox id="PublishSettingsInputs" flex="1"/>
|
||||
</hbox><!-- Settings Panel -->
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
Reference in New Issue
Block a user