rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
StopInlineSpellChecker();
onClose: function() { //Reset recipients and attachments ReleaseAutoCompleteState(); awResetAllRows(); RemoveAllAttachments(); // We need to clear the identity popup menu in case the user will change them. It will be rebuilded later in ComposeStartup ClearIdentityListPopup(document.getElementById("m...
disableEditableFields()
onClose: function() { awResetAllRows(); RemoveAllAttachments(); //We need to clear the identity popup menu in case the user will change them. It will be rebuilded later in ComposeStartup ClearIdentityListPopup(document.getElementById("msgIdentityPopup")); SetContentAndBodyAsUnmodified(); ReleaseGlobalV...
if (top.awInputElement.getAttribute('focused') != '') top.awInputElement.removeAttribute('focused');
awGetInputElement(1).removeAttribute('focused');
onClose: function() { //Reset recipients and attachments ReleaseAutoCompleteState(); awResetAllRows(); RemoveAllAttachments(); // We need to clear the identity popup menu in case the user will change them. // It will be rebuilt later in ComposeStartup ClearIdentityListPopup(document.getElementBy...
return true;
function onClose(){ // Shutdown the spell check and close the dialog spellChecker.UninitSpellChecker(); SaveWindowLocation(); window.close();}
if (client.userClose)
if ("userClose" in client && client.userClose)
function onClose(){ if (client.userClose) return true; client.userClose = true; client.currentObject.display ("Closing ChatZilla...", "INFO"); if (client.getConnectionCount() == 0) /* if we're not connected to anything, just close the window */ return true; /* otherwise, try to c...
client.currentObject.display ("Closing ChatZilla...", "INFO");
client.currentObject.display (getMsg("cli_closing"), "INFO");
function onClose(){ if (client.userClose) return true; client.userClose = true; client.currentObject.display ("Closing ChatZilla...", "INFO"); if (client.getConnectionCount() == 0) /* if we're not connected to anything, just close the window */ return true; /* otherwise, try to c...
onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); hideContainerIfEmpty('new_actions'); },
onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); },
onComplete:function(request){ new Effect.Highlight(itemContainerElemId,{}); addOneAjaxToDoItemCheckmarkHandling($(itemContainerElemId)); hideContainerIfEmpty('new_actions'); },
var msg = getMsg(MSN_PROFILE_SAVED, getURLSpecFromFile(file.localFile)); display (msg); console.status = msg; file.close();
var w = window.open("about:blank"); w.wrappedJSObject.document.open(); w.wrappedJSObject.document.write(fileString.str); w.wrappedJSObject.document.close();
function onComplete (i) { var msg = getMsg(MSN_PROFILE_SAVED, getURLSpecFromFile(file.localFile)); display (msg); console.status = msg; file.close(); };
dump( "Error setting close timeout\n" ); window.close(); dialog.cancel.childNodes[0].nodeValue = "Close";
function onCompletion( status ) { // Note that we're done (and can ignore subsequent progress notifications). completed = true; // Indicate completion in status area. var msg = getString( "completeMsg" ); msg = replaceInsert( msg, 1, formatSeconds( elapsed/1000 ) ); onStatus( msg ); // Put progress...
window.setTimeout( "window.close();", 2000 );
dialog.progress.setAttribute( "value", 100 ); dialog.progress.setAttribute( "mode", "normal" ); try { window.setTimeout( "window.close();", 2000 ); } catch ( exception ) { dump( "Error setting close timeout\n" ); for ( prop in exception ) { dump( "exception." + prop + "=" + exception[ prop ] + "\n" ); } window.close(...
function onCompletion( status ) { // Note that we're done (and can ignore subsequent progress notifications). completed = true; // Indicate completion in status area. onStatus( "Download completed in " + formatSeconds( elapsed/1000 ) ); // Close the window in 2 seconds (to ensure user sees we're done). ...
cview.lastProgID = e.target.parentNode.getAttribute("progid");
cview.lastContractID = e.target.parentNode.getAttribute("contractid");
function onComponentClick(e){ cview.lastProgID = e.target.parentNode.getAttribute("progid"); if (cview.interfaceMode == "implemented-by") { cview.interfaceFilter = cview.lastProgID; filterInterfaces(); }}
cview.interfaceFilter = cview.lastProgID;
cview.interfaceFilter = cview.lastContractID;
function onComponentClick(e){ cview.lastProgID = e.target.parentNode.getAttribute("progid"); if (cview.interfaceMode == "implemented-by") { cview.interfaceFilter = cview.lastProgID; filterInterfaces(); }}
document.getElementById("textbox").focus();
function onConfigLoad(){ // Load strings gConfigBundle = document.getElementById("configBundle"); document.title = gConfigBundle.getString("title"); gLockStrs[PREF_IS_DEFAULT_VALUE] = gConfigBundle.getString("default"); gLockStrs[PREF_IS_USER_SET] = gConfigBundle.getString("user"); gLockStrs[PREF_IS_LOCKED] = gCo...
var prefCount = {value:0}; var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(null); var prefArray = prefBranch.getChildList("" , prefCount); var prefName, prefType, prefValue, prefIndex, prefLockState;
var prefCount = { value: 0 }; var prefArray = gPrefBranch.getChildList("", prefCount);
function onConfigLoad(){ document.title = "about:config"; var prefCount = {value:0}; var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(null); var prefArray = prefBranch.getChildList("" , pref...
var i = 0; var j = 0; var k = 0;
for (var i = 0; i < prefCount.value; ++i) { var prefName = prefArray[i]; if (/capability/.test(prefName)) continue;
function onConfigLoad(){ document.title = "about:config"; var prefCount = {value:0}; var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(null); var prefArray = prefBranch.getChildList("" , pref...
prefArray.sort(); for (i = 0; i < prefCount.value; i++) { if((prefArray[i].indexOf("capability", 0) + 1) > 0) { j++; continue; }
fetchPref(prefName, gPrefArray.length); }
function onConfigLoad(){ document.title = "about:config"; var prefCount = {value:0}; var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(null); var prefArray = prefBranch.getChildList("" , pref...
k = (i - j);
var descending = document.getElementsByAttribute("sortDirection", "descending"); if (descending.length) { gSortedColumn = descending[0].id; gSortDirection = -1; } else { var ascending = document.getElementsByAttribute("sortDirection", "ascending"); if (ascending.length) gSortedColumn = ascending[0].id; else document.ge...
function onConfigLoad(){ document.title = "about:config"; var prefCount = {value:0}; var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(null); var prefArray = prefBranch.getChildList("" , pref...
prefIndex = k + 1; if (prefBranch.prefIsLocked(prefArray[i])) prefLockState = kLocked; else if(prefBranch.prefHasUserValue(prefArray[i])) prefLockState = kUserSet; else prefLockState = kDefault; const nsIPrefBranch = Components.interfaces.nsIPrefBranch; switch (prefBranch.getPrefType(prefArray[i])) { case nsIPrefBra...
document.getElementById("configTree").view = view;
function onConfigLoad(){ document.title = "about:config"; var prefCount = {value:0}; var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var prefBranch = prefService.getBranch(null); var prefArray = prefBranch.getChildList("" , pref...
document.title = "about:config";
gConfigBundle = document.getElementById("configBundle"); document.title = gConfigBundle.getString("title"); gLockStrs[PREF_IS_DEFAULT_VALUE] = gConfigBundle.getString("default"); gLockStrs[PREF_IS_USER_SET] = gConfigBundle.getString("user"); gLockStrs[PREF_IS_LOCKED] = gConfigBundle.getString("locked"); gTypeStrs[nsI...
function onConfigLoad(){ document.title = "about:config"; var prefCount = { value: 0 }; var prefArray = gPrefBranch.getChildList("", prefCount); for (var i = 0; i < prefCount.value; ++i) { var prefName = prefArray[i]; if (/capability/.test(prefName)) // avoid displaying "private" preferences continue; ...
document.getElementById("configTree").view = null;
function onConfigUnload(){ gPrefBranch.removeObserver("", gPrefListener);}
}
},
onCreateRulePopup: function() { }
datepopup.dateField.value = formatDate( datepopup.value );
function onDatePick( datepopup ){ // display the new date in the textbox datepopup.dateField.value = formatDate( datepopup.value ); // remember the new date in a property, "editDate". we created on the date textbox datepopup.dateField.editDate = datepopup.value; var Now = new Date(); //change the ...
datepopup.dateField.editDate = datepopup.value;
function onDatePick( datepopup ){ // display the new date in the textbox datepopup.dateField.value = formatDate( datepopup.value ); // remember the new date in a property, "editDate". we created on the date textbox datepopup.dateField.editDate = datepopup.value; var Now = new Date(); //change the ...
document.getElementById( "repeat-end-date-text" ).value = formatDate( datepopup.value ); document.getElementById( "repeat-end-date-text" ).editDate = datepopup.value;
document.getElementById( "repeat-end-date-picker" ).value = formatDate( datepopup.value );
function onDatePick( datepopup ){ // display the new date in the textbox datepopup.dateField.value = formatDate( datepopup.value ); // remember the new date in a property, "editDate". we created on the date textbox datepopup.dateField.editDate = datepopup.value; var Now = new Date(); //change the ...
setElementValue("repeat-end-date-picker") = pickedDateTime;
setElementValue("repeat-end-date-picker", pickedDateTime);
function onDateTimePick(dateTimePicker){ var startDate = getElementValue("start-datetime"); var endDate = getElementValue("end-datetime"); var pickedDateTime = new Date(dateTimePicker.value); var duration = ( endDate.getTime() - startDate.getTime() ); if (dateTimePicker.id == "end-datet...
document.getElementById( "end-datetime" ).value = gEndDate;
var userEndDate =new Date(gEndDate) if( getFieldValue( "all-day-event-checkbox", "checked" ) ) { userEndDate.setDate( userEndDate.getDate() - 1 ); } document.getElementById( "end-datetime" ).value = userEndDate;
function onDateTimePick( dateTimePicker ){ var pickedDateTime = new Date( dateTimePicker.value); if( dateTimePicker.id == "end-datetime" ) { gEndDate = pickedDateTime; // save the duration gDuration = gEndDate.getTime() - gStartDate.getTime(); updateOKButton(); return; } if( dateTimePicker...
},
}
onDblClick: function( event ) { addSelectedAddressesIntoInviteBucket( '', '' ); },
if (t.localName != "outlinerbody")
if (t.localName != "outlinerchildren")
function onDblClick(e) { var t = e.originalTarget; if (t.localName != "outlinerbody") return; openSelectedFile();}
if (e.button != 0) return;
function onDblClick(e) { var t = e.originalTarget; if (t.localName != "treechildren") return; openSelectedFile();}
smtpService.deleteSmtpServer(server);
gDeletedSmtpServers[gDeletedSmtpServers.length] = server.key;
function onDelete(event){ var server = getSelectedServer(); if (!server) return; smtpService.deleteSmtpServer(server); refreshServerList();}
var protocolinfo = Components.classes["component:
var protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + type].getService(Components.interfaces.nsIMsgProtocolInfo);
function onDeleteAccount(event) { //dump("onDeleteAccount\n"); if (event.target.getAttribute("disabled") == "true") return; var result = getServerIdAndPageIdFromTree(accounttree); if (!result) return; var account = getAccountFromServerId(result.serverId); if (!account) return; var server = account...
if (!protocolinfo.canDelete) return;
var canDelete = protocolinfo.canDelete; if (!canDelete) { canDelete = server.canDelete; } if (!canDelete) return;
function onDeleteAccount(event) { //dump("onDeleteAccount\n"); if (event.target.getAttribute("disabled") == "true") return; var result = getServerIdAndPageIdFromTree(accounttree); if (!result) return; var account = getAccountFromServerId(result.serverId); if (!account) return; var server = account...
if (client.viewsArray.length < 2) { client.currentObject.display ("Cannot delete last view.", "ERROR"); return; }
function onDeleteCurrentView(){ var tb = getTBForObject(client.currentObject); if (tb) { var i = deleteToolbutton (tb); if (i != -1) { delete client.currentObject.messages; if (i >= client.viewsArray.length) i = client.viewsArray.length - 1; ...
delete client.currentObject.messageCount;
function onDeleteCurrentView(){ var tb = getTabForObject(client.currentObject); if (client.viewsArray.length < 2) { client.currentObject.display (getMsg("onDeleteCurrentViewMsg"), "ERROR"); return; } if (tb) { var i = deleteTab (tb); if (i != -1) { del...
for each (obs in this.compCalendar.mObservers) obs.onDeleteItem(aDeletedItem);
this.notifyObservers("onDeleteItem", arguments);
onDeleteItem: function(aDeletedItem) { for each (obs in this.compCalendar.mObservers) obs.onDeleteItem(aDeletedItem); },
onDeleteItem: function (aItem) { if (aItem instanceof Components.interfaces.calITodo)
onDeleteItem: function(aDeletedItem) { if (aDeletedItem instanceof Components.interfaces.calITodo && !this.mInBatch)
onDeleteItem: function (aItem) { if (aItem instanceof Components.interfaces.calITodo) toDoUnifinderRefresh(); },
dump("In OnDeleteOrMoveMessagesCompleted\n");
OnDeleteOrMoveMessagesCompleted :function(folder) { dump("In OnDeleteOrMoveMessagesCompleted\n"); if(IsCurrentLoadedFolder(folder)) { msgNavigationService.EnsureDocumentIsLoaded(document); dump("next message uri is " + gNextMessageAfterDelete + "\n"); if(gNextMessageAfterDelete) { var nextMessage = docum...
dump("next message uri is " + gNextMessageAfterDelete + "\n");
OnDeleteOrMoveMessagesCompleted :function(folder) { dump("In OnDeleteOrMoveMessagesCompleted\n"); if(IsCurrentLoadedFolder(folder)) { msgNavigationService.EnsureDocumentIsLoaded(document); dump("next message uri is " + gNextMessageAfterDelete + "\n"); if(gNextMessageAfterDelete) { var nextMessage = docum...
if(!nextMessage) dump("No next message after delete\n");
OnDeleteOrMoveMessagesCompleted :function(folder) { dump("In OnDeleteOrMoveMessagesCompleted\n"); if(IsCurrentLoadedFolder(folder)) { msgNavigationService.EnsureDocumentIsLoaded(document); dump("next message uri is " + gNextMessageAfterDelete + "\n"); if(gNextMessageAfterDelete) { var nextMessage = docum...
else dump("No thread tree\n");
OnDeleteOrMoveMessagesCompleted :function(folder) { dump("In OnDeleteOrMoveMessagesCompleted\n"); if(IsCurrentLoadedFolder(folder)) { msgNavigationService.EnsureDocumentIsLoaded(document); dump("next message uri is " + gNextMessageAfterDelete + "\n"); if(gNextMessageAfterDelete) { var nextMessage = docum...
var file = Components.classes[nsILocalFile_PROGID].createInstance(nsILocalFile);
var file = Components.classes[nsILocalFile_CONTRACTID].createInstance(nsILocalFile);
function onDirectoryChanged(target){ var path = target.getAttribute("value"); var file = Components.classes[nsILocalFile_PROGID].createInstance(nsILocalFile); file.initWithPath(path); gotoDirectory(file);}
var file = Components.classes[NS_LOCALFILE_CONTRACTID].createInstance(nsILocalFile);
var file = Components.classes[NS_LOCAL_FILE_CONTRACTID].createInstance(nsILocalFile);
function onDirectoryChanged(target){ var path = target.getAttribute("label"); var file = Components.classes[NS_LOCALFILE_CONTRACTID].createInstance(nsILocalFile); file.initWithPath(path); if (!sfile.equals(file)) { // Do this on a timeout callback so the directory list can roll up // and we don't keep the mou...
this._wiz.getButton("back").disabled = true; this._wiz.getButton("finish").disabled = false;
this._wiz.canRewind = false;
onDonePageShow: function () { this._wiz.getButton("cancel").disabled = true; this._wiz.getButton("back").disabled = true; this._wiz.getButton("finish").disabled = false; this._listItems("doneItems"); }
result.copyTo(backupDir, makeName('initial'));
copyToOverwriting(result, backupDir, makeName('initial'));
onDownloadComplete: function(downloader, request, ctxt, status, result) { if (doInitialBackup) result.copyTo(backupDir, makeName('initial')); if (doDailyBackup) result.copyTo(backupDir, dailyBackupFileName); provider.doWriteI...
result.copyTo(backupDir, dailyBackupFileName);
copyToOverwriting(result, backupDir, dailyBackupFileName);
onDownloadComplete: function(downloader, request, ctxt, status, result) { if (doInitialBackup) result.copyTo(backupDir, makeName('initial')); if (doDailyBackup) result.copyTo(backupDir, dailyBackupFileName); provider.doWriteI...
Feed.onDownloaded = function(event) { var request = event.target; var url = request.channel.originalURI.spec; debug(url + " downloaded"); var feed = FeedCache.getFeed(url); if (!feed) throw("error after downloading " + url + ": couldn't retrieve feed from request"); feed.parse(); }
onDownloaded: function(aEvent) { var request = aEvent.target; var url = request.channel.originalURI.spec; debug(url + " downloaded"); var feed = FeedCache.getFeed(url); if (!feed) throw("error after downloading " + url + ": couldn't retrieve feed from request"); feed.parse(); },
Feed.onDownloaded = function(event) { var request = event.target; var url = request.channel.originalURI.spec; debug(url + " downloaded"); var feed = FeedCache.getFeed(url); if (!feed) throw("error after downloading " + url + ": couldn't retrieve feed from request"); feed.parse(); // parse will asynchronousl...
feed.downloaded(nsnull);
feed.downloaded(feed, false);
Feed.onDownloadError = function(event) { // XXX add error message if available and notify the user? var request = event.target; var url = request.channel.originalURI.spec; var feed = gFzFeedCache[url]; if (feed) { debug(feed.title + " download failed"); if (feed.downloadCallback) feed.downloaded(nsnull...
Feed.onDownloadError = function(event) { var request = event.target; var url = request.channel.originalURI.spec; var feed = FeedCache.getFeed(url); if (feed.downloadCallback) feed.downloadCallback.downloaded(feed, kNewsBlogRequestFailure); FeedCache.removeFeed(url); }
onDownloadError: function(aEvent) { var request = aEvent.target; var url = request.channel.originalURI.spec; var feed = FeedCache.getFeed(url); if (feed.downloadCallback) feed.downloadCallback.downloaded(feed, kNewsBlogRequestFailure); FeedCache.removeFeed(url); },
Feed.onDownloadError = function(event) { var request = event.target; var url = request.channel.originalURI.spec; var feed = FeedCache.getFeed(url); if (feed.downloadCallback) feed.downloadCallback.downloaded(feed, kNewsBlogRequestFailure); FeedCache.removeFeed(url);}
var request = event.target; var url = request.channel.originalURI.spec; var feed = gFzFeedCache[url]; if (feed) { debug(feed.title + " download failed"); if (feed.downloadCallback) feed.downloaded(feed, false); } throw("error downloading feed " + url);
if (feed.downloadCallback) feed.downloadCallback.downloaded(feed, kNewsBlogRequestFailure);
Feed.onDownloadError = function(event) { // XXX add error message if available and notify the user? var request = event.target; var url = request.channel.originalURI.spec; var feed = gFzFeedCache[url]; if (feed) { debug(feed.title + " download failed"); if (feed.downloadCallback) feed.downloaded(feed, ...
if (children[i].id == "NC:PersonalToolbarFolder") {
if (children[i].id == "NC:PersonalToolbarFolder" && children[i].localName == "hbox") {
onDragCloseMenu: function (aNode) { var children = aNode.childNodes; for (var i = 0; i < children.length; i++) { if (children[i].id == "NC:PersonalToolbarFolder") { this.onDragCloseMenu(children[i]); } else if (this.isContainer(children[i]) && children[i].getAttribute("open") == "true") {...
if (this.mCurrentDragOverTarget.parentNode.id == "NC:PersonalToolbarFolder")
if (this.mCurrentDragOverTarget.parentNode.id == "NC:PersonalToolbarFolder" && this.mCurrentDragOverTarget.parentNode.localName == "hbox")
onDragCloseTarget: function () { // if the mouse is not over a menu, then close everything. if (!this.mCurrentDragOverTarget) { this.onDragCloseMenu(document.getElementById("PersonalToolbar")); return } // The bookmark button is not a sibling of the folders in the PT if (this.mCurrentDragOve...
if (currentObserver != this.mObservers[i])
if (currentObserver != this.mObservers[i]) {
onDragCloseTarget: function () { var currentObserver = this.getObserverForNode(this.mCurrentDragOverTarget); // close all the menus not hovered by the mouse for (var i=0; i < this.mObservers.length; i++) { if (currentObserver != this.mObservers[i]) this.onDragCloseMenu(this.mObservers[i]); ...
else
if (this.mObservers[i].parentNode.id == "bookmarks-menu") this.mObservers[i].hidePopup(); } else
onDragCloseTarget: function () { var currentObserver = this.getObserverForNode(this.mCurrentDragOverTarget); // close all the menus not hovered by the mouse for (var i=0; i < this.mObservers.length; i++) { if (currentObserver != this.mObservers[i]) this.onDragCloseMenu(this.mObservers[i]); ...
onDragExit: function ()
onDragExit: function (aEvent, aDragSession)
onDragExit: function () { var homeButton = document.getElementById("homebutton"); homeButton.removeAttribute("home-dragover"); statusTextFld.setAttribute("value", gStatus); gStatus = null; },
if (aDragSession.sourceDocument == window._content.document)
if (aDragSession.sourceDocument == window._content.document) {
onDragOver: function (aEvent, aFlavour, aDragSession) { // if the drag originated w/in this content area, bail early. This avoids loading // a URL dragged from the content area into the very same content area (which is // almost never the desired action). This code is a bit too simplistic and may ...
return; } aDragSession.dragAction = Components.interfaces.nsIDragService.DRAGDROP_ACTION_LINK;
onDragOver: function (aEvent, aFlavour, aDragSession) { // if the drag originated w/in this content area, bail early. This avoids loading // a URL dragged from the content area into the very same content area (which is // almost never the desired action). This code is a bit too simplistic and may ...
onDragOver: function (aEvent, aFlavour)
onDragOver: function (aEvent, aFlavour, aDragSession)
onDragOver: function (aEvent, aFlavour) { // temporary if (!isPToolbarDNDEnabled()) return false; var toolbar = document.getElementById("PersonalToolbar"); toolbar.setAttribute("dd-triggerrepaint", 0); },
var attachmentBox = document.getElementById("attachments-box"); if (attachmentBox.hidden)
if (aFlavour.contentType != "text/x-moz-address")
onDragOver: function (aEvent, aFlavour, aDragSession) { // make sure the attachment box is visible during drag over var attachmentBox = document.getElementById("attachments-box"); if (attachmentBox.hidden) { attachmentBox.hidden = false; document.getElementById("attachmentbucket-s...
attachmentBox.hidden = false; document.getElementById("attachmentbucket-sizer").hidden=false;
var attachmentBox = document.getElementById("attachments-box"); if (attachmentBox.hidden) { attachmentBox.hidden = false; document.getElementById("attachmentbucket-sizer").hidden=false; }
onDragOver: function (aEvent, aFlavour, aDragSession) { // make sure the attachment box is visible during drag over var attachmentBox = document.getElementById("attachments-box"); if (attachmentBox.hidden) { attachmentBox.hidden = false; document.getElementById("attachmentbucket-s...
if (aEvent.getPreventDefault()) return;
onDragOver: function (aEvent, aFlavour, aDragSession) { // if the drag originated w/in this content area, bail early. This avoids loading // a URL dragged from the content area into the very same content area (which is // almost never the desired action). This code is a bit too simplistic and may ...
if (aDragSession.sourceDocument == window._content.document) {
if (aDragSession.sourceDocument == aEvent.view.document) {
onDragOver: function (aEvent, aFlavour, aDragSession) { if (aEvent.getPreventDefault()) return; // if the drag originated w/in this content area, bail early. This avoids loading // a URL dragged from the content area into the very same content area (which is // almost never the d...
} else if (aTarget.localName == "hbox") { aTarget.lastChild.removeAttribute("dragover-right");
onDragRemoveFeedBack: function (aTarget) { if (aTarget.localName == "toolbar") { aTarget.lastChild.lastChild.removeAttribute("dragover-right"); } else { aTarget.removeAttribute("dragover-left"); aTarget.removeAttribute("dragover-right"); aTarget.removeAttribute("dragover-top"); aTarget...
var bt = document.getElementById("bookmarks-toolbar");
bt = document.getElementById("bookmarks-toolbar");
onDragRemoveFeedBack: function (aTarget) { var newTarget; if (aTarget.localName == "hbox") { // hit when dropping in the bt or between the last visible bookmark // and the chevron var bt = document.getElementById("bookmarks-toolbar"); newTarget = bt.getLastVisibleBookmark(); if (new...
if (aTarget.localName == "bookmarks-toolbar") { var ptf = document.getAnonymousElementByAttribute(aTarget, "anonid", "bookmarks-ptf"); if (ptf.hasChildNodes()) ptf.lastChild.removeAttribute("dragover-right"); } else if (aTarget.localName == "hbox") { aTarget.lastChild.removeAttribute("dragover-right");
if (aTarget.localName == "hbox") { var bt = document.getElementById("bookmarks-toolbar"); var newTarget = bt.getLastVisibleBookmark(); if (newTarget) newTarget.removeAttribute("dragover-right"); } else if (aTarget.localName == "stack") { var bt = document.getElementById("bookmarks-toolbar"); var newTarget = bt.getLas...
onDragRemoveFeedBack: function (aTarget) { if (aTarget.localName == "bookmarks-toolbar") { var ptf = document.getAnonymousElementByAttribute(aTarget, "anonid", "bookmarks-ptf"); if (ptf.hasChildNodes()) ptf.lastChild.removeAttribute("dragover-right"); } else if (aTarget.localName == "hbox") {...
aTarget.lastChild.setAttribute("dragover-right", "true");
var bt = document.getElementById("bookmarks-toolbar"); var newTarget = bt.getLastVisibleBookmark(); if (newTarget) newTarget.setAttribute("dragover-right", "true");
onDragSetFeedBack: function (aTarget, aOrientation) { switch (aTarget.localName) { case "toolbarseparator": case "toolbarbutton": switch (aOrientation) { case BookmarksUtils.DROP_BEFORE: aTarget.setAttribute("dragover-left", "true"); break; case BookmarksUt...
case "menupopup": case "toolbar" : break; case "bookmarks-toolbar": break; default: dump("No feedback for: "+aTarget.localName+"\n");
case "stack" : case "menupopup": break; default: dump("No feedback for: "+aTarget.localName+"\n");
onDragSetFeedBack: function (aTarget, aOrientation) { switch (aTarget.localName) { case "toolbarseparator": case "toolbarbutton": switch (aOrientation) { case BookmarksUtils.DROP_BEFORE: aTarget.setAttribute("dragover-left", "true"); break; case BookmarksUt...
if (target.localName == "descriptionitem")
if (target.localName == "listitem")
onDragStart: function (aEvent, aAttachmentData, aDragAction) { var target = aEvent.target; if (target.localName == "descriptionitem") { var attachmentUrl = target.getAttribute("attachmentUrl"); var attachmentDisplayName = target.getAttribute("label"); var attachmentContentType = target.getAtt...
},
}
onDragStart: function (aEvent) { var title = aEvent.target.getAttribute("value"); var uri = aEvent.target.parentNode.parentNode.id; dump("*** title = " + title + "; uri = " + uri + "\n"); if ( aEvent.target.localName != "treecell" ) // make sure we have something to drag return null; va...
if ( title == "" && uri == "" )
if ( aEvent.target.localName != "treecell" )
onDragStart: function (aEvent) { var title = aEvent.target.getAttribute("value"); var uri = aEvent.target.parentNode.parentNode.id; dump("*** title = " + title + "; uri = " + uri + "\n"); if ( title == "" && uri == "" ) // make sure we have something to drag return null; var htmlString ...
flavourList["text/x-moz-url"] = { width: 2, data: uri + " " + "[ TEMP TITLE ]" };
flavourList["text/x-moz-url"] = { width: 2, data: uri + " " + title };
onDragStart: function (aEvent) { var title = aEvent.target.getAttribute("value"); var uri = aEvent.target.parentNode.parentNode.id; dump("*** title = " + title + "; uri = " + uri + "\n"); if ( title == "" && uri == "" ) // make sure we have something to drag return null; var htmlString ...
aXferData.data.addDataForFlavour("text/x-moz-url", url + "\n" + title);
aXferData.data.addDataForFlavour("text/x-moz-url", uri + "\n" + title);
onDragStart: function (aEvent, aXferData, aDragAction) { var title = aEvent.target.getAttribute("label"); var uri = aEvent.target.parentNode.parentNode.id; if (aEvent.target.localName != "treecell") // make sure we have something to drag return null; var htmlString = "<A HREF='" + uri + "'>" + t...
tmpurl = tmpurl + "&type=" + attachmentContentType + "&filename=" + attachmentDisplayName;
var tmpurlWithExtraInfo = tmpurl + "&type=" + attachmentContentType + "&filename=" + attachmentDisplayName;
onDragStart: function (aEvent, aAttachmentData, aDragAction) { var target = aEvent.target; if (target.localName == "listitem") { var attachmentUrl = target.getAttribute("attachmentUrl"); var attachmentDisplayName = target.getAttribute("label"); var attachmentContentType = target.getAttribute(...
aAttachmentData.data.addDataForFlavour("text/x-moz-url", tmpurl + "\n" + attachmentDisplayName);
aAttachmentData.data.addDataForFlavour("text/x-moz-url", tmpurlWithExtraInfo + "\n" + attachmentDisplayName);
onDragStart: function (aEvent, aAttachmentData, aDragAction) { var target = aEvent.target; if (target.localName == "listitem") { var attachmentUrl = target.getAttribute("attachmentUrl"); var attachmentDisplayName = target.getAttribute("label"); var attachmentContentType = target.getAttribute(...
return;
return false;
onDragStart: function (aEvent, aXferData, aDragAction) { var target = aEvent.target; // Prevent dragging from invalid regions // can't drag from the empty areas if (target.id == "bookmarks-menu" || target.id == "bookmarks-chevron" || target.id == "bookmarks-ptf") return false; if (!...
return true;
onDragStart: function (aEvent, aXferData, aDragAction) { var target = aEvent.target; // Prevent dragging from invalid regions // can't drag from the empty areas if (target.id == "bookmarks-menu" || target.id == "bookmarks-chevron" || target.id == "bookmarks-ptf") return false; if (!...
flavourList["text/x-moz-url"] = { width: 2, data: escape(uri) + " " + title };
flavourList["text/x-moz-url"] = { width: 2, data: uri + " " + title };
onDragStart: function (aEvent) { var title = aEvent.target.getAttribute("value"); var uri = aEvent.target.parentNode.parentNode.id; dump("*** title = " + title + "; uri = " + uri + "\n"); if ( aEvent.target.localName != "treecell" ) // make sure we have something to drag return null; va...
var url = builder.getResourceAtIndex(currentIndex).Value;
var url = builder.getResourceAtIndex(currentIndex).ValueUTF8;
onDragStart: function (aEvent, aXferData, aDragAction) { var currentIndex = gHistoryTree.currentIndex; if (isContainer(gHistoryTree, currentIndex)) return false; var builder = gHistoryTree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder); var url = builder.ge...
flavourList["text/x-moz-url"] = { width: 2, data: escape(urlBar.value) + " " + window.title };
flavourList["text/x-moz-url"] = { width: 2, data: urlBar.value + " " + window._content.document.title };
onDragStart: function () { var urlBar = document.getElementById("urlbar"); var flavourList = { }; flavourList["text/unicode"] = { width: 2, data: urlBar.value }; flavourList["text/x-moz-url"] = { width: 2, data: escape(urlBar.value) + " " + window.title }; var htmlString = "<a href=\"" + u...
var srcDirectory = GetDirectoryFromURI(GetSelectedDirectory()); if ((srcDirectory.operations & srcDirectory.opWrite)) aDragAction.action = Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY | Components.interfaces. nsIDragService.DRAGDROP_ACTION_MOVE; else aDragAction.action = Components.interfaces. nsIDrag...
onDragStart: function (aEvent, aXferData, aDragAction){ aXferData.data = new TransferData(); var selectedRows = GetSelectedRows(); var selectedAddresses = GetSelectedAddresses(); aXferData.data.addDataForFlavour("moz/abcard", selectedRows); aXferData.data.addDataForFlavour("text/x-moz-address...
flavourList["text/x-moz-url"] = { width: 2, data: uri + " " + title };
flavourList["text/x-moz-url"] = { width: 2, data: escape(uri) + " " + title };
onDragStart: function (aEvent) { var title = aEvent.target.getAttribute("value"); var uri = aEvent.target.parentNode.parentNode.id; dump("*** title = " + title + "; uri = " + uri + "\n"); if ( aEvent.target.localName != "treecell" ) // make sure we have something to drag return null; va...
tmpurl = tmpurl + "&type=" + attachmentContentType + "&filename=" + attachmentDisplayName;
var tmpurlWithExtraInfo = tmpurl + "&type=" + attachmentContentType + "&filename=" + attachmentDisplayName;
onDragStart: function (aEvent, aAttachmentData, aDragAction) { var target = aEvent.target; if (target.localName == "descriptionitem") { var attachmentUrl = target.getAttribute("attachmentUrl"); var attachmentDisplayName = target.getAttribute("label"); var attachmentContentType = target.getAtt...
aAttachmentData.data.addDataForFlavour("text/x-moz-url", tmpurl + "\n" + attachmentDisplayName);
aAttachmentData.data.addDataForFlavour("text/x-moz-url", tmpurlWithExtraInfo + "\n" + attachmentDisplayName);
onDragStart: function (aEvent, aAttachmentData, aDragAction) { var target = aEvent.target; if (target.localName == "descriptionitem") { var attachmentUrl = target.getAttribute("attachmentUrl"); var attachmentDisplayName = target.getAttribute("label"); var attachmentContentType = target.getAtt...
var fileURL = nsJSComponentManager.createInstance("component:
var fileURL = nsJSComponentManager.createInstance("@mozilla.org/network/standard-url;1", "nsIFileURL");
onDrop: function (aEvent, aData, aDragSession) { aData = aData.length ? aData[0] : aData; if (aData.flavour != "application/x-moz-file") return; var dataObj = aData.data.data.QueryInterface(Components.interfaces.nsIFile); if (!dataObj) return; var fileURL = nsJS...
if (commonDialogsService) commonDialogsService.Alert(window, errorTitle, errorMsg);
if (promptService) promptService.Alert(window, errorTitle, errorMsg);
onDrop: function (aEvent, aData, aDragSession) { var prettyName; var rawData = aData.data; switch (aData.flavour.contentType) { case "text/x-moz-url": case "text/nsmessage": var separator = rawData.indexOf("\n"); if (separator != -1) { prettyName = rawData.substr(sep...
if (!showDialog)
if (showDialog)
onDrop: function (aEvent, aData) { var aData = aData.length ? aData[0] : aData; var url = retrieveURLFromData(aData); var showDialog = nsPreferences.getBoolPref("browser.homepage.enable_home_button_drop", false); var setHomepage; if (!showDialog) { var commonDialogService =...
var checkValue = { value: false };
var checkValue = { value: true };
onDrop: function (aEvent, aData) { var aData = aData.length ? aData[0] : aData; var url = retrieveURLFromData(aData); var showDialog = nsPreferences.getBoolPref("browser.homepage.enable_home_button_drop", false); var setHomepage; if (!showDialog) { var commonDialogService =...
dump("*** pressedVal = " + pressedVal.value + "\n");
onDrop: function (aEvent, aData) { var aData = aData.length ? aData[0] : aData; var url = retrieveURLFromData(aData); var showDialog = nsPreferences.getBoolPref("browser.homepage.enable_home_button_drop", false); var setHomepage; if (!showDialog) { var commonDialogService =...
var name = split[1]; saveURL(url, name, null, true, true);
if (url != split) { var name = split[1]; saveURL(url, name, null, true, true); }
onDrop: function(aEvent, aXferData, aDragSession) { var split = aXferData.data.split("\n"); var url = split[0]; var name = split[1]; saveURL(url, name, null, true, true); },
switch (document.firstChild.getAttribute('windowtype')) {
switch (document.documentElement.getAttribute('windowtype')) {
onDrop: function (aEvent, aXferData, aDragSession) { var url = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType); // valid urls don't contain spaces ' '; if we have a space it // isn't a valid url, or if it's a javascript: or data: url, // bail out if (!url |...
var rdfContainer = nsJSComponentManager.createInstance("component:
var rdfContainer = nsJSComponentManager.createInstance("@mozilla.org/rdf/container;1",
onDrop: function (aEvent, aData, aDragSession) { // temporary if (!isPToolbarDNDEnabled()) return false; var element = aData.data.data; var dropElement = aEvent.target.id; var elementRes = RDFUtils.getResource(element); var dropElementRes = RDFUtils.getResource(dropEle...
var childContainer = nsJSComponentManager.createInstance("component:
var childContainer = nsJSComponentManager.createInstance("@mozilla.org/rdf/container;1",
onDrop: function (aEvent, aData, aDragSession) { // temporary if (!isPToolbarDNDEnabled()) return false; var element = aData.data.data; var dropElement = aEvent.target.id; var elementRes = RDFUtils.getResource(element); var dropElementRes = RDFUtils.getResource(dropEle...
var PBStyle = window.getComputedStyle(document.getElementById("PersonalToolbar"),''); var isHorizontal = (target.localName == "toolbarbutton"); if ((PBStyle.direction == 'rtl') && isHorizontal) if (orientation == BookmarksUtils.DROP_AFTER) orientation = BookmarksUtils.DROP_BEFORE; else if (orientation == BookmarksUtils...
onDrop: function (aEvent, aXferData, aDragSession) { var target = aEvent.target; this.onDragRemoveFeedBack(target); var selection = BookmarksUtils.getSelectionFromXferData(aDragSession); var orientation = BookmarksMenu.getBTOrientation(aEvent); var selTarget = BookmarksMenu.getBTTarget(target, orien...
if (xferData.length >= 2)
var bookmarksDS = gRDFService.GetDataSource("rdf:bookmarks"); var nameRes = RDFUtils.getResource(NC_RDF("Name")); var nameFromBookmarks = bookmarksDS.GetTarget(elementRes, nameRes, true); if (nameFromBookmarks) nameFromBookmarks = nameFromBookmarks.QueryInterface(Components.interfaces.nsIRDFLiteral); if (nameFromBookma...
onDrop: function (aEvent, aXferData, aDragSession) { var xferData = aXferData.data.split("\n"); var elementRes = RDFUtils.getResource(xferData[0]); var personalToolbarRes = RDFUtils.getResource("NC:PersonalToolbarFolder"); var inner = document.getElementById("innermostBox"); var childDB = ...
onDrop: function (aEvent, aData, aDragSession)
onDrop: function (aEvent, aXferData, aDragSession)
onDrop: function (aEvent, aData, aDragSession) { var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true; // valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out if...
var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true;
var url = retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);
onDrop: function (aEvent, aData, aDragSession) { var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true; // valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out if...
if ( url.indexOf(" ", 0) != -1 ) return true;
if (!url || !url.length || url.indexOf(" ", 0) != -1) return;
onDrop: function (aEvent, aData, aDragSession) { var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true; // valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out if...
default:
onDrop: function (aEvent, aData, aDragSession) { var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true; // valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out if...
return true;
onDrop: function (aEvent, aData, aDragSession) { var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true; // valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out if...
SOUND.beep();
BookmarksUtils.insertSelection("drag", selection, selTarget);
onDrop: function (aEvent, aXferData, aDragSession) { var target = aEvent.target; this.onDragRemoveFeedBack(target); var selection = BookmarksUtils.getSelectionFromXferData(aDragSession); var orientation = BookmarksMenu.getBTOrientation(aEvent); var selTarget = BookmarksMenu.getBTTarget(target, orien...
var urlBar = document.getElementById("urlbar"); urlBar.value = url; BrowserLoadURL();
loadShortcutOrURI(url);
onDrop: function (aEvent, aData, aDragSession) { var data = (('length' in aData) && aData.length) ? aData[0] : aData; var url = retrieveURLFromData(data); if (url.length == 0) return true; // valid urls don't contain spaces ' '; if we have a space it isn't a valid url so bail out if...