mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
315940 - allow bookmarks to be dropped _into_ left list folders. NPOB
This commit is contained in:
parent
584663989a
commit
ced08c0d12
@ -789,13 +789,19 @@ var PlacesControllerDragHelper = {
|
||||
* on the specified view.
|
||||
* @param view
|
||||
* An object implementing the AVI
|
||||
* @param orientation
|
||||
* The orientation of the drop
|
||||
* XXXben implement index param!
|
||||
* @returns true if the data being dragged is of a type supported by the view
|
||||
* it is being dragged over, false otherwise.
|
||||
*/
|
||||
canDrop: function PCDH_canDrop(view) {
|
||||
canDrop: function PCDH_canDrop(view, orientation) {
|
||||
var session = this._getSession();
|
||||
if (session) {
|
||||
var types = view.supportedDropTypes;
|
||||
if (orientation != Ci.nsINavHistoryResultViewObserver.DROP_ON)
|
||||
var types = view.supportedDropTypes;
|
||||
else
|
||||
types = view.supportedDropOnTypes;
|
||||
for (var i = 0; i < types.length; ++i) {
|
||||
if (session.isDataFlavorSupported(types[i]))
|
||||
return true;
|
||||
|
@ -137,7 +137,13 @@
|
||||
|
||||
<property name="browserWindow" onget="return window;"/>
|
||||
|
||||
<field name="supportedDropTypes">["text/x-moz-place", "text/x-moz-url"]</field>
|
||||
<field name="supportedDropTypes">
|
||||
[TYPE_X_MOZ_PLACE_CONTAINER, TYPE_X_MOZ_PLACE, TYPE_X_MOZ_URL]
|
||||
</field>
|
||||
|
||||
<field name="supportedDropOnTypes">
|
||||
[TYPE_X_MOZ_PLACE_CONTAINER, TYPE_X_MOZ_PLACE, TYPE_X_MOZ_URL]
|
||||
</field>
|
||||
|
||||
<method name="selectAll">
|
||||
<body><![CDATA[
|
||||
|
@ -107,8 +107,11 @@ var PlacesPage = {
|
||||
this._content.controllers.appendController(PlacesController);
|
||||
|
||||
this._places.supportedDropTypes = [TYPE_X_MOZ_PLACE_CONTAINER];
|
||||
this._places.supportedDropOnTypes = [TYPE_X_MOZ_PLACE_CONTAINER,
|
||||
TYPE_X_MOZ_PLACE, TYPE_X_MOZ_URL];
|
||||
this._content.supportedDropTypes = [TYPE_X_MOZ_PLACE_CONTAINER,
|
||||
TYPE_X_MOZ_PLACE, TYPE_X_MOZ_URL];
|
||||
this._content.supportedDropOnTypes = this._content.supportedDropTypes;
|
||||
|
||||
// Hook the browser UI
|
||||
PlacesUIHook.init(this._content);
|
||||
|
@ -297,6 +297,9 @@
|
||||
<!-- AVI Method -->
|
||||
<field name="supportedDropTypes">null</field>
|
||||
|
||||
<!-- AVI Method -->
|
||||
<field name="supportedDropOnTypes">null</field>
|
||||
|
||||
<!-- AVI Method -->
|
||||
<method name="selectAll">
|
||||
<body><![CDATA[
|
||||
@ -380,8 +383,8 @@
|
||||
({
|
||||
_self: this,
|
||||
|
||||
canDrop: function VO_canDrop() {
|
||||
return PlacesControllerDragHelper.canDrop(this._self);
|
||||
canDrop: function VO_canDrop(index, orientation) {
|
||||
return PlacesControllerDragHelper.canDrop(this._self, orientation);
|
||||
},
|
||||
|
||||
onDrop: function VO_onDrop(index, orientation) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user