mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-13 07:24:47 +00:00
Bookmarks dragging to ptoolbar (85328). r=bz sr=ben
This commit is contained in:
parent
6b103fec7a
commit
0728ca4d2a
@ -33,6 +33,7 @@ Contributor(s): ______________________________________. -->
|
||||
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
|
||||
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
@ -248,7 +249,8 @@ Contributor(s): ______________________________________. -->
|
||||
rdf:type="http://home.netscape.com/NC-rdf#Folder">
|
||||
<menubutton class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name">
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
ondraggesture="event.preventBubble(); return false;">
|
||||
<menupopup>
|
||||
<menuitem label="&emptyItem.label;" disabled="true"/>
|
||||
</menupopup>
|
||||
@ -258,8 +260,9 @@ Contributor(s): ______________________________________. -->
|
||||
<rule parent="hbox" iscontainer="true">
|
||||
<menubutton class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name">
|
||||
<menupopup/>
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
ondraggesture="event.preventBubble(); return false;">
|
||||
<menupopup ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver);"/>
|
||||
</menubutton>
|
||||
</rule>
|
||||
|
||||
@ -278,7 +281,8 @@ Contributor(s): ______________________________________. -->
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name">
|
||||
<menupopup>
|
||||
<menuitem label="&emptyItem.label;" disabled="true"/>
|
||||
<menuitem label="&emptyItem.label;" disabled="true"
|
||||
ondraggesture="event.preventBubble(); return false;"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
|
@ -209,7 +209,12 @@ var personalToolbarObserver = {
|
||||
|
||||
onDragOver: function (aEvent, aFlavour, aDragSession)
|
||||
{
|
||||
var dropPosition = this.determineDropPosition(aEvent);
|
||||
var dropPosition
|
||||
if (aEvent.target.getAttribute("type") == "http://home.netscape.com/NC-rdf#Folder"
|
||||
&& aEvent.target.getAttribute("container") == "true")
|
||||
dropPosition = this.DROP_ON;
|
||||
else
|
||||
dropPosition = this.determineDropPosition(aEvent);
|
||||
|
||||
// bail if drop target is not a valid bookmark item or folder
|
||||
var inner = document.getElementById("innermostBox");
|
||||
@ -314,7 +319,10 @@ var personalToolbarObserver = {
|
||||
return RDFUtils.getResource(menu.id);
|
||||
case "treecell":
|
||||
var treeitem = aElement.parentNode.parentNode.parentNode.parentNode;
|
||||
return RDFUtils.getResource(treeitem.id);
|
||||
var res = treeitem.getAttribute("ref");
|
||||
if (!res)
|
||||
res = treeitem.id;
|
||||
return RDFUtils.getResource(res);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user