Skip to content

Commit

Permalink
Merge branch 'release-1.14.0rc4'
Browse files Browse the repository at this point in the history
* release-1.14.0rc4:
  Update version info.
  ui: fix behavior for "Open Source URL"
  ui: fix "Index" and "Site Map" don't work when editor toolbar not shown
  ui: fix status popup not shown if toolbar button not placed
  doc: revise release notes
  • Loading branch information
danny0838 committed Jan 8, 2017
2 parents 393eeb8 + 834a2a1 commit 9f85f70
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 20 deletions.
2 changes: 1 addition & 1 deletion chrome/content/scrapbook/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2824,7 +2824,7 @@ var sbInfoViewer = {
},

loadFile: function(aFileName) {
var file = sbCommonUtils.getContentDir(sbPageEditor.item.id); file.append(aFileName);
var file = sbCommonUtils.getContentDir(sbBrowserOverlay.getID()); file.append(aFileName);
var url = sbCommonUtils.convertFileToURL(file);
var dataXml = sbCommonUtils.convertURLToFile(url);
// later Firefox version doesn't allow loading .xsl in the upper directory
Expand Down
7 changes: 3 additions & 4 deletions chrome/content/scrapbook/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,14 @@ var sbBrowserOverlay = {
}
},

onStatusPanelPopupShowing: function(event) {
onStatusPopupShowing: function(event) {
var popup = event.originalTarget;
var popupSource = document.getElementById("ScrapBookStatusPopup");
popupSource.showPopup();
sbInfoViewer.onPopupShowing();
while (popupSource.firstChild) popup.appendChild(popupSource.firstChild);
popupSource.hidePopup();
},

onStatusPanelPopupHiding: function(event) {
onStatusPopupHiding: function(event) {
var popup = event.originalTarget;
var popupSource = document.getElementById("ScrapBookStatusPopup");
while (popup.firstChild) popupSource.appendChild(popup.firstChild);
Expand Down
31 changes: 18 additions & 13 deletions chrome/content/scrapbook/overlay.xul
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@
<menuitem id="ScrapBookToolsMenu" label="ScrapBook X" accesskey="K" key="key_openScrapBookSidebar" observes="viewScrapBookSidebar" />
</menupopup>

<popupset id="mainPopupSet">
<!-- toolbar dropdown and/or status popup -->
<menupopup id="ScrapBookStatusPopup">
<menuitem id="ScrapBookStatusPopupS" label="&sb.open.source;" oncommand="sbInfoViewer.openSourceURL(false);" onclick="if (event.button != 1) return; sbInfoViewer.openSourceURL(true); event.originalTarget.parentNode.hidePopup(); event.preventDefault();" />
<menuitem id="ScrapBookStatusPopupM" label="&sb.info.sitemap;" oncommand="sbInfoViewer.loadFile('sitemap.xml');" />
<menuitem id="ScrapBookStatusPopupR" label="&sb.renew;..." oncommand="sbInfoViewer.renew(true);" onclick="if (event.button == 1) sbInfoViewer.renew(false);" class="menuitem-iconic sb-capture-target" />
<menuitem id="ScrapBookStatusPopupT" label="&sb.internalize;..." tooltiptext="&sb.internalize.help;" oncommand="sbInfoViewer.internalize();" class="menuitem-iconic sb-capture-target" />
<menuseparator />
<menuitem id="ScrapBookStatusPopupD" label="&sb.indicators;" type="checkbox" oncommand="sbInfoViewer.toggleIndicator(this.getAttribute('checked'));" persist="checked" />
<menuitem id="ScrapBookStatusPopupI" label="&sb.toolbar.info;" type="checkbox" oncommand="sbInfoViewer.toggle();" />
<menuitem id="ScrapBookStatusPopupE" label="&sb.toolbar.edit;" type="checkbox" oncommand="sbPageEditor.toggle();" />
<menuseparator />
<menuitem id="ScrapBookEditBefore" label="&sb.editbefore;" type="checkbox" autocheck="false" oncommand="this.getAttribute('checked') == 'false' ? sbPageEditor.init() : sbPageEditor.exit();" />
</menupopup>
</popupset>

<!-- toolbar button -->
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="scrapbook-button"
Expand All @@ -96,18 +112,7 @@
oncommand="if (event.originalTarget.localName == 'toolbarbutton') toggleSidebar('viewScrapBookSidebar');"
onclick="if (event.originalTarget.localName == 'toolbarbutton') if (event.button == 1) sbCommonUtils.openManageWindow();"
ondragover="toggleSidebar('viewScrapBookSidebar',true);">
<menupopup id="ScrapBookStatusPopup" onpopupshowing="sbInfoViewer.onPopupShowing(event);">
<menuitem id="ScrapBookStatusPopupS" label="&sb.open.source;" oncommand="sbInfoViewer.openSourceURL(false);" onclick="if (event.button == 1) sbInfoViewer.openSourceURL(true); document.getElementById('ScrapBookStatusPopup').hidePopup();" />
<menuitem id="ScrapBookStatusPopupM" label="&sb.info.sitemap;" oncommand="sbInfoViewer.loadFile('sitemap.xml');" />
<menuitem id="ScrapBookStatusPopupR" label="&sb.renew;..." oncommand="sbInfoViewer.renew(true);" onclick="if (event.button == 1) sbInfoViewer.renew(false);" class="menuitem-iconic sb-capture-target" />
<menuitem id="ScrapBookStatusPopupT" label="&sb.internalize;..." tooltiptext="&sb.internalize.help;" oncommand="sbInfoViewer.internalize();" class="menuitem-iconic sb-capture-target" />
<menuseparator />
<menuitem id="ScrapBookStatusPopupD" label="&sb.indicators;" type="checkbox" oncommand="sbInfoViewer.toggleIndicator(this.getAttribute('checked'));" persist="checked" />
<menuitem id="ScrapBookStatusPopupI" label="&sb.toolbar.info;" type="checkbox" oncommand="sbInfoViewer.toggle();" />
<menuitem id="ScrapBookStatusPopupE" label="&sb.toolbar.edit;" type="checkbox" oncommand="sbPageEditor.toggle();" />
<menuseparator />
<menuitem id="ScrapBookEditBefore" label="&sb.editbefore;" type="checkbox" autocheck="false" oncommand="this.getAttribute('checked') == 'false' ? sbPageEditor.init() : sbPageEditor.exit();" />
</menupopup>
<menupopup id="ScrapBookStatusPopup2" onpopupshowing="sbBrowserOverlay.onStatusPopupShowing(event);" onpopuphiding="sbBrowserOverlay.onStatusPopupHiding(event);" />
</toolbarbutton>
</toolbarpalette>

Expand Down Expand Up @@ -274,7 +279,7 @@
<statusbarpanel id="ScrapBookStatusPanel"
class="statusbarpanel-menu-iconic"
onclick="if (event.originalTarget.localName == 'statusbarpanel') if (event.button == 1) { toggleSidebar('viewScrapBookSidebar'); event.stopPropagation(); }">
<menupopup id="ScrapBookStatusPanelPopup" onpopupshowing="sbBrowserOverlay.onStatusPanelPopupShowing(event);" onpopuphiding="sbBrowserOverlay.onStatusPanelPopupHiding(event);" />
<menupopup id="ScrapBookStatusPopup1" onpopupshowing="sbBrowserOverlay.onStatusPopupShowing(event);" onpopuphiding="sbBrowserOverlay.onStatusPopupHiding(event);" />
</statusbarpanel>
</statusbar>
</overlay>
2 changes: 1 addition & 1 deletion doc/releases/1.14.0rc3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Changes since v1.14.0rc2
no source URL recorded.

* Fixed an issue that "Open Source URL" in the toolbar dropdown menu
doesn't work for non-HTMl files.
doesn't work for non-HTML files.

* "Open Source URL" in the toolbar dropdown menu now loads the page
with the current hash.
Expand Down
16 changes: 16 additions & 0 deletions doc/releases/1.14.0rc4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Scrapbook X 1.14.0rc4
=====================

Changes since v1.14.0rc3
------------------------

* Fixed the abnormal behavior of the "Open Source URL" in the toolbar
dropdown menu when clicked.

* Fixed an issue that the "Index" and "Site Map" commands doesn't work
if the editor toolbar is not switched shown.

* Fixed an issue that status popup never shown if the toolbar button is
not placed.

Also includes some code clean-up and documentation improvements.
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:type>2</em:type>
<em:version>1.14.0rc3</em:version>
<em:version>1.14.0rc4</em:version>
<em:unpack>false</em:unpack>
<em:bootstrap>false</em:bootstrap>
<em:multiprocessCompatible>false</em:multiprocessCompatible>
Expand Down

0 comments on commit 9f85f70

Please sign in to comment.