mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 250974: dragging a link over the Downloads or Go button should display a statusbar message. r=mconnor
This commit is contained in:
parent
7815464984
commit
a3037fbc36
@ -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");
|
||||
|
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user