зеркало из https://github.com/mozilla/gecko-dev.git
Bug 250974: dragging a link over the Downloads or Go button should display a statusbar message. r=mconnor
This commit is contained in:
Родитель
7815464984
Коммит
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?
|
||||
|
|
Загрузка…
Ссылка в новой задаче