зеркало из https://github.com/mozilla/gecko-dev.git
fix a couple of regressions related to tree.css merge conflict repair.
This commit is contained in:
Родитель
2863d44669
Коммит
4b94d68de9
|
@ -29,7 +29,6 @@
|
|||
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarks-tree.css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
|
@ -54,8 +53,6 @@
|
|||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<popupset id="aTooltipSet"/>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<grid id="bookmarknamegrid">
|
||||
|
@ -111,7 +108,7 @@
|
|||
<tree id="folders" flex="1" style="height: 12em; width: 0px"
|
||||
class="inset" ref="NC:BookmarksRoot" datasources="rdf:bookmarks"
|
||||
template="file-bookmarks-template"
|
||||
onselect="onTreeSelect();">
|
||||
onselect="onTreeSelect();" onkeypress="event.preventBubble();">
|
||||
<treecols>
|
||||
<treecol flex="1"/>
|
||||
</treecols>
|
||||
|
@ -123,7 +120,7 @@
|
|||
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
class="treecell-indent-editable" editable="true"
|
||||
class="treecell-indent treecell-editable" editable="true"
|
||||
src="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
loading="rdf:http://home.netscape.com/NC-rdf#loading"/>
|
||||
|
@ -151,7 +148,6 @@
|
|||
<box valign="bottom">
|
||||
<box autostretch="never">
|
||||
<checkbox id="dontaskagain" hidden="true"
|
||||
tooltip="aTooltip" tooltiptext="&dontshowmessage.tooltip;"
|
||||
value="&alwayscreateinfolder.label;"
|
||||
accesskey="&alwayscreateinfolder.accesskey;"/>
|
||||
</box>
|
||||
|
|
|
@ -26,12 +26,6 @@
|
|||
|
||||
-->
|
||||
|
||||
<!--
|
||||
// XXX - WARNING - XXX
|
||||
// This file is being reimplemented for Mozilla 0.8. Do NOT make modifications
|
||||
// to this file without consulting ben@netscape.com first.
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarks-tree.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
|
@ -306,18 +300,18 @@
|
|||
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
loading="rdf:http://home.netscape.com/NC-rdf#loading">
|
||||
<treerow>
|
||||
<treecell class="treecell-bookmark treecell-indent-editable"
|
||||
<treecell class="treecell-bookmark treecell-indent treecell-editable"
|
||||
editable="true" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
src="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
web:status="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
loading="rdf:http://home.netscape.com/NC-rdf#loading" />
|
||||
<treecell crop="right" class="treecell-inline-edit" editable="true"
|
||||
<treecell crop="right" class="treecell-editable" editable="true"
|
||||
value="rdf:http://home.netscape.com/NC-rdf#URL"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#ShortcutURL"
|
||||
class="treecell-inline-edit" editable="true"/>
|
||||
class="treecell-editable" editable="true"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Description"
|
||||
class="treecell-inline-edit" editable="true"/>
|
||||
class="treecell-editable" editable="true"/>
|
||||
<treecell value="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate"/>
|
||||
<treecell value="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate"/>
|
||||
|
|
|
@ -21,13 +21,6 @@
|
|||
* Ben Goodger <ben@netscape.com> (Original Author, v2.0)
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// XXX - WARNING - XXX
|
||||
// This file is being reimplemented for Mozilla 0.8. Do NOT make modifications
|
||||
// to this file without consulting ben@netscape.com first. This code is being
|
||||
// rewritten to use the nsDragAndDrop library so changes you make here will
|
||||
// likely be lost.
|
||||
|
||||
var NC_NS = "http://home.netscape.com/NC-rdf#";
|
||||
var RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
|
||||
|
||||
|
@ -142,6 +135,13 @@ var bookmarksDNDObserver = {
|
|||
var dropItem = aEvent.target.parentNode.parentNode;
|
||||
if (aEvent.target.localName == "treechildren")
|
||||
dropItem = aEvent.target.parentNode; // handle drop on blank space.
|
||||
|
||||
// In the default view, the root node is the NC root, and we don't want to append
|
||||
// to that. Adjust accordingly...
|
||||
if (NODE_ID(dropItem) == "NC:NavCenter")
|
||||
dropItem = document.getElementById("treechildren-bookmarks").firstChild;
|
||||
|
||||
if (!dropItem) return;
|
||||
|
||||
// XXX we could probably compute this ourselves, but let the tree do this
|
||||
// automagically for now.
|
||||
|
|
|
@ -423,6 +423,9 @@ BookmarksTree.prototype = {
|
|||
if (gSelectionTracker.currentItem.getAttribute("type") != NC_NS + "Bookmark" &&
|
||||
i > 1)
|
||||
return;
|
||||
// Don't allow editing of the root folder name
|
||||
if (gSelectionTracker.currentItem.id == "NC:BookmarksRoot")
|
||||
return;
|
||||
if (gSelectionTracker.clickCount == 1)
|
||||
gBookmarksShell.commands.editCell(this.tree.currentItem, i);
|
||||
break;
|
||||
|
@ -437,7 +440,8 @@ BookmarksTree.prototype = {
|
|||
{
|
||||
if (this.tree.selectedItems.length > 1) return;
|
||||
if (aEvent.keyCode == 113 && aEvent.shiftKey) {
|
||||
if (this.resolveType(NODE_ID(this.tree.currentItem)) == NC_NS + "Bookmark")
|
||||
const kNodeID = NODE_ID(this.tree.currentItem);
|
||||
if (this.resolveType(kNodeId) == NC_NS + "Bookmark" && kNodeID != "NC:NavCenter")
|
||||
gBookmarksShell.commands.editCell (this.tree.currentItem, 1);
|
||||
}
|
||||
else if (aEvent.keyCode == 113)
|
||||
|
@ -453,6 +457,7 @@ BookmarksTree.prototype = {
|
|||
var kids = ContentUtils.childByLocalName(folder, "treechildren");
|
||||
if (!kids) return;
|
||||
|
||||
dump("*** trying to select items\n");
|
||||
var item = kids.firstChild;
|
||||
while (item) {
|
||||
if (item.id == aItemURI) break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче