Bug 250974: dragging a link over the Downloads or Go button should display a statusbar message. r=mconnor

This commit is contained in:
steffen.wilberg%web.de 2004-08-15 13:15:35 +00:00
parent 7815464984
commit a3037fbc36
2 changed files with 14 additions and 0 deletions

View File

@ -1919,11 +1919,15 @@ function openHomeDialog(aURL)
var goButtonObserver = {
onDragOver: function(aEvent, aFlavour, aDragSession)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = gNavigatorBundle.getString("dropongobutton");
aEvent.target.setAttribute("dragover", "true");
return true;
},
onDragExit: function (aEvent, aDragSession)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
aEvent.target.removeAttribute("dragover");
},
onDrop: function (aEvent, aXferData, aDragSession)
@ -1948,10 +1952,18 @@ var DownloadsButtonDNDObserver = {
// nsDragAndDrop
onDragOver: function (aEvent, aFlavour, aDragSession)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = gNavigatorBundle.getString("dropondownloadsbutton");
aDragSession.canDrop = (aFlavour.contentType == "text/x-moz-url" ||
aFlavour.contentType == "text/unicode");
},
onDragExit: function (aEvent, aDragSession)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
},
onDrop: function (aEvent, aXferData, aDragSession)
{
var split = aXferData.data.split("\n");

View File

@ -4,6 +4,8 @@ nv_stopped=Stopped
openFile=Open File
defaultStatus=
dropondownloadsbutton=Drop a link or file to download it
dropongobutton=Drop a link or file to open it
droponhomebutton=Drop a link or file to make it your home page
droponhometitle=Set Home Page
droponhomemsg=Do you want this document to be your new home page?