Bug 346605 - Make openHelp() calls call suiterunner help correctly: Remove help buttons/js from Composer dialogs and use an overlay in suite/common instead. r=IanN, sr=Neil.

git-svn-id: svn://10.0.0.236/trunk@226362 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
stefanh%inbox.com 2007-05-13 21:36:09 +00:00
parent a3320b3746
commit 0e41748e11
21 changed files with 150 additions and 106 deletions

View File

@ -354,12 +354,6 @@ function AddTreeItem ( name, value, treeChildrenId, attArray )
return treeitem;
}
function doHelpButton()
{
openHelp("advanced_property_editor");
return true;
}
function selectTreeItem(treeChildren, item)
{
var index = treeChildren.parentNode.contentView.getIndexOfItem(item);

View File

@ -48,13 +48,13 @@
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EdAdvancedEdit.dtd">
<dialog title="&WindowTitle.label;"
id="advancedEditDlg"
style="width: 40em;"
xmlns ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
buttons="accept,cancel,help"
buttons="accept,cancel"
ondialogaccept="return onAccept();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
@ -67,7 +67,6 @@
<!-- global dialog functions -->
<script type="application/x-javascript" src="chrome://editor/content/EdAdvancedEdit.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<broadcaster id="args" value=""/>

View File

@ -57,11 +57,6 @@ function Startup(){
initDialog();
}
function doHelpButton()
{
openHelp("imagemap_properties");
}
function initDialog(){
//Get image element from parent
imageElement = window.arguments[0];

View File

@ -49,15 +49,13 @@
<dialog title="&windowTitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload = "Startup()"
buttons="accept,cancel,help"
buttons="accept,cancel"
ondialogaccept="return finishMap();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js" />
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<!-- Methods for Image Map only -->
<script type="application/x-javascript" src="chrome://editor/content/EdImageMap.js" />

View File

@ -188,12 +188,6 @@ function ValidateData()
return ValidateImage();
}
function doHelpButton()
{
openHelp("image_properties");
return true;
}
function onAccept()
{
// Use this now (default = false) so Advanced Edit button dialog doesn't trigger error message

View File

@ -54,16 +54,14 @@
<dialog id="imageDlg" title="&windowTitle.label;"
xmlns ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload = "Startup()"
buttons="accept,cancel,help"
buttons="accept,cancel"
ondialogaccept="return onAccept();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdImageProps.js"/>
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<broadcaster id="args" value=""/>

View File

@ -308,12 +308,6 @@ function ValidateData()
return true;
}
function doHelpButton()
{
openHelp("link_properties");
return true;
}
function onAccept()
{
if (ValidateData())

View File

@ -47,16 +47,14 @@
<dialog id="linkDlg" title="&windowTitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="accept,cancel,help"
buttons="accept,cancel"
onload = "Startup()"
ondialogaccept="return onAccept();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdLinkProps.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<broadcaster id="args" value=""/>
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>

View File

@ -1303,11 +1303,6 @@ function Apply()
return false;
}
function doHelpButton()
{
openHelp("table_properties");
}
function onAccept()
{
// Do same as Apply and close window if ValidateData succeeded

View File

@ -46,22 +46,21 @@
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">
<dialog title="&tableWindow.title;"
id="tableDlg"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
buttons="accept,extra1,cancel,help"
buttons="accept,extra1,cancel"
buttonlabelclose="&closeButton.label;"
buttonlabelextra1="&applyButton.label;"
buttonaccesskeyextra1="&applyButton.accesskey;"
ondialogaccept="return onAccept();"
ondialogextra1="return Apply();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdTableProps.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<broadcaster id="args" value=""/>

View File

@ -561,14 +561,6 @@ function ShowErrorInPanel(tab, errorMsgId, widgetWithError)
SetTextboxFocus(widgetWithError);
}
function doHelpButton()
{
if (gDialog.TabBox.selectedTab == gDialog.PublishTab)
openHelp("comp-doc-publish-publishtab");
else
openHelp("comp-doc-publish-settingstab");
}
function onAccept()
{
if (ValidateData())

View File

@ -46,20 +46,19 @@
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPublish.dtd">
<dialog title="&windowTitle.label;"
id="publishDlg"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
buttons="accept,cancel,help"
buttons="accept,cancel"
buttonlabelaccept="&publishButton.label;"
ondialogaccept="return onAccept();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorPublish.js"/>
<script type="application/x-javascript" src="chrome://editor/content/publishprefs.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<broadcaster id="args" value=""/>

View File

@ -371,11 +371,6 @@ function AllowDefaultButton()
gAllowEnterKey = true;
}
function doTroubleshooting()
{
openHelp("comp-doc-publish-troubleshooting");
}
function onEnterKey()
{
if (gAllowEnterKey)

View File

@ -45,6 +45,7 @@
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPublishProgress.dtd">
<!-- dialog containing a control requiring initial setup -->
<dialog title=""
id="publishProgressDlg"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="cancel"
buttonlabelclose="&closeButton.label;"
@ -57,7 +58,6 @@
<script type="application/x-javascript" src="chrome://editor/content/publishprefs.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorPublishProgress.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<broadcaster id="args" value=""/>
@ -99,7 +99,6 @@
<spacer class="bigspacer"/>
<image class="progressitem" progress="failed"/>
<label value="&failed.label;"/>
<button label="&troubleshooting.label;" accesskey="&troubleshooting.accessKey;" oncommand="doTroubleshooting();"/>
</hbox>
</groupbox>
<checkbox id="KeepOpen" label="&keepOpen;" oncommand="CheckKeepOpen();" persist="checked"/>

View File

@ -350,12 +350,6 @@ function UpdateSettings()
return true;
}
function doHelpButton()
{
openHelp("comp-doc-publish-site-settings");
}
function onAccept()
{
// Save any pending changes locally first

View File

@ -46,19 +46,18 @@
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPublish.dtd">
<dialog title="&windowTitleSettings.label;"
id="publishSettingsDlg"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
buttons="accept,cancel,help"
buttons="accept,cancel"
ondialogaccept="return onAccept();"
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
ondialogcancel="return onCancel();">
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorPublishSettings.js"/>
<script type="application/x-javascript" src="chrome://editor/content/publishprefs.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<broadcaster id="args" value=""/>

View File

@ -47,8 +47,6 @@
<!ENTITY filenameHeader.label "Filename">
<!ENTITY succeeded.label "Succeeded">
<!ENTITY failed.label "Failed">
<!ENTITY troubleshooting.label "Troubleshooting">
<!ENTITY troubleshooting.accessKey "T">
<!ENTITY keepOpen "Keep this window open after publishing is complete.">
<!ENTITY closeButton.label "Close">

View File

@ -16,6 +16,13 @@
<!-- Declare overlay points used in this package -->
<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://communicator/content/utilityOverlay.xul"/>
<RDF:li resource="chrome://editor/content/EdAdvancedEdit.xul"/>
<RDF:li resource="chrome://editor/content/EdImageProps.xul"/>
<RDF:li resource="chrome://editor/content/EditorPublish.xul"/>
<RDF:li resource="chrome://editor/content/EditorPublishProgress.xul"/>
<RDF:li resource="chrome://editor/content/EditorPublishSettings.xul"/>
<RDF:li resource="chrome://editor/content/EdLinkProps.xul"/>
<RDF:li resource="chrome://editor/content/EdTableProps.xul"/>
<RDF:li resource="chrome://pippki/content/certViewer.xul"/>
<RDF:li resource="chrome://pippki/content/certManager.xul"/>
<RDF:li resource="chrome://pippki/content/changepassword.xul"/>
@ -56,6 +63,34 @@
<RDF:li>chrome://help/content/helpMenuOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EdAdvancedEdit.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EdImageProps.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EditorPublish.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EditorPublishProgress.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EditorPublishSettings.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EdLinkProps.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://editor/content/EdTableProps.xul">
<RDF:li>chrome://help/content/helpEditorOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://pippki/content/certViewer.xul">
<RDF:li>chrome://help/content/helpSecurityOverlay.xul</RDF:li>
</RDF:Seq>

View File

@ -1,36 +1,10 @@
help.jar:
#ifdef MOZ_XUL_APP
% content help %content/help/ xpcnativewrappers=yes
% overlay chrome://communicator/content/utilityOverlay.xul chrome://help/content/helpMenuOverlay.xul
% overlay chrome://pippki/content/certManager.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/certViewer.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/changepassword.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/device_manager.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/choosetoken.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/clientauthask.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/crlImportDialog.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/deletecert.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/domainMismatch.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/editcacert.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/editemailcert.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/editsslcert.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/escrowWarn.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/getp12password.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/setp12password.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/newserver.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/pref-crlupdate.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/serverCertExpired.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/serverCrlNextupdate.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/crlManager.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/resetpassword.xul chrome://help/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/downloadcert.xul chrome://help/content/helpSecurityOverlay.xul
#else
* content/help/contents.rdf (content/contents.rdf)
#endif
content/help/contextHelp.js (content/contextHelp.js)
content/help/help.js (content/help.js)
content/help/help.xul (content/help.xul)
content/help/helpContextOverlay.xul (content/helpContextOverlay.xul)
content/help/helpEditorOverlay.xul (/suite/common/helpEditorOverlay.xul)
* content/help/helpMenuOverlay.xul (content/helpMenuOverlay.xul)
content/help/helpMessengerOverlay.xul (content/helpMessengerOverlay.xul)
content/help/helpSecurityOverlay.xul (content/helpSecurityOverlay.xul)

View File

@ -0,0 +1,87 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is SeaMonkey internet suite code.
-
- The Initial Developer of the Original Code is
- Mark Banner <bugzilla@standard8.demon.co.uk>
- Portions created by the Initial Developer are Copyright (C) 2006
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Stefan Hermes <stefanh@inbox.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<overlay id="helpEditorOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<script type="application/x-javascript">
<![CDATA[
setHelpFileURI('chrome://communicator/locale/help/suitehelp.rdf');
function doPublishDialogHelpButton()
{
var selTab = document.getElementById('tabBox').selectedTab;
if (selTab.id == "PublishTab")
openHelp('comp-doc-publish-publishtab');
else
openHelp('comp-doc-publish-settingstab');
}
]]>
</script>
<dialog id="advancedEditDlg"
buttons="accept,cancel,help"
ondialoghelp="openHelp('advanced_property_editor');"/>
<dialog id="imageDlg"
buttons="accept,cancel,help"
ondialoghelp="openHelp('image_properties');"/>
<dialog id="linkDlg"
buttons="accept,cancel,help"
ondialoghelp="openHelp('link_properties');"/>
<dialog id="publishDlg"
buttons="accept,cancel,help"
ondialoghelp="doPublishDialogHelpButton();"/>
<dialog id="publishProgressDlg"
buttons="cancel,help"
ondialoghelp="openHelp('comp-doc-publish-troubleshooting');"/>
<dialog id="publishSettingsDlg"
buttons="accept,cancel,help"
ondialoghelp="openHelp('comp-doc-publish-site-settings');"/>
<dialog id="tableDlg"
buttons="accept,extra1,cancel,help"
ondialoghelp="openHelp('table_properties');"/>
</overlay>

View File

@ -9,6 +9,13 @@ comm.jar:
% overlay chrome://help/content/help.xul chrome://communicator/content/helpOverlay.xul
% overlay chrome://communicator/content/tasksOverlay.xul chrome://communicator/content/emOverlay.xul
% overlay chrome://communicator/content/pref/preftree.xul chrome://pippki/content/PrefOverlay.xul
% overlay chrome://editor/content/EdAdvancedEdit.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://editor/content/EdImageProps.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://editor/content/EditorPublish.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://editor/content/EditorPublishProgress.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://editor/content/EditorPublishSettings.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://editor/content/EdLinkProps.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://editor/content/EdTableProps.xul chrome://communicator/content/helpEditorOverlay.xul
% overlay chrome://pippki/content/certManager.xul chrome://communicator/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/certViewer.xul chrome://communicator/content/helpSecurityOverlay.xul
% overlay chrome://pippki/content/changepassword.xul chrome://communicator/content/helpSecurityOverlay.xul
@ -62,6 +69,7 @@ comm.jar:
content/communicator/editorBindings.xul
content/communicator/emOverlay.xul
content/communicator/findUtils.js
content/communicator/helpEditorOverlay.xul
content/communicator/helpMessengerOverlay.xul
content/communicator/helpSecurityOverlay.xul
content/communicator/helpOverlay.js